createFields.H 1.93 KB
Newer Older
1
2
    Info<< "Reading thermophysical properties\n" << endl;

3
    autoPtr<psiChemistryModel> pChemistry
4
    (
5
        psiChemistryModel::New(mesh)
6
    );
7
    psiChemistryModel& chemistry = pChemistry();
8

9
10
11
    hCombustionThermo& thermo = chemistry.thermo();

    basicMultiComponentMixture& composition = thermo.composition();
12
13
    PtrList<volScalarField>& Y = composition.Y();

14
    word inertSpecie(thermo.lookup("inertSpecie"));
15

16
17
18
19
    volScalarField& p = thermo.p();
    volScalarField& h = thermo.h();
    const volScalarField& T = thermo.T();
    const volScalarField& psi = thermo.psi();
20
21
22
23
24
25
26
27
28
29
30

    volScalarField rho
    (
        IOobject
        (
            "rho",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::AUTO_WRITE
        ),
31
        thermo.rho()
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
    );

    Info<< "\nReading field U\n" << endl;
    volVectorField U
    (
        IOobject
        (
            "U",
            runTime.timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        mesh
    );

48
    #include "compressibleCreatePhi.H"
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

    DimensionedField<scalar, volMesh> kappa
    (
        IOobject
        (
            "kappa",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::AUTO_WRITE
        ),
        mesh,
        dimensionedScalar("zero", dimless, 0.0)
    );

    Info<< "Creating turbulence model\n" << endl;
    autoPtr<compressible::turbulenceModel> turbulence
    (
        compressible::turbulenceModel::New
        (
            rho,
            U,
            phi,
72
            thermo
73
74
75
76
        )
    );

    Info<< "Creating field DpDt\n" << endl;
77
78
79
80
81
    volScalarField DpDt
    (
        "DpDt",
        fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
    );
82
83
84
85
86
87
88
89

    multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;

    forAll (Y, i)
    {
        fields.add(Y[i]);
    }
    fields.add(h);