22 "add_interpolation_method_physics");
30 "Define a turbulence model for an incompressible or weakly-compressible Navier Stokes " 31 "flow with a linear finite volume discretization");
33 params.
addParam<std::vector<SolverSystemName>>(
35 {
"TKE_system",
"TKED_system"},
36 "Names of the linear solver systems for each equation. Default is set for K-Epsilon and " 37 "should be adapted for other models");
40 params.
addParam<
bool>(
"mu_t_as_aux_variable",
42 "Whether to use an auxiliary variable instead of a functor material " 43 "property for the turbulent viscosity");
58 "use_nonorthogonal_correction",
60 "Whether to use a non-orthogonal correction. This can potentially slow down convergence " 61 ", but reduces numerical dispersion on non-orthogonal meshes. Can be safely turned off on " 62 "orthogonal meshes.");
64 params.
addParam<InterpolationMethodName>(
65 "tke_advection_interpolation_method_name",
66 "Name of an externally defined FVInterpolationMethod to use for turbulent kinetic energy " 67 "advection. When provided, this overrides 'tke_advection_interpolation'.");
68 params.
addParam<InterpolationMethodName>(
69 "tked_advection_interpolation_method_name",
70 "Name of an externally defined FVInterpolationMethod to use for turbulent kinetic energy " 71 "dissipation advection. When provided, this overrides 'tked_advection_interpolation'.");
73 "tke_advection_interpolation_method_name tked_advection_interpolation_method_name",
74 "K-Epsilon model numerical");
87 "Mixing length is not implemented for the linear finite volume discretization");
96 if (!
isParamValid(
"tke_advection_interpolation_method_name"))
98 if (!
isParamValid(
"tked_advection_interpolation_method_name"))
117 "include_deviatoric_stress",
"This should be set to true when using a turbulence model");
133 std::string variable_type =
"MooseLinearVariableFVReal";
142 paramError(
"turbulence_kinetic_energy_variable",
144 ") supplied to the WCNSLinearFVTurbulencePhysics does not exist!");
151 std::string variable_type =
"MooseLinearVariableFVReal";
160 paramError(
"turbulence_kinetic_energy_dissipation_variable",
162 ") supplied to the WCNSLinearFVTurbulencePhysics does not exist!");
191 const std::string kernel_type =
"LinearFVTimeDerivative";
207 const auto tke_method_name =
209 ? getParam<InterpolationMethodName>(
"tke_advection_interpolation_method_name")
210 : InterpolationMethodName(
211 std::string(getParam<MooseEnum>(
"tke_advection_interpolation")));
212 const auto tked_method_name =
213 isParamValid(
"tked_advection_interpolation_method_name")
214 ? getParam<InterpolationMethodName>(
"tked_advection_interpolation_method_name")
215 : InterpolationMethodName(
216 std::string(getParam<MooseEnum>(
"tked_advection_interpolation")));
218 const std::string kernel_type =
"LinearFVTurbulentAdvection";
224 params.
set<InterpolationMethodName>(
"advected_interp_method_name") = tke_method_name;
229 params.
set<InterpolationMethodName>(
"advected_interp_method_name") = tked_method_name;
237 const std::string kernel_type =
"LinearFVTurbulentDiffusion";
240 params.
set<
bool>(
"use_nonorthogonal_correction") =
241 getParam<bool>(
"use_nonorthogonal_correction");
246 params.
set<MooseFunctorName>(
"diffusion_coeff") =
"mu_eff_tke";
251 params.
set<MooseFunctorName>(
"diffusion_coeff") =
"mu_eff_tked";
259 const std::string u_names[3] = {
"u",
"v",
"w"};
261 const std::string kernel_type =
"LinearFVTKESourceSink";
269 params.
set<
Real>(
"C_mu") = getParam<Real>(
"C_mu");
270 params.
set<
Real>(
"C_pl") = getParam<Real>(
"C_pl");
279 const std::string kernel_type =
"LinearFVTKEDSourceSink";
289 params.
set<MooseFunctorName>(
"C1_eps") = getParam<MooseFunctorName>(
"C1_eps");
290 params.
set<MooseFunctorName>(
"C2_eps") = getParam<MooseFunctorName>(
"C2_eps");
291 params.
set<
Real>(
"C_mu") = getParam<Real>(
"C_mu");
292 params.
set<
Real>(
"C_pl") = getParam<Real>(
"C_pl");
302 const std::string u_names[3] = {
"u",
"v",
"w"};
307 const std::string bc_type =
"LinearFVTurbulentViscosityWallFunctionBC";
314 params.
set<
Real>(
"C_mu") = getParam<Real>(
"C_mu");
333 const std::string mat_type =
"FunctorEffectiveDynamicViscosity";
336 params.
set<MooseFunctorName>(
"property_name") =
"mu_eff_tke";
339 params.
set<MooseFunctorName>(
NS::mu_t +
"_inverse_factor") =
340 getParam<MooseFunctorName>(
"sigma_k");
343 params.
set<MooseFunctorName>(
"property_name") =
"mu_eff_tked";
344 params.
set<MooseFunctorName>(
NS::mu_t +
"_inverse_factor") =
345 getParam<MooseFunctorName>(
"sigma_eps");
std::string prefix() const
const VariableName _turbulent_viscosity_name
Name of the turbulence viscosity auxiliary variable (or property)
unsigned short getNumberAlgebraicGhostingLayersNeeded() const override
Return the number of algebraic ghosting layers needed.
registerMooseAction("NavierStokesApp", WCNSLinearFVTurbulencePhysics, "add_interpolation_method_physics")
Base class for a Physics that creates all the objects needed to add a turbulence model to an incompre...
static const std::string mu_t
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 & dynamicViscosityName() const
Return the name of the dynamic viscosity functor.
static InputParameters validParams()
void paramError(const std::string ¶m, Args... args) const
const T & getParam(const std::string &name) const
void addRequiredPhysicsTask(const std::string &task)
const VariableName _tked_name
Name of the turbulent kinetic energy dissipation.
virtual void checkIntegrity() const
void addFVAdvectedInterpolationMethod(const MooseEnum &interpolation_method)
Add the FVInterpolationMethod object for an advected interpolation method if absent.
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters ¶meters)
virtual void addFunctorMaterials() override
static const std::string density
InputParameters getValidParams(const std::string &name) const
static const std::string TKE
void reportPotentiallyMissedParameters(const std::vector< std::string > ¶m_names, const std::string &object_type, const std::string &object_name="") const
void addKEpsilonTimeDerivatives()
Functions adding kernels for the k-epsilon to the k-epsilon equations.
void addKEpsilonDiffusion()
WCNSLinearFVTurbulencePhysics(const InputParameters ¶meters)
bool shouldCreateTimeDerivative(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool error_if_already_defined) const
const MooseEnum _turbulence_model
Turbulence model to create the equation(s) for.
virtual void checkIntegrity() const override
std::vector< SubdomainName > _blocks
unsigned int dimension() const
const MooseFunctorName & densityName() const
Return the name of the density functor.
std::vector< BoundaryName > _turbulence_walls
List of boundaries to act as walls for turbulence models.
registerWCNSFVTurbulenceBaseTasks("NavierStokesApp", WCNSLinearFVTurbulencePhysics)
virtual void initializePhysicsAdditional() override
virtual FEProblemBase & getProblem()
Creates all the objects needed to add a turbulence model to an incompressible / weakly-compressible N...
const SolverSystemName & getSolverSystem(unsigned int variable_index) const
static const std::string mu
const VariableName _tke_name
Name of the turbulent kinetic energy.
void needSolutionState(unsigned int oldest_needed, Moose::SolutionIterationType iteration_type)
virtual void addSolverVariables() override
virtual void addVariable(const std::string &var_type, const std::string &var_name, InputParameters ¶ms)
bool _define_variables
Whether to define variables if they do not exist.
const std::vector< std::string > _velocity_names
Velocity names.
virtual void addLinearFVKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
virtual void addFVInterpolationMethods() 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)
virtual void addFVBCs() override
const UserObjectName & rhieChowUOName() const
Return the name of the Rhie Chow user object.
IntRange< T > make_range(T beg, T end)
static const std::string TKED
void addKEpsilonAdvection()
bool isParamValid(const std::string &name) const
void paramWarning(const std::string ¶m, Args... args) const
unsigned short getNumberAlgebraicGhostingLayersNeeded() const override
Return the number of ghosting layers needed.
static InputParameters validParams()
MooseEnum _wall_treatment_eps
Turbulence wall treatment for epsilon (same for all walls currently)
const WCNSFVFlowPhysicsBase * _flow_equations_physics
Flow physics.
virtual void addFVKernels() override