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 =
"FVADFunctorDirichletBC";
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;
registerNavierStokesPhysicsBaseTasks("NavierStokesApp", WCNSFVScalarTransportPhysics)
registerWCNSFVScalarTransportBaseTasks("NavierStokesApp", WCNSFVScalarTransportPhysics)
virtual void addVariable(const std::string &var_type, const std::string &var_name, InputParameters ¶ms)
virtual void addFVBC(const std::string &fv_bc_name, const std::string &name, InputParameters ¶meters)
virtual void addFVKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
InputParameters getValidParams(const std::string &name) const
void paramError(const std::string ¶m, Args... args) const
bool isParamValid(const std::string &name) const
unsigned int size() const
static InputParameters validParams()
virtual FEProblemBase & getProblem()
bool shouldCreateTimeDerivative(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_already_defined) const
void assignBlocks(InputParameters ¶ms, const std::vector< SubdomainName > &blocks) const
unsigned int dimension() const
void reportPotentiallyMissedParameters(const std::vector< std::string > ¶m_names, const std::string &object_type, const std::string &object_name="") const
std::string prefix() const
const SolverSystemName & getSolverSystem(unsigned int variable_index) const
bool shouldCreateVariable(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_aux)
std::vector< SubdomainName > _blocks
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.
const std::vector< std::string > _velocity_names
Velocity names.
const bool _porous_medium_treatment
Switch to show if porous medium treatment is requested or not.
const MooseEnum _velocity_interpolation
The velocity / momentum face interpolation method for advecting other quantities.
const MooseFunctorName _density_name
Name of the density material property.
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
const std::vector< BoundaryName > & getInletBoundaries() const
Get the inlet boundaries.
MooseFunctorName getPorosityFunctorName(const bool smoothed) const
const std::vector< PostprocessorName > & getFluxInletPPs() const
Get the inlet flux postprocessor if using a flux inlet.
const std::vector< Point > & getFluxInletDirections() const
Get the inlet direction if using a flux inlet.
Creates all the objects needed to solve the Navier Stokes scalar transport equations.
const bool _has_scalar_equation
A boolean to help compatibility with the old Modules/NavierStokesFV syntax or to deliberately skip ad...
std::vector< std::vector< Real > > _passive_scalar_sources_coef
Coefficients multiplying for the passive scalar sources. Inner indexing is scalar variable index.
std::vector< MooseFunctorName > _passive_scalar_sources
Functors for the passive scalar sources. Indexing is scalar variable index.
std::vector< std::vector< MooseFunctorName > > _passive_scalar_coupled_sources
Functors for the passive scalar (coupled) sources. Inner indexing is scalar variable index.
MultiMooseEnum _passive_scalar_inlet_types
Passive scalar inlet boundary types.
virtual void setSlipVelocityParams(InputParameters &) const
std::vector< NonlinearVariableName > _passive_scalar_names
Names of the passive scalar variables.
static InputParameters validParams()
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...
Creates all the objects needed to solve the Navier Stokes scalar transport equations using the nonlin...
WCNSFVScalarTransportPhysics(const InputParameters ¶meters)
virtual void addSolverVariables() override
static InputParameters validParams()
virtual void addScalarSourceKernels() override
Equivalent of NSFVAction addScalarCoupledSourceKernels.
virtual void addScalarDiffusionKernels() override
virtual void addScalarOutletBC() override
virtual void addScalarAdvectionKernels() override
virtual void addScalarTimeKernels() override
Functions adding kernels for the incompressible / weakly-compressible scalar transport equation If th...
virtual void addScalarInletBC() override
Functions adding boundary conditions for the incompressible simulation.
static const std::string density
static const std::string velocity_y
static const std::string velocity_z
static const std::string porosity
static const std::string velocity_x