createFields.H
Go to the documentation of this file.
1 #include "readGravitationalAcceleration.H"
2 
3 Info<< "Reading field U\n" << endl;
5 (
6  IOobject
7  (
8  "U",
9  runTime.timeName(),
10  mesh,
11  IOobject::MUST_READ,
12  IOobject::AUTO_WRITE
13  ),
14  mesh
15 );
16 
17 #include "createPhi.H"
18 
19 singlePhaseTransportModel laminarTransport(U, phi);
20 
21 dimensionedScalar rhoInfValue
22 (
23  "rhoInf",
24  dimDensity,
26 );
27 
28 volScalarField rhoInf
29 (
30  IOobject
31  (
32  "rho",
33  runTime.timeName(),
34  mesh,
35  IOobject::NO_READ,
36  IOobject::AUTO_WRITE
37  ),
38  mesh,
39  rhoInfValue
40 );
41 
42 autoPtr<incompressible::turbulenceModel> turbulence
43 (
45 );
46 
48 (
49  IOobject
50  (
51  "mu",
52  runTime.timeName(),
53  mesh,
54  IOobject::NO_READ,
55  IOobject::AUTO_WRITE
56  ),
57  laminarTransport.nu()*rhoInfValue
58 );
59 
60 word kinematicCloudName("kinematicCloud");
62 
63 Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
64 basicKinematicCollidingCloud kinematicCloud
65 (
67  rhoInf,
68  U,
69  mu,
70  g
71 );
72 
73 IOobject Hheader
74 (
75  "H",
76  runTime.timeName(),
77  mesh,
78  IOobject::MUST_READ,
79  IOobject::AUTO_WRITE
80 );
81 
82 autoPtr<volVectorField> HPtr;
83 
84 if (Hheader.headerOk())
85 {
86  Info<< "\nReading field H\n" << endl;
87 
88  HPtr.reset(new volVectorField (Hheader, mesh));
89 }
90 
91 IOobject HdotGradHheader
92 (
93  "HdotGradH",
94  runTime.timeName(),
95  mesh,
96  IOobject::MUST_READ,
97  IOobject::AUTO_WRITE
98 );
99 
100 autoPtr<volVectorField> HdotGradHPtr;
101 
102 if (HdotGradHheader.headerOk())
103 {
104  Info<< "Reading field HdotGradH" << endl;
105 
106  HdotGradHPtr.reset(new volVectorField(HdotGradHheader, mesh));
107 }
108 
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
surfaceScalarField & phi
autoPtr< volVectorField > HdotGradHPtr
Definition: createFields.H:100
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.
Definition: argListI.H:198
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
volScalarField mu(IOobject("mu", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), laminarTransport.nu()*rhoInfValue)
dynamicFvMesh & mesh
IOobject HdotGradHheader("HdotGradH", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE)
volVectorField U(IOobject("U", runTime.timeName(), runTime, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector("zero", dimVelocity, Zero))
CollidingCloud< KinematicCloud< Cloud< basicKinematicCollidingParcel > > > basicKinematicCollidingCloud
const dimensionedVector & g
const dimensionSet dimDensity
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
messageStream Info
Info<< "Constructing kinematicCloud "<< kinematicCloudName<< endl;basicKinematicCollidingCloud kinematicCloud(kinematicCloudName, rhoInf, U, mu, g);IOobject Hheader("H", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE);autoPtr< volVectorField > HPtr
Definition: createFields.H:82
Foam::argList args(argc, argv)
singlePhaseTransportModel laminarTransport(U, phi)
word kinematicCloudName("kinematicCloud")