https://mooseframework.inl.gov
WCNSFVFluidHeatTransferPhysicsBase.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 #include "NS.h"
15 
16 #define registerWCNSFVFluidHeatTransferPhysicsBaseTasks(app_name, derived_name) \
17  registerMooseAction(app_name, derived_name, "get_turbulence_physics"); \
18  registerMooseAction(app_name, derived_name, "add_variable"); \
19  registerMooseAction(app_name, derived_name, "add_ic"); \
20  registerMooseAction(app_name, derived_name, "add_fv_kernel"); \
21  registerMooseAction(app_name, derived_name, "add_fv_bc"); \
22  registerMooseAction(app_name, derived_name, "add_material")
23 
29 {
30 public:
32 
34 
36  const VariableName & getFluidTemperatureName() const { return _fluid_temperature_name; }
37 
39  const MooseFunctorName & getSpecificHeatName() const { return _specific_heat_name; }
40  MooseFunctorName getSpecificEnthalpyName() const { return NS::specific_enthalpy; }
41  const std::vector<MooseFunctorName> & getThermalConductivityName() const
42  {
44  }
45 
47  const std::vector<std::vector<SubdomainName>> & getAmbientConvectionBlocks() const
48  {
50  }
52  const std::vector<MooseFunctorName> & getAmbientConvectionHTCs() const
53  {
55  }
56 
58  bool hasEnergyEquation() const { return _has_energy_equation; }
59 
60 protected:
61  void actOnAdditionalTasks() override;
62  void addInitialConditions() override;
63  void addFVKernels() override;
64  void addFVBCs() override;
65  void addMaterials() override;
66 
67  unsigned short getNumberAlgebraicGhostingLayersNeeded() const override;
68 
72  virtual void addEnergyTimeKernels() = 0;
73  virtual void addEnergyHeatConductionKernels() = 0;
74  virtual void addEnergyAdvectionKernels() = 0;
75  virtual void addEnergyAmbientConvection() = 0;
76  virtual void addEnergyExternalHeatSource() = 0;
77 
79  virtual void addEnergyInletBC() = 0;
80  virtual void addEnergyWallBC() = 0;
81  virtual void addEnergyOutletBC() = 0;
82  virtual void addEnergySeparatorBC() = 0;
83 
87 
91  const bool _solve_for_enthalpy;
93  const VariableName _fluid_enthalpy_name;
97  MooseFunctorName _specific_heat_name;
99  std::vector<std::vector<SubdomainName>> _thermal_conductivity_blocks;
101  std::vector<MooseFunctorName> _thermal_conductivity_name;
102 
104  std::vector<std::vector<SubdomainName>> _ambient_convection_blocks;
106  std::vector<MooseFunctorName> _ambient_convection_alpha;
108  std::vector<MooseFunctorName> _ambient_temperature;
109 
113  std::vector<MooseFunctorName> _energy_inlet_functors;
117  std::vector<MooseFunctorName> _energy_wall_functors;
118 };
MooseFunctorName _specific_heat_name
Name of the specific heat material property.
virtual void addEnergyExternalHeatSource()=0
const std::vector< MooseFunctorName > & getThermalConductivityName() const
virtual void addEnergyTimeKernels()=0
Functions adding kernels for the incompressible / weakly compressible energy equation.
std::vector< MooseFunctorName > _ambient_temperature
Name of the solid domain temperature for each block-group.
VariableName _fluid_temperature_name
Fluid temperature name.
std::vector< std::vector< SubdomainName > > _ambient_convection_blocks
Vector of subdomain groups where we want to have different ambient convection.
MultiMooseEnum _energy_wall_types
Energy wall boundary types.
std::vector< MooseFunctorName > _energy_wall_functors
Functors describing the wall boundary values. See energy_wall_types for what the functors actually re...
virtual void addEnergyAmbientConvection()=0
MultiMooseEnum _energy_inlet_types
Energy inlet boundary types.
const MooseFunctorName & getSpecificHeatName() const
Get the name of the specific heat material property.
bool hasEnergyEquation() const
Whether the physics is actually creating the heat equation.
Creates all the objects needed to solve the Navier Stokes energy equation.
const VariableName & getFluidTemperatureName() const
Get the name of the fluid temperature variable.
virtual void addEnergyAdvectionKernels()=0
unsigned short getNumberAlgebraicGhostingLayersNeeded() const override
Return the number of ghosting layers needed.
Helper class to interact with a flow and turbulence physics for a Physics that solves an advection pr...
const VariableName _fluid_enthalpy_name
Name of the fluid specific enthalpy.
const bool _has_energy_equation
A boolean to help compatibility with the old Modules/NavierStokesFV syntax.
virtual void addEnergyInletBC()=0
Functions adding boundary conditions for the fluid heat transfer equation.
WCNSFVFluidHeatTransferPhysicsBase(const InputParameters &parameters)
std::vector< std::vector< SubdomainName > > _thermal_conductivity_blocks
Vector of subdomain groups where we want to have different thermal conduction.
bool processThermalConductivity()
Process thermal conductivity (multiple functor input options are available).
const std::vector< MooseFunctorName > & getAmbientConvectionHTCs() const
Name of the ambient convection heat transfer coefficients for each block-group.
std::vector< MooseFunctorName > _energy_inlet_functors
Functors describing the inlet boundary values. See energy_inlet_types for what the functors actually ...
std::vector< MooseFunctorName > _thermal_conductivity_name
Name of the thermal conductivity functor for each block-group.
const bool _solve_for_enthalpy
User-selected option to solve for enthalpy.
const InputParameters & parameters() const
std::vector< MooseFunctorName > _ambient_convection_alpha
Name of the ambient convection heat transfer coefficients for each block-group.
Base class to hold common parameters and utilities between all the weakly compressible Navier Stokes-...
virtual void addEnergyHeatConductionKernels()=0
static const std::string specific_enthalpy
Definition: NS.h:68
const std::vector< std::vector< SubdomainName > > & getAmbientConvectionBlocks() const
Get the ambient convection parameters for parameter checking.