alloy_system

Define thermodynamic and mobility properties of alloy system.

class alloy_system.AlloySystem(ref)[source]

Bases: object

Thermodynamic and mobility properties of alloy system.

This class mainly serves as a base class for simu.Simulation. It can also be used on its own to examine thermodynamics and mobility data.

This is an isothermal, single-phase version.

Variables:
  • ref (str) – System reference, name of sub-directory with input and output files.

  • work_dir (pathlib.Path) – Path to directory with system-related input and output files.

  • database_register (dict) – Register of available thermodynamic and mobility databases.

  • volume_databases (dict) – Available molar volume data.

  • vacancy_databases (dict) – Available vacancy formation energy data.

  • pstring (str) – Content of system input file, set of user-defined parameters.

  • params (dict) – Set of system parameters, processed by para_io.read_parameter_string() from pstring.

  • inds (list) – Independent constituents.

  • dep (str) – Dependent constituent.

  • comps (list) – Conservative (atomic) species, with dependent constituent at the end.

  • phase (str) – Name of phase.

  • thermo_db (str) – Name of thermodynamic database.

  • mob_db (str) – Name of mobility database.

  • TC (float) – Temperature in Celsius.

  • TK (float) – Temperature in Kelvin.

  • alloy (str) – Alloy system str representation, with dependent constituent first.

  • stamp (str) – Label with syntax phase-alloy-TC.

  • volume_db (str) – Name of partial molar volume database.

  • V_partial (dict) – Partial molar volumes. See See data_io.get_volume_data().

  • vacancy_db (str) – Name of vacancy formation energy database.

  • GfV (dict) – Vacancy formation energy in pure elements, given as [enthalpy, entropy] in J/mol and J/mol/K. See data_io.get_vacancy_formation_energy().

  • Va_method (str) – Method used to compute equilibrium vacancy fraction: ‘cst’ (composition-fixed) or ‘RK’ (composition-dependant via Redlich-Kister polynomial).

  • thermo_params (dict of floats) –

    Thermodynamic parameters arranged as follows:

    A: G_A for A in endmembers
    AB: [L0, L1] for AB in binary subsystems

  • mob_params (dict of dicts) –

    Mobility parameters arranged as follows:

    {i: subdict for i in comps}

    subdict: {j: val for j in subsystems}.

  • k_dislo (float or str) – Sink strength associated with dislocation climb (str should be a valid file name in current job folder)

  • k_pores (float or str) – Sink strength associated with pore growth (str should be a valid file name in current job folder)

  • rho_dislo (float or str) – Dislocation density, used to compute k_dislo from local DVa.

  • rho_pores (float) – Density used to compute k_pores from local DVa.

  • ideal_lattice (bool) – Whether lattice is ideal, i.e., vacancy fraction is kept at equilibrium.

  • G_funx (function) – Compute Gibbs free energy at composition provided as array of atom fractions of the dependent constituents.

  • G_fun (function) – Alias of G_funx

  • G_funy (function) – Compute Gibbs free energy at composition provided as array of site fractions of vacancies and of the dependent constituents. See add_thermo_model().

  • MU_funx (function) – Compute chemical potential at composition provided as array of atom fractions of the dependent constituents.

  • MU_fun (function) – Alias of MU_funx

  • MU_funy (function) – Compute chemical potentials at composition provided as array of site fractions of vacancies and of the dependent constituents. See add_thermo_model().

  • yVa_fun (function) – Compute equilibrium vacancy fraction at composition provided as array of atom fractions of the dependent constituents. See add_Va_model().

  • DT_fun (function) – Compute tracer diffusion coefficients at composition provided as array of atom fractions of the dependent constituents.

  • L_fun (function) – Compute phenomenological coefficients at composition provided as array of atom fractions of the dependent constituents. Derived from DT_fun (see thermo_functions.make_Lfun()).

  • DVa_fun (function) – Compute vacancy diffusion coefficient from atom fractions and site fractions, see thermo_functions.make_DVa_fun().

__init__(ref)[source]

Class constructor.

Read input file and define system parameters. See para_io.read_parameter_string() for how input file is parsed.

get_user_data()[source]

Get data from user.

  • Molar volume databases

  • Vacancy formation energy databases

  • Register of thermodynamics and mobility databases

  • Default parameters

get_or_raise(dictionary, key)[source]

Get value or raise exception if key not present.

is_lattice_ideal()[source]

Check whether lattice is ideal and print info messages.

If the input files contains no value for either k_dislo, k_pores, rho_dislo or rho_pores, the lattice is ideal. If either parameter is given, the lattice is non-ideal.

add_thermo_functions()[source]

Add thermodynamics functions.

add_thermo_model()[source]

Add analytical models for G and MU.

extend_MU_funx()[source]

Make function that computes MU from site fractions.

Here the vacancy site fraction is at its equilibrium value (MU_Va = 0).

add_mob_functions()[source]

Add mobility functions.

add_mob_model()[source]

Add analytical model for DT.

process_sink_terms()[source]

Process user input for non-ideal lattice parameters.

Parameters of interest: k_dislo, k_pores, rho_dislo, rho_pores. Input can be a float or a string indicating a file name. If neither k_dislo or rho_dislo is given, k_dislo defaults to 0. Same for k_pores and rho_pores.

alloy_system.intro_msg()[source]

Prepare intro message.