-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thermo refactor #11
Open
nury12n
wants to merge
41
commits into
materialsgenomefoundation:main
Choose a base branch
from
nury12n:thermo_refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Thermo refactor #11
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…r compounds like carbides, nitrides, etc
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11 +/- ##
==========================================
+ Coverage 75.55% 81.08% +5.52%
==========================================
Files 42 49 +7
Lines 6475 6660 +185
==========================================
+ Hits 4892 5400 +508
+ Misses 1583 1260 -323 ☔ View full report in Codecov by Sentry. |
…arameters and TemperatureParameters
…l functions defined in Nucleation module
…get default matrix and precipitate phases
…eters along with auto-updating of PrecipitateParameters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request aims to refactor the thermodynamic, diffusion and precipitation modules. This is intended to reduce redundant code as well as make it easier for future development.
Changes to the thermodynamics module
GeneralThermodynamics._getCompositionSetsEq
) and the driving force or multicomponent growth rate functions will just perform a few checks to validate the equilibrium calculations.MulticomponentThermodynamics
returned 5-6 values).if
orfor
blocks and hopefully make the code a bit shorter and more readable.setMobility
andsetDiffusivity
will just take in a function (or dictionary of functions) that is only dependent on T.GeneralThermodynamics
object.GeneralThermodynamics
was to require the user to manually define functions that take in(v.GE, v.N, v.P, v.T, internal DOF)
. Any composition dependent mobilities or diffusivities should be defined in a TDB file from now on.General changes in Diffusion and Precipitate models
Model(initial conditions, time, parameters) -> Results/Data
PrecipitateModel
should be generalized to where the user can defined what theories to use for nucleation rate and growth rate calculations.getDrivingForce
orgetInterdiffusivity
, etc.) and the user will not be limited to using the built-in thermodynamic modules.Changes to precipitation modeling
ShapeFactor
,NucleationBarrierParameters
andStrainEnergy
are refactored to follow a mediator like pattern:ShapeFactor
, the descriptions areSphericalDescription
,CubicDescription
,PlateDescription
andNeedleDescription
which all defines the equivalent spherical radius, kinetic factors and thermodynamic factorsChanges in surrogate modeling
PrecipitateModel
andSinglePhaseDiffusion
models (HomogenizationModel
does not yet support this). Because the surrogate is built from the thermodynamics module, any untrained model will fall back to the underlying thermodynamics function.json
instead ofnpy
Other changes
tangent
(default) method. Right now, this is just an argument you can add when computing driving forces. In general, this is not needed, but I have encountered a case where I needed to provide a local phase condition as there was a negative curvature in the free energy function of the precipitate phase which threw off the driving force and precipitate composition.API changes
returnComp
is removed fromGeneralThermodynamics.getDrivingForce
. These functions would always return a tuple regardless of the value ofreturnComp
either as(driving force, precipitate comp)
or(driving force, None)
. Now the driving force functions will always return(driving force, precipitate comp)
.is to be used in place of
PrecipitateModel.setDiffusivity`VolumeParameter
is imported fromkawin.precipitation.PrecipitationParameters
TODO