All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  Info<< "Reading initial conditions.\n" << endl;
9  IOdictionary initialConditions
10  (
11  IOobject
12  (
13  "initialConditions",
14  runTime.constant(),
15  mesh,
16  IOobject::MUST_READ_IF_MODIFIED,
17  IOobject::NO_WRITE
18  )
19  );
20 
21  scalar p0 = initialConditions.lookup<scalar>("p");
22  scalar T0 = initialConditions.lookup<scalar>("T");
23 
24  #include "createBaseFields.H"
25 
26  Info<< "Reading thermophysical properties\n" << endl;
27  autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
28  rhoReactionThermo& thermo = pThermo();
29  thermo.validate(args.executable(), "h");
30 
31  autoPtr<BasicChemistryModel<rhoReactionThermo>> pChemistry
32  (
34  );
35 
37  (
38  IOobject
39  (
40  "rho",
41  runTime.timeName(),
42  mesh,
43  IOobject::NO_READ,
44  IOobject::AUTO_WRITE
45  ),
46  thermo.rho()
47  );
48 
50  (
51  IOobject
52  (
53  "Rspecific",
54  runTime.timeName(),
55  mesh,
56  IOobject::NO_READ,
57  IOobject::AUTO_WRITE
58  ),
59  mesh,
61  (
62  dimensionSet(dimEnergy/dimMass/dimTemperature),
63  0
64  )
65  );
66 
68  (
69  IOobject
70  (
71  "U",
72  runTime.timeName(),
73  mesh,
74  IOobject::NO_READ,
75  IOobject::NO_WRITE
76  ),
77  mesh,
79  );
80 
81  #include "createPhi.H"
82 
83  OFstream post(args.path()/"chemFoam.out");
84  post<< "# Time" << token::TAB << "Temperature [K]" << token::TAB
85  << "Pressure [Pa]" << endl;
const word & executable() const
Name of executable without the path.
Definition: argListI.H:36
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
error FatalError
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:319
OFstream post(args.path()/"chemFoam.out")
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
volScalarField Rspecific(IOobject("Rspecific", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar(dimensionSet(dimEnergy/dimMass/dimTemperature), 0))
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:58
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
rho
Definition: createFields.H:81
dynamicFvMesh & mesh
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
Definition: dimensionSets.H:52
static const zero Zero
Definition: zero.H:97
Info<< "Reading thermophysical properties\"<< endl;autoPtr< rhoReactionThermo > pThermo(rhoReactionThermo::New(mesh))
autoPtr< BasicChemistryModel< rhoReactionThermo > > pChemistry(BasicChemistryModel< rhoReactionThermo >::New(thermo))
const dimensionSet dimEnergy
fileName path() const
Return the path to the caseName.
Definition: argListI.H:66
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
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
Foam::argList args(argc, argv)
const dimensionSet dimVelocity