-
Notifications
You must be signed in to change notification settings - Fork 3
/
createFields.H
32 lines (29 loc) · 1.12 KB
/
createFields.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Info<< nl << "Reading thermophysicalProperties" << endl;
autoPtr<psiReactionThermo> pThermo(psiReactionThermo::New(mesh));
psiReactionThermo& thermo = pThermo();
autoPtr< BasicChemistryModel<psiReactionThermo>> pChemistry
(
BasicChemistryModel<psiReactionThermo>::New(thermo)
);
BasicChemistryModel<psiReactionThermo>& chemistry = pChemistry();
thermo.validate(args.executable(), "h", "e");
//*********************delete*********************************//
//basicMultiComponentMixture& composition = thermo.composition();
//************************************************************//
basicSpecieMixture& composition = thermo.composition();
//****************************************************//
PtrList<volScalarField>& Y = composition.Y();
PtrList<gasHThermoPhysics> specieData(Y.size());
forAll(specieData, i)
{
specieData.set
(
i,
new gasHThermoPhysics
(
dynamic_cast<const reactingMixture<gasHThermoPhysics>&>
(thermo).speciesData()[i]
)
);
}
const PtrList<Reaction<gasHThermoPhysics>> reactions = dynamic_cast<const reactingMixture<gasHThermoPhysics>&>(thermo);