incompressibleMomentumTransportModel.C
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) 2013-2022 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 \*---------------------------------------------------------------------------*/
25 
27 #include "fvMatrix.H"
28 
29 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
30 
32 (
33  const word& type,
34  const geometricOneField& alpha,
35  const geometricOneField& rho,
36  const volVectorField& U,
37  const surfaceScalarField& alphaRhoPhi,
38  const surfaceScalarField& phi,
39  const viscosity& viscosity
40 )
41 :
42  momentumTransportModel(U, alphaRhoPhi, phi, viscosity),
43  alpha_(alpha),
44  rho_(rho)
45 {}
46 
47 
48 // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
49 
52 (
53  const volVectorField& U,
54  const surfaceScalarField& phi,
55  const viscosity& viscosity
56 )
57 {
58  return momentumTransportModel::New<incompressibleMomentumTransportModel>
59  (
62  U,
63  phi,
64  phi,
65  viscosity
66  );
67 }
68 
69 
70 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
71 
74 {
75  return devTau();
76 }
77 
78 
81 {
82  return divDevTau(U);
83 }
84 
85 
88 {
90  return devSigma();
91 }
92 
93 
96 (
98 ) const
99 {
101  return divDevSigma(U);
102 }
103 
104 
107 (
108  const volScalarField& rho,
110 ) const
111 {
113  return divDevSigma(U);
114 }
115 
116 
117 // ************************************************************************* //
Generic GeometricField class.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
virtual tmp< volSymmTensorField > devSigma() const
Return the effective stress tensor.
static autoPtr< incompressibleMomentumTransportModel > New(const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
Return a reference to the selected turbulence model.
incompressibleMomentumTransportModel(const word &type, const geometricOneField &alpha, const geometricOneField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct.
virtual tmp< volSymmTensorField > devTau() const
Return the effective stress tensor.
virtual tmp< fvVectorMatrix > divDevSigma(volVectorField &U) const
Return the source term for the momentum equation.
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U) const
Return the source term for the momentum equation.
Abstract base class for turbulence models (RAS, LES and laminar).
A class for managing temporary objects.
Definition: tmp.H:55
Abstract base class for all fluid physical properties.
Definition: viscosity.H:50
A class for handling words, derived from string.
Definition: word.H:62
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:381
U
Definition: pEqn.H:72
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488