From da4acfbaa3a5ab7a24c5f030558120ddb14b9d5a Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 26 Sep 2013 22:38:41 +0100 Subject: [PATCH 01/11] LTSReactingFoam: New LTS version of reactingFoam --- .../LTSReactingFoam/LTSReactingFoam.C | 107 ++++++++++++++++++ .../reactingFoam/LTSReactingFoam/Make/files | 3 + .../reactingFoam/LTSReactingFoam/Make/options | 28 +++++ .../LTSReactingFoam/readTimeControls.H | 48 ++++++++ .../LTSReactingFoam/setInitialrDeltaT.H | 14 +++ .../reactingFoam/LTSReactingFoam/setrDeltaT.H | 97 ++++++++++++++++ 6 files changed, 297 insertions(+) create mode 100644 applications/solvers/combustion/reactingFoam/LTSReactingFoam/LTSReactingFoam.C create mode 100644 applications/solvers/combustion/reactingFoam/LTSReactingFoam/Make/files create mode 100644 applications/solvers/combustion/reactingFoam/LTSReactingFoam/Make/options create mode 100644 applications/solvers/combustion/reactingFoam/LTSReactingFoam/readTimeControls.H create mode 100644 applications/solvers/combustion/reactingFoam/LTSReactingFoam/setInitialrDeltaT.H create mode 100644 applications/solvers/combustion/reactingFoam/LTSReactingFoam/setrDeltaT.H diff --git a/applications/solvers/combustion/reactingFoam/LTSReactingFoam/LTSReactingFoam.C b/applications/solvers/combustion/reactingFoam/LTSReactingFoam/LTSReactingFoam.C new file mode 100644 index 0000000000..0b34210865 --- /dev/null +++ b/applications/solvers/combustion/reactingFoam/LTSReactingFoam/LTSReactingFoam.C @@ -0,0 +1,107 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 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 . + +Application + LTSReactingFoam + +Description + Local time stepping (LTS) solver for steady, compressible, laminar or + turbulent reacting and non-reacting flow. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "turbulenceModel.H" +#include "psiCombustionModel.H" +#include "multivariateScheme.H" +#include "pimpleControl.H" +#include "fvIOoptionList.H" +#include "fvcSmooth.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + + pimpleControl pimple(mesh); + + #include "readGravitationalAcceleration.H" + #include "createFields.H" + #include "createFvOptions.H" + #include "initContinuityErrs.H" + #include "readTimeControls.H" + #include "compressibleCourantNo.H" + #include "setInitialrDeltaT.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.run()) + { + #include "readTimeControls.H" + + runTime++; + + Info<< "Time = " << runTime.timeName() << nl << endl; + + #include "setrDeltaT.H" + + #include "rhoEqn.H" + + // --- Pressure-velocity PIMPLE corrector loop + while (pimple.loop()) + { + #include "UEqn.H" + #include "YEqn.H" + #include "EEqn.H" + + // --- Pressure corrector loop + while (pimple.correct()) + { + #include "pEqn.H" + } + + if (pimple.turbCorr()) + { + turbulence->correct(); + } + } + + runTime.write(); + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + } + + Info<< "End\n" << endl; + + return(0); +} + + +// ************************************************************************* // diff --git a/applications/solvers/combustion/reactingFoam/LTSReactingFoam/Make/files b/applications/solvers/combustion/reactingFoam/LTSReactingFoam/Make/files new file mode 100644 index 0000000000..0b81e7a032 --- /dev/null +++ b/applications/solvers/combustion/reactingFoam/LTSReactingFoam/Make/files @@ -0,0 +1,3 @@ +LTSReactingFoam.C + +EXE = $(FOAM_APPBIN)/LTSReactingFoam diff --git a/applications/solvers/combustion/reactingFoam/LTSReactingFoam/Make/options b/applications/solvers/combustion/reactingFoam/LTSReactingFoam/Make/options new file mode 100644 index 0000000000..abac9d96a4 --- /dev/null +++ b/applications/solvers/combustion/reactingFoam/LTSReactingFoam/Make/options @@ -0,0 +1,28 @@ +EXE_INC = -ggdb3 \ + -I.. \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ + -I$(LIB_SRC)/ODE/lnInclude \ + -I$(LIB_SRC)/combustionModels/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -lfvOptions \ + -lmeshTools \ + -lsampling \ + -lcompressibleTurbulenceModel \ + -lcompressibleRASModels \ + -lcompressibleLESModels \ + -lreactionThermophysicalModels \ + -lspecie \ + -lfluidThermophysicalModels \ + -lchemistryModel \ + -lODE \ + -lcombustionModels diff --git a/applications/solvers/combustion/reactingFoam/LTSReactingFoam/readTimeControls.H b/applications/solvers/combustion/reactingFoam/LTSReactingFoam/readTimeControls.H new file mode 100644 index 0000000000..2a6dd6f345 --- /dev/null +++ b/applications/solvers/combustion/reactingFoam/LTSReactingFoam/readTimeControls.H @@ -0,0 +1,48 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 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 . + +\*---------------------------------------------------------------------------*/ + +// Maximum flow Courant number +scalar maxCo(readScalar(pimple.dict().lookup("maxCo"))); + +// Maximum time scale +scalar maxDeltaT(pimple.dict().lookupOrDefault("maxDeltaT", GREAT)); + +// Smoothing parameter (0-1) when smoothing iterations > 0 +scalar rDeltaTSmoothingCoeff +( + pimple.dict().lookupOrDefault("rDeltaTSmoothingCoeff", 0.1) +); + +// Damping coefficient (1-0) +scalar rDeltaTDampingCoeff +( + pimple.dict().lookupOrDefault("rDeltaTDampingCoeff", 1.0) +); + +// Maximum change in cell temperature per iteration (relative to previous value) +scalar alphaTemp(pimple.dict().lookupOrDefault("alphaTemp", 0.5)); + + +// ************************************************************************* // diff --git a/applications/solvers/combustion/reactingFoam/LTSReactingFoam/setInitialrDeltaT.H b/applications/solvers/combustion/reactingFoam/LTSReactingFoam/setInitialrDeltaT.H new file mode 100644 index 0000000000..c445eaee71 --- /dev/null +++ b/applications/solvers/combustion/reactingFoam/LTSReactingFoam/setInitialrDeltaT.H @@ -0,0 +1,14 @@ + volScalarField rDeltaT + ( + IOobject + ( + "rDeltaT", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("one", dimless/dimTime, 1), + zeroGradientFvPatchScalarField::typeName + ); diff --git a/applications/solvers/combustion/reactingFoam/LTSReactingFoam/setrDeltaT.H b/applications/solvers/combustion/reactingFoam/LTSReactingFoam/setrDeltaT.H new file mode 100644 index 0000000000..ce1caf1de5 --- /dev/null +++ b/applications/solvers/combustion/reactingFoam/LTSReactingFoam/setrDeltaT.H @@ -0,0 +1,97 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 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 . + +\*---------------------------------------------------------------------------*/ + +{ + Info<< "Time scales min/max:" << endl; + + // Cache old reciprocal time scale field + volScalarField rDeltaT0("rDeltaT0", rDeltaT); + + // Flow time scale + { + rDeltaT.dimensionedInternalField() = + ( + fvc::surfaceSum(mag(phi))().dimensionedInternalField() + /((2*maxCo)*mesh.V()*rho.dimensionedInternalField()) + ); + + // Limit the largest time scale + rDeltaT.max(1/maxDeltaT); + + Info<< " Flow = " + << gMin(1/rDeltaT.internalField()) << ", " + << gMax(1/rDeltaT.internalField()) << endl; + } + + // Reaction source time scale + if (alphaTemp < 1.0) + { + volScalarField::DimensionedInternalField rDeltaTT + ( + mag(reaction->Sh())/(alphaTemp*rho*thermo.Cp()*T) + ); + + Info<< " Temperature = " + << gMin(1/(rDeltaTT.field() + VSMALL)) << ", " + << gMax(1/(rDeltaTT.field() + VSMALL)) << endl; + + rDeltaT.dimensionedInternalField() = max + ( + rDeltaT.dimensionedInternalField(), + rDeltaTT + ); + } + + // Update tho boundary values of the reciprocal time-step + rDeltaT.correctBoundaryConditions(); + + // Spatially smooth the time scale field + if (rDeltaTSmoothingCoeff < 1.0) + { + fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff); + } + + // Limit rate of change of time scale + // - reduce as much as required + // - only increase at a fraction of old time scale + if + ( + rDeltaTDampingCoeff < 1.0 + && runTime.timeIndex() > runTime.startTimeIndex() + 1 + ) + { + rDeltaT = max + ( + rDeltaT, + (scalar(1.0) - rDeltaTDampingCoeff)*rDeltaT0 + ); + } + + Info<< " Overall = " + << gMin(1/rDeltaT.internalField()) + << ", " << gMax(1/rDeltaT.internalField()) << endl; +} + +// ************************************************************************* // From 2e846f260da3f6591f323ab44e88a47a394f6fbc Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 26 Sep 2013 22:39:15 +0100 Subject: [PATCH 02/11] Minor clean-up --- applications/solvers/combustion/reactingFoam/EEqn.H | 1 - 1 file changed, 1 deletion(-) diff --git a/applications/solvers/combustion/reactingFoam/EEqn.H b/applications/solvers/combustion/reactingFoam/EEqn.H index 56ddf867e7..9267c9a9be 100644 --- a/applications/solvers/combustion/reactingFoam/EEqn.H +++ b/applications/solvers/combustion/reactingFoam/EEqn.H @@ -16,7 +16,6 @@ : -dpdt ) - fvm::laplacian(turbulence->alphaEff(), he) -// - fvm::laplacian(turbulence->muEff(), he) // unit lewis no. == reaction->Sh() + fvOptions(rho, he) From ca6fb0326068a04c13f55965a91b69359c791b25 Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 26 Sep 2013 22:39:39 +0100 Subject: [PATCH 03/11] LTSInterFoam: Improved temporal damping --- .../multiphase/interFoam/LTSInterFoam/setrDeltaT.H | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/setrDeltaT.H b/applications/solvers/multiphase/interFoam/LTSInterFoam/setrDeltaT.H index f419153506..3f8ba982cf 100644 --- a/applications/solvers/multiphase/interFoam/LTSInterFoam/setrDeltaT.H +++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/setrDeltaT.H @@ -121,9 +121,11 @@ && runTime.timeIndex() > runTime.startTimeIndex() + 1 ) { - rDeltaT = - rDeltaT0 - *max(rDeltaT/rDeltaT0, scalar(1.0) - rDeltaTDampingCoeff); + rDeltaT = max + ( + rDeltaT, + (scalar(1.0) - rDeltaTDampingCoeff)*rDeltaT0 + ); Info<< "Damped flow time scale min/max = " << gMin(1/rDeltaT.internalField()) From e19711780599d0b2b212680917012a775b0b5ee6 Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 26 Sep 2013 22:40:13 +0100 Subject: [PATCH 04/11] chemistryModel: removed superfluous time argument to solve --- .../combustion/chemFoam/solveChemistry.H | 6 +---- src/combustionModels/PaSR/PaSR.C | 26 ++++++------------- .../reactingOneDim/reactingOneDim.C | 6 +---- .../basicChemistryModel/basicChemistryModel.H | 6 ++--- .../chemistryModel/chemistryModel.C | 3 +-- .../chemistryModel/chemistryModel.H | 6 ++--- .../pyrolysisChemistryModel.C | 3 +-- .../pyrolysisChemistryModel.H | 6 ++--- .../solidChemistryModel/solidChemistryModel.H | 6 ++--- 9 files changed, 24 insertions(+), 44 deletions(-) diff --git a/applications/solvers/combustion/chemFoam/solveChemistry.H b/applications/solvers/combustion/chemFoam/solveChemistry.H index daf56309bd..cb4258c31d 100644 --- a/applications/solvers/combustion/chemFoam/solveChemistry.H +++ b/applications/solvers/combustion/chemFoam/solveChemistry.H @@ -1,7 +1,3 @@ - dtChem = chemistry.solve - ( - runTime.value() - runTime.deltaT().value(), - runTime.deltaT().value() - ); + dtChem = chemistry.solve(runTime.deltaT().value()); scalar Sh = chemistry.Sh()()[0]/rho[0]; integratedHeat += Sh*runTime.deltaT().value(); diff --git a/src/combustionModels/PaSR/PaSR.C b/src/combustionModels/PaSR/PaSR.C index 8cf2f03171..7bf26a18cb 100644 --- a/src/combustionModels/PaSR/PaSR.C +++ b/src/combustionModels/PaSR/PaSR.C @@ -81,16 +81,15 @@ void Foam::combustionModels::PaSR::correct() { if (this->active()) { - const scalar t = this->mesh().time().value(); const scalar dt = this->mesh().time().deltaTValue(); - if (!useReactionRate_) + if (useReactionRate_) { - this->chemistryPtr_->solve(t - dt, dt); + this->chemistryPtr_->calculate(); } else { - this->chemistryPtr_->calculate(); + this->chemistryPtr_->solve(dt); } if (turbulentReaction_) @@ -107,24 +106,15 @@ void Foam::combustionModels::PaSR::correct() forAll(epsilon, i) { - if (epsilon[i] > 0) - { - scalar tk = - Cmix_*Foam::sqrt(muEff[i]/rho[i]/(epsilon[i] + SMALL)); + scalar tk = + Cmix_*Foam::sqrt(muEff[i]/rho[i]/(epsilon[i] + SMALL)); - // Chalmers PaSR model - if (!useReactionRate_) - { - kappa_[i] = (dt + tc[i])/(dt + tc[i] + tk); - } - else - { - kappa_[i] = tc[i]/(tc[i] + tk); - } + if (tk > SMALL) + { + kappa_[i] = tc[i]/(tc[i] + tk); } else { - // Return to laminar combustion kappa_[i] = 1.0; } } diff --git a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C index 1e6a30627e..b98417e52a 100644 --- a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C +++ b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C @@ -691,11 +691,7 @@ void reactingOneDim::evolveRegion() if (useChemistrySolvers_) { - solidChemistry_->solve - ( - time().value() - time().deltaTValue(), - time().deltaTValue() - ); + solidChemistry_->solve(time().deltaTValue()); } else { diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H index 75ea14eb67..f7143df63f 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H @@ -152,9 +152,9 @@ public: //- Calculates the reaction rates virtual void calculate() = 0; - //- Solve the reaction system for the given start time and - // timestep and return the characteristic time - virtual scalar solve(const scalar t0, const scalar deltaT) = 0; + //- Solve the reaction system for the given time step + // and return the characteristic time + virtual scalar solve(const scalar deltaT) = 0; //- Return the chemical time scale virtual tmp tc() const = 0; diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C index f23a80b6ef..098083b6fd 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C @@ -744,7 +744,6 @@ void Foam::chemistryModel::calculate() template Foam::scalar Foam::chemistryModel::solve ( - const scalar t0, const scalar deltaT ) { @@ -795,7 +794,7 @@ Foam::scalar Foam::chemistryModel::solve c0 = c; // initialise timing parameters - scalar t = t0; + scalar t = 0; scalar tauC = this->deltaTChem_[celli]; scalar dt = min(deltaT, tauC); scalar timeLeft = deltaT; diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.H index 475fc7c8fd..232855d620 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.H @@ -217,9 +217,9 @@ public: const label i ); - //- Solve the reaction system for the given start time and time - // step and return the characteristic time - virtual scalar solve(const scalar t0, const scalar deltaT); + //- Solve the reaction system for the given time step + // and return the characteristic time + virtual scalar solve(const scalar deltaT); //- Return the chemical time scale virtual tmp tc() const; diff --git a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C index 4962bf716b..f5cb38648b 100644 --- a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C +++ b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C @@ -580,7 +580,6 @@ template Foam::scalar Foam::pyrolysisChemistryModel::solve ( - const scalar t0, const scalar deltaT ) { @@ -638,7 +637,7 @@ Foam::pyrolysisChemistryModel::solve c0 = c; - scalar t = t0; + scalar t = 0; scalar tauC = this->deltaTChem_[celli]; scalar dt = min(deltaT, tauC); scalar timeLeft = deltaT; diff --git a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.H b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.H index 7ae76c5233..fd82b4d09a 100644 --- a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.H +++ b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.H @@ -224,9 +224,9 @@ public: const label i ) const; - //- Solve the reaction system for the given start time and time - // step and return the characteristic time - virtual scalar solve(const scalar t0, const scalar deltaT) ; + //- Solve the reaction system for the given time step + // and return the characteristic time + virtual scalar solve(const scalar deltaT); // ODE functions (overriding abstract functions in ODE.H) diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H index bf67f1ca4d..93a6833250 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H @@ -214,9 +214,9 @@ public: //- Return total solid source term inline tmp > RRs() const; - //- Solve the reaction system for the given start time and time - // step and return the characteristic time - virtual scalar solve(const scalar t0, const scalar deltaT) = 0; + //- Solve the reaction system for the given time step + // and return the characteristic time + virtual scalar solve(const scalar deltaT) = 0; //- Return the chemical time scale virtual tmp tc() const; From 5d7f39b60afe1ffb9d9d5648a865d6d832231e2f Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 26 Sep 2013 22:40:51 +0100 Subject: [PATCH 05/11] tutorials/combustion/reactingFoam/ras/counterFlowFlame2D: Changed p BCs to totalPressure to avoid unstable entrainment --- .../reactingFoam/ras/counterFlowFlame2D/0/p | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/p b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/p index 79f071ce31..deca9ba60d 100644 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/p +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/p @@ -29,14 +29,16 @@ boundaryField { type zeroGradient; } - inlet2 - { - type zeroGradient; - } outlet { - type fixedValue; - value uniform 1e5; + type totalPressure; + p0 $internalField; + U U; + phi phi; + rho none; + psi none; + gamma 1; + value $internalField; } frontAndBack { From 3004606a5a2282f484e0cdb221cbe18a1db94e0e Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 26 Sep 2013 22:41:44 +0100 Subject: [PATCH 06/11] tutorials/combustion/reactingFoam/ras/counterFlowFlame2D: Improved solver selection --- .../ras/counterFlowFlame2D/system/fvSolution | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution index fe09f9434a..7491893cc3 100644 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution @@ -17,19 +17,9 @@ FoamFile solvers { - rho + "rho.*" { - solver PCG; - preconditioner DIC; - tolerance 1e-06; - relTol 0.1; - } - - rhoFinal - { - $rho; - tolerance 1e-06; - relTol 0; + solver diagonal; } p @@ -51,15 +41,13 @@ solvers { solver PBiCG; preconditioner DILU; - tolerance 1e-06; + tolerance 1e-6; relTol 0.1; } "(U|h|k|epsilon)Final" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; + $U; relTol 0; } From ff2a2747700b86bec6b36bd9fe69b70cd0028b0d Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 26 Sep 2013 22:46:25 +0100 Subject: [PATCH 07/11] tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D: new tutorial --- .../ras/counterFlowFlame2D/0/CH4 | 48 +++++++ .../ras/counterFlowFlame2D/0/CO2 | 48 +++++++ .../ras/counterFlowFlame2D/0/H2O | 48 +++++++ .../ras/counterFlowFlame2D/0/N2 | 48 +++++++ .../ras/counterFlowFlame2D/0/O2 | 47 +++++++ .../ras/counterFlowFlame2D/0/T | 48 +++++++ .../ras/counterFlowFlame2D/0/U | 45 ++++++ .../ras/counterFlowFlame2D/0/Ydefault | 48 +++++++ .../ras/counterFlowFlame2D/0/alphat | 45 ++++++ .../ras/counterFlowFlame2D/0/epsilon | 45 ++++++ .../ras/counterFlowFlame2D/0/k | 45 ++++++ .../ras/counterFlowFlame2D/0/mut | 45 ++++++ .../ras/counterFlowFlame2D/0/p | 50 +++++++ .../ras/counterFlowFlame2D/0/rho | 46 +++++++ .../counterFlowFlame2D/constant/RASProperties | 25 ++++ .../constant/chemistryProperties | 46 +++++++ .../constant/combustionProperties | 29 ++++ .../ras/counterFlowFlame2D/constant/g | 22 +++ .../constant/polyMesh/blockMeshDict | 82 +++++++++++ .../constant/polyMesh/boundary | 47 +++++++ .../ras/counterFlowFlame2D/constant/reactions | 20 +++ .../constant/thermo.compressibleGas | 129 ++++++++++++++++++ .../constant/thermophysicalProperties | 38 ++++++ .../constant/turbulenceProperties | 21 +++ .../ras/counterFlowFlame2D/system/controlDict | 48 +++++++ .../ras/counterFlowFlame2D/system/fvSchemes | 64 +++++++++ .../ras/counterFlowFlame2D/system/fvSolution | 86 ++++++++++++ 27 files changed, 1313 insertions(+) create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/CH4 create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/CO2 create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/H2O create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/N2 create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/O2 create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/T create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/U create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/Ydefault create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/alphat create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/epsilon create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/k create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/mut create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/p create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/rho create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/RASProperties create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/combustionProperties create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/g create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/polyMesh/blockMeshDict create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/polyMesh/boundary create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/reactions create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/thermo.compressibleGas create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/controlDict create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/fvSchemes create mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/fvSolution diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/CH4 b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/CH4 new file mode 100644 index 0000000000..15dd5eddf1 --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/CH4 @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object CH4; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 1.0; + } + air + { + type fixedValue; + value uniform 0.0; + } + outlet + { + type inletOutlet; + inletValue uniform 0.0; + value uniform 0.0; + + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/CO2 b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/CO2 new file mode 100644 index 0000000000..2fef379ec7 --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/CO2 @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object CO2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 0; + } + air + { + type fixedValue; + value uniform 0; + } + outlet + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/H2O b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/H2O new file mode 100644 index 0000000000..ca22735630 --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/H2O @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object H2O; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 0; + } + air + { + type fixedValue; + value uniform 0; + } + outlet + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/N2 b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/N2 new file mode 100644 index 0000000000..8b2b2e8b5d --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/N2 @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object O2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 1; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 0.0; + } + air + { + type fixedValue; + value uniform 0.77; + } + outlet + { + type inletOutlet; + inletValue uniform 1; + value uniform 1; + + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/O2 b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/O2 new file mode 100644 index 0000000000..95649fdac4 --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/O2 @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object O2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 0.0; + } + air + { + type fixedValue; + value uniform 0.23; + } + outlet + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/T b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/T new file mode 100644 index 0000000000..d5d567628e --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/T @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 293; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 800; + } + air + { + type fixedValue; + value uniform 800; + } + outlet + { + type inletOutlet; + inletValue uniform 293; + value uniform 293; + + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/U b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/U new file mode 100644 index 0000000000..27773aea2b --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/U @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + fuel + { + type fixedValue; + value uniform (0.1 0 0); + } + air + { + type fixedValue; + value uniform (-0.1 0 0); + } + outlet + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/Ydefault b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/Ydefault new file mode 100644 index 0000000000..96004af717 --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/Ydefault @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object Ydefault; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 0.0; + } + air + { + type fixedValue; + value uniform 0.0; + } + outlet + { + type inletOutlet; + inletValue uniform 0.0; + value uniform 0.0; + + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/alphat b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/alphat new file mode 100644 index 0000000000..c74018bbdb --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/alphat @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 0; + } + air + { + type fixedValue; + value uniform 0; + } + outlet + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/epsilon b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/epsilon new file mode 100644 index 0000000000..ad65f7ea0f --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/epsilon @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 50; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 1e-05; + } + air + { + type fixedValue; + value uniform 1e-05; + } + outlet + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/k b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/k new file mode 100644 index 0000000000..3dcedaa2da --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/k @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 3.75e-05; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 3.75e-05; + } + air + { + type fixedValue; + value uniform 3.75e-05; + } + outlet + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/mut b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/mut new file mode 100644 index 0000000000..47d65d567d --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/mut @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object mut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + fuel + { + type fixedValue; + value uniform 0; + } + air + { + type fixedValue; + value uniform 0; + } + outlet + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/p b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/p new file mode 100644 index 0000000000..deca9ba60d --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/p @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + fuel + { + type zeroGradient; + } + air + { + type zeroGradient; + } + outlet + { + type totalPressure; + p0 $internalField; + U U; + phi phi; + rho none; + psi none; + gamma 1; + value $internalField; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/rho b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/rho new file mode 100644 index 0000000000..d1620aaeb0 --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/rho @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object rho; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -3 0 0 0 0 0]; + +internalField uniform 1.18001; + +boundaryField +{ + fuel + { + type calculated; + value uniform 0.243121; + } + air + { + type calculated; + value uniform 0.438564; + } + outlet + { + type calculated; + value uniform 1.18001; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/RASProperties b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/RASProperties new file mode 100644 index 0000000000..a4937b503a --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/RASProperties @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RASModel kEpsilon; + +turbulence on; + +printCoeffs on; + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties new file mode 100644 index 0000000000..3ce48f2eab --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object chemistryProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +chemistryType +{ + chemistrySolver ode; + chemistryThermo psi; +} + +chemistry on; + +initialChemicalTimeStep 1e-07; + +sequentialCoeffs +{ + cTauChem 0.001; +} + +EulerImplicitCoeffs +{ + cTauChem 0.05; + equilibriumRateLimiter off; +} + +odeCoeffs +{ + solver SIBS; + eps 0.05; + scale 1; +} + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/combustionProperties b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/combustionProperties new file mode 100644 index 0000000000..9c283d5933 --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/combustionProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object combustionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +combustionModel PaSR; + +active true; + +PaSRCoeffs +{ + Cmix 0.1; + turbulentReaction off; +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/g b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/g new file mode 100644 index 0000000000..057403310a --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value ( 0 0 0 ); + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/polyMesh/blockMeshDict b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000..3683ab3388 --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/polyMesh/blockMeshDict @@ -0,0 +1,82 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (0.0 -0.01 -0.01) + (0.02 -0.01 -0.01) + (0.02 0.01 -0.01) + (0.0 0.01 -0.01) + (0.0 -0.01 0.01) + (0.02 -0.01 0.01) + (0.02 0.01 0.01) + (0.0 0.01 0.01) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (100 40 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + fuel + { + type patch; + faces + ( + (0 4 7 3) + ); + } + air + { + type patch; + faces + ( + (1 2 6 5) + ); + } + outlet + { + type patch; + faces + ( + (0 1 5 4) + (7 6 2 3) + ); + } + frontAndBack + { + type empty; + faces + ( + (4 5 6 7) + (0 3 2 1) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/polyMesh/boundary b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/polyMesh/boundary new file mode 100644 index 0000000000..4ba3243474 --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/polyMesh/boundary @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +4 +( + fuel + { + type patch; + nFaces 40; + startFace 7860; + } + air + { + type patch; + nFaces 40; + startFace 7900; + } + outlet + { + type patch; + nFaces 200; + startFace 7940; + } + frontAndBack + { + type empty; + inGroups 1(empty); + nFaces 8000; + startFace 8140; + } +) + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/reactions b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/reactions new file mode 100644 index 0000000000..e548bae90f --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/reactions @@ -0,0 +1,20 @@ +species +( + O2 + H2O + CH4 + CO2 + N2 +); + +reactions +{ + methaneReaction + { + type irreversibleArrheniusReaction; + reaction "CH4 + 2O2 = CO2 + 2H2O"; + A 5.2e16; + beta 0; + Ta 14906; + } +} diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/thermo.compressibleGas b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/thermo.compressibleGas new file mode 100644 index 0000000000..ff00e560b4 --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/thermo.compressibleGas @@ -0,0 +1,129 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermo.compressibleGas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +O2 +{ + specie + { + nMoles 1; + molWeight 31.9988; + } + thermodynamics + { + Tlow 200; + Thigh 5000; + Tcommon 1000; + highCpCoeffs ( 3.69758 0.00061352 -1.25884e-07 1.77528e-11 -1.13644e-15 -1233.93 3.18917 ); + lowCpCoeffs ( 3.21294 0.00112749 -5.75615e-07 1.31388e-09 -8.76855e-13 -1005.25 6.03474 ); + } + transport + { + As 1.67212e-06; + Ts 170.672; + } +} + +H2O +{ + specie + { + nMoles 1; + molWeight 18.0153; + } + thermodynamics + { + Tlow 200; + Thigh 5000; + Tcommon 1000; + highCpCoeffs ( 2.67215 0.00305629 -8.73026e-07 1.201e-10 -6.39162e-15 -29899.2 6.86282 ); + lowCpCoeffs ( 3.38684 0.00347498 -6.3547e-06 6.96858e-09 -2.50659e-12 -30208.1 2.59023 ); + } + transport + { + As 1.67212e-06; + Ts 170.672; + } +} + +CH4 +{ + specie + { + nMoles 1; + molWeight 16.0428; + } + thermodynamics + { + Tlow 200; + Thigh 6000; + Tcommon 1000; + highCpCoeffs ( 1.63543 0.0100844 -3.36924e-06 5.34973e-10 -3.15528e-14 -10005.6 9.9937 ); + lowCpCoeffs ( 5.14988 -0.013671 4.91801e-05 -4.84744e-08 1.66694e-11 -10246.6 -4.64132 ); + } + transport + { + As 1.67212e-06; + Ts 170.672; + } +} + +CO2 +{ + specie + { + nMoles 1; + molWeight 44.01; + } + thermodynamics + { + Tlow 200; + Thigh 5000; + Tcommon 1000; + highCpCoeffs ( 4.45362 0.00314017 -1.27841e-06 2.394e-10 -1.66903e-14 -48967 -0.955396 ); + lowCpCoeffs ( 2.27572 0.00992207 -1.04091e-05 6.86669e-09 -2.11728e-12 -48373.1 10.1885 ); + } + transport + { + As 1.67212e-06; + Ts 170.672; + } +} + +N2 +{ + specie + { + nMoles 1; + molWeight 28.0134; + } + thermodynamics + { + Tlow 200; + Thigh 5000; + Tcommon 1000; + highCpCoeffs ( 2.92664 0.00148798 -5.68476e-07 1.0097e-10 -6.75335e-15 -922.798 5.98053 ); + lowCpCoeffs ( 3.29868 0.00140824 -3.96322e-06 5.64152e-09 -2.44486e-12 -1020.9 3.95037 ); + } + transport + { + As 1.67212e-06; + Ts 170.672; + } +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties new file mode 100644 index 0000000000..ae01272133 --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties @@ -0,0 +1,38 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type hePsiThermo; + mixture reactingMixture; + transport sutherland; + thermo janaf; + energy sensibleEnthalpy; + equationOfState perfectGas; + specie specie; +} + +inertSpecie N2; + +chemistryReader foamChemistryReader; + +foamChemistryFile "$FOAM_CASE/constant/reactions"; + +foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas"; + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties new file mode 100644 index 0000000000..3721a46a2e --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RASModel; + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/controlDict b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/controlDict new file mode 100644 index 0000000000..0d03157b2e --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/controlDict @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application LTSReactingFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 1000; + +deltaT 1; + +writeControl runTime; + +writeInterval 10; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/fvSchemes b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/fvSchemes new file mode 100644 index 0000000000..c6a1eaf354 --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/fvSchemes @@ -0,0 +1,64 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default localEuler rDeltaT; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + + div(phi,U) Gauss limitedLinearV 1; + div(phi,Yi_h) Gauss limitedLinear01 1; + div(phi,h) Gauss limitedLinear 1; + div(phi,K) Gauss limitedLinear 1; + div(phid,p) Gauss limitedLinear 1; + div(phi,epsilon) Gauss limitedLinear 1; + div(phi,k) Gauss limitedLinear 1; + div((muEff*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + +fluxRequired +{ + default no; + p; +} + + +// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/fvSolution b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/fvSolution new file mode 100644 index 0000000000..fee0060b3d --- /dev/null +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/fvSolution @@ -0,0 +1,86 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "rho.*" + { + solver diagonal; + } + + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-6; + relTol 0.1; + } + + pFinal + { + $p; + relTol 0; + } + + "(U|h|k|epsilon)" + { + solver BICCG; + preconditioner DILU; + tolerance 1e-06; + relTol 0.1; + } + + "(U|h|k|epsilon)Final" + { + $U; + relTol 0.1; + } + + Yi + { + $U; + relTol 0.1; + } +} + +PIMPLE +{ + momentumPredictor no; + nOuterCorrectors 1; + nCorrectors 1; + nNonOrthogonalCorrectors 0; + + maxDeltaT 1e-2; + maxCo 0.2; + alphaTemp 1; + rDeltaTSmoothingCoeff 0.2; + rDeltaTDampingCoeff 0.2; +} + +relaxationFactors +{ + fields + { + } + equations + { + ".*" 1; + } +} + + +// ************************************************************************* // From 51b4035dbe1c5f832c6443d60ecc162eaa9a569c Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 27 Sep 2013 09:15:44 +0100 Subject: [PATCH 08/11] COMP: foamyQuadMesh: build order --- .../utilities/mesh/generation/Allwmake | 18 ++++++++++++++++++ .../mesh/generation/foamyQuadMesh/Allwmake | 4 +++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 applications/utilities/mesh/generation/Allwmake diff --git a/applications/utilities/mesh/generation/Allwmake b/applications/utilities/mesh/generation/Allwmake new file mode 100755 index 0000000000..8f7cbada96 --- /dev/null +++ b/applications/utilities/mesh/generation/Allwmake @@ -0,0 +1,18 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +set -x + +wmake all blockMesh +wmake all extrude +wmake all extrude2DMesh +wmake all snappyHexMesh + +if [ -d "$CGAL_ARCH_PATH" ] +then + wmake libso foamyHexMesh/conformalVoronoiMesh + wmake all foamyHexMesh + wmake all foamyQuadMesh +fi + + +# ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake b/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake index 3620addd38..18fc1e952a 100755 --- a/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake +++ b/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake @@ -4,7 +4,9 @@ set -x if [ -d "$CGAL_ARCH_PATH" ] then - wmake libso ../foamyHexMesh/conformalVoronoiMesh + #- Already built by ../Allwake + #wmake libso ../foamyHexMesh/conformalVoronoiMesh + wmake libso conformalVoronoi2DMesh wmake fi From 317bf2fbd92a2ee0f30ed2f79db87b1c06972a02 Mon Sep 17 00:00:00 2001 From: Henry Date: Fri, 27 Sep 2013 12:41:46 +0100 Subject: [PATCH 09/11] src/combustionModels/laminar: new model --- src/combustionModels/Make/files | 3 +- src/combustionModels/laminar/laminar.C | 188 ++++++++++++++++++++++++ src/combustionModels/laminar/laminar.H | 128 ++++++++++++++++ src/combustionModels/laminar/laminars.C | 44 ++++++ 4 files changed, 362 insertions(+), 1 deletion(-) create mode 100644 src/combustionModels/laminar/laminar.C create mode 100644 src/combustionModels/laminar/laminar.H create mode 100644 src/combustionModels/laminar/laminars.C diff --git a/src/combustionModels/Make/files b/src/combustionModels/Make/files index 88e81afe8b..b68fbb742f 100644 --- a/src/combustionModels/Make/files +++ b/src/combustionModels/Make/files @@ -15,6 +15,8 @@ infinitelyFastChemistry/infinitelyFastChemistrys.C PaSR/PaSRs.C +laminar/laminars.C + FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C @@ -25,4 +27,3 @@ FSD/FSDs.C noCombustion/noCombustions.C LIB = $(FOAM_LIBBIN)/libcombustionModels - diff --git a/src/combustionModels/laminar/laminar.C b/src/combustionModels/laminar/laminar.C new file mode 100644 index 0000000000..b7a40921e9 --- /dev/null +++ b/src/combustionModels/laminar/laminar.C @@ -0,0 +1,188 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 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 . + +\*---------------------------------------------------------------------------*/ + +#include "laminar.H" +#include "fvmSup.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::combustionModels::laminar::laminar +( + const word& modelType, + const fvMesh& mesh +) +: + Type(modelType, mesh), + integrateReactionRate_ + ( + this->coeffs().lookupOrDefault("integrateReactionRate", true) + ) +{ + if (integrateReactionRate_) + { + Info<< " using integrated reaction rate" << endl; + } + else + { + Info<< " using instantaneous reaction rate" << endl; + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template +Foam::combustionModels::laminar::~laminar() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +template +Foam::tmp +Foam::combustionModels::laminar::tc() const +{ + return this->chemistryPtr_->tc(); +} + + +template +void Foam::combustionModels::laminar::correct() +{ + if (this->active()) + { + if (integrateReactionRate_) + { + this->chemistryPtr_->solve(this->mesh().time().deltaTValue()); + } + else + { + this->chemistryPtr_->calculate(); + } + } +} + + +template +Foam::tmp +Foam::combustionModels::laminar::R(volScalarField& Y) const +{ + tmp tSu(new fvScalarMatrix(Y, dimMass/dimTime)); + + fvScalarMatrix& Su = tSu(); + + if (this->active()) + { + const label specieI = this->thermo().composition().species()[Y.name()]; + + Su += this->chemistryPtr_->RR(specieI); + } + + return tSu; +} + + +template +Foam::tmp +Foam::combustionModels::laminar::dQ() const +{ + tmp tdQ + ( + new volScalarField + ( + IOobject + ( + typeName + ":dQ", + this->mesh().time().timeName(), + this->mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh(), + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0), + zeroGradientFvPatchScalarField::typeName + ) + ); + + if (this->active()) + { + tdQ() = this->chemistryPtr_->dQ(); + } + + return tdQ; +} + + +template +Foam::tmp +Foam::combustionModels::laminar::Sh() const +{ + tmp tSh + ( + new volScalarField + ( + IOobject + ( + typeName + ":Sh", + this->mesh().time().timeName(), + this->mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh(), + dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0), + zeroGradientFvPatchScalarField::typeName + ) + ); + + if (this->active()) + { + tSh() = this->chemistryPtr_->Sh(); + } + + return tSh; +} + + +template +bool Foam::combustionModels::laminar::read() +{ + if (Type::read()) + { + this->coeffs().lookup("integrateReactionRate") + >> integrateReactionRate_; + return true; + } + else + { + return false; + } +} + + +// ************************************************************************* // diff --git a/src/combustionModels/laminar/laminar.H b/src/combustionModels/laminar/laminar.H new file mode 100644 index 0000000000..25e086d81c --- /dev/null +++ b/src/combustionModels/laminar/laminar.H @@ -0,0 +1,128 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 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 . + +Class + Foam::combustionModels::laminar + +Description + Laminar combustion model. + +SourceFiles + laminar.C + +\*---------------------------------------------------------------------------*/ + +#ifndef laminar_H +#define laminar_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace combustionModels +{ + +/*---------------------------------------------------------------------------*\ + Class laminar Declaration +\*---------------------------------------------------------------------------*/ + +template +class laminar +: + public Type +{ + // Private data + + //- Integrate reaction rate over the time-step + // using the selected ODE solver + bool integrateReactionRate_; + + + // Private Member Functions + + //- Return the chemical time scale + tmp tc() const; + + //- Disallow copy construct + laminar(const laminar&); + + //- Disallow default bitwise assignment + void operator=(const laminar&); + + +public: + + //- Runtime type information + TypeName("laminar"); + + + // Constructors + + //- Construct from components + laminar(const word& modelType, const fvMesh& mesh); + + + //- Destructor + virtual ~laminar(); + + + // Member Functions + + // Evolution + + //- Correct combustion rate + virtual void correct(); + + //- Fuel consumption rate matrix. + virtual tmp R(volScalarField& Y) const; + + //- Heat release rate calculated from fuel consumption rate matrix + virtual tmp dQ() const; + + //- Return source for enthalpy equation [kg/m/s3] + virtual tmp Sh() const; + + + // I-O + + //- Update properties from given dictionary + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace combustionModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "laminar.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/combustionModels/laminar/laminars.C b/src/combustionModels/laminar/laminars.C new file mode 100644 index 0000000000..1c7d5526c9 --- /dev/null +++ b/src/combustionModels/laminar/laminars.C @@ -0,0 +1,44 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 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 . + +\*---------------------------------------------------------------------------*/ + +#include "makeCombustionTypes.H" + +#include "psiChemistryCombustion.H" +#include "rhoChemistryCombustion.H" +#include "laminar.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace combustionModels +{ + makeCombustionTypes(laminar, psiChemistryCombustion, psiCombustionModel); + makeCombustionTypes(laminar, rhoChemistryCombustion, rhoCombustionModel); +} +} + + +// ************************************************************************* // From 25751cf413845f730d06660eb46c345f051d33f8 Mon Sep 17 00:00:00 2001 From: Henry Date: Fri, 27 Sep 2013 12:42:17 +0100 Subject: [PATCH 10/11] combustionModels/PaSR/PaSR: Changed useReactionRate to !integrateReactionRate --- src/combustionModels/PaSR/PaSR.C | 22 +++++++++++++++------- src/combustionModels/PaSR/PaSR.H | 5 +++-- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/combustionModels/PaSR/PaSR.C b/src/combustionModels/PaSR/PaSR.C index 7bf26a18cb..14ae46a112 100644 --- a/src/combustionModels/PaSR/PaSR.C +++ b/src/combustionModels/PaSR/PaSR.C @@ -51,11 +51,18 @@ Foam::combustionModels::PaSR::PaSR mesh, dimensionedScalar("kappa", dimless, 0.0) ), - useReactionRate_(this->coeffs().lookupOrDefault("useReactionRate", false)) + integrateReactionRate_ + ( + this->coeffs().lookupOrDefault("integrateReactionRate", true) + ) { - if (useReactionRate_) + if (integrateReactionRate_) { - Info<< " using reaction rate" << endl; + Info<< " using integrated reaction rate" << endl; + } + else + { + Info<< " using instantaneous reaction rate" << endl; } } @@ -83,13 +90,13 @@ void Foam::combustionModels::PaSR::correct() { const scalar dt = this->mesh().time().deltaTValue(); - if (useReactionRate_) + if (integrateReactionRate_) { - this->chemistryPtr_->calculate(); + this->chemistryPtr_->solve(dt); } else { - this->chemistryPtr_->solve(dt); + this->chemistryPtr_->calculate(); } if (turbulentReaction_) @@ -219,7 +226,8 @@ bool Foam::combustionModels::PaSR::read() { this->coeffs().lookup("Cmix") >> Cmix_; this->coeffs().lookup("turbulentReaction") >> turbulentReaction_; - this->coeffs().lookup("useReactionRate") >> useReactionRate_; + this->coeffs().lookup("integrateReactionRate") + >> integrateReactionRate_; return true; } else diff --git a/src/combustionModels/PaSR/PaSR.H b/src/combustionModels/PaSR/PaSR.H index fa6c73eb95..5b4c8d6081 100644 --- a/src/combustionModels/PaSR/PaSR.H +++ b/src/combustionModels/PaSR/PaSR.H @@ -65,8 +65,9 @@ class PaSR //- Mixing parameter volScalarField kappa_; - //- Use reaction rate - bool useReactionRate_; + //- Integrate reaction rate over the time-step + // using the selected ODE solver + bool integrateReactionRate_; // Private Member Functions From a02a1ba64d06362cb2fdd237f4aa51cbc3f2e398 Mon Sep 17 00:00:00 2001 From: Henry Date: Fri, 27 Sep 2013 12:43:28 +0100 Subject: [PATCH 11/11] Updated counterFlowFlame2D tutorials to run laminar --- .../ras/counterFlowFlame2D/0/T | 1 - .../ras/counterFlowFlame2D/0/U | 3 +- .../ras/counterFlowFlame2D/0/epsilon | 45 ------------------ .../ras/counterFlowFlame2D/0/k | 45 ------------------ .../ras/counterFlowFlame2D/0/mut | 45 ------------------ .../ras/counterFlowFlame2D/0/rho | 46 ------------------- .../counterFlowFlame2D/constant/RASProperties | 25 ---------- .../constant/chemistryProperties | 2 +- .../constant/combustionProperties | 6 +-- .../constant/turbulenceProperties | 2 +- .../ras/counterFlowFlame2D/system/controlDict | 2 +- .../ras/counterFlowFlame2D/system/fvSolution | 10 ++-- .../reactingFoam/ras/counterFlowFlame2D/0/T | 1 - .../reactingFoam/ras/counterFlowFlame2D/0/U | 3 +- .../ras/counterFlowFlame2D/0/epsilon | 45 ------------------ .../reactingFoam/ras/counterFlowFlame2D/0/k | 45 ------------------ .../reactingFoam/ras/counterFlowFlame2D/0/mut | 45 ------------------ .../reactingFoam/ras/counterFlowFlame2D/0/rho | 46 ------------------- .../counterFlowFlame2D/constant/RASProperties | 25 ---------- .../constant/chemistryProperties | 2 +- .../constant/combustionProperties | 6 +-- .../constant/turbulenceProperties | 2 +- .../ras/counterFlowFlame2D/system/controlDict | 4 +- .../counterFlowFlame2D/system/controlDict | 4 +- 24 files changed, 22 insertions(+), 438 deletions(-) delete mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/epsilon delete mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/k delete mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/mut delete mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/rho delete mode 100644 tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/RASProperties delete mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/epsilon delete mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/k delete mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/mut delete mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/rho delete mode 100644 tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/RASProperties diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/T b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/T index d5d567628e..fcf963a775 100644 --- a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/T +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/T @@ -36,7 +36,6 @@ boundaryField type inletOutlet; inletValue uniform 293; value uniform 293; - } frontAndBack { diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/U b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/U index 27773aea2b..c235ba3d65 100644 --- a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/U +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/U @@ -33,7 +33,8 @@ boundaryField } outlet { - type zeroGradient; + type pressureInletOutletVelocity; + value $internalField; } frontAndBack { diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/epsilon b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/epsilon deleted file mode 100644 index ad65f7ea0f..0000000000 --- a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/epsilon +++ /dev/null @@ -1,45 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object epsilon; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -3 0 0 0 0]; - -internalField uniform 50; - -boundaryField -{ - fuel - { - type fixedValue; - value uniform 1e-05; - } - air - { - type fixedValue; - value uniform 1e-05; - } - outlet - { - type zeroGradient; - } - frontAndBack - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/k b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/k deleted file mode 100644 index 3dcedaa2da..0000000000 --- a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/k +++ /dev/null @@ -1,45 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object k; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -2 0 0 0 0]; - -internalField uniform 3.75e-05; - -boundaryField -{ - fuel - { - type fixedValue; - value uniform 3.75e-05; - } - air - { - type fixedValue; - value uniform 3.75e-05; - } - outlet - { - type zeroGradient; - } - frontAndBack - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/mut b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/mut deleted file mode 100644 index 47d65d567d..0000000000 --- a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/mut +++ /dev/null @@ -1,45 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object mut; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 -1 -1 0 0 0 0]; - -internalField uniform 0; - -boundaryField -{ - fuel - { - type fixedValue; - value uniform 0; - } - air - { - type fixedValue; - value uniform 0; - } - outlet - { - type zeroGradient; - } - frontAndBack - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/rho b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/rho deleted file mode 100644 index d1620aaeb0..0000000000 --- a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/0/rho +++ /dev/null @@ -1,46 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object rho; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 -3 0 0 0 0 0]; - -internalField uniform 1.18001; - -boundaryField -{ - fuel - { - type calculated; - value uniform 0.243121; - } - air - { - type calculated; - value uniform 0.438564; - } - outlet - { - type calculated; - value uniform 1.18001; - } - frontAndBack - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/RASProperties b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/RASProperties deleted file mode 100644 index a4937b503a..0000000000 --- a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties index 3ce48f2eab..9c00510123 100644 --- a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties @@ -38,7 +38,7 @@ EulerImplicitCoeffs odeCoeffs { - solver SIBS; + solver KRR4; eps 0.05; scale 1; } diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/combustionProperties b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/combustionProperties index 9c283d5933..d5c12209c1 100644 --- a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/combustionProperties +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/combustionProperties @@ -15,14 +15,12 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel PaSR; +combustionModel laminar; active true; -PaSRCoeffs +laminarCoeffs { - Cmix 0.1; - turbulentReaction off; } diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties index 3721a46a2e..c2c3b28a1b 100644 --- a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType laminar; // ************************************************************************* // diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/controlDict b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/controlDict index 0d03157b2e..41925e2e0d 100644 --- a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/controlDict +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/controlDict @@ -29,7 +29,7 @@ deltaT 1; writeControl runTime; -writeInterval 10; +writeInterval 20; purgeWrite 0; diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/fvSolution b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/fvSolution index fee0060b3d..dd9553bd5a 100644 --- a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/fvSolution +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/system/fvSolution @@ -38,9 +38,9 @@ solvers "(U|h|k|epsilon)" { - solver BICCG; + solver PBiCG; preconditioner DILU; - tolerance 1e-06; + tolerance 1e-6; relTol 0.1; } @@ -65,10 +65,10 @@ PIMPLE nNonOrthogonalCorrectors 0; maxDeltaT 1e-2; - maxCo 0.2; + maxCo 0.4; alphaTemp 1; - rDeltaTSmoothingCoeff 0.2; - rDeltaTDampingCoeff 0.2; + rDeltaTSmoothingCoeff 1; + rDeltaTDampingCoeff 1; } relaxationFactors diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/T b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/T index d5d567628e..fcf963a775 100644 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/T +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/T @@ -36,7 +36,6 @@ boundaryField type inletOutlet; inletValue uniform 293; value uniform 293; - } frontAndBack { diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/U b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/U index 27773aea2b..c235ba3d65 100644 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/U +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/U @@ -33,7 +33,8 @@ boundaryField } outlet { - type zeroGradient; + type pressureInletOutletVelocity; + value $internalField; } frontAndBack { diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/epsilon b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/epsilon deleted file mode 100644 index ad65f7ea0f..0000000000 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/epsilon +++ /dev/null @@ -1,45 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object epsilon; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -3 0 0 0 0]; - -internalField uniform 50; - -boundaryField -{ - fuel - { - type fixedValue; - value uniform 1e-05; - } - air - { - type fixedValue; - value uniform 1e-05; - } - outlet - { - type zeroGradient; - } - frontAndBack - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/k b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/k deleted file mode 100644 index 3dcedaa2da..0000000000 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/k +++ /dev/null @@ -1,45 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object k; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -2 0 0 0 0]; - -internalField uniform 3.75e-05; - -boundaryField -{ - fuel - { - type fixedValue; - value uniform 3.75e-05; - } - air - { - type fixedValue; - value uniform 3.75e-05; - } - outlet - { - type zeroGradient; - } - frontAndBack - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/mut b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/mut deleted file mode 100644 index 47d65d567d..0000000000 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/mut +++ /dev/null @@ -1,45 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object mut; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 -1 -1 0 0 0 0]; - -internalField uniform 0; - -boundaryField -{ - fuel - { - type fixedValue; - value uniform 0; - } - air - { - type fixedValue; - value uniform 0; - } - outlet - { - type zeroGradient; - } - frontAndBack - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/rho b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/rho deleted file mode 100644 index d1620aaeb0..0000000000 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/0/rho +++ /dev/null @@ -1,46 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object rho; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 -3 0 0 0 0 0]; - -internalField uniform 1.18001; - -boundaryField -{ - fuel - { - type calculated; - value uniform 0.243121; - } - air - { - type calculated; - value uniform 0.438564; - } - outlet - { - type calculated; - value uniform 1.18001; - } - frontAndBack - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/RASProperties b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/RASProperties deleted file mode 100644 index a4937b503a..0000000000 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/RASProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object RASProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -RASModel kEpsilon; - -turbulence on; - -printCoeffs on; - - -// ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties index 3ce48f2eab..9c00510123 100644 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties @@ -38,7 +38,7 @@ EulerImplicitCoeffs odeCoeffs { - solver SIBS; + solver KRR4; eps 0.05; scale 1; } diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/combustionProperties b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/combustionProperties index 9c283d5933..d5c12209c1 100644 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/combustionProperties +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/combustionProperties @@ -15,14 +15,12 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel PaSR; +combustionModel laminar; active true; -PaSRCoeffs +laminarCoeffs { - Cmix 0.1; - turbulentReaction off; } diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties index 3721a46a2e..c2c3b28a1b 100644 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/turbulenceProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType laminar; // ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/controlDict b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/controlDict index 5c4ae1768d..a87c823f8f 100644 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/controlDict +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/controlDict @@ -17,13 +17,13 @@ FoamFile application reactingFoam; -startFrom latestTime; +startFrom startTime; startTime 0; stopAt endTime; -endTime 0.3; +endTime 0.5; deltaT 1e-6; diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/controlDict b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/controlDict index eb9e326d6d..bb20dffbf2 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/controlDict +++ b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/controlDict @@ -17,13 +17,13 @@ FoamFile application LTSReactingParcelFoam; -startFrom latestTime; +startFrom startTime; startTime 0; stopAt endTime; -endTime 2000; +endTime 10000; deltaT 1;