createFields.H
Go to the documentation of this file.
1 Info<< "Reading field p_rgh\n" << endl;
3 (
4  IOobject
5  (
6  "p_rgh",
7  runTime.timeName(),
8  mesh,
9  IOobject::MUST_READ,
10  IOobject::AUTO_WRITE
11  ),
12  mesh
13 );
14 
16 (
17  IOobject
18  (
19  "U",
20  runTime.timeName(),
21  mesh,
22  IOobject::NO_READ,
23  IOobject::AUTO_WRITE
24  ),
25  mesh,
26  dimensionedVector("U", dimVelocity, vector::zero)
27 );
28 
30 (
31  IOobject
32  (
33  "phi",
34  runTime.timeName(),
35  mesh,
36  IOobject::NO_READ,
37  IOobject::AUTO_WRITE
38  ),
39  mesh,
41 );
42 
43 multiphaseSystem fluid(U, phi);
44 
45 forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
46 {
47  phaseModel& phase = iter();
48  const volScalarField& alpha = phase;
49 
50  U += alpha*phase.U();
51  phi += fvc::interpolate(alpha)*phase.phi();
52 }
53 
54 scalar slamDampCoeff
55 (
56  fluid.lookupOrDefault<scalar>("slamDampCoeff", 1)
57 );
58 
59 dimensionedScalar maxSlamVelocity
60 (
61  "maxSlamVelocity",
63  fluid.lookupOrDefault<scalar>("maxSlamVelocity", GREAT)
64 );
65 
66 
68 (
69  IOobject
70  (
71  "rho",
72  runTime.timeName(),
73  mesh,
74  IOobject::NO_READ,
75  IOobject::AUTO_WRITE
76  ),
77  fluid.rho()
78 );
79 
80 
81 // Construct incompressible turbulence model
82 autoPtr<incompressible::turbulenceModel> turbulence
83 (
85 );
86 
87 
88 #include "readGravitationalAcceleration.H"
89 #include "readhRef.H"
90 #include "gh.H"
91 
92 
94 (
95  IOobject
96  (
97  "p",
98  runTime.timeName(),
99  mesh,
100  IOobject::NO_READ,
101  IOobject::AUTO_WRITE
102  ),
103  p_rgh + rho*gh
104 );
105 
106 label pRefCell = 0;
107 scalar pRefValue = 0.0;
109 (
110  p,
111  p_rgh,
112  pimple.dict(),
113  pRefCell,
114  pRefValue
115 );
116 mesh.setFluxRequired(p_rgh.name());
scalar pRefValue
Definition: createFields.H:113
volVectorField U(IOobject( "U", runTime.timeName(), runTime, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedVector("zero", dimVelocity, vector::zero), p.boundaryField().types())
surfaceScalarField & phi
Definition: createFields.H:13
multiphaseSystem & fluid
Definition: createFields.H:10
#define forAllIter(Container, container, iter)
Definition: UList.H:440
const dimensionSet dimArea(sqr(dimLength))
Definition: dimensionSets.H:57
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
setRefCell(p, p_rgh, pimple.dict(), pRefCell, pRefValue)
volScalarField & p_rgh
messageStream Info
tmp< surfaceScalarField > interpolate(const RhoType &rho)
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
dynamicFvMesh & mesh
const dictionary & pimple
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
volScalarField & p
Definition: createFields.H:51
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
rho
Definition: createFields.H:79
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
label pRefCell
Definition: createFields.H:112
const dimensionSet dimVelocity
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const volScalarField & gh