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-------------------------------------------------------------------------------
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
29#include "viscosityModel.H"
30#include "volFields.H"
31
32// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33
34namespace Foam
35{
37}
38
39
40// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
41
43(
44 const volVectorField& U,
46)
47:
49 (
51 (
52 "transportProperties",
53 U.time().constant(),
54 U.db(),
56 IOobject::NO_WRITE
57 )
58 ),
59 viscosityModelPtr_(viscosityModel::New("nu", *this, U, phi))
60{}
61
62
63// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
64
66{}
67
68
69// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
70
73{
74 return viscosityModelPtr_->nu();
75}
76
77
79Foam::singlePhaseTransportModel::nu(const label patchi) const
80{
81 return viscosityModelPtr_->nu(patchi);
82}
83
84
86{
87 viscosityModelPtr_->correct();
88}
89
90
92{
94 {
96 }
97
98 return false;
99}
100
101
102// ************************************************************************* //
surfaceScalarField & phi
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
constant condensation/saturation model.
A simple single-phase transport model based on viscosityModel.
virtual void correct()
Correct the laminar viscosity.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.