armi.utils.units module
The units module contains unit conversion functions and constants.
- armi.utils.units.getTk(Tc=None, Tk=None)[source]
Return a temperature in Kelvin, given a temperature in Celsius or Kelvin.
- armi.utils.units.getTc(Tc=None, Tk=None)[source]
Return a temperature in Celsius, given a temperature in Celsius or Kelvin.
- armi.utils.units.getTf(Tc=None, Tk=None)[source]
Return a temperature in Fahrenheit, given a temperature in Celsius or Kelvin.
- armi.utils.units.getTemperature(Tc=None, Tk=None, tempUnits=None)[source]
Returns the temperature in the prescribed temperature units.
- Parameters:
- Returns:
T – temperature in units defined by the tempUnits flag
- Return type:
- Raises:
ValueError – When an invalid tempUnits input is provided.
- armi.utils.units.getXYLineParameters(theta, x=0, y=0)[source]
returns parameters A B C D for a plane in the XY direction.
- Parameters:
- Returns:
A (float) – line coefficient
B (float) – line coefficient
C (float) – line coefficient
D (float) – line coefficient
Notes
the line is in the form of A*x + B*y + C*z - D = 0 – this corresponds to a MCNP arbitrary line equation