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 Celcius, 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.
convertPascalToPascal
(pascal)[source]¶ Converts pressure from pascal to pascal.
- Parameters
pascal (float) – pressure in pascal
- Returns
pascal – pressure in pascal
- Return type
Note
a function is used so all the calculatePressure function can use a consistent algorithm – including converting pressure to pascal using a function
See also
armi.materials.chlorides.chloride.calculatePressure()
-
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
See also
terrapower.physics.neutronics.mcnp.mcnpInterface.getSenseWrtTheta()
Notes
the line is in the form of A*x + B*y + C*z - D = 0 – this corresponds to a MCNP arbitrary line equation