createFields.H
Go to the documentation of this file.
1 Info<< "Reading field p\n" << endl;
3 (
4  IOobject
5  (
6  "p",
7  runTime.timeName(),
8  mesh,
9  IOobject::MUST_READ,
10  IOobject::AUTO_WRITE
11  ),
12  mesh
13 );
14 
15 Info<< "Reading field U\n" << endl;
17 (
18  IOobject
19  (
20  "U",
21  runTime.timeName(),
22  mesh,
23  IOobject::MUST_READ,
24  IOobject::AUTO_WRITE
25  ),
26  mesh
27 );
28 
29 #include "createPhi.H"
30 
31 
32 label pRefCell = 0;
33 scalar pRefValue = 0.0;
35 mesh.setFluxRequired(p.name());
36 
37 
38 //- Overset specific
39 
40 // Add solver-specific interpolations
41 {
42  wordHashSet& nonInt =
43  const_cast<wordHashSet&>(Stencil::New(mesh).nonInterpolatedFields());
44 
45  nonInt.insert("HbyA");
46  nonInt.insert("grad(p)");
47  nonInt.insert("surfaceIntegrate(phi)");
48  nonInt.insert("surfaceIntegrate(phiHbyA)");
49  nonInt.insert("cellMask");
50  nonInt.insert("cellDisplacement");
51  nonInt.insert("interpolatedCells");
52  nonInt.insert("cellInterpolationWeight");
53 
54 }
55 // Mask field for zeroing out contributions on hole cells
56 #include "createCellMask.H"
57 
58 // Create bool field with interpolated cells
60 
61 singlePhaseTransportModel laminarTransport(U, phi);
62 
63 autoPtr<incompressible::turbulenceModel> turbulence
64 (
66 );
67 
69 (
70  IOobject
71  (
72  "phiHbyA",
73  runTime.timeName(),
74  mesh,
75  IOobject::NO_READ,
76  IOobject::AUTO_WRITE
77  ),
78  fvc::flux(U)
79 );
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:531
setRefCell(p, pimple.dict(), pRefCell, pRefValue)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:82
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
Definition: HashSet.H:232
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:81
dynamicFvMesh & mesh
HashSet< word, Hash< word > > wordHashSet
A HashSet of words, uses string hasher.
Definition: HashSet.H:73
surfaceScalarField phiHbyA(IOobject("phiHbyA", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), fvc::flux(U))
pimpleControl & pimple
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("pos", dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar("neg", dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::turbulenceModel > turbulence(compressible::turbulenceModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
Creates mask for interpolated cells.
volScalarField & p
Definition: createFields.H:23
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
label pRefCell
Definition: createFields.H:75
Creates mask for blocked out cells.
messageStream Info
Information stream (stdout output on master, null elsewhere)
singlePhaseTransportModel laminarTransport(U, phi)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
scalar pRefValue
Definition: createFields.H:76