https://mooseframework.inl.gov
WCNSFVScalarTransportPhysicsBase.h
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 
10 #pragma once
11 
14 
15 #define registerWCNSFVScalarTransportBaseTasks(app_name, derived_name) \
16  registerMooseAction(app_name, derived_name, "add_variables_physics"); \
17  registerMooseAction(app_name, derived_name, "add_ics_physics"); \
18  registerMooseAction(app_name, derived_name, "add_fv_kernel"); \
19  registerMooseAction(app_name, derived_name, "add_fv_bc"); \
20  registerMooseAction(app_name, derived_name, "get_turbulence_physics")
21 
27 {
28 public:
30 
32 
34  const std::vector<NonlinearVariableName> & getAdvectedScalarNames() const
35  {
36  return _passive_scalar_names;
37  }
38 
40  bool hasScalarEquations() const { return _has_scalar_equation; }
41 
42 protected:
43  virtual void actOnAdditionalTasks() override;
44  virtual void addFVKernels() override;
45  virtual void addFVBCs() override;
46  virtual void setSlipVelocityParams(InputParameters & /* params */) const {}
47 
49  std::vector<NonlinearVariableName> _passive_scalar_names;
53 
57  std::vector<std::vector<MooseFunctorName>> _passive_scalar_inlet_functors;
58 
60  std::vector<MooseFunctorName> _passive_scalar_sources;
62  std::vector<std::vector<MooseFunctorName>> _passive_scalar_coupled_sources;
64  std::vector<std::vector<Real>> _passive_scalar_sources_coef;
65 
66 private:
67  virtual void addInitialConditions() override;
68 
73  virtual void addScalarTimeKernels() = 0;
74  virtual void addScalarDiffusionKernels() = 0;
75  virtual void addScalarAdvectionKernels() = 0;
77  virtual void addScalarSourceKernels() = 0;
78 
80  virtual void addScalarInletBC() = 0;
81  virtual void addScalarWallBC() = 0;
82  virtual void addScalarOutletBC() = 0;
83 
84  virtual unsigned short getNumberAlgebraicGhostingLayersNeeded() const override;
85 };
virtual void addScalarAdvectionKernels()=0
const InputParameters & parameters() const
std::vector< NonlinearVariableName > _passive_scalar_names
Names of the passive scalar variables.
bool hasScalarEquations() const
Whether the physics is actually creating the scalar advection equations.
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 unsigned short getNumberAlgebraicGhostingLayersNeeded() const override
Return the number of ghosting layers needed.
std::vector< std::vector< Real > > _passive_scalar_sources_coef
Coefficients multiplying for the passive scalar sources. Inner 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...
Helper class to interact with a flow and turbulence physics for a Physics that solves an advection pr...
WCNSFVScalarTransportPhysicsBase(const InputParameters &parameters)
virtual void setSlipVelocityParams(InputParameters &) const
Creates all the objects needed to solve the Navier Stokes scalar transport equations.
std::vector< MooseFunctorName > _passive_scalar_sources
Functors for the passive scalar sources. Indexing is scalar variable index.
virtual void addScalarSourceKernels()=0
Equivalent of NSFVAction addScalarCoupledSourceKernels.
const std::vector< NonlinearVariableName > & getAdvectedScalarNames() const
Get the names of the advected scalar quantity variables.
Base class to hold common parameters and utilities between all the weakly compressible Navier Stokes-...
virtual void addScalarDiffusionKernels()=0
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...
virtual void addScalarTimeKernels()=0
Functions adding kernels for the incompressible / weakly-compressible scalar transport equation...
virtual void addScalarInletBC()=0
Functions adding boundary conditions for the scalar conservation equations.
virtual void addScalarOutletBC()=0