22 params.
addClassDescription(
"Define the Navier Stokes weakly-compressible scalar field transport " 23 "equation(s) using the nonlinear finite volume discretization");
43 params.set<
MooseEnum>(
"face_interp_method") =
44 getParam<MooseEnum>(
"passive_scalar_face_interpolation");
45 params.set<
bool>(
"two_term_boundary_expansion") =
46 getParam<bool>(
"passive_scalar_two_term_bc_expansion");
54 "INSFVScalarFieldVariable");
60 params.set<std::vector<Real>>(
"scaling") = {
61 getParam<std::vector<Real>>(
"passive_scalar_scaling")[name_i]};
72 const std::string kernel_type =
"FVFunctorTimeKernel";
75 params.
set<NonlinearVariableName>(
"variable") = vname;
85 const std::string kernel_type =
93 getParam<MooseEnum>(
"passive_scalar_advection_interpolation");
101 params.
set<NonlinearVariableName>(
"variable") = vname;
110 const auto passive_scalar_diffusivities =
111 getParam<std::vector<MooseFunctorName>>(
"passive_scalar_diffusivity");
113 if (passive_scalar_diffusivities.size())
115 const std::string kernel_type =
"FVDiffusion";
121 params.
set<MooseFunctorName>(
"coeff") = passive_scalar_diffusivities[name_i];
131 const std::string kernel_type =
"FVCoupledForce";
155 "_coupled_source_" + std::to_string(i),
165 if (inlet_boundaries.empty())
173 "passive_scalar_inlet_types",
175 ") is not equal to the number of inlet boundaries (" +
176 std::to_string(inlet_boundaries.size()) +
") times the number of passive scalars (" +
180 "The number of groups of inlet functors (" +
182 ") is not equal to the number of passive scalars (" +
189 "The number of inlet boundary functors for scalar '" +
191 "' does not match the number of inlet boundaries (" +
194 unsigned int flux_bc_counter = 0;
195 unsigned int num_inlets = inlet_boundaries.size();
196 for (
unsigned int bc_ind = 0; bc_ind < num_inlets; ++bc_ind)
200 const std::string bc_type =
"FVFunctionDirichletBC";
204 params.
set<std::vector<BoundaryName>>(
"boundary") = {inlet_boundaries[bc_ind]};
215 const std::string bc_type =
"WCNSFVScalarFluxBC";
219 if (flux_inlet_directions.size())
220 params.
set<Point>(
"direction") = flux_inlet_directions[flux_bc_counter];
223 params.
set<PostprocessorName>(
"mdot_pp") = flux_inlet_pps[flux_bc_counter];
224 params.
set<PostprocessorName>(
"area_pp") =
"area_pp_" + inlet_boundaries[bc_ind];
227 params.
set<PostprocessorName>(
"velocity_pp") = flux_inlet_pps[flux_bc_counter];
230 params.
set<PostprocessorName>(
"scalar_value_pp") =
232 params.
set<std::vector<BoundaryName>>(
"boundary") = {inlet_boundaries[bc_ind]};
242 inlet_boundaries[bc_ind],
244 flux_bc_counter += 1;
std::string prefix() const
registerNavierStokesPhysicsBaseTasks("NavierStokesApp", WCNSFVScalarTransportPhysics)
static InputParameters validParams()
void assignBlocks(InputParameters ¶ms, const std::vector< SubdomainName > &blocks) const
bool shouldCreateVariable(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_aux)
const MooseFunctorName _density_name
Name of the density material property.
const std::vector< BoundaryName > & getInletBoundaries() const
Get the inlet boundaries.
virtual void addScalarAdvectionKernels() override
WCNSFVScalarTransportPhysics(const InputParameters ¶meters)
Creates all the objects needed to solve the Navier Stokes scalar transport equations using the nonlin...
static const std::string velocity_z
registerWCNSFVScalarTransportBaseTasks("NavierStokesApp", WCNSFVScalarTransportPhysics)
static const std::string density
InputParameters getValidParams(const std::string &name) const
unsigned int size() const
std::vector< NonlinearVariableName > _passive_scalar_names
Names of the passive scalar variables.
static const std::string velocity_x
bool shouldCreateTimeDerivative(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_already_defined) const
std::vector< SubdomainName > _blocks
unsigned int dimension() const
virtual void addScalarSourceKernels() override
Equivalent of NSFVAction addScalarCoupledSourceKernels.
virtual void addScalarDiffusionKernels() override
bool isParamValid(const std::string &name) const
static InputParameters validParams()
virtual void addSolverVariables() override
std::vector< std::vector< MooseFunctorName > > _passive_scalar_inlet_functors
Functors describing the inlet boundary values. See passive_scalar_inlet_types for what the functors a...
virtual FEProblemBase & getProblem()
static const std::string porosity
virtual UserObjectName rhieChowUOName() const =0
Return the name of the Rhie Chow user object.
const SolverSystemName & getSolverSystem(unsigned int variable_index) const
std::vector< std::vector< Real > > _passive_scalar_sources_coef
Coefficients multiplying for the passive scalar sources. Inner indexing is scalar variable index...
MooseFunctorName getPorosityFunctorName(const bool smoothed) const
const bool _porous_medium_treatment
Switch to show if porous medium treatment is requested or not.
virtual void addScalarInletBC() override
Functions adding boundary conditions for the incompressible simulation.
const std::vector< PostprocessorName > & getFluxInletPPs() const
Get the inlet flux postprocessor if using a flux inlet.
std::vector< std::vector< MooseFunctorName > > _passive_scalar_coupled_sources
Functors for the passive scalar (coupled) sources. Inner indexing is scalar variable index...
static const std::string velocity_y
void paramError(const std::string ¶m, Args... args) const
virtual void addVariable(const std::string &var_type, const std::string &var_name, InputParameters ¶ms)
virtual void setSlipVelocityParams(InputParameters &) const
const std::vector< std::string > _velocity_names
Velocity names.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void addScalarTimeKernels() override
Functions adding kernels for the incompressible / weakly-compressible scalar transport equation If th...
Creates all the objects needed to solve the Navier Stokes scalar transport equations.
static InputParameters validParams()
std::vector< MooseFunctorName > _passive_scalar_sources
Functors for the passive scalar sources. Indexing is scalar variable index.
void reportPotentiallyMissedParameters(const std::vector< std::string > ¶m_names, const std::string &object_type) const
MultiMooseEnum _passive_scalar_inlet_types
Passive scalar inlet boundary types.
const std::vector< Point > & getFluxInletDirections() const
Get the inlet direction if using a flux inlet.
const bool _has_scalar_equation
A boolean to help compatibility with the old Modules/NavierStokesFV syntax or to deliberately skip ad...
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
virtual void addFVBC(const std::string &fv_bc_name, const std::string &name, InputParameters ¶meters)
virtual void addScalarOutletBC() override
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.
auto index_range(const T &sizable)
const MooseEnum _velocity_interpolation
The velocity / momentum face interpolation method for advecting other quantities. ...