pycalphad.models package¶
Submodules¶
pycalphad.models.model_mqmqa module¶
- class pycalphad.models.model_mqmqa.ModelMQMQA(*args, **kwargs)[source]¶
Bases:
Model
Symbolic implementation of the modified quasichemical model in the quadruplet approximation developed by Pelton _et al._ [1]. The formulation here largely follows the derivation by Poschmann _et al._ [2].
Following pycalphad convention,
ModelMQMQA.G
defines the energy for one “formula unit” of this phase. The MQMQA formulations by Pelton _et al._ and Poschmann _et al._ do not formally define the energy per formula unit in the same way as is done for the CEF. However, it is convienient to define one formula unit of an MQMQA phase to be the energy corresponding to one mole of quadruplets. In terms of the equations from Poschmann _et al._, which are largely followed in this class, that means \(\sum_{ab/xy} n_{ab/xy} = 1\) and therefore \(n_{ab/xy} = X_{ij/kl}\) by definition.This class is only semantically a subclass of
Model
. It implements the API expected for a Model in a self-contained way without any need to rely on the Model superclass, but it is created as a subclass to satisfy variousisinstance
checks in the codebase. The subclassing on Model should be removed once a suitable abstract base class or protocol is defined.References
- BMAG = 0¶
- property CPM¶
- property CPM_MIX¶
- DOO = 0¶
- property G¶
- property GM¶
- property GM_MIX¶
- property HM¶
- property HM_MIX¶
- NT = 0¶
- property SM¶
- property SM_MIX¶
- TC = 0¶
- property ast¶
Return the full abstract syntax tree of the model.
- beta = 0¶
- build_phase(dbe)[source]¶
Generate the symbolic form of all the contributions to this phase.
- Parameters:
dbe ('pycalphad.io.Database')
- contributions = [('ref', 'reference_energy'), ('idmix', 'ideal_mixing_energy'), ('xsmix', 'excess_mixing_energy')]¶
- curie_temperature = 0¶
- degree_of_ordering = 0¶
- property energy¶
- property enthalpy¶
- property entropy¶
- excess_mixing_energy(dbe)[source]¶
Build the binary, ternary and higher order interaction term Here we use Redlich-Kister polynomial basis by default Here we use the Muggianu ternary extension by default Replace y_i -> y_i + (1 - sum(y involved in parameter)) / m, where m is the arity of the interaction parameter
- property heat_capacity¶
- property mixing_energy¶
- property mixing_enthalpy¶
- property mixing_entropy¶
- property mixing_heat_capacity¶
- neel_temperature = 0¶
- property normalization¶
Total number of moles of this phase.
Divide by this normalization factor to convert from J/mole-formula to J/mole-atoms
- property reference_model¶
- shift_reference_state(reference_states, dbe, contrib_mods=None, output=('GM', 'HM', 'SM', 'CPM'), fmt_str='{}R')[source]¶
Add new attributes for calculating properties w.r.t. an arbitrary pure element reference state.
- Parameters:
reference_states (Iterable of pycalphad.model.ReferenceState) – Pure element ReferenceState objects. Must include all the pure elements defined in the current model.
dbe (Database) – Database containing the relevant parameters.
output (Iterable, optional) – Parameters to subtract the ReferenceState from, defaults to (‘GM’, ‘HM’, ‘SM’, ‘CPM’).
contrib_mods (Mapping, optional) – Map of {model contribution: new value}. Used to adjust the pure reference model contributions at the time this is called, since the models attribute of the pure element references are effectively static after calling this method.
fmt_str (str, optional) – String that will be formatted with the output parameter name. Defaults to “{}R”, e.g. the transformation of ‘GM’ -> ‘GMR’
- property site_fractions: List[SiteFraction]¶
Return a sorted list of site fractions used in the ast.
- property state_variables: List[StateVariable]¶
Return a sorted list of state variables used in the ast which are not site fractions.