https://mooseframework.inl.gov
Loading...
Searching...
No Matches
BoundaryFluxGasMixGhostBase.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
15{
17
18 params.addRequiredParam<UserObjectName>("numerical_flux", "Name of numerical flux user object");
19 params.addRequiredParam<Real>("normal", "Outward normal");
20
21 return params;
22}
23
25 : ADBoundaryFluxBase(parameters),
26 _numerical_flux(getUserObject<NumericalFluxGasMixBase>("numerical_flux")),
27 _normal(getParam<Real>("normal"))
28{
29}
30
31void
33 dof_id_type ielem,
34 const std::vector<ADReal> & U1,
35 const RealVectorValue & /*normal*/,
36 std::vector<ADReal> & flux) const
37{
38 const std::vector<ADReal> U2 = getGhostCellSolution(U1);
39 flux = _numerical_flux.getFlux(iside, ielem, true, U1, U2, _normal);
40}
A base class for computing/caching fluxes at boundaries.
static InputParameters validParams()
BoundaryFluxGasMixGhostBase(const InputParameters &parameters)
const NumericalFluxGasMixBase & _numerical_flux
Numerical flux user object.
virtual void calcFlux(unsigned int iside, dof_id_type ielem, const std::vector< ADReal > &U1, const RealVectorValue &normal, std::vector< ADReal > &flux) const override
Solve the Riemann problem on the boundary face.
const Real & _normal
Outward normal.
virtual std::vector< ADReal > getGhostCellSolution(const std::vector< ADReal > &U1) const =0
Gets the solution vector in the ghost cell.
void addRequiredParam(const std::string &name, const std::string &doc_string)
virtual const std::vector< ADReal > & getFlux(const unsigned int iside, const dof_id_type ielem, bool res_side_is_left, const std::vector< ADReal > &UL_1d, const std::vector< ADReal > &UR_1d, Real nLR_dot_d) const
Gets the 1D flux vector for an element/side combination.
Base class for computing numerical fluxes for FlowModelGasMix.