scheil package¶
Submodules¶
scheil.simulate module¶
- scheil.simulate.is_converged(eq)¶
Return true if there are phase fractions that are non-NaN
- Parameters
eq (pycalphad.LightDataset) –
- scheil.simulate.simulate_equilibrium_solidification(dbf, comps, phases, composition, start_temperature, step_temperature=1.0, liquid_phase_name='LIQUID', adaptive=True, eq_kwargs=None, binary_search_tol=0.1, verbose=False)¶
Compute the equilibrium solidification path.
Decreases temperature until no liquid is found, performing a binary search to get the soildus temperature.
- dbfpycalphad.Database
Database object.
- compslist
List of components in the system.
- phaseslist
List of phases in the system.
- compositionDict[v.X, float]
Dictionary of independent v.X composition variables.
- start_temperaturefloat
Starting temperature for simulation. Should be single phase liquid.
- step_temperatureOptional[float]
Temperature step size. Defaults to 1.0.
- liquid_phase_nameOptional[str]
Name of the phase treated as liquid (i.e. the phase with infinitely fast diffusion). Defaults to ‘LIQUID’.
- eq_kwargs: Optional[Dict[str, Any]]
Keyword arguments for equilibrium
- binary_search_tolfloat
Stop the binary search when the difference between temperatures is less than this amount.
- adaptive: Optional[bool]
Whether to add additional points near the equilibrium points at each step. Only takes effect if
points
is in the eq_kwargs dict.
- scheil.simulate.simulate_scheil_solidification(dbf, comps, phases, composition, start_temperature, step_temperature=1.0, liquid_phase_name='LIQUID', eq_kwargs=None, stop=0.0001, verbose=False, adaptive=True)¶
Perform a Scheil-Gulliver solidification simulation.
- Parameters
dbf (pycalphad.Database) – Database object.
comps (list) – List of components in the system.
phases (list) – List of phases in the system.
composition (Dict[v.X, float]) – Dictionary of independent v.X composition variables.
start_temperature (float) – Starting temperature for simulation. Must be single phase liquid.
step_temperature (Optional[float]) – Temperature step size. Defaults to 1.0.
liquid_phase_name (Optional[str]) – Name of the phase treated as liquid (i.e. the phase with infinitely fast diffusion). Defaults to ‘LIQUID’.
eq_kwargs (Optional[Dict[str, Any]]) – Keyword arguments for equilibrium
stop (Optional[float]) – Stop when the phase fraction of liquid is below this amount.
adaptive (Optional[bool]) – Whether to add additional points near the equilibrium points at each step. Only takes effect if
points
is in the eq_kwargs dict.
- Returns
- Return type
scheil.solidification_result module¶
- class scheil.solidification_result.SolidificationResult(x_liquid, fraction_solid, temperatures, phase_amounts, converged, method)¶
Bases:
object
Data from an equilibrium or Scheil-Gulliver solidification simulation.
- Parameters
x_liquid (Dict[str, List[float]]) – Mapping of component name to composition at each temperature.
fraction_solid (List[float]) – Fraction of solid at each temperature.
temperatures (List[float]) – List of simulation temperatures.
phase_amounts (Dict[str, float]) – Map of {phase_name: amount_list} for solid phases where amount_list is a list of instantaneus phase amounts at each temperature. Should be less than 1 unless the solidification all occured in 1 step (e.g. solidification at the eutectic composition)
converged (bool) – For Scheil: True if the liquid stopping criteria was met. False otherwise For equilibrium: True if no liquid remains, False otherwise.
method (str) – Method used to create the solidification result, should be “scheil” or “equilibrium”
- x_liquid¶
- Type
Dict[str, List[float]
- fraction_solid¶
- Type
List[float]
- temperatures¶
- Type
List[float]
- phase_amounts¶
- Type
Dict[str, float]
- method¶
- Type
str
- fraction_liquid¶
Fraction of liquid at each temperature (convenience for 1-fraction_solid)
- Type
List[float]
- cum_phase_amounts¶
Map of {phase_name: amount_list} for solid phases where amount_list is a list of cumulative phase amounts at each temperature.
- Type
Dict[str, list]
- classmethod from_dict(d)¶
- to_dict()¶
scheil.utils module¶
- scheil.utils.get_phase_amounts(eq_phases, phase_fractions, all_phases)¶
Return the phase fraction for each phase in equilibrium
- Parameters
eq_phases (Sequence[str]) – Equilibrium phases
phase_fractions (Sequence[float]) – Phase amounts corresponding to the equilibrium phases
all_phases (Sequence[str]) – All phases that we want to keep track of in the system.
- Returns
- Return type
Dict[str, float]
- scheil.utils.local_sample(sitefracs, comp_count, pdens=100, stddev=0.05)¶
Sample from a normal distribution around the optimal site fractions
- Parameters
sitefracs (np.ndarray[:, :]) – 2d array of site fractions of shape (N, len(dof))
comp_count (Sequence[int]) – Number of active components in each sublattice, e.g. (FE,NI,TI)(FE,NI)(FE,NI,TI) is [3, 2, 3]
pdens (Optional[int]) – Number of points to add locally
stddev (Optional[float]) – Standard deviation for the normal distribution to sample from
- Returns
np.ndarray[ – Shape (pdens, len(dof))
- Return type
, :]
Module contents¶
scheil