OpenFOAM: API Guide
v2112
The open source CFD toolbox
singlePhaseTransportModel.C
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | www.openfoam.com
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
Copyright (C) 2011-2016 OpenFOAM Foundation
9
-------------------------------------------------------------------------------
10
License
11
This file is part of OpenFOAM.
12
13
OpenFOAM is free software: you can redistribute it and/or modify it
14
under the terms of the GNU General Public License as published by
15
the Free Software Foundation, either version 3 of the License, or
16
(at your option) any later version.
17
18
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21
for more details.
22
23
You should have received a copy of the GNU General Public License
24
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26
\*---------------------------------------------------------------------------*/
27
28
#include "
singlePhaseTransportModel.H
"
29
#include "viscosityModel.H"
30
#include "
volFields.H
"
31
32
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33
34
namespace
Foam
35
{
36
defineTypeNameAndDebug
(singlePhaseTransportModel, 0);
37
}
38
39
40
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
41
42
Foam::singlePhaseTransportModel::singlePhaseTransportModel
43
(
44
const
volVectorField
&
U
,
45
const
surfaceScalarField
&
phi
46
)
47
:
48
IOdictionary
49
(
50
IOobject
51
(
52
"transportProperties"
,
53
U
.time().constant(),
54
U
.db(),
55
IOobject::MUST_READ_IF_MODIFIED,
56
IOobject::NO_WRITE
57
)
58
),
59
viscosityModelPtr_(
viscosityModel::New
(
"nu"
, *
this
,
U
,
phi
))
60
{}
61
62
63
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
64
65
Foam::singlePhaseTransportModel::~singlePhaseTransportModel
()
66
{}
67
68
69
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
70
71
Foam::tmp<Foam::volScalarField>
72
Foam::singlePhaseTransportModel::nu
()
const
73
{
74
return
viscosityModelPtr_->nu();
75
}
76
77
78
Foam::tmp<Foam::scalarField>
79
Foam::singlePhaseTransportModel::nu
(
const
label patchi)
const
80
{
81
return
viscosityModelPtr_->nu(patchi);
82
}
83
84
85
void
Foam::singlePhaseTransportModel::correct
()
86
{
87
viscosityModelPtr_->correct();
88
}
89
90
91
bool
Foam::singlePhaseTransportModel::read
()
92
{
93
if
(
regIOobject::read
())
94
{
95
return
viscosityModelPtr_->read(*
this
);
96
}
97
98
return
false
;
99
}
100
101
102
// ************************************************************************* //
volFields.H
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition:
IOdictionary.H:54
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition:
IOobject.H:169
Foam::tmp
A class for managing temporary objects.
Definition:
PtrList.H:61
singlePhaseTransportModel.H
Foam::regIOobject::read
virtual bool read()
Read object.
Definition:
regIOobjectRead.C:191
Foam::singlePhaseTransportModel::read
virtual bool read()
Read transportProperties dictionary.
Definition:
singlePhaseTransportModel.C:91
phi
surfaceScalarField & phi
Definition:
setRegionFluidFields.H:8
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition:
DimensionedFieldReuseFunctions.H:105
U
U
Definition:
pEqn.H:72
Foam::singlePhaseTransportModel::nu
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
Definition:
singlePhaseTransportModel.C:72
Foam::singlePhaseTransportModel::~singlePhaseTransportModel
virtual ~singlePhaseTransportModel()
Destructor.
Definition:
singlePhaseTransportModel.C:65
Foam::singlePhaseTransportModel::correct
virtual void correct()
Correct the laminar viscosity.
Definition:
singlePhaseTransportModel.C:85
Foam::GeometricField< vector, fvPatchField, volMesh >
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
src
transportModels
incompressible
singlePhaseTransportModel
singlePhaseTransportModel.C
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.