createFields.H
Go to the documentation of this file.
1 Info<< "Reading field p (kinematic)\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 autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
33 
34 autoPtr<incompressible::momentumTransportModel> turbulence
35 (
37 );
38 
39 #include "readGravitationalAcceleration.H"
40 
41 Info<< "Creating field zeta\n" << endl;
42 volVectorField zeta
43 (
44  IOobject
45  (
46  "zeta",
47  runTime.timeName(),
48  mesh,
49  IOobject::READ_IF_PRESENT,
50  IOobject::AUTO_WRITE
51  ),
52  mesh,
54 );
55 
56 Info<< "Creating field p_gh\n" << endl;
57 volScalarField p_gh
58 (
59  IOobject
60  (
61  "p_gh",
62  runTime.timeName(),
63  mesh,
64  IOobject::MUST_READ,
65  IOobject::AUTO_WRITE
66  ),
67  mesh
68 );
69 
70 // Force p_gh to be consistent with p
71 // Height is made relative to field 'refLevel'
72 p_gh = p - (g & mesh.C());
73 
75 
76 mesh.schemes().setFluxRequired(p_gh.name());
77 
78 #include "createMRF.H"
79 #include "createFvModels.H"
80 #include "createFvConstraints.H"
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
pimpleNoLoopControl & pimple
pressureReference pressureReference(mixture.p(), p_rgh, pimple.dict(), false)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:59
fvMesh & mesh
volScalarField & p
Definition: createFields.H:25
const dimensionSet dimLength
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:58
Info<< "Reading field p\"<< endl;volScalarField p(IOobject("p", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);pressureReference pressureReference(p, simple.dict());mesh.schemes().setFluxRequired(p.name());Info<< "Reading field pa\"<< endl;volScalarField pa(IOobject("pa", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field Ua\"<< endl;volVectorField Ua(IOobject("Ua", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);# 65 "/home/ubuntu/OpenFOAM-10/applications/solvers/incompressible/adjointShapeOptimisationFoam/createFields.H" 2label paRefCell=0;scalar paRefValue=0.0;setRefCell(pa, simple.dict(), paRefCell, paRefValue);mesh.schemes().setFluxRequired(pa.name());autoPtr< viscosityModel > viscosity(viscosityModel::New(mesh))
phi
Definition: correctPhi.H:3
static const zero Zero
Definition: zero.H:97
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
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
messageStream Info
const dimensionedVector & g