https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Functions
FlowModelGasMixUtilsTest.C File Reference

Go to the source code of this file.

Functions

 TEST_F (FlowModelGasMixUtilsTest, testConservativePrimitiveConversionConsistency)
 

Function Documentation

◆ TEST_F()

TEST_F ( FlowModelGasMixUtilsTest  ,
testConservativePrimitiveConversionConsistency   
)

Definition at line 64 of file FlowModelGasMixUtilsTest.C.

65{
66 std::vector<ADReal> W(THMGasMix1D::N_PRIM_VARS);
68 W[THMGasMix1D::PRESSURE] = 1e5;
70 W[THMGasMix1D::VELOCITY] = 1.5;
71
72 const ADReal A = 2.0;
73
74 const auto U = FlowModelGasMixUtils::computeConservativeSolution<true>(W, A, *_fp_mix);
75 const auto W_new = FlowModelGasMixUtils::computePrimitiveSolution<true>(U, *_fp_mix);
76
77 for (unsigned int i = 0; i < W_new.size(); ++i)
78 REL_TEST(W_new[i], W[i], REL_TOL_CONSISTENCY);
79}
DualNumber< Real, DNDerivativeType, true > ADReal
static const unsigned int N_PRIM_VARS