https://mooseframework.inl.gov
Loading...
Searching...
No Matches
TestNumericalFlux3EqnBase.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
13
15 : TestNumericalFlux1D(), _fp_name("fp"), _fp(getFluidPropertiesObject())
16{
17}
18
19std::vector<ADReal>
21 const ADReal & A) const
22{
23 return FlowModel1PhaseUtils::computeConservativeSolutionVector<true>(W, A, _fp);
24}
25
26std::vector<ADReal>
28 const ADReal & A) const
29{
30 return FlowModel1PhaseUtils::computeFluxFromPrimitive<true>(W, A, _fp);
31}
32
35{
36 const std::string class_name = "IdealGasFluidProperties";
37 InputParameters params = _factory.getValidParams(class_name);
38 params.set<Real>("gamma") = 1.4;
39 params.set<Real>("molar_mass") = 11.640243719999999;
40 _fe_problem->addUserObject(class_name, _fp_name, params);
41
42 return _fe_problem->getUserObject<SinglePhaseFluidProperties>(_fp_name);
43}
DualNumber< Real, DNDerivativeType, true > ADReal
InputParameters getValidParams(const std::string &name) const
T & set(const std::string &name, bool quiet_mode=false)
std::shared_ptr< FEProblem > _fe_problem
Common class for single phase fluid properties.
Base class for testing NumericalFlux1D objects.
const UserObjectName _fp_name
Fluid properties user object name.
const SinglePhaseFluidProperties & _fp
Fluid properties user object.
const SinglePhaseFluidProperties & getFluidPropertiesObject()
Builds and gets the fluid properties user object.
virtual std::vector< ADReal > computeFluxFromPrimitive(const std::vector< ADReal > &W, const ADReal &A) const override
Computes the 1D flux vector from the primitive solution.
virtual std::vector< ADReal > computeConservativeSolution(const std::vector< ADReal > &W, const ADReal &A) const override
Computes the conservative solution from the primitive solution.