OpenFOAM-4.x/applications/solvers/combustion/SOxFoam/createFields.H

130 lines
2 KiB
C

volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
linearInterpolate(rho*U) & mesh.Sf()
);
volScalarField nut
(
IOobject
(
"nut",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
volScalarField mut
(
IOobject
(
"mut",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
rho * nut
);
volScalarField SO2
(
IOobject
(
"SO2",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
volScalarField Sso2
(
IOobject
(
"Sso2",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("Sso2",dimDensity/dimTime,0.0)
);
IOdictionary SOxProperties
(
IOobject
(
"SOxProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
wordList fuelSourceNames(SOxProperties.lookup("fuelSourceNames"));
PtrList<volScalarField::Internal> fuelSources(fuelSourceNames.size());
forAll (fuelSources, si)
{
fuelSources.set
(
si,
new volScalarField::Internal
(
IOobject
(
fuelSourceNames[si],
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
}
scalarField sulfurMassInFuels(SOxProperties.lookup("sulfurMassInFuels"));