armi.materials.tests.test_fluids module
Unit tests for fluid-specific behaviors.
The ARMI framework has a lot of thermal expansion machinery that applies to all components but doesn’t make sense for fluids. The tests here help show fluid materials still play nice with the rest of the framework.
- class armi.materials.tests.test_fluids.TestFluids(methodName='runTest')[source]
Bases:
TestCase
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- class MyFluid[source]
Bases:
Fluid
Stand-in fluid that doesn’t provide lots of functionality.
- density(Tk=None, Tc=None)
Return the density at the specified temperature for 3D expansion (in g/cm^3).
Notes
For fluids, there is no such thing as 2D expansion so pseudoDensity() is already 3D.
- class MySolid[source]
Bases:
Material
Stand-in solid that doesn’t provide lots of functionality.
- density(Tk: float = None, Tc: float = None) float
Return density that preserves mass when thermally expanded in 3D (in g/cm^3).
Notes
Since refDens is specified at the material-dep reference case, we don’t need to specify the reference temperature. It is already consistent with linearExpansion Percent. - p*(dp/p(T) + 1) =p*( p + dp(T) )/p = p + dp(T) = p(T) - dp/p = (1-(1 + dL/L)**3)/(1 + dL/L)**3
- test_fluidDensityWrapperNoWarning()[source]
Test that Component.material.density does not raise a warning for fluids.
The ARMI Framework contains a mechanism to warn users if they ask for the density of a material attached to a component. But the component is the source of truth for volume and composition. And can be thermally expanded during operation. Much of the framework operates on
Component.density
and otherComponent
methods for mass accounting. However,comp.material.density
does not know about the new composition or volumes and can diverge fromcomponent.density
.Additionally, the framework does not do any thermal expansion on fluids. So the above calls to
component.material.density
are warranted for fluids.