createFields.H
Go to the documentation of this file.
1 #include "createRDeltaT.H"
2 
3 Info<< "Reading thermophysical properties\n" << endl;
4 
5 autoPtr<fluidThermo> pThermo
6 (
8 );
9 fluidThermo& thermo = pThermo();
10 thermo.validate(args.executable(), "h", "e");
11 
12 volScalarField& p = thermo.p();
13 
15 (
16  IOobject
17  (
18  "rho",
19  runTime.timeName(),
20  mesh,
21  IOobject::READ_IF_PRESENT,
22  IOobject::AUTO_WRITE
23  ),
24  thermo.rho()
25 );
26 
27 Info<< "Reading field U\n" << endl;
29 (
30  IOobject
31  (
32  "U",
33  runTime.timeName(),
34  mesh,
35  IOobject::MUST_READ,
36  IOobject::AUTO_WRITE
37  ),
38  mesh
39 );
40 
41 #include "compressibleCreatePhi.H"
42 
44 (
45  p,
46  pimple.dict(),
47  thermo.incompressible()
48 );
49 
50 mesh.setFluxRequired(p.name());
51 
52 Info<< "Creating turbulence model\n" << endl;
53 autoPtr<compressible::momentumTransportModel> turbulence
54 (
56  (
57  rho,
58  U,
59  phi,
60  thermo
61  )
62 );
63 
64 Info<< "Creating thermophysical transport model\n" << endl;
65 autoPtr<fluidThermophysicalTransportModel> thermophysicalTransport
66 (
68 );
69 
70 Info<< "Creating field dpdt\n" << endl;
72 (
73  IOobject
74  (
75  "dpdt",
76  runTime.timeName(),
77  mesh
78  ),
79  mesh,
80  dimensionedScalar(p.dimensions()/dimTime, 0)
81 );
82 
83 Info<< "Creating field kinetic energy K\n" << endl;
84 volScalarField K("K", 0.5*magSqr(U));
85 
87 
88 #include "createMRF.H"
89 #include "createFvModels.H"
90 #include "createFvConstraints.H"
const word & executable() const
Name of executable without the path.
Definition: argListI.H:36
pimpleNoLoopControl & pimple
Info<< "Reading thermophysical properties\"<< endl;autoPtr< fluidReactionThermo > pThermo(fluidReactionThermo::New(mesh))
pressureReference pressureReference(mixture.p(), p_rgh, pimple.dict(), false)
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:58
CGAL::Exact_predicates_exact_constructions_kernel K
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
volScalarField & dpdt
rho
Definition: createFields.H:81
const dimensionSet dimTime
dynamicFvMesh & mesh
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
phi
Definition: correctPhi.H:3
dimensioned< scalar > magSqr(const dimensioned< Type > &)
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
Info<< "Creating thermophysical transport model\"<< endl;autoPtr< fluidThermophysicalTransportModel > thermophysicalTransport(fluidThermophysicalTransportModel::New(turbulence(), thermo))
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
messageStream Info
Foam::argList args(argc, argv)
Creates and initialises the face-flux field phi.