This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/combustion/dieselEngineFoam/createSpray.H
2010-08-26 15:22:03 +01:00

37 lines
674 B
C

Info << "Constructing Spray" << endl;
PtrList<gasThermoPhysics> gasProperties(Y.size());
forAll(gasProperties, i)
{
gasProperties.set
(
i,
new gasThermoPhysics
(
dynamic_cast<const reactingMixture<gasThermoPhysics>&>
(thermo).speciesData()[i]
)
);
}
spray dieselSpray
(
U,
rho,
p,
T,
composition,
gasProperties,
thermo,
g
);
scalar gasMass0 = fvc::domainIntegrate(rho).value();
if (dieselSpray.twoD())
{
gasMass0 *= 2.0*mathematicalConstant::pi/dieselSpray.angleOfWedge();
}
gasMass0 -=
dieselSpray.injectedMass(runTime.value()) - dieselSpray.liquidMass();