diff --git a/applications/solvers/combustion/dieselEngineFoam/Make/options b/applications/solvers/combustion/dieselEngineFoam/Make/options index c4d65fa137e5afa137669220ffae425c4d126430..8fdb0c5c33d6d9af10af064876dbea071641d0c9 100644 --- a/applications/solvers/combustion/dieselEngineFoam/Make/options +++ b/applications/solvers/combustion/dieselEngineFoam/Make/options @@ -16,6 +16,7 @@ EXE_INC = \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/engine/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/combustionModels/lnInclude EXE_LIBS = \ -lengine \ @@ -35,4 +36,5 @@ EXE_LIBS = \ -llaminarFlameSpeedModels \ -lchemistryModel \ -lODE \ - -ldistributionModels + -ldistributionModels \ + -lcombustionModels diff --git a/applications/solvers/combustion/dieselEngineFoam/YEqn.H b/applications/solvers/combustion/dieselEngineFoam/YEqn.H index b8d39b4f46f329babb405d32cf0ae14c17c8079c..46d0f364e69f5689c9cc45301696d02ac19a6df1 100644 --- a/applications/solvers/combustion/dieselEngineFoam/YEqn.H +++ b/applications/solvers/combustion/dieselEngineFoam/YEqn.H @@ -10,7 +10,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection ); { - + combustion->correct(); + dQ = combustion->dQ(); label inertIndex = -1; volScalarField Yt(0.0*Y[0]); @@ -20,17 +21,19 @@ tmp<fv::convectionScheme<scalar> > mvConvection { volScalarField& Yi = Y[i]; - solve + fvScalarMatrix YiEqn ( fvm::ddt(rho, Yi) + mvConvection->fvmDiv(phi, Yi) - fvm::laplacian(turbulence->muEff(), Yi) == dieselSpray.evaporationSource(i) - + kappa*chemistry.RR(i), - mesh.solver("Yi") + + combustion->R(Yi) ); + YiEqn.relax(); + YiEqn.solve(mesh.solver("Yi")); + Yi.max(0.0); Yt += Yi; } diff --git a/applications/solvers/combustion/dieselEngineFoam/createFields.H b/applications/solvers/combustion/dieselEngineFoam/createFields.H index 4bd9f1a9160ed8509f062834bf7c72adea75f84c..bbb9000943dd0aef392551be5b1fe2a60156b2fb 100644 --- a/applications/solvers/combustion/dieselEngineFoam/createFields.H +++ b/applications/solvers/combustion/dieselEngineFoam/createFields.H @@ -1,10 +1,14 @@ -Info<< nl << "Reading thermophysicalProperties" << endl; +Info<< "Creating combustion model\n" << endl; -autoPtr<psiChemistryModel> pChemistry +autoPtr<combustionModels::psiChemistryCombustionModel> combustion ( - psiChemistryModel::New(mesh) + combustionModels::psiChemistryCombustionModel::New + ( + mesh + ) ); -psiChemistryModel& chemistry = pChemistry(); + +psiChemistryModel& chemistry = combustion->pChemistry(); hsCombustionThermo& thermo = chemistry.thermo(); @@ -55,20 +59,6 @@ volScalarField& hs = thermo.hs(); #include "compressibleCreatePhi.H" -volScalarField kappa -( - IOobject - ( - "kappa", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - mesh, - dimensionedScalar("zero", dimless, 0.0) -); - Info << "Creating turbulence model.\n" << nl; autoPtr<compressible::turbulenceModel> turbulence ( @@ -81,6 +71,9 @@ autoPtr<compressible::turbulenceModel> turbulence ) ); +// Set the turbulence into the combustion model +combustion->setTurbulence(turbulence()); + Info<< "Creating field DpDt\n" << endl; volScalarField DpDt ( @@ -96,16 +89,16 @@ forAll(Y, i) } fields.add(hs); -DimensionedField<scalar, volMesh> chemistrySh +volScalarField dQ ( IOobject ( - "chemistry::Sh", + "dQ", runTime.timeName(), mesh, IOobject::NO_READ, - IOobject::NO_WRITE + IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0) + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) ); diff --git a/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C b/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C index 94ab9289994012cf5e2a769e94826aecaf59c5b7..807051318fe37329137828e7c5e906f62c2af1dd 100644 --- a/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C +++ b/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C @@ -32,8 +32,8 @@ Description #include "fvCFD.H" #include "engineTime.H" #include "engineMesh.H" -#include "hCombustionThermo.H" #include "turbulenceModel.H" +#include "psiChemistryCombustionModel.H" #include "spray.H" #include "psiChemistryModel.H" #include "chemistrySolver.H" @@ -54,7 +54,6 @@ int main(int argc, char *argv[]) #include "createEngineMesh.H" #include "createFields.H" #include "readGravitationalAcceleration.H" - #include "readCombustionProperties.H" #include "createSpray.H" #include "initContinuityErrs.H" #include "readEngineTimeControls.H" @@ -82,29 +81,6 @@ int main(int argc, char *argv[]) dieselSpray.evolve(); - Info<< "Solving chemistry" << endl; - - chemistry.solve - ( - runTime.value() - runTime.deltaTValue(), - runTime.deltaTValue() - ); - - // turbulent time scale - { - volScalarField tk - ( - Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()) - ); - volScalarField tc(chemistry.tc()); - - // Chalmers PaSR model - kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk); - } - - chemistrySh = kappa*chemistry.Sh()(); - - #include "rhoEqn.H" for (pimple.start(); pimple.loop(); pimple++) @@ -130,10 +106,7 @@ int main(int argc, char *argv[]) rho = thermo.rho(); - if (runTime.write()) - { - chemistry.dQ()().write(); - } + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" diff --git a/applications/solvers/combustion/dieselEngineFoam/hsEqn.H b/applications/solvers/combustion/dieselEngineFoam/hsEqn.H index 7ae59feb8199fc909983ed77cdba242f4d443b6c..7c0b7f9dc3327b65fa9a1a49b8e7e33e2e0a92e3 100644 --- a/applications/solvers/combustion/dieselEngineFoam/hsEqn.H +++ b/applications/solvers/combustion/dieselEngineFoam/hsEqn.H @@ -1,14 +1,21 @@ { - solve + fvScalarMatrix hsEqn ( fvm::ddt(rho, hs) + mvConvection->fvmDiv(phi, hs) - fvm::laplacian(turbulence->alphaEff(), hs) == - DpDt - + dieselSpray.heatTransferSource()().dimensionedInternalField() - + chemistrySh + DpDt + + combustion->Sh() + + dieselSpray.heatTransferSource()() + ); + hsEqn.relax(); + hsEqn.solve(); + thermo.correct(); + + Info<< "min/max(T) = " + << min(T).value() << ", " << max(T).value() << endl; } diff --git a/applications/solvers/combustion/dieselEngineFoam/readCombustionProperties.H b/applications/solvers/combustion/dieselEngineFoam/readCombustionProperties.H deleted file mode 100644 index 84cf9b9756a8ca420c58fdfeb5f64b3fcf6f0843..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/dieselEngineFoam/readCombustionProperties.H +++ /dev/null @@ -1,18 +0,0 @@ -Info<< "Reading combustion properties\n" << endl; - -IOdictionary combustionProperties -( - IOobject - ( - "combustionProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) -); - -dimensionedScalar Cmix -( - combustionProperties.lookup("Cmix") -); diff --git a/applications/solvers/combustion/dieselFoam/Make/options b/applications/solvers/combustion/dieselFoam/Make/options index 124371575d752b3051af50923a0bde4f20fc3609..4083a59e9f6d148b4b2206fd2053b78c874e7383 100644 --- a/applications/solvers/combustion/dieselFoam/Make/options +++ b/applications/solvers/combustion/dieselFoam/Make/options @@ -14,7 +14,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ -I$(LIB_SRC)/../applications/solvers/reactionThermo/XiFoam \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ - -I$(LIB_SRC)/ODE/lnInclude + -I$(LIB_SRC)/ODE/lnInclude \ + -I$(LIB_SRC)/combustionModels/lnInclude EXE_LIBS = \ -lcompressibleTurbulenceModel \ @@ -33,4 +34,5 @@ EXE_LIBS = \ -lchemistryModel \ -lODE \ -ldistributionModels \ - -lfiniteVolume + -lfiniteVolume \ + -lcombustionModels diff --git a/applications/solvers/combustion/dieselFoam/dieselFoam.C b/applications/solvers/combustion/dieselFoam/dieselFoam.C index 7fd74102476c6aab20528e167dfc4ec0b152d2db..45ee55195cd9d5cfa26a3a21ef15e7a6439d532d 100644 --- a/applications/solvers/combustion/dieselFoam/dieselFoam.C +++ b/applications/solvers/combustion/dieselFoam/dieselFoam.C @@ -30,12 +30,11 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hCombustionThermo.H" +#include "psiChemistryCombustionModel.H" #include "turbulenceModel.H" -#include "spray.H" #include "psiChemistryModel.H" #include "chemistrySolver.H" - +#include "spray.H" #include "multivariateScheme.H" #include "IFstream.H" #include "OFstream.H" @@ -52,7 +51,6 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "createFields.H" #include "readGravitationalAcceleration.H" - #include "readCombustionProperties.H" #include "createSpray.H" #include "initContinuityErrs.H" #include "readTimeControls.H" @@ -79,26 +77,6 @@ int main(int argc, char *argv[]) Info<< "Solving chemistry" << endl; - chemistry.solve - ( - runTime.value() - runTime.deltaTValue(), - runTime.deltaTValue() - ); - - // turbulent time scale - { - volScalarField tk - ( - Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()) - ); - volScalarField tc(chemistry.tc()); - - // Chalmers PaSR model - kappa = (runTime.deltaT() + tc)/(runTime.deltaT()+tc+tk); - } - - chemistrySh = kappa*chemistry.Sh()(); - #include "rhoEqn.H" // --- Pressure-velocity PIMPLE corrector loop @@ -124,10 +102,7 @@ int main(int argc, char *argv[]) rho = thermo.rho(); - if (runTime.write()) - { - chemistry.dQ()().write(); - } + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" diff --git a/applications/solvers/combustion/fireFoam/YhsEqn.H b/applications/solvers/combustion/fireFoam/YhsEqn.H index aed41a4431359997c531556cab966fd23d2c514e..299eb64ab7669e20893c3aa614d34e7a66af2653 100644 --- a/applications/solvers/combustion/fireFoam/YhsEqn.H +++ b/applications/solvers/combustion/fireFoam/YhsEqn.H @@ -20,7 +20,6 @@ tmp<fv::convectionScheme<scalar> > mvConvection if (Y[i].name() != inertSpecie) { volScalarField& Yi = Y[i]; - fvScalarMatrix R(combustion->R(Yi)); fvScalarMatrix YiEqn ( @@ -30,7 +29,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection == parcels.SYi(i, Yi) + surfaceFilm.Srho(i) - + R + + combustion->R(Yi) ); YiEqn.relax(); @@ -55,7 +54,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection - fvm::laplacian(turbulence->alphaEff(), hs) == DpDt - + dQ + + combustion->Sh() + radiation->Shs(thermo) + parcels.Sh(hs) + surfaceFilm.Sh() @@ -66,5 +65,6 @@ tmp<fv::convectionScheme<scalar> > mvConvection thermo.correct(); - Info<< "min/max(T) = " << min(T).value() << ", " << max(T).value() << endl; + Info<< "min/max(T) = " + << min(T).value() << ", " << max(T).value() << endl; } diff --git a/applications/solvers/combustion/fireFoam/createFields.H b/applications/solvers/combustion/fireFoam/createFields.H index f1e152dc320b47f428e326350f66aae48c947338..afabd393c74464a69451c860f700aeef2222e759 100644 --- a/applications/solvers/combustion/fireFoam/createFields.H +++ b/applications/solvers/combustion/fireFoam/createFields.H @@ -1,10 +1,16 @@ - Info<< "Reading thermophysical properties\n" << endl; + Info<< "Creating combustion model\n" << endl; - autoPtr<hsCombustionThermo> pThermo + autoPtr<combustionModels::psiCombustionModel> combustion ( - hsCombustionThermo::New(mesh) + combustionModels::psiCombustionModel::New + ( + mesh + ) ); - hsCombustionThermo& thermo = pThermo(); + + Info<< "Reading thermophysical properties\n" << endl; + + hsCombustionThermo& thermo = combustion->thermo(); SLGThermo slgThermo(mesh, thermo); @@ -60,30 +66,8 @@ ) ); - IOdictionary combustionProperties - ( - IOobject - ( - "combustionProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ); - - Info<< "Creating combustion model\n" << endl; - autoPtr<combustionModel> combustion - ( - combustionModel::combustionModel::New - ( - combustionProperties, - thermo, - turbulence(), - phi, - rho - ) - ); + // Set the turbulence into the combustion model + combustion->setTurbulence(turbulence()); volScalarField dQ ( @@ -96,7 +80,7 @@ IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("dQ", dimMass/pow3(dimTime)/dimLength, 0.0) + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) ); Info<< "Creating field DpDt\n" << endl; diff --git a/applications/solvers/combustion/fireFoam/fireFoam.C b/applications/solvers/combustion/fireFoam/fireFoam.C index 7c58a722d1676bfa6a6845e754df62344e9c386a..89968c6e5878160c3b7e32ce45170f2d448f88b4 100644 --- a/applications/solvers/combustion/fireFoam/fireFoam.C +++ b/applications/solvers/combustion/fireFoam/fireFoam.C @@ -38,9 +38,8 @@ Description #include "pyrolysisModel.H" #include "radiationModel.H" #include "SLGThermo.H" -#include "hsCombustionThermo.H" #include "solidChemistryModel.H" -#include "combustionModel.H" +#include "psiCombustionModel.H" #include "pimpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -51,7 +50,6 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" - #include "readChemistryProperties.H" #include "readGravitationalAcceleration.H" #include "createFields.H" #include "createClouds.H" diff --git a/applications/solvers/combustion/fireFoam/readChemistryProperties.H b/applications/solvers/combustion/fireFoam/readChemistryProperties.H deleted file mode 100644 index f0bcf7597fcf71f1e9b8ee2dbc879200a85fa2cc..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/fireFoam/readChemistryProperties.H +++ /dev/null @@ -1,23 +0,0 @@ -Info<< "Reading chemistry properties\n" << endl; - -IOdictionary chemistryProperties -( - IOobject - ( - "chemistryProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) -); - -Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction")); - -dimensionedScalar Cmix("Cmix", dimless, 1.0); - -if (turbulentReaction) -{ - chemistryProperties.lookup("Cmix") >> Cmix; -} diff --git a/applications/solvers/combustion/reactingFoam/Make/options b/applications/solvers/combustion/reactingFoam/Make/options index 6386af8c557fcea5ace76bfe7c203c36ab85cd6e..8eb6d4cabdac7d75a037f5f639685739bdb30b45 100644 --- a/applications/solvers/combustion/reactingFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/Make/options @@ -5,7 +5,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/combustionModels/lnInclude EXE_LIBS = \ -lcompressibleTurbulenceModel \ @@ -16,4 +17,5 @@ EXE_LIBS = \ -lbasicThermophysicalModels \ -lchemistryModel \ -lODE \ - -lfiniteVolume + -lfiniteVolume \ + -lcombustionModels diff --git a/applications/solvers/combustion/reactingFoam/YEqn.H b/applications/solvers/combustion/reactingFoam/YEqn.H index 8d63a12868554b2d7c785d97549537c736ac8fa9..87b25079ff6dc5b31f09a60fbab9345d56aa2bc5 100644 --- a/applications/solvers/combustion/reactingFoam/YEqn.H +++ b/applications/solvers/combustion/reactingFoam/YEqn.H @@ -10,6 +10,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection ); { + combustion->correct(); + dQ = combustion->dQ(); label inertIndex = -1; volScalarField Yt(0.0*Y[0]); @@ -19,16 +21,18 @@ tmp<fv::convectionScheme<scalar> > mvConvection { volScalarField& Yi = Y[i]; - solve + fvScalarMatrix YiEqn ( fvm::ddt(rho, Yi) + mvConvection->fvmDiv(phi, Yi) - fvm::laplacian(turbulence->muEff(), Yi) == - kappa*chemistry.RR(i), - mesh.solver("Yi") + combustion->R(Yi) ); + YiEqn.relax(); + YiEqn.solve(mesh.solver("Yi")); + Yi.max(0.0); Yt += Yi; } diff --git a/applications/solvers/combustion/reactingFoam/chemistry.H b/applications/solvers/combustion/reactingFoam/chemistry.H deleted file mode 100644 index 99f418af6f10ac69b44d08fc2271e2dd79c73fc4..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/reactingFoam/chemistry.H +++ /dev/null @@ -1,44 +0,0 @@ -if (chemistry.chemistry()) -{ - Info<< "Solving chemistry" << endl; - - chemistry.solve - ( - runTime.value() - runTime.deltaTValue(), - runTime.deltaTValue() - ); - - // turbulent time scale - if (turbulentReaction) - { - tmp<volScalarField> tepsilon(turbulence->epsilon()); - const volScalarField& epsilon = tepsilon(); - tmp<volScalarField> tmuEff(turbulence->muEff()); - const volScalarField& muEff = tmuEff(); - tmp<volScalarField> ttc(chemistry.tc()); - const volScalarField& tc = ttc(); - - forAll(epsilon, i) - { - if (epsilon[i] > 0) - { - // Chalmers PaSR model - scalar tk = Cmix.value()*Foam::sqrt(muEff[i]/rho[i]/epsilon[i]); - kappa[i] = - (runTime.deltaTValue() + tc[i]) - /(runTime.deltaTValue() + tc[i] + tk); - } - else - { - // Return to laminar combustion - kappa[i] = 1.0; - } - } - } - else - { - kappa = 1.0; - } - - chemistrySh = kappa*chemistry.Sh()(); -} diff --git a/applications/solvers/combustion/reactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/createFields.H index a2f016e04622295e17aa3c5a67915e5f3feae69c..7cf94f754d9a205246efd838f58564f236aa5c0f 100644 --- a/applications/solvers/combustion/reactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/createFields.H @@ -1,9 +1,14 @@ -Info<< nl << "Reading thermophysicalProperties" << endl; -autoPtr<psiChemistryModel> pChemistry +Info<< "Creating combustion model\n" << endl; + +autoPtr<combustionModels::psiChemistryCombustionModel> combustion ( - psiChemistryModel::New(mesh) + combustionModels::psiChemistryCombustionModel::New + ( + mesh + ) ); -psiChemistryModel& chemistry = pChemistry(); + +psiChemistryModel& chemistry = combustion->pChemistry(); hsCombustionThermo& thermo = chemistry.thermo(); @@ -45,20 +50,6 @@ const volScalarField& T = thermo.T(); #include "compressibleCreatePhi.H" -volScalarField kappa -( - IOobject - ( - "kappa", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - mesh, - dimensionedScalar("zero", dimless, 0.0) -); - Info << "Creating turbulence model.\n" << nl; autoPtr<compressible::turbulenceModel> turbulence ( @@ -71,6 +62,9 @@ autoPtr<compressible::turbulenceModel> turbulence ) ); +// Set the turbulence into the combustion model +combustion->setTurbulence(turbulence()); + Info<< "Creating field DpDt\n" << endl; volScalarField DpDt ( @@ -85,16 +79,16 @@ forAll(Y, i) } fields.add(hs); -DimensionedField<scalar, volMesh> chemistrySh +volScalarField dQ ( IOobject ( - "chemistry::Sh", + "dQ", runTime.timeName(), mesh, IOobject::NO_READ, - IOobject::NO_WRITE + IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0) + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) ); diff --git a/applications/solvers/combustion/reactingFoam/hsEqn.H b/applications/solvers/combustion/reactingFoam/hsEqn.H index e3fa4e7a135adb1539de8d1e548329a8f97c7a06..de1a85fddf5365c2be897aaeff7ffa8a42cd35cc 100644 --- a/applications/solvers/combustion/reactingFoam/hsEqn.H +++ b/applications/solvers/combustion/reactingFoam/hsEqn.H @@ -7,7 +7,7 @@ // - fvm::laplacian(turbulence->muEff(), hs) // unit lewis no. == DpDt - + chemistrySh + + combustion->Sh() ); hsEqn.relax(); diff --git a/applications/solvers/combustion/reactingFoam/reactingFoam.C b/applications/solvers/combustion/reactingFoam/reactingFoam.C index ca156c3f7f305814548a1cfe97c372f9a3b0da92..75fb9ad71d59f5b7cdbf22dc2c88a00c0a728ee0 100644 --- a/applications/solvers/combustion/reactingFoam/reactingFoam.C +++ b/applications/solvers/combustion/reactingFoam/reactingFoam.C @@ -30,10 +30,8 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hCombustionThermo.H" #include "turbulenceModel.H" -#include "psiChemistryModel.H" -#include "chemistrySolver.H" +#include "psiChemistryCombustionModel.H" #include "multivariateScheme.H" #include "pimpleControl.H" @@ -44,7 +42,6 @@ int main(int argc, char *argv[]) #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" - #include "readChemistryProperties.H" #include "readGravitationalAcceleration.H" #include "createFields.H" #include "initContinuityErrs.H" @@ -67,7 +64,6 @@ int main(int argc, char *argv[]) runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; - #include "chemistry.H" #include "rhoEqn.H" for (pimple.start(); pimple.loop(); pimple++) @@ -88,11 +84,6 @@ int main(int argc, char *argv[]) } } - if (runTime.write()) - { - chemistry.dQ()().write(); - } - runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/combustion/reactingFoam/readChemistryProperties.H b/applications/solvers/combustion/reactingFoam/readChemistryProperties.H deleted file mode 100644 index f0bcf7597fcf71f1e9b8ee2dbc879200a85fa2cc..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/reactingFoam/readChemistryProperties.H +++ /dev/null @@ -1,23 +0,0 @@ -Info<< "Reading chemistry properties\n" << endl; - -IOdictionary chemistryProperties -( - IOobject - ( - "chemistryProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) -); - -Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction")); - -dimensionedScalar Cmix("Cmix", dimless, 1.0); - -if (turbulentReaction) -{ - chemistryProperties.lookup("Cmix") >> Cmix; -} diff --git a/applications/solvers/combustion/rhoReactingFoam/Make/options b/applications/solvers/combustion/rhoReactingFoam/Make/options index d6306816fd8174d34268711983ddb53cdb4eb040..5a5df2ed7b6f552e4d6a281f8b0de7cff35470fc 100644 --- a/applications/solvers/combustion/rhoReactingFoam/Make/options +++ b/applications/solvers/combustion/rhoReactingFoam/Make/options @@ -6,7 +6,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(FOAM_SOLVERS)/combustion/reactingFoam + -I$(FOAM_SOLVERS)/combustion/reactingFoam \ + -I$(LIB_SRC)/combustionModels/lnInclude EXE_LIBS = \ @@ -18,4 +19,5 @@ EXE_LIBS = \ -lbasicThermophysicalModels \ -lchemistryModel \ -lODE \ - -lfiniteVolume + -lfiniteVolume \ + -lcombustionModels diff --git a/applications/solvers/combustion/rhoReactingFoam/YEqn.H b/applications/solvers/combustion/rhoReactingFoam/YEqn.H index 8d63a12868554b2d7c785d97549537c736ac8fa9..3a371f035c6ad2c6c64e6f09cf99b0d633eb9734 100644 --- a/applications/solvers/combustion/rhoReactingFoam/YEqn.H +++ b/applications/solvers/combustion/rhoReactingFoam/YEqn.H @@ -10,6 +10,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection ); { + combustion->correct(); + dQ = combustion->dQ(); label inertIndex = -1; volScalarField Yt(0.0*Y[0]); @@ -19,14 +21,13 @@ tmp<fv::convectionScheme<scalar> > mvConvection { volScalarField& Yi = Y[i]; - solve + fvScalarMatrix YiEqn ( fvm::ddt(rho, Yi) + mvConvection->fvmDiv(phi, Yi) - fvm::laplacian(turbulence->muEff(), Yi) == - kappa*chemistry.RR(i), - mesh.solver("Yi") + combustion->R(Yi) ); Yi.max(0.0); diff --git a/applications/solvers/combustion/rhoReactingFoam/createFields.H b/applications/solvers/combustion/rhoReactingFoam/createFields.H index d58e082f5ba433ad1cc0925ebb5c69c114b9fe9b..65860a67eb26605f0501062cdbfbebf9da5949f8 100644 --- a/applications/solvers/combustion/rhoReactingFoam/createFields.H +++ b/applications/solvers/combustion/rhoReactingFoam/createFields.H @@ -1,9 +1,14 @@ -Info<< nl << "Reading thermophysicalProperties" << endl; -autoPtr<rhoChemistryModel> pChemistry +Info<< "Creating combustion model\n" << endl; + +autoPtr<combustionModels::rhoChemistryCombustionModel> combustion ( - rhoChemistryModel::New(mesh) + combustionModels::rhoChemistryCombustionModel::New + ( + mesh + ) ); -rhoChemistryModel& chemistry = pChemistry(); + +rhoChemistryModel& chemistry = combustion->pChemistry(); hsReactionThermo& thermo = chemistry.thermo(); @@ -46,19 +51,6 @@ const volScalarField& T = thermo.T(); #include "compressibleCreatePhi.H" -volScalarField kappa -( - IOobject - ( - "kappa", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - mesh, - dimensionedScalar("zero", dimless, 0.0) -); Info << "Creating turbulence model.\n" << nl; autoPtr<compressible::turbulenceModel> turbulence @@ -72,6 +64,9 @@ autoPtr<compressible::turbulenceModel> turbulence ) ); +// Set the turbulence into the combustion model +combustion->setTurbulence(turbulence()); + Info<< "Creating field DpDt\n" << endl; volScalarField DpDt ( @@ -86,16 +81,16 @@ forAll(Y, i) } fields.add(hs); -DimensionedField<scalar, volMesh> chemistrySh +volScalarField dQ ( IOobject ( - "chemistry::Sh", + "dQ", runTime.timeName(), mesh, IOobject::NO_READ, - IOobject::NO_WRITE + IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0) + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) ); diff --git a/applications/solvers/combustion/rhoReactingFoam/hsEqn.H b/applications/solvers/combustion/rhoReactingFoam/hsEqn.H index 81bd6ea9d7bb4a03834d5db86deb7d728eb3d9db..01f85ac1da7432acf7a54a555dc8283af58979d3 100644 --- a/applications/solvers/combustion/rhoReactingFoam/hsEqn.H +++ b/applications/solvers/combustion/rhoReactingFoam/hsEqn.H @@ -4,9 +4,10 @@ fvm::ddt(rho, hs) + mvConvection->fvmDiv(phi, hs) - fvm::laplacian(turbulence->alphaEff(), hs) +// - fvm::laplacian(turbulence->muEff(), hs) // unit lewis no. == DpDt - + chemistrySh + + combustion->Sh() ); hsEqn.relax(); @@ -14,6 +15,6 @@ thermo.correct(); - Info<< "T gas min/max = " << min(T).value() << ", " - << max(T).value() << endl; + Info<< "min/max(T) = " + << min(T).value() << ", " << max(T).value() << endl; } diff --git a/applications/solvers/combustion/rhoReactingFoam/readChemistryProperties.H b/applications/solvers/combustion/rhoReactingFoam/readChemistryProperties.H deleted file mode 100644 index f0bcf7597fcf71f1e9b8ee2dbc879200a85fa2cc..0000000000000000000000000000000000000000 --- a/applications/solvers/combustion/rhoReactingFoam/readChemistryProperties.H +++ /dev/null @@ -1,23 +0,0 @@ -Info<< "Reading chemistry properties\n" << endl; - -IOdictionary chemistryProperties -( - IOobject - ( - "chemistryProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) -); - -Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction")); - -dimensionedScalar Cmix("Cmix", dimless, 1.0); - -if (turbulentReaction) -{ - chemistryProperties.lookup("Cmix") >> Cmix; -} diff --git a/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C b/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C index 9c22e63c51188674a5ea8d4ccb608b38e712ec93..afa7d9771da6b6ce722385bbd30abb6df5b86ec7 100644 --- a/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C +++ b/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C @@ -31,10 +31,8 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hReactionThermo.H" +#include "rhoChemistryCombustionModel.H" #include "turbulenceModel.H" -#include "rhoChemistryModel.H" -#include "chemistrySolver.H" #include "multivariateScheme.H" #include "pimpleControl.H" @@ -45,7 +43,6 @@ int main(int argc, char *argv[]) #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" - #include "readChemistryProperties.H" #include "readGravitationalAcceleration.H" #include "createFields.H" #include "initContinuityErrs.H" @@ -68,7 +65,6 @@ int main(int argc, char *argv[]) runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; - #include "chemistry.H" #include "rhoEqn.H" // --- Pressure-velocity PIMPLE corrector loop @@ -92,10 +88,7 @@ int main(int argc, char *argv[]) rho = thermo.rho(); - if (runTime.write()) - { - chemistry.dQ()().write(); - } + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" diff --git a/applications/solvers/heatTransfer/buoyantBaffleSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantBaffleSimpleFoam/Make/options index d3a5f0beb2e62c8074256b164e87fc051336ef16..0c40e8943020cd29877db0aaf0eba8941f6504e6 100644 --- a/applications/solvers/heatTransfer/buoyantBaffleSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantBaffleSimpleFoam/Make/options @@ -1,5 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/LTSReactingParcelFoam.C b/applications/solvers/lagrangian/LTSReactingParcelFoam/LTSReactingParcelFoam.C index a9da394140e253851b1e7d85221100d6467fb9fd..9f2955bc2f8773489e8297ec900c7964e2874b22 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/LTSReactingParcelFoam.C +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/LTSReactingParcelFoam.C @@ -36,11 +36,9 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hReactionThermo.H" #include "turbulenceModel.H" #include "basicReactingMultiphaseCloud.H" -#include "rhoChemistryModel.H" -#include "chemistrySolver.H" +#include "rhoChemistryCombustionModel.H" #include "radiationModel.H" #include "porousZones.H" #include "timeActivatedExplicitSource.H" @@ -75,7 +73,6 @@ int main(int argc, char *argv[]) while (runTime.run()) { - #include "readChemistryProperties.H" #include "readAdditionalSolutionControls.H" #include "readTimeControls.H" @@ -85,7 +82,6 @@ int main(int argc, char *argv[]) parcels.evolve(); - #include "chemistry.H" #include "timeScales.H" #include "rhoEqn.H" @@ -111,10 +107,7 @@ int main(int argc, char *argv[]) } } - if (runTime.write()) - { - chemistry.dQ()().write(); - } + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/Make/options b/applications/solvers/lagrangian/LTSReactingParcelFoam/Make/options index 91ee4a594d0a3ff79918481ebcc7764fe2823dee..36e9c44270ad2859e3d4a7ac6ecfe803157c08b0 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/Make/options @@ -20,7 +20,8 @@ EXE_INC = \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/combustionModels/lnInclude EXE_LIBS = \ -lfiniteVolume \ @@ -44,4 +45,5 @@ EXE_LIBS = \ -lODE \ -lregionModels \ -lsurfaceFilmModels \ - -lsampling + -lsampling \ + -lcombustionModels diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/YEqn.H b/applications/solvers/lagrangian/LTSReactingParcelFoam/YEqn.H index c941691d66ccff733405ec92982e848bb15b0d53..625c940a663b63f83858861cf894e49bb04d0875 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/YEqn.H +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/YEqn.H @@ -9,6 +9,9 @@ tmp<fv::convectionScheme<scalar> > mvConvection ) ); +combustion->correct(); +dQ = combustion->dQ(); + if (solveSpecies) { label inertIndex = -1; @@ -19,14 +22,15 @@ if (solveSpecies) if (Y[i].name() != inertSpecie) { volScalarField& Yi = Y[i]; + solve ( fvm::ddt(rho, Yi) + mvConvection->fvmDiv(phi, Yi) - fvm::laplacian(turbulence->muEff(), Yi) - == + == parcels.SYi(i, Yi) - + kappa*chemistry.RR(i)().dimensionedInternalField() + + combustion->R(Yi) + massSource.Su(i), mesh.solver("Yi") ); diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/LTSReactingParcelFoam/createFields.H index 103ead9d78f33787d964777673c78d08e943371c..f1f6173cd611633a7d7115f4f476f1dba583c2e1 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/createFields.H @@ -1,10 +1,14 @@ - Info<< "Reading thermophysical properties\n" << endl; + Info<< "Creating combustion model\n" << endl; - autoPtr<rhoChemistryModel> pChemistry + autoPtr<combustionModels::rhoChemistryCombustionModel> combustion ( - rhoChemistryModel::New(mesh) + combustionModels::rhoChemistryCombustionModel::New + ( + mesh + ) ); - rhoChemistryModel& chemistry = pChemistry(); + + rhoChemistryModel& chemistry = combustion->pChemistry(); hsReactionThermo& thermo = chemistry.thermo(); @@ -57,20 +61,6 @@ #include "compressibleCreatePhi.H" - DimensionedField<scalar, volMesh> kappa - ( - IOobject - ( - "kappa", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - mesh, - dimensionedScalar("zero", dimless, 0.0) - ); - dimensionedScalar rhoMax ( mesh.solutionDict().subDict("PIMPLE").lookup("rhoMax") @@ -93,6 +83,9 @@ ) ); + // Set the turbulence into the combustion model + combustion->setTurbulence(turbulence()); + Info<< "Creating multi-variate interpolation scheme\n" << endl; multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields; @@ -102,20 +95,21 @@ } fields.add(hs); - DimensionedField<scalar, volMesh> chemistrySh + volScalarField dQ ( IOobject ( - "chemistry::Sh", + "dQ", runTime.timeName(), mesh, IOobject::NO_READ, - IOobject::NO_WRITE + IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0) + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) ); + volScalarField rDeltaT ( IOobject diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/hsEqn.H b/applications/solvers/lagrangian/LTSReactingParcelFoam/hsEqn.H index 5954b1217e6cbce2f227c60b9dfa158f7ca54343..55bf1d6dd0cdc850c8bd6b3364d51631f0c1106e 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/hsEqn.H +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/hsEqn.H @@ -9,7 +9,7 @@ + parcels.Sh(hs) + radiation->Shs(thermo) + energySource.Su() - + chemistrySh + + combustion->Sh() ); hsEqn.solve(); diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/readChemistryProperties.H b/applications/solvers/lagrangian/LTSReactingParcelFoam/readChemistryProperties.H deleted file mode 100644 index e742e9fea78c2d196b07e96196b20ea8a2cf53f1..0000000000000000000000000000000000000000 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/readChemistryProperties.H +++ /dev/null @@ -1,23 +0,0 @@ -// Info<< "Reading chemistry properties\n" << endl; - -IOdictionary chemistryProperties -( - IOobject - ( - "chemistryProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) -); - -Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction")); - -dimensionedScalar Cmix("Cmix", dimless, 1.0); - -if (turbulentReaction) -{ - chemistryProperties.lookup("Cmix") >> Cmix; -} diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/timeScales.H b/applications/solvers/lagrangian/LTSReactingParcelFoam/timeScales.H index e6d0fa85c4919cb322b30620c2850d408fb0fb8f..05fe8a1c7713453e650d8e0416b2963fe5f5b8ef 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/timeScales.H +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/timeScales.H @@ -77,7 +77,7 @@ Info<< "Time scales min/max:" << endl; DpDt + parcels.hsTrans()/(mesh.V()*runTime.deltaT()) + energySource.Su() - + chemistrySh + + combustion->Sh()() ) /rho ); diff --git a/applications/solvers/lagrangian/coalChemistryFoam/Make/options b/applications/solvers/lagrangian/coalChemistryFoam/Make/options index f2f8d1e75874dd9361753b992bad7d1847ff0dc1..e8a871837378ef43f984a402c41889bca9f64204 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/Make/options +++ b/applications/solvers/lagrangian/coalChemistryFoam/Make/options @@ -21,6 +21,7 @@ EXE_INC = \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/combustionModels/lnInclude \ -I$(FOAM_SOLVERS)/combustion/reactingFoam @@ -47,4 +48,5 @@ EXE_LIBS = \ -lregionModels \ -lsurfaceFilmModels \ -lODE \ - -lsampling + -lsampling \ + -lcombustionModels diff --git a/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H b/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H index be82d6e2b6019af547a5fe2f023be66da02483a7..e9bd1c6581b842fb1ccc9739d4c8370546d8fdc8 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H @@ -11,6 +11,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection { + combustion->correct(); + dQ = combustion->dQ(); label inertIndex = -1; volScalarField Yt(0.0*Y[0]); @@ -19,16 +21,20 @@ tmp<fv::convectionScheme<scalar> > mvConvection if (Y[i].name() != inertSpecie) { volScalarField& Yi = Y[i]; - solve + + fvScalarMatrix YiEqn ( fvm::ddt(rho, Yi) + mvConvection->fvmDiv(phi, Yi) - fvm::laplacian(turbulence->muEff(), Yi) == coalParcels.SYi(i, Yi) - + kappa*chemistry.RR(i)().dimensionedInternalField() + + combustion->R(Yi) ); + YiEqn.relax(); + YiEqn.solve(mesh.solver("Yi")); + Yi.max(0.0); Yt += Yi; } diff --git a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C index 3d0eabcef8e21afc2ede2401710d3b26a3531ee4..1e6daed0fde4e02f5c160b4716a9d02ff73cea3c 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C +++ b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C @@ -36,12 +36,10 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hCombustionThermo.H" #include "turbulenceModel.H" #include "basicThermoCloud.H" #include "coalCloud.H" -#include "psiChemistryModel.H" -#include "chemistrySolver.H" +#include "psiChemistryCombustionModel.H" #include "timeActivatedExplicitSource.H" #include "radiationModel.H" #include "SLGThermo.H" @@ -55,7 +53,6 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" - #include "readChemistryProperties.H" #include "readGravitationalAcceleration.H" #include "createFields.H" #include "createClouds.H" @@ -88,7 +85,6 @@ int main(int argc, char *argv[]) limestoneParcels.evolve(); - #include "chemistry.H" #include "rhoEqn.H" // --- Pressure-velocity PIMPLE corrector loop @@ -112,10 +108,7 @@ int main(int argc, char *argv[]) rho = thermo.rho(); - if (runTime.write()) - { - chemistry.dQ()().write(); - } + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" diff --git a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H index 97e409215c08153dca0a360bdc027fffb6581172..4d0a2b7408dc36caa486c9369b8ce7e6f31d582d 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H @@ -1,10 +1,14 @@ - Info<< "Reading thermophysical properties\n" << endl; + Info<< "Creating combustion model\n" << endl; - autoPtr<psiChemistryModel> pChemistry + autoPtr<combustionModels::psiChemistryCombustionModel> combustion ( - psiChemistryModel::New(mesh) + combustionModels::psiChemistryCombustionModel::New + ( + mesh + ) ); - psiChemistryModel& chemistry = pChemistry(); + + psiChemistryModel& chemistry = combustion->pChemistry(); hsCombustionThermo& thermo = chemistry.thermo(); @@ -96,20 +100,6 @@ #include "compressibleCreatePhi.H" - DimensionedField<scalar, volMesh> kappa - ( - IOobject - ( - "kappa", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - mesh, - dimensionedScalar("zero", dimless, 0.0) - ); - Info<< "Creating turbulence model\n" << endl; autoPtr<compressible::turbulenceModel> turbulence ( @@ -122,6 +112,9 @@ ) ); + // Set the turbulence into the combustion model + combustion->setTurbulence(turbulence()); + Info<< "Creating field DpDt\n" << endl; volScalarField DpDt ( @@ -138,16 +131,16 @@ "hs" ); - DimensionedField<scalar, volMesh> chemistrySh + volScalarField dQ ( IOobject ( - "chemistry::Sh", + "dQ", runTime.timeName(), mesh, IOobject::NO_READ, - IOobject::NO_WRITE + IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0) + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) ); diff --git a/applications/solvers/lagrangian/coalChemistryFoam/hsEqn.H b/applications/solvers/lagrangian/coalChemistryFoam/hsEqn.H index e6901a9c6f255dcf4328c60fa986c45a353deee0..9a4665accdbb10927c30b4d88f230dfb0af7adad 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/hsEqn.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/hsEqn.H @@ -6,15 +6,14 @@ - fvm::laplacian(turbulence->alphaEff(), hs) == DpDt + + combustion->Sh() + coalParcels.Sh(hs) + limestoneParcels.Sh(hs) + enthalpySource.Su() + radiation->Shs(thermo) - + chemistrySh ); hsEqn.relax(); - hsEqn.solve(); thermo.correct(); diff --git a/applications/solvers/lagrangian/coalChemistryFoam/readChemistryProperties.H b/applications/solvers/lagrangian/coalChemistryFoam/readChemistryProperties.H deleted file mode 100644 index f0bcf7597fcf71f1e9b8ee2dbc879200a85fa2cc..0000000000000000000000000000000000000000 --- a/applications/solvers/lagrangian/coalChemistryFoam/readChemistryProperties.H +++ /dev/null @@ -1,23 +0,0 @@ -Info<< "Reading chemistry properties\n" << endl; - -IOdictionary chemistryProperties -( - IOobject - ( - "chemistryProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) -); - -Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction")); - -dimensionedScalar Cmix("Cmix", dimless, 1.0); - -if (turbulentReaction) -{ - chemistryProperties.lookup("Cmix") >> Cmix; -} diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options index f2dffe2998bacfbb04d2fd06d7f8f9de0f802905..1abdd721788ff53a8e102167b6e886c7e26e15bb 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options @@ -21,6 +21,7 @@ EXE_INC = \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/combustionModels/lnInclude \ -I$(FOAM_SOLVERS)/combustion/reactingFoam @@ -46,4 +47,5 @@ EXE_LIBS = \ -lODE \ -lregionModels \ -lsurfaceFilmModels \ - -lsampling + -lsampling \ + -lcombustionModels diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/YEqn.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/YEqn.H index 53c6b25d81c1e10fb8f3f0d377ca35d715bf4686..5ef4aaa3a351fa79fd3bfb24ac8144ca112c24c4 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/YEqn.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/YEqn.H @@ -10,6 +10,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection ) ); +combustion->correct(); +dQ = combustion->dQ(); if (solveSpecies) { @@ -21,6 +23,7 @@ if (solveSpecies) if (Y[i].name() != inertSpecie) { volScalarField& Yi = Y[i]; + solve ( fvm::ddt(rho, Yi) @@ -28,7 +31,7 @@ if (solveSpecies) - fvm::laplacian(turbulence->muEff(), Yi) == parcels.SYi(i, Yi) - + kappa*chemistry.RR(i)().dimensionedInternalField() + + combustion->R(Yi) + massSource.Su(i), mesh.solver("Yi") ); diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H index 22d7c1f219e49c8bde15b1fd01bf6e4a20895e4d..ab6b01f9cea220ce72b805249fae37dee8e68c03 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H @@ -1,10 +1,14 @@ - Info<< "Reading thermophysical properties\n" << endl; + Info<< "Creating combustion model\n" << endl; - autoPtr<rhoChemistryModel> pChemistry + autoPtr<combustionModels::rhoChemistryCombustionModel> combustion ( - rhoChemistryModel::New(mesh) + combustionModels::rhoChemistryCombustionModel::New + ( + mesh + ) ); - rhoChemistryModel& chemistry = pChemistry(); + + rhoChemistryModel& chemistry = combustion->pChemistry(); hsReactionThermo& thermo = chemistry.thermo(); @@ -57,20 +61,6 @@ #include "compressibleCreatePhi.H" - DimensionedField<scalar, volMesh> kappa - ( - IOobject - ( - "kappa", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - mesh, - dimensionedScalar("zero", dimless, 0.0) - ); - Info<< "Creating turbulence model\n" << endl; autoPtr<compressible::turbulenceModel> turbulence ( @@ -83,6 +73,9 @@ ) ); + // Set the turbulence into the combustion model + combustion->setTurbulence(turbulence()); + Info<< "Creating multi-variate interpolation scheme\n" << endl; multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields; @@ -92,16 +85,16 @@ } fields.add(hs); - DimensionedField<scalar, volMesh> chemistrySh + volScalarField dQ ( IOobject ( - "chemistry::Sh", + "dQ", runTime.timeName(), mesh, IOobject::NO_READ, - IOobject::NO_WRITE + IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0) + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) ); diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hsEqn.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hsEqn.H index 58e0b699433c0f9eb32b548dd512016a003027e6..0e2c61a9ff1b6e8682403b1d2281963f18506042 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hsEqn.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hsEqn.H @@ -39,7 +39,7 @@ + parcels.Sh(hs) + radiation->Shs(thermo) + energySource.Su() - + chemistrySh + + combustion->Sh() ); thermo.correct(); diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C index 638d83da0c7d8681f62e8727e21ba0b7fc750fe9..e077836709b583922c3ece1d7885c785b213359c 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C @@ -40,11 +40,9 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hReactionThermo.H" #include "turbulenceModel.H" #include "basicReactingMultiphaseCloud.H" -#include "rhoChemistryModel.H" -#include "chemistrySolver.H" +#include "rhoChemistryCombustionModel.H" #include "radiationModel.H" #include "porousZones.H" #include "timeActivatedExplicitSource.H" @@ -59,7 +57,6 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" - #include "readChemistryProperties.H" #include "readGravitationalAcceleration.H" #include "createFields.H" #include "createRadiationModel.H" @@ -90,7 +87,6 @@ int main(int argc, char *argv[]) parcels.evolve(); - #include "chemistry.H" #include "rhoEqn.H" // --- Pressure-velocity PIMPLE corrector loop @@ -114,10 +110,7 @@ int main(int argc, char *argv[]) rho = thermo.rho(); - if (runTime.write()) - { - chemistry.dQ()().write(); - } + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/readChemistryProperties.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/readChemistryProperties.H deleted file mode 100644 index f0bcf7597fcf71f1e9b8ee2dbc879200a85fa2cc..0000000000000000000000000000000000000000 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/readChemistryProperties.H +++ /dev/null @@ -1,23 +0,0 @@ -Info<< "Reading chemistry properties\n" << endl; - -IOdictionary chemistryProperties -( - IOobject - ( - "chemistryProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) -); - -Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction")); - -dimensionedScalar Cmix("Cmix", dimless, 1.0); - -if (turbulentReaction) -{ - chemistryProperties.lookup("Cmix") >> Cmix; -} diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options index 6e225cc09231bc0c0d7cd2b39dafd6270885ebf6..3f762b6bd00784de202e89a568afc58bd3425e96 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options @@ -20,6 +20,7 @@ EXE_INC = \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/combustionModels/lnInclude \ -I$(FOAM_SOLVERS)/combustion/reactingFoam @@ -41,4 +42,5 @@ EXE_LIBS = \ -lsurfaceFilmModels \ -llagrangianIntermediate \ -lODE \ - -lsampling + -lsampling \ + -lcombustionModels diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H index db79376614e29b4289c41f54e76c7bdf5c25e9b6..4fad16b57d7c16e55aff80e77583d71d72764eca 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H @@ -11,6 +11,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection { + combustion->correct(); + dQ = combustion->dQ(); label inertIndex = -1; volScalarField Yt(0.0*Y[0]); @@ -19,6 +21,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection if (Y[i].name() != inertSpecie) { volScalarField& Yi = Y[i]; + solve ( fvm::ddt(rho, Yi) @@ -27,7 +30,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection == parcels.SYi(i, Yi) + surfaceFilm.Srho(i) - + kappa*chemistry.RR(i)().dimensionedInternalField(), + + combustion->R(Yi), mesh.solver("Yi") ); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H index e2db33f1f7f64960cd07f9898b039970a63c9b76..999515f4309aa2ca8526ee39a3daddaf8ed9d71b 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H @@ -1,10 +1,14 @@ - Info<< "Reading thermophysical properties\n" << endl; + Info<< "Creating combustion model\n" << endl; - autoPtr<psiChemistryModel> pChemistry + autoPtr<combustionModels::psiChemistryCombustionModel> combustion ( - psiChemistryModel::New(mesh) + combustionModels::psiChemistryCombustionModel::New + ( + mesh + ) ); - psiChemistryModel& chemistry = pChemistry(); + + psiChemistryModel& chemistry = combustion->pChemistry(); hsCombustionThermo& thermo = chemistry.thermo(); @@ -50,21 +54,6 @@ #include "compressibleCreatePhi.H" - Info<< "Creating field kappa\n" << endl; - DimensionedField<scalar, volMesh> kappa - ( - IOobject - ( - "kappa", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - mesh, - dimensionedScalar("zero", dimless, 0.0) - ); - Info<< "Creating turbulence model\n" << endl; autoPtr<compressible::turbulenceModel> turbulence ( @@ -77,6 +66,9 @@ ) ); + // Set the turbulence into the combustion model + combustion->setTurbulence(turbulence()); + Info<< "Creating field DpDt\n" << endl; volScalarField DpDt ( @@ -131,16 +123,16 @@ additionalControlsDict.lookup("solvePrimaryRegion") ); - DimensionedField<scalar, volMesh> chemistrySh + volScalarField dQ ( IOobject ( - "chemistry::Sh", + "dQ", runTime.timeName(), mesh, IOobject::NO_READ, - IOobject::NO_WRITE + IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0) + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) ); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/hsEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/hsEqn.H index feb112f652a3f9478af26963b590aa65e2e47de4..79c5e1c5b3cc5a239437601f3bd8e3b57c6224e3 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/hsEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/hsEqn.H @@ -9,7 +9,7 @@ + parcels.Sh(hs) + surfaceFilm.Sh() + radiation->Shs(thermo) - + chemistrySh + + combustion->Sh() ); hsEqn.relax(); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C b/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C index 6ae930c7a72da80de68ec6cfd1aeb3ed5baefcf6..ea8e9e6e5b65aed30d23c2dd521f2f6ca48740c0 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C @@ -31,12 +31,10 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hCombustionThermo.H" #include "turbulenceModel.H" #include "basicReactingCloud.H" #include "surfaceFilmModel.H" -#include "psiChemistryModel.H" -#include "chemistrySolver.H" +#include "psiChemistryCombustionModel.H" #include "radiationModel.H" #include "SLGThermo.H" #include "pimpleControl.H" @@ -49,7 +47,6 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" - #include "readChemistryProperties.H" #include "readGravitationalAcceleration.H" #include "createFields.H" #include "createClouds.H" @@ -83,7 +80,6 @@ int main(int argc, char *argv[]) if (solvePrimaryRegion) { - #include "chemistry.H" #include "rhoEqn.H" // --- PIMPLE loop @@ -107,10 +103,7 @@ int main(int argc, char *argv[]) rho = thermo.rho(); - if (runTime.write()) - { - chemistry.dQ()().write(); - } + runTime.write(); } else { diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/readChemistryProperties.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/readChemistryProperties.H deleted file mode 100644 index f0bcf7597fcf71f1e9b8ee2dbc879200a85fa2cc..0000000000000000000000000000000000000000 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/readChemistryProperties.H +++ /dev/null @@ -1,23 +0,0 @@ -Info<< "Reading chemistry properties\n" << endl; - -IOdictionary chemistryProperties -( - IOobject - ( - "chemistryProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) -); - -Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction")); - -dimensionedScalar Cmix("Cmix", dimless, 1.0); - -if (turbulentReaction) -{ - chemistryProperties.lookup("Cmix") >> Cmix; -} diff --git a/applications/solvers/lagrangian/reactingParcelFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFoam/Make/options index fc312bb5fa8e3e8c7dc14254607ad907eb4d8c11..e406727104647bc53fd59ccbf6da44a9c5af2722 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFoam/Make/options @@ -20,6 +20,7 @@ EXE_INC = \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/combustionModels/lnInclude \ -I$(FOAM_SOLVERS)/combustion/reactingFoam @@ -45,4 +46,5 @@ EXE_LIBS = \ -lODE \ -lregionModels \ -lsurfaceFilmModels \ - -lsampling + -lsampling \ + -lcombustionModels diff --git a/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H index a18097332134baaa0b312ecaf281a81694ae73ac..78bbe14bbfe72df41f7c6d17bcf10e152e32e6c6 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H @@ -11,6 +11,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection { + combustion->correct(); + dQ = combustion->dQ(); label inertIndex = -1; volScalarField Yt(0.0*Y[0]); @@ -19,17 +21,20 @@ tmp<fv::convectionScheme<scalar> > mvConvection if (Y[i].name() != inertSpecie) { volScalarField& Yi = Y[i]; - solve + + fvScalarMatrix YiEqn ( fvm::ddt(rho, Yi) + mvConvection->fvmDiv(phi, Yi) - fvm::laplacian(turbulence->muEff(), Yi) == parcels.SYi(i, Yi) - + kappa*chemistry.RR(i)().dimensionedInternalField(), - mesh.solver("Yi") + + combustion->R(Yi) ); + YiEqn.relax(); + YiEqn.solve(mesh.solver("Yi")); + Yi.max(0.0); Yt += Yi; } diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H index 089489a014adeaedf43888bf9761475685644044..c318498d94c3efcd27e0c257e306795081ce99fb 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H @@ -1,10 +1,14 @@ - Info<< "Reading thermophysical properties\n" << endl; + Info<< "Creating combustion model\n" << endl; - autoPtr<psiChemistryModel> pChemistry + autoPtr<combustionModels::psiChemistryCombustionModel> combustion ( - psiChemistryModel::New(mesh) + combustionModels::psiChemistryCombustionModel::New + ( + mesh + ) ); - psiChemistryModel& chemistry = pChemistry(); + + psiChemistryModel& chemistry = combustion->pChemistry(); hsCombustionThermo& thermo = chemistry.thermo(); @@ -57,20 +61,6 @@ #include "compressibleCreatePhi.H" - DimensionedField<scalar, volMesh> kappa - ( - IOobject - ( - "kappa", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - mesh, - dimensionedScalar("zero", dimless, 0.0) - ); - Info<< "Creating turbulence model\n" << endl; autoPtr<compressible::turbulenceModel> turbulence ( @@ -83,6 +73,9 @@ ) ); + // Set the turbulence into the combustion model + combustion->setTurbulence(turbulence()); + Info<< "Creating field DpDt\n" << endl; volScalarField DpDt ( @@ -98,16 +91,16 @@ } fields.add(hs); - DimensionedField<scalar, volMesh> chemistrySh + volScalarField dQ ( IOobject ( - "chemistry::Sh", + "dQ", runTime.timeName(), mesh, IOobject::NO_READ, - IOobject::NO_WRITE + IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("chemistry::Sh", dimEnergy/dimTime/dimVolume, 0.0) - ); + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) + ); \ No newline at end of file diff --git a/applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H index 7821d340d4bc6b1f955b94dcb770fd9454acdf95..f7499813c7f63fcfdbe026d28cfc4485c3cff0df 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H @@ -8,7 +8,7 @@ DpDt + parcels.Sh(hs) + radiation->Shs(thermo) - + chemistrySh + + combustion->Sh() ); hEqn.relax(); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C index ae2a06a363b2ff893a0faef9c3b73c3270060535..0d00af9c2a89c7c8811bb8ca100d3cbe8d21997f 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C @@ -31,11 +31,9 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hCombustionThermo.H" #include "turbulenceModel.H" #include "basicReactingCloud.H" -#include "psiChemistryModel.H" -#include "chemistrySolver.H" +#include "psiChemistryCombustionModel.H" #include "radiationModel.H" #include "SLGThermo.H" #include "pimpleControl.H" @@ -48,7 +46,6 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" - #include "readChemistryProperties.H" #include "readGravitationalAcceleration.H" #include "createFields.H" #include "createClouds.H" @@ -76,7 +73,6 @@ int main(int argc, char *argv[]) parcels.evolve(); - #include "chemistry.H" #include "rhoEqn.H" // --- Pressure-velocity PIMPLE corrector loop @@ -100,10 +96,7 @@ int main(int argc, char *argv[]) rho = thermo.rho(); - if (runTime.write()) - { - chemistry.dQ()().write(); - } + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/readChemistryProperties.H b/applications/solvers/lagrangian/reactingParcelFoam/readChemistryProperties.H deleted file mode 100644 index f0bcf7597fcf71f1e9b8ee2dbc879200a85fa2cc..0000000000000000000000000000000000000000 --- a/applications/solvers/lagrangian/reactingParcelFoam/readChemistryProperties.H +++ /dev/null @@ -1,23 +0,0 @@ -Info<< "Reading chemistry properties\n" << endl; - -IOdictionary chemistryProperties -( - IOobject - ( - "chemistryProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) -); - -Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction")); - -dimensionedScalar Cmix("Cmix", dimless, 1.0); - -if (turbulentReaction) -{ - chemistryProperties.lookup("Cmix") >> Cmix; -} diff --git a/applications/solvers/lagrangian/sprayFoam/Make/options b/applications/solvers/lagrangian/sprayFoam/Make/options index ff504df32f0445a26d5f9e7fae166313250341e8..f4c66f06f918d426c58214f7d079691de242a24f 100644 --- a/applications/solvers/lagrangian/sprayFoam/Make/options +++ b/applications/solvers/lagrangian/sprayFoam/Make/options @@ -21,6 +21,7 @@ EXE_INC = \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/combustionModels/lnInclude \ -I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam @@ -47,4 +48,5 @@ EXE_LIBS = \ -lODE \ -lregionModels \ -lsurfaceFilmModels \ - -lsampling + -lsampling \ + -lcombustionModels diff --git a/applications/solvers/lagrangian/sprayFoam/chemistry.H b/applications/solvers/lagrangian/sprayFoam/chemistry.H deleted file mode 100644 index 99f418af6f10ac69b44d08fc2271e2dd79c73fc4..0000000000000000000000000000000000000000 --- a/applications/solvers/lagrangian/sprayFoam/chemistry.H +++ /dev/null @@ -1,44 +0,0 @@ -if (chemistry.chemistry()) -{ - Info<< "Solving chemistry" << endl; - - chemistry.solve - ( - runTime.value() - runTime.deltaTValue(), - runTime.deltaTValue() - ); - - // turbulent time scale - if (turbulentReaction) - { - tmp<volScalarField> tepsilon(turbulence->epsilon()); - const volScalarField& epsilon = tepsilon(); - tmp<volScalarField> tmuEff(turbulence->muEff()); - const volScalarField& muEff = tmuEff(); - tmp<volScalarField> ttc(chemistry.tc()); - const volScalarField& tc = ttc(); - - forAll(epsilon, i) - { - if (epsilon[i] > 0) - { - // Chalmers PaSR model - scalar tk = Cmix.value()*Foam::sqrt(muEff[i]/rho[i]/epsilon[i]); - kappa[i] = - (runTime.deltaTValue() + tc[i]) - /(runTime.deltaTValue() + tc[i] + tk); - } - else - { - // Return to laminar combustion - kappa[i] = 1.0; - } - } - } - else - { - kappa = 1.0; - } - - chemistrySh = kappa*chemistry.Sh()(); -} diff --git a/applications/solvers/lagrangian/sprayFoam/sprayFoam.C b/applications/solvers/lagrangian/sprayFoam/sprayFoam.C index 5252fd3cf3905f471c46f62b1a22d6f55ef0f21d..d1f70654eacac05e0fa6e36e40ff61484e72b518 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayFoam.C +++ b/applications/solvers/lagrangian/sprayFoam/sprayFoam.C @@ -31,11 +31,9 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hCombustionThermo.H" #include "turbulenceModel.H" #include "basicSprayCloud.H" -#include "psiChemistryModel.H" -#include "chemistrySolver.H" +#include "psiChemistryCombustionModel.H" #include "radiationModel.H" #include "SLGThermo.H" #include "pimpleControl.H" @@ -48,7 +46,6 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" - #include "readChemistryProperties.H" #include "readGravitationalAcceleration.H" #include "createFields.H" #include "createClouds.H" @@ -76,7 +73,6 @@ int main(int argc, char *argv[]) parcels.evolve(); - #include "chemistry.H" #include "rhoEqn.H" // --- Pressure-velocity PIMPLE corrector loop diff --git a/applications/solvers/multiphase/bubbleFoam/bubbleFoam.C b/applications/solvers/multiphase/bubbleFoam/bubbleFoam.C index d028a1376fc84251c5f62de1aeccecb82499b7e6..e526266c90b7c2031478365b7fee024ab73ed8a2 100644 --- a/applications/solvers/multiphase/bubbleFoam/bubbleFoam.C +++ b/applications/solvers/multiphase/bubbleFoam/bubbleFoam.C @@ -34,6 +34,7 @@ Description #include "nearWallDist.H" #include "wallFvPatch.H" #include "Switch.H" + #include "pimpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,6 +48,9 @@ int main(int argc, char *argv[]) #include "readGravitationalAcceleration.H" #include "createFields.H" #include "initContinuityErrs.H" + #include "readTimeControls.H" + #include "CourantNo.H" + #include "setInitialDeltaT.H" pimpleControl pimple(mesh); @@ -54,16 +58,23 @@ int main(int argc, char *argv[]) Info<< "\nStarting time loop\n" << endl; - while (runTime.loop()) + while (runTime.run()) { - Info<< "Time = " << runTime.timeName() << nl << endl; - #include "readBubbleFoamControls.H" #include "CourantNo.H" + #include "setDeltaT.H" + + runTime++; + Info<< "Time = " << runTime.timeName() << nl << endl; // --- Pressure-velocity PIMPLE corrector loop for (pimple.start(); pimple.loop(); pimple++) { + if (pimple.nOuterCorr() != 1) + { + p.storePrevIter(); + } + #include "alphaEqn.H" #include "liftDragCoeffs.H" #include "UEqns.H" @@ -73,7 +84,7 @@ int main(int argc, char *argv[]) { #include "pEqn.H" - if (correctAlpha) + if (correctAlpha && !pimple.finalIter()) { #include "alphaEqn.H" } diff --git a/applications/solvers/multiphase/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.C b/applications/solvers/multiphase/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.C index 5edf003719d98e6dbd5faf66e9602e6122700f2c..1bf6e435a112affc147b39a033a29b9926004261 100644 --- a/applications/solvers/multiphase/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.C +++ b/applications/solvers/multiphase/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.C @@ -21,9 +21,6 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -Class - threePhaseMixture - \*---------------------------------------------------------------------------*/ #include "threePhaseMixture.H" diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C index 17cf2e7ec0c8ef742ce5351a1af2ec4667ac332c..3341d192dd3bb629be301f7b216302b36423aecc 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C @@ -26,7 +26,7 @@ Application Description Solver for a system of 2 incompressible fluid phases with one phase - dispersed, e.g. gas bubbles in a liquid. + dispersed, e.g. gas bubbles in a liquid or solid particles in a gas. \*---------------------------------------------------------------------------*/ @@ -78,10 +78,13 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop for (pimple.start(); pimple.loop(); pimple++) { - #include "alphaEqn.H" + if (pimple.nOuterCorr() != 1) + { + p.storePrevIter(); + } + #include "alphaEqn.H" #include "liftDragCoeffs.H" - #include "UEqns.H" // --- PISO loop diff --git a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C index 650393d5ec7fc4dd3220b15159bf25d625a26975..205dc6fc5c0c52dcccee57d9cb7ff5dc17703c67 100644 --- a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C +++ b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -757,9 +757,23 @@ int main(int argc, char *argv[]) "retain raw orientation for prisms/hexs" ); +# include "addRegionOption.H" + # include "setRootCase.H" # include "createTime.H" + Foam::word regionName; + + if (args.optionReadIfPresent("region", regionName)) + { + Foam::Info + << "Creating polyMesh for region " << regionName << endl; + } + else + { + regionName = Foam::polyMesh::defaultRegion; + } + const bool keepOrientation = args.optionFound("keepOrientation"); IFstream inFile(args[1]); @@ -894,7 +908,7 @@ int main(int argc, char *argv[]) ( IOobject ( - polyMesh::defaultRegion, + regionName, runTime.constant(), runTime ), @@ -984,6 +998,7 @@ int main(int argc, char *argv[]) //Get polyMesh to write to constant + runTime.setTime(instant(runTime.constant()), 0); repatcher.repatch(); @@ -1079,6 +1094,32 @@ int main(int argc, char *argv[]) mesh.addZones(List<pointZone*>(0), fz, cz); } + // Remove empty defaultFaces + label defaultPatchID = mesh.boundaryMesh().findPatchID(defaultFacesName); + if (mesh.boundaryMesh()[defaultPatchID].size() == 0) + { + List<polyPatch*> newPatchPtrList((mesh.boundaryMesh().size() - 1)); + label newPatchI = 0; + forAll(mesh.boundaryMesh(), patchI) + { + if (patchI != defaultPatchID) + { + const polyPatch& patch = mesh.boundaryMesh()[patchI]; + + newPatchPtrList[newPatchI] = patch.clone + ( + mesh.boundaryMesh(), + newPatchI, + patch.size(), + patch.start() + ).ptr(); + + newPatchI++; + } + } + repatcher.changePatches(newPatchPtrList); + } + mesh.write(); Info<< "End\n" << endl; diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMeshDict b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMeshDict index fbd26416b8cbf4a07a8f579c760fe9d7531ff47e..739f929fd36c7cd6f8918b3905f54d1c1a18787e 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMeshDict +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMeshDict @@ -20,6 +20,9 @@ region liquidFilm; // FaceZones to extrude faceZones (f0); +// FaceZone shadow +//faceZonesShadow (fBaffleShadow); + // Adapt the original mesh to have directMapped patches at where the // faceZones are? // If true: @@ -32,6 +35,10 @@ adaptMesh true; // Extrude 1D-columns of cells? oneD false; +// If oneD is true. Specify which boundary is wanted between the layers +//oneDPolyPatchType emptyPolyPatch; //wedgePolyPatch + + //- Extrusion model to use. The only logical choice is linearNormal? //- Linear extrusion in normal direction diff --git a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C index 2f90994c9ce82e9e55f476f4ffc5890979dbf404..8cd16cffbdd1d0d09d0cc4e0aa4a9b483e55bf6d 100644 --- a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C +++ b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,9 +21,6 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -Class - meshDualiser - \*---------------------------------------------------------------------------*/ #include "meshDualiser.H" diff --git a/applications/utilities/mesh/manipulation/setSet/writeFuns.H b/applications/utilities/mesh/manipulation/setSet/writeFuns.H index 1b9aef4f8e9dc398ffc7beef0a6a9b2081a40d69..de5f7a1c44c560249002996cb0ca55dd65f648ee 100644 --- a/applications/utilities/mesh/manipulation/setSet/writeFuns.H +++ b/applications/utilities/mesh/manipulation/setSet/writeFuns.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,18 +22,18 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::writeFunctions + Foam::writeFuns Description Various functions for collecting and writing binary data. SourceFiles - writeFunctions.C + writeFuns.C \*---------------------------------------------------------------------------*/ -#ifndef writeFunctions_H -#define writeFunctions_H +#ifndef writeFuns_H +#define writeFuns_H #include "labelList.H" #include "floatScalar.H" diff --git a/applications/utilities/miscellaneous/foamDebugSwitches/foamDebugSwitches.C b/applications/utilities/miscellaneous/foamDebugSwitches/foamDebugSwitches.C index 8f0e53f4e24384c6d52fbf85937dfa7ded6083aa..93702364117c09243f1435efca9d1cdc6582dcf1 100644 --- a/applications/utilities/miscellaneous/foamDebugSwitches/foamDebugSwitches.C +++ b/applications/utilities/miscellaneous/foamDebugSwitches/foamDebugSwitches.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,7 +61,12 @@ int main(int argc, char *argv[]) if (args.optionFound("old") || args.optionFound("new")) { - dictionary controlDict(IFstream(findEtcFile("controlDict", true))()); + fileNameList controlDictFiles = findEtcFiles("controlDict", true); + dictionary controlDict; + forAllReverse(controlDictFiles, cdfi) + { + controlDict.merge(dictionary(IFstream(controlDictFiles[cdfi])())); + } wordHashSet oldDebug ( diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.H index ecd7225ee53334003ec1ba80908b28e0c68a6657..fd7980ec28736a2f9c7a87d606e221072e5b5170 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.H +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,18 +22,18 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::writeFunctions + Foam::writeFuns Description Various functions for collecting and writing binary data. SourceFiles - writeFunctions.C + writeFuns.C \*---------------------------------------------------------------------------*/ -#ifndef writeFunctions_H -#define writeFunctions_H +#ifndef writeFuns_H +#define writeFuns_H #include "floatScalar.H" #include "DynamicList.H" diff --git a/applications/utilities/postProcessing/sampling/sample/sampleDict b/applications/utilities/postProcessing/sampling/sample/sampleDict index becaae12f7179fa405c3a93cc65758c4783f05fc..ca79e6aa47f068d2e201396567bd417a90aadfab 100644 --- a/applications/utilities/postProcessing/sampling/sample/sampleDict +++ b/applications/utilities/postProcessing/sampling/sample/sampleDict @@ -49,6 +49,9 @@ formatOptions // cell : use cell-centre value only; constant over cells (default) // cellPoint : use cell-centre and vertex values // cellPointFace : use cell-centre, vertex and face values. +// pointMVC : use point values only (Mean Value Coordinates) +// cellPatchConstrained : use cell-centre except on boundary faces where +// it uses the boundary value. For use with e.g. patchCloudSet. // 1] vertex values determined from neighbouring cell-centre values // 2] face values determined using the current face interpolation scheme // for the field (linear, gamma, etc.) @@ -83,6 +86,7 @@ fields // uniform, face, midPoint, midPointAndFace : start and end coordinate // uniform: extra number of sampling points // polyLine, cloud: list of coordinates +// patchCloud: list of coordinates and set of patches to look for nearest sets ( lineX1 @@ -113,8 +117,21 @@ sets points ((0.049 0.049 0.00501)(0.051 0.049 0.00501)); } + somePatchPoints + { + // Sample nearest points on selected patches. Use with + // interpolations: + // - cell (cell value) + // - cellPatchConstrained (boundary value) + // - cellPoint (interpolated boundary value) + type patchCloud; + axis xyz; + points ((0.049 0.099 0.005)(0.051 0.054 0.005)); + patches (".*Wall.*"); + } ); + // Surface sampling definition // // 1] patches are not triangulated by default @@ -241,4 +258,5 @@ surfaces } ); + // *********************************************************************** // diff --git a/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C b/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C index 387b791592a7f036f8a33598b84b60eb1a065bf1..13ea44c345991a84ec6238e7b558bebcc273df23 100644 --- a/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C +++ b/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C @@ -104,7 +104,7 @@ int main(int argc, char *argv[]) label patchI = pp.index(); finalAgglom[patchI].setSize(pp.size(), 0); - if (pp.size() > 0 && !pp.coupled()) + if (!pp.coupled()) { if (agglomDict.found(pp.name())) { diff --git a/applications/utilities/preProcessing/viewFactorsGen/shootRays.H b/applications/utilities/preProcessing/viewFactorsGen/shootRays.H index 75eca8bc280ad9364fe6c2cf267474661dc34d18..095436b1a115f3a745ebc540e9d033ff1e172e1f 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/shootRays.H +++ b/applications/utilities/preProcessing/viewFactorsGen/shootRays.H @@ -2,8 +2,7 @@ // Pre-size by assuming a certain percentage is visible. // Maximum lenght for dynamicList -const label maxDynListLenght = 10000; -//label lenghtCount = 0; +const label maxDynListLength = 10000; for (label procI = 0; procI < Pstream::nProcs(); procI++) { @@ -22,69 +21,51 @@ for (label procI = 0; procI < Pstream::nProcs(); procI++) const pointField& remoteArea = remoteCoarseSf[procI]; const pointField& remoteFc = remoteCoarseCf[procI]; - if (myFc.size()*remoteFc.size() > 0) + label i = 0; + label j = 0; + do { - forAll(myFc, i) + for (; i < myFc.size(); i++) { const point& fc = myFc[i]; const vector& fA = myArea[i]; - forAll(remoteFc, j) + for (; j < remoteFc.size(); j++)// { if (procI != Pstream::myProcNo() || i != j) { const point& remFc = remoteFc[j]; const vector& remA = remoteArea[j]; - const vector& d = remFc-fc; + const vector& d = remFc - fc; if (((d & fA) < 0.) && ((d & remA) > 0)) { - //lenghtCount ++; start.append(fc + 0.0001*d); startIndex.append(i); end.append(fc + 0.9999*d); label globalI = globalNumbering.toGlobal(procI, j); endIndex.append(globalI); - - if (startIndex.size() > maxDynListLenght) + if (startIndex.size() > maxDynListLength) { - List<pointIndexHit> hitInfo(startIndex.size()); - surfacesMesh.findLine - ( - start, - end, - hitInfo - ); - surfacesMesh.findLine(start, end, hitInfo); - forAll (hitInfo, rayI) - { - if (!hitInfo[rayI].hit()) - { - rayStartFace.append(startIndex[rayI]); - rayEndFace.append(endIndex[rayI]); - } - } - //lenghtCount = 0; - start.clear(); - startIndex.clear(); - end.clear(); - endIndex.clear(); + break; } } } } + if (startIndex.size() > maxDynListLength) + { + break; + } + + if (j == remoteFc.size()) + { + j = 0; + } } - } - if (!start.empty()) - { + List<pointIndexHit> hitInfo(startIndex.size()); - surfacesMesh.findLine - ( - start, - end, - hitInfo - ); surfacesMesh.findLine(start, end, hitInfo); + forAll (hitInfo, rayI) { if (!hitInfo[rayI].hit()) @@ -93,5 +74,12 @@ for (label procI = 0; procI < Pstream::nProcs(); procI++) rayEndFace.append(endIndex[rayI]); } } - } + + start.clear(); + startIndex.clear(); + end.clear(); + endIndex.clear(); + + }while (returnReduce(i < myFc.size(), orOp<bool>())); + } diff --git a/bin/paraFoam b/bin/paraFoam index fe11bcb6e8f2e4805413949654779926a3e6d662..6092623b009af32e7590063d02bec7ca10942898 100755 --- a/bin/paraFoam +++ b/bin/paraFoam @@ -70,6 +70,8 @@ export LC_ALL=C # reader extension extension=OpenFOAM +requirePV=1 + # parse options while [ "$#" -gt 0 ] do @@ -97,10 +99,12 @@ do ;; -touch) optTouch=true + requirePV=0 shift ;; -touchAll) optTouch=all + requirePV=0 shift ;; --) @@ -117,6 +121,24 @@ do done +# +# check that reader module has been built +# +if [ $requirePV -eq 1 -a ! -f $PV_PLUGIN_PATH/libPV3FoamReader_SM.so ] +then + cat<< BUILDREADER + +FATAL ERROR: ParaView reader module libraries do not exist + +Please build the reader module before continuing: +cd \$FOAM_UTILITIES/postProcessing/graphics/PV3Readers +./Allwclean +./Allwmake + +BUILDREADER + exit 1 +fi + # # check for --data=... argument # diff --git a/etc/bashrc b/etc/bashrc index edebe538fceda15b4f166688acdd9019b8f46096..e6e528df4d81560b9761df70c67e77d36b879ca9 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -32,7 +32,7 @@ #------------------------------------------------------------------------------ export WM_PROJECT=OpenFOAM -export WM_PROJECT_VERSION=dev +export WM_PROJECT_VERSION=dev.cvm ################################################################################ # USER EDITABLE PART: Changes made here may be lost with the next upgrade diff --git a/etc/config/settings.csh b/etc/config/settings.csh index 6b5f43dbc8d78406b1f5c2abfdc731d9d05024fc..d153e4216f7ae0315e7fd561d620948fcf176d3e 100644 --- a/etc/config/settings.csh +++ b/etc/config/settings.csh @@ -209,10 +209,10 @@ case ThirdParty: breaksw case Gcc46: case Gcc46++0x: - set gcc_version=gcc-4.6.0 - set gmp_version=gmp-5.0.1 - set mpfr_version=mpfr-2.4.2 - set mpc_version=mpc-0.8.1 + set gcc_version=gcc-4.6.1 + set gmp_version=gmp-5.0.2 + set mpfr_version=mpfr-3.0.1 + set mpc_version=mpc-0.9 breaksw case Gcc45: case Gcc45++0x: @@ -236,8 +236,8 @@ case ThirdParty: # using clang - not gcc setenv WM_CC 'clang' setenv WM_CXX 'clang++' - set clang_version=llvm-2.9 - #set clang_version=llvm-svn + #set clang_version=llvm-2.9 + set clang_version=llvm-svn breaksw default: echo diff --git a/etc/config/settings.sh b/etc/config/settings.sh index 4e801efd8323bb43d7707972fcd4594b78d3df6b..bc87934f5bb95ac980d76dbf866f310055078370 100644 --- a/etc/config/settings.sh +++ b/etc/config/settings.sh @@ -228,10 +228,11 @@ OpenFOAM | ThirdParty) mpfr_version=mpfr-2.4.2 ;; Gcc46 | Gcc46++0x) - gcc_version=gcc-4.6.0 - gmp_version=gmp-5.0.1 - mpfr_version=mpfr-2.4.2 - mpc_version=mpc-0.8.1 + gcc_version=gcc-4.6.1 + gmp_version=gmp-5.0.2 + mpfr_version=mpfr-3.0.1 + mpc_version=mpc-0.9 + gmpPACKAGE=gmp-5.0.2 ;; Gcc45 | Gcc45++0x) gcc_version=gcc-4.5.2 @@ -253,8 +254,8 @@ OpenFOAM | ThirdParty) # using clang - not gcc export WM_CC='clang' export WM_CXX='clang++' - clang_version=llvm-2.9 - #clang_version=llvm-svn + #clang_version=llvm-2.9 + clang_version=llvm-svn ;; *) echo diff --git a/etc/controlDict b/etc/controlDict index a4880c4b9d8ce4db631a39b8bd6bfe7d037447b9..4f2a8814885645da47e5efe6b798c7114013ab3b 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -24,7 +24,6 @@ Documentation "$WM_PROJECT_USER_DIR/html" "~OpenFOAM/html" "$WM_PROJECT_DIR/doc/Doxygen/html" - "$WM_PROJECT_DIR/doc/doxygen/html" ); doxySourceFileExts ( @@ -38,6 +37,7 @@ InfoSwitches { writePrecision 6; writeJobInfo 0; + writeDictionaries 0; // Allow case-supplied C++ code (#codeStream, codedFixedValue) allowSystemOperations 0; diff --git a/etc/cshrc b/etc/cshrc index 658f93da69e82480f79880c6cd94afe62665d545..455099df5f78f7fd67540eb467f04ba67ba61455 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -31,7 +31,7 @@ #------------------------------------------------------------------------------ setenv WM_PROJECT OpenFOAM -setenv WM_PROJECT_VERSION dev +setenv WM_PROJECT_VERSION dev.cvm #dev ################################################################################ # USER EDITABLE PART: Changes made here may be lost with the next upgrade diff --git a/src/OSspecific/POSIX/POSIX.C b/src/OSspecific/POSIX/POSIX.C index c79d8f029005d6bf05733a713cbc850c012a1ea2..bc0655481183682d7b361df9e1433d8f19e1f7d6 100644 --- a/src/OSspecific/POSIX/POSIX.C +++ b/src/OSspecific/POSIX/POSIX.C @@ -264,10 +264,16 @@ bool Foam::chDir(const fileName& dir) } -Foam::fileName Foam::findEtcFile(const fileName& name, bool mandatory) +Foam::fileNameList Foam::findEtcFiles +( + const fileName& name, + bool mandatory, + bool findFirst +) { - // - // search for user files in + fileNameList results; + + // Search for user files in // * ~/.OpenFOAM/VERSION // * ~/.OpenFOAM // @@ -277,19 +283,25 @@ Foam::fileName Foam::findEtcFile(const fileName& name, bool mandatory) fileName fullName = searchDir/FOAMversion/name; if (isFile(fullName)) { - return fullName; + results.append(fullName); + if (findFirst) + { + return results; + } } fullName = searchDir/name; if (isFile(fullName)) { - return fullName; + results.append(fullName); + if (findFirst) + { + return results; + } } } - - // - // search for group (site) files in + // Search for group (site) files in // * $WM_PROJECT_SITE/VERSION // * $WM_PROJECT_SITE // @@ -301,19 +313,26 @@ Foam::fileName Foam::findEtcFile(const fileName& name, bool mandatory) fileName fullName = searchDir/FOAMversion/name; if (isFile(fullName)) { - return fullName; + results.append(fullName); + if (findFirst) + { + return results; + } } fullName = searchDir/name; if (isFile(fullName)) { - return fullName; + results.append(fullName); + if (findFirst) + { + return results; + } } } } else { - // // OR search for group (site) files in // * $WM_PROJECT_INST_DIR/site/VERSION // * $WM_PROJECT_INST_DIR/site @@ -324,20 +343,26 @@ Foam::fileName Foam::findEtcFile(const fileName& name, bool mandatory) fileName fullName = searchDir/"site"/FOAMversion/name; if (isFile(fullName)) { - return fullName; + results.append(fullName); + if (findFirst) + { + return results; + } } fullName = searchDir/"site"/name; if (isFile(fullName)) { - return fullName; + results.append(fullName); + if (findFirst) + { + return results; + } } } } - - // - // search for other (shipped) files in + // Search for other (shipped) files in // * $WM_PROJECT_DIR/etc // searchDir = getEnv("WM_PROJECT_DIR"); @@ -346,24 +371,45 @@ Foam::fileName Foam::findEtcFile(const fileName& name, bool mandatory) fileName fullName = searchDir/"etc"/name; if (isFile(fullName)) { - return fullName; + results.append(fullName); + if (findFirst) + { + return results; + } } } // Not found - // abort if the file is mandatory, otherwise return null - if (mandatory) + if (results.empty()) { - std::cerr - << "--> FOAM FATAL ERROR in Foam::findEtcFile() :" - " could not find mandatory file\n '" - << name.c_str() << "'\n\n" << std::endl; - ::exit(1); + // Abort if the file is mandatory, otherwise return null + if (mandatory) + { + std::cerr + << "--> FOAM FATAL ERROR in Foam::findEtcFiles() :" + " could not find mandatory file\n '" + << name.c_str() << "'\n\n" << std::endl; + ::exit(1); + } } - // Return null-constructed fileName rather than fileName::null - // to avoid cyclic dependencies in the construction of globals - return fileName(); + // Return list of matching paths or empty list if none found + return results; +} + + +Foam::fileName Foam::findEtcFile(const fileName& name, bool mandatory) +{ + fileNameList results(findEtcFiles(name, mandatory, true)); + + if (results.size()) + { + return results[0]; + } + else + { + return fileName(); + } } diff --git a/src/OSspecific/POSIX/fileMonitor.C b/src/OSspecific/POSIX/fileMonitor.C index cb0e8be4d758c544261ab193731b22e530d51bc9..cdf40208a455562caa547ea575754b6b11632869 100644 --- a/src/OSspecific/POSIX/fileMonitor.C +++ b/src/OSspecific/POSIX/fileMonitor.C @@ -21,9 +21,6 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -Class - fileMonitor - \*----------------------------------------------------------------------------*/ #include "fileMonitor.H" diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C index 2c5087c120cde91de2592035f556dc9dda3d6b1b..92991459a3273c9a7402cfbdb3aeedbcb631c277 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C @@ -21,12 +21,6 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -Description - IOdictionary is derived from dictionary and IOobject to give the - dictionary automatic IO functionality via the objectRegistry. To facilitate - IO, IOdictioanry is provided with a constructor from IOobject and writeData - and write functions. - \*---------------------------------------------------------------------------*/ #include "IOdictionary.H" @@ -37,84 +31,10 @@ Description defineTypeNameAndDebug(Foam::IOdictionary, 0); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -// Parallel aware reading, using non-virtual type information (typeName instead -// of type()) because of use in constructor. -void Foam::IOdictionary::readFile(const bool masterOnly) -{ - if (Pstream::master() || !masterOnly) - { - if (debug) - { - Pout<< "IOdictionary : Reading " << objectPath() - << " from file " << endl; - } - readStream(typeName) >> *this; - close(); - } - - if (masterOnly && Pstream::parRun()) - { - // Scatter master data using communication scheme - - const List<Pstream::commsStruct>& comms = - ( - (Pstream::nProcs() < Pstream::nProcsSimpleSum) - ? Pstream::linearCommunication() - : Pstream::treeCommunication() - ); - - // Master reads headerclassname from file. Make sure this gets - // transfered as well as contents. - Pstream::scatter(comms, const_cast<word&>(headerClassName())); - Pstream::scatter(comms, note()); - - // Get my communication order - const Pstream::commsStruct& myComm = comms[Pstream::myProcNo()]; - - // Reveive from up - if (myComm.above() != -1) - { - if (debug) - { - Pout<< "IOdictionary : Reading " << objectPath() - << " from processor " << myComm.above() << endl; - } - - // Note: use ASCII for now - binary IO of dictionaries is - // not currently supported - IPstream fromAbove - ( - Pstream::scheduled, - myComm.above(), - 0, - IOstream::ASCII - ); - IOdictionary::readData(fromAbove); - } - - // Send to my downstairs neighbours - forAll(myComm.below(), belowI) - { - if (debug) - { - Pout<< "IOdictionary : Sending " << objectPath() - << " to processor " << myComm.below()[belowI] << endl; - } - OPstream toBelow - ( - Pstream::scheduled, - myComm.below()[belowI], - 0, - Pstream::msgType(), - IOstream::ASCII - ); - IOdictionary::writeData(toBelow); - } - } -} +bool Foam::IOdictionary::writeDictionaries +( + Foam::debug::infoSwitch("writeDictionaries", 0) +); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.H b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.H index 581d9bec728218a85c90fe8435b3c80691f7493e..e7fecbce918e2210dacf93e1058ef691c0fc5b0d 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.H +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.H @@ -25,10 +25,10 @@ Class Foam::IOdictionary Description - IOdictionary is derived from dictionary and IOobject to give the - dictionary automatic IO functionality via the objectRegistry. To facilitate - IO, IOdictioanry is provided with a constructor from IOobject and writeData - and write functions. + IOdictionary is derived from dictionary and IOobject to give the dictionary + automatic IO functionality via the objectRegistry. To facilitate IO, + IOdictioanry is provided with a constructor from IOobject and writeData and + write functions. SourceFiles IOdictionary.C @@ -56,12 +56,17 @@ class IOdictionary public regIOobject, public dictionary { + // Private data + + static bool writeDictionaries; + // Private Member Functions - //- read dictionary from file + //- Read dictionary from file void readFile(const bool); + public: TypeName("dictionary"); diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C index 288056f63b8d5737c225345d37ee2a646456f440..b1e90be3000b86216579e4d1abcdf10a131962e9 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionaryIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,21 +21,116 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -Description - IOdictionary is derived from dictionary and IOobject to give the - dictionary automatic IO functionality via the objectRegistry. To facilitate - IO, IOdictioanry is provided with a constructor from IOobject and writeData - and write functions. - \*---------------------------------------------------------------------------*/ #include "IOdictionary.H" +#include "Pstream.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +// Parallel aware reading, using non-virtual type information (typeName instead +// of type()) because of use in constructor. +void Foam::IOdictionary::readFile(const bool masterOnly) +{ + if (Pstream::master() || !masterOnly) + { + if (debug) + { + Pout<< "IOdictionary : Reading " << objectPath() + << " from file " << endl; + } + readStream(typeName) >> *this; + close(); + + if (writeDictionaries && Pstream::master()) + { + Sout<< nl + << "--- IOdictionary " << name() + << ' ' << objectPath() << ":" << nl; + writeHeader(Sout); + writeData(Sout); + Sout<< "--- End of IOdictionary " << name() << nl << endl; + } + } + + if (masterOnly && Pstream::parRun()) + { + // Scatter master data using communication scheme + + const List<Pstream::commsStruct>& comms = + ( + (Pstream::nProcs() < Pstream::nProcsSimpleSum) + ? Pstream::linearCommunication() + : Pstream::treeCommunication() + ); + + // Master reads headerclassname from file. Make sure this gets + // transfered as well as contents. + Pstream::scatter(comms, const_cast<word&>(headerClassName())); + Pstream::scatter(comms, note()); + + // Get my communication order + const Pstream::commsStruct& myComm = comms[Pstream::myProcNo()]; -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // Reveive from up + if (myComm.above() != -1) + { + if (debug) + { + Pout<< "IOdictionary : Reading " << objectPath() + << " from processor " << myComm.above() << endl; + } + + // Note: use ASCII for now - binary IO of dictionaries is + // not currently supported + IPstream fromAbove + ( + Pstream::scheduled, + myComm.above(), + 0, + IOstream::ASCII + ); + IOdictionary::readData(fromAbove); + } + + // Send to my downstairs neighbours + forAll(myComm.below(), belowI) + { + if (debug) + { + Pout<< "IOdictionary : Sending " << objectPath() + << " to processor " << myComm.below()[belowI] << endl; + } + OPstream toBelow + ( + Pstream::scheduled, + myComm.below()[belowI], + 0, + Pstream::msgType(), + IOstream::ASCII + ); + IOdictionary::writeData(toBelow); + } + } +} + + +// * * * * * * * * * * * * * * * Members Functions * * * * * * * * * * * * * // bool Foam::IOdictionary::readData(Istream& is) { is >> *this; + + if (writeDictionaries && Pstream::master() && !is.bad()) + { + Sout<< nl + << "--- IOdictionary " << name() + << ' ' << objectPath() << ":" << nl; + writeHeader(Sout); + writeData(Sout); + Sout<< "--- End of IOdictionary " << name() << nl << endl; + } + return !is.bad(); } @@ -46,4 +141,5 @@ bool Foam::IOdictionary::writeData(Ostream& os) const return os.good(); } + // ************************************************************************* // diff --git a/src/OpenFOAM/db/dictionary/entry/entry.C b/src/OpenFOAM/db/dictionary/entry/entry.C index 3bba611deeb574cde58d921f6d4fc02b7012f8d7..d9335852651710eef117c9aa071ec9ebb8fec862 100644 --- a/src/OpenFOAM/db/dictionary/entry/entry.C +++ b/src/OpenFOAM/db/dictionary/entry/entry.C @@ -39,12 +39,14 @@ int Foam::entry::disableFunctionEntries Foam::entry::entry(const keyType& keyword) : + IDLList<entry>::link(), keyword_(keyword) {} Foam::entry::entry(const entry& e) : + IDLList<entry>::link(), keyword_(e.keyword_) {} diff --git a/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C b/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C index ebbb6efb816cd4e5be1c77ad4076aa5277ae1525..34dd4e80d14a3920ad5b0fb2bcf9556aaef83b41 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C @@ -197,22 +197,25 @@ Foam::functionEntries::codeStream::getFunction } } - // all processes must wait for compile to finish - except if this - // file is only read on the master - bool masterOnly = - ( - regIOobject::fileModificationChecking - == regIOobject::timeStampMaster - ) - || ( - regIOobject::fileModificationChecking - == regIOobject::inotifyMaster - ); - - if (!masterOnly) - { + //- We don't know whether this code was from IOdictionary + // (possibly read on master only) or from e.g. Field so cannot + // decide here. + //// all processes must wait for compile to finish - except if this + //// file is only read on the master + //bool masterOnly = + // ( + // regIOobject::fileModificationChecking + // == regIOobject::timeStampMaster + // ) + // || ( + // regIOobject::fileModificationChecking + // == regIOobject::inotifyMaster + // ); + // + //if (!masterOnly) + //{ reduce(create, orOp<bool>()); - } + //} if (isA<IOdictionary>(topDict(parentDict))) { diff --git a/src/OpenFOAM/db/error/StaticAssert.H b/src/OpenFOAM/db/error/StaticAssert.H index beab97f85d79be1f2aa0151e21aaccf29834133d..5d209d3f93161a559fb4830649c4ff6851532915 100644 --- a/src/OpenFOAM/db/error/StaticAssert.H +++ b/src/OpenFOAM/db/error/StaticAssert.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::StaticAssertFailed + Foam::StaticAssertionFailed Description Macros and classes to provide static (compile-time) assertions. diff --git a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C index e2ed73d47492d435e8def988419e1ddb71175fbc..b5787448889bfaecb2b4ba40f8cd51cf3597821b 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C +++ b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C @@ -98,7 +98,7 @@ Foam::Istream& Foam::regIOobject::readStream() } } - // Mark as uptodate if read succesfully + // Mark as uptodate if read successfully if (watchIndex_ != -1) { time().setUnmodified(watchIndex_); @@ -173,7 +173,7 @@ bool Foam::regIOobject::read() // Note: cannot do anything in readStream itself since this is used by // e.g. GeometricField. - bool masterOnly = + bool masterOnly = regIOobject::fileModificationChecking == timeStampMaster || regIOobject::fileModificationChecking == inotifyMaster; diff --git a/src/OpenFOAM/db/typeInfo/className.H b/src/OpenFOAM/db/typeInfo/className.H index f14cc6100c124809065acf8b1cfe2e1f6050ef65..d4b87023d298b2655e23691cbd915844e73d145a 100644 --- a/src/OpenFOAM/db/typeInfo/className.H +++ b/src/OpenFOAM/db/typeInfo/className.H @@ -119,7 +119,6 @@ public: \ defineTypeNameWithName(Type, Name) //- Define the typeName as \a Name for template sub-classes # define defineTemplate2TypeNameWithName(Type, Name) \ - template<> \ template<> \ defineTypeNameWithName(Type, Name) #endif @@ -161,7 +160,6 @@ public: \ defineDebugSwitchWithName(Type, Name, DebugSwitch) //- Define the debug information for templates sub-classes, lookup as \a Name # define defineTemplate2DebugSwitchWithName(Type, Name, DebugSwitch) \ - template<> \ template<> \ defineDebugSwitchWithName(Type, Name, DebugSwitch) #endif diff --git a/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneField.H b/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneField.H index 76b096cb1ecba4793f4972650b2714d5b4a92b8d..ff2a76025ab89b06a2c58551889eb163d0e21c53 100644 --- a/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneField.H +++ b/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneField.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::GeometricField + Foam::geometricOneField Description A class representing the concept of a GeometricField of 1 used to avoid diff --git a/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroField.H b/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroField.H index ec7c6ff48a58f843cb0212b9d67e7b079ae937d9..c42891a7fad5d1c068dcccaee5bcf6267d104b74 100644 --- a/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroField.H +++ b/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroField.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::GeometricField + Foam::geometricZeroField Description A class representing the concept of a GeometricField of 1 used to avoid diff --git a/src/OpenFOAM/global/debug/debug.C b/src/OpenFOAM/global/debug/debug.C index b0c696987a9cbecec50621ce942a2f56d183b544..2cd9c861feb4e43326416d40e3d0001c5f4be369 100644 --- a/src/OpenFOAM/global/debug/debug.C +++ b/src/OpenFOAM/global/debug/debug.C @@ -75,10 +75,15 @@ Foam::dictionary& Foam::debug::controlDict() { if (!controlDictPtr_) { - controlDictPtr_ = new dictionary - ( - IFstream(findEtcFile("controlDict", true))() - ); + fileNameList controlDictFiles = findEtcFiles("controlDict", true); + controlDictPtr_ = new dictionary(); + forAllReverse(controlDictFiles, cdfi) + { + controlDictPtr_->merge + ( + dictionary(IFstream(controlDictFiles[cdfi])()) + ); + } } return *controlDictPtr_; diff --git a/src/OpenFOAM/include/OSspecific.H b/src/OpenFOAM/include/OSspecific.H index b77499733974b480a3b6277cd484e5a5756728dc..5491223fcd412bdfb4d24af3dccf8989e0d1ef6d 100644 --- a/src/OpenFOAM/include/OSspecific.H +++ b/src/OpenFOAM/include/OSspecific.H @@ -93,7 +93,7 @@ fileName cwd(); // else return false bool chDir(const fileName& dir); -//- Search for a file from user/group/shipped directories. +//- Search for files from user/group/shipped directories. // The search scheme allows for version-specific and // version-independent files using the following hierarchy: // - \b user settings: @@ -108,8 +108,21 @@ bool chDir(const fileName& dir); // - \b other (shipped) settings: // - $WM_PROJECT_DIR/etc/ // -// \return The full path name or fileName() if the name cannot be found -// Optionally abort if the file cannot be found +// \return The list of full paths of all the matching files or +// an empty list if the name cannot be found. +// Optionally abort if the file cannot be found. +// Optionally stop search after the first file has been found. +fileNameList findEtcFiles +( + const fileName&, + bool mandatory=false, + bool findFirst=false +); + +//- Search for a file using findEtcFiles. +// \return The full path name of the first file found in the +// search hierarchy or an empty fileName if the name cannot be found. +// Optionally abort if the file cannot be found. fileName findEtcFile(const fileName&, bool mandatory=false); //- Make a directory and return an error if it could not be created diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.H b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.H index 8e1c8a056104a9aff92e0fe1585ff9293bd6193d..0a9aae4cd5f6ad4d2be84ea7d79a781122b74911 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.H +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.H @@ -21,9 +21,6 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -Class - Foam::tableReader - SourceFiles tableReaders.C diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C index 9321959b2d271cf1a02e783c422818353531622d..d49d26d9f2b07080c8be3ded37261ce8f768ee5e 100644 --- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C @@ -1352,10 +1352,10 @@ void Foam::syncTools::syncBoundaryFaceList label sz = cycPatch.size(); // Transform (copy of) data on both sides - Field<T> ownVals(SubField<T>(faceValues, sz, ownStart)); + Field<T> ownVals = SubField<T>(faceValues, sz, ownStart); top(nbrPatch, ownVals); - Field<T> nbrVals(SubField<T>(faceValues, sz, nbrStart)); + Field<T> nbrVals = SubField<T>(faceValues, sz, nbrStart); top(cycPatch, nbrVals); label i0 = ownStart; diff --git a/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.H b/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.H index 4f02043dab0c1c44ddc577e31c8664482810a890..1ee3d72ee9da380473d1bddbc334ca96feb6ece2 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::cellZone + Foam::zone Description Base class for zones diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H index 741416c42660eaaef6a82f878c209bc7aaac780f..020cf25bbbb809288cdeda6235ea30aebba64223 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H @@ -512,7 +512,7 @@ Foam::labelList Foam::globalIndexAndTransform::transformIndicesForPatches } } - label nUsedTrans = sum(mag(permutation)); + label nUsedTrans = round(sum(mag(permutation))); if (nUsedTrans == 0) { diff --git a/src/combustionModels/FSD/FSD.C b/src/combustionModels/FSD/FSD.C new file mode 100644 index 0000000000000000000000000000000000000000..32dab1eece465a7770640b029f05b5d8059ca6bb --- /dev/null +++ b/src/combustionModels/FSD/FSD.C @@ -0,0 +1,366 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "FSD.H" +#include "addToRunTimeSelectionTable.H" +#include "LESModel.H" + +namespace Foam +{ +namespace combustionModels +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CombThermoType, class ThermoType> +FSD<CombThermoType, ThermoType>::FSD +( + const word& modelType, const fvMesh& mesh +) +: + singleStepCombustion<CombThermoType, ThermoType>(modelType, mesh), + reactionRateFlameArea_ + ( + reactionRateFlameArea::New + ( + this->coeffs(), + this->mesh(), + *this + ) + ), + ft_ + ( + IOobject + ( + "ft", + this->mesh().time().timeName(), + this->mesh(), + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + this->mesh(), + dimensionedScalar("zero", dimless, 0.0) + ), + YFuelFuelStream_ + ( + dimensionedScalar("YFuelStream", dimless, 1.0) + ), + YO2OxiStream_ + ( + dimensionedScalar("YOxiStream", dimless, 0.23) + ), + Cv_(readScalar(this->coeffs().lookup("Cv"))), + C_(5.0), + ftMin_(0.0), + ftMax_(1.0), + ftDim_(300), + ftVarMin_(readScalar(this->coeffs().lookup("ftVarMin"))) +{} + + +// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // + +template<class CombThermoType, class ThermoType> +FSD<CombThermoType, ThermoType>::~FSD() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +template<class CombThermoType, class ThermoType> +void FSD<CombThermoType, ThermoType>::calculateSourceNorm() +{ + this->singleMixture_.fresCorrect(); + + const label fuelI = this->singleMixture_.fuelIndex(); + + const volScalarField& YFuel = this->thermo_->composition().Y()[fuelI]; + + const volScalarField& YO2 = this->thermo_->composition().Y("O2"); + + const dimensionedScalar s = this->singleMixture_.s(); + + ft_ = + (s*YFuel - (YO2 - YO2OxiStream_))/(s*YFuelFuelStream_ + YO2OxiStream_); + + + volVectorField nft(fvc::grad(ft_)); + + volScalarField mgft(mag(nft)); + + surfaceVectorField SfHat(this->mesh().Sf()/this->mesh().magSf()); + + volScalarField cAux(scalar(1) - ft_); + + dimensionedScalar dMgft = 1.0e-3* + (ft_*cAux*mgft)().weightedAverage(this->mesh().V()) + /((ft_*cAux)().weightedAverage(this->mesh().V()) + SMALL) + + dimensionedScalar("ddMgft", mgft.dimensions(), SMALL); + + mgft += dMgft; + + nft /= mgft; + + const volVectorField& U = YO2.db().lookupObject<volVectorField>("U"); + + const volScalarField sigma + ( + (nft & nft)*fvc::div(U) - (nft & fvc::grad(U) & nft) + ); + + reactionRateFlameArea_->correct(sigma); + + const volScalarField& omegaFuel = reactionRateFlameArea_->omega(); + + + const scalar ftStoich = + YO2OxiStream_.value() + /( + s.value()*YFuelFuelStream_.value() + YO2OxiStream_.value() + ); + + tmp<volScalarField> tPc + ( + new volScalarField + ( + IOobject + ( + "Pc", + U.time().timeName(), + U.db(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + U.mesh(), + dimensionedScalar("Pc", dimless, 0) + ) + ); + + volScalarField& pc = tPc(); + + tmp<volScalarField> tomegaFuel + ( + new volScalarField + ( + IOobject + ( + "omegaFuelBar", + U.time().timeName(), + U.db(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + U.mesh(), + dimensionedScalar + ( + "omegaFuelBar", + omegaFuel.dimensions(), + 0 + ) + ) + ); + + volScalarField& omegaFuelBar = tomegaFuel(); + + // Calculation of the mixture fraction variance (ftVar) + const compressible::LESModel& lesModel = + YO2.db().lookupObject<compressible::LESModel>("LESProperties"); + + const volScalarField& delta = lesModel.delta(); + const volScalarField ftVar(Cv_*sqr(delta)*sqr(mgft)); + + // Thickened flame (average flame thickness for counterflow configuration + // is 1.5 mm) + + volScalarField deltaF + ( + lesModel.delta()/dimensionedScalar("flame",dimLength, 1.5e-3) + ); + + // Linear correlation between delta and flame thickness + volScalarField omegaF(max(deltaF*(4.0/3.0) + (2.0/3.0), 1.0)); + + scalar deltaFt = 1.0/ftDim_; + + forAll(ft_, cellI) + { + if(ft_[cellI] > ftMin_ && ft_[cellI] < ftMax_) + { + scalar ftCell = ft_[cellI]; + + if(ftVar[cellI] > ftVarMin_) //sub-grid beta pdf of ft_ + { + scalar ftVarc = ftVar[cellI]; + scalar a = + max(ftCell*(ftCell*(1.0 - ftCell)/ftVarc - 1.0), 0.0); + scalar b = max(a/ftCell - a, 0.0); + + for(int i=1; i<ftDim_; i++) + { + scalar ft = i*deltaFt; + pc[cellI] += pow(ft, a-1.0)*pow(1.0 - ft, b - 1.0)*deltaFt; + } + + for(int i=1; i<ftDim_; i++) + { + scalar ft = i*deltaFt; + omegaFuelBar[cellI] += + omegaFuel[cellI]/omegaF[cellI] + *exp + ( + -sqr(ft - ftStoich) + /(2.0*sqr(0.01*omegaF[cellI])) + ) + *pow(ft, a - 1.0) + *pow(1.0 - ft, b - 1.0) + *deltaFt; + } + omegaFuelBar[cellI] /= max(pc[cellI], 1e-4); + } + else + { + omegaFuelBar[cellI] = + (omegaFuel[cellI]/omegaF[cellI]) + *exp + ( + -sqr(ftCell - ftStoich)/(2.0*sqr(0.01*omegaF[cellI])) + ); + } + + } + else + { + omegaFuelBar[cellI] = 0.0; + } + } + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Combustion progress variable (c). +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + List<label> productsIndex(2, -1); + { + label i = 0; + forAll (this->singleMixture_.specieProd(), specieI) + { + if (this->singleMixture_.specieProd()[specieI] < 0) + { + productsIndex[i] = specieI; + i++; + } + } + } + + + // Flamelet probability of the progress c based on IFC (reuse pc) + scalar YprodTotal = 0; + forAll (productsIndex, j) + { + YprodTotal += this->singleMixture_.Yprod0()[productsIndex[j]]; + } + + forAll(ft_, cellI) + { + if(ft_[cellI] < ftStoich) + { + pc[cellI] = ft_[cellI]*(YprodTotal/ftStoich); + } + else + { + pc[cellI] = (1.0 - ft_[cellI])*(YprodTotal/(1.0 - ftStoich)); + } + } + + tmp<volScalarField> tproducts + ( + new volScalarField + ( + IOobject + ( + "products", + U.time().timeName(), + U.db(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + U.mesh(), + dimensionedScalar("products", dimless, 0) + ) + ); + + volScalarField& products = tproducts(); + + forAll (productsIndex, j) + { + label specieI = productsIndex[j]; + const volScalarField& Yp = this->thermo_->composition().Y()[specieI]; + products += Yp; + } + + volScalarField c(max(scalar(1.0) - products/max(pc, 1e-5), 0.0)); + + pc = min(C_*c, scalar(1.0)); + + const volScalarField fres(this->singleMixture_.fres(fuelI)); + + this->wFuel_ == mgft*pc*omegaFuelBar; +} + + +template<class CombThermoType, class ThermoType> +void FSD<CombThermoType, ThermoType>::correct() +{ + this->wFuel_ == + dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0); + + if (this->active()) + { + calculateSourceNorm(); + } +} + + +template<class CombThermoType, class ThermoType> +bool FSD<CombThermoType, ThermoType>::read() +{ + if (singleStepCombustion<CombThermoType, ThermoType>::read()) + { + this->coeffs().lookup("Cv") >> Cv_ ; + this->coeffs().lookup("ftVarMin") >> ftVarMin_; + reactionRateFlameArea_->read(this->coeffs()); + return true; + } + else + { + return false; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace combustionModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/FSD/FSD.H b/src/combustionModels/FSD/FSD.H new file mode 100644 index 0000000000000000000000000000000000000000..f727790e62de229c9b52dd0c2cf741b5e3b78ef1 --- /dev/null +++ b/src/combustionModels/FSD/FSD.H @@ -0,0 +1,173 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::combustionModels::FSD + +Description + + Flame Surface Dennsity (FDS) combustion model. + + The fuel source term is given by mgft*pc*omegaFuelBar. + + where: + mgft: filtered flame area. + pc: probability of the combustion progress. + omegaFuelBar: filtered consumption speed per unit of flame area. + + pc is considered from the IFC solution. + omegaFuelBar is calculated solving a relaxation equation which tends to + omegaEq. This omegaEq is obtained from the flamelet solution for + different strain rates and fit using a expential distribution. + + The spacial distribution of the consumption speed (omega) is obtained also + from a strained flamelet solution and it is assumed to have a guassian + distribution. + + If the grid resolution is not enough to resolve the flame, the consumption + speed distribution is linearly thickened conserving the overall heat + release. + + If the turbulent fluctuation of the mixture fraction at the sub-grid level + is large (>1E-04) then a beta pdf is used for filtering. + + At the moment the flame area combustion model is only fit to work in a LES + frame work. In RAS the subgrid fluctiuation has to be solved by an extra + transport equation. + +SourceFiles + FSD.C + +\*---------------------------------------------------------------------------*/ + +#ifndef FSD_H +#define FSD_H + +#include "singleStepCombustion.H" +#include "reactionRateFlameArea.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace combustionModels +{ + +/*---------------------------------------------------------------------------*\ + Class FSD Declaration +\*---------------------------------------------------------------------------*/ + +template<class CombThermoType, class ThermoType> +class FSD +: + public singleStepCombustion <CombThermoType, ThermoType> +{ + // Private data + + //- Auto pointer to consumption speed per unit of flame area model + autoPtr<reactionRateFlameArea> reactionRateFlameArea_; + + //- Mixture fraction + volScalarField ft_; + + //- Fuel mass concentration on the fuel stream + dimensionedScalar YFuelFuelStream_; + + //- Oxygen mass concentration on the oxydizer stream + dimensionedScalar YO2OxiStream_; + + //- Similarity constant for the sub-grid ft fluctuations + scalar Cv_; + + //- Model constant + scalar C_; + + //- Lower flammability limit + scalar ftMin_; + + //- Upper flammability limit + scalar ftMax_; + + //- Dimension of the ft space. Used to integrate the beta-pdf + scalar ftDim_; + + //- Minimum mixture freaction variance to calculate pdf + scalar ftVarMin_; + + + // Private Member Functions + + //- Calculate the normalised fuel source term + void calculateSourceNorm(); + + //- Disallow copy construct + FSD(const FSD&); + + //- Disallow default bitwise assignment + void operator=(const FSD&); + + +public: + + //- Runtime type information + TypeName("FSD"); + + + // Constructors + + //- Construct from components + FSD(const word& modelType, const fvMesh& mesh); + + + // Destructor + virtual ~FSD(); + + + // Evolution + + //- Correct combustion rate + virtual void correct(); + + + // I-O + + //- Update properties + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace combustionModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "FSD.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/combustionModels/FSD/FSDs.C b/src/combustionModels/FSD/FSDs.C new file mode 100644 index 0000000000000000000000000000000000000000..1d8527216914816be38b646e33b1277a99d81c06 --- /dev/null +++ b/src/combustionModels/FSD/FSDs.C @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "makeCombustionTypes.H" + +#include "thermoPhysicsTypes.H" +#include "psiCombustionModel.H" +#include "FSD.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace combustionModels +{ + makeCombustionTypesThermo + ( + FSD, + psiCombustionModel, + gasThermoPhysics + ); + +} +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C new file mode 100644 index 0000000000000000000000000000000000000000..db8b464457303f8d78e03762923e623236eafe9e --- /dev/null +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C @@ -0,0 +1,137 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "consumptionSpeed.H" + +/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ + +namespace Foam +{ + defineTypeNameAndDebug(consumptionSpeed, 0); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::consumptionSpeed::consumptionSpeed +( + const dictionary& dict +) +: omega0_(readScalar(dict.lookup("omega0"))), + eta_(readScalar(dict.lookup("eta"))), + sigmaExt_(readScalar(dict.lookup("sigmaExt"))), + omegaMin_(readScalar(dict.lookup("omegaMin"))) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::consumptionSpeed::~consumptionSpeed() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +Foam::scalar Foam::consumptionSpeed::omega0Sigma +( + scalar sigma, + scalar a +) const +{ + scalar omega0 = 0.0; + if (sigma < sigmaExt_) + { + omega0 = + max + ( + a*omega0_*(1.0 - exp(eta_*max(sigma, 0.0))), + omegaMin_ + ) ; + } + return omega0; +} + + +Foam::tmp<Foam::volScalarField> Foam::consumptionSpeed::omega0Sigma +( + const volScalarField& sigma +) +{ + tmp<volScalarField> tomega0 + ( + new volScalarField + ( + IOobject + ( + "omega0", + sigma.time().timeName(), + sigma.db(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + sigma.mesh(), + dimensionedScalar + ( + "omega0", + dimensionSet(1, -2, -1, 0, 0, 0, 0), + 0 + ) + ) + ); + + volScalarField& omega0 = tomega0(); + + forAll(omega0, celli) + { + omega0[celli] = omega0Sigma(sigma[celli], 1.0); + } + + forAll(omega0.boundaryField(), patchi) + { + forAll(omega0.boundaryField()[patchi], facei) + { + omega0.boundaryField()[patchi][facei] = + omega0Sigma + ( + sigma.boundaryField()[patchi][facei], + 1.0 + ); + } + } + + return tomega0; +} + + +void Foam::consumptionSpeed::read(const dictionary& dict) +{ + dict.lookup("omega0") >> omega0_ ; + dict.lookup("eta") >> eta_ ; + dict.lookup("sigmaExt") >> sigmaExt_; + dict.lookup("omegaMin") >> omegaMin_; +} + +// ************************************************************************* // diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.H b/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.H new file mode 100644 index 0000000000000000000000000000000000000000..80c0dc9a486c71bce9bf63fe673e1ca8271fa4d6 --- /dev/null +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.H @@ -0,0 +1,139 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::reactionRateFlameAreaModels::consumptionSpeed + +Description + Correlation function for laminar consumption speed obtained from flamelet + solution at increasing strain rates. + +SourceFiles + consumptionSpeed.C + +\*---------------------------------------------------------------------------*/ + +#ifndef consumptionSpeed_H +#define consumptionSpeed_H + +#include "IOdictionary.H" +#include "volFields.H" +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class consumptionSpeed Declaration +\*---------------------------------------------------------------------------*/ + +class consumptionSpeed +{ + // Private Data + + + //- Maximum consumption speed + scalar omega0_; + + //- Exponential factor + scalar eta_; + + //- Extinction strain + scalar sigmaExt_; + + //- Minimum consumption speed + scalar omegaMin_; + + + // Private member functions + + //- Return consumption rate + scalar omega0Sigma(scalar sigma, scalar a) const; + + //- Disallow copy construct + consumptionSpeed(const consumptionSpeed&); + + //- Disallow default bitwise assignment + void operator=(const consumptionSpeed&); + + +public: + + //- Runtime type information + TypeName("consumptionSpeed"); + + + // Constructors + + //- Construct from dictionary + consumptionSpeed(const dictionary& dict); + + + //- Destructor + virtual ~consumptionSpeed(); + + + // Member functions + + //- Return speed consumption rate temp + tmp<volScalarField> omega0Sigma(const volScalarField& sigma); + + + // Access functions + + scalar omega0() const + { + return omega0_; + } + + scalar eta() const + { + return eta_; + } + + scalar sigmaExt() const + { + return sigmaExt_; + } + + scalar omegaMin() const + { + return omegaMin_; + } + + + // I-O + + //- Update properties + void read(const dictionary& dict); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C new file mode 100644 index 0000000000000000000000000000000000000000..f7adc032ab067a6319fced1107349d47532f18d3 --- /dev/null +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C @@ -0,0 +1,107 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "reactionRateFlameArea.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(reactionRateFlameArea, 0); + defineRunTimeSelectionTable(reactionRateFlameArea, dictionary); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::reactionRateFlameArea::reactionRateFlameArea +( + const dictionary& dict, + const fvMesh& mesh, + const combustionModel& combModel +) +: + coeffDict_(dictionary::null), + mesh_(mesh), + combModel_(combModel), + fuel_(dict.lookup("fuel")), + omega_ + ( + IOobject + ( + "omega", + mesh_.time().timeName(), + mesh_, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh_ + ) +{ +} + + +Foam::reactionRateFlameArea::reactionRateFlameArea +( + const word& modelType, + const dictionary& dict, + const fvMesh& mesh, + const combustionModel& combModel +) +: + coeffDict_(dict.subDict(modelType + "Coeffs")), + mesh_(mesh), + combModel_(combModel), + fuel_(dict.lookup("fuel")), + omega_ + ( + IOobject + ( + "omega", + mesh_.time().timeName(), + mesh_, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh_ + ) +{ +} + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::reactionRateFlameArea::~reactionRateFlameArea() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +bool Foam::reactionRateFlameArea::read(const dictionary& dict) +{ + dict.lookup("fuel") >> fuel_; + return true; + +} + +// ************************************************************************* // diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H new file mode 100644 index 0000000000000000000000000000000000000000..6353f7241dc3c38d6154476d1151a0002f8928e5 --- /dev/null +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H @@ -0,0 +1,176 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + + +Class + Foam::reactionRateFlameArea + +Description + Abstract class for reaction rate per flame area unit + +SourceFiles + reactionRateFlameArea.C + reactionRateFlameAreaNew.C + +\*---------------------------------------------------------------------------*/ + +#ifndef reactionRateFlameArea_H +#define reactionRateFlameArea_H + +#include "runTimeSelectionTables.H" +#include "dictionary.H" +#include "autoPtr.H" +#include "volFields.H" +#include "combustionModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +class fvMesh; + +/*---------------------------------------------------------------------------*\ + Class reactionRateFlameArea Declaration +\*---------------------------------------------------------------------------*/ + +class reactionRateFlameArea +{ + +protected: + + // Protected data + + //- Dictionary + dictionary coeffDict_; + + //- Mesh reference + const fvMesh& mesh_; + + //- Combstion model owner + const combustionModel& combModel_; + + //- Fuel name + word fuel_; + + //- Fuel consumption rate per unit of flame area + volScalarField omega_; + + +private: + + // Private member functions + + //- Disallow copy construct + reactionRateFlameArea(const reactionRateFlameArea&); + + //- Disallow default bitwise assignment + void operator=(const reactionRateFlameArea&); + + +public: + + //- Runtime type information + TypeName("reactionRateFlameArea"); + + + // Declare run-time constructor selection table + + declareRunTimeSelectionTable + ( + autoPtr, + reactionRateFlameArea, + dictionary, + ( + const word modelType, + const dictionary& dict, + const fvMesh& mesh, + const combustionModel& combModel + ), + (modelType, dict, mesh, combModel) + ); + + + // Constructors + + //- Construct from dictionary and hsCombustionThermo + reactionRateFlameArea + ( + const dictionary& dict, + const fvMesh& mesh, + const combustionModel& combModel + ); + + //- Construct from components + reactionRateFlameArea + ( + const word& modelType, + const dictionary& dict, + const fvMesh& mesh, + const combustionModel& combModel + ); + + + // Selector + + static autoPtr<reactionRateFlameArea> New + ( + const dictionary& dict, + const fvMesh& mesh, + const combustionModel& combModel + ); + + + // Destructor + + virtual ~reactionRateFlameArea(); + + + // Member functions + + //- Access functions + + //- Return omega + const volScalarField& omega() const + { + return omega_; + } + + + //- Correct omega + virtual void correct(const volScalarField& sigma) = 0; + + //- Update from dictionary + virtual bool read(const dictionary& dictProperties); + +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C new file mode 100644 index 0000000000000000000000000000000000000000..bd8e28062b241c4736d9f121bcab20d76c5ec8a5 --- /dev/null +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C @@ -0,0 +1,69 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "reactionRateFlameArea.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::autoPtr<Foam::reactionRateFlameArea> Foam::reactionRateFlameArea::New +( + const dictionary& dict, + const fvMesh& mesh, + const combustionModel& combModel +) +{ + word reactionRateFlameAreaType + ( + dict.lookup("reactionRateFlameArea") + ); + + Info<< "Selecting reaction rate flame area correlation " + << reactionRateFlameAreaType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(reactionRateFlameAreaType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalIOErrorIn + ( + "reactionRateFlameArea::New(const hsCombustionThermo&)", + dict + ) << "Unknown reactionRateFlameArea type " + << reactionRateFlameAreaType << endl << endl + << "Valid reaction rate flame area types are :" << endl + << dictionaryConstructorTablePtr_->toc() + << exit(FatalIOError); + } + + const label tempOpen = reactionRateFlameAreaType.find('<'); + + const word className = reactionRateFlameAreaType(0, tempOpen); + + return autoPtr<reactionRateFlameArea> + (cstrIter()(className, dict, mesh, combModel)); +} + + +// ************************************************************************* // diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C new file mode 100644 index 0000000000000000000000000000000000000000..5a29b0fe1331a972bcf82ee4569e2a80c1411acc --- /dev/null +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C @@ -0,0 +1,159 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "relaxation.H" +#include "addToRunTimeSelectionTable.H" +#include "fvm.H" +#include "LESModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace reactionRateFlameAreaModels +{ + defineTypeNameAndDebug(relaxation, 0); + addToRunTimeSelectionTable + ( + reactionRateFlameArea, + relaxation, + dictionary + ); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::reactionRateFlameAreaModels::relaxation::relaxation +( + const word modelType, + const dictionary& dict, + const fvMesh& mesh, + const combustionModel& combModel +) +: + reactionRateFlameArea(modelType, dict, mesh, combModel), + correlation_(dict.subDict(typeName + "Coeffs").subDict(fuel_)), + C_(readScalar(dict.subDict(typeName + "Coeffs").lookup("C"))), + alpha_(readScalar(dict.subDict(typeName + "Coeffs").lookup("alpha"))) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::reactionRateFlameAreaModels::relaxation::~relaxation() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +void Foam::reactionRateFlameAreaModels::relaxation::correct +( + const volScalarField& sigma +) +{ + + dimensionedScalar omega0 + ( + "omega0", + dimensionSet(1, -2, -1, 0, 0, 0, 0), + correlation_.omega0() + ); + + dimensionedScalar sigmaExt + ( + "sigmaExt", + dimensionSet(0, 0, -1, 0, 0, 0, 0), + correlation_.sigmaExt() + ); + + dimensionedScalar omegaMin + ( + "omegaMin", + omega0.dimensions(), + 1e-4 + ); + + const compressible::LESModel& lesModel = + omega_.db().lookupObject<compressible::LESModel>("LESProperties"); + + // Total strain : resolved and sub-grid (just LES for now) + const volScalarField sigmaTotal + ( + sigma + alpha_*lesModel.epsilon()/(lesModel.k() + lesModel.kMin()) + ); + + const volScalarField omegaInf(correlation_.omega0Sigma(sigmaTotal)); + + dimensionedScalar sigma0("sigma0", sigma.dimensions(), 0.0); + + const volScalarField tau(C_*mag(sigmaTotal)); + + volScalarField Rc + ( + (tau*omegaInf*(omega0 - omegaInf) + sqr(omegaMin)*sigmaExt) + /(sqr(omega0 - omegaInf) + sqr(omegaMin)) + ); + + const volScalarField rho(combModel_.rho()); + const surfaceScalarField phi(combModel_.phi()); + + solve + ( + fvm::ddt(rho, omega_) + + fvm::div(phi, omega_, "div(phi,omega)") + == + rho*Rc*omega0 + - fvm::SuSp(rho*(tau + Rc), omega_) + ); + + omega_.min(omega0); + omega_.max(0.0); +} + + +bool Foam::reactionRateFlameAreaModels::relaxation::read +( + const dictionary& dict +) +{ + if (reactionRateFlameArea::read(dict)) + { + coeffDict_ = dict.subDict(typeName + "Coeffs"); + coeffDict_.lookup("C") >> C_; + coeffDict_.lookup("alpha") >> alpha_; + correlation_.read + ( + coeffDict_.subDict(fuel_) + ); + return true; + } + else + { + return false; + } +} + +// ************************************************************************* // diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H new file mode 100644 index 0000000000000000000000000000000000000000..3e0aea5b8b658e786bf3630a3944dcfd1086c449 --- /dev/null +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H @@ -0,0 +1,121 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::reactionRateFlameAreaModels::relaxation + +Description + Consumption rate per unit of flame area obtained from a relaxation equation + +SourceFiles + relaxation.C + +\*---------------------------------------------------------------------------*/ + +#ifndef relaxation_H +#define relaxation_H + +#include "reactionRateFlameArea.H" +#include "consumptionSpeed.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace reactionRateFlameAreaModels +{ + +/*---------------------------------------------------------------------------*\ + Class relaxation Declaration +\*---------------------------------------------------------------------------*/ + +class relaxation +: + public reactionRateFlameArea +{ + // Private Data + + //- Correlation + consumptionSpeed correlation_; + + //- Proportionality constant for time scale in the relaxation Eq. + scalar C_; + + //- Proportionality constant for sub-grid strain + scalar alpha_; + + + // Private Member Functions + + //- Disallow copy construct + relaxation(const relaxation&); + + //- Disallow default bitwise assignment + void operator=(const relaxation&); + + +public: + + //- Runtime type information + TypeName("relaxation"); + + + // Constructors + + //- Construct from dictionary and hsCombustionThermo + relaxation + ( + const word modelType, + const dictionary& dictCoeffs, + const fvMesh& mesh, + const combustionModel& combModel + ); + + + // Destructor + + virtual ~relaxation(); + + + // Member functions + + //- Correct omega + virtual void correct(const volScalarField& sigma); + + + // I-O + + //- Update properties from given dictionary + virtual bool read(const dictionary& dictProperties); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End reactionRateFlameAreaModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/combustionModels/Make/files b/src/combustionModels/Make/files index 86696b0709373fbb8bb6c63f090564f55b85d740..3bb286c7d6bb55525cdd676413d9b87ff6c3c7ec 100644 --- a/src/combustionModels/Make/files +++ b/src/combustionModels/Make/files @@ -1,9 +1,27 @@ combustionModel/combustionModel.C -combustionModel/combustionModelNew.C -infinitelyFastChemistry/infinitelyFastChemistry.C +psiCombustionModel/psiCombustionModel.C +psiCombustionModel/psiCombustionModelNew.C -noCombustion/noCombustion.C +rhoCombustionModel/rhoCombustionModel.C +rhoCombustionModel/rhoCombustionModelNew.C + +infinitelyFastChemistry/infinitelyFastChemistrys.C + +psiChemistryCombustionModel/psiChemistryCombustionModel.C +psiChemistryCombustionModel/psiChemistryCombustionModelNew.C + +rhoChemistryCombustionModel/rhoChemistryCombustionModel.C +rhoChemistryCombustionModel/rhoChemistryCombustionModelNew.C + +PaSR/PaSRs.C + +FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C +FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.C +FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C +FSD/reactionRateFlameAreaModels/relaxation/relaxation.C + +FSD/FSDs.C LIB = $(FOAM_LIBBIN)/libcombustionModels diff --git a/src/combustionModels/Make/options b/src/combustionModels/Make/options index 314c820f246e9647033b316e36cbdec038a85a08..77f96e3a4a6ae84658800f7543df20b954f4a8f1 100644 --- a/src/combustionModels/Make/options +++ b/src/combustionModels/Make/options @@ -2,8 +2,14 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels/ \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/LES/LESfilters/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ - -lfiniteVolume + -lfiniteVolume \ + -lchemistryModel diff --git a/src/combustionModels/PaSR/PaSR.C b/src/combustionModels/PaSR/PaSR.C new file mode 100644 index 0000000000000000000000000000000000000000..a33b778bab3cb62d68f5f57f7fdf1cff2b9effc4 --- /dev/null +++ b/src/combustionModels/PaSR/PaSR.C @@ -0,0 +1,253 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "PaSR.H" +#include "fvmSup.H" + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CombThermoType> +Foam::combustionModels::PaSR<CombThermoType>::PaSR +( + const word& modelType, + const fvMesh& mesh +) +: + CombThermoType(modelType, mesh), + Cmix_(this->coeffs().lookup("Cmix")), + turbulentReaction_(this->coeffs().lookup("turbulentReaction")), + kappa_ + ( + IOobject + ( + "kappa", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE, + false + ), + mesh, + dimensionedScalar("kappa", dimless, 0.0) + ), + useReactionRate_(this->coeffs().lookupOrDefault("useReactionRate", false)) +{} + + +// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // + +template<class CombThermoType> +Foam::combustionModels::PaSR<CombThermoType>::~PaSR() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + + +template<class CombThermoType> +Foam::tmp<Foam::volScalarField> +Foam::combustionModels::PaSR<CombThermoType>::tc() const +{ + return this->pChemistry_->tc(); +} + + +template<class CombThermoType> +void Foam::combustionModels::PaSR<CombThermoType>::correct() +{ + if (this->active()) + { + if (!useReactionRate_) + { + this->pChemistry_->solve + ( + this->mesh().time().value()-this->mesh().time().deltaTValue(), + this->mesh().time().deltaTValue() + ); + } + else + { + this->pChemistry_->calculate(); + } + + if (turbulentReaction_) + { + tmp<volScalarField> tepsilon(this->turbulence().epsilon()); + const volScalarField& epsilon = tepsilon(); + tmp<volScalarField> tmuEff(this->turbulence().muEff()); + const volScalarField& muEff = tmuEff(); + tmp<volScalarField> ttc(tc()); + const volScalarField& tc = ttc(); + forAll(epsilon, i) + { + if (epsilon[i] > 0) + { + const dimensionedScalar e0 + ( + "e0", + sqr(dimLength)/pow3(dimTime), SMALL + ); + + scalar tk = + Cmix_.value() + *Foam::sqrt + ( + muEff[i]/this->rho()()[i]/(epsilon[i] + e0.value()) + ); + + // Chalmers PaSR model + if (!useReactionRate_) + { + kappa_[i] = + ( this->mesh().time().deltaTValue() + tc[i]) + /( this->mesh().time().deltaTValue() + tc[i] + tk); + } + else + { + kappa_[i] = tc[i]/(tc[i] + tk); + } + } + else + { + // Return to laminar combustion + kappa_[i] = 1.0; + } + } + } + else + { + kappa_ = 1.0; + } + } +} + + +template<class CombThermoType> +Foam::tmp<Foam::fvScalarMatrix> +Foam::combustionModels::PaSR<CombThermoType>::R(const volScalarField& Y) const +{ + + tmp<fvScalarMatrix> tSu + ( + new fvScalarMatrix(Y, dimMass/dimTime) + ); + + fvScalarMatrix& Su = tSu(); + + if (this->active()) + { + const label specieI = this->thermo().composition().species()[Y.name()]; + + Su += kappa_*this->pChemistry_->RR(specieI); + } + + return tSu; +} + + +template<class CombThermoType> +Foam::tmp<Foam::volScalarField> +Foam::combustionModels::PaSR<CombThermoType>::dQ() const +{ + tmp<volScalarField> tdQ + ( + new volScalarField + ( + IOobject + ( + "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()) + { + volScalarField& dQ = tdQ(); + dQ = kappa_*this->pChemistry_->dQ(); + } + + return tdQ; +} + + +template<class CombThermoType> +Foam::tmp<Foam::volScalarField> +Foam::combustionModels::PaSR<CombThermoType>::Sh() const +{ + tmp<volScalarField> tSh + ( + new volScalarField + ( + IOobject + ( + "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()) + { + scalarField& Sh = tSh(); + Sh = kappa_*this->pChemistry_->Sh(); + } + + return tSh; +} + + +template<class CombThermoType> +bool Foam::combustionModels::PaSR<CombThermoType>::read() +{ + if (CombThermoType::read()) + { + this->coeffs().lookup("Cmix") >> Cmix_; + this->coeffs().lookup("turbulentReaction") >> turbulentReaction_; + this->coeffs().lookup("useReactionRate") >> useReactionRate_; + return true; + } + else + { + return false; + } +} + + +// ************************************************************************* // diff --git a/src/combustionModels/PaSR/PaSR.H b/src/combustionModels/PaSR/PaSR.H new file mode 100644 index 0000000000000000000000000000000000000000..4250c63a6a64283f48e6e89a2b48ef0e8a07ddd2 --- /dev/null +++ b/src/combustionModels/PaSR/PaSR.H @@ -0,0 +1,140 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::combustionModels::PaSR + +Description + Simple infinitely fast chemistry combustion model based on the principle + mixed is burnt. Additional parameter C is used to distribute the heat + release rate.in time + +SourceFiles + PaSR.C + +\*---------------------------------------------------------------------------*/ + +#ifndef PaSR_H +#define PaSR_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace combustionModels +{ + +/*---------------------------------------------------------------------------*\ + Class PaSR Declaration +\*---------------------------------------------------------------------------*/ + +template<class CombThermoType> +class PaSR +: + public CombThermoType +{ + // Private data + + //- Mixing constant + dimensionedScalar Cmix_; + + //- Turbulent reaction switch + Switch turbulentReaction_; + + //- Mixing parameter + volScalarField kappa_; + + //- Use reaction rate + bool useReactionRate_; + + + // Private Member Functions + + //- Return the chemical time scale + tmp<volScalarField> tc() const; + + //- Disallow copy construct + PaSR(const PaSR&); + + //- Disallow default bitwise assignment + void operator=(const PaSR&); + + +public: + + //- Runtime type information + TypeName("PaSR"); + + + // Constructors + + //- Construct from components + PaSR + ( + const word& modelType, + const fvMesh& mesh + ); + + + //- Destructor + virtual ~PaSR(); + + + // Member Functions + + // Evolution + + //- Correct combustion rate + virtual void correct(); + + //- Fuel consumption rate matrix. + virtual tmp<fvScalarMatrix> R(const volScalarField& Y) const; + + //- Heat release rate calculated from fuel consumption rate matrix + virtual tmp<volScalarField> dQ() const; + + //- Return source for enthalpy equation [kg/m/s3] + virtual tmp<volScalarField> Sh() const; + + // I-O + + //- Update properties from given dictionary + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace combustionModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "PaSR.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/combustionModels/PaSR/PaSRs.C b/src/combustionModels/PaSR/PaSRs.C new file mode 100644 index 0000000000000000000000000000000000000000..650ef9867609ad767bd76b06064644f1b6724219 --- /dev/null +++ b/src/combustionModels/PaSR/PaSRs.C @@ -0,0 +1,53 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "makeCombustionTypes.H" + +#include "psiChemistryCombustionModel.H" +#include "rhoChemistryCombustionModel.H" +#include "PaSR.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace combustionModels +{ + makeCombustionTypes + ( + PaSR, + psiChemistryCombustionModel + ); + + makeCombustionTypes + ( + PaSR, + rhoChemistryCombustionModel + ); +} +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/combustionModel/combustionModel.C b/src/combustionModels/combustionModel/combustionModel.C index bfccadf733d45683dcc470ebb53779bc3458452d..b87503a92478599737fc1a6c5fb610bf6100c150 100644 --- a/src/combustionModels/combustionModel/combustionModel.C +++ b/src/combustionModels/combustionModel/combustionModel.C @@ -1,153 +1,111 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "combustionModel.H" -#include "surfaceFields.H" -#include "fvScalarMatrix.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(combustionModel, 0); - defineRunTimeSelectionTable(combustionModel, dictionary); -}; - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::combustionModel::combustionModel -( - const dictionary& combustionProps, - hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho -) -: - coeffs_(dictionary::null), - thermo_(thermo), - turbulence_(turbulence), - mesh_(phi.mesh()), - phi_(phi), - rho_(rho) -{} - - -Foam::combustionModel::combustionModel -( - const word& modelType, - const dictionary& combustionProps, - hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho -) -: - coeffs_(combustionProps.subDict(modelType + "Coeffs")), - thermo_(thermo), - turbulence_(turbulence), - mesh_(phi.mesh()), - phi_(phi), - rho_(rho) -{} - - -// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // - -Foam::combustionModel::~combustionModel() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -void Foam::combustionModel::correct() -{ - // do nothing -} - - -Foam::tmp<Foam::fvScalarMatrix> Foam::combustionModel::R -( - volScalarField& Y -) const -{ - return tmp<fvScalarMatrix> - ( - new fvScalarMatrix(Y, dimMass/dimTime*Y.dimensions()) - ); -} - - -Foam::tmp<Foam::volScalarField> Foam::combustionModel::dQ() const -{ - return tmp<Foam::volScalarField> - ( - new volScalarField - ( - IOobject - ( - "dQ", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) - ) - ); -} - - -Foam::tmp<Foam::volScalarField> Foam::combustionModel::wFuelNorm() const -{ - return tmp<Foam::volScalarField> - ( - new volScalarField - ( - IOobject - ( - "wFuelNorm", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("zero", dimMass/dimTime/pow3(dimLength), 0.0) - ) - ); -} - - -bool Foam::combustionModel::read(const dictionary& combustionProps) -{ - coeffs_ = combustionProps.subDict(type() + "Coeffs"); - - return true; -} - - -// ************************************************************************* // +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "combustionModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(combustionModel, 0); +} + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::combustionModel::combustionModel +( + const word& modelType, + const fvMesh& mesh +) +: + IOdictionary + ( + IOobject + ( + "combustionProperties", + mesh.time().constant(), + mesh, + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE + ) + ), + turbulencePtr_(), + mesh_(mesh), + active_(lookupOrDefault<Switch>("active", true)), + coeffs_(subDict(modelType + "Coeffs")), + modelType_(modelType) +{} + + +// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // + +Foam::combustionModel::~combustionModel() +{ + if (turbulencePtr_) + { + turbulencePtr_ = 0; + } +} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + + +bool Foam::combustionModel::read() +{ + if (regIOobject::read()) + { + this->lookup("active") >> active_; + coeffs_ = subDict(modelType_ + "Coeffs"); + return true; + } + else + { + return false; + } +} + + +Foam::tmp<Foam::volScalarField> Foam::combustionModel::Sh() const +{ + return tmp<Foam::volScalarField> + ( + new volScalarField + ( + IOobject + ( + "Sh", + mesh_.time().timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) + ) + ); +} + + +// ************************************************************************* // diff --git a/src/combustionModels/combustionModel/combustionModel.H b/src/combustionModels/combustionModel/combustionModel.H index 28ccb85b1b82027eeb2299512b72eac101447336..7b997fce70dd06a89b61e9b89b674d213682eeae 100644 --- a/src/combustionModels/combustionModel/combustionModel.H +++ b/src/combustionModels/combustionModel/combustionModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,8 +24,7 @@ Class Foam::combustionModel Description - Base class for all non-premixed combustion models based on single step - chemistry + Base class for combustion models SourceFiles combustionModel.C @@ -36,9 +35,7 @@ SourceFiles #define combustionModel_H #include "IOdictionary.H" -#include "hsCombustionThermo.H" #include "turbulenceModel.H" -#include "runTimeSelectionTables.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -50,29 +47,28 @@ namespace Foam \*---------------------------------------------------------------------------*/ class combustionModel +: + public IOdictionary { protected: // Protected data - //- Dictionary of coefficients for the particular model - dictionary coeffs_; - - //- Reference to the thermodynamics - hsCombustionThermo& thermo_; - //- Reference to the turbulence model - const compressible::turbulenceModel& turbulence_; + compressible::turbulenceModel* turbulencePtr_; //- Reference to the mesh database const fvMesh& mesh_; - //- Reference to mass-flux field - const surfaceScalarField& phi_; + //- Active + Switch active_; - //- Reference to the density field - const volScalarField& rho_; + //- Dictionary of the model + dictionary coeffs_; + + //- Model name + const word modelType_; private: @@ -92,101 +88,66 @@ public: TypeName("combustionModel"); - // Declare run-time constructor selection table + // Constructors - declareRunTimeSelectionTable - ( - autoPtr, - combustionModel, - dictionary, - ( - const dictionary& combustionProperties, - hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho - ), - ( - combustionProperties, - thermo, - turbulence, - phi, - rho - ) - ); + //- Construct from components + combustionModel(const word& modelType, const fvMesh& mesh); - // Selectors - //- Return a reference to the selected combustion model - static autoPtr<combustionModel> New - ( - const dictionary& combustionProperties, - hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho - ); + //- Destructor + virtual ~combustionModel(); + + // Member Functions - // Constructors + // Access - //- Construct null from components - combustionModel - ( - const dictionary& combustionProps, - hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho - ); - //- Construct from components - combustionModel - ( - const word& modelType, - const dictionary& combustionProperties, - hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho - ); + //- Return const access to the mesh database + inline const fvMesh& mesh() const; + //- Return const access to phi + inline const surfaceScalarField& phi() const; - //- Destructor - virtual ~combustionModel(); + //- Return const access to rho + virtual tmp<volScalarField> rho() const = 0; + //- Return access to turbulence + inline const compressible::turbulenceModel& turbulence() const; - // Member Functions + //- Set turbulence + inline void setTurbulence + ( + compressible::turbulenceModel& turbModel + ); - // Access functions + //- Is combustion active? + inline const Switch& active() const; - //- Access combustion dictionary - const dictionary coeffs() const - { - return coeffs_; - } + //- Return const dictionary of the model + inline const dictionary& coeffs() const; // Evolution //- Correct combustion rate - virtual void correct(); + virtual void correct() = 0; //- Fuel consumption rate matrix, i.e. source term for fuel equation - virtual tmp<fvScalarMatrix> R(volScalarField& Y) const; + virtual tmp<fvScalarMatrix> R(const volScalarField& Y) const = 0; //- Heat release rate calculated from fuel consumption rate matrix - virtual tmp<volScalarField> dQ() const; + virtual tmp<volScalarField> dQ() const = 0; - //- Return normalised consumption rate of (fu - fres) - virtual tmp<Foam::volScalarField> wFuelNorm() const; + //- Return source for enthalpy equation [kg/m/s3] + virtual tmp<volScalarField> Sh() const; // I-O //- Update properties from given dictionary - virtual bool read(const dictionary& combustionProps); + virtual bool read(); }; @@ -196,6 +157,10 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#include "combustionModelI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/combustionModels/combustionModel/combustionModelI.H b/src/combustionModels/combustionModel/combustionModelI.H new file mode 100644 index 0000000000000000000000000000000000000000..208ed6d2ee61470b46b91ad5709a449dad62f551 --- /dev/null +++ b/src/combustionModels/combustionModel/combustionModelI.H @@ -0,0 +1,99 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +inline const Foam::fvMesh& Foam::combustionModel::mesh() const +{ + return mesh_; +} + + +inline const Foam::surfaceScalarField& Foam::combustionModel::phi() const +{ + if (turbulencePtr_) + { + return turbulencePtr_->phi(); + } + else + { + FatalErrorIn + ( + "const Foam::compressible::turbulenceModel& " + "Foam::combustionModel::turbulence() const " + ) << "turbulencePtr_ is empty. Please use " + << "combustionModel::setTurbulence " + << "(compressible::turbulenceModel& )" + << abort(FatalError); + + return turbulencePtr_->phi(); + } +} + + +inline const Foam::compressible::turbulenceModel& +Foam::combustionModel::turbulence() const +{ + if (turbulencePtr_) + { + return *turbulencePtr_; + } + else + { + FatalErrorIn + ( + "const Foam::compressible::turbulenceModel& " + "Foam::combustionModel::turbulence() const " + ) << "turbulencePtr_ is empty. Please use " + << "combustionModel::setTurbulence " + << "(compressible::turbulenceModel& )" + << abort(FatalError); + + return *turbulencePtr_; + } +} + + +inline const Foam::Switch& Foam::combustionModel::active() const +{ + return active_; +} + + +inline void Foam::combustionModel::setTurbulence +( + compressible::turbulenceModel& turbModel +) +{ + turbulencePtr_ = &turbModel; +} + + +inline const Foam::dictionary& Foam::combustionModel::coeffs() const +{ + return coeffs_; +} + +// ************************************************************************* // diff --git a/src/combustionModels/combustionModel/makeCombustionTypes.H b/src/combustionModels/combustionModel/makeCombustionTypes.H new file mode 100644 index 0000000000000000000000000000000000000000..f3d2ee8e24028bb0fb21e8bec72926438a5ee6fe --- /dev/null +++ b/src/combustionModels/combustionModel/makeCombustionTypes.H @@ -0,0 +1,76 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef makeCombustionTypes_H +#define makeCombustionTypes_H + +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeCombustionTypesThermo(CombModel, Comb, Thermo) \ + \ + typedef CombModel<Comb, Thermo> CombModel##Comb##Thermo; \ + \ + \ + defineTemplateTypeNameAndDebugWithName \ + ( \ + CombModel##Comb##Thermo, \ + #CombModel"<"#Comb","#Thermo">", \ + 0 \ + ); \ + \ + \ + addToRunTimeSelectionTable \ + ( \ + Comb, \ + CombModel##Comb##Thermo, \ + dictionary \ + ); + +#define makeCombustionTypes(CombModel, CombThermoType) \ + \ + typedef CombModel<CombThermoType> \ + CombModel##CombThermoType; \ + \ + defineTemplateTypeNameAndDebugWithName \ + ( \ + CombModel##CombThermoType, \ + #CombModel"<"#CombThermoType">", \ + 0 \ + ); \ + \ + addToRunTimeSelectionTable \ + ( \ + CombThermoType, \ + CombModel##CombThermoType, \ + dictionary \ + ); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C index 2748e31efa20ff9758d44b584726b4b95427d371..16c32e9e56f50f5e14c66bcda0985f4edf71658b 100644 --- a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C +++ b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,131 +23,80 @@ License \*---------------------------------------------------------------------------*/ #include "infinitelyFastChemistry.H" -#include "addToRunTimeSelectionTable.H" -#include "fvmSup.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { namespace combustionModels { - defineTypeNameAndDebug(infinitelyFastChemistry, 0); - addToRunTimeSelectionTable - ( - combustionModel, - infinitelyFastChemistry, - dictionary - ); -}; -}; - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::combustionModels::infinitelyFastChemistry::infinitelyFastChemistry +template<class CombThermoType, class ThermoType> +infinitelyFastChemistry<CombThermoType, ThermoType>::infinitelyFastChemistry ( - const dictionary& combustionProps, - hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho + const word& modelType, const fvMesh& mesh ) : - combustionModel(typeName, combustionProps, thermo, turbulence, phi, rho), - C_(readScalar(coeffs_.lookup("C"))), - singleMixture_ - ( - dynamic_cast<singleStepReactingMixture<gasThermoPhysics>&>(thermo) - ), - wFuelNorm_ - ( - IOobject - ( - "wFuelNorm", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0) - ) + singleStepCombustion<CombThermoType, ThermoType>(modelType, mesh), + C_(readScalar(this->coeffs().lookup("C"))) {} // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // -Foam::combustionModels::infinitelyFastChemistry::~infinitelyFastChemistry() +template<class CombThermoType, class ThermoType> +infinitelyFastChemistry<CombThermoType, ThermoType>::~infinitelyFastChemistry() {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -void Foam::combustionModels::infinitelyFastChemistry::correct() +template<class CombThermoType, class ThermoType> +void infinitelyFastChemistry<CombThermoType, ThermoType>::correct() { - singleMixture_.fresCorrect(); - - const label fuelI = singleMixture_.fuelIndex(); + this->wFuel_ == + dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0); - const volScalarField& YFuel = thermo_.composition().Y()[fuelI]; - - const dimensionedScalar s = singleMixture_.s(); - - if (thermo_.composition().contains("O2")) + if (this->active()) { - const volScalarField& YO2 = thermo_.composition().Y("O2"); - wFuelNorm_ == rho_/(mesh_.time().deltaT()*C_)*min(YFuel, YO2/s.value()); - } -} - - -Foam::tmp<Foam::fvScalarMatrix> -Foam::combustionModels::infinitelyFastChemistry::R(volScalarField& Y) const -{ - const label specieI = thermo_.composition().species()[Y.name()]; - - const label fNorm = singleMixture_.specieProd()[specieI]; - - const volScalarField fres(singleMixture_.fres(specieI)); + this->singleMixture_.fresCorrect(); - const volScalarField wSpecie - ( - wFuelNorm_*singleMixture_.specieStoichCoeffs()[specieI] - / max(fNorm*(Y - fres), scalar(0.001)) - ); + const label fuelI = this->singleMixture_.fuelIndex(); - return -fNorm*wSpecie*fres + fNorm*fvm::Sp(wSpecie, Y); -} + const volScalarField& YFuel = this->thermo_->composition().Y()[fuelI]; + const dimensionedScalar s = this->singleMixture_.s(); -Foam::tmp<Foam::volScalarField> -Foam::combustionModels::infinitelyFastChemistry::dQ() const -{ - const label fuelI = singleMixture_.fuelIndex(); - volScalarField& YFuel = thermo_.composition().Y(fuelI); + if (this->thermo_->composition().contains("O2")) + { + const volScalarField& YO2 = this->thermo_->composition().Y("O2"); - return -singleMixture_.qFuel()*(R(YFuel) & YFuel); + this->wFuel_ == + this->rho()/(this->mesh().time().deltaT()*C_) + *min(YFuel, YO2/s.value()); + } + } } -Foam::tmp<Foam::volScalarField> -Foam::combustionModels::infinitelyFastChemistry::wFuelNorm() const +template<class CombThermoType, class ThermoType> +bool infinitelyFastChemistry<CombThermoType, ThermoType>::read() { - return wFuelNorm_; + if (singleStepCombustion<CombThermoType, ThermoType>::read()) + { + this->coeffs().lookup("C") >> C_ ; + return true; + } + else + { + return false; + } } -bool Foam::combustionModels::infinitelyFastChemistry::read -( - const dictionary& combustionProps -) -{ - combustionModel::read(combustionProps); - coeffs_.lookup("C") >> C_ ; - - return true; -} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace combustionModels +} // End namespace Foam -// ************************************************************************* // +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H index 304dba46a3bbae9c610588fd9890cb648cee7bf2..3293089a621c2a37b8ef6b1b60c24d2e6a3ad0ea 100644 --- a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H +++ b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,10 +35,7 @@ SourceFiles #ifndef infinitelyFastChemistry_H #define infinitelyFastChemistry_H - -#include "combustionModel.H" -#include "singleStepReactingMixture.H" -#include "thermoPhysicsTypes.H" +#include "singleStepCombustion.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -51,21 +48,16 @@ namespace combustionModels Class infinitelyFastChemistry Declaration \*---------------------------------------------------------------------------*/ +template<class CombThermoType, class ThermoType> class infinitelyFastChemistry : - public combustionModel + public singleStepCombustion <CombThermoType, ThermoType> { // Private data //- Model constant scalar C_; - //- Reference to singleStepReactingMixture mixture - singleStepReactingMixture<gasThermoPhysics>& singleMixture_; - - //- Normalised consumption rate of (fu - fres) - volScalarField wFuelNorm_; - // Private Member Functions @@ -87,11 +79,7 @@ public: //- Construct from components infinitelyFastChemistry ( - const dictionary& combustionProps, - hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho + const word& modelType, const fvMesh& mesh ); @@ -106,20 +94,11 @@ public: //- Correct combustion rate virtual void correct(); - //- Fuel consumption rate matrix, i.e. source term for fuel equation - virtual tmp<fvScalarMatrix> R(volScalarField& Y) const; - - //- Heat release rate calculated from fuel consumption rate matrix - virtual tmp<volScalarField> dQ() const; - - //- Return normalised consumption rate of (fu - fres) - virtual tmp<volScalarField> wFuelNorm() const; - // I-O - //- Update properties from given dictionary - virtual bool read(const dictionary& combustionProperties); + //- Update properties + virtual bool read(); }; @@ -128,6 +107,13 @@ public: } // End namespace combustionModels } // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "infinitelyFastChemistry.C" +#endif + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif diff --git a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistrys.C b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistrys.C new file mode 100644 index 0000000000000000000000000000000000000000..29315599f40643fa83c33ee35b8bd6b79103985e --- /dev/null +++ b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistrys.C @@ -0,0 +1,65 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "makeCombustionTypes.H" + +#include "thermoPhysicsTypes.H" +#include "psiCombustionModel.H" +#include "rhoCombustionModel.H" +#include "infinitelyFastChemistry.H" +#include "singleStepCombustion.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace combustionModels +{ + + makeCombustionTypesThermo + ( + infinitelyFastChemistry, + psiCombustionModel, + gasThermoPhysics + ); + + makeCombustionTypesThermo + ( + infinitelyFastChemistry, + psiCombustionModel, + constGasThermoPhysics + ); + + makeCombustionTypesThermo + ( + infinitelyFastChemistry, + rhoCombustionModel, + gasThermoPhysics + ); +} +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModel.C b/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModel.C new file mode 100644 index 0000000000000000000000000000000000000000..426d370b8f3ae599cd2b1e68e7739f5f0c73bb0b --- /dev/null +++ b/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModel.C @@ -0,0 +1,76 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "psiChemistryCombustionModel.H" + +/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ + +namespace Foam +{ +namespace combustionModels +{ + defineTypeNameAndDebug(psiChemistryCombustionModel, 0); + defineRunTimeSelectionTable(psiChemistryCombustionModel, dictionary); + + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +psiChemistryCombustionModel::psiChemistryCombustionModel +( + const word& modelType, + const fvMesh& mesh +) +: + combustionModel(modelType, mesh), + pChemistry_(psiChemistryModel::New(mesh)) +{} + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +psiChemistryCombustionModel::~psiChemistryCombustionModel() +{} + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + + +bool psiChemistryCombustionModel::read() +{ + if (combustionModel::read()) + { + return true; + } + else + { + return false; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam +} // End namespace combustionModels + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModel.H b/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModel.H new file mode 100644 index 0000000000000000000000000000000000000000..e345904f1cdf4793242bbf3e41c313db6811c5c0 --- /dev/null +++ b/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModel.H @@ -0,0 +1,160 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::psiChemistryCombustionModel + +Description + Combustion models for compressibility-based thermodynamics + +SourceFiles + psiChemistryCombustionModelI.H + psiChemistryCombustionModel.C + psiChemistryCombustionModelNew.C + +\*---------------------------------------------------------------------------*/ + +#ifndef psiChemistryCombustionModel_H +#define psiChemistryCombustionModel_H + +#include "combustionModel.H" +#include "autoPtr.H" +#include "runTimeSelectionTables.H" +#include "psiChemistryModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace combustionModels +{ + +/*---------------------------------------------------------------------------*\ + class psiChemistryCombustionModel Declaration +\*---------------------------------------------------------------------------*/ + +class psiChemistryCombustionModel +: + public combustionModel +{ + + // Private Member Functions + + //- Construct as copy (not implemented) + psiChemistryCombustionModel(const psiChemistryCombustionModel&); + + //- Disallow default bitwise assignment + void operator=(const psiChemistryCombustionModel&); + + +protected: + + // Protected data + + //- Auto pointer to psiChemistry + autoPtr<psiChemistryModel> pChemistry_; + + +public: + + //- Runtime type information + TypeName("psiChemistryCombustionModel"); + + + //- Declare run-time constructor selection tables + declareRunTimeSelectionTable + ( + autoPtr, + psiChemistryCombustionModel, + dictionary, + ( + const word& modelType, + const fvMesh& mesh + ), + (modelType, mesh) + ); + + + // Constructors + + + //- Construct from components and thermo + psiChemistryCombustionModel + ( + const word& modelType, + const fvMesh& mesh + ); + + + + //- Selector + static autoPtr<psiChemistryCombustionModel> New + ( + const fvMesh& mesh + ); + + + //- Destructor + virtual ~psiChemistryCombustionModel(); + + + // Member Functions + + + //- Return access to the thermo package + inline psiChemistryModel& pChemistry(); + + //- Return const access to the thermo package + inline const psiChemistryModel& pChemistry() const; + + //- Return const access to rho + inline tmp<volScalarField> rho() const; + + //- Return const access to rho + inline const hsCombustionThermo& thermo() const; + + //- Return non const access to rho + inline hsCombustionThermo& thermo(); + + + // I-O + + //- Update properties from given dictionary + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam +} // End namespace combustionModels + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "psiChemistryCombustionModelI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModelI.H b/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModelI.H new file mode 100644 index 0000000000000000000000000000000000000000..1a54dab2d26bb52ec7c227331df8850741a55ff0 --- /dev/null +++ b/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModelI.H @@ -0,0 +1,59 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +inline Foam::psiChemistryModel& +Foam::combustionModels::psiChemistryCombustionModel::pChemistry() +{ + return pChemistry_(); +} + +inline const Foam::psiChemistryModel& +Foam::combustionModels::psiChemistryCombustionModel:: +pChemistry() const +{ + return pChemistry_(); +} + +inline Foam::tmp<Foam::volScalarField> +Foam::combustionModels::psiChemistryCombustionModel::rho() const +{ + return pChemistry_->thermo().rho(); +} + +inline const Foam::hsCombustionThermo& +Foam::combustionModels::psiChemistryCombustionModel::thermo() const +{ + return pChemistry_->thermo(); +} + +inline Foam::hsCombustionThermo& +Foam::combustionModels::psiChemistryCombustionModel::thermo() +{ + return pChemistry_->thermo(); +} + +// ************************************************************************* // diff --git a/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModelNew.C b/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModelNew.C new file mode 100644 index 0000000000000000000000000000000000000000..64c60228d126d82d373e905a86fd1d48a5c84d52 --- /dev/null +++ b/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModelNew.C @@ -0,0 +1,78 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "psiChemistryCombustionModel.H" + +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr<Foam::combustionModels::psiChemistryCombustionModel> +Foam::combustionModels::psiChemistryCombustionModel::New +( + const fvMesh& mesh +) +{ + const word combModelName + ( + IOdictionary + ( + IOobject + ( + "combustionProperties", + mesh.time().constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ) + ).lookup("combustionModel") + ); + + Info<< "Selecting combustion model " << combModelName << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(combModelName); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "psiChemistryCombustionModel::New" + ) << "Unknown psiChemistryCombustionModel type " + << combModelName << endl << endl + << "Valid combustionModels are : " << endl + << dictionaryConstructorTablePtr_->toc() + << exit(FatalError); + } + + const label tempOpen = combModelName.find('<'); + + const word className = combModelName(0, tempOpen); + + return autoPtr<psiChemistryCombustionModel> + (cstrIter()(className, mesh)); +} + + +// ************************************************************************* // diff --git a/src/combustionModels/psiCombustionModel/psiCombustionModel.C b/src/combustionModels/psiCombustionModel/psiCombustionModel.C new file mode 100644 index 0000000000000000000000000000000000000000..76d52e45413158a337f54f0302cf0d2666af78df --- /dev/null +++ b/src/combustionModels/psiCombustionModel/psiCombustionModel.C @@ -0,0 +1,78 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "psiCombustionModel.H" + +/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ + +namespace Foam +{ +namespace combustionModels +{ + defineTypeNameAndDebug(psiCombustionModel, 0); + defineRunTimeSelectionTable(psiCombustionModel, dictionary); +} +} + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + + +Foam::combustionModels::psiCombustionModel::psiCombustionModel +( + const word& modelType, + const fvMesh& mesh +) +: + combustionModel(modelType, mesh), + thermo_(hsCombustionThermo::New(mesh)) +{} + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::combustionModels::psiCombustionModel::~psiCombustionModel() +{} + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + + +bool Foam::combustionModels::psiCombustionModel::read() +{ + if (combustionModel::read()) + { + return true; + } + else + { + return false; + } +} + +Foam::tmp<Foam::volScalarField> +Foam::combustionModels::psiCombustionModel::rho() const +{ + return thermo_->rho(); +} + +// ************************************************************************* // diff --git a/src/combustionModels/psiCombustionModel/psiCombustionModel.H b/src/combustionModels/psiCombustionModel/psiCombustionModel.H new file mode 100644 index 0000000000000000000000000000000000000000..aa1e26dac40fdd5c629f7ee88ed2fb6af1644a22 --- /dev/null +++ b/src/combustionModels/psiCombustionModel/psiCombustionModel.H @@ -0,0 +1,155 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::psiCombustionModel + +Description + Combustion models for compressibility-based thermodynamics + +SourceFiles + psiCombustionModelI.H + psiCombustionModel.C + psiCombustionModelNew.C + +\*---------------------------------------------------------------------------*/ + +#ifndef psiCombustionModel_H +#define psiCombustionModel_H + +#include "combustionModel.H" +#include "autoPtr.H" +#include "runTimeSelectionTables.H" +#include "hsCombustionThermo.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace combustionModels +{ + +/*---------------------------------------------------------------------------*\ + class psiCombustionModel Declaration +\*---------------------------------------------------------------------------*/ + +class psiCombustionModel +: + public combustionModel +{ + + // Private Member Functions + + //- Construct as copy (not implemented) + psiCombustionModel(const psiCombustionModel&); + + //- Disallow default bitwise assignment + void operator=(const psiCombustionModel&); + + +protected: + + // Protected data + + + //- Thermo package + autoPtr<hsCombustionThermo> thermo_; + + + + +public: + + //- Runtime type information + TypeName("psiCombustionModel"); + + + //- Declare run-time constructor selection tables + declareRunTimeSelectionTable + ( + autoPtr, + psiCombustionModel, + dictionary, + ( + const word& modelType, + const fvMesh& mesh + ), + (modelType, mesh) + ); + + + // Constructors + + + //- Construct from components and thermo + psiCombustionModel + ( + const word& modelType, + const fvMesh& mesh + ); + + + + //- Selector + static autoPtr<psiCombustionModel> New + ( + const fvMesh& mesh + ); + + + //- Destructor + virtual ~psiCombustionModel(); + + + // Member Functions + + //- Return access to the thermo package + inline hsCombustionThermo& thermo(); + + //- Return const access to the thermo package + inline const hsCombustionThermo& thermo() const; + + //- Return tmp of rho + virtual tmp<volScalarField> rho() const; + + // I-O + + //- Update properties from given dictionary + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam +} // End namespace combustionModels + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "psiCombustionModelI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/combustionModels/psiCombustionModel/psiCombustionModelI.H b/src/combustionModels/psiCombustionModel/psiCombustionModelI.H new file mode 100644 index 0000000000000000000000000000000000000000..f208d4ea29f6ad582f11f0d6fc95eef1679dbab0 --- /dev/null +++ b/src/combustionModels/psiCombustionModel/psiCombustionModelI.H @@ -0,0 +1,41 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +inline Foam::hsCombustionThermo& +Foam::combustionModels::psiCombustionModel::thermo() +{ + return thermo_(); +} + +inline const Foam::hsCombustionThermo& +Foam::combustionModels::psiCombustionModel::thermo() const +{ + return thermo_(); +} + + +// ************************************************************************* // diff --git a/src/combustionModels/psiCombustionModel/psiCombustionModelNew.C b/src/combustionModels/psiCombustionModel/psiCombustionModelNew.C new file mode 100644 index 0000000000000000000000000000000000000000..28092b4a08972061043c44f8221fe3550a0575c5 --- /dev/null +++ b/src/combustionModels/psiCombustionModel/psiCombustionModelNew.C @@ -0,0 +1,77 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "psiCombustionModel.H" + +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr<Foam::combustionModels::psiCombustionModel> +Foam::combustionModels::psiCombustionModel::New +( + const fvMesh& mesh +) +{ + const word combModelName + ( + IOdictionary + ( + IOobject + ( + "combustionProperties", + mesh.time().constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ) + ).lookup("combustionModel") + ); + + Info<< "Selecting combustion model " << combModelName << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(combModelName); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "psiCombustionModel::New" + ) << "Unknown psiCombustionModel type " + << combModelName << endl << endl + << "Valid combustionModels are : " << endl + << dictionaryConstructorTablePtr_->toc() + << exit(FatalError); + } + + const label tempOpen = combModelName.find('<'); + + const word className = combModelName(0, tempOpen); + + return autoPtr<psiCombustionModel>(cstrIter()(className, mesh)); +} + + +// ************************************************************************* // diff --git a/src/combustionModels/psiCombustionModel/psiCombustionModels.C b/src/combustionModels/psiCombustionModel/psiCombustionModels.C new file mode 100644 index 0000000000000000000000000000000000000000..6bbbb255a7e0d962a67a811224dfdde15aa94cc5 --- /dev/null +++ b/src/combustionModels/psiCombustionModel/psiCombustionModels.C @@ -0,0 +1,46 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "makeCombustionTypes.H" + +#include "psiCombustionModel.H" +#include "PaSR.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace combustionModels +{ + makeCombustionTypes + ( + infinitelyFastChemistry, + psiCombustionModel + ); +} +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModel.C b/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModel.C new file mode 100644 index 0000000000000000000000000000000000000000..f427737c8ff901a5838d034585ed57183ef9e0d3 --- /dev/null +++ b/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModel.C @@ -0,0 +1,76 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "rhoChemistryCombustionModel.H" + +/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ + +namespace Foam +{ +namespace combustionModels +{ + defineTypeNameAndDebug(rhoChemistryCombustionModel, 0); + defineRunTimeSelectionTable(rhoChemistryCombustionModel, dictionary); + + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +rhoChemistryCombustionModel::rhoChemistryCombustionModel +( + const word& modelType, + const fvMesh& mesh +) +: + combustionModel(modelType, mesh), + pChemistry_(rhoChemistryModel::New(mesh)) +{} + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +rhoChemistryCombustionModel::~rhoChemistryCombustionModel() +{} + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + + +bool rhoChemistryCombustionModel::read() +{ + if (combustionModel::read()) + { + return true; + } + else + { + return false; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam +} // End namespace combustionModels + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModel.H b/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModel.H new file mode 100644 index 0000000000000000000000000000000000000000..e288300e6df5038dcdf1f5f856f323b84c405d70 --- /dev/null +++ b/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModel.H @@ -0,0 +1,160 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::rhoChemistryCombustionModel + +Description + Combustion models for compressibility-based thermodynamics + +SourceFiles + rhoChemistryCombustionModelI.H + rhoChemistryCombustionModel.C + rhoChemistryCombustionModelNew.C + +\*---------------------------------------------------------------------------*/ + +#ifndef rhoChemistryCombustionModel_H +#define rhoChemistryCombustionModel_H + +#include "combustionModel.H" +#include "autoPtr.H" +#include "runTimeSelectionTables.H" +#include "rhoChemistryModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace combustionModels +{ + +/*---------------------------------------------------------------------------*\ + class rhoChemistryCombustionModel Declaration +\*---------------------------------------------------------------------------*/ + +class rhoChemistryCombustionModel +: + public combustionModel +{ + + // Private Member Functions + + //- Construct as copy (not implemented) + rhoChemistryCombustionModel(const rhoChemistryCombustionModel&); + + //- Disallow default bitwise assignment + void operator=(const rhoChemistryCombustionModel&); + + +protected: + + // Protected data + + //- Auto pointer to psiChemistry + autoPtr<rhoChemistryModel> pChemistry_; + + +public: + + //- Runtime type information + TypeName("rhoChemistryCombustionModel"); + + + //- Declare run-time constructor selection tables + declareRunTimeSelectionTable + ( + autoPtr, + rhoChemistryCombustionModel, + dictionary, + ( + const word& modelType, + const fvMesh& mesh + ), + (modelType, mesh) + ); + + + // Constructors + + + //- Construct from components and thermo + rhoChemistryCombustionModel + ( + const word& modelType, + const fvMesh& mesh + ); + + + + //- Selector + static autoPtr<rhoChemistryCombustionModel> New + ( + const fvMesh& mesh + ); + + + //- Destructor + virtual ~rhoChemistryCombustionModel(); + + + // Member Functions + + + //- Return access to the thermo package + inline rhoChemistryModel& pChemistry(); + + //- Return const access to the thermo package + inline const rhoChemistryModel& pChemistry() const; + + //- Return const access to rho + inline tmp<volScalarField> rho() const; + + //- Return const access to rho + inline const hsReactionThermo& thermo() const; + + //- Return non const access to rho + inline hsReactionThermo& thermo(); + + + // I-O + + //- Update properties from given dictionary + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam +} // End namespace combustionModels + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "rhoChemistryCombustionModelI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModelI.H b/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModelI.H new file mode 100644 index 0000000000000000000000000000000000000000..93c8d2ea8daba3b4ed14b8d4bba9711bd41e6663 --- /dev/null +++ b/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModelI.H @@ -0,0 +1,59 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +inline Foam::rhoChemistryModel& +Foam::combustionModels::rhoChemistryCombustionModel::pChemistry() +{ + return pChemistry_(); +} + +inline const Foam::rhoChemistryModel& +Foam::combustionModels::rhoChemistryCombustionModel:: +pChemistry() const +{ + return pChemistry_(); +} + +inline Foam::tmp<Foam::volScalarField> +Foam::combustionModels::rhoChemistryCombustionModel::rho() const +{ + return pChemistry_->thermo().rho(); +} + +inline const Foam::hsReactionThermo& +Foam::combustionModels::rhoChemistryCombustionModel::thermo() const +{ + return pChemistry_->thermo(); +} + +inline Foam::hsReactionThermo& +Foam::combustionModels::rhoChemistryCombustionModel::thermo() +{ + return pChemistry_->thermo(); +} + +// ************************************************************************* // diff --git a/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModelNew.C b/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModelNew.C new file mode 100644 index 0000000000000000000000000000000000000000..4df4146f29feb6e69f150990c1dd3958d10a691b --- /dev/null +++ b/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModelNew.C @@ -0,0 +1,78 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "rhoChemistryCombustionModel.H" + +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr<Foam::combustionModels::rhoChemistryCombustionModel> +Foam::combustionModels::rhoChemistryCombustionModel::New +( + const fvMesh& mesh +) +{ + const word combModelName + ( + IOdictionary + ( + IOobject + ( + "combustionProperties", + mesh.time().constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ) + ).lookup("combustionModel") + ); + + Info<< "Selecting combustion model " << combModelName << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(combModelName); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "rhoChemistryCombustionModel::New" + ) << "Unknown rhoChemistryCombustionModel type " + << combModelName << endl << endl + << "Valid combustionModels are : " << endl + << dictionaryConstructorTablePtr_->toc() + << exit(FatalError); + } + + const label tempOpen = combModelName.find('<'); + + const word className = combModelName(0, tempOpen); + + return autoPtr<rhoChemistryCombustionModel> + (cstrIter()(className, mesh)); +} + + +// ************************************************************************* // diff --git a/src/combustionModels/rhoCombustionModel/rhoCombustionModel.C b/src/combustionModels/rhoCombustionModel/rhoCombustionModel.C new file mode 100644 index 0000000000000000000000000000000000000000..beaebe6aa07b81564540397faac73fa49ffece4b --- /dev/null +++ b/src/combustionModels/rhoCombustionModel/rhoCombustionModel.C @@ -0,0 +1,78 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "rhoCombustionModel.H" + +/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ + +namespace Foam +{ +namespace combustionModels +{ + defineTypeNameAndDebug(rhoCombustionModel, 0); + defineRunTimeSelectionTable(rhoCombustionModel, dictionary); +} +} + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + + +Foam::combustionModels::rhoCombustionModel::rhoCombustionModel +( + const word& modelType, + const fvMesh& mesh +) +: + combustionModel(modelType, mesh), + thermo_(hsReactionThermo::New(mesh)) +{} + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::combustionModels::rhoCombustionModel::~rhoCombustionModel() +{} + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +Foam::tmp<Foam::volScalarField> +Foam::combustionModels::rhoCombustionModel::rho() const +{ + return thermo_->rho(); +} + + +bool Foam::combustionModels::rhoCombustionModel::read() +{ + if (combustionModel::read()) + { + return true; + } + else + { + return false; + } +} + +// ************************************************************************* // diff --git a/src/combustionModels/rhoCombustionModel/rhoCombustionModel.H b/src/combustionModels/rhoCombustionModel/rhoCombustionModel.H new file mode 100644 index 0000000000000000000000000000000000000000..58e499dc8a2f4af8424a2841b8d45e6b6aea546f --- /dev/null +++ b/src/combustionModels/rhoCombustionModel/rhoCombustionModel.H @@ -0,0 +1,158 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::rhoCombustionModel + +Description + Combustion models for rho-based thermodynamics + +SourceFiles + rhoCombustionModelI.H + rhoCombustionModel.C + rhoCombustionModelNew.C + +\*---------------------------------------------------------------------------*/ + +#ifndef rhoCombustionModel_H +#define rhoCombustionModel_H + +#include "combustionModel.H" +#include "autoPtr.H" +#include "runTimeSelectionTables.H" +#include "hsReactionThermo.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace combustionModels +{ + +/*---------------------------------------------------------------------------*\ + class rhoCombustionModel Declaration +\*---------------------------------------------------------------------------*/ + +class rhoCombustionModel +: + public combustionModel +{ + + // Private Member Functions + + //- Construct as copy (not implemented) + rhoCombustionModel(const rhoCombustionModel&); + + //- Disallow default bitwise assignment + void operator=(const rhoCombustionModel&); + + +protected: + + // Protected data + + //- Thermo package + autoPtr<hsReactionThermo> thermo_; + + +public: + + //- Runtime type information + TypeName("rhoCombustionModel"); + + + //- Declare run-time constructor selection tables + declareRunTimeSelectionTable + ( + autoPtr, + rhoCombustionModel, + dictionary, + ( + const word& modelType, + const fvMesh& mesh + ), + (modelType, mesh) + ); + + + // Constructors + + + //- Construct from components and thermo + rhoCombustionModel + ( + const word& modelType, + const fvMesh& mesh + ); + + + + //- Selector + static autoPtr<rhoCombustionModel> New + ( + const fvMesh& mesh + ); + + + //- Destructor + virtual ~rhoCombustionModel(); + + + // Member Functions + + // Access functions + + //- Access combustion dict + inline const dictionary& coeff() const; + + + //- Return access to the thermo package + inline hsReactionThermo& thermo(); + + //- Return const access to the thermo package + inline const hsReactionThermo& thermo() const; + + //- Return tmp of rho + virtual tmp<volScalarField> rho() const; + + // I-O + + //- Update properties from given dictionary + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam +} // End namespace combustionModels + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "rhoCombustionModelI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/combustionModels/rhoCombustionModel/rhoCombustionModelI.H b/src/combustionModels/rhoCombustionModel/rhoCombustionModelI.H new file mode 100644 index 0000000000000000000000000000000000000000..23db3695c1d371a4ccb3181f41faf784115f029e --- /dev/null +++ b/src/combustionModels/rhoCombustionModel/rhoCombustionModelI.H @@ -0,0 +1,41 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +inline Foam::hsReactionThermo& +Foam::combustionModels::rhoCombustionModel::thermo() +{ + return thermo_(); +} + +inline const Foam::hsReactionThermo& +Foam::combustionModels::rhoCombustionModel::thermo() const +{ + return thermo_(); +} + + +// ************************************************************************* // diff --git a/src/combustionModels/rhoCombustionModel/rhoCombustionModelNew.C b/src/combustionModels/rhoCombustionModel/rhoCombustionModelNew.C new file mode 100644 index 0000000000000000000000000000000000000000..5496f689253ad653eb607a8505ce1a4869aca775 --- /dev/null +++ b/src/combustionModels/rhoCombustionModel/rhoCombustionModelNew.C @@ -0,0 +1,77 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "rhoCombustionModel.H" + +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr<Foam::combustionModels::rhoCombustionModel> +Foam::combustionModels::rhoCombustionModel::New +( + const fvMesh& mesh +) +{ + const word combTypeName + ( + IOdictionary + ( + IOobject + ( + "combustionProperties", + mesh.time().constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ) + ).lookup("combustionModel") + ); + + Info<< "Selecting combustion model " << combTypeName << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(combTypeName); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "rhoCombustionModel::New" + ) << "Unknown rhoCombustionModel type " + << combTypeName << endl << endl + << "Valid combustionModels are : " << endl + << dictionaryConstructorTablePtr_->toc() + << exit(FatalError); + } + + const label tempOpen = combTypeName.find('<'); + + const word className = combTypeName(0, tempOpen); + + return autoPtr<rhoCombustionModel> (cstrIter()(className, mesh)); +} + + +// ************************************************************************* // diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.C b/src/combustionModels/singleStepCombustion/singleStepCombustion.C new file mode 100644 index 0000000000000000000000000000000000000000..b7ff05fb969e26ce0704340b58625f8a8b80b1e4 --- /dev/null +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.C @@ -0,0 +1,159 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "singleStepCombustion.H" +#include "fvmSup.H" + +namespace Foam +{ +namespace combustionModels +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CombThermoType, class ThermoType> +singleStepCombustion<CombThermoType, ThermoType> +::singleStepCombustion +( + const word& modelType, const fvMesh& mesh +) +: + CombThermoType(modelType, mesh), + singleMixture_ + ( + dynamic_cast<singleStepReactingMixture<ThermoType>&>(this->thermo()) + ), + wFuel_ + ( + IOobject + ( + "wFuel", + this->mesh().time().timeName(), + this->mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + this->mesh(), + dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0) + ) +{} + + +// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // + +template<class CombThermoType, class ThermoType> +singleStepCombustion<CombThermoType, ThermoType> +::~singleStepCombustion() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + + +template<class CombThermoType, class ThermoType> +Foam::tmp<Foam::fvScalarMatrix> +singleStepCombustion<CombThermoType, ThermoType>::R +( + const volScalarField& Y +) const +{ + const label specieI = this->thermo_->composition().species()[Y.name()]; + + const label fNorm = singleMixture_.specieProd()[specieI]; + + const volScalarField fres(singleMixture_.fres(specieI)); + + const volScalarField wSpecie + ( + wFuel_*singleMixture_.specieStoichCoeffs()[specieI] + / max(fNorm*(Y - fres), scalar(0.001)) + ); + + return -fNorm*wSpecie*fres + fNorm*fvm::Sp(wSpecie, Y); +} + + +template<class CombThermoType, class ThermoType> +Foam::tmp<Foam::volScalarField> +singleStepCombustion< CombThermoType, ThermoType>::Sh() const +{ + const label fuelI = singleMixture_.fuelIndex(); + const volScalarField& YFuel = this->thermo_->composition().Y(fuelI); + + return -singleMixture_.qFuel()*(R(YFuel) & YFuel); +} + + +template<class CombThermoType, class ThermoType> +Foam::tmp<Foam::volScalarField> +singleStepCombustion< CombThermoType, ThermoType>::dQ() const +{ + tmp<volScalarField> tdQ + ( + new volScalarField + ( + IOobject + ( + "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()) + { + volScalarField& dQ = tdQ(); + dQ.dimensionedInternalField() = this->mesh().V()*Sh()(); + } + return tdQ; +} + + +template<class CombThermoType, class ThermoType> +bool singleStepCombustion< CombThermoType, ThermoType>::read() +{ + if (CombThermoType::read()) + { + return true; + } + else + { + return false; + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace combustionModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.H b/src/combustionModels/singleStepCombustion/singleStepCombustion.H new file mode 100644 index 0000000000000000000000000000000000000000..32c4f952fcc835d4d5b8dc81c49965dcd50be151 --- /dev/null +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.H @@ -0,0 +1,132 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::combustionModels::singleStepCombustion + +Description + Base class for combustion models using singleStepReactingMixture. + +SourceFiles + singleStepCombustion.C + +\*---------------------------------------------------------------------------*/ + +#ifndef singleStepCombustion_H +#define singleStepCombustion_H + +#include "singleStepReactingMixture.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace combustionModels +{ + +/*---------------------------------------------------------------------------*\ + Class singleStepCombustion Declaration +\*---------------------------------------------------------------------------*/ + +template<class CombThermoType, class ThermoType> +class singleStepCombustion +: + public CombThermoType +{ + +protected: + + // Protected data + + //- Reference to singleStepReactingMixture mixture + singleStepReactingMixture<ThermoType>& singleMixture_; + + //- Fuel consumption rate + volScalarField wFuel_; + + +private: + + // Private Member Functions + + //- Disallow copy construct + singleStepCombustion(const singleStepCombustion&); + + //- Disallow default bitwise assignment + void operator=(const singleStepCombustion&); + + +public: + + + // Constructors + + //- Construct from components + singleStepCombustion + ( + const word& modelType, const fvMesh& mesh + ); + + + //- Destructor + virtual ~singleStepCombustion(); + + + // Member Functions + + // Evolution + + + //- Fuel consumption rate matrix + virtual tmp<fvScalarMatrix> R(const volScalarField& Y) const; + + //- Heat release rate calculated from fuel consumption rate matrix + virtual tmp<volScalarField> dQ() const; + + //- Sensible enthalpy source term + virtual tmp<volScalarField> Sh() const; + + + // I-O + + //- Update properties from given dictionary + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace combustionModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +#ifdef NoRepository +# include "singleStepCombustion.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/edgeMesh/edgeMesh.C b/src/edgeMesh/edgeMesh.C index 04f3d15da62c6a6f2b041bb754430972b8e72363..5958e1feb1296ae64408139b9269b5d17e5542c4 100644 --- a/src/edgeMesh/edgeMesh.C +++ b/src/edgeMesh/edgeMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -148,6 +148,7 @@ void Foam::edgeMesh::calcPointEdges() const Foam::edgeMesh::edgeMesh() : + fileFormats::edgeFormatsCore(), points_(0), edges_(0), pointEdgesPtr_(NULL) @@ -160,6 +161,7 @@ Foam::edgeMesh::edgeMesh const edgeList& edges ) : + fileFormats::edgeFormatsCore(), points_(points), edges_(edges), pointEdgesPtr_(NULL) @@ -172,6 +174,7 @@ Foam::edgeMesh::edgeMesh const Xfer<edgeList>& edgeLst ) : + fileFormats::edgeFormatsCore(), points_(0), edges_(0), pointEdgesPtr_(NULL) diff --git a/src/edgeMesh/edgeMeshI.H b/src/edgeMesh/edgeMeshI.H index 50cf9047a3125e1bd9a1d7f99ebbedbcbb6a216c..9badb7d5b092447ef211314f7727ca7048be6f2f 100644 --- a/src/edgeMesh/edgeMeshI.H +++ b/src/edgeMesh/edgeMeshI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,6 +27,7 @@ License inline Foam::edgeMesh::edgeMesh(const edgeMesh& em) : + fileFormats::edgeFormatsCore(), points_(em.points_), edges_(em.edges_), pointEdgesPtr_(NULL) diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 360ecc6b0725713a59f2992301b63e074f183fec..e7c0a655c5158671aad9343742afa8e0a30dbceb 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -201,6 +201,7 @@ interpolation = interpolation/interpolation $(interpolation)/interpolation/interpolations.C $(interpolation)/interpolationCell/makeInterpolationCell.C +$(interpolation)/interpolationCellPatchConstrained/makeInterpolationCellPatchConstrained.C $(interpolation)/interpolationCellPoint/cellPointWeight/cellPointWeight.C $(interpolation)/interpolationCellPoint/makeInterpolationCellPoint.C $(interpolation)/interpolationCellPointFace/makeInterpolationCellPointFace.C @@ -249,7 +250,7 @@ $(schemes)/quadraticLinearPureUpwindFit/quadraticLinearPureUpwindFit.C $(schemes)/linearPureUpwindFit/linearPureUpwindFit.C $(schemes)/linearUpwind/linearUpwind.C $(schemes)/linearUpwind/linearUpwindV.C -$(schemes)/quadraticUpwind/quadraticUpwind.C +$(schemes)/LUST/LUST.C limitedSchemes = $(surfaceInterpolation)/limitedSchemes $(limitedSchemes)/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationSchemes.C diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSourceList.H b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSourceList.H index 02cd801cc0aef69db299c00e7d121507c4e23998..7cc22e8cececbb1c5bfa304bf2e689eee34afc56 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSourceList.H +++ b/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSourceList.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::basicsourceList + Foam::basicSourceList Description List of explict sources diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.C index 260fb328dcff321a2e865ccf24ccc5881e5d23d9..19404c4f53592b6c7f937c3df1d55c01fcac2d8d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.C @@ -33,9 +33,9 @@ License namespace Foam { template<> - const char* Foam::NamedEnum + const char* NamedEnum < - Foam::fanPressureFvPatchScalarField::fanFlowDirection, + fanPressureFvPatchScalarField::fanFlowDirection, 2 >::names[] = { diff --git a/src/finiteVolume/fvMatrices/fvMatricesFwd.H b/src/finiteVolume/fvMatrices/fvMatricesFwd.H index b86b72904111a401eaebf76ca1558c44ee32faca..d5d3403bed109bd014b5fa6009728fd6c516b011 100644 --- a/src/finiteVolume/fvMatrices/fvMatricesFwd.H +++ b/src/finiteVolume/fvMatrices/fvMatricesFwd.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,14 +21,8 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -Class - Foam::fvMatrix - Description - A special matrix type and solver, designed for finite volume - solutions of scalar equations. - Face addressing is used to make all matrix assembly - and solution loops vectorise. + Forward declarations of fvMatrix specializations. \*---------------------------------------------------------------------------*/ diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H index 773db6dad936f0d6322c6a8ce75c2361a9804c22..476371489857aa8fa69e1b778a96e0d5f81d801f 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.H @@ -25,7 +25,10 @@ Class Foam::fvMatrix Description - Finite-Volume matrix. + A special matrix type and solver, designed for finite volume + solutions of scalar equations. + Face addressing is used to make all matrix assembly + and solution loops vectorise. SourceFiles fvMatrix.C diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/pureUpwindCFCCellToFaceStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/pureUpwindCFCCellToFaceStencilObject.H index 4965e2ed109bc6eec89319ccd2a234b50df2cebf..dfab1cf255f979fccf65133ddfd050f75f1a8b84 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/pureUpwindCFCCellToFaceStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/pureUpwindCFCCellToFaceStencilObject.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::upwindCFCCellToFaceStencilObject + Foam::pureUpwindCFCCellToFaceStencilObject Description diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.C new file mode 100644 index 0000000000000000000000000000000000000000..cdc2c38aeb5bf128d2f1f1049a4ccb5ad17d4ced --- /dev/null +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.C @@ -0,0 +1,76 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "interpolationCellPatchConstrained.H" +#include "volFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * // + +template<class Type> +interpolationCellPatchConstrained<Type>::interpolationCellPatchConstrained +( + const GeometricField<Type, fvPatchField, volMesh>& psi +) +: + interpolation<Type>(psi) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +Type interpolationCellPatchConstrained<Type>::interpolate +( + const vector& pt, + const label cellI, + const label faceI +) const +{ + if (faceI >= 0 && faceI >= this->psi_.mesh().nInternalFaces()) + { + // Use boundary value + const polyBoundaryMesh& pbm = this->psi_.mesh().boundaryMesh(); + label patchI = pbm.patchID()[faceI-this->psi_.mesh().nInternalFaces()]; + label patchFaceI = pbm[patchI].whichFace(faceI); + + return this->psi_.boundaryField()[patchI][patchFaceI]; + } + else + { + return this->psi_[cellI]; + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/combustionModels/noCombustion/noCombustion.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.H similarity index 60% rename from src/combustionModels/noCombustion/noCombustion.H rename to src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.H index d36f4c11e342657f43019015c7c42a30fa104121..814988a9f3f4292e56ddeec980ccca88e290fa13 100644 --- a/src/combustionModels/noCombustion/noCombustion.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.H @@ -2,10 +2,11 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ 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 @@ -21,76 +22,76 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::combustionModel::noCombustion + Foam::interpolationCellPatchConstrained Description - Dummy combustion model for 'none' option - -SourceFiles - noCombustion.C + Uses the cell value for any point in the cell apart from a boundary face + where it uses the boundary value directly. + Note: will not work on an empty patch. \*---------------------------------------------------------------------------*/ -#ifndef noCombustion_H -#define noCombustion_H +#ifndef interpolationCellPatchConstrained_H +#define interpolationCellPatchConstrained_H -#include "combustionModel.H" +#include "interpolation.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace combustionModels -{ + +class fvMesh; /*---------------------------------------------------------------------------*\ - Class noCombustion Declaration + Class interpolationCellPatchConstrained Declaration \*---------------------------------------------------------------------------*/ -class noCombustion +template<class Type> +class interpolationCellPatchConstrained : - public combustionModel + public interpolation<Type> { - // Private Member Functions - - //- Disallow copy construct - noCombustion(const noCombustion&); - - //- Disallow default bitwise assignment - void operator=(const noCombustion&); - public: //- Runtime type information - TypeName("none"); + TypeName("cellPatchConstrained"); // Constructors //- Construct from components - noCombustion + interpolationCellPatchConstrained ( - const dictionary& combustionProperties, - hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho + const GeometricField<Type, fvPatchField, volMesh>& psi ); - //- Destructor - virtual ~noCombustion(); + // Member Functions + + //- Interpolate field to the given point in the given cell + Type interpolate + ( + const vector& position, + const label cellI, + const label faceI = -1 + ) const; }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace combustionModels } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository +# include "interpolationCellPatchConstrained.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/combustionModels/noCombustion/noCombustion.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/makeInterpolationCellPatchConstrained.C similarity index 57% rename from src/combustionModels/noCombustion/noCombustion.C rename to src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/makeInterpolationCellPatchConstrained.C index 4fc8c7d0c905c11d21c05b7b396c6a3d6439864c..adae604e0ed08a1ca23fb128da80ab0dbd3c367b 100644 --- a/src/combustionModels/noCombustion/noCombustion.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/makeInterpolationCellPatchConstrained.C @@ -2,10 +2,11 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ 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 @@ -22,45 +23,19 @@ License \*---------------------------------------------------------------------------*/ -#include "noCombustion.H" -#include "addToRunTimeSelectionTable.H" +#include "interpolationCellPatchConstrained.H" -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace combustionModels -{ - defineTypeNameAndDebug(noCombustion, 0); - addToRunTimeSelectionTable - ( - combustionModel, - noCombustion, - dictionary - ); -}; -}; - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::combustionModels::noCombustion::noCombustion -( - const dictionary& combustionProps, - hsCombustionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho -) -: - combustionModel(combustionProps, thermo, turbulence, phi, rho) -{} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // +makeInterpolation(interpolationCellPatchConstrained); -Foam::combustionModels::noCombustion::~noCombustion() -{} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace Foam // ************************************************************************* // diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H index 6b57454da722878fc72d2119d7ebfd1b6cc6b26a..0cb362fe1e7e5fbab220aa6167d5c37170c3de89 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::interpolationCellPoint + Foam::interpolationCellPointWallModified Description Same as interpolationCellPoint, but if interpolating a wall face, uses diff --git a/src/finiteVolume/interpolation/mapping/fvFieldMappers/MapFvSurfaceField.H b/src/finiteVolume/interpolation/mapping/fvFieldMappers/MapFvSurfaceField.H index 21def0d0bb86069a7783bf96010898270239bf4f..2e9bae32f5c829b6884b8b4b620ddd0c2a928fc9 100644 --- a/src/finiteVolume/interpolation/mapping/fvFieldMappers/MapFvSurfaceField.H +++ b/src/finiteVolume/interpolation/mapping/fvFieldMappers/MapFvSurfaceField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,9 +21,6 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -Class - Foam::MapFvSurfaceField - Description Map Surface internal field on topology change. This is a partial template specialisation, see MapGeometricFields. diff --git a/src/finiteVolume/interpolation/mapping/fvFieldMappers/MapFvVolField.H b/src/finiteVolume/interpolation/mapping/fvFieldMappers/MapFvVolField.H index ed1ce0f097feaa9a2d084aa9ed03b4286c612e62..397408030c361737f09e0f2e5bc75e8d209f4558 100644 --- a/src/finiteVolume/interpolation/mapping/fvFieldMappers/MapFvVolField.H +++ b/src/finiteVolume/interpolation/mapping/fvFieldMappers/MapFvVolField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,9 +21,6 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -Class - Foam::MapFvVolField - Description Map volume internal field on topology change. This is a partial template specialisation, see MapGeometricFields. diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwind/quadraticUpwind.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/LUST/LUST.C similarity index 86% rename from src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwind/quadraticUpwind.C rename to src/finiteVolume/interpolation/surfaceInterpolation/schemes/LUST/LUST.C index 442e0d3e8ba529c1ee3b4a773ed9cc610df62174..c9df6716d73b259a48959e0284041aefac148166 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwind/quadraticUpwind.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/LUST/LUST.C @@ -23,15 +23,15 @@ License \*---------------------------------------------------------------------------*/ -#include "quadraticUpwind.H" +#include "LUST.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - //makeSurfaceInterpolationScheme(quadraticUpwind); - makeSurfaceInterpolationTypeScheme(quadraticUpwind, scalar); - makeSurfaceInterpolationTypeScheme(quadraticUpwind, vector); + //makeSurfaceInterpolationScheme(LUST); + makeSurfaceInterpolationTypeScheme(LUST, scalar); + makeSurfaceInterpolationTypeScheme(LUST, vector); } // ************************************************************************* // diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwind/quadraticUpwind.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/LUST/LUST.H similarity index 85% rename from src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwind/quadraticUpwind.H rename to src/finiteVolume/interpolation/surfaceInterpolation/schemes/LUST/LUST.H index a2fb36f7fb227073abbb21f10153e5ecf3dea06e..864559a56afe338598ebb5f4df75b60a9481d3b4 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwind/quadraticUpwind.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/LUST/LUST.H @@ -22,20 +22,24 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - quadraticUpwind + Foam::LUST Description - quadraticUpwind interpolation scheme class derived from linearUpwind and - returns blended linear/upwind weighting factors and also applies a explicit - gradient-based correction obtained from the linearUpwind scheme. + LUST: Linear-upwind stabilised transport. + + Interpolation scheme class derived from linearUpwind which returns blended + linear/linear-upwind weighting factors and also applies a explicit + gradient-based correction obtained from the linearUpwind scheme. The + blending-factor is set to 0.75 linear which optimises the balance between + accuracy and stability on a range of LES cases with a range of mesh quality. SourceFiles - quadraticUpwind.C + LUST.C \*---------------------------------------------------------------------------*/ -#ifndef quadraticUpwind_H -#define quadraticUpwind_H +#ifndef LUST_H +#define LUST_H #include "linearUpwind.H" @@ -45,33 +49,33 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class quadraticUpwind Declaration + Class LUST Declaration \*---------------------------------------------------------------------------*/ template<class Type> -class quadraticUpwind +class LUST : public linearUpwind<Type> { // Private Member Functions //- Disallow default bitwise copy construct - quadraticUpwind(const quadraticUpwind&); + LUST(const LUST&); //- Disallow default bitwise assignment - void operator=(const quadraticUpwind&); + void operator=(const LUST&); public: //- Runtime type information - TypeName("quadraticUpwind"); + TypeName("LUST"); // Constructors //- Construct from mesh and Istream - quadraticUpwind + LUST ( const fvMesh& mesh, Istream& schemeData @@ -81,7 +85,7 @@ public: {} //- Construct from mesh, faceFlux and Istream - quadraticUpwind + LUST ( const fvMesh& mesh, const surfaceScalarField& faceFlux, diff --git a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C index 12946afadfd2e812456daa24734687b149479fbe..5d3b19fbf1e93d0b64d64c30730fb5f3e1dd1913 100644 --- a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C +++ b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.C @@ -25,6 +25,7 @@ License #include "pairPatchAgglomeration.H" #include "meshTools.H" +#include "unitConversion.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -53,7 +54,7 @@ void Foam::pairPatchAgglomeration::setBasedEdgeWeights() const bPatch& coarsePatch = patchLevels_[0]; forAll(coarsePatch.edges(), i) { - if(coarsePatch.isInternalEdge(i)) + if (coarsePatch.isInternalEdge(i)) { scalar edgeLength = coarsePatch.edges()[i].mag(coarsePatch.localPoints()); @@ -63,12 +64,12 @@ void Foam::pairPatchAgglomeration::setBasedEdgeWeights() if (eFaces.size() == 2) { scalar cosI = - coarsePatch.faceNormals()[eFaces[0]] & - coarsePatch.faceNormals()[eFaces[1]]; + coarsePatch.faceNormals()[eFaces[0]] + & coarsePatch.faceNormals()[eFaces[1]]; const edge edgeCommon = edge(eFaces[0], eFaces[1]); - if(facePairWeight_.found(edgeCommon)) + if (facePairWeight_.found(edgeCommon)) { facePairWeight_[edgeCommon] += edgeLength; } @@ -77,14 +78,7 @@ void Foam::pairPatchAgglomeration::setBasedEdgeWeights() facePairWeight_.insert(edgeCommon, edgeLength); } - if - ( - cosI < - Foam::cos - ( - featureAngle_*constant::mathematical::pi/180.0 - ) - ) + if (cosI < Foam::cos(degToRad(featureAngle_))) { facePairWeight_[edgeCommon] = -1.0; } @@ -109,11 +103,8 @@ void Foam::pairPatchAgglomeration::setEdgeWeights const bPatch& coarsePatch = patchLevels_[fineLevelIndex]; const labelList& fineToCoarse = restrictAddressing_[fineLevelIndex]; - const label nCoarseI = max(fineToCoarse)+1; - labelListList coarseToFine - ( - invertOneToMany(nCoarseI, fineToCoarse) - ); + const label nCoarseI = max(fineToCoarse) + 1; + labelListList coarseToFine(invertOneToMany(nCoarseI, fineToCoarse)); HashSet<edge, Hash<edge> > fineFeaturedFaces(coarsePatch.nEdges()/10); @@ -138,7 +129,7 @@ void Foam::pairPatchAgglomeration::setEdgeWeights forAll(coarsePatch.edges(), i) { - if(coarsePatch.isInternalEdge(i)) + if (coarsePatch.isInternalEdge(i)) { scalar edgeLength = coarsePatch.edges()[i].mag(coarsePatch.localPoints()); @@ -148,7 +139,7 @@ void Foam::pairPatchAgglomeration::setEdgeWeights if (eFaces.size() == 2) { const edge edgeCommon = edge(eFaces[0], eFaces[1]); - if(facePairWeight_.found(edgeCommon)) + if (facePairWeight_.found(edgeCommon)) { facePairWeight_[edgeCommon] += edgeLength; } @@ -220,11 +211,13 @@ Foam::pairPatchAgglomeration::pairPatchAgglomeration setBasedEdgeWeights(); } + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::pairPatchAgglomeration::~pairPatchAgglomeration() {} + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // const Foam::bPatch& Foam::pairPatchAgglomeration::patchLevel @@ -259,8 +252,15 @@ bool Foam::pairPatchAgglomeration::agglomeratePatch { if (min(fineToCoarse) == -1) { - FatalErrorIn("pairPatchAgglomeration::agglomeratePatch") - << "min(fineToCoarse) == -1" << exit(FatalError); + FatalErrorIn + ( + "pairPatchAgglomeration::agglomeratePatch" + "(" + "const bPatch&, " + "const labelList&, " + "const label" + ")" + ) << "min(fineToCoarse) == -1" << exit(FatalError); } if (fineToCoarse.size() != patch.size()) @@ -268,7 +268,11 @@ bool Foam::pairPatchAgglomeration::agglomeratePatch FatalErrorIn ( "pairPatchAgglomeration::agglomeratePatch" - "(const label fineLevelIndex)" + "(" + "const bPatch&, " + "const labelList&, " + "const label" + ")" ) << "restrict map does not correspond to fine level. " << endl << " Sizes: restrictMap: " << fineToCoarse.size() << " nEqns: " << patch.size() @@ -279,10 +283,7 @@ bool Foam::pairPatchAgglomeration::agglomeratePatch List<face> patchFaces(nCoarseI); // Patch faces per agglomeration - labelListList coarseToFine - ( - invertOneToMany(nCoarseI, fineToCoarse) - ); + labelListList coarseToFine(invertOneToMany(nCoarseI, fineToCoarse)); for (label coarseI = 0; coarseI < nCoarseI; coarseI++) { @@ -351,7 +352,7 @@ void Foam::pairPatchAgglomeration:: agglomerate() tmp<labelField> finalAgglomPtr(new labelField(patch.size())); bool agglomOK = false; - while (!agglomOK) + while (!agglomOK && patch.size()) { finalAgglomPtr = agglomerateOneLevel ( @@ -371,7 +372,7 @@ void Foam::pairPatchAgglomeration:: agglomerate() restrictAddressing_.set(nCreatedLevels, finalAgglomPtr); mapBaseToTopAgglom(nCreatedLevels); - if(!continueAgglomerating(nCoarseCells)) + if (!continueAgglomerating(nCoarseCells)) { break; } @@ -407,7 +408,7 @@ Foam::tmp<Foam::labelField> Foam::pairPatchAgglomeration::agglomerateOneLevel nCoarseCells = 0; - forAll (faceFaces, facei) + forAll(faceFaces, facei) { const labelList& fFaces = faceFaces[facei]; @@ -425,8 +426,8 @@ Foam::tmp<Foam::labelField> Foam::pairPatchAgglomeration::agglomerateOneLevel if ( facePairWeight_[edgeCommon] > maxFaceWeight - && coarseCellMap[faceNeig] < 0 - && facePairWeight_[edgeCommon] != -1.0 + && coarseCellMap[faceNeig] < 0 + && facePairWeight_[edgeCommon] != -1.0 ) { // Match found. Pick up all the necessary data @@ -472,7 +473,8 @@ Foam::tmp<Foam::labelField> Foam::pairPatchAgglomeration::agglomerateOneLevel coarseCellMap[facei] = coarseCellMap[clusterMatchFaceNo]; } else - {// if not create single-cell "clusters" for each + { + // if not create single-cell "clusters" for each coarseCellMap[facei] = nCoarseCells; nCoarseCells ++; } @@ -499,6 +501,7 @@ Foam::tmp<Foam::labelField> Foam::pairPatchAgglomeration::agglomerateOneLevel return tcoarseCellMap; } + void Foam::pairPatchAgglomeration::combineLevels(const label curLevel) { label prevLevel = curLevel - 1; @@ -522,4 +525,6 @@ void Foam::pairPatchAgglomeration::combineLevels(const label curLevel) patchLevels_.set(prevLevel, patchLevels_.set(curLevel, NULL)); } + + // ************************************************************************* // diff --git a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.H b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.H index ed66673bd7b95124e9d41c4be1754999094215c5..26fe7984fa3b9142cbfadc28edff8900d1b0a484 100644 --- a/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.H +++ b/src/fvAgglomerationMethods/pairPatchAgglomeration/pairPatchAgglomeration.H @@ -148,13 +148,13 @@ public: // Destructor - ~pairPatchAgglomeration(); + ~pairPatchAgglomeration(); // Member Functions //- Agglomerate patch - void agglomerate(); + void agglomerate(); // Access @@ -200,7 +200,6 @@ public: const Field<Type>& cf, const label coarseLevelIndex ) const; - }; diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/displacementFvMotionSolver/displacementFvMotionSolver.H b/src/fvMotionSolver/fvMotionSolvers/displacement/displacementFvMotionSolver/displacementFvMotionSolver.H index 1f0d7a16011e28bb7023c258a5a4603892268717..4f3f84bc69917246e15b2f7dac74d1784d8ebf12 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/displacementFvMotionSolver/displacementFvMotionSolver.H +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/displacementFvMotionSolver/displacementFvMotionSolver.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::displacementFvMotionSolver.H + Foam::displacementFvMotionSolver Description Base class for fvMotionSolvers which calculate displacement. diff --git a/src/lagrangian/basic/Cloud/Cloud.H b/src/lagrangian/basic/Cloud/Cloud.H index b7d39f61f44d900d7afc7075a6b1b9d47a342c81..e55232a2f46eeac43fca252207dc1e19a31db52c 100644 --- a/src/lagrangian/basic/Cloud/Cloud.H +++ b/src/lagrangian/basic/Cloud/Cloud.H @@ -44,7 +44,6 @@ SourceFiles #include "indexedOctree.H" #include "treeDataCell.H" #include "tetPointRef.H" -#include "polyMeshTetDecomposition.H" #include "PackedBoolList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -194,7 +193,7 @@ public: void trackingRescue() const { nTrackingRescues_++; - if (cloud::debug && nTrackingRescues_ % size() == 0) + if (cloud::debug && size() && (nTrackingRescues_ % size() == 0)) { Pout<< " " << nTrackingRescues_ << " tracking rescues " << endl; diff --git a/src/lagrangian/basic/particle/particleI.H b/src/lagrangian/basic/particle/particleI.H index 6107df0c4ef9c23bb2d5d5dc6c862d659f1255fd..a9246510f540a30ffd6d052f0dc4ccf57b2a6be3 100644 --- a/src/lagrangian/basic/particle/particleI.H +++ b/src/lagrangian/basic/particle/particleI.H @@ -514,6 +514,16 @@ inline void Foam::particle::crossEdgeConnectedFace { continue; } + else if (f == pFaces[fI]) + { + // This is a necessary condition if using duplicate baffles + // (so coincident faces). We need to make sure we don't cross into + // the face with the same vertices since we might enter a tracking + // loop where it never exits. This test should be cheap + // for most meshes so can be left in for 'normal' meshes. + + continue; + } else { //Found edge on other face diff --git a/src/lagrangian/basic/particle/particleTemplates.C b/src/lagrangian/basic/particle/particleTemplates.C index cb58c21653256ec63a58a5857fc147637d7ec1b3..80009d44c5d695c080e9096e2c73348235ff0846 100644 --- a/src/lagrangian/basic/particle/particleTemplates.C +++ b/src/lagrangian/basic/particle/particleTemplates.C @@ -738,7 +738,7 @@ void Foam::particle::hitWallFaces { // Get the decomposition of this wall face - const List<tetIndices>& faceTetIs = + const List<tetIndices> faceTetIs = polyMeshTetDecomposition::faceTetIndices(mesh_, fI, cellI_); const Foam::face& f = pFaces[fI]; diff --git a/src/lagrangian/coalCombustion/coalCloud/coalCloud.H b/src/lagrangian/coalCombustion/coalCloud/coalCloud.H index e3df30011e4b27f991171e10c5efa9e0ab3f46b3..eac53eccf706178e92b3cf4a1faab2358e0a3757 100644 --- a/src/lagrangian/coalCombustion/coalCloud/coalCloud.H +++ b/src/lagrangian/coalCombustion/coalCloud/coalCloud.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - CoalCloud + coalCloud Description Cloud class to introduce coal parcels diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C index b23817d98efca27998c6bbaeefe2ec8f16c5f492..b45f3cae8b4c9c060962dc29c9a2b74a509aded5 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C @@ -29,6 +29,7 @@ License #include "InflowBoundaryModel.H" #include "constants.H" #include "zeroGradientFvPatchFields.H" +#include "polyMeshTetDecomposition.H" using namespace Foam::constant; diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index 42467d15d2740bd4685b94607c2253219145a472..1a28edcaeb8112d5c2f5685d9106d97340da4e28 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -609,6 +609,8 @@ void Foam::KinematicCloud<CloudType>::preEvolve() pAmbient_ = constProps_.dict().template lookupOrDefault<scalar>("pAmbient", pAmbient_); + + functions_.preEvolve(); } diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.H b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.H index 0289d1ca0f1de521012773ee673366994c8a8ee5..625e0784c71f36ec8ec022e66670331f7b4e1643 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.H +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::BasicReactingMultiphaseParcel + Foam::basicReactingMultiphaseParcel Description Definition of basic reacting parcel diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelPatchInteractionModels.H b/src/lagrangian/intermediate/parcels/include/makeParcelPatchInteractionModels.H index 13697f20923f79533bebe2c871c1d32d90d6356b..9c0e8d2ec546df2fb1db0f67f2a5ca26eccd107b 100644 --- a/src/lagrangian/intermediate/parcels/include/makeParcelPatchInteractionModels.H +++ b/src/lagrangian/intermediate/parcels/include/makeParcelPatchInteractionModels.H @@ -32,6 +32,7 @@ License #include "NoInteraction.H" #include "Rebound.H" #include "StandardWallInteraction.H" +#include "MultiInteraction.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -42,7 +43,8 @@ License makePatchInteractionModelType(LocalInteraction, CloudType); \ makePatchInteractionModelType(NoInteraction, CloudType); \ makePatchInteractionModelType(Rebound, CloudType); \ - makePatchInteractionModelType(StandardWallInteraction, CloudType); + makePatchInteractionModelType(StandardWallInteraction, CloudType); \ + makePatchInteractionModelType(MultiInteraction, CloudType); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.C index ba7e86981660bd84ca79cc13b6f87f8efcecd4f6..c7408718bc79cfe5a0937964078688046d3b9c67 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.C @@ -74,6 +74,13 @@ Foam::CloudFunctionObject<CloudType>::~CloudFunctionObject() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template<class CloudType> +void Foam::CloudFunctionObject<CloudType>::preEvolve() +{ + // do nothing +} + + template<class CloudType> void Foam::CloudFunctionObject<CloudType>::postEvolve() { diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.H index 6a2b05d866556f8135a214325da9d3e8f95fa76a..9708b9259465e6d21c69d7fa444efe391d43c6d7 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.H +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.H @@ -123,6 +123,9 @@ public: // Evaluation + //- Pre-evolve hook + virtual void preEvolve(); + //- Post-evolve hook virtual void postEvolve(); diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.C index 639276e7cd30be160380372fb13d6fb31ede9e98..bcfaa80fa927a3a7a09acf64d96215cfad79709f 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.C @@ -107,6 +107,16 @@ Foam::CloudFunctionObjectList<CloudType>::~CloudFunctionObjectList() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template<class CloudType> +void Foam::CloudFunctionObjectList<CloudType>::preEvolve() +{ + forAll(*this, i) + { + this->operator[](i).preEvolve(); + } +} + + template<class CloudType> void Foam::CloudFunctionObjectList<CloudType>::postEvolve() { diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.H index dcc27143ab5ecaf711408710f5bff50362659860..d1e430e2ca4955f1fbedfbc964c9e1fb45db0443 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.H +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.H @@ -103,6 +103,9 @@ public: // Evaluation + //- Pre-evolve hook + virtual void preEvolve(); + //- Post-evolve hook virtual void postEvolve(); diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.C index f02eb29076dfb21a321f4d0979fce1b9fc4d6164..3deca9409c2a0ba11de2044b26e41d3c7b792bd6 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.C @@ -95,6 +95,19 @@ Foam::ParticleTracks<CloudType>::~ParticleTracks() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template<class CloudType> +void Foam::ParticleTracks<CloudType>::preEvolve() +{ + if (!cloudPtr_.valid()) + { + cloudPtr_.reset + ( + this->owner().cloneBare(this->owner().name() + "Tracks").ptr() + ); + } +} + + template<class CloudType> void Foam::ParticleTracks<CloudType>::postPatch(const parcelType&, const label) {} @@ -111,10 +124,10 @@ void Foam::ParticleTracks<CloudType>::postFace(const parcelType& p) { if (!cloudPtr_.valid()) { - cloudPtr_.reset + FatalErrorIn ( - this->owner().cloneBare(this->owner().name() + "Tracks").ptr() - ); + "Foam::ParticleTracks<CloudType>::postFace(const parcelType&)" + )<< "Cloud storage not allocated" << abort(FatalError); } hitTableType::iterator iter = diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.H index 283d03d7cd3a48c0b0529ba2b7633407bd9f1408..0aee5d57f2c43ee4f5c03047f86802a66aed2a3e 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.H +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.H @@ -136,6 +136,9 @@ public: // Evaluation + //- Pre-evolve hook + virtual void preEvolve(); + //- Post-patch hook virtual void postPatch(const parcelType& p, const label patchI); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C index e8844a526100b8d9fe8585c3ceb289abdbe846b7..90ed4afcbf65df01990256e39469d450e178289b 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C @@ -130,11 +130,11 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection ( readScalar(this->coeffDict().lookup("parcelsPerSecond")) ), - volumeFlowRate_ + flowRateProfile_ ( DataEntry<scalar>::New ( - "volumeFlowRate", + "flowRateProfile", this->coeffDict() ) ), @@ -208,7 +208,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection tanVec2_ = direction_^tanVec1_; // Set total volume to inject - this->volumeTotal_ = volumeFlowRate_().integrate(0.0, duration_); + this->volumeTotal_ = flowRateProfile_().integrate(0.0, duration_); } @@ -227,7 +227,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection injectorCell_(im.injectorCell_), direction_(im.direction_), parcelsPerSecond_(im.parcelsPerSecond_), - volumeFlowRate_(im.volumeFlowRate_().clone().ptr()), + flowRateProfile_(im.flowRateProfile_().clone().ptr()), thetaInner_(im.thetaInner_().clone().ptr()), thetaOuter_(im.thetaOuter_().clone().ptr()), sizeDistribution_(im.sizeDistribution_().clone().ptr()), @@ -283,7 +283,7 @@ Foam::scalar Foam::ConeNozzleInjection<CloudType>::volumeToInject { if ((time0 >= 0.0) && (time0 < duration_)) { - return volumeFlowRate_().integrate(time0, time1); + return flowRateProfile_().integrate(time0, time1); } else { @@ -405,7 +405,7 @@ void Foam::ConeNozzleInjection<CloudType>::setProperties scalar Ai = 0.25*mathematical::pi*innerDiameter_*innerDiameter_; scalar massFlowRate = this->massTotal() - *volumeFlowRate_().value(t) + *flowRateProfile_().value(t) /this->volumeTotal(); scalar Umag = massFlowRate/(parcel.rho()*Cd_().value(t)*(Ao - Ai)); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.H index 46f876acf887ed6fc1a29829f1ad3c093b718104..189390febe78a4847caa5eac1c835fdfeb1921ac 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.H @@ -131,8 +131,8 @@ private: //- Number of parcels to introduce per second [] const label parcelsPerSecond_; - //- Volume flow rate of parcels to introduce relative to SOI [m^3/s] - const autoPtr<DataEntry<scalar> > volumeFlowRate_; + //- Flow rate profile relative to SOI [] + const autoPtr<DataEntry<scalar> > flowRateProfile_; //- Inner cone angle relative to SOI [deg] const autoPtr<DataEntry<scalar> > thetaInner_; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/kinematicParcelInjectionDataIOList.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/kinematicParcelInjectionDataIOList.H index e7adc61c0076fc447e115e008be5cd3b8c8b4c2c..2c3ae0c4fd69055e5e1894c5792cfe82ad324bae 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/kinematicParcelInjectionDataIOList.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/kinematicParcelInjectionDataIOList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,6 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class + kinematicParcelInjectionDataIOList Description diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.H index f8a18529f34e7f2756f3baf560a81c7d98a3cc0c..a03372c0804581ddf9aee78d79c3ac85e9d34719 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::NonSphereDrag + Foam::NonSphereDragForce Description Drag model for non-spherical particles. diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/MultiInteraction/MultiInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/MultiInteraction/MultiInteraction.C new file mode 100644 index 0000000000000000000000000000000000000000..9a180367978e7e87a1c949693bb8e18c8560a710 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/MultiInteraction/MultiInteraction.C @@ -0,0 +1,188 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "MultiInteraction.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template<class CloudType> +bool Foam::MultiInteraction<CloudType>::read(const dictionary& dict) +{ + // Count dictionaries + + Info<< "Patch interaction model " << typeName << nl + << "Executing in turn " << endl; + + label nModels = 0; + forAllConstIter(dictionary, dict, iter) + { + if (iter().isDict()) + { + Info<< " " << iter().name() << endl; + + nModels++; + } + } + + models_.setSize(nModels); + nModels = 0; + forAllConstIter(dictionary, dict, iter) + { + if (iter().isDict()) + { + models_.set + ( + nModels++, + PatchInteractionModel<CloudType>::New + ( + iter().dict(), + this->owner() + ) + ); + } + } + + oneInteractionOnly_ = Switch(dict.lookup("oneInteractionOnly")); + + if (oneInteractionOnly_) + { + Info<< "Stopping upon first model that interacts with particle." + << nl << endl; + } + else + { + Info<< "Allowing multiple models to interact." + << nl << endl; + } + + return true; +} + + +// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::MultiInteraction<CloudType>::MultiInteraction +( + const dictionary& dict, + CloudType& cloud +) +: + PatchInteractionModel<CloudType>(dict, cloud, typeName) +{ + read(this->coeffDict()); +} + + +template<class CloudType> +Foam::MultiInteraction<CloudType>::MultiInteraction +( + const MultiInteraction<CloudType>& pim +) +: + PatchInteractionModel<CloudType>(pim), + oneInteractionOnly_(pim.oneInteractionOnly_), + models_(pim.models_) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template <class CloudType> +Foam::MultiInteraction<CloudType>::~MultiInteraction() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +template<class CloudType> +bool Foam::MultiInteraction<CloudType>::active() const +{ + forAll(models_, i) + { + if (models_[i].active()) + { + return true; + } + } + return false; +} + + +template <class CloudType> +bool Foam::MultiInteraction<CloudType>::correct +( + typename CloudType::parcelType& p, + const polyPatch& pp, + bool& keepParticle, + const scalar trackFraction, + const tetIndices& tetIs +) +{ + label origFacei = p.face(); + label patchi = pp.index(); + + bool interacted = false; + + forAll(models_, i) + { + bool myInteracted = models_[i].correct + ( + p, + this->owner().pMesh().boundaryMesh()[patchi], + keepParticle, + trackFraction, + tetIs + ); + + if (myInteracted && oneInteractionOnly_) + { + break; + } + + interacted = (interacted || myInteracted); + + + // Check if perhaps the interaction model has changed patches + // (CoincidentBaffleInteraction can do this) + + if (p.face() != origFacei) + { + origFacei = p.face(); + patchi = p.patch(p.face()); + + // Interaction model has moved particle off wall? + if (patchi == -1) + { + break; + } + } + } + + return interacted; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/MultiInteraction/MultiInteraction.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/MultiInteraction/MultiInteraction.H new file mode 100644 index 0000000000000000000000000000000000000000..b5d8f00a4718b2f8c872b33ea66d129011f698ef --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/MultiInteraction/MultiInteraction.H @@ -0,0 +1,165 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::MultiInteraction + +Description + Runs multiple patch interaction models in turn. Takes dictionary + where all the subdictionaries are the interaction models. + + // Exit upon first successful interaction or continue doing other + // models. Returned nteraction status will be true if there has been any + // interaction (so logical or) + oneInteractionOnly true; + + model1 + { + patchInteractionModel coincidentBaffleInteraction; + coincidentBaffleInteractionCoeffs + { + coincidentPatches + ( + (pipetteWall_A pipetteCyclic_half0) + (pipetteWall_B pipetteCyclic_half1) + ); + } + } + model2 + { + patchInteractionModel localInteraction; + localInteractionCoeffs + { + patches + ( + cWall + { + type rebound; + } + pipetteWall_A + { + type rebound; + } + pipetteWall_B + { + type rebound; + } + ); + } + } + + +\*---------------------------------------------------------------------------*/ + +#ifndef MultiInteraction_H +#define MultiInteraction_H + +#include "PatchInteractionModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +/*---------------------------------------------------------------------------*\ + Class MultiInteraction Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class MultiInteraction +: + public PatchInteractionModel<CloudType> +{ + // Private data + + Switch oneInteractionOnly_; + + //- Submodels + PtrList<PatchInteractionModel<CloudType> > models_; + + + // Private Member Functions + + //- Read settings + bool read(const dictionary&); + +public: + + //- Runtime type information + TypeName("multiInteraction"); + + + // Constructors + + //- Construct from dictionary + MultiInteraction(const dictionary& dict, CloudType& cloud); + + //- Construct copy from owner cloud and patch interaction model + MultiInteraction(const MultiInteraction<CloudType>& pim); + + //- Construct and return a clone using supplied owner cloud + virtual autoPtr<PatchInteractionModel<CloudType> > clone() const + { + return autoPtr<PatchInteractionModel<CloudType> > + ( + new MultiInteraction<CloudType>(*this) + ); + } + + + //- Destructor + virtual ~MultiInteraction(); + + + // Member Functions + + //- Flag to indicate whether model activates patch interaction model + virtual bool active() const; + + //- Apply velocity correction + // Returns true if particle remains in same cell + virtual bool correct + ( + typename CloudType::parcelType& p, + const polyPatch& pp, + bool& keepParticle, + const scalar trackFraction, + const tetIndices& tetIs + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "MultiInteraction.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/reactingParcelInjectionDataIOList.H b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/reactingParcelInjectionDataIOList.H index c93bde5a430a7659cdeb3130253bb446ae1bb181..c47b7f37e68a31faf4e14ef81514f26ec40b9229 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/reactingParcelInjectionDataIOList.H +++ b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/reactingParcelInjectionDataIOList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,6 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class + Foam::reactingParcelInjectionDataIOList Description diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/reactingMultiphaseParcelInjectionDataIOList.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/reactingMultiphaseParcelInjectionDataIOList.H index e0410515b1f570236c1bff4647b50b52445bc968..97a171f2f93080ee7a47efed5248d487ed51e0ba 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/reactingMultiphaseParcelInjectionDataIOList.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/reactingMultiphaseParcelInjectionDataIOList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,6 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class + reactingMultiphaseParcelInjectionDataIOList Description diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/thermoParcelInjectionDataIOList.H b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/thermoParcelInjectionDataIOList.H index 76d39e5b0cc2bc957f19fcffdca86f914fe014ad..25dae5d66ddfb41c2db7782d13b121f3471b088e 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/thermoParcelInjectionDataIOList.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/thermoParcelInjectionDataIOList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,6 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class + thermoParcelInjectionDataIOList Description diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/coulomb/coulomb.H b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/coulomb/coulomb.H index bca4726188e223cc6c3319b3bb286f2e786f9a6a..2652158fef4030eeabef141484b964baf059cdb6 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/coulomb/coulomb.H +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/coulomb/coulomb.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::pairPotentials::electrostatic + Foam::pairPotentials::coulomb Description diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.H b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.H index 88fbdc8902c2a127cf449251f5f46c778c3f2e8a..db7dfdd6a72f65296b589fb1437433a736c7fd82 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.H +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/derived/dampedCoulomb/dampedCoulomb.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::pairPotentials::electrostatic + Foam::pairPotentials::dampedCoulomb Description diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C index 03c29aefd3b0be7d2bba7a30e3daf4f39a740ec0..a7ec8797944daf507d083f421aa2e02ab31e8fb4 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C @@ -744,7 +744,8 @@ void Foam::autoRefineDriver::doRefine 100 // maxIter ); - // Introduce baffles at surface intersections + // Introduce baffles at surface intersections. Remove sections unreachable + // from keepPoint. baffleAndSplitMesh(refineParams, prepareForSnapping, motionDict); // Mesh is at its finest. Do optional zoning. diff --git a/src/meshTools/momentOfInertia/momentOfInertia.C b/src/meshTools/momentOfInertia/momentOfInertia.C index 8dc1a53d61f4d0d26bcae4615686bc857327691e..469f9c8ce813165a290bed3cfe19832b0d004d56 100644 --- a/src/meshTools/momentOfInertia/momentOfInertia.C +++ b/src/meshTools/momentOfInertia/momentOfInertia.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2007-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2007-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "momentOfInertia.H" +#include "polyMeshTetDecomposition.H" // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // diff --git a/src/meshTools/momentOfInertia/momentOfInertia.H b/src/meshTools/momentOfInertia/momentOfInertia.H index bb5ffef6a8fb0968ae8ef954eba515a66bf57d4f..2366a6132c7efb6041e4776e376129504580eddd 100644 --- a/src/meshTools/momentOfInertia/momentOfInertia.H +++ b/src/meshTools/momentOfInertia/momentOfInertia.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2007-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2007-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,7 +41,6 @@ SourceFiles #include "triFaceList.H" #include "triSurface.H" #include "polyMesh.H" -#include "polyMeshTetDecomposition.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/meshTools/searchableSurface/closedTriSurfaceMesh.C b/src/meshTools/searchableSurface/closedTriSurfaceMesh.C index 801d557b7acbce04863e16eb2aac9d3334db4fa4..309498d5838c8f2f28f6eec520b12449a467998a 100644 --- a/src/meshTools/searchableSurface/closedTriSurfaceMesh.C +++ b/src/meshTools/searchableSurface/closedTriSurfaceMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,7 +39,11 @@ addToRunTimeSelectionTable(searchableSurface, closedTriSurfaceMesh, dict); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::closedTriSurfaceMesh::closedTriSurfaceMesh(const IOobject& io, const triSurface& s) +Foam::closedTriSurfaceMesh::closedTriSurfaceMesh +( + const IOobject& io, + const triSurface& s +) : triSurfaceMesh(io, s) {} diff --git a/src/meshTools/searchableSurface/closedTriSurfaceMesh.H b/src/meshTools/searchableSurface/closedTriSurfaceMesh.H index 84e160a41050a47c52e8e30519a691b174dd9187..ec729d1aa330a626bb3a980224b2a88f3ea32539 100644 --- a/src/meshTools/searchableSurface/closedTriSurfaceMesh.H +++ b/src/meshTools/searchableSurface/closedTriSurfaceMesh.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/IO/controlDict b/src/postProcessing/functionObjects/IO/controlDict index 11ecd9b106b31ea5178dd6b01f5a952f8df7a34e..d0fa908273c5c7315f60b21a845ba7ed3a6a845f 100644 --- a/src/postProcessing/functionObjects/IO/controlDict +++ b/src/postProcessing/functionObjects/IO/controlDict @@ -14,6 +14,10 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// So we get a decent warning if we have multiple functionObject entries +// with the same name. +#inputMode error; + application icoFoam; startFrom startTime; @@ -56,11 +60,16 @@ functions // Where to load it from functionObjectLibs ("libIOFunctionObjects.so"); + // Optional mesh region to operate on. Only one partialWrite per + // region allowed. + region wallFilmRegion; + // Execute upon outputTime outputControl outputTime; - // Objects to write every outputTime - objectNames (p); + // Objects (fields or lagrangian fields in any of the clouds) + // to write every outputTime + objectNames (p positions nParticle); // Write as normal every writeInterval'th outputTime. writeInterval 3; } diff --git a/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.C b/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.C index 1ea7ae253d131cc38176cbc717f9f9e741ab5272..431c1febd9a57bbe07ff3cb370b99a88fcc85c6a 100644 --- a/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.C +++ b/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.C @@ -28,6 +28,7 @@ License #include "Time.H" #include "IOobjectList.H" #include "polyMesh.H" +#include "cloud.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -132,7 +133,12 @@ void Foam::partialWrite::write() IOobjectList objects(obr_, obr_.time().timeName()); - forAllConstIter(HashPtrTable<IOobject>, objects, iter) + if (debug) + { + Pout<< "For region:" << obr_.name() << endl; + } + + forAllConstIter(IOobjectList, objects, iter) { if (!objectNames_.found(iter()->name())) { @@ -147,6 +153,47 @@ void Foam::partialWrite::write() rm(f); } } + + // Do the lagrangian files as well. + fileNameList cloudDirs + ( + readDir + ( + obr_.time().timePath()/dbDir/cloud::prefix, + fileName::DIRECTORY + ) + ); + forAll(cloudDirs, i) + { + if (debug) + { + Pout<< "For cloud:" << cloudDirs[i] << endl; + } + + IOobjectList sprayObjs + ( + obr_, + obr_.time().timeName(), + cloud::prefix/cloudDirs[i] + ); + forAllConstIter(IOobjectList, sprayObjs, iter) + { + if (!objectNames_.found(iter()->name())) + { + const fileName f = + obr_.time().timePath() + /dbDir + /cloud::prefix + /cloudDirs[i] + /iter()->name(); + if (debug) + { + Pout<< " rm " << f << endl; + } + rm(f); + } + } + } } } } diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineParticleCloud.H b/src/postProcessing/functionObjects/field/streamLine/streamLineParticleCloud.H index 76b3f82bf3cb8cd495c39290b134c69511fbe3ae..2eb4612913f5917c8190a077ced788f844c78f4d 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLineParticleCloud.H +++ b/src/postProcessing/functionObjects/field/streamLine/streamLineParticleCloud.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::streamLineCloud + Foam::streamLineParticleCloud Description A Cloud of streamLine particles diff --git a/src/regionModels/regionModel/regionModel/regionModel.C b/src/regionModels/regionModel/regionModel/regionModel.C index bd699e05ae5d9afcbd7f9532e3741291e13e902e..df40e55b1e142a7a445d00f6b3f095daa243ed78 100644 --- a/src/regionModels/regionModel/regionModel/regionModel.C +++ b/src/regionModels/regionModel/regionModel/regionModel.C @@ -60,6 +60,28 @@ void Foam::regionModels::regionModel::constructMeshObjects() } +void Foam::regionModels::regionModel::constructMeshObjects +( + const dictionary& dict +) +{ + // construct region mesh + regionMeshPtr_.reset + ( + new fvMesh + ( + IOobject + ( + dict.lookup("regionName"), + time_.timeName(), + time_, + IOobject::MUST_READ + ) + ) + ); +} + + void Foam::regionModels::regionModel::initialise() { if (debug) @@ -148,6 +170,26 @@ bool Foam::regionModels::regionModel::read() } +bool Foam::regionModels::regionModel::read(const dictionary& dict) +{ + if (active_) + { + if (const dictionary* dictPtr = dict.subDictPtr(modelName_ + "Coeffs")) + { + coeffs_ <<= *dictPtr; + } + + infoOutput_.readIfPresent("infoOutput", dict); + + return true; + } + else + { + return false; + } +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::regionModels::regionModel::regionModel(const fvMesh& mesh) @@ -219,6 +261,52 @@ Foam::regionModels::regionModel::regionModel } +Foam::regionModels::regionModel::regionModel +( + const fvMesh& mesh, + const word& regionType, + const word& modelName, + const dictionary& dict, + bool readFields +) +: + IOdictionary + ( + IOobject + ( + regionType, + mesh.time().constant(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE, + true + ), + dict + ), + primaryMesh_(mesh), + time_(mesh.time()), + active_(dict.lookup("active")), + infoOutput_(false), + modelName_(modelName), + regionMeshPtr_(NULL), + coeffs_(dict.subOrEmptyDict(modelName + "Coeffs")), + primaryPatchIDs_(), + intCoupledPatchIDs_(), + mappedPatches_() +{ + if (active_) + { + constructMeshObjects(dict); + initialise(); + + if (readFields) + { + read(dict); + } + } +} + + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::regionModels::regionModel::~regionModel() @@ -254,7 +342,7 @@ void Foam::regionModels::regionModel::evolve() << regionMesh().name() << endl; // Update any input information - read(); + //read(); // Pre-evolve preEvolveRegion(); diff --git a/src/regionModels/regionModel/regionModel/regionModel.H b/src/regionModels/regionModel/regionModel/regionModel.H index 01300671d92814852ccee38ba2ba4cb10772ba22..9caf929e2e6ec793364dd37cc89f1e28dab952d8 100644 --- a/src/regionModels/regionModel/regionModel/regionModel.H +++ b/src/regionModels/regionModel/regionModel/regionModel.H @@ -76,6 +76,9 @@ private: //- Construct region mesh and fields void constructMeshObjects(); + //- Construct region mesh and dictionary + void constructMeshObjects(const dictionary& dict); + //- Initialise the region void initialise(); @@ -123,6 +126,9 @@ protected: //- Read control parameters from dictionary virtual bool read(); + //- Read control parameters from dictionary + virtual bool read(const dictionary& dict); + public: @@ -144,6 +150,17 @@ public: bool readFields = true ); + //- Construct from mesh and name and dict + regionModel + ( + const fvMesh& mesh, + const word& regionType, + const word& modelName, + const dictionary& dict, + bool readFields = true + ); + + //- Destructor virtual ~regionModel(); @@ -162,6 +179,9 @@ public: //- Return the active flag inline const Switch& active() const; + //- Return the information flag + inline const Switch& infoOutput() const; + //- Return the model name inline const word& modelName() const; diff --git a/src/regionModels/regionModel/regionModel/regionModelI.H b/src/regionModels/regionModel/regionModel/regionModelI.H index d99b156bf645062512dc317976f2c0b88917ad84..bf543c7b4baed749ebda28031ee8bc2b4917c783 100644 --- a/src/regionModels/regionModel/regionModel/regionModelI.H +++ b/src/regionModels/regionModel/regionModel/regionModelI.H @@ -46,6 +46,12 @@ inline const Foam::Switch& Foam::regionModels::regionModel::active() const } +inline const Foam::Switch& Foam::regionModels::regionModel::infoOutput() const +{ + return infoOutput_; +} + + inline const Foam::word& Foam::regionModels::regionModel::modelName() const { return modelName_; diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1D.C b/src/regionModels/regionModel/regionModel1D/regionModel1D.C index 3902a689a7676786414db1e9f4f6a10c840b4dca..2266ffc6554cc0c56a8f0f9f944efc2e5a57b2d3 100644 --- a/src/regionModels/regionModel/regionModel1D/regionModel1D.C +++ b/src/regionModels/regionModel/regionModel1D/regionModel1D.C @@ -159,6 +159,21 @@ bool Foam::regionModels::regionModel1D::read() } +bool Foam::regionModels::regionModel1D::read(const dictionary& dict) +{ + if (regionModel::read(dict)) + { + moveMesh_.readIfPresent("moveMesh", dict); + + return true; + } + else + { + return false; + } +} + + Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh ( const scalarList& deltaV, @@ -301,6 +316,35 @@ Foam::regionModels::regionModel1D::regionModel1D } +Foam::regionModels::regionModel1D::regionModel1D +( + const fvMesh& mesh, + const word& regionType, + const word& modelName, + const dictionary& dict, + bool readFields +) +: + regionModel(mesh, regionType, modelName, dict, readFields), + boundaryFaceFaces_(regionMesh().nCells()), + boundaryFaceCells_(regionMesh().nCells()), + boundaryFaceOppositeFace_(regionMesh().nCells()), + nLayers_(0), + nMagSfPtr_(NULL), + moveMesh_(false) +{ + if (active_) + { + constructMeshObjects(); + initialise(); + + if (readFields) + { + read(dict); + } + } +} + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::regionModels::regionModel1D::~regionModel1D() diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1D.H b/src/regionModels/regionModel/regionModel1D/regionModel1D.H index 7d51d3ef365794f4dcf8634e6d1ad44a2377af92..eb7304d704e88b5b85cfe8e0c224df0209ff4fee 100644 --- a/src/regionModels/regionModel/regionModel1D/regionModel1D.H +++ b/src/regionModels/regionModel/regionModel1D/regionModel1D.H @@ -105,6 +105,9 @@ protected: //- Read control parameters from dictionary virtual bool read(); + //- Read control parameters from dictionary + virtual bool read(const dictionary& dict); + //- Move mesh points according to change in cell volumes // Returns map ordered by cell where 1 = cell moved, 0 = cell unchanged tmp<labelField> moveMesh @@ -134,6 +137,17 @@ public: bool readFields = true ); + //- Construct from mesh, region type and name and dict + regionModel1D + ( + const fvMesh& mesh, + const word& regionType, + const word& modelName, + const dictionary& dict, + bool readFields = true + ); + + //- Destructor virtual ~regionModel1D(); diff --git a/src/regionModels/surfaceFilmModels/noFilm/noFilm.C b/src/regionModels/surfaceFilmModels/noFilm/noFilm.C index 26bad8f390e7d450b9c68c29afdd0baf27164c4c..7fe71e4ead8283bbd85918bd0685275aff064798 100644 --- a/src/regionModels/surfaceFilmModels/noFilm/noFilm.C +++ b/src/regionModels/surfaceFilmModels/noFilm/noFilm.C @@ -62,12 +62,12 @@ bool noFilm::read() noFilm::noFilm ( - const word&, + const word& modelType, const fvMesh& mesh, - const dimensionedVector& + const dimensionedVector& g ) : - surfaceFilmModel(mesh) + surfaceFilmModel(modelType, mesh, g) {} diff --git a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.C b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.C index bfded1d8fae5da31ffdd38331cc0751961ef1124..f595568ce58042837255791c7ff4789b2e66597f 100644 --- a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.C +++ b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.C @@ -28,17 +28,19 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -template<> -const char* Foam::NamedEnum -< - Foam::regionModels::surfaceFilmModels::surfaceFilmModel::thermoModelType, - 2 ->::names[] = +namespace Foam { - "constant", - "singleComponent" -}; - + template<> + const char* NamedEnum + < + regionModels::surfaceFilmModels::surfaceFilmModel::thermoModelType, + 2 + >::names[] = + { + "constant", + "singleComponent" + }; +} const Foam::NamedEnum < @@ -48,7 +50,7 @@ const Foam::NamedEnum Foam::regionModels::surfaceFilmModels::surfaceFilmModel::thermoModelTypeNames_; -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { @@ -81,14 +83,6 @@ bool surfaceFilmModel::read() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -surfaceFilmModel::surfaceFilmModel(const fvMesh& mesh) -: - singleLayerRegion(mesh), - g_(vector::zero), - thermoModel_(tmConstant) -{} - - surfaceFilmModel::surfaceFilmModel ( const word& modelType, diff --git a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.H b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.H index 1e26c9db9c8ab16e9acff145ae93c06b865b2b75..00a481469525c29c041998bb286231691df6144a 100644 --- a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.H +++ b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.H @@ -130,9 +130,6 @@ public: // Constructors - //- Construct null - surfaceFilmModel(const fvMesh& mesh); - //- Construct from type name, mesh and gravity vector surfaceFilmModel ( diff --git a/src/regionModels/thermoBaffleModels/Make/files b/src/regionModels/thermoBaffleModels/Make/files index 1a0352a4bf037e64b349f1e99641a36053f793bd..41bb7d03dbf7e66fe338a037ad5d9d853cdea598 100644 --- a/src/regionModels/thermoBaffleModels/Make/files +++ b/src/regionModels/thermoBaffleModels/Make/files @@ -3,5 +3,7 @@ thermoBaffleModel/thermoBaffleModelNew.C thermoBaffle2D/thermoBaffle2D.C noThermo/noThermo.C +derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.C + LIB = $(FOAM_LIBBIN)/libthermoBaffleModels diff --git a/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.C b/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.C new file mode 100644 index 0000000000000000000000000000000000000000..a78bb2c311e2f8dcb95a1ebec227ff85bc095dac --- /dev/null +++ b/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.C @@ -0,0 +1,235 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "temperatureThermoBaffleFvPatchScalarField.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +temperatureThermoBaffleFvPatchScalarField:: +temperatureThermoBaffleFvPatchScalarField +( + const fvPatch& p, + const DimensionedField<scalar, volMesh>& iF +) +: + turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(p, iF), + owner_(false), + baffle_(), + solidThermoType_("undefined") +{} + + +temperatureThermoBaffleFvPatchScalarField:: +temperatureThermoBaffleFvPatchScalarField +( + const temperatureThermoBaffleFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField<scalar, volMesh>& iF, + const fvPatchFieldMapper& mapper +) +: + turbulentTemperatureCoupledBaffleMixedFvPatchScalarField + ( + ptf, + p, + iF, + mapper + ), + owner_(ptf.owner_), + baffle_(ptf.baffle_), + solidThermoType_(ptf.solidThermoType_) +{} + + +temperatureThermoBaffleFvPatchScalarField:: +temperatureThermoBaffleFvPatchScalarField +( + const fvPatch& p, + const DimensionedField<scalar, volMesh>& iF, + const dictionary& dict +) +: + turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(p, iF, dict), + owner_(false), + baffle_(), + solidThermoType_() +{ + if (!isA<directMappedPatchBase>(patch().patch())) + { + FatalErrorIn + ( + "temperatureThermoBaffleFvPatchScalarField::" + "temperatureThermoBaffleFvPatchScalarField\n" + "(\n" + " const fvPatch& p,\n" + " const DimensionedField<scalar, volMesh>& iF,\n" + " const dictionary& dict\n" + ")\n" + ) << "\n patch type '" << patch().type() + << "' not type '" << directMappedPatchBase::typeName << "'" + << "\n for patch " << patch().name() + << " of field " << dimensionedInternalField().name() + << " in file " << dimensionedInternalField().objectPath() + << exit(FatalError); + } + + const fvMesh& thisMesh = patch().boundaryMesh().mesh(); + + typedef regionModels::thermoBaffleModels::thermoBaffleModel baffle; + + if + ( + thisMesh.name() == polyMesh::defaultRegion + && !thisMesh.foundObject<baffle>("thermoBaffle") + && !owner_ + ) + { + Info << "Creating thermal baffle..." << endl; + baffle_.reset(baffle::New(thisMesh, dict).ptr()); + owner_ = true; + dict.lookup("thermoType") >> solidThermoType_; + } +} + + +temperatureThermoBaffleFvPatchScalarField:: +temperatureThermoBaffleFvPatchScalarField +( + const temperatureThermoBaffleFvPatchScalarField& ptf, + const DimensionedField<scalar, volMesh>& iF +) +: + turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(ptf, iF), + owner_(ptf.owner_), + baffle_(ptf.baffle_), + solidThermoType_(ptf.solidThermoType_) +{} + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + + +void temperatureThermoBaffleFvPatchScalarField::autoMap +( + const fvPatchFieldMapper& m +) +{ + mixedFvPatchScalarField::autoMap(m); +} + + +void temperatureThermoBaffleFvPatchScalarField::rmap +( + const fvPatchScalarField& ptf, + const labelList& addr +) +{ + mixedFvPatchScalarField::rmap(ptf, addr); +} + + +void temperatureThermoBaffleFvPatchScalarField::updateCoeffs() +{ + if (this->updated()) + { + return; + } + + const fvMesh& thisMesh = patch().boundaryMesh().mesh(); + + if + ( + thisMesh.name() == polyMesh::defaultRegion + && owner_ + ) + { + baffle_->evolve(); + } + + turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs(); +} + + +void temperatureThermoBaffleFvPatchScalarField::write(Ostream& os) const +{ + turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::write(os); + + const fvMesh& thisMesh = patch().boundaryMesh().mesh(); + + if (thisMesh.name() == polyMesh::defaultRegion && owner_) + { + os.writeKeyword("thermoBaffleModel") << baffle_->modelName() + << token::END_STATEMENT << nl; + + os.writeKeyword("regionName") << baffle_->regionMesh().name() + << token::END_STATEMENT << nl; + + os.writeKeyword("infoOutput") << baffle_->infoOutput() + << token::END_STATEMENT << nl; + + os.writeKeyword("active") << baffle_->active() + << token::END_STATEMENT << nl; + + os.writeKeyword(word(baffle_->modelName() + "coeffs")); + + os << baffle_->coeffs() << nl; + + os.writeKeyword("thermoType") << solidThermoType_ + << token::END_STATEMENT << nl; + + os.writeKeyword(word(solidThermoType_ + "Coeffs")) << nl; + + os << indent << '{' << nl + << indent << baffle_->thermo() << nl + << indent << '}' << nl; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePatchTypeField +( + fvPatchScalarField, + temperatureThermoBaffleFvPatchScalarField +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace compressible +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +// ************************************************************************* // diff --git a/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.H b/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.H new file mode 100644 index 0000000000000000000000000000000000000000..2d61bf09c6b1e748f32dc0faa09d92f6140f9896 --- /dev/null +++ b/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.H @@ -0,0 +1,216 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::temperatureThermoBaffleFvPatchScalarField + +Description + Thermal bounday applied to both sides of the thermal baffle region and + in the primary region. + The primary region creates and evolves the thermal baffle heat transfer + equation. The solid thermo and baffle dictionaries are located on the + primary region. + + type compressible::temperatureThermoBaffle; + + // Coupled BC. + neighbourFieldName T; + K basicThermo; + KName none; + + + // Thermo baffle model + thermoBaffleModel thermoBaffle2D; + regionName baffleRegion; + infoOutput yes; + active yes; + thermoBaffle2DCoeffs + { + } + + + // Solid thermo + thermoType constSolidThermo; + + constSolidThermoCoeffs + { + //- thermo properties + rho rho [1 -3 0 0 0 0 0] 80; + Cp Cp [0 2 -2 -1 0 0 0] 15; + K K [1 1 -3 -1 0 0 0] 0.01; + + //- radiative properties + kappa kappa [0 -1 0 0 0 0 0] 0; + sigmaS sigmaS [0 -1 0 0 0 0 0] 0; + emissivity emissivity [0 0 0 0 0 0 0] 1; + + //- chemical properties + Hf Hf [0 2 -2 0 0 0 0] 0; + } + + value uniform 300; + + +SourceFiles + temperatureThermoBaffleFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef temperatureThermoBaffleFvPatchScalarField_H +#define temperatureThermoBaffleFvPatchScalarField_H + + +#include "autoPtr.H" +#include "regionModel.H" +#include "thermoBaffleModel.H" +#include "turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +namespace Foam +{ +namespace compressible +{ + +/*---------------------------------------------------------------------------*\ + Class temperatureThermoBaffleFvPatchScalarField Declaration +\*---------------------------------------------------------------------------*/ + +class temperatureThermoBaffleFvPatchScalarField +: + public turbulentTemperatureCoupledBaffleMixedFvPatchScalarField +{ + // Private data + + //- Is the baffle owner + bool owner_; + + //- Thermal baffle + autoPtr<regionModels::thermoBaffleModels::thermoBaffleModel> baffle_; + + //- Solid thermo type + word solidThermoType_; + + +public: + + //- Runtime type information + TypeName("compressible::temperatureThermoBaffle"); + + + // Constructors + + //- Construct from patch and internal field + temperatureThermoBaffleFvPatchScalarField + ( + const fvPatch&, + const DimensionedField<scalar, volMesh>& + ); + + //- Construct from patch, internal field and dictionary + temperatureThermoBaffleFvPatchScalarField + ( + const fvPatch&, + const DimensionedField<scalar, volMesh>&, + const dictionary& + ); + + //- Construct by mapping given + // temperatureThermoBaffleFvPatchScalarField onto a new patch + temperatureThermoBaffleFvPatchScalarField + ( + const temperatureThermoBaffleFvPatchScalarField&, + const fvPatch&, + const DimensionedField<scalar, volMesh>&, + const fvPatchFieldMapper& + ); + + + //- Construct and return a clone + virtual tmp<fvPatchScalarField> clone() const + { + return tmp<fvPatchScalarField> + ( + new temperatureThermoBaffleFvPatchScalarField(*this) + ); + } + + //- Construct as copy setting internal field reference + temperatureThermoBaffleFvPatchScalarField + ( + const temperatureThermoBaffleFvPatchScalarField&, + const DimensionedField<scalar, volMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<fvPatchScalarField> clone + ( + const DimensionedField<scalar, volMesh>& iF + ) const + { + return tmp<fvPatchScalarField> + ( + new temperatureThermoBaffleFvPatchScalarField(*this, iF) + ); + } + + + // Member functions + + + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + virtual void autoMap + ( + const fvPatchFieldMapper& + ); + + //- Reverse map the given fvPatchField onto this fvPatchField + virtual void rmap + ( + const fvPatchScalarField&, + const labelList& + ); + + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace compressible +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +#endif + +// ************************************************************************* // diff --git a/src/regionModels/thermoBaffleModels/noThermo/noThermo.C b/src/regionModels/thermoBaffleModels/noThermo/noThermo.C index 32b8e32e04039031c78ae30819620c05f97d2356..841cfba283beba14555ffb57245b6dd0f15116dd 100644 --- a/src/regionModels/thermoBaffleModels/noThermo/noThermo.C +++ b/src/regionModels/thermoBaffleModels/noThermo/noThermo.C @@ -127,6 +127,14 @@ const volScalarField& noThermo::T() const } +const basicSolidThermo& noThermo::thermo() const +{ + FatalErrorIn("const volScalarField& noThermo::T() const") + << "T field not available for " << type() << abort(FatalError); + return reinterpret_cast<const basicSolidThermo&>(null); +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace thermoBaffleModels diff --git a/src/regionModels/thermoBaffleModels/noThermo/noThermo.H b/src/regionModels/thermoBaffleModels/noThermo/noThermo.H index 387241cca4255ac0859893128155390c32d8f92e..fa4f7f289c3b8608741d85a80974f8a144cc95e4 100644 --- a/src/regionModels/thermoBaffleModels/noThermo/noThermo.H +++ b/src/regionModels/thermoBaffleModels/noThermo/noThermo.H @@ -92,6 +92,13 @@ public: // Member Functions + + // Thermo properties + + //- Return const reference to the basicSolidThermo + virtual const basicSolidThermo& thermo() const; + + // Fields //- Return the film specific heat capacity [J/kg/K] diff --git a/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.C b/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.C index 0cf810afc1253b2262fcbc2a31f7444d8a77c15d..c77ac867d7921a5d66fc4294a01728ba327ecfa9 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.C +++ b/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.C @@ -46,6 +46,7 @@ namespace thermoBaffleModels defineTypeNameAndDebug(thermoBaffle2D, 0); addToRunTimeSelectionTable(thermoBaffleModel, thermoBaffle2D, mesh); +addToRunTimeSelectionTable(thermoBaffleModel, thermoBaffle2D, dictionary); // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // @@ -90,8 +91,8 @@ void thermoBaffle2D::solveEnergy() volScalarField K("K", thermo_->K()); - //If region is one-dimension variable thickness can be used. - if (oneD_) + //If region is one-dimension variable thickness + if (oneD_ && !constantThickness_) { // Scale K and rhoCp and fill Q in the internal baffle region. const label patchI = intCoupledPatchIDs_[0]; @@ -136,6 +137,60 @@ void thermoBaffle2D::solveEnergy() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +thermoBaffle2D::thermoBaffle2D +( + const word& modelType, + const fvMesh& mesh, + const dictionary& dict +) +: + thermoBaffleModel(modelType, mesh, dict), + nNonOrthCorr_(readLabel(solution().lookup("nNonOrthCorr"))), + thermo_(basicSolidThermo::New(regionMesh(), dict)), + T_(thermo_->T()), + Qs_ + ( + IOobject + ( + "Qs", + regionMesh().time().timeName(), + regionMesh(), + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + regionMesh(), + dimensionedScalar + ( + "zero", + dimEnergy/dimArea/dimTime, + pTraits<scalar>::zero + ) + ), + Q_ + ( + IOobject + ( + "Q", + regionMesh().time().timeName(), + regionMesh(), + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + regionMesh(), + dimensionedScalar + ( + "zero", + dimEnergy/dimVolume/dimTime, + pTraits<scalar>::zero + ) + ) +{ + init(); + thermo_->correct(); +} + + thermoBaffle2D::thermoBaffle2D ( const word& modelType, @@ -183,7 +238,22 @@ thermoBaffle2D::thermoBaffle2D ) ) { - if (oneD_) + init(); + thermo_->correct(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +thermoBaffle2D::~thermoBaffle2D() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +void thermoBaffle2D::init() +{ + if (oneD_ && !constantThickness_) { label patchI = intCoupledPatchIDs_[0]; const label Qsb = Qs_.boundaryField()[patchI].size(); @@ -194,7 +264,8 @@ thermoBaffle2D::thermoBaffle2D "thermoBaffle2D::thermoBaffle2D" "(" " const word& modelType," - " const fvMesh& mesh" + " const fvMesh& mesh," + " const dictionary& dict" ")" ) << "the boundary field of Qs is " << Qsb << " and " << nl @@ -202,19 +273,9 @@ thermoBaffle2D::thermoBaffle2D << exit(FatalError); } } - - thermo_->correct(); } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -thermoBaffle2D::~thermoBaffle2D() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - void thermoBaffle2D::preEvolveRegion() {} @@ -258,6 +319,12 @@ const volScalarField& thermoBaffle2D::T() const } +const basicSolidThermo& thermoBaffle2D::thermo() const +{ + return thermo_; +} + + void thermoBaffle2D::info() const { Info<< indent << "min/max(T) = " << min(T_).value() << ", " diff --git a/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.H b/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.H index 8cd28b76e52f5edd2b81808f2dab4bcff7eee4c9..1b66813be8b0d8d3af8ad71b6e791d5f9c610924 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.H +++ b/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.H @@ -37,7 +37,6 @@ SourceFiles #define thermoBaffle2D_H #include "thermoBaffleModel.H" -#include "basicSolidThermo.H" #include "volFieldsFwd.H" @@ -69,6 +68,9 @@ private: //- Disallow default bitwise assignment void operator=(const thermoBaffle2D&); + //- Initialize thermoBaffle2D + void init(); + protected: @@ -106,7 +108,7 @@ protected: // Equations //- Solve energy equation - virtual void solveEnergy(); + void solveEnergy(); public: @@ -120,6 +122,16 @@ public: //- Construct from components thermoBaffle2D(const word& modelType, const fvMesh& mesh); + //- Construct from components and dict + thermoBaffle2D + ( + const word& modelType, + const fvMesh& mesh, + const dictionary& dict + + ); + + //- Destructor virtual ~thermoBaffle2D(); @@ -130,7 +142,7 @@ public: // Thermo properties //- Return const reference to the basicSolidThermo - inline const basicSolidThermo& thermo() const; + virtual const basicSolidThermo& thermo() const; // Fields @@ -176,10 +188,10 @@ public: // Evolution - //- Pre-evolve film + //- Pre-evolve thermal baffle virtual void preEvolveRegion(); - //- Evolve the film equations + //- Evolve the thermal baffle virtual void evolveRegion(); diff --git a/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2DI.H b/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2DI.H index 0e3978da3c1a3f2fe5348513cad6a01466998a69..227a25975b4ca43d299d3ac73dad74d0153d82d6 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2DI.H +++ b/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2DI.H @@ -38,11 +38,6 @@ namespace thermoBaffleModels // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -inline const basicSolidThermo& thermoBaffle2D::thermo() const -{ - return thermo_; -} - inline tmp<scalarField> thermoBaffle2D::hs ( diff --git a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.C b/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.C index 901e8c1600917e6ac6ba1de9ac5bd063b386bd07..0ca4856fe68cf8082d4be08f4f4a57a4e17dae51 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.C +++ b/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.C @@ -41,6 +41,7 @@ namespace thermoBaffleModels defineTypeNameAndDebug(thermoBaffleModel, 0); defineRunTimeSelectionTable(thermoBaffleModel, mesh); +defineRunTimeSelectionTable(thermoBaffleModel, dictionary); // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // @@ -52,23 +53,7 @@ bool thermoBaffleModel::read() } -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -thermoBaffleModel::thermoBaffleModel(const fvMesh& mesh) -: - regionModel1D(mesh), - thickness_(), - delta_("delta", dimLength, 0.0), - oneD_(false) -{} - - -thermoBaffleModel::thermoBaffleModel(const word& modelType, const fvMesh& mesh) -: - regionModel1D(mesh, "thermoBaffle", modelType), - thickness_(), - delta_("delta", dimLength, 0.0), - oneD_(false) +void thermoBaffleModel::init() { if (active_) { @@ -86,7 +71,14 @@ thermoBaffleModel::thermoBaffleModel(const word& modelType, const fvMesh& mesh) label nFaces = 0; forAll (rbm, patchi) { - if (rbm[patchi].size() && isA<wedgePolyPatch>(rbm[patchi])) + if ( + rbm[patchi].size() + && + ( + isA<wedgePolyPatch>(rbm[patchi]) + || isA<emptyPolyPatch>(rbm[patchi]) + ) + ) { nFaces += rbm[patchi].size(); } @@ -108,7 +100,11 @@ thermoBaffleModel::thermoBaffleModel(const word& modelType, const fvMesh& mesh) const label patchI = intCoupledPatchIDs_[i]; const polyPatch& pp = rbm[patchI]; - if (!isA<directMappedVariableThicknessWallPolyPatch>(pp) && oneD_) + if ( + !isA<directMappedVariableThicknessWallPolyPatch>(pp) + && oneD_ + && !constantThickness_ + ) { FatalErrorIn ( @@ -120,7 +116,8 @@ thermoBaffleModel::thermoBaffleModel(const word& modelType, const fvMesh& mesh) ) << "\n patch type '" << pp.type() << "' not type '" << directMappedVariableThicknessWallPolyPatch::typeName - << "'. This is necessary for 1D solution" + << "'. This is necessary for 1D solution " + << " and variable thickness" << "\n for patch. " << pp.name() << exit(FatalError); } @@ -142,7 +139,7 @@ thermoBaffleModel::thermoBaffleModel(const word& modelType, const fvMesh& mesh) } } - if (oneD_) + if (oneD_ && !constantThickness_) { const label patchI = intCoupledPatchIDs_[0]; const polyPatch& pp = rbm[patchI]; @@ -192,6 +189,48 @@ thermoBaffleModel::thermoBaffleModel(const word& modelType, const fvMesh& mesh) } +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +thermoBaffleModel::thermoBaffleModel(const fvMesh& mesh) +: + regionModel1D(mesh), + thickness_(), + delta_("delta", dimLength, 0.0), + oneD_(false), + constantThickness_(true) +{} + + +thermoBaffleModel::thermoBaffleModel +( + const word& modelType, + const fvMesh& mesh, + const dictionary& dict + +) +: + regionModel1D(mesh, "thermoBaffle", modelType, dict, true), + thickness_(), + delta_("delta", dimLength, 0.0), + oneD_(false), + constantThickness_(dict.lookupOrDefault<bool>("constantThickness", true)) +{ + init(); +} + + +thermoBaffleModel::thermoBaffleModel(const word& modelType, const fvMesh& mesh) +: + regionModel1D(mesh, "thermoBaffle", modelType), + thickness_(), + delta_("delta", dimLength, 0.0), + oneD_(false), + constantThickness_(lookupOrDefault<bool>("constantThickness", true)) +{ + init(); +} + + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // thermoBaffleModel::~thermoBaffleModel() diff --git a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.H b/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.H index 1a20d9222b9d094cde326a1d362ebcdc3eea5f6a..cee13d8e68234f5548e511f295f725337d2524e3 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.H +++ b/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.H @@ -38,6 +38,7 @@ SourceFiles #include "scalarIOField.H" #include "autoPtr.H" #include "volFieldsFwd.H" +#include "basicSolidThermo.H" #include "regionModel1D.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -67,6 +68,9 @@ private: //- Disallow default bitwise assignment void operator=(const thermoBaffleModel&); + //- Initialize thermal Baffle + void init(); + protected: @@ -75,12 +79,15 @@ protected: //- Baffle physical thickness scalarField thickness_; - //- Baffle geometric thickness + //- Baffle mesh thickness dimensionedScalar delta_; //- Is it one dimension bool oneD_; + //- Is thickness constant + bool constantThickness_; + // Protected Member Functions @@ -94,7 +101,7 @@ public: TypeName("thermoBaffleModel"); - // Declare runtime constructor selection table + // Declare runtime constructor selection tables declareRunTimeSelectionTable ( @@ -108,6 +115,20 @@ public: (modelType, mesh) ); + declareRunTimeSelectionTable + ( + autoPtr, + thermoBaffleModel, + dictionary, + ( + const word& modelType, + const fvMesh& mesh, + const dictionary& dict + ), + (modelType, mesh, dict) + ); + + // Constructors //- Construct null from mesh @@ -116,12 +137,27 @@ public: //- Construct from type name and mesh thermoBaffleModel(const word& modelType, const fvMesh& mesh); + //- Construct from type name and mesh and dict + thermoBaffleModel + ( + const word& modelType, + const fvMesh& mesh, + const dictionary& dict + ); + // Selectors //- Return a reference to the selected model static autoPtr<thermoBaffleModel> New(const fvMesh& mesh); + //- Return a reference to the selected model using dictionary + static autoPtr<thermoBaffleModel> New + ( + const fvMesh& mesh, + const dictionary& dict + ); + //- Destructor virtual ~thermoBaffleModel(); @@ -129,8 +165,11 @@ public: // Member Functions + // Access + //- Return solid thermo + virtual const basicSolidThermo& thermo() const = 0; //- Return thickness const scalarField& thickness() const @@ -150,6 +189,12 @@ public: return oneD_; } + //- Return if region has constant thickness + bool constantThickness() const + { + return constantThickness_; + } + // Fields diff --git a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModelNew.C b/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModelNew.C index 976b478e331810869994907b124eb88ebc85fb63..15dcb296a1d46caaad0d3d849ff81ef727b999e7 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModelNew.C +++ b/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModelNew.C @@ -76,6 +76,35 @@ autoPtr<thermoBaffleModel> thermoBaffleModel::New(const fvMesh& mesh) } +autoPtr<thermoBaffleModel> thermoBaffleModel::New +( + const fvMesh& mesh, + const dictionary& dict +) +{ + + word modelType = dict.lookup("thermoBaffleModel"); + + Info<< "Selecting baffle model " << modelType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(modelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + + FatalErrorIn("thermoBaffleModel::New(const fvMesh&,const dictionary&)") + << "Unknown thermoBaffleModel type " << modelType + << nl << nl + << "Valid thermoBaffleModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + return autoPtr<thermoBaffleModel>(cstrIter()(modelType, mesh, dict)); +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace thermoBaffleModels diff --git a/src/sampling/Make/files b/src/sampling/Make/files index ddf46a17e8516eec55d0cf81d4818598bcecb039..0c679f52d89373148f54e020443d626ec38afeda 100644 --- a/src/sampling/Make/files +++ b/src/sampling/Make/files @@ -5,6 +5,7 @@ probes/probesFunctionObject/probesFunctionObject.C sampledSet/cloud/cloudSet.C sampledSet/coordSet/coordSet.C +sampledSet/patchCloud/patchCloudSet.C sampledSet/polyLine/polyLineSet.C sampledSet/face/faceOnlySet.C sampledSet/midPoint/midPointSet.C diff --git a/src/sampling/sampledSet/patchCloud/patchCloudSet.C b/src/sampling/sampledSet/patchCloud/patchCloudSet.C new file mode 100644 index 0000000000000000000000000000000000000000..85877da3b834ebf05fbe2f8aad8e938d33b0bcf7 --- /dev/null +++ b/src/sampling/sampledSet/patchCloud/patchCloudSet.C @@ -0,0 +1,322 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "patchCloudSet.H" +#include "polyMesh.H" +#include "addToRunTimeSelectionTable.H" +#include "pointIndexHit.H" +#include "Tuple2.H" +#include "treeBoundBox.H" +#include "indexedOctree.H" +#include "treeDataFace.H" +#include "Time.H" +#include "meshTools.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(patchCloudSet, 0); + addToRunTimeSelectionTable(sampledSet, patchCloudSet, word); + + + //- Helper class for finding nearest + // Nearest: + // - point+local index + // - sqr(distance) + // - processor + typedef Tuple2<pointIndexHit, Tuple2<scalar, label> > nearInfo; + + class nearestEqOp + { + + public: + + void operator()(nearInfo& x, const nearInfo& y) const + { + if (y.first().hit()) + { + if (!x.first().hit()) + { + x = y; + } + else if (y.second().first() < x.second().first()) + { + x = y; + } + } + } + }; +} + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::patchCloudSet::calcSamples +( + DynamicList<point>& samplingPts, + DynamicList<label>& samplingCells, + DynamicList<label>& samplingFaces, + DynamicList<label>& samplingSegments, + DynamicList<scalar>& samplingCurveDist +) const +{ + if (debug) + { + Info<< "patchCloudSet : sampling on patches :" << endl; + } + + // Construct search tree for all patch faces. + label sz = 0; + forAllConstIter(labelHashSet, patchSet_, iter) + { + const polyPatch& pp = mesh().boundaryMesh()[iter.key()]; + + sz += pp.size(); + + if (debug) + { + Info<< " " << pp.name() << " size " << pp.size() << endl; + } + } + + labelList patchFaces(sz); + sz = 0; + treeBoundBox bb(point::max, point::min); + forAllConstIter(labelHashSet, patchSet_, iter) + { + const polyPatch& pp = mesh().boundaryMesh()[iter.key()]; + + forAll(pp, i) + { + patchFaces[sz++] = pp.start()+i; + } + + const boundBox patchBb(pp.points(), pp.meshPoints()); + + bb.min() = min(bb.min(), patchBb.min()); + bb.max() = max(bb.max(), patchBb.max()); + } + + // Not very random + Random rndGen(123456); + // Make bb asymetric just to avoid problems on symmetric meshes + bb = bb.extend(rndGen, 1E-4); + + bb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); + bb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); + + + indexedOctree<treeDataFace> patchTree + ( + treeDataFace // all information needed to search faces + ( + false, // do not cache bb + mesh(), + patchFaces // boundary faces only + ), + bb, // overall search domain + 8, // maxLevel + 10, // leafsize + 3.0 // duplicity + ); + + + + // All the info for nearest. Construct to miss + List<nearInfo> nearest(sampleCoords_.size()); + + forAll(sampleCoords_, sampleI) + { + const point& sample = sampleCoords_[sampleI]; + + pointIndexHit& nearInfo = nearest[sampleI].first(); + + // Find the nearest locally + nearInfo = patchTree.findNearest(sample, magSqr(bb.span())); + + // Fill in the distance field and the processor field + if (!nearInfo.hit()) + { + nearest[sampleI].second().first() = Foam::sqr(GREAT); + nearest[sampleI].second().second() = Pstream::myProcNo(); + } + else + { + // Set nearest to mesh face label + nearInfo.setIndex(patchFaces[nearInfo.index()]); + + nearest[sampleI].second().first() = magSqr + ( + nearInfo.hitPoint() + - sample + ); + nearest[sampleI].second().second() = Pstream::myProcNo(); + } + } + + + // Find nearest. + Pstream::listCombineGather(nearest, nearestEqOp()); + Pstream::listCombineScatter(nearest); + + + if (debug && Pstream::master()) + { + OFstream str + ( + mesh().time().path() + / name() + + "_nearest.obj" + ); + Info<< "Dumping mapping as lines from supplied points to" + << " nearest patch face to file " << str.name() << endl; + + label vertI = 0; + + forAll(nearest, i) + { + meshTools::writeOBJ(str, sampleCoords_[i]); + vertI++; + meshTools::writeOBJ(str, nearest[i].first().hitPoint()); + vertI++; + str << "l " << vertI-1 << ' ' << vertI << nl; + } + } + + + // Store the sampling locations on the nearest processor + forAll(nearest, sampleI) + { + if (nearest[sampleI].second().second() == Pstream::myProcNo()) + { + const pointIndexHit& nearInfo = nearest[sampleI].first(); + + label faceI = nearInfo.index(); + + samplingPts.append(nearInfo.hitPoint()); + samplingCells.append(mesh().faceOwner()[faceI]); + samplingFaces.append(faceI); + samplingSegments.append(0); + samplingCurveDist.append(1.0 * sampleI); + } + } +} + + +void Foam::patchCloudSet::genSamples() +{ + // Storage for sample points + DynamicList<point> samplingPts; + DynamicList<label> samplingCells; + DynamicList<label> samplingFaces; + DynamicList<label> samplingSegments; + DynamicList<scalar> samplingCurveDist; + + calcSamples + ( + samplingPts, + samplingCells, + samplingFaces, + samplingSegments, + samplingCurveDist + ); + + samplingPts.shrink(); + samplingCells.shrink(); + samplingFaces.shrink(); + samplingSegments.shrink(); + samplingCurveDist.shrink(); + + setSamples + ( + samplingPts, + samplingCells, + samplingFaces, + samplingSegments, + samplingCurveDist + ); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::patchCloudSet::patchCloudSet +( + const word& name, + const polyMesh& mesh, + meshSearch& searchEngine, + const word& axis, + const List<point>& sampleCoords, + const labelHashSet& patchSet +) +: + sampledSet(name, mesh, searchEngine, axis), + sampleCoords_(sampleCoords), + patchSet_(patchSet) +{ + genSamples(); + + if (debug) + { + write(Info); + } +} + + +Foam::patchCloudSet::patchCloudSet +( + const word& name, + const polyMesh& mesh, + meshSearch& searchEngine, + const dictionary& dict +) +: + sampledSet(name, mesh, searchEngine, dict), + sampleCoords_(dict.lookup("points")), + patchSet_ + ( + mesh.boundaryMesh().patchSet + ( + wordReList(dict.lookup("patches")) + ) + ) +{ + genSamples(); + + if (debug) + { + write(Info); + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::patchCloudSet::~patchCloudSet() +{} + + +// ************************************************************************* // diff --git a/src/sampling/sampledSet/patchCloud/patchCloudSet.H b/src/sampling/sampledSet/patchCloud/patchCloudSet.H new file mode 100644 index 0000000000000000000000000000000000000000..fd0ce606b77ab3597532e5a68174d846e6e93ccf --- /dev/null +++ b/src/sampling/sampledSet/patchCloud/patchCloudSet.H @@ -0,0 +1,122 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::patchCloudSet + +Description + Like cloudSet but samples nearest patch face + + +SourceFiles + patchCloudSet.C + +\*---------------------------------------------------------------------------*/ + +#ifndef patchCloudSet_H +#define patchCloudSet_H + +#include "sampledSet.H" +#include "DynamicList.H" +#include "HashSet.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class patchCloudSet Declaration +\*---------------------------------------------------------------------------*/ + +class patchCloudSet +: + public sampledSet +{ + // Private data + + //- Sampling points + List<point> sampleCoords_; + + //- Patches to sample + labelHashSet patchSet_; + + // Private Member Functions + + //- Samples all points in sampleCoords. + void calcSamples + ( + DynamicList<point>& samplingPts, + DynamicList<label>& samplingCells, + DynamicList<label>& samplingFaces, + DynamicList<label>& samplingSegments, + DynamicList<scalar>& samplingCurveDist + ) const; + + //- Uses calcSamples to obtain samples. Copies them into *this. + void genSamples(); + + +public: + + //- Runtime type information + TypeName("patchCloud"); + + + // Constructors + + //- Construct from components + patchCloudSet + ( + const word& name, + const polyMesh& mesh, + meshSearch& searchEngine, + const word& axis, + const List<point>& sampleCoords, + const labelHashSet& patchSet + ); + + //- Construct from dictionary + patchCloudSet + ( + const word& name, + const polyMesh& mesh, + meshSearch& searchEngine, + const dictionary& dict + ); + + + //- Destructor + virtual ~patchCloudSet(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.H b/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.H index d13ea0161ed3a524839f30a5566c929b968765fc..254372b8db01aafdc29ae21086b1761e2f49f5fc 100644 --- a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.H +++ b/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::hPsiThermo + Foam::hRhoThermo Description Enthalpy for a mixture based on density diff --git a/src/thermophysicalModels/basicSolidThermo/basicSolidThermo/basicSolidThermo.C b/src/thermophysicalModels/basicSolidThermo/basicSolidThermo/basicSolidThermo.C index 2888eeea17e83a2d83cb5f24df6f1830e49a4c9f..f45bd2c6bf01f39e251f74e17e7f30e7dd513518 100644 --- a/src/thermophysicalModels/basicSolidThermo/basicSolidThermo/basicSolidThermo.C +++ b/src/thermophysicalModels/basicSolidThermo/basicSolidThermo/basicSolidThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,6 +33,7 @@ namespace Foam { defineTypeNameAndDebug(basicSolidThermo, 0); defineRunTimeSelectionTable(basicSolidThermo, mesh); + defineRunTimeSelectionTable(basicSolidThermo, dictionary); } @@ -120,6 +121,92 @@ Foam::basicSolidThermo::basicSolidThermo(const fvMesh& mesh) {} +Foam::basicSolidThermo::basicSolidThermo +( + const fvMesh& mesh, + const dictionary& dict +) +: + IOdictionary + ( + IOobject + ( + "solidThermophysicalProperties", + mesh.time().constant(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + dict + ), + mesh_(mesh), + T_ + ( + IOobject + ( + "T", + mesh.time().timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ), + rho_ + ( + IOobject + ( + "rho", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimMass/dimVolume + ), + kappa_ + ( + IOobject + ( + "kappa", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimless/dimLength + ), + sigmaS_ + ( + IOobject + ( + "sigmaS", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimless/dimLength + ), + emissivity_ + ( + IOobject + ( + "emissivity", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimless + ) +{} + + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::basicSolidThermo::~basicSolidThermo() diff --git a/src/thermophysicalModels/basicSolidThermo/basicSolidThermo/basicSolidThermo.H b/src/thermophysicalModels/basicSolidThermo/basicSolidThermo/basicSolidThermo.H index f93a89bc7393a5113e12a69372551f3fd98e853a..f5d29461c0df121ef2d8703a27dc260012ce00c4 100644 --- a/src/thermophysicalModels/basicSolidThermo/basicSolidThermo/basicSolidThermo.H +++ b/src/thermophysicalModels/basicSolidThermo/basicSolidThermo/basicSolidThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -98,15 +98,33 @@ public: ); + // Declare run-time constructor selection tables + declareRunTimeSelectionTable + ( + autoPtr, + basicSolidThermo, + dictionary, + (const fvMesh& mesh, const dictionary& dict), + (mesh, dict) + ); + + // Constructors //- Construct from mesh basicSolidThermo(const fvMesh&); + //- Construct from mesh and dict + basicSolidThermo(const fvMesh&, const dictionary& dict); + //- Return a pointer to a new basicSolidThermo created from // the solidThermophysicalProperties dictionary static autoPtr<basicSolidThermo> New(const fvMesh&); + //- Return a pointer to a new basicSolidThermo created from + // local dictionary + static autoPtr<basicSolidThermo> New(const fvMesh&, const dictionary&); + //- Destructor virtual ~basicSolidThermo(); diff --git a/src/thermophysicalModels/basicSolidThermo/basicSolidThermo/basicSolidThermoNew.C b/src/thermophysicalModels/basicSolidThermo/basicSolidThermo/basicSolidThermoNew.C index a398516f2aa3c3015f16acbea19d445befae8978..42f266055d5635701e0e2fe2bfe08bc43ef2d6f2 100644 --- a/src/thermophysicalModels/basicSolidThermo/basicSolidThermo/basicSolidThermoNew.C +++ b/src/thermophysicalModels/basicSolidThermo/basicSolidThermo/basicSolidThermoNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,7 +62,7 @@ Foam::autoPtr<Foam::basicSolidThermo> Foam::basicSolidThermo::New { FatalErrorIn ( - "basicSolidThermo::New(const fvMesh&, const word&)" + "basicSolidThermo::New(const fvMesh&)" ) << "Unknown solidThermo type " << thermoType << endl << endl << "Valid solidThermo types are :" << endl @@ -74,4 +74,36 @@ Foam::autoPtr<Foam::basicSolidThermo> Foam::basicSolidThermo::New } +Foam::autoPtr<Foam::basicSolidThermo> Foam::basicSolidThermo::New +( + const fvMesh& mesh, const dictionary& dict +) +{ + if (debug) + { + Info<< "basicSolidThermo::New(const fvMesh&, const dictionary&): " + << "constructing basicSolidThermo" + << endl; + } + + const word thermoType = dict.lookup("thermoType"); + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(thermoType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "basicSolidThermo::New(const fvMesh&, const dictionary&)" + ) << "Unknown solidThermo type " << thermoType + << endl << endl + << "Valid solidThermo types are :" << endl + << dictionaryConstructorTablePtr_->toc() + << exit(FatalError); + } + + return autoPtr<basicSolidThermo>(cstrIter()(mesh, dict)); +} + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/basicSolidThermo/constSolidThermo/constSolidThermo.C b/src/thermophysicalModels/basicSolidThermo/constSolidThermo/constSolidThermo.C index 083849c7ab9b76b6cd31ccbfd50c997b1005faac..6d6ac784a4a3616f71b03d7ab4bea4e5bb05adfe 100644 --- a/src/thermophysicalModels/basicSolidThermo/constSolidThermo/constSolidThermo.C +++ b/src/thermophysicalModels/basicSolidThermo/constSolidThermo/constSolidThermo.C @@ -32,11 +32,55 @@ namespace Foam { defineTypeNameAndDebug(constSolidThermo, 0); addToRunTimeSelectionTable(basicSolidThermo, constSolidThermo, mesh); + addToRunTimeSelectionTable(basicSolidThermo, constSolidThermo, dictionary); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +Foam::constSolidThermo::constSolidThermo +( + const fvMesh& mesh, + const dictionary& dict +) +: + basicSolidThermo(mesh, dict), + dict_(dict.subDict(typeName + "Coeffs")), + constK_(dimensionedScalar(dict_.lookup("K"))), + K_ + ( + IOobject + ( + "K", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + constK_ + ), + constRho_(dimensionedScalar(dict_.lookup("rho"))), + constCp_(dimensionedScalar(dict_.lookup("Cp"))), + constHf_(dimensionedScalar(dict_.lookup("Hf"))), + constEmissivity_(dimensionedScalar(dict_.lookup("emissivity"))), + constKappa_(dimensionedScalar(dict_.lookup("kappa"))), + constSigmaS_(dimensionedScalar(dict_.lookup("sigmaS"))) +{ + read(); + + K_ = constK_; + + rho_ = constRho_; + + emissivity_ = constEmissivity_; + + kappa_ = constKappa_; + + sigmaS_ = constSigmaS_; +} + + Foam::constSolidThermo::constSolidThermo(const fvMesh& mesh) : basicSolidThermo(mesh), diff --git a/src/thermophysicalModels/basicSolidThermo/constSolidThermo/constSolidThermo.H b/src/thermophysicalModels/basicSolidThermo/constSolidThermo/constSolidThermo.H index aff314ae7314d9e41b4fd87ae1021887508d5b41..42061066bd6e9f6f4f4e7c14ac98f1712cbd22c4 100644 --- a/src/thermophysicalModels/basicSolidThermo/constSolidThermo/constSolidThermo.H +++ b/src/thermophysicalModels/basicSolidThermo/constSolidThermo/constSolidThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -93,6 +93,10 @@ public: //- Construct from mesh constSolidThermo(const fvMesh& mesh); + //- Construct from mesh and dict + constSolidThermo(const fvMesh& mesh, const dictionary& dict); + + //- Destructor virtual ~constSolidThermo(); diff --git a/src/thermophysicalModels/basicSolidThermo/directionalKSolidThermo/directionalKSolidThermo.C b/src/thermophysicalModels/basicSolidThermo/directionalKSolidThermo/directionalKSolidThermo.C index 908db0b62af79ac2d1abecd0cfa1f15f22e25d9b..58e422bac11db07fb47b0dd952f4fe2e55e30240 100644 --- a/src/thermophysicalModels/basicSolidThermo/directionalKSolidThermo/directionalKSolidThermo.C +++ b/src/thermophysicalModels/basicSolidThermo/directionalKSolidThermo/directionalKSolidThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,11 +39,57 @@ namespace Foam directionalKSolidThermo, mesh ); + + addToRunTimeSelectionTable + ( + basicSolidThermo, + directionalKSolidThermo, + dictionary + ); + } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +Foam::directionalKSolidThermo::directionalKSolidThermo +( + const fvMesh& mesh, + const dictionary& dict +) +: + interpolatedSolidThermo(mesh, typeName + "Coeffs", dict), + directionalK_ + ( + IOobject + ( + "K", + mesh_.time().timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimEnergy/dimTime/(dimLength*dimTemperature) + ), + ccTransforms_ + ( + IOobject + ( + "ccTransforms", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimLength + ) +{ + init(); +} + + Foam::directionalKSolidThermo::directionalKSolidThermo(const fvMesh& mesh) : interpolatedSolidThermo(mesh, typeName + "Coeffs"), @@ -73,9 +119,25 @@ Foam::directionalKSolidThermo::directionalKSolidThermo(const fvMesh& mesh) mesh, dimLength ) +{ + init(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::directionalKSolidThermo::~directionalKSolidThermo() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::directionalKSolidThermo::init() { KValues_ = Field<vector>(subDict(typeName + "Coeffs").lookup("KValues")); + const fvMesh& mesh = K().mesh(); + // Determine transforms for cell centres forAll(mesh.C(), cellI) { @@ -244,14 +306,6 @@ Foam::directionalKSolidThermo::directionalKSolidThermo(const fvMesh& mesh) } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::directionalKSolidThermo::~directionalKSolidThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - Foam::symmTensor Foam::directionalKSolidThermo::transformPrincipal ( const tensor& tt, diff --git a/src/thermophysicalModels/basicSolidThermo/directionalKSolidThermo/directionalKSolidThermo.H b/src/thermophysicalModels/basicSolidThermo/directionalKSolidThermo/directionalKSolidThermo.H index e1ee3cba9fe1d4d55cb3d681efabe8ccd9c9ac6a..504e62163e52e45f9221cd22cf55f500e7466d1d 100644 --- a/src/thermophysicalModels/basicSolidThermo/directionalKSolidThermo/directionalKSolidThermo.H +++ b/src/thermophysicalModels/basicSolidThermo/directionalKSolidThermo/directionalKSolidThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -86,6 +86,9 @@ class directionalKSolidThermo //- Calculate properties void calculate(); + //- Initialize thermo + void init(); + public: @@ -98,6 +101,9 @@ public: //- Construct from mesh directionalKSolidThermo(const fvMesh& mesh); + //- Construct from mesh and dictionary + directionalKSolidThermo(const fvMesh& mesh, const dictionary& dict); + //- Destructor virtual ~directionalKSolidThermo(); diff --git a/src/thermophysicalModels/basicSolidThermo/interpolatedSolidThermo/interpolateSolid/interpolateSolid.C b/src/thermophysicalModels/basicSolidThermo/interpolatedSolidThermo/interpolateSolid/interpolateSolid.C index 9e08c9bd164e919ba97fc4119840efc505145303..635b6bdb3c412273f1536d3edbce5b12146ac8de 100644 --- a/src/thermophysicalModels/basicSolidThermo/interpolatedSolidThermo/interpolateSolid/interpolateSolid.C +++ b/src/thermophysicalModels/basicSolidThermo/interpolatedSolidThermo/interpolateSolid/interpolateSolid.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -86,11 +86,14 @@ bool Foam::interpolateSolid::writeData(Ostream& os) const os.writeKeyword("rhoValues") << rhoValues_ << token::END_STATEMENT << nl; os.writeKeyword("cpValues") << cpValues_ << token::END_STATEMENT << nl; os.writeKeyword("HfValues") << HfValues_ << token::END_STATEMENT << nl; - os.writeKeyword("emissivityValues") << emissivityValues_ << nl; - os.writeKeyword("kappaValues") << kappaValues_ << nl; + os.writeKeyword("emissivityValues") << emissivityValues_ << + token::END_STATEMENT << nl; + os.writeKeyword("kappaValues") << kappaValues_ + << token::END_STATEMENT << nl; os.writeKeyword("sigmaSValues") << sigmaSValues_ << token::END_STATEMENT << nl; + return os.good(); } diff --git a/src/thermophysicalModels/basicSolidThermo/interpolatedSolidThermo/interpolatedSolidThermo.C b/src/thermophysicalModels/basicSolidThermo/interpolatedSolidThermo/interpolatedSolidThermo.C index 431e6c98b4bc366e902573a342164ff199985535..3ec615c42ce972dcb64c4c8fa5ba4544a6621963 100644 --- a/src/thermophysicalModels/basicSolidThermo/interpolatedSolidThermo/interpolatedSolidThermo.C +++ b/src/thermophysicalModels/basicSolidThermo/interpolatedSolidThermo/interpolatedSolidThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,6 @@ License \*---------------------------------------------------------------------------*/ #include "interpolatedSolidThermo.H" -#include "addToRunTimeSelectionTable.H" #include "interpolateXY.H" @@ -44,6 +43,20 @@ Foam::interpolatedSolidThermo::interpolatedSolidThermo } +Foam::interpolatedSolidThermo::interpolatedSolidThermo +( + const fvMesh& mesh, + const word dictName, + const dictionary& dict + ) +: + basicSolidThermo(mesh, dict), + interpolateSolid(subDict(dictName)), + dict_(subDict(dictName)) +{ + calculate(); +} + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::interpolatedSolidThermo::~interpolatedSolidThermo() diff --git a/src/thermophysicalModels/basicSolidThermo/interpolatedSolidThermo/interpolatedSolidThermo.H b/src/thermophysicalModels/basicSolidThermo/interpolatedSolidThermo/interpolatedSolidThermo.H index d604b160be84671280295d20d77b284b711cb50f..7bc56fa973772b838e2727acb67fe132740b23cf 100644 --- a/src/thermophysicalModels/basicSolidThermo/interpolatedSolidThermo/interpolatedSolidThermo.H +++ b/src/thermophysicalModels/basicSolidThermo/interpolatedSolidThermo/interpolatedSolidThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -67,6 +67,15 @@ public: //- Construct from mesh interpolatedSolidThermo(const fvMesh& mesh, const word); + //- Construct from mesh and dictionary + interpolatedSolidThermo + ( + const fvMesh& mesh, + const word, + const dictionary& dict + ); + + //- Destructor virtual ~interpolatedSolidThermo(); diff --git a/src/thermophysicalModels/basicSolidThermo/isotropicKSolidThermo/isotropicKSolidThermo.C b/src/thermophysicalModels/basicSolidThermo/isotropicKSolidThermo/isotropicKSolidThermo.C index 9b1a7d3858d6a8b4d707dd962479c43ffea45607..f5666ac554eb5029d49eced64104243a06c37615 100644 --- a/src/thermophysicalModels/basicSolidThermo/isotropicKSolidThermo/isotropicKSolidThermo.C +++ b/src/thermophysicalModels/basicSolidThermo/isotropicKSolidThermo/isotropicKSolidThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,11 +37,45 @@ namespace Foam isotropicKSolidThermo, mesh ); + + addToRunTimeSelectionTable + ( + basicSolidThermo, + isotropicKSolidThermo, + dictionary + ); + } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +Foam::isotropicKSolidThermo::isotropicKSolidThermo +( + const fvMesh& mesh, + const dictionary& dict +) +: + interpolatedSolidThermo(mesh, typeName + "Coeffs", dict), + K_ + ( + IOobject + ( + "K", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimEnergy/dimTime/(dimLength*dimTemperature) + ), + KValues_ (Field<scalar>(subDict(typeName + "Coeffs").lookup("KValues"))) +{ + correct(); +} + + Foam::isotropicKSolidThermo::isotropicKSolidThermo(const fvMesh& mesh) : interpolatedSolidThermo(mesh, typeName + "Coeffs"), diff --git a/src/thermophysicalModels/basicSolidThermo/isotropicKSolidThermo/isotropicKSolidThermo.H b/src/thermophysicalModels/basicSolidThermo/isotropicKSolidThermo/isotropicKSolidThermo.H index a54e386c381cf594cf5566d5fbe867aaa343c197..8d7ad8c6de33b49a8b1a3c976abefc041c4a511f 100644 --- a/src/thermophysicalModels/basicSolidThermo/isotropicKSolidThermo/isotropicKSolidThermo.H +++ b/src/thermophysicalModels/basicSolidThermo/isotropicKSolidThermo/isotropicKSolidThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,6 +70,10 @@ public: //- Construct from mesh isotropicKSolidThermo(const fvMesh& mesh); + //- Construct from mesh and dicionary + isotropicKSolidThermo(const fvMesh& mesh, const dictionary& dict); + + //- Destructor virtual ~isotropicKSolidThermo(); diff --git a/src/thermophysicalModels/basicSolidThermo/solidMixtureThermo/solidMixtureThermo/makeSolidMixtureThermo.H b/src/thermophysicalModels/basicSolidThermo/solidMixtureThermo/solidMixtureThermo/makeSolidMixtureThermo.H index 94c4880a1d6a524a9957c42d2f195a89340b5560..0094fb8a0bacceef27c8bb924423878fd7d1b3b4 100644 --- a/src/thermophysicalModels/basicSolidThermo/solidMixtureThermo/solidMixtureThermo/makeSolidMixtureThermo.H +++ b/src/thermophysicalModels/basicSolidThermo/solidMixtureThermo/solidMixtureThermo/makeSolidMixtureThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -54,6 +54,12 @@ addToRunTimeSelectionTable \ mesh \ ); \ \ +addToRunTimeSelectionTable \ +( \ + CThermo, \ + MixtureThermo##Mixture##Transport##Radiation##Thermo##Rho, \ + dictionary \ +); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/basicSolidThermo/solidMixtureThermo/solidMixtureThermo/solidMixtureThermo.C b/src/thermophysicalModels/basicSolidThermo/solidMixtureThermo/solidMixtureThermo/solidMixtureThermo.C index 36f590e8388cf24bfea3e78b73847ea3b1d0ef9f..4eb83cdbe404d44b144519d313343c5aae5690b0 100644 --- a/src/thermophysicalModels/basicSolidThermo/solidMixtureThermo/solidMixtureThermo/solidMixtureThermo.C +++ b/src/thermophysicalModels/basicSolidThermo/solidMixtureThermo/solidMixtureThermo/solidMixtureThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -87,6 +87,32 @@ Foam::solidMixtureThermo<MixtureType>::solidMixtureThermo } +template<class MixtureType> +Foam::solidMixtureThermo<MixtureType>::solidMixtureThermo +( + const fvMesh& mesh, + const dictionary& dict +) +: + basicSolidThermo(mesh, dict), + MixtureType(*this, mesh), + K_ + ( + IOobject + ( + "K", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimEnergy/dimTime/(dimLength*dimTemperature) + ) +{ + calculate(); +} + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template<class MixtureType> diff --git a/src/thermophysicalModels/basicSolidThermo/solidMixtureThermo/solidMixtureThermo/solidMixtureThermo.H b/src/thermophysicalModels/basicSolidThermo/solidMixtureThermo/solidMixtureThermo/solidMixtureThermo.H index a8c2f9e3e4c93ba932242d3f6aa704d8e1368576..e121c5c19ed8b9c0988ba1e6e3e2d3cd064d1220 100644 --- a/src/thermophysicalModels/basicSolidThermo/solidMixtureThermo/solidMixtureThermo/solidMixtureThermo.H +++ b/src/thermophysicalModels/basicSolidThermo/solidMixtureThermo/solidMixtureThermo/solidMixtureThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,6 +79,9 @@ public: //- Construct from mesh solidMixtureThermo(const fvMesh&); + //- Construct from mesh and dictionary + solidMixtureThermo(const fvMesh&, const dictionary&); + //- Destructor virtual ~solidMixtureThermo(); diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolver.H b/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolver.H index 752c8d61776d36ecbb715780b8bdcb5d328ac62d..de6bd0f26f0865c938e21265841e0817a96a5c18 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolver.H +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/noChemistrySolver/noChemistrySolver.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::noChemistry + Foam::noChemistrySolver Description Dummy chemistry solver for 'none' option diff --git a/src/thermophysicalModels/properties/liquidProperties/Ar/Ar.H b/src/thermophysicalModels/properties/liquidProperties/Ar/Ar.H index dbcce489ceb9605d359434b419b572a6ab728ec4..d9e9c1f3a2021a399bb5d23f60e42f2c1558b312 100644 --- a/src/thermophysicalModels/properties/liquidProperties/Ar/Ar.H +++ b/src/thermophysicalModels/properties/liquidProperties/Ar/Ar.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C10H22/C10H22.H b/src/thermophysicalModels/properties/liquidProperties/C10H22/C10H22.H index 91abdc41ee0d29448b4e03d036f51c1a1c97cf0a..3adbe67070fd7aa7b76c0430039d206a9efda643 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C10H22/C10H22.H +++ b/src/thermophysicalModels/properties/liquidProperties/C10H22/C10H22.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C12H26/C12H26.H b/src/thermophysicalModels/properties/liquidProperties/C12H26/C12H26.H index 1651d288d4cf91ea7450b419a356cc5501db6f3e..88983a7d33da6a2eb110abb929bdfb13e563a36f 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C12H26/C12H26.H +++ b/src/thermophysicalModels/properties/liquidProperties/C12H26/C12H26.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C13H28/C13H28.H b/src/thermophysicalModels/properties/liquidProperties/C13H28/C13H28.H index 346a9ef48085448d7a090e337c70605df83efe0d..7f4514af7cbad0ef130a71dee1086e36db20c399 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C13H28/C13H28.H +++ b/src/thermophysicalModels/properties/liquidProperties/C13H28/C13H28.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C14H30/C14H30.H b/src/thermophysicalModels/properties/liquidProperties/C14H30/C14H30.H index ba8033499f5c7e31842f4e4304ca194c1af2af89..d1d2cb395e550d5164e98d8c9ac2a4d150e0db5b 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C14H30/C14H30.H +++ b/src/thermophysicalModels/properties/liquidProperties/C14H30/C14H30.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C16H34/C16H34.H b/src/thermophysicalModels/properties/liquidProperties/C16H34/C16H34.H index de16ec9db63d97d0cdcfea72767905145b6e9b37..1f59b19392ce1456fa20ebff1dc384e13a523cb7 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C16H34/C16H34.H +++ b/src/thermophysicalModels/properties/liquidProperties/C16H34/C16H34.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C2H5OH/C2H5OH.H b/src/thermophysicalModels/properties/liquidProperties/C2H5OH/C2H5OH.H index 4c282b4ca4b7c7cbaf6170863a3a9235386893c6..f68d5e4654f5d64cbc398fa945327e6232a5fce9 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C2H5OH/C2H5OH.H +++ b/src/thermophysicalModels/properties/liquidProperties/C2H5OH/C2H5OH.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C2H6/C2H6.H b/src/thermophysicalModels/properties/liquidProperties/C2H6/C2H6.H index fe5e7b9e5229d0f289dcfa808ffa9632d2d09a9a..a578dca5aa56922bc9aab361f4302d5e1867aa4a 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C2H6/C2H6.H +++ b/src/thermophysicalModels/properties/liquidProperties/C2H6/C2H6.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C2H6O/C2H6O.H b/src/thermophysicalModels/properties/liquidProperties/C2H6O/C2H6O.H index 380bdd6dce4c639f73ce8a5b2c5479afcf1b59ee..8dcfa5a019ee764e1447f8a3b529968ab6ab2940 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C2H6O/C2H6O.H +++ b/src/thermophysicalModels/properties/liquidProperties/C2H6O/C2H6O.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C3H6O/C3H6O.H b/src/thermophysicalModels/properties/liquidProperties/C3H6O/C3H6O.H index 88e6edcdac7cbaf55022cf0448c62e978aafb68d..f1490f9dcb1928c48d4735dfdf23b21f460f75f2 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C3H6O/C3H6O.H +++ b/src/thermophysicalModels/properties/liquidProperties/C3H6O/C3H6O.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C3H8/C3H8.H b/src/thermophysicalModels/properties/liquidProperties/C3H8/C3H8.H index b539f4b504189fb815827ab2f0d30d552e5bd1d1..30174f45e29abe8f4a2d300441ec7937622ccf6e 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C3H8/C3H8.H +++ b/src/thermophysicalModels/properties/liquidProperties/C3H8/C3H8.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C4H10O/C4H10O.H b/src/thermophysicalModels/properties/liquidProperties/C4H10O/C4H10O.H index 9a1ab395c4d42ba43226094e7e5f1ba5d8f6ed20..710618889ddf28a7077417097cfc89300d13da9c 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C4H10O/C4H10O.H +++ b/src/thermophysicalModels/properties/liquidProperties/C4H10O/C4H10O.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C6H14/C6H14.H b/src/thermophysicalModels/properties/liquidProperties/C6H14/C6H14.H index 3734d712dca669e53d4c2b4ae2e0862026f4cd62..6f4667623a03e27503d8818cc4654850682cfdc4 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C6H14/C6H14.H +++ b/src/thermophysicalModels/properties/liquidProperties/C6H14/C6H14.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C6H6/C6H6.H b/src/thermophysicalModels/properties/liquidProperties/C6H6/C6H6.H index 0eb4935bf5d38c23b77c1db97afb247697da53e0..3a30afaa83ef24a1b1578938018488177ecb5dea 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C6H6/C6H6.H +++ b/src/thermophysicalModels/properties/liquidProperties/C6H6/C6H6.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C7H16/C7H16.H b/src/thermophysicalModels/properties/liquidProperties/C7H16/C7H16.H index 00a0b8a3a229c211dc3ffb7a790bdcadcc458ecb..ff41c44f3d891d7f3428f4bda65656bacd30d48e 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C7H16/C7H16.H +++ b/src/thermophysicalModels/properties/liquidProperties/C7H16/C7H16.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C7H8/C7H8.H b/src/thermophysicalModels/properties/liquidProperties/C7H8/C7H8.H index 6e8541115df37392a3d5fbb8d871c367db148c48..ebbc91a45e603e2b2137df8927d4b4ed20283084 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C7H8/C7H8.H +++ b/src/thermophysicalModels/properties/liquidProperties/C7H8/C7H8.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C8H10/C8H10.H b/src/thermophysicalModels/properties/liquidProperties/C8H10/C8H10.H index 1c2b0bc5dbff1e41e96eacd741ad9fa05d28bc6e..48b47c072a03f9247ef1cc4a7853804525c68dd9 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C8H10/C8H10.H +++ b/src/thermophysicalModels/properties/liquidProperties/C8H10/C8H10.H @@ -177,6 +177,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C8H18/C8H18.H b/src/thermophysicalModels/properties/liquidProperties/C8H18/C8H18.H index 5b841caa28ba95dc67012412ea5b99c5807bdf4b..97b52808e8251eb221173da965d78d696b3900d9 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C8H18/C8H18.H +++ b/src/thermophysicalModels/properties/liquidProperties/C8H18/C8H18.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/C9H20/C9H20.H b/src/thermophysicalModels/properties/liquidProperties/C9H20/C9H20.H index 9d03c03970c9deee089130bc59aa9ca9b76b108b..bbc64258a66ecd13c95f548e587eb5ba17518bdc 100644 --- a/src/thermophysicalModels/properties/liquidProperties/C9H20/C9H20.H +++ b/src/thermophysicalModels/properties/liquidProperties/C9H20/C9H20.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/CH3OH/CH3OH.H b/src/thermophysicalModels/properties/liquidProperties/CH3OH/CH3OH.H index d334e240b6622ffb8e17b66edf48168c7c8a1347..7973434ef1a0d13c7e5ed705214baf3a5ef0b042 100644 --- a/src/thermophysicalModels/properties/liquidProperties/CH3OH/CH3OH.H +++ b/src/thermophysicalModels/properties/liquidProperties/CH3OH/CH3OH.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/CH4N2O/CH4N2O.H b/src/thermophysicalModels/properties/liquidProperties/CH4N2O/CH4N2O.H index 62d5c8b7eb35eab8e85cf4b753609db9c329435d..126cc1feb3603ee2796461e83c5a4d0f38bd7dc8 100644 --- a/src/thermophysicalModels/properties/liquidProperties/CH4N2O/CH4N2O.H +++ b/src/thermophysicalModels/properties/liquidProperties/CH4N2O/CH4N2O.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/H2O/H2O.H b/src/thermophysicalModels/properties/liquidProperties/H2O/H2O.H index 4925bdc819f009f3289a1b941a6e709776397e3f..ab1ec8bc60fa809035fe8e2e71cfcd0d77323097 100644 --- a/src/thermophysicalModels/properties/liquidProperties/H2O/H2O.H +++ b/src/thermophysicalModels/properties/liquidProperties/H2O/H2O.H @@ -177,6 +177,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/IC8H18/IC8H18.H b/src/thermophysicalModels/properties/liquidProperties/IC8H18/IC8H18.H index 500fd6c1172b1eadb11491c8c719c700ba6e7a3f..3554db75b23ff493b06ce2196941c7597b8e7c36 100644 --- a/src/thermophysicalModels/properties/liquidProperties/IC8H18/IC8H18.H +++ b/src/thermophysicalModels/properties/liquidProperties/IC8H18/IC8H18.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/IDEA/IDEA.H b/src/thermophysicalModels/properties/liquidProperties/IDEA/IDEA.H index e3a0ff4c1c61b00a38e8fee603dd7ba921134da1..73ccc9f7ceba34b18d8849de0f0c6d90c8a07ad9 100644 --- a/src/thermophysicalModels/properties/liquidProperties/IDEA/IDEA.H +++ b/src/thermophysicalModels/properties/liquidProperties/IDEA/IDEA.H @@ -200,6 +200,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; mu_.writeData(os); os << nl; mug_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/MB/MB.H b/src/thermophysicalModels/properties/liquidProperties/MB/MB.H index fa91d57f39c41e739e26c8a5932817e5d3ced4e6..6a11d7526dc53434990bdc39fe0444946869ac0e 100644 --- a/src/thermophysicalModels/properties/liquidProperties/MB/MB.H +++ b/src/thermophysicalModels/properties/liquidProperties/MB/MB.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/N2/N2.H b/src/thermophysicalModels/properties/liquidProperties/N2/N2.H index 94412e3beb0fbfd2ee5fc53e6de0ce45fdc94fb5..e159754ed2203005decf8e71f80316b591988d87 100644 --- a/src/thermophysicalModels/properties/liquidProperties/N2/N2.H +++ b/src/thermophysicalModels/properties/liquidProperties/N2/N2.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/aC10H7CH3/aC10H7CH3.H b/src/thermophysicalModels/properties/liquidProperties/aC10H7CH3/aC10H7CH3.H index 3f93f4509b331009632a7da354feb0196a3b6e92..b0da27a3a8b74a0c13d8731de21394f8a08b0867 100644 --- a/src/thermophysicalModels/properties/liquidProperties/aC10H7CH3/aC10H7CH3.H +++ b/src/thermophysicalModels/properties/liquidProperties/aC10H7CH3/aC10H7CH3.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/aC10H7CH3/aC10H7CH3I.H b/src/thermophysicalModels/properties/liquidProperties/aC10H7CH3/aC10H7CH3I.H index 1c858c47c07578cbf67089d32a845ed0b471136e..bd4acb076ff3a1164b1dd0e00f6377fd53090d9f 100644 --- a/src/thermophysicalModels/properties/liquidProperties/aC10H7CH3/aC10H7CH3I.H +++ b/src/thermophysicalModels/properties/liquidProperties/aC10H7CH3/aC10H7CH3I.H @@ -101,8 +101,6 @@ inline Foam::scalar Foam::aC10H7CH3::D(scalar p, scalar T) const } - - inline Foam::scalar Foam::aC10H7CH3::D(scalar p, scalar T, scalar Wb) const { return D_.f(p, T, Wb); diff --git a/src/thermophysicalModels/properties/liquidProperties/bC10H7CH3/bC10H7CH3.H b/src/thermophysicalModels/properties/liquidProperties/bC10H7CH3/bC10H7CH3.H index 74989233e825a6250092b951c95c9c5c5e7a76bd..f9ad40607c279853b2e9f9be27ab66acb1faf0d2 100644 --- a/src/thermophysicalModels/properties/liquidProperties/bC10H7CH3/bC10H7CH3.H +++ b/src/thermophysicalModels/properties/liquidProperties/bC10H7CH3/bC10H7CH3.H @@ -178,6 +178,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/iC3H8O/iC3H8O.H b/src/thermophysicalModels/properties/liquidProperties/iC3H8O/iC3H8O.H index d1dbf718ca75537a51d66e3fd9a49f21dc660368..0381b3716085aa9c38f11ea68996cfc0481d7bf1 100644 --- a/src/thermophysicalModels/properties/liquidProperties/iC3H8O/iC3H8O.H +++ b/src/thermophysicalModels/properties/liquidProperties/iC3H8O/iC3H8O.H @@ -177,6 +177,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/properties/liquidProperties/nC3H8O/nC3H8O.H b/src/thermophysicalModels/properties/liquidProperties/nC3H8O/nC3H8O.H index 69c0e66a6f4fa5e2d37e5f15efb35cdf15e86c46..14b1a396197ca86e5bd9e584f6699a18277773fa 100644 --- a/src/thermophysicalModels/properties/liquidProperties/nC3H8O/nC3H8O.H +++ b/src/thermophysicalModels/properties/liquidProperties/nC3H8O/nC3H8O.H @@ -177,6 +177,7 @@ public: pv_.writeData(os); os << nl; hl_.writeData(os); os << nl; Cp_.writeData(os); os << nl; + h_.writeData(os); os << nl; Cpg_.writeData(os); os << nl; B_.writeData(os); os << nl; mu_.writeData(os); os << nl; diff --git a/src/thermophysicalModels/radiationModels/radiationModel/fvDOM/absorptionCoeffs/absorptionCoeffs.H b/src/thermophysicalModels/radiationModels/radiationModel/fvDOM/absorptionCoeffs/absorptionCoeffs.H index f5279d54b9ce5b6274e912a7967650f51c8892c2..1ef97d0f1db78c62d4beea53800e6c64b76523de 100644 --- a/src/thermophysicalModels/radiationModels/radiationModel/fvDOM/absorptionCoeffs/absorptionCoeffs.H +++ b/src/thermophysicalModels/radiationModels/radiationModel/fvDOM/absorptionCoeffs/absorptionCoeffs.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::janafThermo + Foam::absorptionCoeffs Description Absorption coefficients class used in greyMeanAbsorptionEmission and diff --git a/src/thermophysicalModels/radiationModels/radiationModel/viewFactor/viewFactor.C b/src/thermophysicalModels/radiationModels/radiationModel/viewFactor/viewFactor.C index 759f50297b5583ae8b06f64ef2129a11f95880f8..e008f5d00a25c72f2a63abbcd3b10381d4bd1dae 100644 --- a/src/thermophysicalModels/radiationModels/radiationModel/viewFactor/viewFactor.C +++ b/src/thermophysicalModels/radiationModels/radiationModel/viewFactor/viewFactor.C @@ -108,10 +108,10 @@ Foam::radiation::viewFactor::viewFactor(const volScalarField& T) label count = 0; forAll(Qrp, patchI) { - const polyPatch& pp = mesh_.boundaryMesh()[patchI]; + //const polyPatch& pp = mesh_.boundaryMesh()[patchI]; const fvPatchScalarField& QrPatchI = Qrp[patchI]; - if ((isA<fixedValueFvPatchScalarField>(QrPatchI)) && (pp.size() > 0)) + if ((isA<fixedValueFvPatchScalarField>(QrPatchI))) { selectedPatches_[count] = QrPatchI.patch().index(); nLocalCoarseFaces_ += coarsePatches[patchI].size(); @@ -362,38 +362,49 @@ void Foam::radiation::viewFactor::calculate() const polyPatch& pp = coarseMesh_.boundaryMesh()[patchID]; const labelList& coarsePatchFace = coarseMesh_.patchFaceMap()[patchID]; - const labelList& agglom = finalAgglom_[patchID]; - label nAgglom = max(agglom) + 1; - - labelListList coarseToFine(invertOneToMany(nAgglom, agglom)); - scalarList Tave(pp.size(), 0.0); scalarList Eave(Tave.size(), 0.0); scalarList Hoiave(Tave.size(), 0.0); - forAll(coarseToFine, coarseI) + if (pp.size() > 0) { - const label coarseFaceID = coarsePatchFace[coarseI]; - const labelList& fineFaces = coarseToFine[coarseFaceID]; - UIndirectList<scalar> fineSf - ( - sf, - fineFaces - ); - scalar area = sum(fineSf()); - // Temperature, emissivity and external flux area weighting - forAll(fineFaces, j) + const labelList& agglom = finalAgglom_[patchID]; + label nAgglom = max(agglom) + 1; + + labelListList coarseToFine(invertOneToMany(nAgglom, agglom)); + + //scalarList Tave(pp.size(), 0.0); + //scalarList Eave(Tave.size(), 0.0); + //scalarList Hoiave(Tave.size(), 0.0); + + forAll(coarseToFine, coarseI) { - label faceI = fineFaces[j]; - Tave[coarseI] += (Tp[faceI]*sf[faceI])/area; - Eave[coarseI] += (eb[faceI]*sf[faceI])/area; - Hoiave[coarseI] += (Hoi[faceI]*sf[faceI])/area; - } + const label coarseFaceID = coarsePatchFace[coarseI]; + const labelList& fineFaces = coarseToFine[coarseFaceID]; + UIndirectList<scalar> fineSf + ( + sf, + fineFaces + ); + scalar area = sum(fineSf()); + // Temperature, emissivity and external flux area weighting + forAll(fineFaces, j) + { + label faceI = fineFaces[j]; + Tave[coarseI] += (Tp[faceI]*sf[faceI])/area; + Eave[coarseI] += (eb[faceI]*sf[faceI])/area; + Hoiave[coarseI] += (Hoi[faceI]*sf[faceI])/area; + } - localCoarseTave.append(Tave[coarseI]); - localCoarseEave.append(Eave[coarseI]); - localCoarseHoave.append(Hoiave[coarseI]); + //localCoarseTave.append(Tave[coarseI]); + //localCoarseEave.append(Eave[coarseI]); + //localCoarseHoave.append(Hoiave[coarseI]); + } } + + localCoarseTave.append(Tave); + localCoarseEave.append(Eave); + localCoarseHoave.append(Hoiave); } // Fill the local values to distribute @@ -494,7 +505,7 @@ void Foam::radiation::viewFactor::calculate() scalar invEj = 1.0/E[j]; if (i==j) { - CLU_()[i][j] = invEj - (invEj-1.0)*Fmatrix_()[i][j]; + CLU_()[i][j] = invEj-(invEj-1.0)*Fmatrix_()[i][j]; } else { @@ -540,30 +551,35 @@ void Foam::radiation::viewFactor::calculate() forAll(selectedPatches_, i) { const label patchID = selectedPatches_[i]; - scalarField& Qrp = Qr_.boundaryField()[patchID]; - const scalarField& sf = mesh_.magSf().boundaryField()[patchID]; - const labelList& agglom = finalAgglom_[patchID]; - label nAgglom = max(agglom)+1; + const polyPatch& pp = mesh_.boundaryMesh()[patchID]; + if (pp.size() > 0) + { + scalarField& Qrp = Qr_.boundaryField()[patchID]; + const scalarField& sf = mesh_.magSf().boundaryField()[patchID]; + const labelList& agglom = finalAgglom_[patchID]; + label nAgglom = max(agglom)+1; - labelListList coarseToFine(invertOneToMany(nAgglom, agglom)); + labelListList coarseToFine(invertOneToMany(nAgglom, agglom)); - const labelList& coarsePatchFace = coarseMesh_.patchFaceMap()[patchID]; + const labelList& coarsePatchFace = + coarseMesh_.patchFaceMap()[patchID]; - scalar heatFlux = 0.0; - forAll(coarseToFine, coarseI) - { - label globalCoarse = - globalNumbering.toGlobal(Pstream::myProcNo(), globCoarseId); - const label coarseFaceID = coarsePatchFace[coarseI]; - const labelList& fineFaces = coarseToFine[coarseFaceID]; - forAll(fineFaces, k) + scalar heatFlux = 0.0; + forAll(coarseToFine, coarseI) { - label faceI = fineFaces[k]; + label globalCoarse = + globalNumbering.toGlobal(Pstream::myProcNo(), globCoarseId); + const label coarseFaceID = coarsePatchFace[coarseI]; + const labelList& fineFaces = coarseToFine[coarseFaceID]; + forAll(fineFaces, k) + { + label faceI = fineFaces[k]; - Qrp[faceI] = q[globalCoarse]; - heatFlux += Qrp[faceI]*sf[faceI]; + Qrp[faceI] = q[globalCoarse]; + heatFlux += Qrp[faceI]*sf[faceI]; + } + globCoarseId ++; } - globCoarseId ++; } } @@ -634,5 +650,4 @@ Foam::radiation::viewFactor::Ru() const ); } - // ************************************************************************* // diff --git a/src/thermophysicalModels/radiationModels/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.H b/src/thermophysicalModels/radiationModels/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.H index b301dee960900baaf1f919ced6fcd6a337dfa86f..2faf779a3b7ad769e81e27a68f36e075443ec989 100644 --- a/src/thermophysicalModels/radiationModels/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.H +++ b/src/thermophysicalModels/radiationModels/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::radiation::greyMeanAbsorptionEmission + Foam::radiation::wideBandAbsorptionEmission Description diff --git a/src/thermophysicalModels/solidChemistryModel/ODESolidChemistryModel/ODESolidChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/ODESolidChemistryModel/ODESolidChemistryModel.C index bd7ac96a4640222dd5ff69bb99b92fe0757f318e..5498b927721bea9ee65f2c380bb43685adf7c740 100644 --- a/src/thermophysicalModels/solidChemistryModel/ODESolidChemistryModel/ODESolidChemistryModel.C +++ b/src/thermophysicalModels/solidChemistryModel/ODESolidChemistryModel/ODESolidChemistryModel.C @@ -135,11 +135,11 @@ ODESolidChemistryModel Y0Default ) ); - } - // Calculate inital values of Ysi0 = rho*delta*Yi - Ys0_[fieldI].internalField() = - this->solidThermo().rho()*max(Ys_[fieldI],scalar(0.001))*mesh.V(); + Ys0_[fieldI].internalField() = + this->solidThermo().rho() + *max(Ys_[fieldI], scalar(0.001))*mesh.V(); + } } forAll(RRg_, fieldI) diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.C b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.C index a227493a65e92828d9f2688481a6c82387d69ede..9e54abe4adca31c50f03740ef8b0b9be591f9f50 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.C +++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.C @@ -73,7 +73,7 @@ void icoPolynomial<PolySize>::write(Ostream& os) const rhoCoeffs_/this->W() ); - os << dict; + os << indent << dict.dictName() << dict; } diff --git a/src/thermophysicalModels/specie/equationOfState/incompressible/incompressible.C b/src/thermophysicalModels/specie/equationOfState/incompressible/incompressible.C index 4174ddfa977695c2688616564ad61c77e1af989c..6aed7303662ad67fb1a93747775fed0ad7e9ca42 100644 --- a/src/thermophysicalModels/specie/equationOfState/incompressible/incompressible.C +++ b/src/thermophysicalModels/specie/equationOfState/incompressible/incompressible.C @@ -53,7 +53,7 @@ void Foam::incompressible::write(Ostream& os) const dictionary dict("equationOfState"); dict.add("rho", rho_); - os << dict; + os << indent << dict.dictName() << dict; } diff --git a/src/thermophysicalModels/specie/specie/specie.C b/src/thermophysicalModels/specie/specie/specie.C index cfd925ab19b6119338437624b527ca1ed59f1436..2b84c055801901da4226bdc3c50066c0286d5959 100644 --- a/src/thermophysicalModels/specie/specie/specie.C +++ b/src/thermophysicalModels/specie/specie/specie.C @@ -66,7 +66,7 @@ void Foam::specie::write(Ostream& os) const dictionary dict("specie"); dict.add("nMoles", nMoles_); dict.add("molWeight", molWeight_); - os << dict; + os << indent << dict.dictName() << dict; } diff --git a/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.C b/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.C index a89059c52b6576b5b1924e63f9826f2ba294ed95..38a0d8f0b5836de4d8b83723ee78e3f6be4a8156 100644 --- a/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.C +++ b/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.C @@ -58,7 +58,7 @@ void Foam::eConstThermo<EquationOfState>::write(Ostream& os) const dictionary dict("thermodynamics"); dict.add("Cv", Cv_); dict.add("Hf", Hf_); - os << dict; + os << indent << dict.dictName() << dict; } diff --git a/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.C b/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.C index 3f1b831e03b8711cdf4fe00dcb500df6d1f8b775..5631755c6f295824976a9043437bfbfcdbf5be51 100644 --- a/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.C +++ b/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.C @@ -58,7 +58,7 @@ void Foam::hConstThermo<equationOfState>::write(Ostream& os) const dictionary dict("thermodynamics"); dict.add("Cp", Cp_); dict.add("Hf", Hf_); - os << dict; + os << indent << dict.dictName() << dict; } diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C index 10d1a280b3c422013443cdbfdfb0fa357b6737cc..b5dfe0148174f6d358ca4c0f984992a1471333be 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C @@ -108,7 +108,7 @@ void Foam::hPolynomialThermo<EquationOfState, PolySize>::write word("CpCoeffs<" + Foam::name(PolySize) + '>'), CpCoeffs_/this->W() ); - os << dict; + os << indent << dict.dictName() << dict; } diff --git a/src/thermophysicalModels/specie/thermo/janaf/janafThermo.C b/src/thermophysicalModels/specie/thermo/janaf/janafThermo.C index 895a886ca6a5df33b2a907dca8ecf99655089c83..4bc263f79b853ed26a63c5e86424593913fca8ae 100644 --- a/src/thermophysicalModels/specie/thermo/janaf/janafThermo.C +++ b/src/thermophysicalModels/specie/thermo/janaf/janafThermo.C @@ -108,7 +108,7 @@ void Foam::janafThermo<EquationOfState>::write(Ostream& os) const dict.add("Tcommon", Tcommon_); dict.add("highCpCoeffs", highCpCoeffs_); dict.add("lowCpCoeffs", lowCpCoeffs_); - os << dict; + os << indent << dict.dictName() << dict; } diff --git a/src/thermophysicalModels/specie/transport/const/constTransport.C b/src/thermophysicalModels/specie/transport/const/constTransport.C index c6e028db308eee9d92f524595b84fc5dc7f212fb..fb0aaed3fc3cd260211f1baf5719c5bfc687d0ad 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransport.C +++ b/src/thermophysicalModels/specie/transport/const/constTransport.C @@ -61,7 +61,7 @@ void Foam::constTransport<Thermo>::constTransport::write(Ostream& os) const dictionary dict("transport"); dict.add("mu", mu_); dict.add("Pr", 1.0/rPr_); - os << dict; + os << indent << dict.dictName() << dict; os << decrIndent << token::END_BLOCK << nl; } diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.C b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.C index f7e823160db72a1c48539484329a32be16d7e5c7..8376683c07fbae132586b7a91284c6bcb2849ada 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.C +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.C @@ -88,7 +88,7 @@ void Foam::polynomialTransport<Thermo, PolySize>::write(Ostream& os) const word("kappaCoeffs<" + Foam::name(PolySize) + '>'), kappaCoeffs_/this->W() ); - os << dict; + os << indent << dict.dictName() << dict; os << decrIndent << token::END_BLOCK << nl; } diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C index ad0ea57d2b4aca82839aff457895fe4c5ffd52b1..4aab3494e82f10ad5c4f5e56e64b7cbc51e4e3a2 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C @@ -61,7 +61,7 @@ void Foam::sutherlandTransport<Thermo>::write(Ostream& os) const dictionary dict("transport"); dict.add("As", As_); dict.add("Ts", Ts_); - os << dict; + os << indent << dict.dictName() << dict; os << decrIndent << token::END_BLOCK << nl; } @@ -71,7 +71,8 @@ void Foam::sutherlandTransport<Thermo>::write(Ostream& os) const template<class Thermo> Foam::Ostream& Foam::operator<< ( - Ostream& os, const sutherlandTransport<Thermo>& st + Ostream& os, + const sutherlandTransport<Thermo>& st ) { os << static_cast<const Thermo&>(st) << tab << st.As_ << tab << st.Ts_; diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C index 4f75d3ee135a794e71e752a353a10659874cd633..9564b56c663492c278df5c1acb15fb20951e58bd 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C @@ -82,6 +82,8 @@ void Foam::porousMedia::fixedTemperature::addEnthalpySource scalarField& hDiag = hEqn.diag(); scalarField& hSource = hEqn.source(); + tmp<volScalarField> Cp = thermo.Cp(); + // TODO: generalize for non-fixedTemperature methods const scalar rate = 1e6; @@ -92,7 +94,8 @@ void Foam::porousMedia::fixedTemperature::addEnthalpySource forAll(cells, i) { hDiag[cells[i]] += rate*V[cells[i]]*rho[cells[i]]; - hSource[cells[i]] += rate*V[cells[i]]*rho[cells[i]]*T_; + hSource[cells[i]] += + rate*V[cells[i]]*rho[cells[i]]*Cp()[cells[i]]*T_; } } } diff --git a/src/triSurface/triSurfaceFields/triSurfaceFields.C b/src/triSurface/triSurfaceFields/triSurfaceFields.C index d32e28cbf68d0f66528c329cd48e24ef2a4c8794..d4d7bcff1e97e0d83902786b79f5d2abc7777eec 100644 --- a/src/triSurface/triSurfaceFields/triSurfaceFields.C +++ b/src/triSurface/triSurfaceFields/triSurfaceFields.C @@ -32,36 +32,24 @@ namespace Foam // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -#ifndef __clang__ template<> -#endif const word triSurfaceLabelField::typeName("triSurfaceLabelField"); -#ifndef __clang__ template<> -#endif const word triSurfaceScalarField::typeName("triSurfaceScalarField"); -#ifndef __clang__ template<> -#endif const word triSurfaceVectorField::typeName("triSurfaceVectorField"); -#ifndef __clang__ template<> -#endif const word triSurfaceSphericalTensorField::typeName ("triSurfaceSphericalTensorField"); -#ifndef __clang__ template<> -#endif const word triSurfaceSymmTensorField::typeName ("triSurfaceSymmTensorField"); -#ifndef __clang__ template<> -#endif const word triSurfaceTensorField::typeName("triSurfaceTensorField"); diff --git a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H index 1293fa6d704d2e91d6d35569026de13118131831..d9c1e59c7d11d690c43237b42ef4b8e81e180284 100644 --- a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H @@ -170,7 +170,7 @@ public: new volScalarField ( "DnuTildaEff", - rho_*nuTilda_/sigmaNut_ + mu() + (rho_*nuTilda_ + mu())/sigmaNut_ ) ); } diff --git a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C index 381a4e17fe8cc5cf21b1cb9f6cf76c117753dd0c..e2bf3cc1fd786a8a6505e6eb436c65712613b64c 100644 --- a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -233,7 +233,7 @@ tmp<volScalarField> SpalartAllmaras::DnuTildaEff() const { return tmp<volScalarField> ( - new volScalarField("DnuTildaEff", nuTilda_/sigmaNut_ + nu()) + new volScalarField("DnuTildaEff", (nuTilda_ + nu())/sigmaNut_) ); } diff --git a/tutorials/combustion/dieselFoam/aachenBomb/constant/combustionProperties b/tutorials/combustion/dieselFoam/aachenBomb/constant/combustionProperties index 8d6965f6b7137d7af9be749b3e7f1268cdc0f1c8..6608c94f4e4babd2c006cc9a384465d16ae7dab8 100644 --- a/tutorials/combustion/dieselFoam/aachenBomb/constant/combustionProperties +++ b/tutorials/combustion/dieselFoam/aachenBomb/constant/combustionProperties @@ -15,15 +15,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Cmix Cmix [ 0 0 0 0 0 0 0 ] 1; +combustionModel PaSR<psiChemistryCombustionModel>; -ignitionProperties1 +active true; + +PaSRCoeffs { - ignite on; - ignitionPoint ignitionPoint [ 0 1 0 0 0 0 0 ] ( 0.2 0 0.02 ); - timing timing [ 0 0 1 0 0 0 0 ] 0; - duration duration [ 0 0 1 0 0 0 0 ] 1; + Cmix Cmix [ 0 0 0 0 0 0 0 ] 1; + turbulentReaction on; } + // ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/combustionProperties b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/combustionProperties index c6378c0612e0b1e1bfd5f9f4ddcbbf9a3b723e70..95bc43ae376973e90796296d208b2bf01ce6296c 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/combustionProperties +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/combustionProperties @@ -15,7 +15,9 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel infinitelyFastChemistry; +combustionModel infinitelyFastChemistry<psiCombustionModel,gasThermoPhysics>; + +active true; infinitelyFastChemistryCoeffs { diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/panelRegion/cellDecomposition b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/panelRegion/cellDecomposition deleted file mode 100644 index 07dc8690bb106cb53695b765b617e1eb8a5d167a..0000000000000000000000000000000000000000 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/panelRegion/cellDecomposition +++ /dev/null @@ -1,34104 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class labelList; - location "constant"; - object cellDecomposition; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - -34080 -( -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3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 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -) - - -// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/omega b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/omega new file mode 100644 index 0000000000000000000000000000000000000000..e806605630ca42b164f47a37fe296bb102d4a682 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/0/omega @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object omega; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +dimensions [1 -2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + outlet + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + sides + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + base + { + type zeroGradient; + } + inlet + { + type fixedValue; + value uniform 0.0; + } + frontBack + { + type empty; + } + +} + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties index 51f63787132188da77d2b98b5a414d3e735c5c7b..aeb4fd4cf46eba93ea16a2fdca7ea1c34627e762 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties @@ -15,16 +15,44 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel infinitelyFastChemistry; +//combustionModel infinitelyFastChemistry<psiCombustionModel,gasThermoPhysics>; +combustionModel FSD<psiCombustionModel,gasThermoPhysics>; + +active true; infinitelyFastChemistryCoeffs { - C 10.0; + C 5.0; } -noCombustionCoeffs +FSDCoeffs { -} + Cv 0.1; + ftVarMin 1e-2; + + reactionRateFlameArea relaxation; + fuel Methane; + + relaxationCoeffs + { + C 2.0; + alpha 1.0; + Methane + { + omega0 0.5; + eta -0.013; + omegaMin 0.01; + sigmaExt 470; + } + Propane + { + omega0 0.4; + eta -0.00656; + omegaMin 0.01; + sigmaExt 450; + } + } +} // ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/polyMesh/boundary b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/polyMesh/boundary index c056cb28eeeb0813a6c6161799b37843853472f2..3adde43e11d2c14822f583874d6e5fb95540f068 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/polyMesh/boundary +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/polyMesh/boundary @@ -15,31 +15,37 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -4 +5 ( base { type patch; - nFaces 150; + nFaces 134; startFace 44700; } outlet { type patch; nFaces 150; - startFace 44850; + startFace 44834; } sides { type patch; nFaces 300; - startFace 45000; + startFace 44984; } frontAndBack { type empty; nFaces 45000; - startFace 45300; + startFace 45284; + } + inlet + { + type patch; + nFaces 16; + startFace 90284; } ) diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/reactions b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/reactions index c174cf789ecfdfbaf6128592efbd6123e013f690..67f2373c382e5477caeeada95dc46a061ee97423 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/reactions +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/reactions @@ -12,6 +12,6 @@ reactions propaneReaction { type irreversibleinfiniteReaction; - reaction "CH4 + 2O2 = CO2 + 2H2O"; + reaction "CH4 + 2O2 + 7.5N2 = CO2 + 2H2O + 7.5N2"; } } diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes index 5c8063431d1ba700472f497ecd6d10701c8368fe..793ef9723767c2e7f015c3059dff700e34541f50 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes @@ -40,7 +40,9 @@ divSchemes hs limitedLinear 1; }; div((muEff*dev2(T(grad(U))))) Gauss linear; + div(phi,omega) Gauss limitedLinear 1; div(phiU,p) Gauss linear; + div(U) Gauss linear; div(Ji,Ii_h) Gauss upwind; } diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution index 5a7b7a980a4652f368af9e122b3f3b8f93119d90..0168ed308e7478d2f42338205bf80ae251cebb34 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution @@ -53,7 +53,7 @@ solvers }; - "(U|Yi|k|hs)" + "(U|Yi|k|hs|omega)" { solver PBiCG; preconditioner DILU; @@ -62,7 +62,7 @@ solvers nSweeps 1; }; - "(U|Yi|k|hs)Final" + "(U|Yi|k|hs|omega)Final" { $U; tolerance 1e-7; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/combustionProperties b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/combustionProperties index de54b0bbc10176c603037ff2d6c9908ea9574c72..07b7a2a4891f3496d91488e25e4d3a5d788c0787 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/combustionProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/combustionProperties @@ -16,16 +16,14 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel infinitelyFastChemistry; +combustionModel infinitelyFastChemistry<psiCombustionModel,gasThermoPhysics>; + +active on; infinitelyFastChemistryCoeffs { C 5.0; } -noCombustionCoeffs -{ -} - // ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/reactions b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/reactions index c174cf789ecfdfbaf6128592efbd6123e013f690..3c6e45a0d6883fd69019f831ae3758bda192e5c3 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/reactions +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/reactions @@ -12,6 +12,6 @@ reactions propaneReaction { type irreversibleinfiniteReaction; - reaction "CH4 + 2O2 = CO2 + 2H2O"; + reaction "CH4 + 2O2 + 7.5N2 = CO2 + 2H2O + 7.5N2"; } } diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties index 14d3f4ab0aed2d7816a2e3baaad052eb4c175361..80cafe049a753c2deb2d47be3999ac1ed8970156 100644 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties @@ -23,8 +23,6 @@ chemistrySolver ode; initialChemicalTimeStep 1e-07; -turbulentReaction on; - sequentialCoeffs { cTauChem 0.001; @@ -43,6 +41,4 @@ odeCoeffs scale 1; } -Cmix Cmix [ 0 0 0 0 0 0 0 ] 0.1; - // ************************************************************************* // diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/combustionProperties b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/combustionProperties new file mode 100644 index 0000000000000000000000000000000000000000..cd5f6c35e1cc7835b9797a391cae0190c8e071f8 --- /dev/null +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/combustionProperties @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object combustionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +combustionModel PaSR<psiChemistryCombustionModel>; + +active true; + +infinitelyFastChemistryCoeffs +{ + C 10.0; +} + +PaSRCoeffs +{ + Cmix Cmix [ 0 0 0 0 0 0 0 ] 0.1; + turbulentReaction on; +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun index 208c5c815a5b6be8cfe2be493738c8d3d36cede2..1b0ffb01e92e3a9af9af75e5eb9e00584d564f2e 100755 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun @@ -42,12 +42,23 @@ done #-- Run on single processor runApplication `getApplication` +## Run in parallel ## Decompose #for i in bottomAir topAir heater leftSolid rightSolid #do # decomposePar -region $i > log.decomposePar.$i 2>&1 #done # +#for i in bottomAir topAir +#do +# mpirun -np 4 faceAgglomerate -region $i -dict viewFactorsDict -parallel> log.faceAgglomerate.$i 2>&1 +#done + +#for i in bottomAir topAir +#do +# mpirun -np 4 viewFactorsGen -region $i -parallel > log.viewFactorsGen.$i 2>&1 +#done + ## Run #runParallel `getApplication` 4 # @@ -61,9 +72,6 @@ runApplication `getApplication` echo echo "creating files for paraview post-processing" echo -for i in bottomAir topAir heater leftSolid rightSolid -do - paraFoam -touch -region $i -done +paraFoam -touchAll # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/incompressible/icoFoam/cavity/constant/polyMesh/blockMeshDict b/tutorials/incompressible/icoFoam/cavity/constant/polyMesh/blockMeshDict index 6aa802c1e976cb7756555768135439d950337b79..2e5f98c1a5f29b03764d942f7842c3f8a50c7e39 100644 --- a/tutorials/incompressible/icoFoam/cavity/constant/polyMesh/blockMeshDict +++ b/tutorials/incompressible/icoFoam/cavity/constant/polyMesh/blockMeshDict @@ -16,7 +16,7 @@ FoamFile convertToMeters 0.1; -vertices +vertices ( (0 0 0) (1 0 0) @@ -28,19 +28,18 @@ vertices (0 1 0.1) ); -blocks +blocks ( hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1) ); -edges +edges ( ); boundary ( - - movingWall + movingWall { type wall; faces @@ -48,7 +47,7 @@ boundary (3 7 6 2) ); } - fixedWalls + fixedWalls { type wall; faces @@ -58,7 +57,7 @@ boundary (1 5 4 0) ); } - frontAndBack + frontAndBack { type empty; faces @@ -69,7 +68,7 @@ boundary } ); -mergePatchPairs +mergePatchPairs ( ); diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict index 3e5b2dfbd02070eef34fdc315b6f6fee207bf7db..fc5893222c0cf8b92d59e6c9142eab31d516b3ff 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict +++ b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict @@ -16,19 +16,19 @@ FoamFile application simpleFoam; -startFrom latestTime; +startFrom latestTime; startTime 0; -stopAt nextWrite; +stopAt nextWrite; endTime 500; deltaT 1; -writeControl timeStep; +writeControl timeStep; -writeInterval 1; +writeInterval 1; purgeWrite 0; @@ -48,7 +48,7 @@ libs ( "libOpenFOAM.so" "libcompressibleTurbulenceModels.so" - "libincompressibleRASModels.so" + "libcompressibleRASModels.so" ); functions diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/chemistryProperties b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/chemistryProperties index 67ea1f828dfb41dd86a79bd54ab9986f09dd1d90..5f0483df1b9ad7fc60e590bb1ab9f0681c9d8090 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/chemistryProperties +++ b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/chemistryProperties @@ -25,8 +25,4 @@ chemCalcFreq 1; initialChemicalTimeStep 1e-8; // NOT USED -Cmix Cmix [ 0 0 0 0 0 0 0 ] 0.1; - -turbulentReaction on; - // ************************************************************************* // diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/combustionProperties b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/combustionProperties new file mode 100644 index 0000000000000000000000000000000000000000..a07f7b12b79a51be9ece8b6e6e9d349c2a211817 --- /dev/null +++ b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/combustionProperties @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object combustionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +combustionModel PaSR<rhoChemistryCombustionModel>; + +active true; + +PaSRCoeffs +{ + Cmix Cmix [ 0 0 0 0 0 0 0 ] 0.1; + turbulentReaction on; + useReactionRate true; +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/chemistryProperties b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/chemistryProperties index 1c723e893176e751b44432dea6fc22bad07827da..69f6f932345866f38fb1c8cdfbbb2fa78fb4cfeb 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/chemistryProperties +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/chemistryProperties @@ -19,9 +19,6 @@ rhoChemistryModel ODEChemistryModel<icoPoly8ThermoPhysics>; chemistry off; - -turbulentReaction off; - chemistrySolver noChemistrySolver; initialChemicalTimeStep 1e-07; // NOT USED diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/combustionProperties b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/combustionProperties new file mode 100644 index 0000000000000000000000000000000000000000..7b938bb47730a20ae9b66cd5422cbe6e862609cf --- /dev/null +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/combustionProperties @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object combustionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +combustionModel PaSR<rhoChemistryCombustionModel>; + +active false; + +PaSRCoeffs +{ + Cmix Cmix [ 0 0 0 0 0 0 0 ] 0.1; + turbulentReaction off; + useReactionRate true; +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/chemistryProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/chemistryProperties index fd54b847684388b2766bb421f6dc35976272347b..cbce99c7700fc9c29edaac6bbbf3abf5466a31ee 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/chemistryProperties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/chemistryProperties @@ -19,8 +19,6 @@ psiChemistryModel ODEChemistryModel<gasThermoPhysics>; chemistry on; -turbulentReaction on; - chemistrySolver ode; initialChemicalTimeStep 1e-07; @@ -44,7 +42,5 @@ odeCoeffs scale 1; } -Cmix Cmix [ 0 0 0 0 0 0 0 ] 1; - // ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/chemistryProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/combustionProperties similarity index 80% rename from tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/chemistryProperties rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/combustionProperties index fca4f15a5cacd9815e78fb5fd469bb34807f1c5e..83adafa2d4f605b12f8e21011b9712722d728973 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/chemistryProperties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/combustionProperties @@ -11,19 +11,20 @@ FoamFile format ascii; class dictionary; location "constant"; - object chemistryProperties; + object combustionProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -psiChemistryModel ODEChemistryModel<gasThermoPhysics>; +combustionModel PaSR<psiChemistryCombustionModel>; -chemistry off; +active true; -turbulentReaction off; -chemistrySolver noChemistrySolver; - -initialChemicalTimeStep 1e-07; +PaSRCoeffs +{ + Cmix Cmix [ 0 0 0 0 0 0 0 ] 1.0; + turbulentReaction on; +} // ************************************************************************* // diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/chemistryProperties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/chemistryProperties index d332d6144c4dff6be5f1143fb899738a8dff8c1b..8bc89b0f589a6790ba4e9c781908a2ebeffea12f 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/chemistryProperties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/chemistryProperties @@ -19,8 +19,6 @@ rhoChemistryModel ODEChemistryModel<icoPoly8ThermoPhysics>; chemistry off; -turbulentReaction off; - chemistrySolver ode; initialChemicalTimeStep 1e-07; @@ -44,7 +42,5 @@ odeCoeffs scale 1; } -Cmix Cmix [ 0 0 0 0 0 0 0 ] 1; - // ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/chemistryProperties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/combustionProperties similarity index 80% rename from tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/chemistryProperties rename to tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/combustionProperties index fca4f15a5cacd9815e78fb5fd469bb34807f1c5e..dc51ca05f7392d872afc49f249abb0ca0f16536a 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/chemistryProperties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/combustionProperties @@ -11,19 +11,19 @@ FoamFile format ascii; class dictionary; location "constant"; - object chemistryProperties; + object combustionProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -psiChemistryModel ODEChemistryModel<gasThermoPhysics>; +combustionModel PaSR<rhoChemistryCombustionModel>; -chemistry off; +active false; -turbulentReaction off; - -chemistrySolver noChemistrySolver; - -initialChemicalTimeStep 1e-07; +PaSRCoeffs +{ + Cmix Cmix [ 0 0 0 0 0 0 0 ] 1.0; + turbulentReaction off; +} // ************************************************************************* // diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/chemistryProperties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/chemistryProperties index d332d6144c4dff6be5f1143fb899738a8dff8c1b..8bc89b0f589a6790ba4e9c781908a2ebeffea12f 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/chemistryProperties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/chemistryProperties @@ -19,8 +19,6 @@ rhoChemistryModel ODEChemistryModel<icoPoly8ThermoPhysics>; chemistry off; -turbulentReaction off; - chemistrySolver ode; initialChemicalTimeStep 1e-07; @@ -44,7 +42,5 @@ odeCoeffs scale 1; } -Cmix Cmix [ 0 0 0 0 0 0 0 ] 1; - // ************************************************************************* // diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/combustionProperties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/combustionProperties new file mode 100644 index 0000000000000000000000000000000000000000..dc51ca05f7392d872afc49f249abb0ca0f16536a --- /dev/null +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/combustionProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object combustionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +combustionModel PaSR<rhoChemistryCombustionModel>; + +active false; + +PaSRCoeffs +{ + Cmix Cmix [ 0 0 0 0 0 0 0 ] 1.0; + turbulentReaction off; +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/chemistryProperties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/chemistryProperties index d332d6144c4dff6be5f1143fb899738a8dff8c1b..8bc89b0f589a6790ba4e9c781908a2ebeffea12f 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/chemistryProperties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/chemistryProperties @@ -19,8 +19,6 @@ rhoChemistryModel ODEChemistryModel<icoPoly8ThermoPhysics>; chemistry off; -turbulentReaction off; - chemistrySolver ode; initialChemicalTimeStep 1e-07; @@ -44,7 +42,5 @@ odeCoeffs scale 1; } -Cmix Cmix [ 0 0 0 0 0 0 0 ] 1; - // ************************************************************************* // diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/combustionProperties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/combustionProperties new file mode 100644 index 0000000000000000000000000000000000000000..dc51ca05f7392d872afc49f249abb0ca0f16536a --- /dev/null +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/combustionProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object combustionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +combustionModel PaSR<rhoChemistryCombustionModel>; + +active false; + +PaSRCoeffs +{ + Cmix Cmix [ 0 0 0 0 0 0 0 ] 1.0; + turbulentReaction off; +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/chemistryProperties b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/chemistryProperties index fca4f15a5cacd9815e78fb5fd469bb34807f1c5e..36247042de2dc5d7c5b166134110ccf19f8e884e 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/chemistryProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/chemistryProperties @@ -19,8 +19,6 @@ psiChemistryModel ODEChemistryModel<gasThermoPhysics>; chemistry off; -turbulentReaction off; - chemistrySolver noChemistrySolver; initialChemicalTimeStep 1e-07; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/combustionProperties b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/combustionProperties index 4d6e2a96b0030adb10594884242240aff3cc76b9..86e6e0388b3899e36d707e8efa38e29b459abe86 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/combustionProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/combustionProperties @@ -15,7 +15,15 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel none; +combustionModel PaSR<psiChemistryCombustionModel>; + +active false; + +PaSRCoeffs +{ + Cmix Cmix [ 0 0 0 0 0 0 0 ] 1.0; + turbulentReaction on; +} // ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/chemistryProperties b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/chemistryProperties index fca4f15a5cacd9815e78fb5fd469bb34807f1c5e..36247042de2dc5d7c5b166134110ccf19f8e884e 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/chemistryProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/chemistryProperties @@ -19,8 +19,6 @@ psiChemistryModel ODEChemistryModel<gasThermoPhysics>; chemistry off; -turbulentReaction off; - chemistrySolver noChemistrySolver; initialChemicalTimeStep 1e-07; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/combustionProperties b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/combustionProperties index 4d6e2a96b0030adb10594884242240aff3cc76b9..7c6acfaadd0776258477a4db18a228fc7a9fdfd3 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/combustionProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/combustionProperties @@ -15,7 +15,15 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel none; +combustionModel PaSR<psiChemistryCombustionModel>; + +active false; + +PaSRCoeffs +{ + Cmix Cmix [ 0 0 0 0 0 0 0 ] 1.0; + turbulentReaction off; +} // ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/patchify.setSet b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/patchify.setSet new file mode 100644 index 0000000000000000000000000000000000000000..bbfd5e0b2433b7d54c881e78d021a61c6a73c0a5 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/patchify.setSet @@ -0,0 +1,30 @@ +faceSet cubeFaces clear +faceSet cubeFaces add boxToFace (0.399 0.099 0.299) (0.601 0.301 0.301) +faceSet cubeFaces add boxToFace (0.599 0.099 0.099) (0.601 0.301 0.301) +faceSet cubeFaces add boxToFace (0.399 0.099 0.099) (0.601 0.301 0.101) +faceSet cubeFaces add boxToFace (0.399 0.099 0.099) (0.401 0.301 0.301) +faceSet cubeFaces add boxToFace (0.399 0.299 0.099) (0.601 0.301 0.301) +faceSet cubeFaces add boxToFace (0.399 0.099 0.099) (0.601 0.101 0.301) +faceSet cubeFaces add boxToFace (0.399 0.099 0.599) (0.601 0.301 0.601) +faceSet cubeFaces add boxToFace (0.599 0.099 0.399) (0.601 0.301 0.601) +faceSet cubeFaces add boxToFace (0.399 0.099 0.399) (0.601 0.301 0.401) +faceSet cubeFaces add boxToFace (0.399 0.099 0.399) (0.401 0.301 0.601) +faceSet cubeFaces add boxToFace (0.399 0.299 0.399) (0.601 0.301 0.601) +faceSet cubeFaces add boxToFace (0.399 0.099 0.399) (0.601 0.101 0.601) +faceSet cubeFaces add boxToFace (0.399 0.399 0.299) (0.601 0.601 0.301) +faceSet cubeFaces add boxToFace (0.599 0.399 0.099) (0.601 0.601 0.301) +faceSet cubeFaces add boxToFace (0.399 0.399 0.099) (0.601 0.601 0.101) +faceSet cubeFaces add boxToFace (0.399 0.399 0.099) (0.401 0.601 0.301) +faceSet cubeFaces add boxToFace (0.399 0.599 0.099) (0.601 0.601 0.301) +faceSet cubeFaces add boxToFace (0.399 0.399 0.099) (0.601 0.401 0.301) +faceSet cubeFaces add boxToFace (0.399 0.399 0.599) (0.601 0.601 0.601) +faceSet cubeFaces add boxToFace (0.599 0.399 0.399) (0.601 0.601 0.601) +faceSet cubeFaces add boxToFace (0.399 0.399 0.399) (0.601 0.601 0.401) +faceSet cubeFaces add boxToFace (0.399 0.399 0.399) (0.401 0.601 0.601) +faceSet cubeFaces add boxToFace (0.399 0.599 0.399) (0.601 0.601 0.601) +faceSet cubeFaces add boxToFace (0.399 0.399 0.399) (0.601 0.401 0.601) +cellSet cubeFacesCells new faceToCell cubeFaces owner +faceZoneSet cubeFaces new setsToFaceZone cubeFaces cubeFacesCells +faceSet floorFaces new boxToFace (-0.001 -0.001 -0.001) (1.001 1.001 0.001) +cellSet floorCells new faceToCell floorFaces owner +faceZoneSet floorFaces new setsToFaceZone floorFaces floorCells diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/chemistryProperties b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/chemistryProperties index fca4f15a5cacd9815e78fb5fd469bb34807f1c5e..36247042de2dc5d7c5b166134110ccf19f8e884e 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/chemistryProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/chemistryProperties @@ -19,8 +19,6 @@ psiChemistryModel ODEChemistryModel<gasThermoPhysics>; chemistry off; -turbulentReaction off; - chemistrySolver noChemistrySolver; initialChemicalTimeStep 1e-07; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/combustionProperties b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/combustionProperties index 4d6e2a96b0030adb10594884242240aff3cc76b9..7c6acfaadd0776258477a4db18a228fc7a9fdfd3 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/combustionProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/combustionProperties @@ -15,7 +15,15 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel none; +combustionModel PaSR<psiChemistryCombustionModel>; + +active false; + +PaSRCoeffs +{ + Cmix Cmix [ 0 0 0 0 0 0 0 ] 1.0; + turbulentReaction off; +} // ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/chemistryProperties b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/chemistryProperties index fca4f15a5cacd9815e78fb5fd469bb34807f1c5e..36247042de2dc5d7c5b166134110ccf19f8e884e 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/chemistryProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/chemistryProperties @@ -19,8 +19,6 @@ psiChemistryModel ODEChemistryModel<gasThermoPhysics>; chemistry off; -turbulentReaction off; - chemistrySolver noChemistrySolver; initialChemicalTimeStep 1e-07; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/combustionProperties b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/combustionProperties index 4d6e2a96b0030adb10594884242240aff3cc76b9..7c6acfaadd0776258477a4db18a228fc7a9fdfd3 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/combustionProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/combustionProperties @@ -15,7 +15,15 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel none; +combustionModel PaSR<psiChemistryCombustionModel>; + +active false; + +PaSRCoeffs +{ + Cmix Cmix [ 0 0 0 0 0 0 0 ] 1.0; + turbulentReaction off; +} // ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/chemistryProperties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/chemistryProperties index 462583d3e25646bed8bb64009d7ca0ecd4238419..4a82f1bffdd2d91a77acb5a93741cc953b515bc2 100644 --- a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/chemistryProperties +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/chemistryProperties @@ -19,8 +19,6 @@ psiChemistryModel ODEChemistryModel<gasThermoPhysics>; chemistry off; -turbulentReaction off; - chemistrySolver ode; initialChemicalTimeStep 1e-07; @@ -43,7 +41,5 @@ odeCoeffs scale 1; } -Cmix Cmix [ 0 0 0 0 0 0 0 ] 1; - // ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/combustionProperties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/combustionProperties new file mode 100644 index 0000000000000000000000000000000000000000..7c6acfaadd0776258477a4db18a228fc7a9fdfd3 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/combustionProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object combustionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +combustionModel PaSR<psiChemistryCombustionModel>; + +active false; + +PaSRCoeffs +{ + Cmix Cmix [ 0 0 0 0 0 0 0 ] 1.0; + turbulentReaction off; +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/chemistryProperties b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/chemistryProperties index 5612988231f268a3913dd7d6053b17a8ffbe2d8b..82a5c663e00184008f60f5fe603f560c4a4c0bf4 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/chemistryProperties +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/chemistryProperties @@ -23,10 +23,6 @@ chemistrySolver ode; initialChemicalTimeStep 1e-07; -turbulentReaction yes; - -Cmix Cmix [0 0 0 0 0] 1; - odeCoeffs { solver SIBS; diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/combustionProperties b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/combustionProperties new file mode 100644 index 0000000000000000000000000000000000000000..abba13a97fd68fe6a8b6e9ab4eb9346454676a6a --- /dev/null +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/combustionProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object combustionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +combustionModel PaSR<psiChemistryCombustionModel>; + +active false; + +PaSRCoeffs +{ + Cmix Cmix [ 0 0 0 0 0 0 0 ] 1.0; + turbulentReaction yes; +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties index 08e549dacfe34cbb8d09510f0ebdf785590e3040..c8cc53eda0f994782e53d88f27ae347c6efb4eca 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties @@ -119,7 +119,7 @@ subModels position ( 0 0.0995 0 ); direction ( 0 -1 0 ); parcelsPerSecond 100000000; - volumeFlowRate table + flowRateProfile table ( (0 0.1272) (4.16667e-05 6.1634) diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/U b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/U new file mode 100644 index 0000000000000000000000000000000000000000..a7bfdc893c06c0a9ec26f43a81bd99db3cb073eb --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/U @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ 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 +{ + left + { + type slip; + } + right + { + type slip; + } + bottom + { + type slip; + } + top + { + type slip; + } + frontBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/alpha1 b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/alpha1 new file mode 100644 index 0000000000000000000000000000000000000000..8dbc709325a241b671349b3ce274d98cdcb613c0 --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/alpha1 @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alpha1; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + left + { + type zeroGradient; + } + right + { + type zeroGradient; + } + bottom + { + type zeroGradient; + } + top + { + type zeroGradient; + } + frontBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/p_rgh b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/p_rgh new file mode 100644 index 0000000000000000000000000000000000000000..faed24b29c4d8c09f98326b1641d10736a46f107 --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/0.org/p_rgh @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + left + { + type buoyantPressure; + } + right + { + type buoyantPressure; + } + bottom + { + type buoyantPressure; + } + top + { + type buoyantPressure; + } + frontBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..cd78b26599c3d4f7cd89a2197d3e52eb5f83087b --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allclean @@ -0,0 +1,11 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase + +\rm -rf 0 + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..887344985c0a184737b5ab1f75f0709c953212b1 --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun @@ -0,0 +1,17 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Set application name +application=`getApplication` + +\rm -rf 0 +cp -r 0.org 0 + +runApplication blockMesh +runApplication setFields +runApplication $application + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/g b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/g new file mode 100644 index 0000000000000000000000000000000000000000..622f53c3528d356882a736fb68e92b2f5ece8d9e --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/g @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.81 0); + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/polyMesh/blockMeshDict b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..129623509b71f2766895163c1148b91baf384dea --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/polyMesh/blockMeshDict @@ -0,0 +1,88 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (0 0 0) + (10 0 0) + (10 2 0) + (0 2 0) + (0 0 2) + (10 0 2) + (10 2 2) + (0 2 2)); + +blocks +( + hex (0 1 2 3 4 5 6 7) (200 40 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + left + { + type wall; + faces + ( + (0 4 7 3) + ); + } + right + { + type wall; + faces + ( + (1 5 6 2) + ); + } + bottom + { + type wall; + faces + ( + (0 1 5 4) + ); + } + top + { + type wall; + faces + ( + (3 2 6 7) + ); + } + frontBack + { + type empty; + faces + ( + (0 1 2 3) + (4 5 6 7) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/polyMesh/boundary b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..372e6d731bd16ddd8bcce82a46c8bb0e17f1b97c --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/polyMesh/boundary @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +5 +( + left + { + type wall; + nFaces 40; + startFace 15760; + } + right + { + type wall; + nFaces 40; + startFace 15800; + } + bottom + { + type wall; + nFaces 200; + startFace 15840; + } + top + { + type wall; + nFaces 200; + startFace 16040; + } + frontBack + { + type empty; + nFaces 16000; + startFace 16240; + } +) + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/transportProperties b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..409c2a04f191d9f3de1c84c7227654ae40b3201e --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/transportProperties @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Dab Dab [0 2 -1 0 0 0 0] 1e-06; +alphatab alphatab [0 0 0 0 0 0 0] 1; + +phase1 +{ + transportModel Newtonian; + nu nu [0 2 -1 0 0 0 0] 1e-06; + rho rho [1 -3 0 0 0 0 0] 1000; +} + +phase2 +{ + transportModel Newtonian; + nu nu [0 2 -1 0 0 0 0] 1e-06; + rho rho [1 -3 0 0 0 0 0] 990; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/turbulenceProperties b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..68ff5154b0339355d9bcae74ec96f75cb8eea9e2 --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/constant/turbulenceProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/controlDict b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..35ccca10c5f44cfc6320017844afaa1e304b0d93 --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/controlDict @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application twoLiquidMixingFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 100; + +deltaT 0.05; + +writeControl adjustableRunTime; + +writeInterval 1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep on; + +maxCo 0.5; +maxDeltaT 1; + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..f12ddde1afa6b7d0add7d4651dd10902507f1881 --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes @@ -0,0 +1,62 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + + div(rho*phi,U) Gauss linear; + div(phi,alpha1) Gauss vanLeer; + div(phi,k) Gauss limitedLinear 1; + div(((rho*nuEff)*dev(grad(U).T()))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p_rgh; + alpha1; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSolution b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..20af5a05fcd14951d8c64159d65ff5eb800a8ea0 --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSolution @@ -0,0 +1,74 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha1.*" + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-7; + relTol 0; + nSweeps 1; + } + + p_rgh + { + solver GAMG; + tolerance 1e-7; + relTol 0.01; + smoother GaussSeidel; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + p_rghFinal + { + $p_rgh; + relTol 0; + } + + U + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-7; + relTol 0.1; + nSweeps 1; + } + + UFinal + { + $U; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor yes; + nOuterCorrectors 1; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefValue 0; + pRefPoint (0.1 0.1 1); +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/setFieldsDict b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/setFieldsDict new file mode 100644 index 0000000000000000000000000000000000000000..64f0b43c43bef4962be50b98458a9cf30f377677 --- /dev/null +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/setFieldsDict @@ -0,0 +1,36 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha1 0 + volVectorFieldValue U (0 0 0) +); + +regions +( + boxToCell + { + box (0 0 0) (5 2 2); + + fieldValues + ( + volScalarFieldValue alpha1 1 + ); + } +); + +// ************************************************************************* //