pycalphad.property_framework package

Submodules

pycalphad.property_framework.computed_property module

class pycalphad.property_framework.computed_property.JanssonDerivative(numerator: DifferentiableComputableProperty, denominator: ConditionableComputableProperty)[source]

Bases: object

compute_property(compsets, cur_conds, chemical_potentials)[source]
property display_name
property display_units
property implementation_units
property shape
class pycalphad.property_framework.computed_property.LinearCombination(expr: Basic)[source]

Bases: object

compute_property(compsets: List[CompositionSet], cur_conds: Dict[str, float], chemical_potentials: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes][source]
display_units = ''
implementation_units = ''
property shape
class pycalphad.property_framework.computed_property.ModelComputedProperty(model_attr_name: str, phase_name: str | None = None)[source]

Bases: object

compute_property(compsets: List[CompositionSet], cur_conds: Dict[str, float], chemical_potentials: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes][source]
expand_wildcard(phase_names)[source]
jansson_derivative(compsets, cur_conds, chemical_potentials, deltas: JanssonDerivativeDeltas) _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes][source]

Compute Jansson derivative with self as numerator, with the given deltas

property multiplicity

Indicates multiplicity of a composition set, i.e., returns 2 for property of FCC_A1#2 phase.

property shape

Shape of return value is a scalar.

pycalphad.property_framework.computed_property.as_property(inp: str | Basic | ComputableProperty) ComputableProperty[source]

pycalphad.property_framework.metaproperties module

class pycalphad.property_framework.metaproperties.DormantPhase(phase: CompositionSet | str, wks: Workspace | None)[source]

Bases: object

Meta-property for accessing properties of dormant phases. The internal degrees of freedom of a dormant phase are minimized subject to the potentials of the target calculation. Dormant phases are not allowed to become stable.

property driving_force
max_iterations: int = 50
class pycalphad.property_framework.metaproperties.DrivingForce(phase_name)[source]

Bases: object

compute_property(compsets: List[CompositionSet], cur_conds: Dict[str, float], chemical_potentials: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) float[source]
display_name = 'Driving Force'
display_units = 'J / mol'
expand_wildcard(phase_names)[source]
filtered(input_compsets)[source]

Return a generator of CompositionSets applicable to the current property

implementation_units = 'J / mol'
jansson_derivative(compsets, cur_conds, chemical_potentials, deltas: JanssonDerivativeDeltas) _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes][source]

Compute Jansson derivative with self as numerator, with the given deltas

property multiplicity
phase_name: str
property phase_name_without_suffix
property shape
class pycalphad.property_framework.metaproperties.IsolatedPhase(phase: CompositionSet | str, wks: Workspace | None)[source]

Bases: object

Meta-property for accessing properties of isolated phases. The configuration of an isolated phase is minimized, by itself, subject to the same conditions as the target calculation. Other phases (or additional composition sets for the same phase) are not allowed to become stable.

property driving_force
class pycalphad.property_framework.metaproperties.ReferenceState(reference_conditions: List[Tuple[str, Dict]], wks: Workspace)[source]

Bases: object

Meta-property for calculations involving reference states.

pycalphad.property_framework.metaproperties.find_first_compset(phase_name: str, wks: Workspace)[source]

pycalphad.property_framework.types module

class pycalphad.property_framework.types.ComputableProperty(*args, **kwargs)[source]

Bases: Protocol

compute_property(compsets: List[CompositionSet], cur_conds: Dict[str, float], chemical_potentials: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes][source]
display_units: str | dict[str, float | int | Decimal | Fraction] | UnitsContainer | Unit
implementation_units: str | dict[str, float | int | Decimal | Fraction] | UnitsContainer | Unit
property shape: Tuple[int]
class pycalphad.property_framework.types.ConditionableComputableProperty(*args, **kwargs)[source]

Bases: ComputableProperty, Protocol

Can be in the denominator of a Jansson derivative

jansson_deltas(spec, state) JanssonDerivativeDeltas[source]
class pycalphad.property_framework.types.DifferentiableComputableProperty(*args, **kwargs)[source]

Bases: ComputableProperty, Protocol

Can be in the numerator of a Jansson derivative

jansson_derivative(compsets: List[CompositionSet], cur_conds: Dict[str, float], chemical_potentials: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], deltas: JanssonDerivativeDeltas) _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes][source]
class pycalphad.property_framework.types.JanssonDerivativeDeltas(delta_chemical_potentials: Any | None, delta_statevars: Any | None, delta_parameters: Any | None, delta_phase_amounts: Any | None, delta_sitefracs: Any | None)[source]

Bases: object

delta_chemical_potentials: Any | None
delta_parameters: Any | None
delta_phase_amounts: Any | None
delta_sitefracs: Any | None
delta_statevars: Any | None

pycalphad.property_framework.tzero module

class pycalphad.property_framework.tzero.T0(phase_one: CompositionSet | str, phase_two: CompositionSet | str, wks: Workspace | None)[source]

Bases: object

T0: temperature where the energy of two phases are equal, GM(ONE) = GM(TWO)

compute_property(equilibrium_compsets: List[CompositionSet], cur_conds: Dict[str, float], chemical_potentials: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) float[source]
property display_units
property implementation_units
maximum_iterations: int = 50
maximum_value: float = 6000
minimum_value: float = 298.15
property_to_optimize: ConditionableComputableProperty
residual_tol: float = 0.01
property shape: Tuple[int]
solver: Solver
pycalphad.property_framework.tzero.find_first_compset(phase_name: str, wks: Workspace)[source]

pycalphad.property_framework.units module

pycalphad.property_framework.units.as_quantity(prop: ComputableProperty, qt: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])[source]
pycalphad.property_framework.units.unit_conversion_context(compsets, prop)[source]

Module contents