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-------------------------------------------------------------------------------
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
31#include "gravityMeshObject.H"
33
34// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
35
36namespace Foam
37{
38namespace functionObjects
39{
42 (
46 );
47}
48}
49
50
51// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
52
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",
70 laminarTransport_
71 ),
72 rho_
73 (
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// ************************************************************************* //
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:170
virtual bool read()
Re-read model coefficients if they have changed.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Abstract base-class for Time/database function objects.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
This functionObject tracks a uncoupled kinematic particle cloud in the specified velocity field of an...
A simple single-phase transport model based on viscosityModel.
A class for handling words, derived from Foam::string.
Definition: word.H:68
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition: className.H:121
engineTime & runTime
word timeName
Definition: getTimeIndex.H:3
Namespace for OpenFOAM.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
const dimensionSet dimDensity
volScalarField & nu
dictionary dict