viscousHeating.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2024 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::fv::viscousHeating
26 
27 Description
28  Applies the viscous heating source to the total energy equation.
29 
30 Usage
31  Example usage:
32  \verbatim
33  viscousHeating1
34  {
35  type viscousHeating;
36  }
37  \endverbatim
38 
39 SourceFiles
40  viscousHeating.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef viscousHeating_H
45 #define viscousHeating_H
46 
47 #include "fvModel.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 namespace fv
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class viscousHeating Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 class viscousHeating
61 :
62  public fvModel
63 {
64  // Private Data
65 
66  //- Optional phase name
67  word phaseName_;
68 
69 
70  // Private Member Functions
71 
72  //- Non-virtual read
73  void readCoeffs();
74 
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("viscousHeating");
80 
81 
82  // Constructors
83 
84  //- Construct from explicit source name and mesh
86  (
87  const word& name,
88  const word& modelType,
89  const fvMesh& mesh,
90  const dictionary& dict
91  );
92 
93  //- Disallow default bitwise copy construction
94  viscousHeating(const viscousHeating&) = delete;
95 
96 
97  // Member Functions
98 
99  // Checks
100 
101  //- Return the list of fields for which the fvModel adds source term
102  // to the transport equation
103  virtual wordList addSupFields() const;
104 
105 
106  // Evaluate
107 
108  //- Add explicit contribution to compressible energy equation
109  virtual void addSup
110  (
111  const volScalarField& rho,
112  const volScalarField& he,
113  fvMatrix<scalar>& eqn
114  ) const;
115 
116  //- Add explicit contribution to phase energy equation
117  virtual void addSup
118  (
119  const volScalarField& alpha,
120  const volScalarField& rho,
121  const volScalarField& he,
122  fvMatrix<scalar>& eqn
123  ) const;
124 
125 
126  // Mesh changes
127 
128  //- Update for mesh motion
129  virtual bool movePoints();
130 
131  //- Update topology using the given map
132  virtual void topoChange(const polyTopoChangeMap&);
133 
134  //- Update from another mesh using the given map
135  virtual void mapMesh(const polyMeshMap&);
136 
137  //- Redistribute or update using the given distribution map
138  virtual void distribute(const polyDistributionMap&);
139 
140 
141  // IO
142 
143  //- Read source dictionary
144  virtual bool read(const dictionary& dict);
145 
146 
147  // Member Operators
148 
149  //- Disallow default bitwise assignment
150  void operator=(const viscousHeating&) = delete;
151 };
152 
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 } // End namespace fv
157 } // End namespace Foam
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #endif
162 
163 // ************************************************************************* //
Generic GeometricField class.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvMatrix.H:118
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
Finite volume model abstract base class.
Definition: fvModel.H:59
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:53
const word & name() const
Return const access to the source name.
Definition: fvModelI.H:47
Applies the viscous heating source to the total energy equation.
virtual bool movePoints()
Update for mesh motion.
virtual wordList addSupFields() const
Return the list of fields for which the fvModel adds source term.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual bool read(const dictionary &dict)
Read source dictionary.
TypeName("viscousHeating")
Runtime type information.
virtual void addSup(const volScalarField &rho, const volScalarField &he, fvMatrix< scalar > &eqn) const
Add explicit contribution to compressible energy equation.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
viscousHeating(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
void operator=(const viscousHeating &)=delete
Disallow default bitwise assignment.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for handling words, derived from string.
Definition: word.H:62
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Namespace for OpenFOAM.
thermo he()
labelList fv(nPoints)
dictionary dict