https://mooseframework.inl.gov
TestNumericalFlux3EqnHLLC.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 "THMIndicesVACE.h"
13 
14 TEST_F(TestNumericalFlux3EqnHLLC, testSymmetry) { testSymmetry(); }
15 TEST_F(TestNumericalFlux3EqnHLLC, testConsistency) { testConsistency(); }
16 
18 {
19 }
20 
21 const NumericalFlux1D &
23 {
24  const std::string class_name = "ADNumericalFlux3EqnHLLC";
25  InputParameters params = _factory.getValidParams(class_name);
26  params.set<UserObjectName>("fluid_properties") = _fp_name;
27  _fe_problem->addUserObject(class_name, class_name, params);
28 
29  return _fe_problem->getUserObject<NumericalFlux1D>(class_name);
30 }
31 
32 std::vector<std::pair<std::vector<ADReal>, std::vector<ADReal>>>
34 {
35  // sL < 0 < sM
36  std::vector<ADReal> W1(THMVACE1D::N_PRIM_VARS);
37  W1[THMVACE1D::PRESSURE] = 1e5;
38  W1[THMVACE1D::TEMPERATURE] = 300;
39  W1[THMVACE1D::VELOCITY] = 20;
40 
41  std::vector<ADReal> W2(THMVACE1D::N_PRIM_VARS);
42  W2[THMVACE1D::PRESSURE] = 2e5;
43  W2[THMVACE1D::TEMPERATURE] = 310;
44  W2[THMVACE1D::VELOCITY] = 1.2;
45 
46  // sL > 0
47  std::vector<ADReal> W3(THMVACE1D::N_PRIM_VARS);
48  W3[THMVACE1D::PRESSURE] = 1e5;
49  W3[THMVACE1D::TEMPERATURE] = 300;
50  W3[THMVACE1D::VELOCITY] = 20;
51 
52  std::vector<ADReal> W4(THMVACE1D::N_PRIM_VARS);
53  W4[THMVACE1D::PRESSURE] = 2e5;
54  W4[THMVACE1D::TEMPERATURE] = 310;
55  W4[THMVACE1D::VELOCITY] = 25;
56 
57  std::vector<std::pair<std::vector<ADReal>, std::vector<ADReal>>> W_pairs;
58  W_pairs.push_back(std::pair<std::vector<ADReal>, std::vector<ADReal>>(W1, W2));
59  W_pairs.push_back(std::pair<std::vector<ADReal>, std::vector<ADReal>>(W3, W4));
60 
61  return W_pairs;
62 }
63 
64 std::vector<std::vector<ADReal>>
66 {
67  std::vector<ADReal> W1(THMVACE1D::N_PRIM_VARS);
68  W1[THMVACE1D::PRESSURE] = 1e5;
69  W1[THMVACE1D::TEMPERATURE] = 300;
70  W1[THMVACE1D::VELOCITY] = 1.5;
71 
72  std::vector<std::vector<ADReal>> W_list;
73  W_list.push_back(W1);
74 
75  return W_list;
76 }
std::shared_ptr< FEProblem > _fe_problem
Abstract base class for computing and caching internal or boundary fluxes for 1D conservation law sys...
Tests NumericalFlux3EqnHLLC.
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Base class for testing numerical flux objects for the variable-area compressible Euler equations...
virtual const NumericalFlux1D & createFluxObject() override
Creates the flux object to be tested.
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.
TEST_F(TestNumericalFlux3EqnHLLC, testSymmetry)
virtual std::vector< std::vector< ADReal > > getPrimitiveSolutionsConsistencyTest() const override
Gets a vector of primitive solution vectors to use for consistency test.
static const unsigned int N_PRIM_VARS
const UserObjectName _fp_name
Fluid properties user object name.