createSolidFields.H
Go to the documentation of this file.
1 // Initialise solid field pointer lists
2 PtrList<coordinateSystem> coordinates(solidRegions.size());
3 PtrList<solidThermo> thermos(solidRegions.size());
4 PtrList<radiation::radiationModel> radiations(solidRegions.size());
5 PtrList<fv::options> solidHeatSources(solidRegions.size());
6 PtrList<volScalarField> betavSolid(solidRegions.size());
7 PtrList<volSymmTensorField> aniAlphas(solidRegions.size());
8 
9 // Populate solid field pointer lists
11 {
12  Info<< "*** Reading solid mesh thermophysical properties for region "
13  << solidRegions[i].name() << nl << endl;
14 
15  Info<< " Adding to thermos\n" << endl;
17 
18  Info<< " Adding to radiations\n" << endl;
20 
21  Info<< " Adding fvOptions\n" << endl;
23  (
24  i,
25  new fv::options(solidRegions[i])
26  );
27 
28  if (!thermos[i].isotropic())
29  {
30  Info<< " Adding coordinateSystems\n" << endl;
32  (
33  i,
35  );
36 
37  tmp<volVectorField> tkappaByCp =
38  thermos[i].Kappa()/thermos[i].Cp();
39 
40  aniAlphas.set
41  (
42  i,
44  (
45  IOobject
46  (
47  "Anialpha",
48  runTime.timeName(),
49  solidRegions[i],
50  IOobject::NO_READ,
51  IOobject::NO_WRITE
52  ),
53  solidRegions[i],
55  (
56  "zero",
57  tkappaByCp().dimensions(),
58  Zero
59  ),
60  zeroGradientFvPatchSymmTensorField::typeName
61  )
62  );
63 
64  aniAlphas[i].primitiveFieldRef() =
65  coordinates[i].R().transformVector(tkappaByCp());
66  aniAlphas[i].correctBoundaryConditions();
67 
68  }
69 
70  IOobject betavSolidIO
71  (
72  "betavSolid",
73  runTime.timeName(),
74  solidRegions[i],
75  IOobject::MUST_READ,
76  IOobject::AUTO_WRITE
77  );
78 
79  if (betavSolidIO.typeHeaderOk<volScalarField>(true))
80  {
81  betavSolid.set
82  (
83  i,
84  new volScalarField(betavSolidIO, solidRegions[i])
85  );
86  }
87  else
88  {
89  betavSolid.set
90  (
91  i,
92  new volScalarField
93  (
94  IOobject
95  (
96  "betavSolid",
97  runTime.timeName(),
98  solidRegions[i],
99  IOobject::NO_READ,
100  IOobject::NO_WRITE
101  ),
102  solidRegions[i],
103  dimensionedScalar("1", dimless, scalar(1))
104  )
105  );
106  }
107 }
PtrList< volScalarField > betavSolid(solidRegions.size())
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
Definition: volFieldsFwd.H:58
bool set(const label) const
Is element set.
Definition: PtrListI.H:65
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:256
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
PtrList< fv::options > solidHeatSources(solidRegions.size())
PtrList< solidThermo > thermos(solidRegions.size())
static const zero Zero
Definition: zero.H:97
PtrList< volSymmTensorField > aniAlphas(solidRegions.size())
static const char nl
Definition: Ostream.H:265
dimensioned< symmTensor > dimensionedSymmTensor
Dimensioned tensor obtained from generic dimensioned type.
const volScalarField & T
forAll(solidRegions, i)
PtrList< coordinateSystem > coordinates(solidRegions.size())
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:47
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
PtrList< fvMesh > solidRegions(solidsNames.size())
messageStream Info
PtrList< radiation::radiationModel > radiations(solidRegions.size())