Loading...
Searching...
No Matches
Newtonian.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-2015 OpenFOAM Foundation
9 Copyright (C) 2017 OpenCFD Ltd
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29#include "Newtonian.H"
31#include "surfaceFields.H"
33// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34
35namespace Foam
36{
37namespace viscosityModels
38{
41}
42}
43
44
45// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
46
48(
49 const word& name,
50 const dictionary& viscosityProperties,
51 const volVectorField& U,
53)
54:
55 viscosityModel(name, viscosityProperties, U, phi),
56 nu0_("nu", dimViscosity, viscosityProperties_),
57 nu_
58 (
60 (
61 name,
62 U_.time().timeName(),
63 U_.db(),
64 IOobject::NO_READ,
65 IOobject::NO_WRITE
66 ),
67 U_.mesh(),
68 nu0_
69 )
70{}
71
72
73// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
74
76(
77 const dictionary& viscosityProperties
78)
79{
80 viscosityModel::read(viscosityProperties);
81
82 viscosityProperties_.readEntry("nu", nu0_);
83 nu_ = nu0_;
84
85 return true;
86}
87
88
89// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition IOobject.H:191
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
An abstract base class for incompressible viscosityModels.
const volVectorField & U_
viscosityModel(const viscosityModel &)=delete
No copy construct.
const dictionary & viscosityProperties() const
Return the phase transport properties dictionary.
virtual bool read(const dictionary &viscosityProperties)=0
Read transportProperties dictionary.
dictionary viscosityProperties_
An incompressible Newtonian viscosity model.
Definition Newtonian.H:54
virtual bool read(const dictionary &viscosityProperties)
Read transportProperties dictionary.
Definition Newtonian.C:69
Newtonian(const word &name, const dictionary &viscosityProperties, const volVectorField &U, const surfaceScalarField &phi)
Construct from components.
Definition Newtonian.C:41
A class for handling words, derived from Foam::string.
Definition word.H:66
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition className.H:142
U
Definition pEqn.H:72
dynamicFvMesh & mesh
word timeName
Definition getTimeIndex.H:3
A namespace for various incompressible viscosityModel implementations.
Definition Arrhenius.H:48
Namespace for OpenFOAM.
const dimensionSet dimViscosity
GeometricField< vector, fvPatchField, volMesh > volVectorField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
Foam::surfaceFields.