21 params.
addClassDescription(
"Define the Navier Stokes weakly-compressible scalar field transport " 22 "equation(s) using the linear finite volume discretization");
23 params.
addParam<
bool>(
"use_nonorthogonal_correction",
25 "If the nonorthogonal correction should be used when computing the normal " 26 "gradient, notably in the diffusion term.");
40 "Porous media scalar advection is currently unimplemented");
59 "MooseLinearVariableFVReal");
65 params.set<std::vector<Real>>(
"scaling") = {
66 getParam<std::vector<Real>>(
"passive_scalar_scaling")[name_i]};
75 std::string kernel_type =
"LinearFVTimeDerivative";
81 params.
set<LinearVariableName>(
"variable") = vname;
90 const std::string kernel_type =
"LinearFVScalarAdvection";
96 getParam<MooseEnum>(
"passive_scalar_advection_interpolation");
101 params.
set<LinearVariableName>(
"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 =
"LinearFVDiffusion";
118 params.
set<
bool>(
"use_nonorthogonal_correction") =
119 getParam<bool>(
"use_nonorthogonal_correction");
123 params.
set<MooseFunctorName>(
"diffusion_coeff") =
134 const std::string kernel_type =
"LinearFVSource";
153 params.
set<MooseFunctorName>(
"source_density") =
160 "_coupled_source_" + std::to_string(i),
170 if (inlet_boundaries.empty())
178 "passive_scalar_inlet_types",
180 ") is not equal to the number of inlet boundaries (" +
181 std::to_string(inlet_boundaries.size()) +
") times the number of passive scalars (" +
185 "The number of groups of inlet functors (" +
187 ") is not equal to the number of passive scalars (" +
194 "The number of inlet boundary functors for scalar '" +
196 "' does not match the number of inlet boundaries (" +
199 unsigned int num_inlets = inlet_boundaries.size();
200 for (
unsigned int bc_ind = 0; bc_ind < num_inlets; ++bc_ind)
204 const std::string bc_type =
"LinearFVAdvectionDiffusionFunctorDirichletBC";
208 params.
set<std::vector<BoundaryName>>(
"boundary") = {inlet_boundaries[bc_ind]};
216 mooseError(
"Flux boundary conditions not supported at this time using the linear finite " 217 "volume discretization");
227 if (outlet_boundaries.empty())
230 for (
const auto & outlet_bdy : outlet_boundaries)
232 const std::string bc_type =
"LinearFVAdvectionDiffusionOutflowBC";
234 params.
set<std::vector<BoundaryName>>(
"boundary") = {outlet_bdy};
235 params.
set<
bool>(
"use_two_term_expansion") =
236 getParam<bool>(
"passive_scalar_two_term_bc_expansion");
std::string prefix() const
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)
void paramError(const std::string ¶m, Args... args) const
const std::vector< BoundaryName > & getOutletBoundaries() const
Get the outlet boundaries.
const std::vector< BoundaryName > & getInletBoundaries() const
Get the inlet boundaries.
virtual void addScalarOutletBC() override
registerNavierStokesPhysicsBaseTasks("NavierStokesApp", WCNSLinearFVScalarTransportPhysics)
InputParameters getValidParams(const std::string &name) const
void reportPotentiallyMissedParameters(const std::vector< std::string > ¶m_names, const std::string &object_type, const std::string &object_name="") const
unsigned int size() const
Creates all the objects needed to solve the Navier Stokes scalar transport equations using the linear...
bool _has_turbulence_model
Because of the Modules/navierStokesFV syntax, a turbulence physics often exists without a model we sa...
std::vector< NonlinearVariableName > _passive_scalar_names
Names of the passive scalar variables.
bool shouldCreateTimeDerivative(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_already_defined) const
std::vector< SubdomainName > _blocks
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()
virtual void addScalarInletBC() override
Functions adding boundary conditions for the incompressible simulation.
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...
virtual void addScalarTimeKernels() override
Functions adding kernels for the incompressible / weakly-compressible scalar transport equation If th...
virtual void addSolverVariables() override
const bool _porous_medium_treatment
Switch to show if porous medium treatment is requested or not.
std::vector< std::vector< MooseFunctorName > > _passive_scalar_coupled_sources
Functors for the passive scalar (coupled) sources. Inner indexing is scalar variable index...
virtual void addVariable(const std::string &var_type, const std::string &var_name, InputParameters ¶ms)
virtual void setSlipVelocityParams(InputParameters &) const
virtual void addLinearFVKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
virtual void addScalarDiffusionKernels() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void addLinearFVBC(const std::string &fv_bc_name, const std::string &name, InputParameters ¶meters)
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
Creates all the objects needed to solve the Navier Stokes scalar transport equations.
void mooseError(Args &&... args) const
static InputParameters validParams()
std::vector< MooseFunctorName > _passive_scalar_sources
Functors for the passive scalar sources. Indexing is scalar variable index.
bool isParamValid(const std::string &name) const
WCNSLinearFVScalarTransportPhysics(const InputParameters ¶meters)
MultiMooseEnum _passive_scalar_inlet_types
Passive scalar inlet boundary types.
const bool _has_scalar_equation
A boolean to help compatibility with the old Modules/NavierStokesFV syntax or to deliberately skip ad...
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.
auto index_range(const T &sizable)
registerWCNSFVScalarTransportBaseTasks("NavierStokesApp", WCNSLinearFVScalarTransportPhysics)
virtual void addScalarSourceKernels() override
Equivalent of NSFVAction addScalarCoupledSourceKernels.
virtual void addScalarAdvectionKernels() override