icoUncoupledKinematicCloud.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 | Copyright (C) 2016 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 
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace functionObjects
35 {
36  defineTypeNameAndDebug(icoUncoupledKinematicCloud, 0);
38  (
39  functionObject,
40  icoUncoupledKinematicCloud,
41  dictionary
42  );
43 }
44 }
45 
46 
47 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
48 
49 Foam::functionObjects::icoUncoupledKinematicCloud::icoUncoupledKinematicCloud
50 (
51  const word& name,
52  const Time& runTime,
53  const dictionary& dict
54 )
55 :
56  fvMeshFunctionObject(name, runTime, dict),
57  g_
58  (
59  IOobject
60  (
61  "g",
62  time_.constant(),
63  mesh_,
66  ),
68  ),
69  laminarTransport_
70  (
71  mesh_.lookupObject<singlePhaseTransportModel>("transportProperties")
72  ),
73  rhoValue_
74  (
75  "rho",
76  dimDensity,
77  laminarTransport_
78  ),
79  rho_
80  (
81  IOobject
82  (
83  "rho",
84  time_.timeName(),
85  mesh_
86  ),
87  mesh_,
88  rhoValue_
89  ),
90  mu_("mu", rhoValue_*laminarTransport_.nu()),
91  U_
92  (
93  mesh_.lookupObject<volVectorField>(dict.lookupOrDefault<word>("U", "U"))
94  ),
95  kinematicCloudName_
96  (
97  dict.lookupOrDefault<word>("kinematicCloud", "kinematicCloud")
98  ),
99  kinematicCloud_
100  (
101  kinematicCloudName_,
102  rho_,
103  U_,
104  mu_,
105  g_
106  )
107 {}
108 
109 
110 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
111 
113 {}
114 
115 
116 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
117 
119 (
120  const dictionary& dict
121 )
122 {
124 
125  return true;
126 }
127 
128 
130 {
131  mu_ = rhoValue_*laminarTransport_.nu();
132  kinematicCloud_.evolve();
133 
134  return true;
135 }
136 
137 
139 {
140  return true;
141 }
142 
143 
144 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
Macros for easy insertion into run-time selection tables.
virtual bool read(const dictionary &)
Read optional controls.
const dimensionSet dimAcceleration
A class for handling words, derived from string.
Definition: word.H:59
static const zero Zero
Definition: zero.H:91
const dimensionSet dimDensity
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
virtual bool read(const dictionary &)
Read the controls.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
A simple single-phase transport model based on viscosityModel.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
addToRunTimeSelectionTable(functionObject, add, dictionary)
Namespace for OpenFOAM.