Module “utils”¶
- class tc_python.utils.CompositionType(value)¶
Bases:
Enum
The type of composition.
- COMPONENT = 1¶
Composition given per component, this will be identical to ELEMENT in case of metals.
- ELEMENT = 0¶
Composition given per element.
- class tc_python.utils.CompositionUnit(value)¶
Bases:
Enum
The composition unit.
- MASS_FRACTION = 1¶
Mass fraction.
- MASS_PERCENT = 0¶
Mass percent.
- MOLE_FRACTION = 3¶
Mole fraction.
- MOLE_PERCENT = 2¶
Mole percent.
- class tc_python.utils.ConversionUnit(value)¶
Bases:
Enum
The composition unit used in a conversion.
- MOLE_FRACTION = 0¶
Mole fraction.
- MOLE_PERCENT = 1¶
Mole percent.
- WEIGHT_FRACTION = 2¶
Weight fraction.
- WEIGHT_PERCENT = 3¶
Weight percent.
- class tc_python.utils.GasAmountUnit(value)¶
Bases:
Enum
The amount of a gas.
- KILOGRAM = 1¶
Kilogram.
- NORM_CUBIC_METER = 0¶
Norm cubic meter (according to ISO 2533, p=101325 Pa, T=288.15 K, typically used for trading of gas bottles). Other definitions vary only slightly.
- class tc_python.utils.GasCompositionUnit(value)¶
Bases:
Enum
The composition unit for a gas.
- MASS_FRACTION = 1¶
Mass fraction.
- MASS_PERCENT = 0¶
Mass percent.
- MOLE_FRACTION = 3¶
Mole fraction.
- MOLE_PERCENT = 2¶
Mole percent.
- VOLUME_FRACTION = 5¶
Volume fraction.
- VOLUME_PERCENT = 4¶
Volume percent.
- class tc_python.utils.GasRateUnit(value)¶
Bases:
Enum
The rate of a gas flow.
- KILOGRAM_PER_SEC = 1¶
Kilogram per second.
- NORM_CUBIC_METER_PER_SEC = 0¶
Norm cubic meter per second (according to ISO 2533, p=101325 Pa, T=288.15 K, typically used for trading of gas bottles). Other definitions vary only slightly.
- class tc_python.utils.InterfacePosition(value)¶
Bases:
Enum
The position of an interface relative to its region. Only used for diffusion simulations.
- LOWER = 0¶
The interface is on the lower side of its region.
- UPPER = 1¶
The interface is on the upper side of its region.
- class tc_python.utils.PhaseUnit(value)¶
Bases:
Enum
The units available for a phase fraction.
- MASS_FRACTION = 1¶
Mass fraction.
- MOLE_FRACTION = 0¶
Mole fraction.
- VOLUME_FRACTION = 2¶
Volume fraction.
- class tc_python.utils.ResultValueGroup(result_line_group_java)¶
Bases:
object
A x-y-dataset representing a line data calculation result (i.e. a Thermo-Calc quantity 1 vs. quantity 2).
Warning
Depending on the calculator, the dataset might contain NaN-values to separate the data between different subsets.
- Variables:
label – a str describing what the data corresponds to
x – list of floats representing the first quantity (“x-axis”)
y – list of floats representing the second quantity (“y-axis”)
- get_label() str ¶
Accessor for the line label :return the line label
- get_x() List[float] ¶
Accessor for the x-values :return the x values
- get_y() List[float] ¶
Accessor for the y-values :return the y values
- class tc_python.utils.TemperatureProfile¶
Bases:
object
Represents a time-temperature profile used by non-isothermal calculations.
Note
The total simulation time can differ from the defined temperature profile. Constant temperature is assumed for any timepoint after the end of the defined profile.
- add_time_temperature(time: float, temperature: float)¶
Adds a time-temperature point to the non-isothermal temperature profile.
- Parameters:
time – The time [s]
temperature – The temperature [K]
- Returns:
This
TemperatureProfile
object