Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev

This commit is contained in:
Henry Weller
2019-01-28 09:54:51 +00:00
64 changed files with 545 additions and 263 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

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -78,7 +78,7 @@ Foam::functionObjects::phaseForces::phaseForces
(
mesh_.lookupObject<phaseModel>
(
IOobject::groupName("alpha", dict.lookup("phaseName"))
IOobject::groupName("alpha", dict.lookup("phase"))
)
),
fluid_(mesh_.lookupObject<phaseSystem>("phaseProperties"))

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -369,17 +369,19 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctInterfaceThermo()
volScalarField& iDmdt(*this->iDmdt_[pair]);
volScalarField& Tf(*this->Tf_[pair]);
const volScalarField Tsat = saturationModel_->Tsat(phase1.thermo().p());
volScalarField hf1
(
he1.member() == "e"
? phase1.thermo().he(p, Tf) + p/phase1.rho()
: phase1.thermo().he(p, Tf)
? phase1.thermo().he(p, Tsat) + p/phase1.rho()
: phase1.thermo().he(p, Tsat)
);
volScalarField hf2
(
he2.member() == "e"
? phase2.thermo().he(p, Tf) + p/phase2.rho()
: phase2.thermo().he(p, Tf)
? phase2.thermo().he(p, Tsat) + p/phase2.rho()
: phase2.thermo().he(p, Tsat)
);
volScalarField h1
@ -409,9 +411,7 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctInterfaceThermo()
volScalarField H1(heatTransferModelIter().first()->K(0));
volScalarField H2(heatTransferModelIter().second()->K(0));
Tf = saturationModel_->Tsat(phase1.thermo().p());
iDmdtNew = (H1*(Tf - T1) + H2*(Tf - T2))/L;
iDmdtNew = (H1*(Tsat - T1) + H2*(Tsat - T2))/L;
}
else
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -173,26 +173,17 @@ heatTransfer() const
heatTransferModelIter().second()->K()
);
const volScalarField KEff
(
Ks.first()()*Ks.second()()
/max
(
Ks.first()() + Ks.second()(),
dimensionedScalar(heatTransferModel::dimK, small)
)
);
forAllConstIter(phasePair, pair, iter)
{
const phaseModel& phase = iter();
const volScalarField& he(phase.thermo().he());
const volScalarField Cpv(phase.thermo().Cpv());
const volScalarField& K(Ks[iter.index()]);
*eqns[phase.name()] +=
Ks[iter.index()]*(Tf - phase.thermo().T())
+ KEff/Cpv*he - fvm::Sp(KEff/Cpv, he);
K*(Tf - phase.thermo().T())
+ K/Cpv*he - fvm::Sp(K/Cpv, he);
}
}

View File

@ -0,0 +1,15 @@
/*--------------------------------*- 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"
// ************************************************************************* //

View File

@ -0,0 +1,15 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
type Qdot;
libs ("libcombustionModels.so");
executeControl writeTime;
writeControl writeTime;
// ************************************************************************* //

View File

@ -20,4 +20,6 @@ zoneCombustion/zoneCombustions.C
noCombustion/noCombustions.C
functionObjects/Qdot/Qdot.C
LIB = $(FOAM_LIBBIN)/libcombustionModels

View File

@ -0,0 +1,117 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "Qdot.H"
#include "combustionModel.H"
#include "volFields.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace functionObjects
{
defineTypeNameAndDebug(Qdot, 0);
addToRunTimeSelectionTable
(
functionObject,
Qdot,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::functionObjects::Qdot::Qdot
(
const word& name,
const Time& runTime,
const dictionary& dict
)
:
fvMeshFunctionObject(name, runTime, dict),
writeLocalObjects(obr_, false),
phaseName_(word::null)
{
read(dict);
resetLocalObjectName(IOobject::groupName(type(), phaseName_));
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::functionObjects::Qdot::~Qdot()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::functionObjects::Qdot::read
(
const dictionary& dict
)
{
fvMeshFunctionObject::read(dict);
writeLocalObjects::read(dict);
phaseName_ = dict.lookupOrDefault<word>("phase", word::null);
return true;
}
bool Foam::functionObjects::Qdot::execute()
{
word fieldName(IOobject::groupName(type(), phaseName_));
const word modelName
(
IOobject::groupName
(
combustionModel::combustionPropertiesName,
phaseName_
)
);
return
store
(
fieldName,
mesh_.lookupObject<combustionModel>(modelName).Qdot()
);
}
bool Foam::functionObjects::Qdot::write()
{
return writeLocalObjects::write();
}
// ************************************************************************* //

View File

@ -0,0 +1,109 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::functionObjects::Qdot
Description
Calculates and outputs the heat release rate for the current combustion
model.
SourceFiles
Qdot.C
\*---------------------------------------------------------------------------*/
#ifndef functionObjects_Qdot_H
#define functionObjects_Qdot_H
#include "fvMeshFunctionObject.H"
#include "writeLocalObjects.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace functionObjects
{
/*---------------------------------------------------------------------------*\
Class Qdot Declaration
\*---------------------------------------------------------------------------*/
class Qdot
:
public fvMeshFunctionObject,
public writeLocalObjects
{
private:
// Private data
//- The name of the phase
word phaseName_;
public:
//- Runtime type information
TypeName("Qdot");
// Constructors
//- Construct from Time and dictionary
Qdot
(
const word& name,
const Time& runTime,
const dictionary& dict
);
//- Destructor
virtual ~Qdot();
// Member Functions
//- Read the data
virtual bool read(const dictionary&);
//- Calculate the Qdot field
virtual bool execute();
//- Do nothing
virtual bool write();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace functionObjects
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

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

@ -38,7 +38,6 @@ boundaryField
type inletOutlet;
inletValue $internalField;
value $internalField;
}
gas_to_solid
{

View File

@ -38,7 +38,6 @@ boundaryField
type inletOutlet;
inletValue $internalField;
value $internalField;
}
gas_to_solid
{

View File

@ -26,12 +26,12 @@ boundaryField
inletFuel
{
type fixedValue;
value uniform (0 0.5 0);
value uniform (0 0.15 0.15);
}
inletAir
{
type fixedValue;
value uniform (0 1.5 0);
value uniform (0 0.15 -0.15);
}
outlet
{
@ -40,7 +40,7 @@ boundaryField
}
gas_to_solid
{
type noSlip;
type slip;
}
}

View File

@ -17,7 +17,7 @@ FoamFile
dimensions [ 0 2 -3 0 0 0 0 ];
internalField uniform 0.01;
internalField uniform 3.60203e-06;
boundaryField
{
@ -25,7 +25,8 @@ boundaryField
"inlet.*"
{
type fixedValue;
type turbulentMixingLengthDissipationRateInlet;
mixingLength 0.1;
value $internalField;
}
outlet

View File

@ -17,7 +17,7 @@ FoamFile
dimensions [ 0 2 -2 0 0 0 0 ];
internalField uniform 0.1;
internalField uniform 0.00016875;
boundaryField
{
@ -25,7 +25,8 @@ boundaryField
"inlet.*"
{
type fixedValue;
type turbulentIntensityKineticEnergyInlet;
intensity 0.05;
value $internalField;
}
outlet

View File

@ -17,7 +17,7 @@ FoamFile
dimensions [ 1 -1 -2 0 0 0 0 ];
internalField uniform 1e5;
internalField uniform 0;
boundaryField
{

View File

@ -17,7 +17,7 @@ FoamFile
dimensions [ 1 -1 -2 0 0 0 0 ];
internalField uniform 1e5;
internalField uniform 0;
boundaryField
{

View File

@ -15,9 +15,9 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
dimensions [ 1 -1 -2 0 0 0 0 ];
internalField uniform 1e5;
internalField uniform 0;
boundaryField
{

View File

@ -15,6 +15,8 @@ paraFoam -region solid -touch
runApplication decomposePar -allRegions
runParallel setFields -region gas
runParallel $(getApplication)
runApplication reconstructPar -allRegions -newTimes

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "constant/gas";
location "constant";
object chemistryProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "constant/gas";
location "constant";
object combustionProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "constant/gas";
location "constant";
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -21,15 +21,15 @@ options
{
type scalarSemiImplicitSource;
timeStart 0.2;
duration 0.3;
timeStart 0;
duration 1;
selectionMode cellSet;
cellSet ignition;
volumeMode specific;
injectionRateSuSp
{
h (2e7 0); // kg/m/s^3
e (5e7 0); // kg/m/s^3
}
}
}

View File

@ -16,6 +16,6 @@ FoamFile
dimensions [0 1 -2 0 0 0 0];
value (0 -9.81 0);
value (0 0 0);
// ************************************************************************* //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "constant/gas";
location "constant";
object radiationProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -4,6 +4,23 @@
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
-------------------------------------------------------------------------------
Reference:
Westbrook, C. K., & Dryer, F. L. (1981).
Simplified reaction mechanisms for the oxidation of hydrocarbon fuels in
flames.
Combustion science and technology, 27(1-2), 31-43.
Notes:
The reference gives parameters in a unit system of cm-sec-mole-kcal-Kelvin,
whilst OpenFOAM uses m-sec-kmol-J-Kelvin, both the pre-exponential factors
and the activation temperature/energy require unit conversion.
The mechanism used is set 3 from table 2. This should be the most accurate
single-step methane mechanism without any negative exponents. Set 2 is not
usable because the negative exponent on the methane concentration causes
divergence in regions without any fuel.
\*---------------------------------------------------------------------------*/
FoamFile
{
@ -29,10 +46,10 @@ reactions
methaneReaction
{
type irreversibleArrheniusReaction;
reaction "CH4 + 2O2 = CO2 + 2H2O";
A 5.2e16;
reaction "CH4^0.2 + 2O2^1.3 = CO2 + 2H2O";
A 2.11873e+11;
beta 0;
Ta 14906;
Ta 24357;
}
}

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "constant/gas";
location "constant";
object thermo.compressibleGas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -21,6 +21,10 @@ O2
{
molWeight 31.9988;
}
equationOfState
{
pRef 1e6;
}
thermodynamics
{
Tlow 200;
@ -42,6 +46,10 @@ H2O
{
molWeight 18.0153;
}
equationOfState
{
pRef 1e6;
}
thermodynamics
{
Tlow 200;
@ -63,6 +71,10 @@ CH4
{
molWeight 16.0428;
}
equationOfState
{
pRef 1e6;
}
thermodynamics
{
Tlow 200;
@ -84,6 +96,10 @@ CO2
{
molWeight 44.01;
}
equationOfState
{
pRef 1e6;
}
thermodynamics
{
Tlow 200;
@ -105,6 +121,10 @@ N2
{
molWeight 28.0134;
}
equationOfState
{
pRef 1e6;
}
thermodynamics
{
Tlow 200;

View File

@ -21,9 +21,9 @@ thermoType
mixture reactingMixture;
transport sutherland;
thermo janaf;
equationOfState perfectGas;
equationOfState incompressiblePerfectGas;
specie specie;
energy sensibleEnthalpy;
energy sensibleInternalEnergy;
}
inertSpecie N2;

View File

@ -29,23 +29,20 @@ mixture
{
specie
{
molWeight 50;
molWeight 50;
}
transport
{
kappa 80;
}
thermodynamics
{
Hf 0;
Cp 450;
}
equationOfState
{
rho 8000;
rho 8000;
}
thermodynamics
{
Hf 0;
Cp 450;
}
transport
{
kappa 80;
}
}

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"
region gas;
// ************************************************************************* //

View File

@ -18,43 +18,43 @@ convertToMeters 0.01;
vertices
(
(0 0 -1) (1 0 -1) (2 0 -1) (10 0 -1) (11 0 -1) (21 0 -1) (22 0 -1)
(0 10 -1) (1 10 -1) (2 10 -1) (10 10 -1) (11 10 -1) (21 10 -1) (22 10 -1)
(0 40 -1) (1 40 -1) (2 40 -1) (10 40 -1) (11 40 -1) (21 40 -1) (22 40 -1)
(0 50 -1) (1 50 -1) (2 50 -1) (10 50 -1) (11 50 -1) (21 50 -1) (22 50 -1)
(0 51 -1) (1 51 -1) (2 51 -1) (10 51 -1) (11 51 -1) (21 51 -1) (22 51 -1)
(0 0 0) (1 0 -0.1) (2 0 -0.2) (10 0 -1.0) (11 0 -1.1) (21 0 -2.1) (22 0 -2.2)
(0 10 0) (1 10 -0.1) (2 10 -0.2) (10 10 -1.0) (11 10 -1.1) (21 10 -2.1) (22 10 -2.2)
(0 40 0) (1 40 -0.1) (2 40 -0.2) (10 40 -1.0) (11 40 -1.1) (21 40 -2.1) (22 40 -2.2)
(0 50 0) (1 50 -0.1) (2 50 -0.2) (10 50 -1.0) (11 50 -1.1) (21 50 -2.1) (22 50 -2.2)
(0 51 0) (1 51 -0.1) (2 51 -0.2) (10 51 -1.0) (11 51 -1.1) (21 51 -2.1) (22 51 -2.2)
(0 0 1) (1 0 1) (2 0 1) (10 0 1) (11 0 1) (21 0 1) (22 0 1)
(0 10 1) (1 10 1) (2 10 1) (10 10 1) (11 10 1) (21 10 1) (22 10 1)
(0 40 1) (1 40 1) (2 40 1) (10 40 1) (11 40 1) (21 40 1) (22 40 1)
(0 50 1) (1 50 1) (2 50 1) (10 50 1) (11 50 1) (21 50 1) (22 50 1)
(0 51 1) (1 51 1) (2 51 1) (10 51 1) (11 51 1) (21 51 1) (22 51 1)
(0 0 0) (1 0 0.1) (2 0 0.2) (10 0 1.0) (11 0 1.1) (21 0 2.1) (22 0 2.2)
(0 10 0) (1 10 0.1) (2 10 0.2) (10 10 1.0) (11 10 1.1) (21 10 2.1) (22 10 2.2)
(0 40 0) (1 40 0.1) (2 40 0.2) (10 40 1.0) (11 40 1.1) (21 40 2.1) (22 40 2.2)
(0 50 0) (1 50 0.1) (2 50 0.2) (10 50 1.0) (11 50 1.1) (21 50 2.1) (22 50 2.2)
(0 51 0) (1 51 0.1) (2 51 0.2) (10 51 1.0) (11 51 1.1) (21 51 2.1) (22 51 2.2)
);
blocks
(
hex ( 0 1 8 7 35 36 43 42) gas ( 4 40 1) simpleGrading (1 1 1)
hex ( 0 1 8 7 0 36 43 7) gas ( 4 40 1) simpleGrading (1 1 1)
hex ( 1 2 9 8 36 37 44 43) solid ( 4 40 1) simpleGrading (1 1 1)
hex ( 2 3 10 9 37 38 45 44) gas (32 40 1) simpleGrading (1 1 1)
hex ( 3 4 11 10 38 39 46 45) solid ( 4 40 1) simpleGrading (1 1 1)
hex ( 4 5 12 11 39 40 47 46) gas (40 40 1) simpleGrading (1 1 1)
hex ( 5 6 13 12 40 41 48 47) solid ( 4 40 1) simpleGrading (1 1 1)
hex ( 7 8 15 14 42 43 50 49) gas ( 4 120 1) simpleGrading (1 1 1)
hex ( 7 8 15 14 7 43 50 14) gas ( 4 120 1) simpleGrading (1 1 1)
hex ( 8 9 16 15 43 44 51 50) gas ( 4 120 1) simpleGrading (1 1 1)
hex ( 9 10 17 16 44 45 52 51) gas (32 120 1) simpleGrading (1 1 1)
hex (10 11 18 17 45 46 53 52) solid ( 4 120 1) simpleGrading (1 1 1)
hex (11 12 19 18 46 47 54 53) gas (40 120 1) simpleGrading (1 1 1)
hex (12 13 20 19 47 48 55 54) solid ( 4 120 1) simpleGrading (1 1 1)
hex (14 15 22 21 49 50 57 56) gas ( 4 40 1) simpleGrading (1 1 1)
hex (14 15 22 21 14 50 57 21) gas ( 4 40 1) simpleGrading (1 1 1)
hex (15 16 23 22 50 51 58 57) gas ( 4 40 1) simpleGrading (1 1 1)
hex (16 17 24 23 51 52 59 58) gas (32 40 1) simpleGrading (1 1 1)
hex (17 18 25 24 52 53 60 59) gas ( 4 40 1) simpleGrading (1 1 1)
hex (18 19 26 25 53 54 61 60) gas (40 40 1) simpleGrading (1 1 1)
hex (19 20 27 26 54 55 62 61) solid ( 4 40 1) simpleGrading (1 1 1)
hex (21 22 29 28 56 57 64 63) solid ( 4 4 1) simpleGrading (1 1 1)
hex (21 22 29 28 21 57 64 28) solid ( 4 4 1) simpleGrading (1 1 1)
hex (22 23 30 29 57 58 65 64) solid ( 4 4 1) simpleGrading (1 1 1)
hex (23 24 31 30 58 59 66 65) solid (32 4 1) simpleGrading (1 1 1)
hex (24 25 32 31 59 60 67 66) solid ( 4 4 1) simpleGrading (1 1 1)
@ -68,8 +68,8 @@ edges
defaultPatch
{
type empty;
name frontAndBack;
type wedge;
name wedgePos;
}
boundary
@ -79,7 +79,7 @@ boundary
type patch;
faces
(
(0 1 36 35)
(0 1 36 0)
);
}
inletAir
@ -98,17 +98,6 @@ boundary
(4 5 40 39)
);
}
axis
{
type symmetryPlane;
faces
(
(0 7 42 35)
(7 14 49 42)
(14 21 56 49)
(21 28 63 56)
);
}
external
{
type patch;
@ -121,7 +110,7 @@ boundary
(13 20 55 48)
(20 27 62 55)
(27 34 69 62)
(28 29 64 63)
(28 29 64 28)
(29 30 65 64)
(30 31 66 65)
(31 32 67 66)
@ -129,6 +118,37 @@ boundary
(33 34 69 68)
);
}
wedgeNeg
{
type wedge;
faces
(
(0 1 8 7)
(1 2 9 8)
(2 3 10 9)
(3 4 11 10)
(4 5 12 11)
(5 6 13 12)
(7 8 15 14)
(8 9 16 15)
(9 10 17 16)
(10 11 18 17)
(11 12 19 18)
(12 13 20 19)
(14 15 22 21)
(15 16 23 22)
(16 17 24 23)
(17 18 25 24)
(18 19 26 25)
(19 20 27 26)
(21 22 29 28)
(22 23 30 29)
(23 24 31 30)
(24 25 32 31)
(25 26 33 32)
(26 27 34 33)
);
}
);
mergePatchPairs

View File

@ -17,23 +17,23 @@ FoamFile
application chtMultiRegionFoam;
startFrom latestTime;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 1;
endTime 6;
deltaT 1e-5;
writeControl adjustableRunTime;
writeInterval 1e-2;
writeInterval 0.1;
purgeWrite 0;
writeFormat ascii;
writeFormat binary;
writePrecision 8;
@ -51,4 +51,10 @@ maxDi 5.0;
adjustTimeStep yes;
functions
{
#includeFunc Qdot
}
// ************************************************************************* //

View File

@ -22,21 +22,21 @@ ddtSchemes
gradSchemes
{
default Gauss linear;
limitedGrad cellLimited Gauss linear 1;
}
divSchemes
{
default none;
div(phi,U) Gauss upwind;
div(phi,U) Gauss linearUpwind grad(U);
div(phi,e) Gauss linearUpwind limitedGrad;
div(phi,Yi_h) Gauss limitedLinear 1;
div(phi,k) Gauss linearUpwind limitedGrad;
div(phi,epsilon) Gauss linearUpwind limitedGrad;
div(phi,K) Gauss linear;
div(phi,h) Gauss upwind;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phiv,p) Gauss linear;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
div(phi,Yi_h) Gauss upwind;
}
laplacianSchemes

View File

@ -16,27 +16,17 @@ FoamFile
solvers
{
rho
"rho.*"
{
solver PCG;
preconditioner DIC;
tolerance 1e-7;
relTol 0.1;
}
rhoFinal
{
$rho;
tolerance 1e-7;
relTol 0;
solver diagonal;
}
p_rgh
{
solver GAMG;
smoother GaussSeidel;
tolerance 1e-7;
relTol 0.01;
smoother GaussSeidel;
}
p_rghFinal
@ -46,7 +36,7 @@ solvers
relTol 0;
}
"(U|h|k|epsilon|R|Yi)"
"(U|e|k|epsilon|Yi)"
{
solver PBiCGStab;
preconditioner DILU;
@ -54,7 +44,7 @@ solvers
relTol 0.1;
}
"(U|h|k|epsilon|R|Yi)Final"
"(U|e|k|epsilon|Yi)Final"
{
$U;
tolerance 1e-7;
@ -73,8 +63,7 @@ relaxationFactors
{
equations
{
h 1;
U 1;
".*" 1;
}
}

View File

@ -0,0 +1,39 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defaultFieldValues
(
volScalarFieldValue N2 0.79
volScalarFieldValue O2 0.21
volScalarFieldValue CH4 0
);
regions
(
boxToCell
{
box (0 0 -0.01) (0.01 0.1 0.01);
fieldValues
(
volScalarFieldValue N2 0
volScalarFieldValue O2 0
volScalarFieldValue CH4 1
);
}
);
// ************************************************************************* //

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
}
// ************************************************************************* //