ubMomentumTransportModel.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) 2025-2026 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::ubMomentumTransportModel
26 
27 Description
28 
29 SourceFiles
30  ubMomentumTransportModel.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef ubMomentumTransportModel_H
35 #define ubMomentumTransportModel_H
36 
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
41 namespace Foam
42 {
43 
44 /*---------------------------------------------------------------------------*\
45  Class ubMomentumTransportModel Declaration
46 \*---------------------------------------------------------------------------*/
47 
49 :
51 {
52  // Private Data
53 
54  const compressible::momentumTransportModel& mixtureMomentumTransport_;
55 
56 
57 public:
58 
59  //- Runtime type information
60  TypeName("ubMomentumTransportModel");
61 
62 
63  // Constructors
64 
65  //- Construct from components
67  (
68  const alphaField& alpha,
69  const rhoField& rho,
70  const volVectorField& U,
72  const surfaceScalarField& phi,
73  const viscosity& viscosity,
74  const compressible::momentumTransportModel& mixtureMomentumTransport
75  );
76 
77  //- Disallow default bitwise copy construction
79 
80 
81  //- Destructor
83  {}
84 
85 
86  // Member Functions
87 
88  //- Re-read model coefficients if they have changed
89  virtual bool read();
90 
91  //- Return the turbulence kinetic energy
92  virtual tmp<volScalarField> k() const
93  {
94  return mixtureMomentumTransport_.k();
95  }
96 
97  //- Return the turbulence kinetic energy dissipation rate
98  virtual tmp<volScalarField> epsilon() const
99  {
100  return mixtureMomentumTransport_.epsilon();
101  }
102 
103  //- Return the turbulence specific dissipation rate
104  virtual tmp<volScalarField> omega() const
105  {
106  return mixtureMomentumTransport_.omega();
107  }
108 
109  //- Return the turbulence viscosity
110  virtual tmp<volScalarField> nut() const
111  {
112  return mixtureMomentumTransport_.nut();
113  }
114 
115  //- Return the turbulence viscosity on patch
116  virtual tmp<scalarField> nut(const label patchi) const
117  {
118  return mixtureMomentumTransport_.nut(patchi);
119  }
120 
121  //- Return the effective viscosity
122  virtual tmp<volScalarField> nuEff() const
123  {
124  return volScalarField::New
125  (
126  groupName("nuEff"),
127  nut() + nu()
128  );
129  }
130 
131  //- Return the effective viscosity on patch
132  virtual tmp<scalarField> nuEff(const label patchi) const
133  {
134  return nut(patchi) + nu(patchi);
135  }
136 
137  //- Return the Reynolds stress tensor [m^2/s^2]
138  virtual tmp<volSymmTensorField> R() const
139  {
140  return mixtureMomentumTransport_.R();
141  }
142 
143  //- Return the effective surface stress
144  virtual tmp<surfaceVectorField> devTau() const
145  {
147  return tmp<surfaceVectorField>(nullptr);
148  }
149 
150  //- Return the source term for the momentum equation
152 
153  //- Return the source term for the momentum equation
155  (
156  const volScalarField& rho,
158  ) const;
159 
160  //- Predict the turbulence transport coefficients if possible
161  // without solving turbulence transport model equations
162  virtual void predict()
163  {}
164 
165  //- Solve the turbulence equations and correct the turbulence viscosity
166  virtual void correct();
167 
168 
169  // Member Operators
170 
171  //- Disallow default bitwise assignment
172  void operator=(const ubMomentumTransportModel&) = delete;
173 };
174 
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 } // End namespace Foam
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 #endif
183 
184 // ************************************************************************* //
Generic GeometricField class.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
Base class for single-phase compressible momentum transport models.
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux field.
const rhoField & rho() const
Return the density field.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
virtual tmp< volScalarField > nut() const =0
Return the turbulence viscosity.
word groupName(const word &name) const
virtual tmp< volScalarField > k() const =0
Return the turbulence kinetic energy.
const volVectorField & U() const
Access function to velocity field.
virtual tmp< volSymmTensorField > R() const =0
Return the Reynolds stress tensor [m^2/s^2].
virtual tmp< volScalarField > omega() const =0
Return the turbulence specific dissipation rate.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
virtual tmp< volScalarField > epsilon() const =0
Return the turbulence kinetic energy dissipation rate.
const surfaceScalarField & alphaRhoPhi() const
Access function to phase flux field.
Templated abstract base class for multiphase compressible momentum transport models.
const alphaField & alpha() const
Access function to phase fraction.
A class for managing temporary objects.
Definition: tmp.H:55
virtual tmp< volScalarField > nut() const
Return the turbulence viscosity.
virtual tmp< volScalarField > nuEff() const
Return the effective viscosity.
virtual ~ubMomentumTransportModel()
Destructor.
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
virtual tmp< volSymmTensorField > R() const
Return the Reynolds stress tensor [m^2/s^2].
virtual tmp< surfaceVectorField > devTau() const
Return the effective surface stress.
virtual void predict()
Predict the turbulence transport coefficients if possible.
void operator=(const ubMomentumTransportModel &)=delete
Disallow default bitwise assignment.
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U) const
Return the source term for the momentum equation.
ubMomentumTransportModel(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity, const compressible::momentumTransportModel &mixtureMomentumTransport)
Construct from components.
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
TypeName("ubMomentumTransportModel")
Runtime type information.
virtual bool read()
Re-read model coefficients if they have changed.
Abstract base class for all fluid physical properties.
Definition: viscosity.H:50
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:381
label patchi
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59