https://mooseframework.inl.gov
Loading...
Searching...
No Matches
BoundaryFlux1PhaseBaseBC.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 "MooseVariable.h"
12
15{
17
18 params.addRequiredCoupledVar("A_linear", "Cross-sectional area, linear");
19 params.addRequiredCoupledVar("rhoA", "Conserved variable: rho*A");
20 params.addRequiredCoupledVar("rhouA", "Conserved variable: rho*u*A");
21 params.addRequiredCoupledVar("rhoEA", "Conserved variable: rho*E*A");
22
23 params.addRequiredParam<UserObjectName>("boundary_flux", "Name of boundary flux user object");
24
25 return params;
26}
27
29 : ADOneDIntegratedBC(parameters),
30
31 _A_linear(adCoupledValue("A_linear")),
32
33 _rhoA(getADMaterialProperty<Real>("rhoA")),
34 _rhouA(getADMaterialProperty<Real>("rhouA")),
35 _rhoEA(getADMaterialProperty<Real>("rhoEA")),
36
37 _rhoA_var(coupled("rhoA")),
38 _rhouA_var(coupled("rhouA")),
39 _rhoEA_var(coupled("rhoEA")),
40
41 _flux(getUserObject<ADBoundaryFluxBase>("boundary_flux"))
42{
43}
44
45void
53
DualNumber< Real, DNDerivativeType, true > ADReal
A base class for computing/caching fluxes at boundaries.
virtual const std::vector< ADReal > & getFlux(unsigned int iside, dof_id_type ielem, const std::vector< ADReal > &uvec1, const RealVectorValue &dwave) const
Get the boundary flux vector.
const MooseArray< ADPoint > & _normals
const ADTemplateVariableTestValue< T > & _test
MooseVariableFE< T > & _var
Base class for integrated boundary conditions for 1D problems in 3D space.
const Real _normal
Component of outward normals along 1-D direction.
static InputParameters validParams()
BoundaryFlux1PhaseBaseBC(const InputParameters &parameters)
static InputParameters validParams()
virtual std::map< unsigned int, unsigned int > getIndexMapping() const =0
Creates the mapping of coupled variable index to index in Euler system.
virtual void initialSetup() override
const ADBoundaryFluxBase & _flux
boundary flux user object
virtual ADReal computeQpResidual() override
unsigned int _equation_index
index within the Euler system of the equation upon which this BC acts
virtual std::vector< ADReal > fluxInputVector() const =0
Returns the flux input vector.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
const unsigned int & _current_side
unsigned int _qp
const Elem *const & _current_elem
unsigned int number() const
virtual void initialSetup()
auto raw_value(const Eigen::Map< T > &in)