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_variable"); \
17  registerMooseAction(app_name, derived_name, "add_ic"); \
18  registerMooseAction(app_name, derived_name, "add_fv_kernel"); \
19  registerMooseAction(app_name, derived_name, "add_fv_bc")
20 
26 {
27 public:
29 
31 
33  const std::vector<NonlinearVariableName> & getAdvectedScalarNames() const
34  {
35  return _passive_scalar_names;
36  }
37 
39  bool hasScalarEquations() const { return _has_scalar_equation; }
40 
41 protected:
42  virtual void addFVKernels() override;
43  virtual void addFVBCs() override;
44  virtual void setSlipVelocityParams(InputParameters & /* params */) const {}
45 
47  std::vector<NonlinearVariableName> _passive_scalar_names;
51 
55  std::vector<std::vector<MooseFunctorName>> _passive_scalar_inlet_functors;
56 
58  std::vector<MooseFunctorName> _passive_scalar_sources;
60  std::vector<std::vector<MooseFunctorName>> _passive_scalar_coupled_sources;
62  std::vector<std::vector<Real>> _passive_scalar_sources_coef;
63 
64 private:
65  virtual void addInitialConditions() override;
66 
71  virtual void addScalarTimeKernels() = 0;
72  virtual void addScalarDiffusionKernels() = 0;
73  virtual void addScalarAdvectionKernels() = 0;
75  virtual void addScalarSourceKernels() = 0;
76 
78  virtual void addScalarInletBC() = 0;
79  virtual void addScalarWallBC() = 0;
80  virtual void addScalarOutletBC() = 0;
81 
82  virtual unsigned short getNumberAlgebraicGhostingLayersNeeded() const override;
83 };
virtual void addScalarAdvectionKernels()=0
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 InputParameters & parameters() const
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