createFields.H
Go to the documentation of this file.
1 #include "readGravitationalAcceleration.H"
2 #include "readhRef.H"
3 
4 Info<< "Creating twoPhaseSystem\n" << endl;
5 
6 twoPhaseSystem fluid(mesh, g);
7 
8 phaseModel& phase1 = fluid.phase1();
9 phaseModel& phase2 = fluid.phase2();
10 
11 volScalarField& alpha1 = phase1;
12 volVectorField& U1 = phase1.U();
13 volVectorField& U2 = phase2.U();
14 
15 volScalarField& p = phase1.thermo().p();
16 
18 (
19  "pMin",
21  fluid
22 );
23 
24 #include "gh.H"
25 
26 Info<< "Reading field p_rgh\n" << endl;
28 (
29  IOobject
30  (
31  "p_rgh",
32  runTime.timeName(),
33  mesh,
34  IOobject::MUST_READ,
35  IOobject::AUTO_WRITE
36  ),
37  mesh
38 );
39 
41 (
42  IOobject
43  (
44  "U",
45  runTime.timeName(),
46  mesh,
47  IOobject::NO_READ,
48  IOobject::AUTO_WRITE
49  ),
50  fluid.U()
51 );
52 
53 label pRefCell = 0;
54 scalar pRefValue = 0.0;
56 (
57  p,
58  p_rgh,
59  pimple.dict(),
60  pRefCell,
61  pRefValue
62 );
63 mesh.setFluxRequired(p_rgh.name());
64 mesh.setFluxRequired(alpha1.name());
65 
66 Info<< "Creating field dpdt\n" << endl;
68 (
69  IOobject
70  (
71  "dpdt",
72  runTime.timeName(),
73  mesh
74  ),
75  mesh,
76  dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
77 );
78 
79 
80 Info<< "Creating field kinetic energy K\n" << endl;
81 volScalarField K1(IOobject::groupName("K", phase1.name()), 0.5*magSqr(U1));
82 volScalarField K2(IOobject::groupName("K", phase2.name()), 0.5*magSqr(U2));
83 
84 #include "createMRF.H"
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
multiphaseSystem & fluid
Definition: createFields.H:10
#define K1
Definition: SHA1.C:167
volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh)
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
#define K2
Definition: SHA1.C:168
const dictionary & pimple
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
dynamicFvMesh & mesh
volVectorField U(IOobject("U", runTime.timeName(), runTime, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector("zero", dimVelocity, Zero))
volScalarField & dpdt
const dimensionSet dimPressure
phaseModel & phase1
dimensioned< scalar > magSqr(const dimensioned< Type > &)
const dimensionedVector & g
dimensionedScalar pMin("pMin", dimPressure, fluid)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label pRefCell
Definition: createFields.H:106
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
messageStream Info
scalar pRefValue
Definition: createFields.H:107