https://mooseframework.inl.gov
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 
11 #include "FlowModel1PhaseUtils.h"
13 
16  _fp_name("fp"),
17  _fp(getFluidPropertiesObject())
18 {
19 }
20 
21 std::vector<ADReal>
23  const ADReal & A) const
24 {
25  return FlowModel1PhaseUtils::computeConservativeSolutionVector<true>(W, A, _fp);
26 }
27 
28 std::vector<ADReal>
30  const ADReal & A) const
31 {
32  return FlowModel1PhaseUtils::computeFluxFromPrimitive<true>(W, A, _fp);
33 }
34 
37 {
38  const std::string class_name = "IdealGasFluidProperties";
39  InputParameters params = _factory.getValidParams(class_name);
40  params.set<Real>("gamma") = 1.4;
41  params.set<Real>("molar_mass") = 11.640243719999999;
42  _fe_problem->addUserObject(class_name, _fp_name, params);
43 
44  return _fe_problem->getUserObject<SinglePhaseFluidProperties>(_fp_name);
45 }
std::shared_ptr< FEProblem > _fe_problem
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Base class for testing NumericalFlux1D objects.
virtual std::vector< ADReal > computeConservativeSolution(const std::vector< ADReal > &W, const ADReal &A) const override
Computes the conservative solution from the primitive solution.
virtual std::vector< ADReal > computeFluxFromPrimitive(const std::vector< ADReal > &W, const ADReal &A) const override
Computes the 1D flux vector from the primitive solution.
Common class for single phase fluid properties.
const SinglePhaseFluidProperties & _fp
Fluid properties user object.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const UserObjectName _fp_name
Fluid properties user object name.
const SinglePhaseFluidProperties & getFluidPropertiesObject()
Builds and gets the fluid properties user object.