createFields.H
Go to the documentation of this file.
1 if (mesh.nCells() != 1)
2 {
4  << "Solver only applicable to single cell cases"
5  << exit(FatalError);
6 }
7 
8 #include "createInitialFields.H"
9 
10 Info<< "Reading thermophysical properties\n" << endl;
11 autoPtr<fluidMulticomponentThermo> pThermo
12 (
14 );
15 fluidMulticomponentThermo& thermo = pThermo();
16 thermo.validate(args.executable(), "h");
17 
18 autoPtr<chemistryModel> pChemistry(chemistryModel::New(thermo));
19 
21 (
22  IOobject
23  (
24  "rho",
25  runTime.name(),
26  mesh,
27  IOobject::NO_READ,
28  IOobject::AUTO_WRITE
29  ),
30  thermo.renameRho()
31 );
32 
34 (
35  IOobject
36  (
37  "Rspecific",
38  runTime.name(),
39  mesh,
40  IOobject::NO_READ,
41  IOobject::AUTO_WRITE
42  ),
43  mesh,
45  (
46  dimensionSet(dimEnergy/dimMass/dimTemperature),
47  0
48  )
49 );
50 
52 (
53  IOobject
54  (
55  "U",
56  runTime.name(),
57  mesh,
58  IOobject::NO_READ,
59  IOobject::NO_WRITE
60  ),
61  mesh,
63 );
64 
65 #include "createPhi.H"
66 
67 OFstream post(args.path()/"chemFoam.out");
68 post<< "# Time" << token::TAB << "Temperature [K]" << token::TAB
69  << "Pressure [Pa]" << endl;
const word & executable() const
Name of executable without the path.
Definition: argListI.H:36
fileName path() const
Return the path to the caseName.
Definition: argListI.H:66
label nCells() const
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:334
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
static const zero Zero
Definition: zero.H:97
VolField< vector > volVectorField
Definition: volFieldsFwd.H:63
const dimensionSet & dimMass
Definition: dimensions.C:140
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:288
messageStream Info
const dimensionSet & dimVelocity
Definition: dimensions.C:154
VolField< scalar > volScalarField
Definition: volFieldsFwd.H:62
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
const dimensionSet & dimEnergy
Definition: dimensions.C:160
error FatalError
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
const dimensionSet & dimTemperature
Definition: dimensions.C:143
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Foam::argList args(argc, argv)
volScalarField Rspecific(IOobject("Rspecific", runTime.name(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar(dimensionSet(dimEnergy/dimMass/dimTemperature), 0))
autoPtr< chemistryModel > pChemistry(chemistryModel::New(thermo))
volScalarField rho(IOobject("rho", runTime.name(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.renameRho())
volVectorField U(IOobject("U", runTime.name(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), mesh, dimensionedVector(dimVelocity, Zero))
OFstream post(args.path()/"chemFoam.out")
Info<< "Reading thermophysical properties\n"<< endl;autoPtr< fluidMulticomponentThermo > pThermo(fluidMulticomponentThermo::New(mesh))
fluidMulticomponentThermo & thermo
Definition: createFields.H:15