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