[OF6] fix volScalarField for heat release rate

OF4 -> OF5/OF6:
dimension of dQ() = dimEnergy/dimTime
->
dimension of Qdot() = dimEnergy/dimVolume/dimTime
This commit is contained in:
danielque
2019-11-13 13:05:19 +01:00
parent dc3194c857
commit 1643f8d908
2 changed files with 18 additions and 1 deletions

View File

@ -16,7 +16,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
#if OPENFOAM_VERSION_MAJOR < 5
dQ = combustion->dQ();
#else
dQ = combustion->Qdot();
Qdot = combustion->Qdot();
#endif
label inertIndex = -1;
volScalarField Yt(0.0*Y[0]);
@ -76,4 +76,5 @@ tmp<fv::convectionScheme<scalar> > mvConvection
Y[inertIndex].max(0.0);
}
}
particleCloud.clockM().stop("Y");

View File

@ -230,6 +230,7 @@
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
#if OPENFOAM_VERSION_MAJOR < 5
volScalarField dQ
(
IOobject
@ -243,6 +244,21 @@
mesh,
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
);
#else
volScalarField Qdot
(
IOobject
(
"Qdot",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
);
#endif
Info<< "\nReading momentum exchange field Ksl\n" << endl;
volScalarField Ksl