combustion: Removed Qdot field from solvers

The Qdot field has been removed from all reacting solvers, in favour of
computing on the fly whenever it is needed. It can still be generated
for post-processing purposes by means of the Qdot function object. This
change reduces code duplication and storage for all modified solvers.

The Qdot function object has been applied to a number of tutorials in
order to retain the existing output.

A fix to Qdot has also been applied for multi-phase cases.
This commit is contained in:
Will Bainbridge
2019-01-24 11:44:09 +00:00
parent 9847205bfc
commit 4221e43dfc
33 changed files with 69 additions and 143 deletions

View File

@ -11,7 +11,6 @@ tmp<fv::convectionScheme<scalar>> mvConvection
{
radiation->correct();
combustion->correct();
Qdot = combustion->Qdot();
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)
@ -66,7 +65,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
)
- fvm::laplacian(turbulence->alphaEff(), he)
==
Qdot
combustion->Qdot()
+ radiation->Sh(thermo, he)
+ parcels.Sh(he)
+ surfaceFilm.Sh()

View File

@ -124,20 +124,6 @@ Switch solvePyrolysisRegion
additionalControlsDict.lookupOrDefault<bool>("solvePyrolysisRegion", true)
);
volScalarField Qdot
(
IOobject
(
"Qdot",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
);
Info<< "Creating field dpdt\n" << endl;
volScalarField dpdt

View File

@ -17,7 +17,7 @@
)
- fvm::laplacian(turbulence->alphaEff(), he)
==
Qdot
reaction->Qdot()
+ fvOptions(rho, he)
);

View File

@ -11,7 +11,6 @@ tmp<fv::convectionScheme<scalar>> mvConvection
{
reaction->correct();
Qdot = reaction->Qdot();
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)

View File

@ -92,19 +92,5 @@ forAll(Y, i)
}
fields.add(thermo.he());
volScalarField Qdot
(
IOobject
(
"Qdot",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
);
#include "createMRF.H"
#include "createFvOptions.H"

View File

@ -114,19 +114,5 @@ forAll(Y, i)
}
fields.add(thermo.he());
volScalarField Qdot
(
IOobject
(
"Qdot",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
);
#include "createMRF.H"
#include "createFvOptions.H"

View File

@ -96,19 +96,5 @@ forAll(Y, i)
}
fields.add(thermo.he());
volScalarField Qdot
(
IOobject
(
"Qdot",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
);
#include "createMRF.H"
#include "createFvOptions.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -80,7 +80,7 @@ License
{
volScalarField::Internal rDeltaTT
(
mag(Qdot)/(alphaTemp*rho*thermo.Cp()*T)
mag(reaction->Qdot())/(alphaTemp*rho*thermo.Cp()*T)
);
Info<< " Temperature = "

View File

@ -18,7 +18,7 @@
- fvm::laplacian(turbulence->alphaEff(), he)
==
rho*(U&g)
+ Qdot
+ combustion->Qdot()
+ coalParcels.Sh(he)
+ limestoneParcels.Sh(he)
+ radiation->Sh(thermo, he)

View File

@ -12,7 +12,6 @@ tmp<fv::convectionScheme<scalar>> mvConvection
{
combustion->correct();
Qdot = combustion->Qdot();
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)

View File

@ -129,20 +129,6 @@ volScalarField dpdt
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
volScalarField Qdot
(
IOobject
(
"Qdot",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
);
#include "createMRF.H"
#include "createClouds.H"
#include "createRadiationModel.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -80,7 +80,7 @@ License
(
(coalParcels.hsTrans() + limestoneParcels.hsTrans())
/(mesh.V()*runTime.deltaT())
+ Qdot
+ combustion->Qdot()()
)
/(
alphaTemp

View File

@ -21,7 +21,7 @@
+ parcels.Sh(he)
+ surfaceFilm.Sh()
+ radiation->Sh(thermo, he)
+ Qdot
+ combustion->Qdot()
+ fvOptions(rho, he)
);

View File

@ -12,7 +12,6 @@ tmp<fv::convectionScheme<scalar>> mvConvection
{
combustion->correct();
Qdot = combustion->Qdot();
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)

View File

@ -117,20 +117,6 @@ forAll(Y, i)
}
fields.add(thermo.he());
volScalarField Qdot
(
IOobject
(
"Qdot",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
);
#include "createMRF.H"
#include "createRadiationModel.H"
#include "createClouds.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -79,7 +79,7 @@ License
mag
(
parcels.hsTrans()/(mesh.V()*runTime.deltaT())
+ Qdot
+ combustion->Qdot()()
)
/(
alphaTemp

View File

@ -14,7 +14,7 @@
rho*(U&g)
+ parcels.Sh(he)
+ radiation->Sh(thermo, he)
+ Qdot
+ combustion->Qdot()
+ fvOptions(rho, he)
);

View File

@ -11,7 +11,6 @@ tmp<fv::convectionScheme<scalar>> mvConvection
{
combustion->correct();
Qdot = combustion->Qdot();
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)

View File

@ -99,20 +99,6 @@ forAll(Y, i)
}
fields.add(thermo.he());
volScalarField Qdot
(
IOobject
(
"Qdot",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
);
#include "createMRF.H"
#include "createRadiationModel.H"
#include "createClouds.H"

View File

@ -20,7 +20,7 @@
rho*(U&g)
+ parcels.Sh(he)
+ radiation->Sh(thermo, he)
+ Qdot
+ combustion->Qdot()
+ fvOptions(rho, he)
);

View File

@ -11,7 +11,6 @@ tmp<fv::convectionScheme<scalar>> mvConvection
{
combustion->correct();
Qdot = combustion->Qdot();
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)

View File

@ -115,20 +115,6 @@ forAll(Y, i)
}
fields.add(thermo.he());
volScalarField Qdot
(
IOobject
(
"Qdot",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
);
#include "createMRF.H"
#include "createClouds.H"
#include "createRadiationModel.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -108,11 +108,6 @@ int main(int argc, char *argv[])
rho = thermo.rho();
if (runTime.write())
{
combustion->Qdot()().write();
}
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -148,11 +148,6 @@ int main(int argc, char *argv[])
rho = thermo.rho();
if (runTime.write())
{
combustion->Qdot()().write();
}
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;

View File

@ -60,7 +60,7 @@ Foam::functionObjects::Qdot::Qdot
phaseName_(word::null)
{
read(dict);
resetLocalObjectName(type());
resetLocalObjectName(IOobject::groupName(type(), phaseName_));
}

View File

@ -49,5 +49,10 @@ adjustTimeStep yes;
maxCo 0.4;
functions
{
#includeFunc Qdot
}
// ************************************************************************* //

View File

@ -45,4 +45,10 @@ timePrecision 6;
runTimeModifiable true;
functions
{
#includeFunc Qdot
}
// ************************************************************************* //

View File

@ -45,4 +45,10 @@ timePrecision 6;
runTimeModifiable true;
functions
{
#includeFunc Qdot
}
// ************************************************************************* //

View File

@ -49,5 +49,10 @@ adjustTimeStep yes;
maxCo 0.4;
functions
{
#includeFunc Qdot
}
// ************************************************************************* //

View File

@ -49,5 +49,10 @@ adjustTimeStep yes;
maxCo 0.4;
functions
{
#includeFunc Qdot
}
// ************************************************************************* //

View File

@ -49,5 +49,10 @@ maxCo 0.1;
runTimeModifiable yes;
functions
{
#includeFunc Qdot
}
// ************************************************************************* //

View File

@ -0,0 +1,17 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
-------------------------------------------------------------------------------
Description
Calculates the heat release rate Qdot, outputting the data as a Qdot field.
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/combustion/Qdot.cfg"
phase gas;
// ************************************************************************* //

View File

@ -51,5 +51,10 @@ maxCo 0.5;
maxDeltaT 1;
functions
{
#includeFunc Qdot
}
// ************************************************************************* //