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 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.typeHeaderOk<volVectorField>(true))
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.typeHeaderOk<volVectorField>(true))
103 {
104  Info<< "Reading field HdotGradH" << endl;
105 
106  HdotGradHPtr.reset(new volVectorField(HdotGradHheader, mesh));
107 }
108 
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
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.
Definition: argListI.H:204
phi
Definition: pEqn.H:104
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)
CollidingCloud< KinematicCloud< Cloud< basicKinematicCollidingParcel > > > basicKinematicCollidingCloud
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
autoPtr< volVectorField > HdotGradHPtr
Definition: createFields.H:100
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
const dimensionSet dimDensity
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.
word kinematicCloudName("kinematicCloud")
messageStream Info
const dimensionedVector & g
Foam::argList args(argc, argv)
singlePhaseTransportModel laminarTransport(U, phi)