https://mooseframework.inl.gov
Loading...
Searching...
No Matches
TestNumericalFluxGasMixHLLC.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
12#include "THMIndicesGasMix.h"
13
14TEST_F(TestNumericalFluxGasMixHLLC, testSymmetry) { testSymmetry(); }
15
16TEST_F(TestNumericalFluxGasMixHLLC, testConsistency) { testConsistency(); }
17
19
20const NumericalFlux1D &
22{
23 const std::string class_name = "NumericalFluxGasMixHLLC";
24 const std::string flux_mix_name = "flux_mix";
25 InputParameters params = _factory.getValidParams(class_name);
26 params.set<UserObjectName>("fluid_properties") = _fp_mix_name;
27 _fe_problem->addUserObject(class_name, flux_mix_name, params);
28
29 return _fe_problem->getUserObject<NumericalFluxGasMixHLLC>(flux_mix_name);
30}
31
32std::vector<std::pair<std::vector<ADReal>, std::vector<ADReal>>>
34{
35 // sL < 0 < sM
36 std::vector<ADReal> W1(THMGasMix1D::N_PRIM_VARS);
38 W1[THMGasMix1D::PRESSURE] = 1e5;
40 W1[THMGasMix1D::VELOCITY] = 20;
41
42 std::vector<ADReal> W2(THMGasMix1D::N_PRIM_VARS);
44 W2[THMGasMix1D::PRESSURE] = 2e5;
46 W2[THMGasMix1D::VELOCITY] = 1.2;
47
48 // sL > 0
49 std::vector<ADReal> W3(THMGasMix1D::N_PRIM_VARS);
51 W3[THMGasMix1D::PRESSURE] = 1e5;
53 W3[THMGasMix1D::VELOCITY] = 500;
54
55 std::vector<ADReal> W4(THMGasMix1D::N_PRIM_VARS);
57 W4[THMGasMix1D::PRESSURE] = 2e5;
59 W4[THMGasMix1D::VELOCITY] = 550;
60
61 std::vector<std::pair<std::vector<ADReal>, std::vector<ADReal>>> W_pairs;
62 W_pairs.push_back(std::pair<std::vector<ADReal>, std::vector<ADReal>>(W1, W2));
63 W_pairs.push_back(std::pair<std::vector<ADReal>, std::vector<ADReal>>(W3, W4));
64
65 return W_pairs;
66}
67
68std::vector<std::vector<ADReal>>
70{
71 std::vector<ADReal> W1(THMGasMix1D::N_PRIM_VARS);
73 W1[THMGasMix1D::PRESSURE] = 1e5;
75 W1[THMGasMix1D::VELOCITY] = 1.5;
76
77 std::vector<std::vector<ADReal>> W_list;
78 W_list.push_back(W1);
79
80 return W_list;
81}
TEST_F(TestNumericalFluxGasMixHLLC, testSymmetry)
InputParameters getValidParams(const std::string &name) const
T & set(const std::string &name, bool quiet_mode=false)
std::shared_ptr< FEProblem > _fe_problem
Abstract base class for computing and caching internal or boundary fluxes for 1D conservation law sys...
Computes the numerical flux for FlowModelGasMix using the HLLC approximate Riemann solver.
Base class for testing NumericalFluxGasMix objects.
const UserObjectName _fp_mix_name
Mixture fluid properties name.
Tests NumericalFluxGasMixHLLC.
virtual std::vector< std::vector< ADReal > > getPrimitiveSolutionsConsistencyTest() const override
Gets a vector of primitive solution vectors to use for consistency test.
virtual std::vector< std::pair< std::vector< ADReal >, std::vector< ADReal > > > getPrimitiveSolutionsSymmetryTest() const override
Gets a vector of pairs of primitive solution vectors to use for symmetry test.
virtual const NumericalFlux1D & createFluxObject() override
Creates the flux object to be tested.
static const unsigned int N_PRIM_VARS