createFieldsRhoSimple.H
Go to the documentation of this file.
1 Info << "Reading thermophysical properties\n"
2  << endl;
3 
4 pThermoPtr_.reset(fluidThermo::New(mesh));
5 fluidThermo& thermo = pThermoPtr_();
6 thermo.validate(args.executable(), "h", "e");
7 
8 volScalarField& p = thermo.p();
9 
10 rhoPtr_.reset(
11  new volScalarField(
12  IOobject(
13  "rho",
14  runTime.timeName(),
15  mesh,
16  IOobject::READ_IF_PRESENT,
17  IOobject::AUTO_WRITE),
18  thermo.rho()));
19 volScalarField& rho = rhoPtr_();
20 
21 Info << "Reading field U\n"
22  << endl;
23 
24 UPtr_.reset(
25  new volVectorField(
26  IOobject(
27  "U",
28  runTime.timeName(),
29  mesh,
30  IOobject::MUST_READ,
31  IOobject::AUTO_WRITE),
32  mesh));
33 volVectorField& U = UPtr_();
34 
36 
37 // actuator related stuff
38 Info << "Creating source term. " << endl;
39 fvSourcePtr_.reset(
40  new volVectorField(
41  IOobject(
42  "fvSource",
43  runTime.timeName(),
44  mesh,
45  IOobject::NO_READ,
46  IOobject::AUTO_WRITE),
47  mesh,
48  dimensionedVector("fvSource", dimensionSet(1, -2, -2, 0, 0, 0, 0), vector::zero),
49  zeroGradientFvPatchField<vector>::typeName));
50 
51 fvSourceEnergyPtr_.reset(
52  new volScalarField(
53  IOobject(
54  "fvSourceEnergy",
55  runTime.timeName(),
56  mesh,
57  IOobject::NO_READ,
58  IOobject::AUTO_WRITE),
59  mesh,
60  dimensionedScalar("fvSourceEnergy", dimensionSet(1, -1, -3, 0, 0, 0, 0), 0.0),
61  zeroGradientFvPatchField<scalar>::typeName));
62 
63 pressureControlPtr_.reset(new pressureControl(p, rho, simple.dict()));
64 
65 mesh.setFluxRequired(p.name());
66 
67 Info << "Creating turbulence model\n"
68  << endl;
69 
70 turbulencePtr_.reset(
71  compressible::turbulenceModel::New(
72  rho,
73  U,
74  phi,
75  thermo));
76 
77 initialMass_ = fvc::domainIntegrate(rho);
78 
79 // create MRF
80 MRFPtr_.reset(new IOMRFZoneListDF(mesh));
U
U
Definition: pEqnPimpleDyM.H:60
pressureControl
pressureControl & pressureControl
Definition: createRefsRhoSimpleC.H:12
simple
simpleControl & simple
Definition: createRefsRhoSimpleC.H:5
compressibleCreatePhiPython.H
initialMass_
initialMass_
Definition: createRefsRhoSimpleC.H:13
p
volScalarField & p
Definition: createRefsPimple.H:6
mesh
fvMesh & mesh
Definition: createRefsHeatTransfer.H:4
phi
surfaceScalarField & phi
Definition: createRefsPimple.H:8
thermo
fluidThermo & thermo
Definition: createRefsRhoSimpleC.H:6
args
Foam::argList & args
Definition: setRootCasePython.H:42
runTime
Time & runTime
Definition: createRefsHeatTransfer.H:1
rho
volScalarField & rho
Definition: createRefsRhoSimpleC.H:8