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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2016 OpenFOAM Foundation
9  Copyright (C) 2018-2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
31 #include "gravityMeshObject.H"
33 
34 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
35 
36 namespace Foam
37 {
38 namespace functionObjects
39 {
40  defineTypeNameAndDebug(icoUncoupledKinematicCloud, 0);
42  (
43  functionObject,
44  icoUncoupledKinematicCloud,
45  dictionary
46  );
47 }
48 }
49 
50 
51 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
52 
53 Foam::functionObjects::icoUncoupledKinematicCloud::icoUncoupledKinematicCloud
54 (
55  const word& name,
56  const Time& runTime,
57  const dictionary& dict
58 )
59 :
61  g_(meshObjects::gravity::New(time_)),
62  laminarTransport_
63  (
64  mesh_.lookupObject<singlePhaseTransportModel>("transportProperties")
65  ),
66  rhoValue_
67  (
68  "rho",
69  dimDensity,
70  laminarTransport_
71  ),
72  rho_
73  (
74  IOobject
75  (
76  "rho",
77  time_.timeName(),
78  mesh_
79  ),
80  mesh_,
81  rhoValue_
82  ),
83  mu_("mu", rhoValue_*laminarTransport_.nu()),
84  U_
85  (
86  mesh_.lookupObject<volVectorField>(dict.getOrDefault<word>("U", "U"))
87  ),
88  kinematicCloudName_
89  (
90  dict.getOrDefault<word>("kinematicCloud", "kinematicCloud")
91  ),
92  kinematicCloud_
93  (
94  kinematicCloudName_,
95  rho_,
96  U_,
97  mu_,
98  g_
99  )
100 {}
101 
102 
103 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
104 
106 {}
107 
108 
109 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
110 
112 (
113  const dictionary& dict
114 )
115 {
117 }
118 
119 
121 {
122  mu_ = rhoValue_*laminarTransport_.nu();
123  kinematicCloud_.evolve();
124 
125  return true;
126 }
127 
128 
130 {
131  return true;
132 }
133 
134 
135 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
Foam::functionObjects::icoUncoupledKinematicCloud::write
virtual bool write()
Write the cloud.
Definition: icoUncoupledKinematicCloud.C:129
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
singlePhaseTransportModel.H
Foam::dimDensity
const dimensionSet dimDensity
gravityMeshObject.H
Foam::singlePhaseTransportModel
A simple single-phase transport model based on viscosityModel.
Definition: singlePhaseTransportModel.H:57
Foam::functionObjects::fvMeshFunctionObject
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Definition: fvMeshFunctionObject.H:64
Foam::functionObjects::icoUncoupledKinematicCloud::execute
virtual bool execute()
Track the cloud.
Definition: icoUncoupledKinematicCloud.C:120
Foam::functionObjects::icoUncoupledKinematicCloud::~icoUncoupledKinematicCloud
virtual ~icoUncoupledKinematicCloud()
Destructor.
Definition: icoUncoupledKinematicCloud.C:105
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::functionObjects::regionFunctionObject::read
virtual bool read(const dictionary &dict)
Read optional controls.
Definition: regionFunctionObject.C:173
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
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
Foam::functionObjects::addToRunTimeSelectionTable
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
icoUncoupledKinematicCloud.H
Foam::functionObjects::defineTypeNameAndDebug
defineTypeNameAndDebug(ObukhovLength, 0)
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Foam::functionObjects::icoUncoupledKinematicCloud::read
virtual bool read(const dictionary &)
Read the controls.
Definition: icoUncoupledKinematicCloud.C:112
Foam::GeometricField< vector, fvPatchField, volMesh >