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::momentumTransportModel> 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 Info<< "Constructing clouds" << endl;
61 parcelCloudList clouds(rhoInf, U, mu, g);
62 
63 IOobject Hheader
64 (
65  "H",
66  runTime.timeName(),
67  mesh,
68  IOobject::MUST_READ,
69  IOobject::AUTO_WRITE
70 );
71 
72 autoPtr<volVectorField> HPtr;
73 
74 if (Hheader.typeHeaderOk<volVectorField>(true))
75 {
76  Info<< "\nReading field H\n" << endl;
77 
78  HPtr.reset(new volVectorField (Hheader, mesh));
79 }
80 
81 IOobject HdotGradHheader
82 (
83  "HdotGradH",
84  runTime.timeName(),
85  mesh,
86  IOobject::MUST_READ,
87  IOobject::AUTO_WRITE
88 );
89 
90 autoPtr<volVectorField> HdotGradHPtr;
91 
92 if (HdotGradHheader.typeHeaderOk<volVectorField>(true))
93 {
94  Info<< "Reading field HdotGradH" << endl;
95 
96  HdotGradHPtr.reset(new volVectorField(HdotGradHheader, mesh));
97 }
98 
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
volScalarField mu(IOobject("mu", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), laminarTransport.nu() *rhoInfValue)
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:58
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
IOobject HdotGradHheader("HdotGradH", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE)
dynamicFvMesh & mesh
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
const dimensionSet dimDensity
phi
Definition: correctPhi.H:3
autoPtr< volVectorField > HdotGradHPtr
Definition: createFields.H:90
Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *(e+0.5 *magSqr(U)));surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh, dimensionedScalar(dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar(dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::momentumTransportModel > turbulence(compressible::momentumTransportModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
messageStream Info
Info<< "Constructing clouds"<< endl;parcelCloudList clouds(rhoInf, U, mu, g);IOobject Hheader("H", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE);autoPtr< volVectorField > HPtr
Definition: createFields.H:72
const dimensionedVector & g
singlePhaseTransportModel laminarTransport(U, phi)