diff --git a/.gitignore b/.gitignore index 150288aae2555094adff1f866bb0e4e950f07c9f..b030d74e096b58cee76a6ac24a608cc71b9963d2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.orig *.bak \#*\# +.directory # CVS recovered versions - anywhere .#* @@ -47,7 +48,9 @@ doc/[Dd]oxygen/man # source packages - anywhere *.tar.bz2 *.tar.gz +*.tar *.tgz +*.gtgz # ignore the persistent .build tag in the main directory /.build diff --git a/applications/solvers/Lagrangian/reactingParcelFoam/createClouds.H b/applications/solvers/Lagrangian/reactingParcelFoam/createClouds.H deleted file mode 100644 index b4ec5e40569b90994c4575e1faae10cd304d1c78..0000000000000000000000000000000000000000 --- a/applications/solvers/Lagrangian/reactingParcelFoam/createClouds.H +++ /dev/null @@ -1,40 +0,0 @@ -Info << "\nConstructing gas properties" << endl; -/* -PtrList<specieConstProperties> gasProperties(Y.size()); -forAll(gasProperties, i) -{ - gasProperties.set - ( - i, - new specieConstProperties - ( - dynamic_cast<const multiComponentMixture<constTransport< - specieThermo<hConstThermo<perfectGas> > > >&> - (thermo()).speciesData()[i] - ) - ); -} -*/ -PtrList<specieReactingProperties> gasProperties(Y.size()); -forAll(gasProperties, i) -{ - gasProperties.set - ( - i, - new specieReactingProperties - ( - dynamic_cast<const reactingMixture&>(thermo()).speciesData()[i] - ) - ); -} - -Info<< "\nConstructing reacting cloud" << endl; -basicReactingCloud parcels -( - "reactingCloud1", - rho, - U, - g, - thermo(), - gasProperties -); diff --git a/applications/solvers/combustion/coalChemistryFoam/Make/options b/applications/solvers/combustion/coalChemistryFoam/Make/options index 21575a94ae65b3ef3d5dc4fa9d4004bd6b8149fb..d1dd07691bb4999db85d94725ccac1ee912e6173 100644 --- a/applications/solvers/combustion/coalChemistryFoam/Make/options +++ b/applications/solvers/combustion/coalChemistryFoam/Make/options @@ -19,7 +19,6 @@ EXE_INC = \ -I$(LIB_SRC)/ODE/lnInclude EXE_LIBS = \ - -L$(FOAM_USER_LIBBIN) \ -lfiniteVolume \ -lmeshTools \ -lcompressibleRASModels \ diff --git a/applications/solvers/combustion/coalChemistryFoam/coalChemistryFoam.C b/applications/solvers/combustion/coalChemistryFoam/coalChemistryFoam.C index 3bccc682d33ee4532a832198151c8ef984aaf87b..f5fc4faea60a3445be00566bfcad67f9904cfbbc 100644 --- a/applications/solvers/combustion/coalChemistryFoam/coalChemistryFoam.C +++ b/applications/solvers/combustion/coalChemistryFoam/coalChemistryFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,11 +35,11 @@ Description #include "hCombustionThermo.H" #include "turbulenceModel.H" #include "basicThermoCloud.H" -#include "coalCloud.H" +#include "CoalCloud.H" #include "chemistryModel.H" #include "chemistrySolver.H" -#include "ReactingCloudThermoTypes.H" -#include "timeActivatedExplicitSource.H" +#include "reactingThermoTypes.H" +#include "timeActivatedExplicitCellSource.H" #include "radiationModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -113,8 +113,6 @@ int main(int argc, char *argv[]) turbulence->correct(); - enthalpySource.update(); - rho = thermo->rho(); if (runTime.write()) diff --git a/applications/solvers/combustion/coalChemistryFoam/createClouds.H b/applications/solvers/combustion/coalChemistryFoam/createClouds.H index 34398f6b827944f55ee061156ef779cf9e7ccd5b..4ed459b1507d7064f1a996c6aad3e0dcac95331b 100644 --- a/applications/solvers/combustion/coalChemistryFoam/createClouds.H +++ b/applications/solvers/combustion/coalChemistryFoam/createClouds.H @@ -1,44 +1,11 @@ -Info<< "\nConstructing interpolation" << endl; - -Info << "\nConstructing gas properties" << endl; -/* -PtrList<specieConstProperties> gasProperties(Y.size()); -forAll(gasProperties, i) -{ - gasProperties.set - ( - i, - new specieConstProperties - ( - dynamic_cast<const multiComponentMixture<constTransport< - specieThermo<hConstThermo<perfectGas> > > >&> - (thermo()).speciesData()[i] - ) - ); -} -*/ -PtrList<specieReactingProperties> gasProperties(Y.size()); -forAll(gasProperties, i) -{ - gasProperties.set - ( - i, - new specieReactingProperties - ( - dynamic_cast<const reactingMixture&>(thermo()).speciesData()[i] - ) - ); -} - Info<< "\nConstructing coal cloud" << endl; -coalCloud coalParcels +CoalCloud<specieReactingProperties> coalParcels ( "coalCloud1", rho, U, g, - thermo(), - gasProperties + thermo() ); Info<< "\nConstructing limestone cloud" << endl; diff --git a/applications/solvers/combustion/coalChemistryFoam/createFields.H b/applications/solvers/combustion/coalChemistryFoam/createFields.H index ebd8a44ab63731268a87378b9c286f07a58198f8..7232cc424478db7ab9195ca6fef16e61fdf98110 100644 --- a/applications/solvers/combustion/coalChemistryFoam/createFields.H +++ b/applications/solvers/combustion/coalChemistryFoam/createFields.H @@ -105,8 +105,8 @@ volScalarField DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); - Info<< "\nConstructing explicit enthalpy source" << endl; - timeActivatedExplicitSource enthalpySource + Info<< "\nConstructing explicit enthalpy cell source" << endl; + timeActivatedExplicitCellSource enthalpySource ( "enthalpySource", mesh, diff --git a/applications/solvers/combustion/coalChemistryFoam/rhoEqn.H b/applications/solvers/combustion/coalChemistryFoam/rhoEqn.H index fdc338a9595e28279d70bbc68e4cff93ae0499ca..ce337f5acf76fdf2f21080c15ce27973d4fc93cf 100644 --- a/applications/solvers/combustion/coalChemistryFoam/rhoEqn.H +++ b/applications/solvers/combustion/coalChemistryFoam/rhoEqn.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C index bd0ce2ac373a09d4c8816ad5fc990244d31a51d7..e3cece5b91f321694941d087e194fb3b07dec430 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C index 26e732cf9c17b30ac63d080b03470a3678290aa0..fafb49d84846c8ab4505a3770bfd9fc55d90dd89 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantPisoFoam/UEqn.H index 24cfbf4f685a291b1a836fc0dfd931f9bfc526d1..d4878d063dab6ee8ed4243c61d529832d3dd9c6a 100644 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantPisoFoam/UEqn.H @@ -15,12 +15,10 @@ ( UEqn == - -fvc::reconstruct + fvc::reconstruct ( - ( - fvc::snGrad(pd) - + ghf*fvc::snGrad(rho) - ) * mesh.magSf() + fvc::interpolate(rho)*(g & mesh.Sf()) + - fvc::snGrad(p)*mesh.magSf() ) ); } diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H index 103b3ea3bb531684ed48fc5fe74ac8ec588f4d99..f199713cf877086d8202d88a0b66d5e763d728d6 100644 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H @@ -59,27 +59,6 @@ fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p) ); - Info<< "Calculating field g.h\n" << endl; - volScalarField gh("gh", g & mesh.C()); - surfaceScalarField ghf("ghf", g & mesh.Cf()); - - dimensionedScalar pRef("pRef", p.dimensions(), thermo->lookup("pRef")); - - Info<< "Creating field pd\n" << endl; - volScalarField pd - ( - IOobject - ( - "pd", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - p = pd + rho*gh + pRef; thermo->correct(); dimensionedScalar initialMass = fvc::domainIntegrate(rho); diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantPisoFoam/pEqn.H index 53f6688a6a8438f11c91816941e5d78b5bd47c14..7e48167d67a938b8fb52993be324d2cc01185f72 100644 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantPisoFoam/pEqn.H @@ -1,5 +1,5 @@ { - bool closedVolume = pd.needReference(); + bool closedVolume = p.needReference(); rho = thermo->rho(); @@ -17,38 +17,35 @@ ) ); - phi = phiU - ghf*fvc::snGrad(rho)*rhorUAf*mesh.magSf(); + phi = phiU + rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf()); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pdEqn + fvScalarMatrix pEqn ( - fvm::ddt(psi, pd) - + fvc::ddt(psi)*pRef - + fvc::ddt(psi, rho)*gh + fvm::ddt(psi, p) + fvc::div(phi) - - fvm::laplacian(rhorUAf, pd) + - fvm::laplacian(rhorUAf, p) ); if (corr == nCorr-1 && nonOrth == nNonOrthCorr) { - pdEqn.solve(mesh.solver(pd.name() + "Final")); + pEqn.solve(mesh.solver(p.name() + "Final")); } else { - pdEqn.solve(mesh.solver(pd.name())); + pEqn.solve(mesh.solver(p.name())); } if (nonOrth == nNonOrthCorr) { - phi += pdEqn.flux(); + phi += pEqn.flux(); } } U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf); U.correctBoundaryConditions(); - p == pd + rho*gh + pRef; DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); #include "rhoEqn.H" @@ -62,6 +59,4 @@ /fvc::domainIntegrate(thermo->psi()); rho = thermo->rho(); } - - pd == p - (rho*gh + pRef); } diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H index 71a57cd2a930c3affd56ba48b809e455d2a93e6c..aa476b4dc808f46619dd5c94fd9d8defaa10c55d 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H @@ -13,14 +13,11 @@ ( UEqn() == - -fvc::reconstruct + fvc::reconstruct ( - ( - fvc::snGrad(pd) - + ghf*fvc::snGrad(rho) - ) * mesh.magSf() + fvc::interpolate(rho)*(g & mesh.Sf()) + - fvc::snGrad(p)*mesh.magSf() ) ).initialResidual(); maxResidual = max(eqnResidual, maxResidual); - diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C index d91b6398f27144233a20adab7983689e3d000c24..b2a8c5c374211719be84f7e03b6340f55a29e2e9 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C @@ -39,15 +39,14 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readEnvironmentalProperties.H" + #include "createFields.H" + #include "initContinuityErrs.H" -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readEnvironmentalProperties.H" -# include "createFields.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -55,17 +54,17 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readSIMPLEControls.H" -# include "initConvergenceCheck.H" + #include "readSIMPLEControls.H" + #include "initConvergenceCheck.H" - pd.storePrevIter(); + p.storePrevIter(); rho.storePrevIter(); // Pressure-velocity SIMPLE corrector { -# include "UEqn.H" -# include "hEqn.H" -# include "pEqn.H" + #include "UEqn.H" + #include "hEqn.H" + #include "pEqn.H" } turbulence->correct(); @@ -76,7 +75,7 @@ int main(int argc, char *argv[]) << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; -# include "convergenceCheck.H" + #include "convergenceCheck.H" } Info<< "End\n" << endl; diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H index 879ee722b98ec4c6ab21ca66518c22fc31a9105c..0d9d9d5ec7fc667216c1af6937a24f50d7905986 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H @@ -51,38 +51,16 @@ ) ); - Info<< "Calculating field g.h\n" << endl; - volScalarField gh("gh", g & mesh.C()); - surfaceScalarField ghf("ghf", g & mesh.Cf()); - - dimensionedScalar pRef("pRef", p.dimensions(), thermo->lookup("pRef")); - - Info<< "Creating field pd\n" << endl; - volScalarField pd - ( - IOobject - ( - "pd", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - p = pd + rho*gh + pRef; thermo->correct(); - - label pdRefCell = 0; - scalar pdRefValue = 0.0; + label pRefCell = 0; + scalar pRefValue = 0.0; setRefCell ( - pd, + p, mesh.solutionDict().subDict("SIMPLE"), - pdRefCell, - pdRefValue + pRefCell, + pRefValue ); diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H index 8d97ad9048a5a6e145d9fa0184629534df3a61e3..d592bc3c43eb47f568b79f123f27dd95654fe6ff 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H @@ -1,4 +1,6 @@ { + rho = thermo->rho(); + volScalarField rUA = 1.0/UEqn().A(); surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA)); @@ -7,60 +9,57 @@ phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf()); bool closedVolume = adjustPhi(phi, U, p); - surfaceScalarField buoyancyPhi = ghf*fvc::snGrad(rho)*rhorUAf*mesh.magSf(); - phi -= buoyancyPhi; + surfaceScalarField buoyancyPhi = + rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf()); + phi += buoyancyPhi; for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pdEqn + fvScalarMatrix pEqn ( - fvm::laplacian(rhorUAf, pd) == fvc::div(phi) + fvm::laplacian(rhorUAf, p) == fvc::div(phi) ); - pdEqn.setReference(pdRefCell, pdRefValue); + pEqn.setReference(pRefCell, p[pRefCell]); // retain the residual from the first iteration if (nonOrth == 0) { - eqnResidual = pdEqn.solve().initialResidual(); + eqnResidual = pEqn.solve().initialResidual(); maxResidual = max(eqnResidual, maxResidual); } else { - pdEqn.solve(); + pEqn.solve(); } if (nonOrth == nNonOrthCorr) { + // For closed-volume cases adjust the pressure and density levels + // to obey overall mass continuity + if (closedVolume) + { + p += (initialMass - fvc::domainIntegrate(thermo->psi()*p)) + /fvc::domainIntegrate(thermo->psi()); + } + // Calculate the conservative fluxes - phi -= pdEqn.flux(); + phi -= pEqn.flux(); // Explicitly relax pressure for momentum corrector - pd.relax(); + p.relax(); // Correct the momentum source with the pressure gradient flux // calculated from the relaxed pressure - U -= rUA*fvc::reconstruct((buoyancyPhi + pdEqn.flux())/rhorUAf); + U += rUA*fvc::reconstruct((buoyancyPhi - pEqn.flux())/rhorUAf); U.correctBoundaryConditions(); } } #include "continuityErrs.H" - p == pd + rho*gh + pRef; - - // For closed-volume cases adjust the pressure and density levels - // to obey overall mass continuity - if (closedVolume) - { - p += (initialMass - fvc::domainIntegrate(thermo->psi()*p)) - /fvc::domainIntegrate(thermo->psi()); - } - rho = thermo->rho(); rho.relax(); Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl; - - pd == p - (rho*gh + pRef); } diff --git a/applications/solvers/lagrangian/reactingParcelFoam/Make/files b/applications/solvers/lagrangian/reactingParcelFoam/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..3710ca4e2df104e37cd2c720455d658fd102d2d0 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/Make/files @@ -0,0 +1,3 @@ +reactingParcelFoam.C + +EXE = $(FOAM_APPBIN)/reactingParcelFoam diff --git a/applications/solvers/Lagrangian/reactingParcelFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFoam/Make/options similarity index 100% rename from applications/solvers/Lagrangian/reactingParcelFoam/Make/options rename to applications/solvers/lagrangian/reactingParcelFoam/Make/options diff --git a/applications/solvers/Lagrangian/reactingParcelFoam/UEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/UEqn.H similarity index 100% rename from applications/solvers/Lagrangian/reactingParcelFoam/UEqn.H rename to applications/solvers/lagrangian/reactingParcelFoam/UEqn.H diff --git a/applications/solvers/Lagrangian/reactingParcelFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H similarity index 100% rename from applications/solvers/Lagrangian/reactingParcelFoam/YEqn.H rename to applications/solvers/lagrangian/reactingParcelFoam/YEqn.H diff --git a/applications/solvers/Lagrangian/reactingParcelFoam/additionalOutput.H b/applications/solvers/lagrangian/reactingParcelFoam/additionalOutput.H similarity index 100% rename from applications/solvers/Lagrangian/reactingParcelFoam/additionalOutput.H rename to applications/solvers/lagrangian/reactingParcelFoam/additionalOutput.H diff --git a/applications/solvers/Lagrangian/reactingParcelFoam/chemistry.H b/applications/solvers/lagrangian/reactingParcelFoam/chemistry.H similarity index 100% rename from applications/solvers/Lagrangian/reactingParcelFoam/chemistry.H rename to applications/solvers/lagrangian/reactingParcelFoam/chemistry.H diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createClouds.H b/applications/solvers/lagrangian/reactingParcelFoam/createClouds.H new file mode 100644 index 0000000000000000000000000000000000000000..fcab29c923c274b45ec86647cb3b5eb3a54ecc7b --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/createClouds.H @@ -0,0 +1,9 @@ +Info<< "\nConstructing reacting cloud" << endl; +BasicReactingCloud<specieReactingProperties> parcels +( + "reactingCloud1", + rho, + U, + g, + thermo() +); diff --git a/applications/solvers/Lagrangian/reactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H similarity index 100% rename from applications/solvers/Lagrangian/reactingParcelFoam/createFields.H rename to applications/solvers/lagrangian/reactingParcelFoam/createFields.H diff --git a/applications/solvers/Lagrangian/reactingParcelFoam/hEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/hEqn.H similarity index 100% rename from applications/solvers/Lagrangian/reactingParcelFoam/hEqn.H rename to applications/solvers/lagrangian/reactingParcelFoam/hEqn.H diff --git a/applications/solvers/Lagrangian/reactingParcelFoam/pEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H similarity index 100% rename from applications/solvers/Lagrangian/reactingParcelFoam/pEqn.H rename to applications/solvers/lagrangian/reactingParcelFoam/pEqn.H diff --git a/applications/solvers/Lagrangian/reactingParcelFoam/reactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C similarity index 96% rename from applications/solvers/Lagrangian/reactingParcelFoam/reactingParcelFoam.C rename to applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C index ea57f0da0e3e5bc2155fd8288dd44e71d1af4cf5..3c2182d2bc36156e3b02a2e195e4d94be92ac425 100644 --- a/applications/solvers/Lagrangian/reactingParcelFoam/reactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,10 +34,10 @@ Description #include "fvCFD.H" #include "hCombustionThermo.H" #include "turbulenceModel.H" -#include "basicReactingCloud.H" +#include "BasicReactingCloud.H" #include "chemistryModel.H" #include "chemistrySolver.H" -#include "ReactingCloudThermoTypes.H" +#include "reactingThermoTypes.H" #include "radiationModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/Lagrangian/reactingParcelFoam/readChemistryProperties.H b/applications/solvers/lagrangian/reactingParcelFoam/readChemistryProperties.H similarity index 100% rename from applications/solvers/Lagrangian/reactingParcelFoam/readChemistryProperties.H rename to applications/solvers/lagrangian/reactingParcelFoam/readChemistryProperties.H diff --git a/applications/solvers/Lagrangian/reactingParcelFoam/rhoEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/rhoEqn.H similarity index 95% rename from applications/solvers/Lagrangian/reactingParcelFoam/rhoEqn.H rename to applications/solvers/lagrangian/reactingParcelFoam/rhoEqn.H index e30e721004d7e251eb23e74182c475149f5bd2b4..1b2882a2b7b7e6bd09521babeb2cda56feb5f0aa 100644 --- a/applications/solvers/Lagrangian/reactingParcelFoam/rhoEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/rhoEqn.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/lagrangian/trackedReactingParcelFoam/Make/files b/applications/solvers/lagrangian/trackedReactingParcelFoam/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..90e8aa5b4bbda928a7b5c9c7993b24ffdcbf0bab --- /dev/null +++ b/applications/solvers/lagrangian/trackedReactingParcelFoam/Make/files @@ -0,0 +1,3 @@ +trackedReactingParcelFoam.C + +EXE = $(FOAM_APPBIN)/trackedReactingParcelFoam diff --git a/applications/solvers/lagrangian/trackedReactingParcelFoam/Make/options b/applications/solvers/lagrangian/trackedReactingParcelFoam/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..54d7b744d4c7a23d0992ee5c6b127cc63cbc6c93 --- /dev/null +++ b/applications/solvers/lagrangian/trackedReactingParcelFoam/Make/options @@ -0,0 +1,38 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I${LIB_SRC}/meshTools/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ + -I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/pdfs/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ + -I$(LIB_SRC)/ODE/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools \ + -lcompressibleRASModels \ + -lcompressibleLESModels \ + -llagrangian \ + -llagrangianIntermediate \ + -lspecie \ + -lbasicThermophysicalModels \ + -lliquids \ + -lliquidMixture \ + -lsolids \ + -lsolidMixture \ + -lthermophysicalFunctions \ + -lcombustionThermophysicalModels \ + -lchemistryModel \ + -lradiation \ + -lODE diff --git a/applications/solvers/lagrangian/trackedReactingParcelFoam/UEqn.H b/applications/solvers/lagrangian/trackedReactingParcelFoam/UEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..c82307305b8cba5e0877a7f0a13784ab2f66978b --- /dev/null +++ b/applications/solvers/lagrangian/trackedReactingParcelFoam/UEqn.H @@ -0,0 +1,47 @@ + fvVectorMatrix UEqn + ( + fvm::ddt(rho, U) + + fvm::div(phi, U) + + turbulence->divDevRhoReff(U) + == + rho.dimensionedInternalField()*g + + reactingParcels.SU() + ); + + UEqn.relax(); + + tmp<volScalarField> trAU; + tmp<volTensorField> trTU; + + if (pressureImplicitPorosity) + { + tmp<volTensorField> tTU = tensor(I)*UEqn.A(); + pZones.addResistance(UEqn, tTU()); + trTU = inv(tTU()); + trTU().rename("rAU"); + + volVectorField gradp = fvc::grad(p); + + for (int UCorr=0; UCorr<nUCorr; UCorr++) + { + U = trTU() & (UEqn.H() - gradp); + } + U.correctBoundaryConditions(); + } + else + { + pZones.addResistance(UEqn); + + solve + ( + UEqn == -fvc::grad(p) + ); + + trAU = 1.0/UEqn.A(); + trAU().rename("rAU"); + } + + if (momentumPredictor) + { + solve(UEqn == -fvc::grad(p)); + } diff --git a/applications/solvers/lagrangian/trackedReactingParcelFoam/YEqn.H b/applications/solvers/lagrangian/trackedReactingParcelFoam/YEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..8f77f23bc2f3f3799ed84830c75eab4bbd5b438b --- /dev/null +++ b/applications/solvers/lagrangian/trackedReactingParcelFoam/YEqn.H @@ -0,0 +1,46 @@ + +tmp<fv::convectionScheme<scalar> > mvConvection +( + fv::convectionScheme<scalar>::New + ( + mesh, + fields, + phi, + mesh.divScheme("div(phi,Yi_h)") + ) +); + + +{ + label inertIndex = -1; + volScalarField Yt = 0.0*Y[0]; + + for (label i=0; i<Y.size(); i++) + { + if (Y[i].name() != inertSpecie) + { + volScalarField& Yi = Y[i]; + solve + ( + fvm::ddt(rho, Yi) + + mvConvection->fvmDiv(phi, Yi) + - fvm::laplacian(turbulence->muEff(), Yi) + == + reactingParcels.Srho(i) + + kappa*chemistry.RR(i)().dimensionedInternalField() + + pointMassSources.Su(i) + ); + + Yi.max(0.0); + Yt += Yi; + } + else + { + inertIndex = i; + } + } + + Y[inertIndex] = scalar(1) - Yt; + Y[inertIndex].max(0.0); + +} diff --git a/applications/solvers/lagrangian/trackedReactingParcelFoam/additionalOutput.H b/applications/solvers/lagrangian/trackedReactingParcelFoam/additionalOutput.H new file mode 100644 index 0000000000000000000000000000000000000000..9edd35eb7cab9acd294ba6a9e73b6ee8087b1c0d --- /dev/null +++ b/applications/solvers/lagrangian/trackedReactingParcelFoam/additionalOutput.H @@ -0,0 +1,48 @@ +{ + tmp<volScalarField> tdQ + ( + new volScalarField + ( + IOobject + ( + "dQ", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar + ( + "zero", + dimensionSet(1, -3, -1, 0, 0, 0, 0), + 0.0 + ) + ) + ); + + scalarField& dQ = tdQ(); + + scalarField cp(dQ.size(), 0.0); + + forAll(Y, i) + { + volScalarField RRi = chemistry.RR(i); + + forAll(h, celli) + { + scalar Ti = T[celli]; + cp[celli] += Y[i][celli]*chemistry.specieThermo()[i].Cp(Ti); + scalar hi = chemistry.specieThermo()[i].h(Ti); + scalar RR = RRi[celli]; + dQ[celli] -= hi*RR; + } + } + + forAll(dQ, celli) + { + dQ[celli] /= cp[celli]; + } + + tdQ().write(); +} diff --git a/applications/solvers/lagrangian/trackedReactingParcelFoam/chemistry.H b/applications/solvers/lagrangian/trackedReactingParcelFoam/chemistry.H new file mode 100644 index 0000000000000000000000000000000000000000..07b1e9953b0db867186f6c668d27a9415a26c265 --- /dev/null +++ b/applications/solvers/lagrangian/trackedReactingParcelFoam/chemistry.H @@ -0,0 +1,25 @@ +{ + Info << "Solving chemistry" << endl; + + chemistry.solve + ( + runTime.value() - runTime.deltaT().value(), + runTime.deltaT().value() + ); + + // turbulent time scale + if (turbulentReaction) + { + DimensionedField<scalar, volMesh> tk = + Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()); + DimensionedField<scalar, volMesh> tc = + chemistry.tc()().dimensionedInternalField(); + + // Chalmers PaSR model + kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk); + } + else + { + kappa = 1.0; + } +} diff --git a/applications/solvers/lagrangian/trackedReactingParcelFoam/createClouds.H b/applications/solvers/lagrangian/trackedReactingParcelFoam/createClouds.H new file mode 100644 index 0000000000000000000000000000000000000000..aaf91c81cc6ce8c5ba6248863458b17d98b4fd79 --- /dev/null +++ b/applications/solvers/lagrangian/trackedReactingParcelFoam/createClouds.H @@ -0,0 +1,9 @@ +Info<< "\nConstructing reacting cloud" << endl; +BasicTrackedReactingCloud<specieReactingProperties> reactingParcels +( + "reactingCloud1", + rho, + U, + g, + thermo() +); diff --git a/applications/solvers/lagrangian/trackedReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/trackedReactingParcelFoam/createFields.H new file mode 100644 index 0000000000000000000000000000000000000000..b9cea162f4a863babc5ef3536cf68e2451c84297 --- /dev/null +++ b/applications/solvers/lagrangian/trackedReactingParcelFoam/createFields.H @@ -0,0 +1,111 @@ + Info<< "Reading thermophysical properties" << nl << endl; + + autoPtr<hCombustionThermo> thermo + ( + hCombustionThermo::New(mesh) + ); + + combustionMixture& composition = thermo->composition(); + PtrList<volScalarField>& Y = composition.Y(); + + word inertSpecie(thermo->lookup("inertSpecie")); + + volScalarField& p = thermo->p(); + volScalarField& h = thermo->h(); + const volScalarField& T = thermo->T(); + const volScalarField& psi = thermo->psi(); + + volScalarField rho + ( + IOobject + ( + "rho", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + thermo->rho() + ); + + Info<< "Reading field U" << nl << endl; + volVectorField U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + +# 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" << nl << endl; + autoPtr<compressible::turbulenceModel> turbulence + ( + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo() + ) + ); + + Info<< "Creating field DpDt" << nl << endl; + volScalarField DpDt = + fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); + + Info << "Constructing chemical mechanism" << nl << endl; + chemistryModel chemistry + ( + thermo(), + rho + ); + + multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields; + + forAll (Y, i) + { + fields.add(Y[i]); + } + fields.add(h); + + Info<< "Creating porous zones" << nl << endl; + porousZones pZones(mesh); + Switch pressureImplicitPorosity(false); + + label nUCorr = 0; + if (pZones.size()) + { + // nUCorrectors for pressureImplicitPorosity + if (mesh.solutionDict().subDict("PISO").found("nUCorrectors")) + { + mesh.solutionDict().subDict("PISO").lookup("nUCorrectors") + >> nUCorr; + } + + if (nUCorr > 0) + { + pressureImplicitPorosity = true; + } + } + diff --git a/applications/solvers/lagrangian/trackedReactingParcelFoam/createMulticomponentPointSources.H b/applications/solvers/lagrangian/trackedReactingParcelFoam/createMulticomponentPointSources.H new file mode 100644 index 0000000000000000000000000000000000000000..52de65dc5050296f6aca81542b733afe5252e704 --- /dev/null +++ b/applications/solvers/lagrangian/trackedReactingParcelFoam/createMulticomponentPointSources.H @@ -0,0 +1,8 @@ +Info<< "\nConstructing multi-component mass flow rate point sources" << endl; +timeActivatedExplicitMulticomponentPointSource pointMassSources +( + "pointMassSources", + mesh, + Y, + dimMass/dimVolume/dimTime +); diff --git a/applications/solvers/lagrangian/trackedReactingParcelFoam/hEqn.H b/applications/solvers/lagrangian/trackedReactingParcelFoam/hEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..32e71555369290be7d019af0f4d6ad15473ee064 --- /dev/null +++ b/applications/solvers/lagrangian/trackedReactingParcelFoam/hEqn.H @@ -0,0 +1,20 @@ +{ + fvScalarMatrix hEqn + ( + fvm::ddt(rho, h) + + fvm::div(phi, h) + - fvm::laplacian(turbulence->alphaEff(), h) + == + DpDt + + reactingParcels.Sh() + + radiation->Sh(thermo()) + ); + + hEqn.relax(); + + hEqn.solve(); + + thermo->correct(); + + radiation->correct(); +} diff --git a/applications/solvers/lagrangian/trackedReactingParcelFoam/pEqn.H b/applications/solvers/lagrangian/trackedReactingParcelFoam/pEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..b6207ce0c4df93ff1272e297b0eb5c7553976c1c --- /dev/null +++ b/applications/solvers/lagrangian/trackedReactingParcelFoam/pEqn.H @@ -0,0 +1,110 @@ +rho = thermo->rho(); + +if (pressureImplicitPorosity) +{ + U = trTU()&UEqn.H(); +} +else +{ + U = trAU()*UEqn.H(); +} + +if (transonic) +{ + surfaceScalarField phid + ( + "phid", + fvc::interpolate(thermo->psi()) + *( + (fvc::interpolate(U) & mesh.Sf()) +// + fvc::ddtPhiCorr(rUA, rho, U, phi) + ) + ); + + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + tmp<fvScalarMatrix> lapTerm; + + if (pressureImplicitPorosity) + { + lapTerm = fvm::laplacian(rho*trTU(), p); + } + else + { + lapTerm = fvm::laplacian(rho*trAU(), p); + } + + fvScalarMatrix pEqn + ( + fvm::ddt(psi, p) + + fvm::div(phid, p) + - lapTerm() + == + reactingParcels.Srho() + + pointMassSources.Su() + ); + + pEqn.solve(); + + if (nonOrth == nNonOrthCorr) + { + phi == pEqn.flux(); + } + } +} +else +{ + phi = + fvc::interpolate(rho) + *( + (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(trAU(), rho, U, phi) + ); + + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + tmp<fvScalarMatrix> lapTerm; + + if (pressureImplicitPorosity) + { + lapTerm = fvm::laplacian(rho*trTU(), p); + } + else + { + lapTerm = fvm::laplacian(rho*trAU(), p); + } + + fvScalarMatrix pEqn + ( + fvm::ddt(psi, p) + + fvc::div(phi) + - lapTerm() + == + reactingParcels.Srho() + + pointMassSources.Su() + ); + + pEqn.solve(); + + if (nonOrth == nNonOrthCorr) + { + phi += pEqn.flux(); + } + } +} + +#include "rhoEqn.H" +#include "compressibleContinuityErrs.H" + +if (pressureImplicitPorosity) +{ + U -= trTU()&fvc::grad(p); +} +else +{ + U -= trAU()*fvc::grad(p); +} +U.correctBoundaryConditions(); + +DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); + diff --git a/applications/solvers/lagrangian/trackedReactingParcelFoam/readChemistryProperties.H b/applications/solvers/lagrangian/trackedReactingParcelFoam/readChemistryProperties.H new file mode 100644 index 0000000000000000000000000000000000000000..1a60e6fb34645a004fd39321f7a54d3bd5b45381 --- /dev/null +++ b/applications/solvers/lagrangian/trackedReactingParcelFoam/readChemistryProperties.H @@ -0,0 +1,22 @@ +Info<< "Reading chemistry properties\n" << endl; + +IOdictionary chemistryProperties +( + IOobject + ( + "chemistryProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) +); + +Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction")); + +dimensionedScalar Cmix("Cmix", dimless, 1.0); + +if (turbulentReaction) +{ + chemistryProperties.lookup("Cmix") >> Cmix; +} diff --git a/applications/solvers/lagrangian/trackedReactingParcelFoam/rhoEqn.H b/applications/solvers/lagrangian/trackedReactingParcelFoam/rhoEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..faadc1ecfbb1c8347bc8e6b1b6102f1a0ab911c4 --- /dev/null +++ b/applications/solvers/lagrangian/trackedReactingParcelFoam/rhoEqn.H @@ -0,0 +1,44 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2007 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 + +Global + rhoEqn + +Description + Solve the continuity for density. + +\*---------------------------------------------------------------------------*/ + +{ + solve + ( + fvm::ddt(rho) + + fvc::div(phi) + == + reactingParcels.Srho() + + pointMassSources.Su() + ); +} + +// ************************************************************************* // diff --git a/applications/solvers/lagrangian/trackedReactingParcelFoam/trackedReactingParcelFoam.C b/applications/solvers/lagrangian/trackedReactingParcelFoam/trackedReactingParcelFoam.C new file mode 100644 index 0000000000000000000000000000000000000000..62af964eba7dad29b1c2517c025d02af76df1c38 --- /dev/null +++ b/applications/solvers/lagrangian/trackedReactingParcelFoam/trackedReactingParcelFoam.C @@ -0,0 +1,121 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +Application + +Description + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "hCombustionThermo.H" +#include "turbulenceModel.H" +#include "BasicTrackedReactingCloud.H" +#include "chemistryModel.H" +#include "chemistrySolver.H" +#include "reactingThermoTypes.H" +#include "radiationModel.H" +#include "porousZones.H" +#include "timeActivatedExplicitMulticomponentPointSource.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + + #include "createTime.H" + #include "createMesh.H" + #include "readChemistryProperties.H" + #include "readEnvironmentalProperties.H" + #include "createFields.H" + #include "createRadiationModel.H" + #include "createClouds.H" + #include "createMulticomponentPointSources.H" + #include "readPISOControls.H" + #include "initContinuityErrs.H" + #include "readTimeControls.H" + #include "compressibleCourantNo.H" + #include "setInitialDeltaT.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.run()) + { + #include "readTimeControls.H" + #include "readPISOControls.H" + #include "compressibleCourantNo.H" + #include "setDeltaT.H" + + runTime++; + + Info<< "Time = " << runTime.timeName() << nl << endl; + + reactingParcels.evolve(); + + reactingParcels.info(); + + #include "chemistry.H" + #include "rhoEqn.H" + + // --- PIMPLE loop + for (int ocorr=1; ocorr<=nOuterCorr; ocorr++) + { + #include "UEqn.H" + #include "YEqn.H" + + // --- PISO loop + for (int corr=1; corr<=nCorr; corr++) + { + #include "hEqn.H" + #include "pEqn.H" + } + + Info<< "T gas min/max = " << min(T).value() << ", " + << max(T).value() << endl; + } + + turbulence->correct(); + + rho = thermo->rho(); + + if (runTime.write()) + { + #include "additionalOutput.H" + } + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + } + + Info<< "End\n" << endl; + + return(0); +} + + +// ************************************************************************* // diff --git a/applications/solvers/Lagrangian/uncoupledKinematicParcelFoam/Make/files b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/files similarity index 100% rename from applications/solvers/Lagrangian/uncoupledKinematicParcelFoam/Make/files rename to applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/files diff --git a/applications/solvers/Lagrangian/uncoupledKinematicParcelFoam/Make/options b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options similarity index 100% rename from applications/solvers/Lagrangian/uncoupledKinematicParcelFoam/Make/options rename to applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options diff --git a/applications/solvers/Lagrangian/uncoupledKinematicParcelFoam/createFields.H b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H similarity index 100% rename from applications/solvers/Lagrangian/uncoupledKinematicParcelFoam/createFields.H rename to applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H diff --git a/applications/solvers/Lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C similarity index 97% rename from applications/solvers/Lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C rename to applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C index 786146219b622aa7a8b7ec6625080ec6f148f22c..e4c2b396652630423cc6ed925e55a61b0203ce03 100644 --- a/applications/solvers/Lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C index 64452a05f70c00bffbfc7ab792e545a4cda369a7..90a597e57888a3e2155b7deba0efb09e90f04a12 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C @@ -178,7 +178,6 @@ void writeAllDataBinary } - template<class Type> void writeAllFaceData ( @@ -275,7 +274,7 @@ template<class Type> bool writePatchField ( const Foam::Field<Type>& pf, - const Foam::label patchI, + const Foam::label patchi, const Foam::label ensightPatchI, const Foam::faceSets& boundaryFaceSet, const Foam::ensightMesh::nFacePrimitives& nfp, @@ -335,7 +334,7 @@ template<class Type> bool writePatchFieldBinary ( const Foam::Field<Type>& pf, - const Foam::label patchI, + const Foam::label patchi, const Foam::label ensightPatchI, const Foam::faceSets& boundaryFaceSet, const Foam::ensightMesh::nFacePrimitives& nfp, @@ -406,34 +405,27 @@ void writePatchField const Time& runTime = eMesh.mesh().time(); const List<faceSets>& boundaryFaceSets = eMesh.boundaryFaceSets(); - const HashTable<labelList>& allPatchNames = eMesh.allPatchNames(); - const HashTable<label>& patchIndices = eMesh.patchIndices(); + const wordList& allPatchNames = eMesh.allPatchNames(); + const List<labelList>& allPatchProcs = eMesh.allPatchProcs(); const HashTable<ensightMesh::nFacePrimitives>& nPatchPrims = eMesh.nPatchPrims(); - label patchI = -1; - - if (patchIndices.found(patchName)) - { - patchI = patchIndices.find(patchName)(); - } - label ensightPatchI = eMesh.patchPartOffset(); - for - ( - HashTable<labelList>::const_iterator iter = - allPatchNames.begin(); - iter != allPatchNames.end(); - ++iter - ) + label patchi = -1; + + forAll(allPatchNames, i) { - if (iter.key() == patchName) break; + if (allPatchNames[i] == patchName) + { + patchi = i; + break; + } ensightPatchI++; } - const labelList& patchProcessors = allPatchNames.find(patchName)(); + const labelList& patchProcessors = allPatchProcs[patchi]; word pfName = patchName + '.' + fieldName; @@ -472,14 +464,14 @@ void writePatchField ensightFile << pTraits<Type>::typeName << nl; } - if (patchI >= 0) + if (patchi >= 0) { writePatchField ( pf, - patchI, + patchi, ensightPatchI, - boundaryFaceSets[patchI], + boundaryFaceSets[patchi], nPatchPrims.find(patchName)(), patchProcessors, ensightFile @@ -507,6 +499,7 @@ void writePatchField } } + template<class Type> void ensightFieldAscii ( @@ -527,8 +520,8 @@ void ensightFieldAscii const cellSets& meshCellSets = eMesh.meshCellSets(); const List<faceSets>& boundaryFaceSets = eMesh.boundaryFaceSets(); - const HashTable<labelList>& allPatchNames = eMesh.allPatchNames(); - const HashTable<label>& patchIndices = eMesh.patchIndices(); + const wordList& allPatchNames = eMesh.allPatchNames(); + const List<labelList>& allPatchProcs = eMesh.allPatchProcs(); const wordHashSet& patchNames = eMesh.patchNames(); const HashTable<ensightMesh::nFacePrimitives>& nPatchPrims = eMesh.nPatchPrims(); @@ -623,30 +616,23 @@ void ensightFieldAscii label ensightPatchI = eMesh.patchPartOffset(); - for - ( - HashTable<labelList>::const_iterator iter = allPatchNames.begin(); - iter != allPatchNames.end(); - ++iter - ) + forAll(allPatchNames, patchi) { - const word& patchName = iter.key(); - const labelList& patchProcessors = iter(); + const word& patchName = allPatchNames[patchi]; + const labelList& patchProcessors = allPatchProcs[patchi]; if (patchNames.empty() || patchNames.found(patchName)) { - if (patchIndices.found(patchName)) + if (mesh.boundary()[patchi].size()) { - label patchI = patchIndices.find(patchName)(); - if ( writePatchField ( - vf.boundaryField()[patchI], - patchI, + vf.boundaryField()[patchi], + patchi, ensightPatchI, - boundaryFaceSets[patchI], + boundaryFaceSets[patchi], nPatchPrims.find(patchName)(), patchProcessors, ensightFile @@ -708,8 +694,8 @@ void ensightFieldBinary const cellSets& meshCellSets = eMesh.meshCellSets(); const List<faceSets>& boundaryFaceSets = eMesh.boundaryFaceSets(); - const HashTable<labelList>& allPatchNames = eMesh.allPatchNames(); - const HashTable<label>& patchIndices = eMesh.patchIndices(); + const wordList& allPatchNames = eMesh.allPatchNames(); + const List<labelList>& allPatchProcs = eMesh.allPatchProcs(); const wordHashSet& patchNames = eMesh.patchNames(); const HashTable<ensightMesh::nFacePrimitives>& nPatchPrims = eMesh.nPatchPrims(); @@ -726,7 +712,11 @@ void ensightFieldBinary { // set the filename of the ensight file fileName ensightFileName(timeFile + "." + fieldObject.name()); - ensightFilePtr = new std::ofstream((postProcPath/ensightFileName).c_str(), ios_base::out | ios_base::binary | ios_base::trunc); + ensightFilePtr = new std::ofstream + ( + (postProcPath/ensightFileName).c_str(), + ios_base::out | ios_base::binary | ios_base::trunc + ); // Check on file opened? } @@ -787,38 +777,62 @@ void ensightFieldBinary } } - writeAllDataBinary("penta6", vf, prisms, meshCellSets.nPrisms, ensightFile); - writeAllDataBinary("pyramid5", vf, pyrs, meshCellSets.nPyrs, ensightFile); - writeAllDataBinary("tetra4", vf, tets, meshCellSets.nTets, ensightFile); - writeAllDataBinary("nfaced", vf, polys, meshCellSets.nPolys, ensightFile); + writeAllDataBinary + ( + "penta6", + vf, + prisms, + meshCellSets.nPrisms, + ensightFile + ); + + writeAllDataBinary + ( + "pyramid5", + vf, + pyrs, + meshCellSets.nPyrs, + ensightFile + ); + + writeAllDataBinary + ( + "tetra4", + vf, + tets, + meshCellSets.nTets, + ensightFile + ); + + writeAllDataBinary + ( + "nfaced", + vf, + polys, + meshCellSets.nPolys, + ensightFile + ); } label ensightPatchI = eMesh.patchPartOffset(); - for - ( - HashTable<labelList>::const_iterator iter = allPatchNames.begin(); - iter != allPatchNames.end(); - ++iter - ) + forAll(allPatchNames, patchi) { - const word& patchName = iter.key(); - const labelList& patchProcessors = iter(); + const word& patchName = allPatchNames[patchi]; + const labelList& patchProcessors = allPatchProcs[patchi]; if (patchNames.empty() || patchNames.found(patchName)) { - if (patchIndices.found(patchName)) + if (mesh.boundary()[patchi].size()) { - label patchI = patchIndices.find(patchName)(); - if ( writePatchFieldBinary ( - vf.boundaryField()[patchI], - patchI, + vf.boundaryField()[patchi], + patchi, ensightPatchI, - boundaryFaceSets[patchI], + boundaryFaceSets[patchi], nPatchPrims.find(patchName)(), patchProcessors, ensightFile @@ -859,6 +873,7 @@ void ensightFieldBinary } } + template<class Type> void ensightField ( diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C index 079145a0c567597811b54295430bf454d350c24e..c3262e6b9c4d3d98e1eacb8d5f50af6cb45fedb9 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C @@ -28,6 +28,7 @@ License #include "Time.H" #include "ensightMesh.H" #include "fvMesh.H" +#include "globalMeshData.H" #include "PstreamCombineReduceOps.H" #include "processorPolyPatch.H" #include "cellModeller.H" @@ -40,43 +41,37 @@ License namespace Foam { + //- Proxy-class to hold the patch processor list combination operator + class concatPatchProcs + { -class concatPatchNames -{ - -public: + public: - void operator() - ( - HashTable<labelList>& x, - const HashTable<labelList>& y - ) const - { - forAllConstIter(HashTable<labelList>, y, iter) + void operator() + ( + List<labelList>& x, + const List<labelList>& y + ) const { - HashTable<labelList>::iterator xiter = x.find(iter.key()); - - if (xiter == x.end()) - { - x.insert(iter.key(), iter()); - } - else + forAll(y, i) { - labelList& xPatches = xiter(); - const labelList& yPatches = iter(); - - label offset = xPatches.size(); - xPatches.setSize(offset + yPatches.size()); + const labelList& yPatches = y[i]; - forAll(yPatches, i) + if (yPatches.size()) { - xPatches[i + offset] = yPatches[i]; + labelList& xPatches = x[i]; + + label offset = xPatches.size(); + xPatches.setSize(offset + yPatches.size()); + + forAll(yPatches, i) + { + xPatches[i + offset] = yPatches[i]; + } } } } - } -}; - + }; } // End namespace Foam @@ -95,7 +90,7 @@ Foam::ensightMesh::ensightMesh meshCellSets_(mesh_.nCells()), boundaryFaceSets_(mesh_.boundary().size()), allPatchNames_(0), - patchIndices_(0), + allPatchProcs_(0), patchNames_(0), nPatchPrims_(0) { @@ -109,32 +104,24 @@ Foam::ensightMesh::ensightMesh if (!args.optionFound("noPatches")) { - forAll (mesh_.boundaryMesh(), patchI) + allPatchNames_ = wordList::subList + ( + mesh_.boundaryMesh().names(), mesh_.boundary().size() + - mesh_.globalData().processorPatches().size() + ); + + allPatchProcs_.setSize(allPatchNames_.size()); + + forAll (allPatchProcs_, patchi) { - if - ( - typeid(mesh_.boundaryMesh()[patchI]) - != typeid(processorPolyPatch) - ) + if (mesh_.boundary()[patchi].size()) { - if (!allPatchNames_.found(mesh_.boundaryMesh()[patchI].name())) - { - allPatchNames_.insert - ( - mesh_.boundaryMesh()[patchI].name(), - labelList(1, Pstream::myProcNo()) - ); - - patchIndices_.insert - ( - mesh_.boundaryMesh()[patchI].name(), - patchI - ); - } + allPatchProcs_[patchi].setSize(1); + allPatchProcs_[patchi][0] = Pstream::myProcNo(); } } - combineReduce(allPatchNames_, concatPatchNames()); + combineReduce(allPatchProcs_, concatPatchProcs()); if (args.optionFound("patches")) { @@ -142,7 +129,7 @@ Foam::ensightMesh::ensightMesh if (patchNameList.empty()) { - patchNameList = allPatchNames_.toc(); + patchNameList = allPatchNames_; } forAll (patchNameList, i) @@ -230,15 +217,15 @@ Foam::ensightMesh::ensightMesh if (!args.optionFound("noPatches")) { - forAll (mesh.boundary(), patchI) + forAll (mesh.boundary(), patchi) { - if (mesh.boundary()[patchI].size()) + if (mesh.boundary()[patchi].size()) { - const polyPatch& p = mesh.boundaryMesh()[patchI]; + const polyPatch& p = mesh.boundaryMesh()[patchi]; - labelList& tris = boundaryFaceSets_[patchI].tris; - labelList& quads = boundaryFaceSets_[patchI].quads; - labelList& polys = boundaryFaceSets_[patchI].polys; + labelList& tris = boundaryFaceSets_[patchi].tris; + labelList& quads = boundaryFaceSets_[patchi].quads; + labelList& polys = boundaryFaceSets_[patchi].polys; tris.setSize(p.size()); quads.setSize(p.size()); @@ -274,21 +261,19 @@ Foam::ensightMesh::ensightMesh } - forAllConstIter(HashTable<labelList>, allPatchNames_, iter) + forAll(allPatchNames_, patchi) { - const word& patchName = iter.key(); + const word& patchName = allPatchNames_[patchi]; nFacePrimitives nfp; if (patchNames_.empty() || patchNames_.found(patchName)) { - if (patchIndices_.found(patchName)) + if (mesh.boundary()[patchi].size()) { - label patchI = patchIndices_.find(patchName)(); - - nfp.nPoints = mesh.boundaryMesh()[patchI].localPoints().size(); - nfp.nTris = boundaryFaceSets_[patchI].tris.size(); - nfp.nQuads = boundaryFaceSets_[patchI].quads.size(); - nfp.nPolys = boundaryFaceSets_[patchI].polys.size(); + nfp.nPoints = mesh.boundaryMesh()[patchi].localPoints().size(); + nfp.nTris = boundaryFaceSets_[patchi].tris.size(); + nfp.nQuads = boundaryFaceSets_[patchi].quads.size(); + nfp.nPolys = boundaryFaceSets_[patchi].polys.size(); } } @@ -1052,13 +1037,13 @@ void Foam::ensightMesh::writeAscii label ensightPatchI = patchPartOffset_; - forAllConstIter(HashTable<labelList>, allPatchNames_, iter) + forAll(allPatchNames_, patchi) { - const labelList& patchProcessors = iter(); + const word& patchName = allPatchNames_[patchi]; + const labelList& patchProcessors = allPatchProcs_[patchi]; - if (patchNames_.empty() || patchNames_.found(iter.key())) + if (patchNames_.empty() || patchNames_.found(patchName)) { - const word& patchName = iter.key(); const nFacePrimitives& nfp = nPatchPrims_.find(patchName)(); const labelList *trisPtr = NULL; @@ -1068,14 +1053,13 @@ void Foam::ensightMesh::writeAscii const pointField *patchPointsPtr = NULL; const faceList *patchFacesPtr = NULL; - if (patchIndices_.found(iter.key())) + if (mesh_.boundary()[patchi].size()) { - label patchI = patchIndices_.find(iter.key())(); - const polyPatch& p = mesh_.boundaryMesh()[patchI]; + const polyPatch& p = mesh_.boundaryMesh()[patchi]; - trisPtr = &boundaryFaceSets_[patchI].tris; - quadsPtr = &boundaryFaceSets_[patchI].quads; - polysPtr = &boundaryFaceSets_[patchI].polys; + trisPtr = &boundaryFaceSets_[patchi].tris; + quadsPtr = &boundaryFaceSets_[patchi].quads; + polysPtr = &boundaryFaceSets_[patchi].polys; patchPointsPtr = &(p.localPoints()); patchFacesPtr = &(p.localFaces()); @@ -1265,7 +1249,7 @@ void Foam::ensightMesh::writeBinary { writeEnsDataBinary("part",ensightGeometryFile); writeEnsDataBinary(1,ensightGeometryFile); - writeEnsDataBinary("FOAM cells",ensightGeometryFile); + writeEnsDataBinary("internalMesh",ensightGeometryFile); writeEnsDataBinary("coordinates",ensightGeometryFile); writeEnsDataBinary(nPoints,ensightGeometryFile); @@ -1379,14 +1363,14 @@ void Foam::ensightMesh::writeBinary label ensightPatchI = patchPartOffset_; label iCount = 0; - forAllConstIter(HashTable<labelList>, allPatchNames_, iter) + forAll(allPatchNames_, patchi) { iCount ++; - const labelList& patchProcessors = iter(); + const word& patchName = allPatchNames_[patchi]; + const labelList& patchProcessors = allPatchProcs_[patchi]; - if (patchNames_.empty() || patchNames_.found(iter.key())) + if (patchNames_.empty() || patchNames_.found(patchName)) { - const word& patchName = iter.key(); const nFacePrimitives& nfp = nPatchPrims_.find(patchName)(); const labelList *trisPtr = NULL; @@ -1396,14 +1380,13 @@ void Foam::ensightMesh::writeBinary const pointField *patchPointsPtr = NULL; const faceList *patchFacesPtr = NULL; - if (patchIndices_.found(iter.key())) + if (mesh_.boundary()[patchi].size()) { - label patchI = patchIndices_.find(iter.key())(); - const polyPatch& p = mesh_.boundaryMesh()[patchI]; + const polyPatch& p = mesh_.boundaryMesh()[patchi]; - trisPtr = &boundaryFaceSets_[patchI].tris; - quadsPtr = &boundaryFaceSets_[patchI].quads; - polysPtr = &boundaryFaceSets_[patchI].polys; + trisPtr = &boundaryFaceSets_[patchi].tris; + quadsPtr = &boundaryFaceSets_[patchi].quads; + polysPtr = &boundaryFaceSets_[patchi].polys; patchPointsPtr = &(p.localPoints()); patchFacesPtr = &(p.localFaces()); @@ -1424,7 +1407,7 @@ void Foam::ensightMesh::writeBinary writeEnsDataBinary("part",ensightGeometryFile); writeEnsDataBinary(ensightPatchI++,ensightGeometryFile); //writeEnsDataBinary(patchName.c_str(),ensightGeometryFile); - writeEnsDataBinary(iter.key().c_str(),ensightGeometryFile); + writeEnsDataBinary(patchName.c_str(),ensightGeometryFile); writeEnsDataBinary("coordinates",ensightGeometryFile); writeEnsDataBinary(nfp.nPoints,ensightGeometryFile); diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.H index 6a3cb824708bb7a3e7543f327acc69fc2c918379..4ddb084d3d054c34961fb8e1d4c3a5a3bcb3db52 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.H @@ -91,9 +91,9 @@ class ensightMesh List<faceSets> boundaryFaceSets_; - HashTable<labelList> allPatchNames_; + wordList allPatchNames_; - HashTable<label> patchIndices_; + List<labelList> allPatchProcs_; wordHashSet patchNames_; @@ -269,14 +269,14 @@ public: return boundaryFaceSets_; } - const HashTable<labelList>& allPatchNames() const + const wordList& allPatchNames() const { return allPatchNames_; } - const HashTable<label>& patchIndices() const + const List<labelList>& allPatchProcs() const { - return patchIndices_; + return allPatchProcs_; } const wordHashSet& patchNames() const diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C index 9bce0df59f259b5849ab9209e2ef6a94c78c264b..74ac3c5676bbeac0ae3b6da5d57348f6ff7d83a3 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C @@ -90,6 +90,9 @@ Usage The quoting is required to avoid shell expansions and to pass the information as a single argument. + @param -useTimeName \n + use the time index in the VTK file name instead of the time index + Note mesh subset is handled by vtkMesh. Slight inconsistency in interpolation: on the internal field it interpolates the whole volfield @@ -242,6 +245,7 @@ int main(int argc, char *argv[]) argList::validOptions.insert("excludePatches","patches to exclude"); argList::validOptions.insert("noFaceZones",""); argList::validOptions.insert("noLinks",""); + argList::validOptions.insert("useTimeName",""); # include "setRootCase.H" # include "createTime.H" @@ -250,6 +254,7 @@ int main(int argc, char *argv[]) bool doFaceZones = !args.optionFound("noFaceZones"); bool doLinks = !args.optionFound("noLinks"); bool binary = !args.optionFound("ascii"); + bool useTimeName = args.optionFound("useTimeName"); if (binary && (sizeof(floatScalar) != 4 || sizeof(label) != 4)) { @@ -359,6 +364,16 @@ int main(int argc, char *argv[]) Info<< "Time: " << runTime.timeName() << endl; + word timeDesc = ""; + if (useTimeName) + { + timeDesc = runTime.timeName(); + } + else + { + timeDesc = name(runTime.timeIndex()); + } + // Check for new polyMesh/ and update mesh, fvMeshSubset and cell // decomposition. polyMesh::readUpdateState meshState = vMesh.readUpdate(); @@ -388,7 +403,7 @@ int main(int argc, char *argv[]) ( fvPath/set.name()/set.name() + "_" - + name(timeI) + + timeDesc + ".vtk" ); @@ -411,7 +426,7 @@ int main(int argc, char *argv[]) ( fvPath/set.name()/set.name() + "_" - + name(timeI) + + timeDesc + ".vtk" ); @@ -548,7 +563,7 @@ int main(int argc, char *argv[]) ( fvPath/vtkName + "_" - + name(timeI) + + timeDesc + ".vtk" ); @@ -654,8 +669,8 @@ int main(int argc, char *argv[]) fvPath /"surfaceFields" /"surfaceFields" - + "_" - + name(timeI) + + "_" + + timeDesc + ".vtk" ); @@ -689,7 +704,7 @@ int main(int argc, char *argv[]) patchFileName = fvPath/"allPatches"/cellSetName + "_" - + name(timeI) + + timeDesc + ".vtk"; } else @@ -697,7 +712,7 @@ int main(int argc, char *argv[]) patchFileName = fvPath/"allPatches"/"allPatches" + "_" - + name(timeI) + + timeDesc + ".vtk"; } @@ -767,7 +782,7 @@ int main(int argc, char *argv[]) patchFileName = fvPath/pp.name()/cellSetName + "_" - + name(timeI) + + timeDesc + ".vtk"; } else @@ -775,7 +790,7 @@ int main(int argc, char *argv[]) patchFileName = fvPath/pp.name()/pp.name() + "_" - + name(timeI) + + timeDesc + ".vtk"; } @@ -867,7 +882,7 @@ int main(int argc, char *argv[]) patchFileName = fvPath/pp.name()/cellSetName + "_" - + name(timeI) + + timeDesc + ".vtk"; } else @@ -875,7 +890,7 @@ int main(int argc, char *argv[]) patchFileName = fvPath/pp.name()/pp.name() + "_" - + name(timeI) + + timeDesc + ".vtk"; } @@ -931,7 +946,7 @@ int main(int argc, char *argv[]) fileName lagrFileName ( fvPath/cloud::prefix/cloudDirs[i]/cloudDirs[i] - + "_" + name(timeI) + ".vtk" + + "_" + timeDesc + ".vtk" ); Info<< " Lagrangian: " << lagrFileName << endl; diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/Make/files b/applications/utilities/postProcessing/lagrangian/particleTracks/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..316b0f6ade74d966f2dd2aa14124e4701c2ec5dc --- /dev/null +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/Make/files @@ -0,0 +1,3 @@ +particleTracks.C + +EXE = $(FOAM_APPBIN)/particleTracks diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/Make/options b/applications/utilities/postProcessing/lagrangian/particleTracks/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..1adeeefa12999bb91513d9e0b16a0a52a9fc15d2 --- /dev/null +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/lagrangian/basic/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -llagrangian diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H b/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H new file mode 100644 index 0000000000000000000000000000000000000000..aef0139de1db22ae157c16f641ec0b2e54947d47 --- /dev/null +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H @@ -0,0 +1,22 @@ +IOdictionary propsDict +( + IOobject + ( + "particleTrackProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ + ) +); + +word cloudName(propsDict.lookup("cloudName")); + +label sampleFrequency(readLabel(propsDict.lookup("sampleFrequency"))); + +// outputMode: compositeFile, filePerTrack +//word outputmode(propsDict.lookup("outputMode")) + +label maxPositions(readLabel(propsDict.lookup("maxPositions"))); + +// outputFormat: raw, vtk +//word outputFormat(propsDict.lookup("outputFormat")); diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C new file mode 100644 index 0000000000000000000000000000000000000000..0555309348f58078907baaa15c99b606ae7e8861 --- /dev/null +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C @@ -0,0 +1,270 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +Application + particleTracks + +Description + Generates a VTK file of particle tracks for cases that were computed using + a tracked-parcel-type cloud + +\*---------------------------------------------------------------------------*/ + +#include "argList.H" +#include "Cloud.H" +#include "IOdictionary.H" +#include "fvMesh.H" +#include "Time.H" +#include "timeSelector.H" +#include "OFstream.H" +#include "passiveParticle.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ +# include "setRootCase.H" + +# include "createTime.H" + instantList timeDirs = timeSelector::select0(runTime, args); +# include "createMesh.H" +# include "createFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "Scanning times to determine track data" << nl << endl; + + labelList maxIds(Pstream::nProcs(), -1); + forAll(timeDirs, timeI) + { + runTime.setTime(timeDirs[timeI], timeI); + Info<< "Time = " << runTime.timeName() << endl; + + IOobject origProcHeader + ( + "origProc", + runTime.timeName(), + cloud::prefix/cloudName, + mesh, + IOobject::MUST_READ + ); + IOobject idHeader + ( + "id", + runTime.timeName(), + cloud::prefix/cloudName, + mesh, + IOobject::MUST_READ + ); + if (idHeader.headerOk() && origProcHeader.headerOk()) + { + IOField<label> origProc(origProcHeader); + IOField<label> id(idHeader); + forAll(id, i) + { + maxIds[origProc[i]] = max(maxIds[origProc[i]], id[i]); + } + } + } + Pstream::listCombineGather(maxIds, maxOp<label>()); + Pstream::listCombineScatter(maxIds); + labelList numIds = maxIds + 1; + + // calc starting ids for particles on each processor + List<label> startIds(numIds.size(), 0); + for (label i = 0; i < numIds.size()-1; i++) + { + startIds[i+1] += startIds[i] + numIds[i]; + } + label nParticle = startIds[startIds.size()-1] + numIds[startIds.size()-1]; + + // number of tracks to generate + label nTracks = nParticle/sampleFrequency; + + // storage for all particle tracks + List<DynamicList<vector> > allTracks(nTracks); + + Info<< "\nGenerating " << nTracks << " particle tracks" << nl << endl; + forAll(timeDirs, timeI) + { + runTime.setTime(timeDirs[timeI], timeI); + Info<< "Time = " << runTime.timeName() << endl; + + IOobject positionsHeader + ( + "positions", + runTime.timeName(), + cloud::prefix/cloudName, + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ); + + IOobject origProcHeader + ( + "origProc", + runTime.timeName(), + cloud::prefix/cloudName, + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ); + + IOobject idHeader + ( + "id", + runTime.timeName(), + cloud::prefix/cloudName, + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ); + + if + ( + positionsHeader.headerOk() + && origProcHeader.headerOk() + && idHeader.headerOk() + ) + { + Info<< " Reading particle positions" << endl; + Cloud<passiveParticle> myCloud(mesh, cloudName, false); + + Info<< " Reading particle id" << endl; + IOField<label> id(idHeader); + + Info<< " Reading particle origProc" << endl; + IOField<label> origProc(origProcHeader); + + // collect the track data on the master processor + label i = 0; + List<pointField> allPositions(Pstream::nProcs()); + allPositions[Pstream::myProcNo()].setSize(myCloud.size()); + forAllConstIter(Cloud<passiveParticle>, myCloud, iter) + { + allPositions[Pstream::myProcNo()][i++] = iter().position(); + } + Pstream::gatherList(allPositions); + + List<labelList> allIds(Pstream::nProcs()); + allIds[Pstream::myProcNo()] = id; + Pstream::gatherList(allIds); + + List<labelList> allOrigProcs(Pstream::nProcs()); + allOrigProcs[Pstream::myProcNo()] = origProc; + Pstream::gatherList(allOrigProcs); + + Info<< " Constructing tracks" << nl << endl; + if (Pstream::master()) + { + forAll(allPositions, procI) + { + forAll(allPositions[procI], i) + { + label globalId = + startIds[allOrigProcs[procI][i]] + + allIds[procI][i]; + + if (globalId % sampleFrequency == 0) + { + label trackId = globalId/sampleFrequency; + if (allTracks[trackId].size() < maxPositions) + { + allTracks[trackId].append + ( + allPositions[procI][i] + ); + } + } + } + } + } + } + else + { + Info<< " No particles read" << nl << endl; + } + } + + if (Pstream::master()) + { + Info<< "\nWriting particle tracks" << nl << endl; + + OFstream vtkTracks("particleTracks.vtk"); + + // Total number of points in tracks + 1 per track + label nPoints = 0; + forAll(allTracks, trackI) + { + nPoints += allTracks[trackI].size(); + } + + vtkTracks + << "# vtk DataFile Version 2.0" << nl + << "particleTracks" << nl + << "ASCII" << nl + << "DATASET POLYDATA" << nl + << "POINTS " << nPoints << " float" << nl; + + // Write track points to file + forAll(allTracks, trackI) + { + forAll(allTracks[trackI], i) + { + const vector& pt = allTracks[trackI][i]; + vtkTracks << pt.x() << ' ' << pt.y() << ' ' << pt.z() << nl; + } + } + + // write track (line) connectivity to file + vtkTracks << "LINES " << nTracks << ' ' << nPoints+nTracks << nl; + + // Write ids of track points to file + label globalPtI = 0; + forAll(allTracks, trackI) + { + vtkTracks << allTracks[trackI].size(); + + forAll(allTracks[trackI], i) + { + vtkTracks << ' ' << globalPtI; + globalPtI++; + } + + vtkTracks << nl; + } + + Info<< "end" << endl; + } + + return 0; +} + + +// ************************************************************************* // diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index c99ee23fa5105c25076fc4bb5b73769c74751864..c3902bc9c5ea2215ee7d4d58d3f7a3870d35a573 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -72,6 +72,7 @@ primitiveLists = primitives/Lists $(primitiveLists)/boolList.C $(primitiveLists)/labelIOList.C $(primitiveLists)/scalarList.C +$(primitiveLists)/scalarIOList.C $(primitiveLists)/vectorList.C $(primitiveLists)/sphericalTensorList.C $(primitiveLists)/symmTensorList.C diff --git a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C index 8fcc3bd982ece6f33764891971d3d4e67bbc5cfe..fcb2fbdebe9e84708f5bb6a71d4538db4738a1dc 100644 --- a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C +++ b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C @@ -63,6 +63,21 @@ Foam::IOPtrList<T>::IOPtrList(const IOobject& io) } +template<class T> +Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const label s) +: + regIOobject(io), + PtrList<T>(s) +{ + if (io.readOpt() != IOobject::NO_READ) + { + FatalErrorIn("IOPtrList<T>::IOPtrList(const IOobject&, const label)") + << "NO_READ must be set if specifying size" << nl + << exit(FatalError); + } +} + + template<class T> Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const PtrList<T>& list) : diff --git a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.H b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.H index 9a2e8ce5afe2ad9462d45ac02dd911a84d2728fa..bc2232056f4aed9f7518674b11db746c7f2b5429 100644 --- a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.H +++ b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.H @@ -70,6 +70,9 @@ public: //- Construct from IOobject IOPtrList(const IOobject&); + //- Construct from IOobject with given size + IOPtrList(const IOobject&, const label); + //- Construct from IOobject and a PtrList IOPtrList(const IOobject&, const PtrList<T>&); diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelCompositionModels.C b/src/OpenFOAM/primitives/Lists/scalarIOList.C similarity index 81% rename from src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelCompositionModels.C rename to src/OpenFOAM/primitives/Lists/scalarIOList.C index 7010ab4f2cd60f267c18f9181262d873ce58453f..2d30cd4c25eeb989d22db756fad9496b7424e0b7 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelCompositionModels.C +++ b/src/OpenFOAM/primitives/Lists/scalarIOList.C @@ -22,27 +22,25 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -\*---------------------------------------------------------------------------*/ +Description + Declaration of scalar IOList containers -#include "basicReactingParcel.H" -#include "ReactingCloud.H" +\*---------------------------------------------------------------------------*/ -#include "SinglePhaseMixture.H" +#include "scalarIOList.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - makeCompositionModel(ReactingCloud<basicReactingParcel>); - - // Add instances of composition model to the table - makeCompositionModelType + defineTemplateTypeNameAndDebugWithName(scalarIOList, "scalarList", 0); + defineTemplateTypeNameAndDebugWithName ( - SinglePhaseMixture, - ReactingCloud, - basicReactingParcel + scalarListIOList, + "scalarListList", + 0 ); -}; - +} // ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelDragModels.C b/src/OpenFOAM/primitives/Lists/scalarIOList.H similarity index 79% rename from src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelDragModels.C rename to src/OpenFOAM/primitives/Lists/scalarIOList.H index 6b10e4efb0356ff4e8e1d200e26f760efcbbf95e..5c91ea000f60061cfc289c0bc62713fcb0e7800d 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelDragModels.C +++ b/src/OpenFOAM/primitives/Lists/scalarIOList.H @@ -22,24 +22,30 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +Typedef + Foam::scalarIOList + +Description + Scalar container classes + \*---------------------------------------------------------------------------*/ -#include "basicKinematicParcel.H" -#include "KinematicCloud.H" +#ifndef scalarIOList_H +#define scalarIOList_H -#include "NoDrag.H" -#include "SphereDrag.H" +#include "scalarList.H" +#include "IOList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - makeDragModel(KinematicCloud<basicKinematicParcel>); + typedef IOList<scalar> scalarIOList; + typedef IOList<scalarList> scalarListIOList; +} - // Add instances of drag model to the table - makeDragModelType(NoDrag, KinematicCloud, basicKinematicParcel); - makeDragModelType(SphereDrag, KinematicCloud, basicKinematicParcel); -}; +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#endif // ************************************************************************* // diff --git a/src/autoMesh/autoHexMesh/trackedParticle/trackedParticle.C b/src/autoMesh/autoHexMesh/trackedParticle/trackedParticle.C index 4f847636b59daa3216e056da4a544b4501df55b3..761ca5b44718a454bef04a01da36cf1376c43283 100644 --- a/src/autoMesh/autoHexMesh/trackedParticle/trackedParticle.C +++ b/src/autoMesh/autoHexMesh/trackedParticle/trackedParticle.C @@ -115,6 +115,28 @@ bool Foam::trackedParticle::move(trackedParticle::trackData& td) } +bool Foam::trackedParticle::hitPatch +( + const polyPatch&, + trackedParticle::trackData& td, + const label patchI +) +{ + return false; +} + + +bool Foam::trackedParticle::hitPatch +( + const polyPatch&, + int&, + const label +) +{ + return false; +} + + void Foam::trackedParticle::hitWedgePatch ( const wedgePolyPatch&, diff --git a/src/autoMesh/autoHexMesh/trackedParticle/trackedParticle.H b/src/autoMesh/autoHexMesh/trackedParticle/trackedParticle.H index ab7ab06d20c9a513e481e3e89b645c898e11992a..3e2d12a1d2f16b84b3881883a7813d40a9026ec6 100644 --- a/src/autoMesh/autoHexMesh/trackedParticle/trackedParticle.H +++ b/src/autoMesh/autoHexMesh/trackedParticle/trackedParticle.H @@ -169,6 +169,21 @@ public: bool move(trackData&); + //- Overridable function to handle the particle hitting a patch + // Executed before other patch-hitting functions + bool hitPatch + ( + const polyPatch&, + trackedParticle::trackData& td, + const label patchI + ); + bool hitPatch + ( + const polyPatch&, + int&, + const label patchI + ); + //- Overridable function to handle the particle hitting a wedge void hitWedgePatch ( diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 0367b8acf634c4b2263f1d5a4c6c6a35839ce447..313110bd43ad9541a65a0d4199803aa3420141c3 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -316,18 +316,32 @@ $(laplacianSchemes)/gaussLaplacianScheme/gaussLaplacianSchemes.C finiteVolume/fvc/fvcMeshPhi.C -cfdTools/general/findRefCell/findRefCell.C -cfdTools/general/adjustPhi/adjustPhi.C -cfdTools/general/bound/bound.C -cfdTools/general/porousMedia/porousZone.C -cfdTools/general/porousMedia/porousZones.C -cfdTools/general/MRF/MRFZone.C -cfdTools/general/MRF/MRFZones.C -cfdTools/general/fieldSources/pressureGradientExplicitSource/pressureGradientExplicitSource.C -cfdTools/general/fieldSources/timeActivatedExplicitSource/timeActivatedExplicitSource.C -cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C -cfdTools/general/SRF/SRFModel/SRFModel/newSRFModel.C -cfdTools/general/SRF/SRFModel/rpm/rpm.C -cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.C +general = cfdTools/general +$(general)/findRefCell/findRefCell.C +$(general)/adjustPhi/adjustPhi.C +$(general)/bound/bound.C + +porousMedia = $(general)/porousMedia +$(porousMedia)/porousZone.C +$(porousMedia)/porousZones.C + +MRF = $(general)/MRF +$(MRF)/MRFZone.C +$(MRF)/MRFZones.C + +SRF = $(general)/SRF +$(SRF)/SRFModel/SRFModel/SRFModel.C +$(SRF)/SRFModel/SRFModel/newSRFModel.C +$(SRF)/SRFModel/rpm/rpm.C +$(SRF)/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.C + +fieldSources = $(general)/fieldSources +$(fieldSources)/pressureGradientExplicitSource/pressureGradientExplicitSource.C +$(fieldSources)/timeActivatedExplicitSource/timeActivatedExplicitSource.C +$(fieldSources)/timeActivatedExplicitCellSource/timeActivatedExplicitCellSource.C + +$(fieldSources)/timeActivatedExplicitMulticomponentPointSource/timeActivatedExplicitMulticomponentPointSource.C +$(fieldSources)/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourceProperties.C +$(fieldSources)/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourcePropertiesIO.C LIB = $(FOAM_LIBBIN)/libfiniteVolume diff --git a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitCellSource/timeActivatedExplicitCellSource.C b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitCellSource/timeActivatedExplicitCellSource.C new file mode 100644 index 0000000000000000000000000000000000000000..624adadf67f938b02c247c34dcaca254becba9bc --- /dev/null +++ b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitCellSource/timeActivatedExplicitCellSource.C @@ -0,0 +1,175 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 "timeActivatedExplicitCellSource.H" +#include "volFields.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::timeActivatedExplicitCellSource::updateCellSet() +{ + cellSelector_->applyToSet(topoSetSource::NEW, selectedCellSet_); + + Info<< " " << name_ << ": selected " + << returnReduce(selectedCellSet_.size(), sumOp<label>()) + << " cells" << nl << endl; + + V_ = scalarField(selectedCellSet_.size(), 1.0); + if (volumeType_ == vtAbsolute) + { + label i = 0; + forAllConstIter(cellSet, selectedCellSet_, iter) + { + V_[i++] = mesh_.V()[iter.key()]; + } + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::timeActivatedExplicitCellSource::timeActivatedExplicitCellSource +( + const word& name, + const fvMesh& mesh, + const dimensionSet& dims +) +: + timeActivatedExplicitSource(name, mesh, dims), + onValue_(readScalar(lookup("onValue"))), + offValue_(readScalar(lookup("offValue"))), + V_(0), + cellSource_(lookup("cellSource")), + cellSelector_ + ( + topoSetSource::New + ( + cellSource_, + mesh, + subDict(cellSource_ + "Coeffs") + ) + ), + selectedCellSet_ + ( + mesh, + name + "SourceCellSet", + mesh.nCells()/10 + 1 // Reasonable size estimate. + ) +{ + // Create the cell set + updateCellSet(); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::scalar Foam::timeActivatedExplicitCellSource::onValue() const +{ + return onValue_; +} + + +Foam::scalar Foam::timeActivatedExplicitCellSource::offValue() const +{ + return offValue_; +} + + +Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> > +Foam::timeActivatedExplicitCellSource::Su() +{ + tmp<DimensionedField<scalar, volMesh> > tSource + ( + new DimensionedField<scalar, volMesh> + ( + IOobject + ( + name_ + "Su", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar("zero", dimensions_, 0.0) + ) + ); + + scalar value = offValue_; + if + ( + active_ + && (runTime_.time().value() >= timeStart_) + && (runTime_.time().value() <= timeStart_ + duration_) + ) + { + // Update the cell set if the mesh is changing + if (mesh_.changing()) + { + updateCellSet(); + } + + value = onValue_; + } + + DimensionedField<scalar, volMesh>& sourceField = tSource(); + + label i = 0; + forAllConstIter(cellSet, selectedCellSet_, iter) + { + sourceField[iter.key()] = value/V_[i++]; + } + + return tSource; +} + + +bool Foam::timeActivatedExplicitCellSource::read() +{ + if (timeActivatedExplicitSource::read()) + { + lookup("onValue") >> onValue_; + lookup("offValue") >> offValue_; + lookup("cellSource") >> cellSource_; + cellSelector_ = + topoSetSource::New + ( + cellSource_, + mesh_, + subDict(cellSource_ + "Coeffs") + ); + updateCellSet(); + + return true; + } + else + { + return false; + } +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitCellSource/timeActivatedExplicitCellSource.H b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitCellSource/timeActivatedExplicitCellSource.H new file mode 100644 index 0000000000000000000000000000000000000000..96dfb3a5e822609beccce827aa97d5e88f98afdf --- /dev/null +++ b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitCellSource/timeActivatedExplicitCellSource.H @@ -0,0 +1,143 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 + +Class + Foam::timeActivatedExplicitSourceNew + +Description + Creates a cell set source that is activated at a given time, and remains + active for a specified duration. The source value is either in specific + (XX/m3) or absolute (XX) units. + +SourceFiles + timeActivatedExplicitCellSource.C + +\*---------------------------------------------------------------------------*/ + +#ifndef timeActivatedExplicitCellSource_H +#define timeActivatedExplicitCellSource_H + +#include "timeActivatedExplicitSource.H" +#include "topoSetSource.H" +#include "cellSet.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class timeActivatedExplicitCellSource Declaration +\*---------------------------------------------------------------------------*/ + +class timeActivatedExplicitCellSource +: + public timeActivatedExplicitSource +{ +private: + + // Private member functions + + //- Update the cell set that the source is acting on + void updateCellSet(); + + + // Private Member Functions + + //- Disallow default bitwise copy construct + timeActivatedExplicitCellSource(const timeActivatedExplicitCellSource&); + + //- Disallow default bitwise assignment + void operator=(const timeActivatedExplicitCellSource&); + + +protected: + + // Protected data + + // Source properties + + //- Value when "on" + scalar onValue_; + + //- Value when "off" + scalar offValue_; + + + // Cell set + + //- Cell volumes + scalarList V_; + + //- Name of cell source (XXXToCell) + word cellSource_; + + //- Method by which the cells will be selected + autoPtr<topoSetSource> cellSelector_; + + //- Set of selected cells + cellSet selectedCellSet_; + + +public: + + // Constructors + + //- Construct from explicit source name and mesh + timeActivatedExplicitCellSource + ( + const word&, + const fvMesh&, + const dimensionSet& + ); + + + // Member Functions + + // Access + + //- Return the "on" value + virtual scalar onValue() const; + + //- Return the "off" value + virtual scalar offValue() const; + + //- Return a tmp field of the source + virtual tmp<DimensionedField<scalar, volMesh> > Su(); + + + //- Read properties dictionary + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourceProperties.C b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourceProperties.C new file mode 100644 index 0000000000000000000000000000000000000000..5d7ad2ac46b509fbafb1b6448d98395be7ab9cf3 --- /dev/null +++ b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourceProperties.C @@ -0,0 +1,87 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 "pointSourceProperties.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::pointSourceProperties::pointSourceProperties() +: + name_("unknownPointSourceName"), + timeStart_(0.0), + duration_(0.0), + location_(point::zero), + fieldData_() +{} + + +Foam::pointSourceProperties::pointSourceProperties(const dictionary& dict) +: + name_(dict.name().name()), + timeStart_(readScalar(dict.lookup("timeStart"))), + duration_(readScalar(dict.lookup("duration"))), + location_(dict.lookup("location")), + fieldData_(dict.lookup("fieldData")) +{} + + +Foam::pointSourceProperties::pointSourceProperties +( + const pointSourceProperties& psp +) +: + name_(psp.name_), + timeStart_(psp.timeStart_), + duration_(psp.duration_), + location_(psp.location_), + fieldData_(psp.fieldData_) +{} + + +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + +void Foam::pointSourceProperties::operator=(const pointSourceProperties& rhs) +{ + // Check for assignment to self + if (this == &rhs) + { + FatalErrorIn + ( + "pointSourceProperties::operator=(const pointSourceProperties&)" + ) << "Attempted assignment to self" << nl + << abort(FatalError); + } + + // Set updated values + name_ = rhs.name_; + timeStart_ = rhs.timeStart_; + duration_ = rhs.duration_; + location_ = rhs.location_; + fieldData_ = rhs.fieldData_;} + + + +// ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourceProperties.H b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourceProperties.H new file mode 100644 index 0000000000000000000000000000000000000000..c83e3fc6662634ff92882909fdbc54721bfa2f58 --- /dev/null +++ b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourceProperties.H @@ -0,0 +1,158 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 + +Class + Foam::pointSourceProperties + +Description + Helper class to describe point source properties + +SourceFiles + pointSourceProperties.C + +\*---------------------------------------------------------------------------*/ + +#ifndef pointSourceProperties_H +#define pointSourceProperties_H + +#include "IOdictionary.H" +#include "fvMesh.H" +#include "Time.H" +#include "Tuple2.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class pointSourceProperties Declaration +\*---------------------------------------------------------------------------*/ + +class pointSourceProperties +{ +protected: + + // Protected data + + typedef Tuple2<word, scalar> fieldNameValuePair; + + //- Source name + word name_; + + //- Time start + scalar timeStart_; + + //- Duration + scalar duration_; + + //- Point location + point location_; + + //- List of source field name vs value pairs + List<fieldNameValuePair> fieldData_; + + +public: + + // Constructors + + //- Construct null + pointSourceProperties(); + + //- Construct from dictionary + pointSourceProperties(const dictionary& dict); + + //- Construct from Istream + pointSourceProperties(Istream& is); + + //- Copy constructor + pointSourceProperties(const pointSourceProperties&); + + + // Member Functions + + // Access + + //- Return const access to the source name + inline const word& name() const; + + //- Return const access to the time start + inline scalar timeStart() const; + + //- Return const access to the time end + inline scalar timeEnd() const; + + //- Return const access to the duration + inline scalar duration() const; + + //- Return const access to the point location + inline const point& location() const; + + //- Return const access to the source field name vs value pairs + inline const List<fieldNameValuePair>& fieldData() const; + + + // Edit + + //- Return access to the source name + inline word& name(); + + //- Return access to the time start + inline scalar& timeStart(); + + //- Return access to the duration + inline scalar& duration(); + + //- Return access to the point location + inline point& location(); + + //- Return access to the source field name vs value pairs + inline List<fieldNameValuePair>& fieldData(); + + + // Member Operators + + void operator=(const pointSourceProperties&); + + // IOstream operators + + friend Istream& operator>>(Istream&, pointSourceProperties&); + friend Ostream& operator<<(Ostream&, const pointSourceProperties&); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "pointSourcePropertiesI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourcePropertiesI.H b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourcePropertiesI.H new file mode 100644 index 0000000000000000000000000000000000000000..60d02c2d5d14f295bee2ad0e2390c121312b52bf --- /dev/null +++ b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourcePropertiesI.H @@ -0,0 +1,99 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 "pointSourceProperties.H" + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +inline const Foam::word& Foam::pointSourceProperties::name() const +{ + return name_; +} + + +inline Foam::scalar Foam::pointSourceProperties::timeStart() const +{ + return timeStart_; +} + + +inline Foam::scalar Foam::pointSourceProperties::timeEnd() const +{ + return timeStart_ + duration_; +} + + +inline Foam::scalar Foam::pointSourceProperties::duration() const +{ + return duration_; +} + + +inline const Foam::point& Foam::pointSourceProperties::location() const +{ + return location_; +} + + +inline const Foam::List<Foam::pointSourceProperties::fieldNameValuePair>& +Foam::pointSourceProperties::fieldData() const +{ + return fieldData_; +} + + +inline Foam::word& Foam::pointSourceProperties::name() +{ + return name_; +} + + +inline Foam::scalar& Foam::pointSourceProperties::timeStart() +{ + return timeStart_; +} + + +inline Foam::scalar& Foam::pointSourceProperties::duration() +{ + return duration_; +} + + +inline Foam::point& Foam::pointSourceProperties::location() +{ + return location_; +} + + +inline Foam::List<Foam::pointSourceProperties::fieldNameValuePair>& +Foam::pointSourceProperties::fieldData() +{ + return fieldData_; +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourcePropertiesIO.C b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourcePropertiesIO.C new file mode 100644 index 0000000000000000000000000000000000000000..5b0ca2e63efa8751afa1425704cb5d3f72d31d25 --- /dev/null +++ b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourcePropertiesIO.C @@ -0,0 +1,88 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 "pointSourceProperties.H" +#include "dictionaryEntry.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::pointSourceProperties::pointSourceProperties(Istream& is) +: + name_("unknownPointSourceName"), + timeStart_(0.0), + duration_(0.0), + location_(point::zero), + fieldData_() +{ + is.check("pointSourceProperties(Istream&)"); + + const dictionaryEntry entry(dictionary::null, is); + + name_ = entry.keyword(); + entry.lookup("timeStart") >> timeStart_; + entry.lookup("duration") >> duration_; + entry.lookup("location") >> location_; + entry.lookup("fieldData") >> fieldData_; +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::Istream& Foam::operator>>(Istream& is, pointSourceProperties& psp) +{ + is.check("Istream& operator>>(Istream&, pointSourceProperties&)"); + + const dictionaryEntry entry(dictionary::null, is); + + psp.name_ = entry.keyword(); + entry.lookup("timeStart") >> psp.timeStart_; + entry.lookup("duration") >> psp.duration_; + entry.lookup("location") >> psp.location_; + entry.lookup("fieldData") >> psp.fieldData_; + + return is; +} + + +Foam::Ostream& Foam::operator<<(Ostream& os, const pointSourceProperties& psp) +{ + os.check("Ostream& operator<<(Ostream&, const pointSourceProperties&)"); + + os << psp.name_ << nl << token::BEGIN_BLOCK << nl; + os.writeKeyword("timeStart") << psp.timeStart_ << token::END_STATEMENT << nl; + os.writeKeyword("duration") << psp.duration_ << token::END_STATEMENT << nl; + os.writeKeyword("location") << psp.location_ << token::END_STATEMENT << nl; + os.writeKeyword("fieldData") << psp.fieldData_ << token::END_STATEMENT << nl; + os << token::END_BLOCK << nl; + + os.check("Ostream& operator<<(Ostream&, const pointSourceProperties&)"); + + return os; +} + + + +// ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/timeActivatedExplicitMulticomponentPointSource.C b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/timeActivatedExplicitMulticomponentPointSource.C new file mode 100644 index 0000000000000000000000000000000000000000..221b7949b4365c9bad6c6753e1cac6b831e579d5 --- /dev/null +++ b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/timeActivatedExplicitMulticomponentPointSource.C @@ -0,0 +1,292 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 "timeActivatedExplicitMulticomponentPointSource.H" +#include "volFields.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +Foam::label +Foam::timeActivatedExplicitMulticomponentPointSource::carrierFieldId +( + const word& fieldName +) +{ + forAll(carrierFields_, fieldI) + { + if (carrierFields_[fieldI].name() == fieldName) + { + return fieldI; + } + } + + return -1; +} + + +void Foam::timeActivatedExplicitMulticomponentPointSource::updateAddressing() +{ + forAll(pointSources_, sourceI) + { + const pointSourceProperties& psp = pointSources_[sourceI]; + bool foundCell = false; + label cid = mesh_.findCell(psp.location()); + if (cid >= 0) + { + foundCell = mesh_.pointInCell(psp.location(), cid); + } + reduce(foundCell, orOp<bool>()); + if (!foundCell) + { + label cid = mesh_.findNearestCell(psp.location()); + if (cid >= 0) + { + foundCell = mesh_.pointInCell(psp.location(), cid); + } + } + reduce(foundCell, orOp<bool>()); + + if (!foundCell) + { + FatalErrorIn + ( + "timeActivatedExplicitMulticomponentPointSource::" + "updateAddressing()" + ) << "Unable to find location " << psp.location() << " in mesh " + << "for source " << psp.name() << nl + << exit(FatalError); + } + else + { + cellOwners_[sourceI] = cid; + } + + fieldIds_[sourceI].setSize(psp.fieldData().size()); + forAll(psp.fieldData(), fieldI) + { + const word& fieldName = psp.fieldData()[fieldI].first(); + label cfid = carrierFieldId(fieldName); + if (cfid < 0) + { + FatalErrorIn + ( + "timeActivatedExplicitMulticomponentPointSource::" + "updateAddressing()" + ) << "Unable to find field " << fieldName << " in carrier " + << "fields for source " << psp.name() << nl + << exit(FatalError); + } + else + { + fieldIds_[sourceI][fieldI] = cfid; + } + } + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::timeActivatedExplicitMulticomponentPointSource:: +timeActivatedExplicitMulticomponentPointSource +( + const word& name, + const fvMesh& mesh, + const PtrList<volScalarField>& carrierFields, + const dimensionSet& dims +) +: + IOdictionary + ( + IOobject + ( + name + "Properties", + mesh.time().constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ), + name_(name), + mesh_(mesh), + runTime_(mesh.time()), + dimensions_(dims), + carrierFields_(carrierFields), + active_(lookup("active")), + pointSources_(lookup("pointSources")), + cellOwners_(pointSources_.size()), + fieldIds_(pointSources_.size()) +{ + // Initialise the field addressing + updateAddressing(); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> > +Foam::timeActivatedExplicitMulticomponentPointSource::Su +( + const label fieldI +) +{ + if (mesh_.changing()) + { + updateAddressing(); + } + + tmp<DimensionedField<scalar, volMesh> > tSource + ( + new DimensionedField<scalar, volMesh> + ( + IOobject + ( + name_ + carrierFields_[fieldI].name() + "Su", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar("zero", dimensions_, 0.0) + ) + ); + + if (active_) + { + DimensionedField<scalar, volMesh>& sourceField = tSource(); + + const scalarField& V = mesh_.V(); + const scalar dt = runTime_.deltaT().value(); + + forAll(pointSources_, sourceI) + { + const pointSourceProperties& psp = pointSources_[sourceI]; + + forAll(fieldIds_[sourceI], i) + { + if + ( + fieldIds_[sourceI][i] == fieldI + && (runTime_.time().value() >= psp.timeStart()) + && (runTime_.time().value() <= psp.timeEnd()) + ) + { + const label cid = cellOwners_[sourceI]; + if (cid >= 0) + { + sourceField[cid] += + dt*psp.fieldData()[i].second()/V[cid]; + } + } + } + } + } + + return tSource; +} + + +Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> > +Foam::timeActivatedExplicitMulticomponentPointSource::Su() +{ + if (mesh_.changing()) + { + updateAddressing(); + } + + tmp<DimensionedField<scalar, volMesh> > tSource + ( + new DimensionedField<scalar, volMesh> + ( + IOobject + ( + name_ + "TotalSu", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar("zero", dimensions_, 0.0) + ) + ); + + if (active_) + { + DimensionedField<scalar, volMesh>& sourceField = tSource(); + + const scalarField& V = mesh_.V(); + const scalar dt = runTime_.deltaT().value(); + + forAll(pointSources_, sourceI) + { + const pointSourceProperties& psp = pointSources_[sourceI]; + + forAll(fieldIds_[sourceI], i) + { + if + ( + (runTime_.time().value() >= psp.timeStart()) + && (runTime_.time().value() <= psp.timeEnd()) + ) + { + const label cid = cellOwners_[sourceI]; + if (cid >= 0) + { + sourceField[cid] += + dt*psp.fieldData()[i].second()/V[cid]; + } + } + } + } + } + + return tSource; +} + + +bool Foam::timeActivatedExplicitMulticomponentPointSource::read() +{ + if (regIOobject::read()) + { + lookup("active") >> active_; + lookup("pointSources") >> pointSources_; + + cellOwners_.setSize(pointSources_.size()); + + updateAddressing(); + + return true; + } + else + { + return false; + } +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/timeActivatedExplicitMulticomponentPointSource.H b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/timeActivatedExplicitMulticomponentPointSource.H new file mode 100644 index 0000000000000000000000000000000000000000..a1d74268f90d8ba9db44cddc03b8f70316bc776b --- /dev/null +++ b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/timeActivatedExplicitMulticomponentPointSource.H @@ -0,0 +1,185 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 + +Class + Foam::timeActivatedExplicitMulticomponentPointSourceNew + +Description + Provides a mechanism to introduce point sources to a set of carrier fields. + Carrier fields are supplied on consruction, and interrogated to provide the + field indices of the sources. + + Source values are assumed to be in <quantity>/s, and divided through by the + cell volumes before being returned, e.g. for a kg/s source + + Properties are described in a <name>Properties dictionary + + active true; // are sources active (true/false) + + pointSources + ( + source1 // source name + { + timeStart 0.0; + duration 1.0; + location (0 0 0); + fieldData + ( + (H2O 0.1) // kg/s + (O2 0.05) // kg/s + ); + } + source2 // source name + { + timeStart 0.5; + duration 2.0; + location (1 1 1); + fieldData + ( + (NO 0.1) // kg/s + (CO2 0.05) // kg/s + (H2 0.001) // kg/s + ); + } + ); + + +SourceFiles + timeActivatedExplicitMulticomponentPointSourceNew.C + +\*---------------------------------------------------------------------------*/ + +#ifndef timeActivatedExplicitMulticomponentPointSource_H +#define timeActivatedExplicitMulticomponentPointSource_H + +#include "IOdictionary.H" +#include "fvMesh.H" +#include "Time.H" +#include "pointSourceProperties.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class timeActivatedExplicitMulitcomponentPointSource Declaration +\*---------------------------------------------------------------------------*/ + +class timeActivatedExplicitMulticomponentPointSource +: + public IOdictionary +{ +protected: + + // Protected data + + //- Name of the source + word name_; + + //- Reference to the mesh + const fvMesh& mesh_; + + //- Reference to time database + const Time& runTime_; + + //- Source dimensions + const dimensionSet& dimensions_; + + //- Reference to the multicomponent carrier fields + const PtrList<volScalarField>& carrierFields_; + + //- Active flag + bool active_; + + //- List of point source properties + List<pointSourceProperties> pointSources_; + + //- List of cell owners for point source locations + List<label> cellOwners_; + + //- List of field ids for each source + List<labelList> fieldIds_; + + + // Protected Member Functions + + //- Return the id of field given its name + label carrierFieldId(const word& fieldName); + + //- Update the addressing between source and carrier fields + void updateAddressing(); + + //- Disallow default bitwise copy construct + timeActivatedExplicitMulticomponentPointSource + ( + const timeActivatedExplicitMulticomponentPointSource& + ); + + //- Disallow default bitwise assignment + void operator=(const timeActivatedExplicitMulticomponentPointSource&); + + +public: + + // Constructors + + //- Construct from components + timeActivatedExplicitMulticomponentPointSource + ( + const word&, + const fvMesh&, + const PtrList<volScalarField>&, + const dimensionSet& + ); + + + // Member Functions + + // Access + + //- Return a tmp field of the source for field fieldI + virtual tmp<DimensionedField<scalar, volMesh> > Su + ( + const label fieldI + ); + + //- Return a tmp field of the total source + virtual tmp<DimensionedField<scalar, volMesh> > Su(); + + + //- Read properties dictionary + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/timeActivatedExplicitSource.C b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/timeActivatedExplicitSource.C index 48de23bfe239d49755f674995ac405fb20409362..c59b74a770eba9dc0aba0fbca48068d46a22e6ba 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/timeActivatedExplicitSource.C +++ b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/timeActivatedExplicitSource.C @@ -44,33 +44,11 @@ const Foam::NamedEnum<Foam::timeActivatedExplicitSource::volumeType, 2> Foam::timeActivatedExplicitSource::volumeTypeNames_; -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void Foam::timeActivatedExplicitSource::updateCellSet() -{ - cellSelector_->applyToSet(topoSetSource::NEW, selectedCellSet_); - - Info<< " " << sourceName_ << ": selected " - << returnReduce(selectedCellSet_.size(), sumOp<label>()) - << " cells" << nl << endl; - - V_ = scalarField(selectedCellSet_.size(), 1.0); - if (volumeType_ == vtAbsolute) - { - label i = 0; - forAllConstIter(cellSet, selectedCellSet_, iter) - { - V_[i++] = mesh_.V()[iter.key()]; - } - } -} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::timeActivatedExplicitSource::timeActivatedExplicitSource ( - const word& sourceName, + const word& name, const fvMesh& mesh, const dimensionSet& dims ) @@ -79,104 +57,72 @@ Foam::timeActivatedExplicitSource::timeActivatedExplicitSource ( IOobject ( - sourceName + "Properties", + name + "Properties", mesh.time().constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE ) ), - sourceName_(sourceName), mesh_(mesh), runTime_(mesh.time()), + name_(name), + active_(lookup("active")), dimensions_(dims), volumeType_(volumeTypeNames_.read(lookup("volumeType"))), timeStart_(readScalar(lookup("timeStart"))), - duration_(readScalar(lookup("duration"))), - onValue_(readScalar(lookup("onValue"))), - offValue_(readScalar(lookup("offValue"))), - currentValue_(0.0), - V_(0), - cellSource_(lookup("cellSource")), - cellSelector_ - ( - topoSetSource::New - ( - cellSource_, - mesh, - subDict(cellSource_ + "Coeffs") - ) - ), - selectedCellSet_ - ( - mesh, - sourceName + "SourceCellSet", - mesh.nCells()/10 + 1 // Reasonable size estimate. - ) -{ - // Create the cell set - updateCellSet(); + duration_(readScalar(lookup("duration"))) +{} + - // Initialise the value - update(); +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +const Foam::fvMesh& Foam::timeActivatedExplicitSource::mesh() const +{ + return mesh_; } -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +const Foam::Time& Foam::timeActivatedExplicitSource::runTime() const +{ + return runTime_; +} -Foam::scalar Foam::timeActivatedExplicitSource::timeStart() const + +const Foam::word& Foam::timeActivatedExplicitSource::name() const { - return timeStart_; + return name_; } -Foam::scalar Foam::timeActivatedExplicitSource::duration() const +const Foam::Switch& Foam::timeActivatedExplicitSource::active() const { - return duration_; + return active_; } -const Foam::dimensionedScalar -Foam::timeActivatedExplicitSource::currentValue() const +const Foam::dimensionSet& Foam::timeActivatedExplicitSource::dimensions() const { - return dimensionedScalar - ( - sourceName_, - dimensions_, - currentValue_ - ); + return dimensions_; } -Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> > -Foam::timeActivatedExplicitSource::Su() const +const Foam::timeActivatedExplicitSource::volumeType& +Foam::timeActivatedExplicitSource::volume() const { - tmp<DimensionedField<scalar, volMesh> > tSource - ( - new DimensionedField<scalar, volMesh> - ( - IOobject - ( - sourceName_ + "Su", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("zero", dimensions_, 0.0) - ) - ); + return volumeType_; +} - DimensionedField<scalar, volMesh>& sourceField = tSource(); - label i = 0; - forAllConstIter(cellSet, selectedCellSet_, iter) - { - sourceField[iter.key()] = currentValue_/V_[i++]; - } +Foam::scalar Foam::timeActivatedExplicitSource::timeStart() const +{ + return timeStart_; +} + - return tSource; +Foam::scalar Foam::timeActivatedExplicitSource::duration() const +{ + return duration_; } @@ -184,22 +130,18 @@ bool Foam::timeActivatedExplicitSource::read() { if (regIOobject::read()) { - volumeType_ = volumeTypeNames_.read(lookup("volumeType")); - lookup("timeStart") >> duration_; - lookup("duration") >> duration_; - lookup("onValue") >> onValue_; - lookup("offValue") >> offValue_; - lookup("cellSource") >> cellSource_; - cellSelector_ = - topoSetSource::New - ( - cellSource_, - mesh_, - subDict(cellSource_ + "Coeffs") - ); - updateCellSet(); - - return true; + lookup("active") >> active_; + if (active_) + { + volumeType_ = volumeTypeNames_.read(lookup("volumeType")); + lookup("timeStart") >> duration_; + lookup("duration") >> duration_; + return true; + } + else + { + return false; + } } else { @@ -208,28 +150,6 @@ bool Foam::timeActivatedExplicitSource::read() } -void Foam::timeActivatedExplicitSource::update() -{ - // Set the source value - if - ( - (runTime_.time().value() >= timeStart_) - && (runTime_.time().value() <= timeStart_ + duration_) - ) - { - currentValue_ = onValue_; - } - else - { - currentValue_ = offValue_; - } - - // Update the cell set if the mesh is changing - if (mesh_.changing()) - { - updateCellSet(); - } -} // ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/timeActivatedExplicitSource.H b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/timeActivatedExplicitSource.H index f258bc1f7fce14d91ea23891c74604ceb19dd041..15bccc582f3a620bc5fa40e6334b828cf6b61968 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/timeActivatedExplicitSource.H +++ b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/timeActivatedExplicitSource.H @@ -23,15 +23,20 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::timeActivatedExplicitSourceNew + Foam::timeActivatedExplicitSource Description - Creates a cell set source that is activated at a given time, and remains - active for a specified duration. The source value is either in specific - (XX/m3) or absolute (XX) units. + Base class for field sources. Provides: + - name + - references to mesh and time + - dimensions + - volume type + - startTime + - duration + - read (from <sourceName>Properties dictionary) SourceFiles - timeActivatedExplicitSourceNew.C + timeActivatedExplicitSource.C \*---------------------------------------------------------------------------*/ @@ -40,8 +45,6 @@ SourceFiles #include "IOdictionary.H" #include "autoPtr.H" -#include "topoSetSource.H" -#include "cellSet.H" #include "fvMesh.H" #include "Time.H" #include "NamedEnum.H" @@ -72,19 +75,19 @@ public: private: - // Private member functions + // Private Member Functions - //- Update the cell set that the source is acting on - void updateCellSet(); + //- Disallow default bitwise copy construct + timeActivatedExplicitSource(const timeActivatedExplicitSource&); + + //- Disallow default bitwise assignment + void operator=(const timeActivatedExplicitSource&); protected: // Protected data - //- Name of the source - word sourceName_; - //- Reference to the mesh const fvMesh& mesh_; @@ -94,6 +97,12 @@ protected: // Source properties + //- Name of the source + word name_; + + //- Active flag + Switch active_; + //- Dimensions const dimensionSet dimensions_; @@ -106,39 +115,6 @@ protected: //- Duration [s] scalar duration_; - //- Value when "on" - scalar onValue_; - - //- Value when "off" - scalar offValue_; - - //- Current source value - scalar currentValue_; - - - // Cell set - - //- Cell volumes - scalarList V_; - - //- Name of cell source (XXXToCell) - word cellSource_; - - //- Method by which the cells will be selected - autoPtr<topoSetSource> cellSelector_; - - //- Set of selected cells - cellSet selectedCellSet_; - - - // Protected Member Functions - - //- Disallow default bitwise copy construct - timeActivatedExplicitSource(const timeActivatedExplicitSource&); - - //- Disallow default bitwise assignment - void operator=(const timeActivatedExplicitSource&); - public: @@ -157,24 +133,33 @@ public: // Access - //- Return the start time - scalar timeStart() const; + //- Return the reference to the mesh + virtual const fvMesh& mesh() const; - //- Return the duration - scalar duration() const; + //- Return the reference to the time database + virtual const Time& runTime() const; + + //- Return the source name + virtual const word& name() const; + + //- Return the active flag + virtual const Switch& active() const; + + //- Return the dimensions + virtual const dimensionSet& dimensions() const; - //- Return the current value of the source - const dimensionedScalar currentValue() const; + //- Return the volume type + virtual const volumeType& volume() const; - //- Return a tmp field of the source - virtual tmp<DimensionedField<scalar, volMesh> > Su() const; + //- Return the start time + virtual scalar timeStart() const; + + //- Return the duration + virtual scalar duration() const; //- Read properties dictionary virtual bool read(); - - //- Update - virtual void update(); }; diff --git a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C index 686120b62d77e7c79803d7e56d2dcd961a67e178..f13e344375efb3cd476a9263a643ada04fcd78a4 100644 --- a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C +++ b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C @@ -79,6 +79,8 @@ Foam::porousZone::porousZone D_("D", dimensionSet(0, -2, 0, 0, 0), tensor::zero), F_("F", dimensionSet(0, -1, 0, 0, 0), tensor::zero) { + Info<< "Creating porous zone: " << name_ << endl; + if (cellZoneID_ == -1 && !Pstream::parRun()) { FatalErrorIn diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.C b/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.C index cafab73fb158e6492a6b9e908ad8265a7519399a..1df55b7e17b8be53c0c950a885143b0e9d6bec80 100644 --- a/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.C +++ b/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.C @@ -21,7 +21,7 @@ License 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 "gaussLaplacianScheme.H" diff --git a/src/lagrangian/basic/Particle/Particle.C b/src/lagrangian/basic/Particle/Particle.C index 6c8cbe4aa106f7181d0f93a84a8e6c5c5cd2996c..ea53ec3ee4d92165ee03861a86dfb96a4b65e4e7 100644 --- a/src/lagrangian/basic/Particle/Particle.C +++ b/src/lagrangian/basic/Particle/Particle.C @@ -45,7 +45,7 @@ Foam::labelList Foam::Particle<ParticleType>::findFaces const labelList& faces = mesh.cells()[celli_]; const vector& C = mesh.cellCentres()[celli_]; - labelList faceList(0); + DynamicList<label> faceList(10); forAll(faces, i) { label facei = faces[i]; @@ -53,12 +53,12 @@ Foam::labelList Foam::Particle<ParticleType>::findFaces if ((lam > 0) && (lam < 1.0)) { - label n = faceList.size(); - faceList.setSize(n+1); - faceList[n] = facei; + faceList.append(facei); } } + faceList.shrink(); + return faceList; } @@ -75,7 +75,7 @@ Foam::labelList Foam::Particle<ParticleType>::findFaces const labelList& faces = mesh.cells()[celli]; const vector& C = mesh.cellCentres()[celli]; - labelList faceList(0); + DynamicList<label> faceList(10); forAll(faces, i) { label facei = faces[i]; @@ -83,12 +83,12 @@ Foam::labelList Foam::Particle<ParticleType>::findFaces if ((lam > 0) && (lam < 1.0)) { - label n = faceList.size(); - faceList.setSize(n+1); - faceList[n] = facei; + faceList.append(facei); } } + faceList.shrink(); + return faceList; } @@ -186,6 +186,17 @@ Foam::Particle<ParticleType>::Particle {} +template<class ParticleType> +Foam::Particle<ParticleType>::Particle(const Particle<ParticleType>& p) +: + cloud_(p.cloud_), + position_(p.position_), + celli_(p.celli_), + facei_(p.facei_), + stepFraction_(p.stepFraction_) +{} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class ParticleType> @@ -328,56 +339,47 @@ Foam::scalar Foam::Particle<ParticleType>::trackToFace label patchi = patch(facei_); const polyPatch& patch = mesh.boundaryMesh()[patchi]; - if (isA<wedgePolyPatch>(patch)) - { - p.hitWedgePatch - ( - static_cast<const wedgePolyPatch&>(patch), td - ); - } - else if (isA<symmetryPolyPatch>(patch)) - { - p.hitSymmetryPatch - ( - static_cast<const symmetryPolyPatch&>(patch), td - ); - } - else if (isA<cyclicPolyPatch>(patch)) + if (!p.hitPatch(patch, td, patchi)) { - p.hitCyclicPatch - ( - static_cast<const cyclicPolyPatch&>(patch), td - ); - } - else if (isA<processorPolyPatch>(patch)) - { - p.hitProcessorPatch - ( - static_cast<const processorPolyPatch&>(patch), td - ); - } - else if (isA<wallPolyPatch>(patch)) - { - p.hitWallPatch - ( - static_cast<const wallPolyPatch&>(patch), td - ); - } - else if (isA<polyPatch>(patch)) - { - p.hitPatch - ( - static_cast<const polyPatch&>(patch), td - ); - } - else - { - FatalErrorIn - ( - "Particle::trackToFace" - "(const vector& endPosition, scalar& trackFraction)" - )<< "patch type " << patch.type() << " not suported" << nl - << abort(FatalError); + if (isA<wedgePolyPatch>(patch)) + { + p.hitWedgePatch + ( + static_cast<const wedgePolyPatch&>(patch), td + ); + } + else if (isA<symmetryPolyPatch>(patch)) + { + p.hitSymmetryPatch + ( + static_cast<const symmetryPolyPatch&>(patch), td + ); + } + else if (isA<cyclicPolyPatch>(patch)) + { + p.hitCyclicPatch + ( + static_cast<const cyclicPolyPatch&>(patch), td + ); + } + else if (isA<processorPolyPatch>(patch)) + { + p.hitProcessorPatch + ( + static_cast<const processorPolyPatch&>(patch), td + ); + } + else if (isA<wallPolyPatch>(patch)) + { + p.hitWallPatch + ( + static_cast<const wallPolyPatch&>(patch), td + ); + } + else + { + p.hitPatch(patch, td); + } } } } @@ -423,6 +425,19 @@ void Foam::Particle<ParticleType>::transformProperties(const vector&) {} +template<class ParticleType> +template<class TrackData> +bool Foam::Particle<ParticleType>::hitPatch +( + const polyPatch&, + TrackData&, + const label +) +{ + return false; +} + + template<class ParticleType> template<class TrackData> void Foam::Particle<ParticleType>::hitWedgePatch diff --git a/src/lagrangian/basic/Particle/Particle.H b/src/lagrangian/basic/Particle/Particle.H index 75a0b041744af33b9de9b805a8c46cabb4031e29..4d1a8b9be839f7e92cd31ce2dc6ca7acf227b81a 100644 --- a/src/lagrangian/basic/Particle/Particle.H +++ b/src/lagrangian/basic/Particle/Particle.H @@ -98,10 +98,7 @@ public: // Constructors - inline trackData - ( - Cloud<ParticleType>& cloud - ); + inline trackData(Cloud<ParticleType>& cloud); // Member functions @@ -171,6 +168,16 @@ protected: // Patch interactions + //- Overridable function to handle the particle hitting a patch + // Executed before other patch-hitting functions + template<class TrackData> + bool hitPatch + ( + const polyPatch&, + TrackData& td, + const label patchI + ); + //- Overridable function to handle the particle hitting a wedgePatch template<class TrackData> void hitWedgePatch @@ -256,8 +263,13 @@ public: friend class Cloud<ParticleType>; - //- Runtime type information - TypeName("Particle"); + // Static data members + + //- String representation of properties + static string propHeader; + + //- Runtime type information + TypeName("Particle"); // Constructors @@ -278,14 +290,24 @@ public: bool readFields = true ); + //- Construct as a copy + Particle(const Particle& p); + + //- Construct a clone + autoPtr<ParticleType> clone() const + { + return autoPtr<Particle>(new Particle(*this)); + } + + //- Factory class to read-construct particles used for // parallel transfer class iNew { - // Private data - const Cloud<ParticleType>& cloud_; + //- Reference to the cloud + const Cloud<ParticleType>& cloud_; public: @@ -303,9 +325,8 @@ public: //- Destructor - - virtual ~Particle() - {} + virtual ~Particle() + {} // Member Functions @@ -344,6 +365,9 @@ public: //- Return the impact model to be used, soft or hard (default). inline bool softImpact() const; + //- Return the particle current time + inline scalar currentTime() const; + // Check @@ -414,10 +438,7 @@ public: // I-O //- Write the fields associated with the owner cloud - static void writeFields - ( - const Cloud<ParticleType>& c - ); + static void writeFields(const Cloud<ParticleType>& c); // Ostream Operator diff --git a/src/lagrangian/basic/Particle/ParticleI.H b/src/lagrangian/basic/Particle/ParticleI.H index 075d96705d876aee11d5156dc242313fe139022f..ce790d67c11258c29290dbaa14f31d8669a6a6e7 100644 --- a/src/lagrangian/basic/Particle/ParticleI.H +++ b/src/lagrangian/basic/Particle/ParticleI.H @@ -345,6 +345,15 @@ inline bool Particle<ParticleType>::softImpact() const } +template<class ParticleType> +inline scalar Particle<ParticleType>::currentTime() const +{ + return + cloud_.pMesh().time().value() + + stepFraction_*cloud_.pMesh().time().deltaT().value(); +} + + template<class ParticleType> inline label Particle<ParticleType>::patch(const label facei) const { diff --git a/src/lagrangian/basic/Particle/ParticleIO.C b/src/lagrangian/basic/Particle/ParticleIO.C index 7be84f9d1449e3721369caf4413e436f809992a4..70e635dc94765e8e3b321fbf98d45b3a8259b91c 100644 --- a/src/lagrangian/basic/Particle/ParticleIO.C +++ b/src/lagrangian/basic/Particle/ParticleIO.C @@ -28,6 +28,12 @@ License #include "IOstreams.H" #include "IOPosition.H" +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template<class ParticleType> +Foam::string Foam::Particle<ParticleType>::propHeader = "(Px Py Pz) cellI"; + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // Construct from Istream diff --git a/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingData.C b/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingData.C new file mode 100644 index 0000000000000000000000000000000000000000..80f1dcaaf7063eb8b7899cd284c268f518a8bfe8 --- /dev/null +++ b/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingData.C @@ -0,0 +1,72 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 "ParticleTrackingData.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template<class ParcelType> +Foam::label Foam::ParticleTrackingData<ParcelType>::PARTICLE_COUNT = 0; + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class ParcelType> +Foam::ParticleTrackingData<ParcelType>::ParticleTrackingData +( + const Cloud<ParcelType>& cloud +) +: + cloud_(cloud), + origProc_(Pstream::myProcNo()), + id_(PARTICLE_COUNT++) +{} + + +template<class ParcelType> +Foam::ParticleTrackingData<ParcelType>::ParticleTrackingData +( + const ParticleTrackingData& ptd +) +: + cloud_(ptd.cloud_), + origProc_(ptd.origProc_), + id_(ptd.id_) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class ParcelType> +Foam::ParticleTrackingData<ParcelType>::~ParticleTrackingData() +{} + + +// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // + +#include "ParticleTrackingDataIO.C" + +// ************************************************************************* // diff --git a/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingData.H b/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingData.H new file mode 100644 index 0000000000000000000000000000000000000000..c752c2ec366ab52dad64f49b6081f01d93e2c2e6 --- /dev/null +++ b/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingData.H @@ -0,0 +1,166 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 + +Class + Foam::ParticleTrackingData + +Description + Class to provide additional properties to allow construction of + particle tracks + +SourceFiles + ParticleTrackingData.C + ParticleTrackingDataIO.C + +\*---------------------------------------------------------------------------*/ + +#ifndef ParticleTrackingData_H +#define ParticleTrackingData_H + +#include "Cloud.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes and friend functions +template<class ParcelType> +class ParticleTrackingData; + + +template<class ParcelType> +Ostream& operator<< +( + Ostream&, + const ParticleTrackingData<ParcelType>& +); + + +/*---------------------------------------------------------------------------*\ + Class ParticleTrackingData Declaration +\*---------------------------------------------------------------------------*/ + +template<class ParcelType> +class ParticleTrackingData +{ + // Private data + + //- Reference to the cloud + const Cloud<ParcelType>& cloud_; + + //- Originating processor id + label origProc_; + + //- Local particle id + label id_; + + //- Cumulative particle count used for particle id + static label PARTICLE_COUNT; + + + // Private member functions + + //- Write properties - particle count + static void writeProperties(const Cloud<ParcelType>& cloud); + + //- Read properties - particle count + static void readProperties(const Cloud<ParcelType>& cloud); + + +public: + + // Constructors + + //- Construct from cloud + ParticleTrackingData(const Cloud<ParcelType>& cloud); + + //- Construct copy + ParticleTrackingData(const ParticleTrackingData& ptd); + + //- Construct from Istream and mesh + ParticleTrackingData + ( + const Cloud<ParcelType>& cloud, + Istream& is, + bool readFields + ); + + + //- Destructor + ~ParticleTrackingData(); + + + // Member functions + + // Access + + //- Return const access to the cloud + inline const Cloud<ParcelType>& cloud() const; + + //- Return const access to the originating processor id + inline label origProc() const; + + //- Return const access to the local particle id + inline label id() const; + + + // I-O + + //- Read fields + static void readFields(Cloud<ParcelType>& c); + + //- Write fields + static void writeFields(const Cloud<ParcelType>& c); + + + // Ostream Operator + + friend Ostream& operator<< <ParcelType> + ( + Ostream&, + const ParticleTrackingData<ParcelType>& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "ParticleTrackingDataI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "ParticleTrackingData.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingDataI.H b/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingDataI.H new file mode 100644 index 0000000000000000000000000000000000000000..da195d56274e4ac02cd87bd051539c1f1de517eb --- /dev/null +++ b/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingDataI.H @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 + +\*---------------------------------------------------------------------------*/ + +template<class ParcelType> +inline const Foam::Cloud<ParcelType>& +Foam::ParticleTrackingData<ParcelType>::cloud() const +{ + return cloud_; +} + + +template<class ParcelType> +inline Foam::label Foam::ParticleTrackingData<ParcelType>::origProc() const +{ + return origProc_; +} + + +template<class ParcelType> +inline Foam::label Foam::ParticleTrackingData<ParcelType>::id() const +{ + return id_; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingDataIO.C b/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingDataIO.C new file mode 100644 index 0000000000000000000000000000000000000000..e575426eea793be664dea0c84b216c8d5252e2e3 --- /dev/null +++ b/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingDataIO.C @@ -0,0 +1,233 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 "ParticleTrackingData.H" + +// * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * * // + +template<class ParcelType> +void Foam::ParticleTrackingData<ParcelType>::readProperties +( + const Cloud<ParcelType>& cloud +) +{ + IOobject propsDictHeader + ( + "particleTrackingProperties", + cloud.db().time().timeName(), + "uniform/Lagrangian"/cloud.name(), + cloud.db(), + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ); + + if (propsDictHeader.headerOk()) + { + const IOdictionary propsDict(propsDictHeader); + + word procName("processor" + name(Pstream::myProcNo())); + if (propsDict.found(procName)) + { + propsDict.subDict(procName).lookup("particleCount") >> + PARTICLE_COUNT; + } + } +} + + +template<class ParcelType> +void Foam::ParticleTrackingData<ParcelType>::writeProperties +( + const Cloud<ParcelType>& cloud +) +{ + if (cloud.db().time().outputTime()) + { + IOdictionary propsDict + ( + IOobject + ( + "particleTrackingProperties", + cloud.db().time().timeName(), + "uniform/Lagrangian"/cloud.name(), + cloud.db(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ) + ); + + word procName("processor" + name(Pstream::myProcNo())); + propsDict.add(procName, dictionary()); + propsDict.subDict(procName).add("particleCount", PARTICLE_COUNT); + + propsDict.regIOobject::write(); + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class ParcelType> +Foam::ParticleTrackingData<ParcelType>::ParticleTrackingData +( + const Cloud<ParcelType>& cloud, + Istream& is, + bool readFields +) +: + cloud_(cloud), + origProc_(-1), + id_(-1) +{ + if (readFields) + { + if (is.format() == IOstream::ASCII) + { + is >> origProc_ >> id_; + } + else + { + is.read + ( + reinterpret_cast<char*>(&origProc_), + sizeof(origProc_) + sizeof(id_) + ); + } + } + + // Check state of Istream + is.check + ( + "ParticleTrackingData<ParcelType>::ParticleTrackingData" + "(" + "Istream&, " + "bool" + ")" + ); +} + + +template<class ParcelType> +void Foam::ParticleTrackingData<ParcelType>::readFields +( + Cloud<ParcelType>& c +) +{ + if (!c.size()) + { + return; + } + + readProperties(c); + + IOField<label> origProc(c.fieldIOobject("origProc", IOobject::MUST_READ)); + c.checkFieldIOobject(c, origProc); + + IOField<label> id(c.fieldIOobject("id", IOobject::MUST_READ)); + c.checkFieldIOobject(c, id); + + label i = 0; + forAllIter(typename Cloud<ParcelType>, c, iter) + { + ParcelType& p = iter(); + p.origProc_ = origProc[i]; + p.id_ = id[i]; + i++; + } +} + + +template<class ParcelType> +void Foam::ParticleTrackingData<ParcelType>::writeFields +( + const Cloud<ParcelType>& c +) +{ + writeProperties(c); + + const label np = c.size(); + + IOField<label> origProc + ( + c.fieldIOobject("origProc", IOobject::NO_READ), + np + ); + IOField<label> id(c.fieldIOobject("id", IOobject::NO_READ), np); + + label i = 0; + forAllConstIter(typename Cloud<ParcelType>, c, iter) + { + const ParcelType& p = iter(); + + origProc[i] = p.origProc(); + id[i] = p.id(); + i++; + } + + origProc.write(); + id.write(); +} + + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +template<class ParcelType> +Foam::Ostream& Foam::operator<< +( + Ostream& os, + const ParticleTrackingData<ParcelType>& p +) +{ + if (os.format() == IOstream::ASCII) + { + os << p.origProc_ << token::SPACE << p.id_ << token::SPACE; + } + else + { + os.write + ( + reinterpret_cast<const char*>(&p.origProc_), + sizeof(p.origProc_) + sizeof(p.id_) + ); + } + + // Check state of Ostream + os.check + ( + "Ostream& operator<<" + "(" + "Ostream&, " + "const ParticleTrackingData<ParcelType>&" + ")" + ); + + return os; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/basic/indexedParticle/indexedParticle.H b/src/lagrangian/basic/indexedParticle/indexedParticle.H index 3774bb93d86cc23d0022e838fefe66cb0fed3a80..fd20681a32c4fc733259461ecafd4a98754a7a58 100644 --- a/src/lagrangian/basic/indexedParticle/indexedParticle.H +++ b/src/lagrangian/basic/indexedParticle/indexedParticle.H @@ -87,6 +87,12 @@ public: Particle<indexedParticle>(c, is) {} + //- Construct as a copy + indexedParticle(const indexedParticle& p) + : + Particle<indexedParticle>(p) + {} + //- Construct and return a clone autoPtr<indexedParticle> clone() const { diff --git a/src/lagrangian/basic/passiveParticle/passiveParticle.H b/src/lagrangian/basic/passiveParticle/passiveParticle.H index 4e81e077ac442b6fc899ad556bbddf29a975b1f3..ce4f7bfcadabca2e009eef09def797539dcf702f 100644 --- a/src/lagrangian/basic/passiveParticle/passiveParticle.H +++ b/src/lagrangian/basic/passiveParticle/passiveParticle.H @@ -47,7 +47,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class passiveParticle Declaration + Class passiveParticle Declaration \*---------------------------------------------------------------------------*/ class passiveParticle @@ -81,6 +81,12 @@ public: Particle<passiveParticle>(c, is) {} + //- Construct as copy + passiveParticle(const passiveParticle& p) + : + Particle<passiveParticle>(p) + {} + //- Construct and return a clone autoPtr<passiveParticle> clone() const { diff --git a/src/lagrangian/coalCombustion/coalCloud/coalCloud.C b/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.C similarity index 73% rename from src/lagrangian/coalCombustion/coalCloud/coalCloud.C rename to src/lagrangian/coalCombustion/CoalCloud/CoalCloud.C index a8d1dd867b4a881f6f0517583ff3034c383cde09..873b82d170ba37b1d33beb485a46533b3266a9f2 100644 --- a/src/lagrangian/coalCombustion/coalCloud/coalCloud.C +++ b/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,53 +24,46 @@ License \*---------------------------------------------------------------------------*/ -#include "coalCloud.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(coalCloud, 0); -}; - +#include "CoalCloud.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::coalCloud::coalCloud +template<class ThermoType> +Foam::CoalCloud<ThermoType>::CoalCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - hCombustionThermo& thermo, - PtrList<specieReactingProperties>& gases + hCombustionThermo& thermo ) : - ReactingMultiphaseCloud<coalParcel> + ReactingMultiphaseCloud<CoalParcel<ThermoType> > ( - cloudType, + cloudName, rho, U, g, - thermo, - gases + thermo ) { - coalParcel::readFields(*this); + CoalParcel<ThermoType>::readFields(*this); } // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::coalCloud::~coalCloud() +template<class ThermoType> +Foam::CoalCloud<ThermoType>::~CoalCloud() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::coalCloud::writeFields() const +template<class ThermoType> +void Foam::CoalCloud<ThermoType>::writeFields() const { - coalParcel::writeFields(*this); + CoalParcel<ThermoType>::writeFields(*this); } diff --git a/src/lagrangian/coalCombustion/coalCloud/coalCloud.H b/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.H similarity index 77% rename from src/lagrangian/coalCombustion/coalCloud/coalCloud.H rename to src/lagrangian/coalCombustion/CoalCloud/CoalCloud.H index 72949ce14447e6280fd7e8c1597d97d989a33dd2..91a0289f0ffe3439d1f0900f7da70d073e2c96e1 100644 --- a/src/lagrangian/coalCombustion/coalCloud/coalCloud.H +++ b/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,20 +23,20 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - coalCloud + CoalCloud Description SourceFiles - coalCloud.C + CoalCloud.C \*---------------------------------------------------------------------------*/ -#ifndef coalCloud_H -#define coalCloud_H +#ifndef CoalCloud_H +#define CoalCloud_H #include "ReactingMultiphaseCloud.H" -#include "coalParcel.H" +#include "CoalParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,44 +44,44 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class coalCloud Declaration + Class CoalCloud Declaration \*---------------------------------------------------------------------------*/ -class coalCloud +template<class ThermoType> +class CoalCloud : - public ReactingMultiphaseCloud<coalParcel> + public ReactingMultiphaseCloud<CoalParcel<ThermoType> > { // Private Member Functions //- Disallow default bitwise copy construct - coalCloud(const coalCloud&); + CoalCloud(const CoalCloud&); //- Disallow default bitwise assignment - void operator=(const coalCloud&); + void operator=(const CoalCloud&); public: //-Runtime type information - TypeName("coalCloud"); + TypeName("CoalCloud"); // Constructors //- Construct given carrier gas fields - coalCloud + CoalCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - hCombustionThermo& thermo, - PtrList<specieReactingProperties>& gases + hCombustionThermo& thermo ); //- Destructor - ~coalCloud(); + ~CoalCloud(); // Member Functions @@ -97,6 +97,12 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository + #include "CoalCloud.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelCompositionModels.C b/src/lagrangian/coalCombustion/CoalCloud/defineCoalCloud.C similarity index 78% rename from src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelCompositionModels.C rename to src/lagrangian/coalCombustion/CoalCloud/defineCoalCloud.C index f6dea63009cc329c15e0b4ed1183d7e2fed83c89..cc0fa34f49fd096cc4b831c19fdaaec8fab3abde 100644 --- a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelCompositionModels.C +++ b/src/lagrangian/coalCombustion/CoalCloud/defineCoalCloud.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,24 +24,14 @@ License \*---------------------------------------------------------------------------*/ -#include "coalParcel.H" -#include "ReactingCloud.H" - -#include "SingleMixtureFraction.H" +#include "createReactingCloudTypes.H" +#include "CoalCloud.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - makeCompositionModel(ReactingCloud<coalParcel>); - - // Add instances of composition model to the table - makeCompositionModelType - ( - SingleMixtureFraction, - ReactingCloud, - coalParcel - ); + createReactingCloudType(CoalCloud); }; diff --git a/src/lagrangian/coalCombustion/coalParcel/coalParcel.C b/src/lagrangian/coalCombustion/CoalParcel/CoalParcel.C similarity index 66% rename from src/lagrangian/coalCombustion/coalParcel/coalParcel.C rename to src/lagrangian/coalCombustion/CoalParcel/CoalParcel.C index b1b6120906a9d9f1faa07a744d108e1cde66aa83..53a9f3ac63461372f31361e80c7c6a3bb0228c6a 100644 --- a/src/lagrangian/coalCombustion/coalParcel/coalParcel.C +++ b/src/lagrangian/coalCombustion/CoalParcel/CoalParcel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,25 +24,28 @@ License \*---------------------------------------------------------------------------*/ -#include "coalParcel.H" +#include "CoalParcel.H" -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(coalParcel, 0); - defineParticleTypeNameAndDebug(coalParcel, 0); - defineParcelTypeNameAndDebug(coalParcel, 0); -}; +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +template<class ThermoType> +Foam::CoalParcel<ThermoType>::CoalParcel +( + ReactingMultiphaseCloud<CoalParcel<ThermoType> >& owner, + const vector& position, + const label cellI +) +: + ReactingMultiphaseParcel<CoalParcel<ThermoType> >(owner, position, cellI) +{} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::coalParcel::coalParcel +template<class ThermoType> +Foam::CoalParcel<ThermoType>::CoalParcel ( - ReactingMultiphaseCloud<coalParcel>& owner, + ReactingMultiphaseCloud<CoalParcel<ThermoType> >& owner, const vector& position, - const label celli, + const label cellI, const label typeId, const scalar nParticle0, const scalar d0, @@ -51,14 +54,16 @@ Foam::coalParcel::coalParcel const scalarField& YGas0, const scalarField& YLiquid0, const scalarField& YSolid0, - const constantProperties& constProps + const typename + ReactingMultiphaseParcel<CoalParcel<ThermoType> >:: + constantProperties& constProps ) : - ReactingMultiphaseParcel<coalParcel> + ReactingMultiphaseParcel<CoalParcel<ThermoType> > ( owner, position, - celli, + cellI, typeId, nParticle0, d0, @@ -72,20 +77,22 @@ Foam::coalParcel::coalParcel {} -Foam::coalParcel::coalParcel +template<class ThermoType> +Foam::CoalParcel<ThermoType>::CoalParcel ( - const Cloud<coalParcel>& cloud, + const Cloud<CoalParcel<ThermoType> >& cloud, Istream& is, bool readFields ) : - ReactingMultiphaseParcel<coalParcel>(cloud, is, readFields) + ReactingMultiphaseParcel<CoalParcel<ThermoType> >(cloud, is, readFields) {} // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // -Foam::coalParcel::~coalParcel() +template<class ThermoType> +Foam::CoalParcel<ThermoType>::~CoalParcel() {} diff --git a/src/lagrangian/coalCombustion/coalParcel/coalParcel.H b/src/lagrangian/coalCombustion/CoalParcel/CoalParcel.H similarity index 63% rename from src/lagrangian/coalCombustion/coalParcel/coalParcel.H rename to src/lagrangian/coalCombustion/CoalParcel/CoalParcel.H index af3be65f84b4449984d6ebfe65053fc98b3ab773..a23e96bb852fcc7b85c38f49f054db309b001f87 100644 --- a/src/lagrangian/coalCombustion/coalParcel/coalParcel.H +++ b/src/lagrangian/coalCombustion/CoalParcel/CoalParcel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,19 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - coalParcel + CoalParcel Description SourceFiles - coalParcel.C - coalParcelIO.C + CoalParcel.C + CoalParcelIO.C \*---------------------------------------------------------------------------*/ -#ifndef coalParcel_H -#define coalParcel_H +#ifndef CoalParcel_H +#define CoalParcel_H #include "ReactingMultiphaseParcel.H" @@ -44,27 +44,44 @@ SourceFiles namespace Foam { +// Forward declaration of classes +template<class ThermoType> +class CoalParcel; + /*---------------------------------------------------------------------------*\ - Class coalParcel Declaration + Class CoalParcel Declaration \*---------------------------------------------------------------------------*/ -class coalParcel +template<class ThermoType> +class CoalParcel : - public ReactingMultiphaseParcel<coalParcel> + public ReactingMultiphaseParcel<CoalParcel<ThermoType> > { public: + //- The type of thermodynamics this parcel was instantiated for + typedef ThermoType thermoType; + // Run-time type information - TypeName("coalParcel"); + TypeName("CoalParcel"); // Constructors + //- Construct from owner, position, and cloud owner + // Other properties initialised as null + CoalParcel + ( + ReactingMultiphaseCloud<CoalParcel>& owner, + const vector& position, + const label cellI + ); + //- Construct from components - coalParcel + CoalParcel ( - ReactingMultiphaseCloud<coalParcel>& owner, + ReactingMultiphaseCloud<CoalParcel>& owner, const vector& position, - const label celli, + const label cellI, const label typeId, const scalar nParticle0, const scalar d0, @@ -73,39 +90,40 @@ public: const scalarField& YGas0, const scalarField& YLiquid0, const scalarField& YSolid0, - const constantProperties& constProps + const typename + ReactingMultiphaseParcel<CoalParcel>:: + constantProperties& constProps ); //- Construct from Istream - coalParcel + CoalParcel ( - const Cloud<coalParcel>& c, + const Cloud<CoalParcel>& c, Istream& is, bool readFields = true ); //- Construct and return a clone - autoPtr<coalParcel> clone() const + autoPtr<CoalParcel> clone() const { - return autoPtr<coalParcel>(new coalParcel(*this)); + return autoPtr<CoalParcel>(new CoalParcel(*this)); } //- Destructor - virtual ~coalParcel(); + virtual ~CoalParcel(); }; -template<> -inline bool contiguous<coalParcel>() -{ - return false; // Now have scalar lists/fields (mass fractions) -} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam +#ifdef NoRepository + #include "CoalParcel.C" +#endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDragModels.C b/src/lagrangian/coalCombustion/CoalParcel/defineCoalParcel.C similarity index 77% rename from src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDragModels.C rename to src/lagrangian/coalCombustion/CoalParcel/defineCoalParcel.C index 162e1d56c2e4295aa5c953502c398ca41b82f516..f5071d60305ef366ef1ceebebf789281fbf9eae9 100644 --- a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDragModels.C +++ b/src/lagrangian/coalCombustion/CoalParcel/defineCoalParcel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,21 +24,14 @@ License \*---------------------------------------------------------------------------*/ -#include "coalParcel.H" -#include "KinematicCloud.H" - -#include "NoDrag.H" -#include "SphereDrag.H" +#include "createCoalParcelTypes.H" +#include "CoalParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - makeDragModel(KinematicCloud<coalParcel>); - - // Add instances of drag model to the table - makeDragModelType(NoDrag, KinematicCloud, coalParcel); - makeDragModelType(SphereDrag, KinematicCloud, coalParcel); + createCoalParcelType(CoalParcel); }; diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelDispersionModels.C b/src/lagrangian/coalCombustion/CoalParcel/makeCoalParcelSubmodels.C similarity index 50% rename from src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelDispersionModels.C rename to src/lagrangian/coalCombustion/CoalParcel/makeCoalParcelSubmodels.C index f6444b1252fe479922e8b867a0ef06bf6629de33..1f6787228821a18226b28111b721621691bc6bb6 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelDispersionModels.C +++ b/src/lagrangian/coalCombustion/CoalParcel/makeCoalParcelSubmodels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,44 +24,47 @@ License \*---------------------------------------------------------------------------*/ -#include "basicKinematicParcel.H" -#include "KinematicCloud.H" +#include "CoalParcel.H" -#include "NoDispersion.H" -#include "GradientDispersionRAS.H" -#include "StochasticDispersionRAS.H" +// Kinematic +#include "makeReactingParcelDispersionModels.H" +#include "makeReactingParcelDragModels.H" +#include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant +#include "makeReactingParcelPatchInteractionModels.H" +#include "makeReactingParcelPostProcessingModels.H" + +// Thermodynamic +#include "makeReactingParcelHeatTransferModels.H" + +// Reacting +#include "makeReactingMultiphaseParcelCompositionModels.H" // MP variant +#include "makeReactingParcelPhaseChangeModels.H" + +// Reacting multiphase +#include "makeReactingMultiphaseParcelDevolatilisationModels.H" +#include "makeCoalParcelSurfaceReactionModels.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - makeDispersionModel(KinematicCloud<basicKinematicParcel>); - - defineNamedTemplateTypeNameAndDebug - ( - DispersionRASModel<KinematicCloud<basicKinematicParcel> >, - 0 - ); - - // Add instances of dispersion model to the table - makeDispersionModelType - ( - NoDispersion, - KinematicCloud, - basicKinematicParcel - ); - makeDispersionModelType - ( - GradientDispersionRAS, - KinematicCloud, - basicKinematicParcel - ); - makeDispersionModelType - ( - StochasticDispersionRAS, - KinematicCloud, - basicKinematicParcel - ); + // Kinematic sub-models + makeReactingDispersionModels(CoalParcel); + makeReactingDragModels(CoalParcel); + makeReactingMultiphaseInjectionModels(CoalParcel); + makeReactingPatchInteractionModels(CoalParcel); + makeReactingPostProcessingModels(CoalParcel); + + // Thermo sub-models + makeReactingHeatTransferModels(CoalParcel); + + // Reacting sub-models + makeReactingMultiphaseCompositionModels(CoalParcel); + makeReactingPhaseChangeModels(CoalParcel); + + // Reacting multiphase sub-models + makeReactingMultiphaseDevolatilisationModels(CoalParcel); + makeCoalSurfaceReactionModels(CoalParcel); }; diff --git a/src/lagrangian/coalCombustion/Make/files b/src/lagrangian/coalCombustion/Make/files index b31ee16529164c5642272756982255d03f9312fc..2c7aac61ab97d66fe76fab863c8186c643d3beba 100755 --- a/src/lagrangian/coalCombustion/Make/files +++ b/src/lagrangian/coalCombustion/Make/files @@ -1,22 +1,8 @@ -/* coal cloud */ -coalCloud/coalCloud.C - -/* coal parcel and sub-models */ -coalParcel/coalParcel.C -coalParcel/defineCoalParcel.C -coalParcel/submodels/makeCoalParcelCompositionModels.C -coalParcel/submodels/makeCoalParcelDevolatilisationModels.C -coalParcel/submodels/makeCoalParcelDragModels.C -coalParcel/submodels/makeCoalParcelDispersionModels.C -coalParcel/submodels/makeCoalParcelInjectionModels.C -coalParcel/submodels/makeCoalParcelHeatTransferModels.C -coalParcel/submodels/makeCoalParcelPhaseChangeModels.C -coalParcel/submodels/makeCoalParcelSurfaceReactionModels.C -coalParcel/submodels/makeCoalParcelWallInteractionModels.C - -submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C -submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C -submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C +/* Coal cloud */ +CoalCloud/defineCoalCloud.C +/* Coal parcel and sub-models */ +CoalParcel/defineCoalParcel.C +CoalParcel/makeCoalParcelSubmodels.C LIB = $(FOAM_LIBBIN)/libcoalCombustion diff --git a/src/lagrangian/coalCombustion/coalParcel/defineCoalParcel.C b/src/lagrangian/coalCombustion/coalParcel/defineCoalParcel.C deleted file mode 100644 index 2c41d8289833f546ba8e834e87332d66dc9140cb..0000000000000000000000000000000000000000 --- a/src/lagrangian/coalCombustion/coalParcel/defineCoalParcel.C +++ /dev/null @@ -1,50 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 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 "coalParcel.H" -#include "ReactingMultiphaseCloud.H" - -namespace Foam -{ - defineTemplateTypeNameAndDebug(Cloud<coalParcel>, 0); - - defineParcelTypeNameAndDebug(KinematicParcel<coalParcel>, 0); -// defineTemplateTypeNameAndDebug(KinematicParcel<coalParcel>, 0); - defineParcelTypeNameAndDebug(ThermoParcel<coalParcel>, 0); - defineTemplateTypeNameAndDebug(ThermoParcel<coalParcel>, 0); - defineParcelTypeNameAndDebug(ReactingParcel<coalParcel>, 0); - defineTemplateTypeNameAndDebug(ReactingParcel<coalParcel>, 0); - defineParcelTypeNameAndDebug(ReactingMultiphaseParcel<coalParcel>, 0); - defineTemplateTypeNameAndDebug(ReactingMultiphaseParcel<coalParcel>, 0); - - defineParcelTypeNameAndDebug(KinematicCloud<coalParcel>, 0); - defineParcelTypeNameAndDebug(ThermoCloud<coalParcel>, 0); - defineParcelTypeNameAndDebug(ReactingCloud<coalParcel>, 0); - defineParcelTypeNameAndDebug(ReactingMultiphaseCloud<coalParcel>, 0); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDevolatilisationModels.C b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDevolatilisationModels.C deleted file mode 100644 index 041a132d663ce94a05af8e8bb8a73f0d16d7e8bc..0000000000000000000000000000000000000000 --- a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDevolatilisationModels.C +++ /dev/null @@ -1,65 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "coalParcel.H" -#include "ReactingMultiphaseCloud.H" - -#include "NoDevolatilisation.H" -#include "ConstantRateDevolatilisation.H" -#include "SingleKineticRateDevolatilisation.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeDevolatilisationModel - ( - ReactingMultiphaseCloud<coalParcel> - ); - - // Add instances of devolatilisation model to the table - makeDevolatilisationModelType - ( - NoDevolatilisation, - ReactingMultiphaseCloud, - coalParcel - ); - makeDevolatilisationModelType - ( - ConstantRateDevolatilisation, - ReactingMultiphaseCloud, - coalParcel - ); - makeDevolatilisationModelType - ( - SingleKineticRateDevolatilisation, - ReactingMultiphaseCloud, - coalParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelPhaseChangeModels.C b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelPhaseChangeModels.C deleted file mode 100644 index ebacd714bd6a43339ce28bc041cb9c88452ced46..0000000000000000000000000000000000000000 --- a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelPhaseChangeModels.C +++ /dev/null @@ -1,58 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "coalParcel.H" -#include "ReactingCloud.H" - -#include "NoPhaseChange.H" -#include "LiquidEvaporation.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makePhaseChangeModel - ( - ReactingCloud<coalParcel> - ); - - // Add instances of phase change model to the table - makePhaseChangeModelType - ( - NoPhaseChange, - ReactingCloud, - coalParcel - ); - makePhaseChangeModelType - ( - LiquidEvaporation, - ReactingCloud, - coalParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelSurfaceReactionModels.C b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelSurfaceReactionModels.C deleted file mode 100644 index ee25d721f38212cebea8da261d3339df2c5cef8b..0000000000000000000000000000000000000000 --- a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelSurfaceReactionModels.C +++ /dev/null @@ -1,69 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 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 "coalParcel.H" -#include "ReactingMultiphaseCloud.H" - -#include "NoSurfaceReaction.H" -#include "COxidationDiffusionLimitedRate.H" -#include "COxidationKineticDiffusionLimitedRate.H" -#include "COxidationMurphyShaddix.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeSurfaceReactionModel(ReactingMultiphaseCloud<coalParcel>); - - // Add instances of surface reaction model to the table - makeSurfaceReactionModelType - ( - NoSurfaceReaction, - ReactingMultiphaseCloud, - coalParcel - ); - makeSurfaceReactionModelTypeInstance - ( - COxidationDiffusionLimitedRate, - ReactingMultiphaseCloud, - coalParcel - ); - makeSurfaceReactionModelTypeInstance - ( - COxidationKineticDiffusionLimitedRate, - ReactingMultiphaseCloud, - coalParcel - ); - makeSurfaceReactionModelTypeInstance - ( - COxidationMurphyShaddix, - ReactingMultiphaseCloud, - coalParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelWallInteractionModels.C b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelWallInteractionModels.C deleted file mode 100644 index fedf097d4f0165875e5b0d10fb52aad0a010aae6..0000000000000000000000000000000000000000 --- a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelWallInteractionModels.C +++ /dev/null @@ -1,55 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 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 "coalParcel.H" -#include "ReactingCloud.H" - -#include "Rebound.H" -#include "StandardWallInteraction.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeWallInteractionModel(KinematicCloud<coalParcel>); - - // Add instances of wall interaction model to the table - makeWallInteractionModelType - ( - Rebound, - KinematicCloud, - coalParcel - ); - makeWallInteractionModelType - ( - StandardWallInteraction, - KinematicCloud, - coalParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/include/createCoalParcelTypes.H b/src/lagrangian/coalCombustion/include/createCoalParcelTypes.H new file mode 100644 index 0000000000000000000000000000000000000000..4c0668668379a0cbbf744e9dfa3867669d34b5f2 --- /dev/null +++ b/src/lagrangian/coalCombustion/include/createCoalParcelTypes.H @@ -0,0 +1,98 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef createCoalParcelTypes_H +#define createCoalParcelTypes_H + +#include "makeParcelIOList.H" +#include "reactingThermoTypes.H" +#include "CoalCloud.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define createCoalParcelType(ParcelType) \ + \ + createCoalParcelThermoType \ + ( \ + ParcelType, \ + specieConstProperties \ + ); \ + createCoalParcelThermoType \ + ( \ + ParcelType, \ + specieReactingProperties \ + ); + + +#define createCoalParcelThermoType(ParcelType, ThermoType) \ + \ + typedef ParcelType<ThermoType> ParcelType##ThermoType; \ + \ + makeParcelIOList(ParcelType##ThermoType); \ + \ + defineTemplateTypeNameAndDebug(ParcelType##ThermoType, 0); \ + defineTemplateTypeNameAndDebug(Particle<ParcelType##ThermoType>, 0); \ + defineTemplateTypeNameAndDebug(Cloud<ParcelType##ThermoType>, 0); \ + \ + defineParcelTypeNameAndDebug(KinematicParcel<ParcelType##ThermoType>, 0); \ + defineTemplateTypeNameAndDebug \ + ( \ + KinematicParcel<ParcelType##ThermoType>, \ + 0 \ + ); \ + defineParcelTypeNameAndDebug(ThermoParcel<ParcelType##ThermoType>, 0); \ + defineTemplateTypeNameAndDebug(ThermoParcel<ParcelType##ThermoType>, 0); \ + defineParcelTypeNameAndDebug(ReactingParcel<ParcelType##ThermoType>, 0); \ + defineTemplateTypeNameAndDebug(ReactingParcel<ParcelType##ThermoType>, 0);\ + defineParcelTypeNameAndDebug \ + ( \ + ReactingMultiphaseParcel<ParcelType##ThermoType>, \ + 0 \ + ); \ + defineTemplateTypeNameAndDebug \ + ( \ + ReactingMultiphaseParcel<ParcelType##ThermoType>, \ + 0 \ + ); \ + defineParcelTypeNameAndDebug(CoalParcel<ParcelType##ThermoType>, 0); \ + defineTemplateTypeNameAndDebug(CoalParcel<ParcelType##ThermoType>, 0); \ + \ + defineParcelTypeNameAndDebug(KinematicCloud<ParcelType##ThermoType>, 0); \ + defineParcelTypeNameAndDebug(ThermoCloud<ParcelType##ThermoType>, 0); \ + defineParcelTypeNameAndDebug(ReactingCloud<ParcelType##ThermoType>, 0); \ + defineParcelTypeNameAndDebug \ + ( \ + ReactingMultiphaseCloud<ParcelType##ThermoType>, \ + 0 \ + ); \ + defineParcelTypeNameAndDebug(CoalCloud<ParcelType##ThermoType>, 0); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/include/makeCoalParcelSurfaceReactionModels.H b/src/lagrangian/coalCombustion/include/makeCoalParcelSurfaceReactionModels.H new file mode 100644 index 0000000000000000000000000000000000000000..1f60f47d9d5b48d0594eae236f89eb11bda0416a --- /dev/null +++ b/src/lagrangian/coalCombustion/include/makeCoalParcelSurfaceReactionModels.H @@ -0,0 +1,97 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeCoalParcelSurfaceReactionModels_H +#define makeCoalParcelSurfaceReactionModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "reactingThermoTypes.H" +#include "ReactingMultiphaseCloud.H" + +#include "NoSurfaceReaction.H" +#include "COxidationDiffusionLimitedRate.H" +#include "COxidationKineticDiffusionLimitedRate.H" +#include "COxidationMurphyShaddix.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeCoalSurfaceReactionModels(ParcelType) \ + \ + makeCoalSurfaceReactionModelThermoType \ + ( \ + ParcelType, \ + specieConstProperties \ + ); \ + makeCoalSurfaceReactionModelThermoType \ + ( \ + ParcelType, \ + specieReactingProperties \ + ); + + +#define makeCoalSurfaceReactionModelThermoType(ParcelType, ThermoType) \ + \ + makeSurfaceReactionModel \ + ( \ + ReactingMultiphaseCloud<ParcelType<ThermoType> > \ + ); \ + \ + makeSurfaceReactionModelThermoType \ + ( \ + NoSurfaceReaction, \ + ReactingMultiphaseCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeSurfaceReactionModelThermoType \ + ( \ + COxidationDiffusionLimitedRate, \ + ReactingMultiphaseCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeSurfaceReactionModelThermoType \ + ( \ + COxidationKineticDiffusionLimitedRate, \ + ReactingMultiphaseCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeSurfaceReactionModelThermoType \ + ( \ + COxidationMurphyShaddix, \ + ReactingMultiphaseCloud, \ + ParcelType, \ + ThermoType \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C index 7e8f2a0e2ba320f56e4ae5fbdbcec0ef9bd3a622..6c44dc9da86e5cbe7ad406dc5799cfa32b07e361 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,18 +28,14 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::COxidationDiffusionLimitedRate::COxidationDiffusionLimitedRate +template<class CloudType> +Foam::COxidationDiffusionLimitedRate<CloudType>::COxidationDiffusionLimitedRate ( const dictionary& dict, - ReactingMultiphaseCloud<coalParcel>& owner + CloudType& owner ) : - SurfaceReactionModel<ReactingMultiphaseCloud<coalParcel> > - ( - dict, - owner, - typeName - ), + SurfaceReactionModel<CloudType>(dict, owner, typeName), Sb_(dimensionedScalar(this->coeffDict().lookup("Sb")).value()), D_(dimensionedScalar(this->coeffDict().lookup("D")).value()), CsLocalId_(-1), @@ -63,10 +59,10 @@ Foam::COxidationDiffusionLimitedRate::COxidationDiffusionLimitedRate { FatalErrorIn ( - "COxidationDiffusionLimitedRate" + "COxidationDiffusionLimitedRate<CloudType>" "(" "const dictionary&, " - "ReactingMultiphaseCloud<coalParcel>&" + "CloudType&" ")" ) << "Stoichiometry of reaction, Sb, must be greater than zero" << nl << exit(FatalError); @@ -76,19 +72,23 @@ Foam::COxidationDiffusionLimitedRate::COxidationDiffusionLimitedRate // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::COxidationDiffusionLimitedRate::~COxidationDiffusionLimitedRate() +template<class CloudType> +Foam::COxidationDiffusionLimitedRate<CloudType>:: +~COxidationDiffusionLimitedRate() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool Foam::COxidationDiffusionLimitedRate::active() const +template<class CloudType> +bool Foam::COxidationDiffusionLimitedRate<CloudType>::active() const { return true; } -Foam::scalar Foam::COxidationDiffusionLimitedRate::calculate +template<class CloudType> +Foam::scalar Foam::COxidationDiffusionLimitedRate<CloudType>::calculate ( const scalar dt, const label cellI, @@ -110,7 +110,8 @@ Foam::scalar Foam::COxidationDiffusionLimitedRate::calculate ) const { // Fraction of remaining combustible material - const scalar fComb = YMixture[coalParcel::SLD]*YSolid[CsLocalId_]; + const label idSolid = CloudType::parcelType::SLD; + const scalar fComb = YMixture[idSolid]*YSolid[CsLocalId_]; // Surface combustion active combustible fraction is consumed if (fComb < SMALL) @@ -120,7 +121,7 @@ Foam::scalar Foam::COxidationDiffusionLimitedRate::calculate // Local mass fraction of O2 in the carrier phase const scalar YO2 = - owner().carrierThermo().composition().Y(O2GlobalId_)[cellI]; + this->owner().carrierThermo().composition().Y(O2GlobalId_)[cellI]; // Change in C mass [kg] scalar dmC = diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H index 4458a6e31e2ad4ee5e37827596322d119916d75a..9ab6a5c0f940450b350f8100b6217c387ecc5afe 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,19 +38,23 @@ Description #define COxidationDiffusionLimitedRate_H #include "SurfaceReactionModel.H" -#include "coalParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Forward class declarations +template<class CloudType> +class COxidationDiffusionLimitedRate; + namespace Foam { /*---------------------------------------------------------------------------*\ - Class COxidationDiffusionLimitedRate Declaration + Class COxidationDiffusionLimitedRate Declaration \*---------------------------------------------------------------------------*/ +template<class CloudType> class COxidationDiffusionLimitedRate : - public SurfaceReactionModel<ReactingMultiphaseCloud<coalParcel> > + public SurfaceReactionModel<CloudType> { // Private data @@ -99,7 +103,7 @@ public: COxidationDiffusionLimitedRate ( const dictionary& dict, - ReactingMultiphaseCloud<coalParcel>& owner + CloudType& owner ); @@ -142,6 +146,12 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository + #include "COxidationDiffusionLimitedRate.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C index 078cd100d73c6f66a7a859de8695fca4bf65b5d8..d21efd77e8b0b612b8a4c0d8bb22d3ce41a894f9 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,14 +28,15 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::COxidationKineticDiffusionLimitedRate:: +template<class CloudType> +Foam::COxidationKineticDiffusionLimitedRate<CloudType>:: COxidationKineticDiffusionLimitedRate ( const dictionary& dict, - ReactingMultiphaseCloud<coalParcel>& owner + CloudType& owner ) : - SurfaceReactionModel<ReactingMultiphaseCloud<coalParcel> > + SurfaceReactionModel<CloudType> ( dict, owner, @@ -69,7 +70,7 @@ COxidationKineticDiffusionLimitedRate "COxidationKineticDiffusionLimitedRate" "(" "const dictionary&, " - "ReactingMultiphaseCloud<coalParcel>&" + "CloudType&" ")" ) << "Stoichiometry of reaction, Sb, must be greater than zero" << nl << exit(FatalError); @@ -79,20 +80,23 @@ COxidationKineticDiffusionLimitedRate // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::COxidationKineticDiffusionLimitedRate:: +template<class CloudType> +Foam::COxidationKineticDiffusionLimitedRate<CloudType>:: ~COxidationKineticDiffusionLimitedRate() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool Foam::COxidationKineticDiffusionLimitedRate::active() const +template<class CloudType> +bool Foam::COxidationKineticDiffusionLimitedRate<CloudType>::active() const { return true; } -Foam::scalar Foam::COxidationKineticDiffusionLimitedRate::calculate +template<class CloudType> +Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate ( const scalar dt, const label cellI, @@ -114,7 +118,8 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate::calculate ) const { // Fraction of remaining combustible material - const scalar fComb = YMixture[coalParcel::SLD]*YSolid[CsLocalId_]; + const label idSolid = CloudType::parcelType::SLD; + const scalar fComb = YMixture[idSolid]*YSolid[CsLocalId_]; // Surface combustion active combustible fraction is consumed if (fComb < SMALL) @@ -124,7 +129,7 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate::calculate // Local mass fraction of O2 in the carrier phase const scalar YO2 = - owner().carrierThermo().composition().Y(O2GlobalId_)[cellI]; + this->owner().carrierThermo().composition().Y(O2GlobalId_)[cellI]; // Diffusion rate coefficient const scalar D0 = C1_/d*pow(0.5*(T + Tc), 0.75); diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H index 1073cb637f8a69e62d45e41f74bd733b0ef4ac7b..6500b24c4ffd82f89501bbaf350e433ceb79ac1f 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,19 +39,24 @@ Description #define COxidationKineticDiffusionLimitedRate_H #include "SurfaceReactionModel.H" -#include "coalParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { + +// Forward class declarations +template<class CloudType> +class COxidationKineticDiffusionLimitedRate; + /*---------------------------------------------------------------------------*\ Class COxidationKineticDiffusionLimitedRate Declaration \*---------------------------------------------------------------------------*/ +template<class CloudType> class COxidationKineticDiffusionLimitedRate : - public SurfaceReactionModel<ReactingMultiphaseCloud<coalParcel> > + public SurfaceReactionModel<CloudType> { // Private data @@ -106,7 +111,7 @@ public: COxidationKineticDiffusionLimitedRate ( const dictionary& dict, - ReactingMultiphaseCloud<coalParcel>& owner + CloudType& owner ); @@ -149,6 +154,12 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository + #include "COxidationKineticDiffusionLimitedRate.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C index 265b4b66434f42f60731a8bbf6f80b80168f7dc9..c7c8dd795582d9ce079240f1b65bf2bc69740080 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,20 +28,23 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -Foam::label Foam::COxidationMurphyShaddix::maxIters_ = 1000; +template<class CloudType> +Foam::label Foam::COxidationMurphyShaddix<CloudType>::maxIters_ = 1000; -Foam::scalar Foam::COxidationMurphyShaddix::tolerance_ = 1e-06; +template<class CloudType> +Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::tolerance_ = 1e-06; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::COxidationMurphyShaddix::COxidationMurphyShaddix +template<class CloudType> +Foam::COxidationMurphyShaddix<CloudType>::COxidationMurphyShaddix ( const dictionary& dict, - ReactingMultiphaseCloud<coalParcel>& owner + CloudType& owner ) : - SurfaceReactionModel<ReactingMultiphaseCloud<coalParcel> > + SurfaceReactionModel<CloudType> ( dict, owner, @@ -59,36 +62,37 @@ Foam::COxidationMurphyShaddix::COxidationMurphyShaddix O2GlobalId_(owner.composition().globalCarrierId("O2")), CO2GlobalId_(owner.composition().globalCarrierId("CO2")), WC_(0.0), - WO2_(0.0), - HcCO2_(0.0) + WO2_(0.0) { // Determine Cs ids label idSolid = owner.composition().idSolid(); - CsLocalId_ = owner.composition().localId(idSolid, "Cs"); + CsLocalId_ = owner.composition().localId(idSolid, "C"); // Set local copies of thermo properties WO2_ = owner.composition().carrierSpecies()[O2GlobalId_].W(); scalar WCO2 = owner.composition().carrierSpecies()[CO2GlobalId_].W(); WC_ = WCO2 - WO2_; - HcCO2_ = owner.composition().carrierSpecies()[CO2GlobalId_].Hc(); } // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::COxidationMurphyShaddix::~COxidationMurphyShaddix() +template<class CloudType> +Foam::COxidationMurphyShaddix<CloudType>::~COxidationMurphyShaddix() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool Foam::COxidationMurphyShaddix::active() const +template<class CloudType> +bool Foam::COxidationMurphyShaddix<CloudType>::active() const { return true; } -Foam::scalar Foam::COxidationMurphyShaddix::calculate +template<class CloudType> +Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate ( const scalar dt, const label cellI, @@ -110,7 +114,8 @@ Foam::scalar Foam::COxidationMurphyShaddix::calculate ) const { // Fraction of remaining combustible material - const scalar fComb = YMixture[coalParcel::SLD]*YSolid[CsLocalId_]; + const label idSolid = CloudType::parcelType::SLD; + const scalar fComb = YMixture[idSolid]*YSolid[CsLocalId_]; // Surface combustion until combustible fraction is consumed if (fComb < SMALL) @@ -120,7 +125,7 @@ Foam::scalar Foam::COxidationMurphyShaddix::calculate // Cell carrier phase O2 species density [kg/m^3] const scalar rhoO2 = - rhoc*owner().carrierThermo().composition().Y(O2GlobalId_)[cellI]; + rhoc*this->owner().carrierThermo().composition().Y(O2GlobalId_)[cellI]; if (rhoO2 < SMALL) { @@ -186,8 +191,10 @@ Foam::scalar Foam::COxidationMurphyShaddix::calculate if (iter > maxIters_) { - WarningIn("scalar Foam::COxidationMurphyShaddix::calculate(...)") - << "iter limit reached (" << maxIters_ << ")" << nl << endl; + WarningIn + ( + "scalar Foam::COxidationMurphyShaddix<CloudType>::calculate(...)" + ) << "iter limit reached (" << maxIters_ << ")" << nl << endl; } // Calculate the number of molar units reacted @@ -200,8 +207,16 @@ Foam::scalar Foam::COxidationMurphyShaddix::calculate // Add to particle mass transfer dMassSolid[CsLocalId_] += dOmega*WC_; + const scalar HC = + this->owner().composition().solids().properties()[CsLocalId_].Hf() + + this->owner().composition().solids().properties()[CsLocalId_].cp()*T; + const scalar HCO2 = + this->owner().composition().carrierSpecies()[CO2GlobalId_].H(T); + const scalar HO2 = + this->owner().composition().carrierSpecies()[O2GlobalId_].H(T); + // Heat of reaction - return -HcCO2_*dOmega*WC_; + return dOmega*(WC_*HC + WO2_*HO2 - (WC_ + WO2_)*HCO2); } diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H index bc026db3646680cd1d9bac14d0f6f65d702c6544..7864fc63372bc1b34489e9bdedc49b6d402dd54a 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,19 +34,24 @@ Description #define COxidationMurphyShaddix_H #include "SurfaceReactionModel.H" -#include "coalParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { + +// Forward class declarations +template<class CloudType> +class COxidationMurphyShaddix; + /*---------------------------------------------------------------------------*\ Class COxidationMurphyShaddix Declaration \*---------------------------------------------------------------------------*/ +template<class CloudType> class COxidationMurphyShaddix : - public SurfaceReactionModel<ReactingMultiphaseCloud<coalParcel> > + public SurfaceReactionModel<CloudType> { // Private data @@ -106,9 +111,6 @@ class COxidationMurphyShaddix //- Molecular weight of O2 [kg/kmol] scalar WO2_; - //- Chemical enthalpy of CO2 [J/kg] - scalar HcCO2_; - public: @@ -122,7 +124,7 @@ public: COxidationMurphyShaddix ( const dictionary& dict, - ReactingMultiphaseCloud<coalParcel>& owner + CloudType& owner ); @@ -165,6 +167,12 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository + #include "COxidationMurphyShaddix.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/parcel/parcel.C b/src/lagrangian/dieselSpray/parcel/parcel.C index 1af26992010a1e8d1cf4ab5a780eacddde5237a3..4d19f332fd3aa3901af43bedd62c8bc789a199ee 100644 --- a/src/lagrangian/dieselSpray/parcel/parcel.C +++ b/src/lagrangian/dieselSpray/parcel/parcel.C @@ -696,6 +696,4 @@ void Foam::parcel::transformProperties(const vector&) {} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - // ************************************************************************* // diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C index 53177e9afebcc5a263917230543768ee48c5ebe1..30d7671fdbcf8e4b42295f67334c5fa178f534b9 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C @@ -527,20 +527,20 @@ void Foam::DsmcCloud<ParcelType>::addNewParcel template<class ParcelType> Foam::DsmcCloud<ParcelType>::DsmcCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& T, const volVectorField& U ) : - Cloud<ParcelType>(T.mesh(), cloudType, false), + Cloud<ParcelType>(T.mesh(), cloudName, false), DsmcBaseCloud(), - cloudType_(cloudType), + cloudName_(cloudName), mesh_(T.mesh()), particleProperties_ ( IOobject ( - cloudType + "Properties", + cloudName + "Properties", mesh_.time().constant(), mesh_, IOobject::MUST_READ, @@ -639,19 +639,19 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud template<class ParcelType> Foam::DsmcCloud<ParcelType>::DsmcCloud ( - const word& cloudType, + const word& cloudName, const fvMesh& mesh ) : - Cloud<ParcelType>(mesh, cloudType, false), + Cloud<ParcelType>(mesh, cloudName, false), DsmcBaseCloud(), - cloudType_(cloudType), + cloudName_(cloudName), mesh_(mesh), particleProperties_ ( IOobject ( - cloudType + "Properties", + cloudName + "Properties", mesh_.time().constant(), mesh_, IOobject::MUST_READ, diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.H b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.H index 20bed1ee7b14429c66fcc90b2dcb52023ff73241..46634e6dd903ece27ed83fec3975bc0156dfe7e1 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.H +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.H @@ -76,7 +76,7 @@ class DsmcCloud //- Cloud type - used to set the name of the parcel properties // dictionary by appending "Properties" - const word cloudType_; + const word cloudName_; //- References to the mesh and time databases const fvMesh& mesh_; @@ -181,7 +181,7 @@ public: //- Construct given name and mesh, will read Parcels from file DsmcCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& T, const volVectorField& U ); @@ -189,7 +189,7 @@ public: //- Construct given name and mesh. Used to initialise. DsmcCloud ( - const word& cloudType, + const word& cloudName, const fvMesh& mesh ); @@ -205,7 +205,7 @@ public: // References to the mesh and databases //- Return the cloud type - inline const word& cloudType() const; + inline const word& cloudName() const; //- Return refernce to the mesh inline const fvMesh& mesh() const; diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H index d39de4954faa1a062ab15da0d878e736d542b42e..abc4b1d4c69a89cc828d2134652433a45802c7fe 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H @@ -27,9 +27,9 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class ParcelType> -inline const Foam::word& Foam::DsmcCloud<ParcelType>::cloudType() const +inline const Foam::word& Foam::DsmcCloud<ParcelType>::cloudName() const { - return cloudType_; + return cloudName_; } diff --git a/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.C b/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.C index 000ffcd53efb82dc4454009b3a28dc9c715cf124..d501dbf3d5d87d7a79b7d56512ddad465a838ca5 100644 --- a/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.C +++ b/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.C @@ -38,12 +38,12 @@ namespace Foam Foam::dsmcCloud::dsmcCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& T, const volVectorField& U ) : - DsmcCloud<dsmcParcel>(cloudType, T, U) + DsmcCloud<dsmcParcel>(cloudName, T, U) { dsmcParcel::readFields(*this); } @@ -51,11 +51,11 @@ Foam::dsmcCloud::dsmcCloud Foam::dsmcCloud::dsmcCloud ( - const word& cloudType, + const word& cloudName, const fvMesh& mesh ) : - DsmcCloud<dsmcParcel>(cloudType, mesh) + DsmcCloud<dsmcParcel>(cloudName, mesh) {} diff --git a/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.H b/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.H index 2f88bbaad563dbb99fef716f22256416ae98bc15..027ad2afec41d2a41f7ef11cc25667dbf6cccc25 100644 --- a/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.H +++ b/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.H @@ -72,7 +72,7 @@ public: //- Construct from components dsmcCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& T, const volVectorField& U ); @@ -80,7 +80,7 @@ public: //- Construct from name and mesh, used to initialise. dsmcCloud ( - const word& cloudType, + const word& cloudName, const fvMesh& mesh ); diff --git a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.C b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.C index f9c135718947fab6e8637c6ca0b24221864f2630..0c43cf1534952eba6fd5b5a79bd43b3ab6ef56d7 100644 --- a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.C +++ b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.C @@ -61,15 +61,9 @@ bool Foam::DsmcParcel<ParcelType>::move if (p.onBoundary() && td.keepParticle) { - if (p.face() > -1) + if (isType<processorPolyPatch>(pbMesh[p.patch(p.face())])) { - if - ( - isType<processorPolyPatch>(pbMesh[p.patch(p.face())]) - ) - { - td.switchProcessor = true; - } + td.switchProcessor = true; } } } @@ -78,6 +72,19 @@ bool Foam::DsmcParcel<ParcelType>::move } +template<class ParcelType> +template<class TrackData> +bool Foam::DsmcParcel<ParcelType>::hitPatch +( + const polyPatch&, + TrackData& td, + const label patchI +) +{ + return false; +} + + template<class ParcelType> template<class TrackData> void Foam::DsmcParcel<ParcelType>::hitProcessorPatch diff --git a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H index bbc2fd1539b2fa4f5a267c2b942fe3373ebe635b..17b2877b448c37ebcbf63051b153238048e60454 100644 --- a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H +++ b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H @@ -239,6 +239,16 @@ public: // Patch interactions + //- Overridable function to handle the particle hitting a patch + // Executed before other patch-hitting functions + template<class TrackData> + bool hitPatch + ( + const polyPatch&, + TrackData& td, + const label patchI + ); + //- Overridable function to handle the particle hitting a // processorPatch template<class TrackData> diff --git a/src/lagrangian/intermediate/Make/files b/src/lagrangian/intermediate/Make/files index 4b371547f8678df5fcf81de218992fa93da50297..de8bcd332129c0d94f42c8f818b3d6aa0359ea02 100644 --- a/src/lagrangian/intermediate/Make/files +++ b/src/lagrangian/intermediate/Make/files @@ -1,70 +1,61 @@ PARCELS=parcels +BASEPARCELS=$(PARCELS)/baseClasses DERIVEDPARCELS=$(PARCELS)/derived +CLOUDS=clouds +BASECLOUDS=$(CLOUDS)/baseClasses +DERIVEDCLOUDS=$(CLOUDS)/derived + + /* Parcels */ -$(DERIVEDPARCELS)/basicKinematicParcel/basicKinematicParcel.C -$(DERIVEDPARCELS)/basicThermoParcel/basicThermoParcel.C -$(DERIVEDPARCELS)/basicReactingParcel/basicReactingParcel.C -$(DERIVEDPARCELS)/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.C +$(BASEPARCELS)/reactingParcel/reactingParcel.C /* Cloud base classes */ -clouds/baseClasses/kinematicCloud/kinematicCloud.C -clouds/baseClasses/thermoCloud/thermoCloud.C -clouds/baseClasses/reactingCloud/reactingCloud.C -clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.C +$(BASECLOUDS)/kinematicCloud/kinematicCloud.C +$(BASECLOUDS)/thermoCloud/thermoCloud.C +$(BASECLOUDS)/reactingCloud/reactingCloud.C +$(BASECLOUDS)/reactingMultiphaseCloud/reactingMultiphaseCloud.C /* Cloud container/injection mechanisms */ -clouds/derived/basicKinematicCloud/basicKinematicCloud.C -clouds/derived/basicThermoCloud/basicThermoCloud.C -clouds/derived/basicReactingCloud/basicReactingCloud.C -clouds/derived/basicReactingMultiphaseCloud/basicReactingMultiphaseCloud.C +$(DERIVEDCLOUDS)/basicKinematicCloud/basicKinematicCloud.C +$(DERIVEDCLOUDS)/basicThermoCloud/basicThermoCloud.C +$(DERIVEDCLOUDS)/BasicReactingCloud/defineBasicReactingCloud.C +$(DERIVEDCLOUDS)/BasicReactingMultiphaseCloud/defineBasicReactingMultiphaseCloud.C +$(DERIVEDCLOUDS)/BasicTrackedReactingCloud/defineBasicTrackedReactingCloud.C /* kinematic parcel sub-models */ KINEMATICPARCEL=$(DERIVEDPARCELS)/basicKinematicParcel +$(KINEMATICPARCEL)/basicKinematicParcel.C $(KINEMATICPARCEL)/defineBasicKinematicParcel.C -$(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelDispersionModels.C -$(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelDragModels.C -$(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelInjectionModels.C -$(KINEMATICPARCEL)/submodels/makeBasicKinematicParcelWallInteractionModels.C +$(KINEMATICPARCEL)/makeBasicKinematicParcelSubmodels.C /* thermo parcel sub-models */ THERMOPARCEL=$(DERIVEDPARCELS)/basicThermoParcel +$(THERMOPARCEL)/basicThermoParcel.C $(THERMOPARCEL)/defineBasicThermoParcel.C -$(THERMOPARCEL)/submodels/makeBasicThermoParcelDispersionModels.C -$(THERMOPARCEL)/submodels/makeBasicThermoParcelDragModels.C -$(THERMOPARCEL)/submodels/makeBasicThermoParcelHeatTransferModels.C -$(THERMOPARCEL)/submodels/makeBasicThermoParcelInjectionModels.C -$(THERMOPARCEL)/submodels/makeBasicThermoParcelWallInteractionModels.C +$(THERMOPARCEL)/makeBasicThermoParcelSubmodels.C /* reacting parcel sub-models */ -REACTINGPARCEL=$(DERIVEDPARCELS)/basicReactingParcel +REACTINGPARCEL=$(DERIVEDPARCELS)/BasicReactingParcel $(REACTINGPARCEL)/defineBasicReactingParcel.C -$(REACTINGPARCEL)/submodels/makeBasicReactingParcelCompositionModels.C -$(REACTINGPARCEL)/submodels/makeBasicReactingParcelDispersionModels.C -$(REACTINGPARCEL)/submodels/makeBasicReactingParcelDragModels.C -$(REACTINGPARCEL)/submodels/makeBasicReactingParcelHeatTransferModels.C -$(REACTINGPARCEL)/submodels/makeBasicReactingParcelInjectionModels.C -$(REACTINGPARCEL)/submodels/makeBasicReactingParcelPhaseChangeModels.C -$(REACTINGPARCEL)/submodels/makeBasicReactingParcelWallInteractionModels.C +$(REACTINGPARCEL)/makeBasicReactingParcelSubmodels.C + + +/* tracked reacting parcel sub-models */ +TRACKEDREACTINGPARCEL=$(DERIVEDPARCELS)/BasicTrackedReactingParcel +$(TRACKEDREACTINGPARCEL)/defineTrackedReactingParcel.C +$(TRACKEDREACTINGPARCEL)/makeBasicTrackedReactingParcelSubmodels.C /* reacting multiphase parcel sub-models */ -REACTINGMPPARCEL=$(DERIVEDPARCELS)/basicReactingMultiphaseParcel +REACTINGMPPARCEL=$(DERIVEDPARCELS)/BasicReactingMultiphaseParcel $(REACTINGMPPARCEL)/defineBasicReactingMultiphaseParcel.C -$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelCompositionModels.C -$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelDevolatilisationModels.C -$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelDispersionModels.C -$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelDragModels.C -$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelHeatTransferModels.C -$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelInjectionModels.C -$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelPhaseChangeModels.C -$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelSurfaceReactionModels.C -$(REACTINGMPPARCEL)/submodels/makeBasicReactingMultiphaseParcelWallInteractionModels.C +$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelSubmodels.C /* bolt-on models */ @@ -72,6 +63,11 @@ submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsor submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.C +/* data entries */ +submodels/IO/DataEntry/makeDataEntries.C +submodels/IO/DataEntry/polynomial/polynomial.C + + /* integration schemes */ IntegrationScheme/makeIntegrationSchemes.C @@ -86,9 +82,4 @@ phaseProperties/phaseProperties/phasePropertiesIO.C phaseProperties/phasePropertiesList/phasePropertiesList.C -/* data entries */ -submodels/IO/DataEntry/makeDataEntries.C -submodels/IO/DataEntry/polynomial/polynomial.C - - LIB = $(FOAM_LIBBIN)/liblagrangianIntermediate diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index 2058dde5ea1a8ef18a6813b41a3c97f4c2bcf132..2f96ae1418ee6d1365a2a87e2380cadefc398b70 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -31,62 +31,29 @@ License #include "DispersionModel.H" #include "DragModel.H" #include "InjectionModel.H" -#include "WallInteractionModel.H" - - -// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // - -template<class ParcelType> -void Foam::KinematicCloud<ParcelType>::addNewParcel -( - const vector& position, - const label cellId, - const scalar d, - const vector& U, - const scalar nParticles, - const scalar lagrangianDt -) -{ - ParcelType* pPtr = new ParcelType - ( - *this, - position, - cellId, - parcelTypeId_, - nParticles, - d, - U, - constProps_ - ); - - scalar continuousDt = this->db().time().deltaT().value(); - pPtr->stepFraction() = (continuousDt - lagrangianDt)/continuousDt; - - addParticle(pPtr); -} - +#include "PatchInteractionModel.H" +#include "PostProcessingModel.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class ParcelType> Foam::KinematicCloud<ParcelType>::KinematicCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const volScalarField& mu, const dimensionedVector& g ) : - Cloud<ParcelType>(rho.mesh(), cloudType, false), + Cloud<ParcelType>(rho.mesh(), cloudName, false), kinematicCloud(), - cloudType_(cloudType), mesh_(rho.mesh()), particleProperties_ ( IOobject ( - cloudType + "Properties", + cloudName + "Properties", rho.mesh().time().constant(), rho.mesh(), IOobject::MUST_READ, @@ -131,14 +98,22 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud *this ) ), - wallInteractionModel_ + patchInteractionModel_ ( - WallInteractionModel<KinematicCloud<ParcelType> >::New + PatchInteractionModel<KinematicCloud<ParcelType> >::New ( particleProperties_, *this ) ), + postProcessingModel_ + ( + PostProcessingModel<KinematicCloud<ParcelType> >::New + ( + this->particleProperties_, + *this + ) + ), UIntegrator_ ( vectorIntegrationScheme::New @@ -173,6 +148,24 @@ Foam::KinematicCloud<ParcelType>::~KinematicCloud() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template<class ParcelType> +void Foam::KinematicCloud<ParcelType>::checkParcelProperties +( + ParcelType* pPtr, + const scalar lagrangianDt, + const bool fullyDescribed +) +{ + if (!fullyDescribed) + { + pPtr->rho() = constProps_.rho0(); + } + + scalar carrierDt = this->db().time().deltaT().value(); + pPtr->stepFraction() = (carrierDt - lagrangianDt)/carrierDt; +} + + template<class ParcelType> void Foam::KinematicCloud<ParcelType>::resetSourceTerms() { @@ -227,6 +220,8 @@ void Foam::KinematicCloud<ParcelType>::evolve() } Cloud<ParcelType>::move(td); + + this->postProcessing().post(); } diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H index 0a27aede96010b26dba378820285e3b6c7e746ff..2dcd277a1db0e9d4ed53b68e1968c929d17ca130 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H @@ -72,7 +72,10 @@ template<class CloudType> class InjectionModel; template<class CloudType> -class WallInteractionModel; +class PostProcessingModel; + +template<class CloudType> +class PatchInteractionModel; /*---------------------------------------------------------------------------*\ Class KinematicCloud Declaration @@ -84,11 +87,18 @@ class KinematicCloud public Cloud<ParcelType>, public kinematicCloud { - // Private data + // Private Member Functions + + //- Disallow default bitwise copy construct + KinematicCloud(const KinematicCloud&); + + //- Disallow default bitwise assignment + void operator=(const KinematicCloud&); - //- Cloud type - used to set the name of the parcel properties - // dictionary by appending "Properties" - const word cloudType_; + +protected: + + // Protected data //- References to the mesh and time databases const fvMesh& mesh_; @@ -153,9 +163,13 @@ class KinematicCloud autoPtr<InjectionModel<KinematicCloud<ParcelType> > > injectionModel_; - //- Wall interaction model - autoPtr<WallInteractionModel<KinematicCloud<ParcelType> > > - wallInteractionModel_; + //- Patch interaction model + autoPtr<PatchInteractionModel<KinematicCloud<ParcelType> > > + patchInteractionModel_; + + //- Post-processing model + autoPtr<PostProcessingModel<KinematicCloud<ParcelType> > > + postProcessingModel_; // Reference to the particle integration schemes @@ -170,15 +184,6 @@ class KinematicCloud DimensionedField<vector, volMesh> UTrans_; - // Private Member Functions - - //- Disallow default bitwise copy construct - KinematicCloud(const KinematicCloud&); - - //- Disallow default bitwise assignment - void operator=(const KinematicCloud&); - - public: // Constructors @@ -186,7 +191,7 @@ public: //- Construct given carrier gas fields KinematicCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const volScalarField& mu, @@ -208,9 +213,6 @@ public: // References to the mesh and databases - //- Return the cloud type - inline const word& cloudType() const; - //- Return the parcel type id inline label parcelTypeId() const; @@ -277,27 +279,33 @@ public: // Sub-models - //- Return reference to dispersion model + //- Return const-access to the dispersion model inline const DispersionModel<KinematicCloud<ParcelType> >& dispersion() const; + //- Return reference to the dispersion model inline DispersionModel<KinematicCloud<ParcelType> >& dispersion(); - //- Return reference to drag model + //- Return const-access to the drag model inline const DragModel<KinematicCloud<ParcelType> >& drag() const; - //- Return reference to injection model + //- Return const access to the injection model inline const InjectionModel<KinematicCloud<ParcelType> >& injection() const; + //- Return reference to the injection model inline InjectionModel<KinematicCloud<ParcelType> >& injection(); - //- Return reference to wall interaction model - inline const WallInteractionModel<KinematicCloud<ParcelType> >& - wallInteraction() const; + //- Return const-access to the patch interaction model + inline const PatchInteractionModel<KinematicCloud<ParcelType> >& + patchInteraction() const; + + //- Return reference to post-processing model + inline PostProcessingModel<KinematicCloud<ParcelType> >& + postProcessing(); // Integration schemes @@ -346,15 +354,12 @@ public: // Cloud evolution functions - //- Add new parcel - void addNewParcel + //- Check parcel properties + void checkParcelProperties ( - const vector& position, - const label cellId, - const scalar d, - const vector& U, - const scalar nParticles, - const scalar lagrangianDt + ParcelType* pPtr, + const scalar lagrangianDt, + const bool fullyDescribed ); //- Reset the spray source terms diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H index b02b0f0d8f4ac3d5f9d716186981385f388949cb..1f48632d152a1952201bcd5479dab0f36f4421cf 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H @@ -28,13 +28,6 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template<class ParcelType> -inline const Foam::word& Foam::KinematicCloud<ParcelType>::cloudType() const -{ - return cloudType_; -} - - template<class ParcelType> inline Foam::label Foam::KinematicCloud<ParcelType>::parcelTypeId() const { @@ -158,6 +151,14 @@ Foam::KinematicCloud<ParcelType>::injection() const } +template<class ParcelType> +inline const Foam::PatchInteractionModel<Foam::KinematicCloud<ParcelType> >& +Foam::KinematicCloud<ParcelType>::patchInteraction() const +{ + return patchInteractionModel_; +} + + template<class ParcelType> inline Foam::InjectionModel<Foam::KinematicCloud<ParcelType> >& Foam::KinematicCloud<ParcelType>::injection() @@ -167,10 +168,10 @@ Foam::KinematicCloud<ParcelType>::injection() template<class ParcelType> -inline const Foam::WallInteractionModel<Foam::KinematicCloud<ParcelType> >& -Foam::KinematicCloud<ParcelType>::wallInteraction() const +inline Foam::PostProcessingModel<Foam::KinematicCloud<ParcelType> >& +Foam::KinematicCloud<ParcelType>::postProcessing() { - return wallInteractionModel_; + return postProcessingModel_(); } diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C index bce296229cf9e4c53fc2ba8066841d02a82fa88e..88d5e8a877222a2f938217a77aca595255e8d5b4 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C @@ -28,37 +28,34 @@ License #include "CompositionModel.H" #include "PhaseChangeModel.H" +#include "multiComponentMixture.H" // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // template<class ParcelType> -void Foam::ReactingCloud<ParcelType>::addNewParcel +void Foam::ReactingCloud<ParcelType>::checkSuppliedComposition ( - const vector& position, - const label cellId, - const scalar d, - const vector& U, - const scalar nParticles, - const scalar lagrangianDt + const scalarField& YSupplied, + const scalarField& Y, + const word& YName ) { - ParcelType* pPtr = new ParcelType - ( - *this, - position, - cellId, - this->parcelTypeId(), - nParticles, - d, - U, - composition().YMixture0(), - constProps_ - ); - - scalar continuousDt = this->db().time().deltaT().value(); - pPtr->stepFraction() = (continuousDt - lagrangianDt)/continuousDt; - - addParticle(pPtr); + if (YSupplied.size() != Y.size()) + { + FatalErrorIn + ( + "ReactingCloud<ParcelType>::checkSuppliedComposition" + "(" + "const scalarField&, " + "const scalarField&, " + "const word&" + ")" + ) << YName << " supplied, but size is not compatible with " + << "parcel composition: " << nl << " " + << YName << "(" << YSupplied.size() << ") vs required composition " + << YName << "(" << Y.size() << ")" << nl + << abort(FatalError); + } } @@ -67,19 +64,18 @@ void Foam::ReactingCloud<ParcelType>::addNewParcel template<class ParcelType> Foam::ReactingCloud<ParcelType>::ReactingCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - hCombustionThermo& thermo, - PtrList<specieReactingProperties>& carrierSpecies + hCombustionThermo& thermo ) : - ThermoCloud<ParcelType>(cloudType, rho, U, g, thermo), + ThermoCloud<ParcelType>(cloudName, rho, U, g, thermo), reactingCloud(), constProps_(this->particleProperties()), carrierThermo_(thermo), - carrierSpecies_(carrierSpecies), + carrierSpecies_(thermo.composition().Y().size()), compositionModel_ ( CompositionModel<ReactingCloud<ParcelType> >::New @@ -99,6 +95,20 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud rhoTrans_(thermo.composition().Y().size()), dMassPhaseChange_(0.0) { + // Create the carrier species + forAll(carrierSpecies_, specieI) + { + carrierSpecies_.set + ( + specieI, + new thermoType + ( + dynamic_cast<const multiComponentMixture<thermoType>&> + (thermo).speciesData()[specieI] + ) + ); + } + // Set storage for mass source fields and initialise to zero forAll(rhoTrans_, i) { @@ -135,6 +145,40 @@ Foam::ReactingCloud<ParcelType>::~ReactingCloud() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template<class ParcelType> +void Foam::ReactingCloud<ParcelType>::checkParcelProperties +( + ParcelType* pPtr, + const scalar lagrangianDt, + const bool fullyDescribed +) +{ + ThermoCloud<ParcelType>::checkParcelProperties + ( + pPtr, + lagrangianDt, + fullyDescribed + ); + + if (!fullyDescribed) + { + pPtr->Y() = composition().YMixture0(); + } + else + { + checkSuppliedComposition + ( + pPtr->Y(), + composition().YMixture0(), + "YMixture" + ); + } + + // derived information - store initial mass + pPtr->mass0() = pPtr->mass(); +} + + template<class ParcelType> void Foam::ReactingCloud<ParcelType>::resetSourceTerms() { @@ -215,6 +259,8 @@ void Foam::ReactingCloud<ParcelType>::evolve() } Cloud<ParcelType>::move(td); + + this->postProcessing().post(); } diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H index 848da636042222f21ebf6cb0dfa8cf5787048539..beeee65e6e80fe9a6040a6d7277180be4ec185d5 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H @@ -27,6 +27,7 @@ Class Description Templated base class for reacting cloud + - Adds to thermodynamic cloud - Variable composition (single phase) - Phase change @@ -46,8 +47,6 @@ SourceFiles #include "ThermoCloud.H" #include "reactingCloud.H" -#include "ReactingCloudThermoTypes.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -71,7 +70,26 @@ class ReactingCloud public ThermoCloud<ParcelType>, public reactingCloud { - // Private data +public: + + //- Type of thermodynamics the cloud was instantiated for + typedef typename ParcelType::thermoType thermoType; + + +private: + + // Private Member Functions + + //- Disallow default bitwise copy construct + ReactingCloud(const ReactingCloud&); + + //- Disallow default bitwise assignment + void operator=(const ReactingCloud&); + + +protected: + + // Protected data //- Parcel constant properties typename ParcelType::constantProperties constProps_; @@ -80,7 +98,7 @@ class ReactingCloud hCombustionThermo& carrierThermo_; //- Gas phase properties - PtrList<specieReactingProperties>& carrierSpecies_; + PtrList<thermoType> carrierSpecies_; // References to the cloud sub-models @@ -106,13 +124,17 @@ class ReactingCloud scalar dMassPhaseChange_; - // Private Member Functions + // Protected Member Functions - //- Disallow default bitwise copy construct - ReactingCloud(const ReactingCloud&); + // New parcel helper functions - //- Disallow default bitwise assignment - void operator=(const ReactingCloud&); + //- Check that size of a composition field is valid + void checkSuppliedComposition + ( + const scalarField& YSupplied, + const scalarField& Y, + const word& YName + ); public: @@ -122,12 +144,11 @@ public: //- Construct given carrier gas fields ReactingCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - hCombustionThermo& thermo, - PtrList<specieReactingProperties>& carrierSpecies + hCombustionThermo& thermo ); @@ -154,7 +175,7 @@ public: inline hCombustionThermo& carrierThermo(); //- Gas phase properties - inline const PtrList<specieReactingProperties>& carrierSpecies() const; + inline const PtrList<thermoType>& carrierSpecies() const; // Sub-models @@ -200,15 +221,12 @@ public: // Cloud evolution functions - //- Add new parcel - void addNewParcel + //- Check parcel properties + void checkParcelProperties ( - const vector& position, - const label cellId, - const scalar d, - const vector& U, - const scalar nParticles, - const scalar lagrangianDt + ParcelType* pPtr, + const scalar lagrangianDt, + const bool fullyDescribed ); //- Reset the spray source terms diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H index d21df2f89d49aae6819d396941d1e23fba7a5049..8dbaf52bbcf81675641d903cc1be6b8e171bde5a 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H @@ -51,7 +51,7 @@ Foam::ReactingCloud<ParcelType>::carrierThermo() template<class ParcelType> -inline const Foam::PtrList<Foam::specieReactingProperties>& +inline const Foam::PtrList<typename ParcelType::thermoType>& Foam::ReactingCloud<ParcelType>::carrierSpecies() const { return carrierSpecies_; diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C index 4ffc5306149f0f3b0294d67d475264b4e7ed49fe..379f12f341d49efc5109b2298c022b6ce1e0eca7 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,60 +29,19 @@ License #include "DevolatilisationModel.H" #include "SurfaceReactionModel.H" -// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // - -template<class ParcelType> -void Foam::ReactingMultiphaseCloud<ParcelType>::addNewParcel -( - const vector& position, - const label cellId, - const scalar d, - const vector& U, - const scalar nParticles, - const scalar lagrangianDt -) -{ - label idGas = this->composition().idGas(); - label idLiquid = this->composition().idLiquid(); - label idSolid = this->composition().idSolid(); - - ParcelType* pPtr = new ParcelType - ( - *this, - position, - cellId, - this->parcelTypeId(), - nParticles, - d, - U, - this->composition().YMixture0(), - this->composition().Y0(idGas), - this->composition().Y0(idLiquid), - this->composition().Y0(idSolid), - constProps_ - ); - - scalar continuousDt = this->db().time().deltaT().value(); - pPtr->stepFraction() = (continuousDt - lagrangianDt)/continuousDt; - - addParticle(pPtr); -} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class ParcelType> Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - hCombustionThermo& thermo, - PtrList<specieReactingProperties>& carrierSpecies + hCombustionThermo& thermo ) : - ReactingCloud<ParcelType>(cloudType, rho, U, g, thermo, carrierSpecies), + ReactingCloud<ParcelType>(cloudName, rho, U, g, thermo), reactingMultiphaseCloud(), constProps_(this->particleProperties()), devolatilisationModel_ @@ -114,6 +73,55 @@ Foam::ReactingMultiphaseCloud<ParcelType>::~ReactingMultiphaseCloud() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template<class ParcelType> +void Foam::ReactingMultiphaseCloud<ParcelType>::checkParcelProperties +( + ParcelType* pPtr, + const scalar lagrangianDt, + const bool fullyDescribed +) +{ + ReactingCloud<ParcelType>::checkParcelProperties + ( + pPtr, + lagrangianDt, + fullyDescribed + ); + + label idGas = this->composition().idGas(); + label idLiquid = this->composition().idLiquid(); + label idSolid = this->composition().idSolid(); + + if (!fullyDescribed) + { + pPtr->YGas() = this->composition().Y0(idGas); + pPtr->YLiquid() = this->composition().Y0(idLiquid); + pPtr->YSolid() = this->composition().Y0(idSolid); + } + else + { + this->checkSuppliedComposition + ( + pPtr->YGas(), + this->composition().Y0(idGas), + "YGas" + ); + this->checkSuppliedComposition + ( + pPtr->YLiquid(), + this->composition().Y0(idLiquid), + "YLiquid" + ); + this->checkSuppliedComposition + ( + pPtr->YSolid(), + this->composition().Y0(idSolid), + "YSolid" + ); + } +} + + template<class ParcelType> void Foam::ReactingMultiphaseCloud<ParcelType>::resetSourceTerms() { @@ -190,6 +198,8 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::evolve() } Cloud<ParcelType>::move(td); + + this->postProcessing().post(); } diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H index d16577c03ae6612723e84bac0d1036c1d3296b38..8a90d25ef75f17f08cf359581066866d77ea7672 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,6 +27,7 @@ Class Description Templated base class for multiphase reacting cloud + - Adds to reacting cloud - multiphase composition - devolatilisatsion @@ -67,7 +68,18 @@ class ReactingMultiphaseCloud public ReactingCloud<ParcelType>, public reactingMultiphaseCloud { - // Private data + // Private Member Functions + + //- Disallow default bitwise copy construct + ReactingMultiphaseCloud(const ReactingMultiphaseCloud&); + + //- Disallow default bitwise assignment + void operator=(const ReactingMultiphaseCloud&); + + +protected: + + // Protected data //- Parcel constant properties typename ParcelType::constantProperties constProps_; @@ -100,15 +112,6 @@ class ReactingMultiphaseCloud scalar dMassSurfaceReaction_; - // Private Member Functions - - //- Disallow default bitwise copy construct - ReactingMultiphaseCloud(const ReactingMultiphaseCloud&); - - //- Disallow default bitwise assignment - void operator=(const ReactingMultiphaseCloud&); - - public: // Constructors @@ -116,12 +119,11 @@ public: //- Construct given carrier gas fields ReactingMultiphaseCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - hCombustionThermo& thermo, - PtrList<specieReactingProperties>& carrierSpecies + hCombustionThermo& thermo ); @@ -173,15 +175,12 @@ public: // Cloud evolution functions - //- Add new parcel - void addNewParcel + //- Check parcel properties + void checkParcelProperties ( - const vector& position, - const label cellId, - const scalar d, - const vector& U, - const scalar nParticles, - const scalar lagrangianDt + ParcelType* pPtr, + const scalar lagrangianDt, + const bool fullyDescribed ); //- Reset the spray source terms diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudI.H index cbf042f688f801fd3110bcd0c39ae45403dd53d2..ac0b0291501e909bcb086e6a3c835b30dee3643f 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C index 91d7a2fb7f8423eb1dc6b5da92c499d1970fd6ba..bdde1bbdfe49458f4da209d2c138fa0ee55eeec8 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C @@ -30,44 +30,12 @@ License #include "HeatTransferModel.H" -// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // - -template<class ParcelType> -void Foam::ThermoCloud<ParcelType>::addNewParcel -( - const vector& position, - const label cellId, - const scalar d, - const vector& U, - const scalar nParticles, - const scalar lagrangianDt -) -{ - ParcelType* pPtr = new ParcelType - ( - *this, - position, - cellId, - this->parcelTypeId(), - nParticles, - d, - U, - constProps_ - ); - - scalar continuousDt = this->db().time().deltaT().value(); - pPtr->stepFraction() = (continuousDt - lagrangianDt)/continuousDt; - - addParticle(pPtr); -} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class ParcelType> Foam::ThermoCloud<ParcelType>::ThermoCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, @@ -76,7 +44,7 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud : KinematicCloud<ParcelType> ( - cloudType, + cloudName, rho, U, thermo.mu(), @@ -142,6 +110,29 @@ Foam::ThermoCloud<ParcelType>::~ThermoCloud() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template<class ParcelType> +void Foam::ThermoCloud<ParcelType>::checkParcelProperties +( + ParcelType* pPtr, + const scalar lagrangianDt, + const bool fullyDescribed +) +{ + KinematicCloud<ParcelType>::checkParcelProperties + ( + pPtr, + lagrangianDt, + fullyDescribed + ); + + if (!fullyDescribed) + { + pPtr->T() = constProps_.T0(); + pPtr->cp() = constProps_.cp0(); + } +} + + template<class ParcelType> void Foam::ThermoCloud<ParcelType>::resetSourceTerms() { @@ -212,6 +203,8 @@ void Foam::ThermoCloud<ParcelType>::evolve() } Cloud<ParcelType>::move(td); + + this->postProcessing().post(); } diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H index 2e3aea4f23e808404d9749658780a23f5775d77c..2660060baf293834643a999008081ecbbd7bc0e3 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H @@ -27,6 +27,7 @@ Class Description Templated base class for thermodynamic cloud + - Adds to kinematic cloud - Heat transfer @@ -45,7 +46,6 @@ SourceFiles #include "KinematicCloud.H" #include "thermoCloud.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -66,7 +66,18 @@ class ThermoCloud public KinematicCloud<ParcelType>, public thermoCloud { - // Private data + // Private Member Functions + + //- Disallow default bitwise copy construct + ThermoCloud(const ThermoCloud&); + + //- Disallow default bitwise assignment + void operator=(const ThermoCloud&); + + +protected: + + // Protected data //- Thermo parcel constant properties typename ParcelType::constantProperties constProps_; @@ -109,15 +120,6 @@ class ThermoCloud DimensionedField<scalar, volMesh> hcTrans_; - // Private Member Functions - - //- Disallow default bitwise copy construct - ThermoCloud(const ThermoCloud&); - - //- Disallow default bitwise assignment - void operator=(const ThermoCloud&); - - public: // Constructors @@ -125,7 +127,7 @@ public: //- Construct given carrier gas fields ThermoCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, @@ -215,15 +217,12 @@ public: // Cloud evolution functions - //- Add new parcel - void addNewParcel + //- Check parcel properties + void checkParcelProperties ( - const vector& position, - const label cellId, - const scalar d, - const vector& U, - const scalar nParticles, - const scalar lagrangianDt + ParcelType* pPtr, + const scalar lagrangianDt, + const bool fullyDescribed ); //- Reset the spray source terms diff --git a/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H b/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H index 8c1e273f570a77a0b3bdf2099554d1cd180acfd6..37ab0548157a1178a8d427f2ebd035abb2c2ea0e 100644 --- a/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H @@ -29,13 +29,14 @@ Description Virtual abstract base class for templated KinematicCloud SourceFiles + kinematicCloud.H \*---------------------------------------------------------------------------*/ #ifndef kinematicCloud_H #define kinematicCloud_H -#include "volFields.H" +#include "typeInfo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/clouds/baseClasses/reactingCloud/reactingCloud.H b/src/lagrangian/intermediate/clouds/baseClasses/reactingCloud/reactingCloud.H index a27bf4edf18e8661a3cf506f717b5156832e5936..aef3eeba66c2eafebfbf2e76f6529f2586a79594 100644 --- a/src/lagrangian/intermediate/clouds/baseClasses/reactingCloud/reactingCloud.H +++ b/src/lagrangian/intermediate/clouds/baseClasses/reactingCloud/reactingCloud.H @@ -29,13 +29,14 @@ Description Virtual abstract base class for templated ReactingCloud SourceFiles + reactingCloud.C \*---------------------------------------------------------------------------*/ #ifndef reactingCloud_H #define reactingCloud_H -#include "volFields.H" +#include "typeInfo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.H b/src/lagrangian/intermediate/clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.H index ea2ef0da89d14d2acf1d82c99298938fdba4b7ad..4cbe6f69177f1d826467a7629606e027d40b5db2 100644 --- a/src/lagrangian/intermediate/clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.H +++ b/src/lagrangian/intermediate/clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.H @@ -29,13 +29,14 @@ Description Virtual abstract base class for templated reactingMultiphaseCloud SourceFiles + reactingMultiphaseCloud.C \*---------------------------------------------------------------------------*/ #ifndef reactingMultiphaseCloud_H #define reactingMultiphaseCloud_H -#include "volFields.H" +#include "typeInfo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/clouds/baseClasses/thermoCloud/thermoCloud.H b/src/lagrangian/intermediate/clouds/baseClasses/thermoCloud/thermoCloud.H index 240c2d5ce39f42c4fef3c4b13ac69ccfd53641bf..9eff9c62ee4a3d3d45c57668ef50fb8400229e43 100644 --- a/src/lagrangian/intermediate/clouds/baseClasses/thermoCloud/thermoCloud.H +++ b/src/lagrangian/intermediate/clouds/baseClasses/thermoCloud/thermoCloud.H @@ -29,6 +29,7 @@ Description Virtual abstract base class for templated ThermoCloud SourceFiles + thermoCloud.C \*---------------------------------------------------------------------------*/ diff --git a/src/lagrangian/intermediate/clouds/derived/basicReactingCloud/basicReactingCloud.C b/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.C similarity index 73% rename from src/lagrangian/intermediate/clouds/derived/basicReactingCloud/basicReactingCloud.C rename to src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.C index 405dc4a65859aeefe410b8d564330d4d69183f7c..1a639b5820b0d008932fe9454bc1df9e62bc0cee 100644 --- a/src/lagrangian/intermediate/clouds/derived/basicReactingCloud/basicReactingCloud.C +++ b/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.C @@ -24,53 +24,46 @@ License \*---------------------------------------------------------------------------*/ -#include "basicReactingCloud.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(basicReactingCloud, 0); -}; - +#include "BasicReactingCloud.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::basicReactingCloud::basicReactingCloud +template<class ThermoType> +Foam::BasicReactingCloud<ThermoType>::BasicReactingCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - hCombustionThermo& thermo, - PtrList<specieReactingProperties>& carrierSpecies + hCombustionThermo& thermo ) : - ReactingCloud<basicReactingParcel> + ReactingCloud<BasicReactingParcel<ThermoType> > ( - cloudType, + cloudName, rho, U, g, - thermo, - carrierSpecies + thermo ) { - basicReactingParcel::readFields(*this); + BasicReactingParcel<ThermoType>::readFields(*this); } // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::basicReactingCloud::~basicReactingCloud() +template<class ThermoType> +Foam::BasicReactingCloud<ThermoType>::~BasicReactingCloud() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::basicReactingCloud::writeFields() const +template<class ThermoType> +void Foam::BasicReactingCloud<ThermoType>::writeFields() const { - basicReactingParcel::writeFields(*this); + BasicReactingParcel<ThermoType>::writeFields(*this); } diff --git a/src/lagrangian/intermediate/clouds/derived/basicReactingCloud/basicReactingCloud.H b/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.H similarity index 72% rename from src/lagrangian/intermediate/clouds/derived/basicReactingCloud/basicReactingCloud.H rename to src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.H index 7a56097614a5f90c62c87ce5eddb311f2466e25d..aa3048e6663f3db16cbad66a4392a13f397ac2a6 100644 --- a/src/lagrangian/intermediate/clouds/derived/basicReactingCloud/basicReactingCloud.H +++ b/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.H @@ -23,66 +23,70 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::basicReactingCloud + Foam::BasicReactingCloud Description - Reacting cloud templated on the reacting parcel + Reacting cloud templated on the type of carrier phase thermodynamics SourceFiles - basicReactingCloud.C + BasicReactingCloud.C \*---------------------------------------------------------------------------*/ -#ifndef basicReactingCloud_H -#define basicReactingCloud_H +#ifndef BasicReactingCloud_H +#define BasicReactingCloud_H #include "ReactingCloud.H" -#include "basicReactingParcel.H" +#include "BasicReactingParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { +// Forward declaration of classes +template<class ThermoType> +class BasicReactingCloud; + /*---------------------------------------------------------------------------*\ - Class basicReactingCloud Declaration + Class BasicReactingCloud Declaration \*---------------------------------------------------------------------------*/ -class basicReactingCloud +template<class ThermoType> +class BasicReactingCloud : - public ReactingCloud<basicReactingParcel> + public ReactingCloud<BasicReactingParcel<ThermoType> > { // Private Member Functions //- Disallow default bitwise copy construct - basicReactingCloud(const basicReactingCloud&); + BasicReactingCloud(const BasicReactingCloud&); //- Disallow default bitwise assignment - void operator=(const basicReactingCloud&); + void operator=(const BasicReactingCloud&); public: //- Runtime type information - TypeName("basicReactingCloud"); + TypeName("BasicReactingCloud"); // Constructors //- Construct given carrier gas fields - basicReactingCloud + BasicReactingCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - hCombustionThermo& thermo, - PtrList<specieReactingProperties>& carrierSpecies + hCombustionThermo& thermo ); //- Destructor - ~basicReactingCloud(); + ~BasicReactingCloud(); // Member Functions @@ -98,6 +102,12 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository + #include "BasicReactingCloud.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelDragModels.C b/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/defineBasicReactingCloud.C similarity index 80% rename from src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelDragModels.C rename to src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/defineBasicReactingCloud.C index aaeacca70c8c756689284602ed52ea9eb95e9598..ca5b9e809062d6fac2137e44c146fe5c59beea21 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelDragModels.C +++ b/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/defineBasicReactingCloud.C @@ -24,20 +24,14 @@ License \*---------------------------------------------------------------------------*/ -#include "basicThermoParcel.H" -#include "KinematicCloud.H" -#include "NoDrag.H" -#include "SphereDrag.H" +#include "createReactingCloudTypes.H" +#include "BasicReactingCloud.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - makeDragModel(KinematicCloud<basicThermoParcel>); - - // Add instances of drag model to the table - makeDragModelType(NoDrag, KinematicCloud, basicThermoParcel); - makeDragModelType(SphereDrag, KinematicCloud, basicThermoParcel); + createReactingCloudType(BasicReactingCloud); }; diff --git a/src/lagrangian/intermediate/clouds/derived/basicReactingMultiphaseCloud/basicReactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.C similarity index 70% rename from src/lagrangian/intermediate/clouds/derived/basicReactingMultiphaseCloud/basicReactingMultiphaseCloud.C rename to src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.C index d174e0ea0ac3511d26cab78da24a3a578bc34746..07cb83587ecd620b23e26fb2d874afdbf7a66ee2 100644 --- a/src/lagrangian/intermediate/clouds/derived/basicReactingMultiphaseCloud/basicReactingMultiphaseCloud.C +++ b/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,31 +24,24 @@ License \*---------------------------------------------------------------------------*/ -#include "basicReactingMultiphaseCloud.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(basicReactingMultiphaseCloud, 0); -}; - +#include "BasicReactingMultiphaseCloud.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::basicReactingMultiphaseCloud::basicReactingMultiphaseCloud +template<class ThermoType> +Foam::BasicReactingMultiphaseCloud<ThermoType>::BasicReactingMultiphaseCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, hCombustionThermo& thermo, - PtrList<specieReactingProperties>& carrierSpecies + PtrList<ThermoType>& carrierSpecies ) : - ReactingMultiphaseCloud<basicReactingMultiphaseParcel> + ReactingMultiphaseCloud<BasicReactingMultiphaseParcel<ThermoType> > ( - cloudType, + cloudName, rho, U, g, @@ -56,21 +49,23 @@ Foam::basicReactingMultiphaseCloud::basicReactingMultiphaseCloud carrierSpecies ) { - basicReactingMultiphaseParcel::readFields(*this); + BasicReactingMultiphaseParcel<ThermoType>::readFields(*this); } // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::basicReactingMultiphaseCloud::~basicReactingMultiphaseCloud() +template<class ThermoType> +Foam::BasicReactingMultiphaseCloud<ThermoType>::~BasicReactingMultiphaseCloud() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::basicReactingMultiphaseCloud::writeFields() const +template<class ThermoType> +void Foam::BasicReactingMultiphaseCloud<ThermoType>::writeFields() const { - basicReactingMultiphaseParcel::writeFields(*this); + BasicReactingMultiphaseParcel<ThermoType>::writeFields(*this); } diff --git a/src/lagrangian/intermediate/clouds/derived/basicReactingMultiphaseCloud/basicReactingMultiphaseCloud.H b/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.H similarity index 67% rename from src/lagrangian/intermediate/clouds/derived/basicReactingMultiphaseCloud/basicReactingMultiphaseCloud.H rename to src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.H index e8a9485cb8ec6d183c0e37f82a61a25148101dab..7b093c529c03d7e2c9c8871b493cc93ae46f3293 100644 --- a/src/lagrangian/intermediate/clouds/derived/basicReactingMultiphaseCloud/basicReactingMultiphaseCloud.H +++ b/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,66 +23,71 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::basicReactingMultiphaseCloud + Foam::BasicReactingMultiphaseCloud Description - Reacting cloud templated on the reacting multiphase parcel + Reacting multiphase cloud templated on the type of carrier phase thermodynamics SourceFiles - basicReactingMultiphaseCloud.C + BasicReactingMultiphaseCloud.C \*---------------------------------------------------------------------------*/ -#ifndef basicReactingMultiphaseCloud_H -#define basicReactingMultiphaseCloud_H +#ifndef BasicReactingMultiphaseCloud_H +#define BasicReactingMultiphaseCloud_H #include "ReactingMultiphaseCloud.H" -#include "basicReactingMultiphaseParcel.H" +#include "BasicReactingMultiphaseParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { +// Forward declaration of classes +template<class ThermoType> +class BasicReactingMultiphaseCloud; + /*---------------------------------------------------------------------------*\ - Class basicReactingMultiphaseCloud Declaration + Class BasicReactingMultiphaseCloud Declaration \*---------------------------------------------------------------------------*/ -class basicReactingMultiphaseCloud +template<class ThermoType> +class BasicReactingMultiphaseCloud : - public ReactingMultiphaseCloud<basicReactingMultiphaseParcel> + public ReactingMultiphaseCloud<BasicReactingMultiphaseParcel<ThermoType> > { // Private Member Functions //- Disallow default bitwise copy construct - basicReactingMultiphaseCloud(const basicReactingMultiphaseCloud&); + BasicReactingMultiphaseCloud(const BasicReactingMultiphaseCloud&); //- Disallow default bitwise assignment - void operator=(const basicReactingMultiphaseCloud&); + void operator=(const BasicReactingMultiphaseCloud&); public: //- Runtime type information - TypeName("basicReactingMultiphaseCloud"); + TypeName("BasicReactingMultiphaseCloud"); // Constructors //- Construct given carrier gas fields - basicReactingMultiphaseCloud + BasicReactingMultiphaseCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, hCombustionThermo& thermo, - PtrList<specieReactingProperties>& carrierSpecies + PtrList<ThermoType>& carrierSpecies ); //- Destructor - ~basicReactingMultiphaseCloud(); + ~BasicReactingMultiphaseCloud(); // Member Functions @@ -98,6 +103,12 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository + #include "BasicReactingMultiphaseCloud.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/defineBasicReactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/defineBasicReactingMultiphaseCloud.C new file mode 100644 index 0000000000000000000000000000000000000000..d23115997d07bccb9ef83af7ff595635db9c634a --- /dev/null +++ b/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/defineBasicReactingMultiphaseCloud.C @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "createReactingCloudTypes.H" +#include "BasicReactingMultiphaseCloud.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + createReactingCloudType(BasicReactingMultiphaseCloud); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/BasicTrackedReactingCloud/BasicTrackedReactingCloud.C b/src/lagrangian/intermediate/clouds/derived/BasicTrackedReactingCloud/BasicTrackedReactingCloud.C new file mode 100644 index 0000000000000000000000000000000000000000..4b94788812116369124865291873fe467239e525 --- /dev/null +++ b/src/lagrangian/intermediate/clouds/derived/BasicTrackedReactingCloud/BasicTrackedReactingCloud.C @@ -0,0 +1,70 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "BasicTrackedReactingCloud.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class ThermoType> +Foam::BasicTrackedReactingCloud<ThermoType>::BasicTrackedReactingCloud +( + const word& cloudName, + const volScalarField& rho, + const volVectorField& U, + const dimensionedVector& g, + hCombustionThermo& thermo +) +: + ReactingCloud<BasicTrackedReactingParcel<ThermoType> > + ( + cloudName, + rho, + U, + g, + thermo + ) +{ + BasicTrackedReactingParcel<ThermoType>::readFields(*this); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class ThermoType> +Foam::BasicTrackedReactingCloud<ThermoType>::~BasicTrackedReactingCloud() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class ThermoType> +void Foam::BasicTrackedReactingCloud<ThermoType>::writeFields() const +{ + BasicTrackedReactingParcel<ThermoType>::writeFields(*this); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/BasicTrackedReactingCloud/BasicTrackedReactingCloud.H b/src/lagrangian/intermediate/clouds/derived/BasicTrackedReactingCloud/BasicTrackedReactingCloud.H new file mode 100644 index 0000000000000000000000000000000000000000..5c3cd8148f2654b2588fb4cd3282768268cdb8a5 --- /dev/null +++ b/src/lagrangian/intermediate/clouds/derived/BasicTrackedReactingCloud/BasicTrackedReactingCloud.H @@ -0,0 +1,113 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +Class + Foam::BasicTrackedReactingCloud + +Description + Tracked racting cloud templated on the type of carrier phase thermodynamics + +SourceFiles + BasicTrackedReactingCloud.C + +\*---------------------------------------------------------------------------*/ + +#ifndef BasicTrackedReactingCloud_H +#define BasicTrackedReactingCloud_H + +#include "ReactingCloud.H" +#include "BasicTrackedReactingParcel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes +template<class ThermoType> +class BasicTrackedReactingCloud; + +/*---------------------------------------------------------------------------*\ + Class BasicTrackedReactingCloud Declaration +\*---------------------------------------------------------------------------*/ + +template<class ThermoType> +class BasicTrackedReactingCloud +: + public ReactingCloud<BasicTrackedReactingParcel<ThermoType> > +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + BasicTrackedReactingCloud(const BasicTrackedReactingCloud&); + + //- Disallow default bitwise assignment + void operator=(const BasicTrackedReactingCloud&); + + +public: + + //- Runtime type information + TypeName("BasicTrackedReactingCloud"); + + + // Constructors + + //- Construct given carrier gas fields + BasicTrackedReactingCloud + ( + const word& cloudName, + const volScalarField& rho, + const volVectorField& U, + const dimensionedVector& g, + hCombustionThermo& thermo + ); + + + //- Destructor + ~BasicTrackedReactingCloud(); + + + // Member Functions + + //- Write fields + void writeFields() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "BasicTrackedReactingCloud.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/BasicTrackedReactingCloud/defineBasicTrackedReactingCloud.C b/src/lagrangian/intermediate/clouds/derived/BasicTrackedReactingCloud/defineBasicTrackedReactingCloud.C new file mode 100644 index 0000000000000000000000000000000000000000..5c946ca09cb63f6391327416104bc11f4cb3406b --- /dev/null +++ b/src/lagrangian/intermediate/clouds/derived/BasicTrackedReactingCloud/defineBasicTrackedReactingCloud.C @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "createReactingCloudTypes.H" +#include "BasicTrackedReactingCloud.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + createReactingCloudType(BasicTrackedReactingCloud); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.C b/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.C index 4e52274f8e029298574e7da9b1606a821743e754..15ab7afdfcdf1673493fab546a2e0787aa86ab3f 100644 --- a/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.C @@ -38,14 +38,14 @@ namespace Foam Foam::basicKinematicCloud::basicKinematicCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const volScalarField& mu, const dimensionedVector& g ) : - KinematicCloud<basicKinematicParcel>(cloudType, rho, U, mu, g) + KinematicCloud<basicKinematicParcel>(cloudName, rho, U, mu, g) { basicKinematicParcel::readFields(*this); } @@ -64,4 +64,5 @@ void Foam::basicKinematicCloud::writeFields() const basicKinematicParcel::writeFields(*this); } + // ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H b/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H index 8a32780f351b4eeba5d86ef06dbfcf98ec9bc5f0..91a8ae2e5bd3134782f46fa7aa41101d48806bc5 100644 --- a/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H @@ -72,7 +72,7 @@ public: //- Construct from components basicKinematicCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const volScalarField& mu, diff --git a/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.C b/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.C index 9d73a6533c91bc03c94cffec4dc767097feb565d..fc7ee7dc26eb80fbf66a701b839b8ef13a36fd25 100644 --- a/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.C +++ b/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.C @@ -38,14 +38,14 @@ namespace Foam Foam::basicThermoCloud::basicThermoCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, basicThermo& thermo ) : - ThermoCloud<basicThermoParcel>(cloudType, rho, U, g, thermo) + ThermoCloud<basicThermoParcel>(cloudName, rho, U, g, thermo) { basicThermoParcel::readFields(*this); } diff --git a/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.H b/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.H index e8ba4c9a8c4813377837ad46dfbca670bed01da1..5254fed8ebb2dcb2e6160372e1ab6a1a2f5f74bb 100644 --- a/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.H +++ b/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.H @@ -26,6 +26,7 @@ Class Foam::basicThermoCloud Description + Cloud class to introduce thermodynamic parcels SourceFiles basicThermoCloud.C @@ -74,7 +75,7 @@ public: //- Construct given carrier gas fields basicThermoCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelInjectionModels.C b/src/lagrangian/intermediate/clouds/include/createReactingCloudTypes.H similarity index 62% rename from src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelInjectionModels.C rename to src/lagrangian/intermediate/clouds/include/createReactingCloudTypes.H index bf68b9947731c02b4b61917d647341f8df1b2896..cc73ce3ec3aca7987ef438cd3a0956fd41dbc77f 100644 --- a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelInjectionModels.C +++ b/src/lagrangian/intermediate/clouds/include/createReactingCloudTypes.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,26 +24,26 @@ License \*---------------------------------------------------------------------------*/ -#include "coalParcel.H" -#include "ReactingCloud.H" +#ifndef createReactingCloudTypes_H +#define createReactingCloudTypes_H -#include "ConeInjection.H" -#include "FieldActivatedInjection.H" -#include "ManualInjection.H" -#include "NoInjection.H" +#include "reactingThermoTypes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - makeInjectionModel(KinematicCloud<coalParcel>); +#define createReactingCloudType(CloudType) \ + \ + createReactingCloudThermoType(CloudType, specieConstProperties); \ + createReactingCloudThermoType(CloudType, specieReactingProperties); - // Add instances of injection model to the table - makeInjectionModelType(ConeInjection, KinematicCloud, coalParcel); - makeInjectionModelType(FieldActivatedInjection, KinematicCloud, coalParcel); - makeInjectionModelType(ManualInjection, KinematicCloud, coalParcel); - makeInjectionModelType(NoInjection, KinematicCloud, coalParcel); -}; +#define createReactingCloudThermoType(CloudType, ThermoType) \ + \ + defineTemplateTypeNameAndDebug(CloudType<ThermoType>, 0); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif // ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C index cdc7e5e3b0d60a3f72c33f1d6ff0e1b03c6c8a37..d0962539e761760a9a693619c2bca2742288dbb8 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C @@ -103,6 +103,13 @@ void Foam::KinematicParcel<ParcelType>::calc const scalar mass0 = mass(); + // Explicit momentum source for particle + vector Su = vector::zero; + + // Momentum transfer from the particle to the carrier phase + vector dUTrans = vector::zero; + + // Motion // ~~~~~~ @@ -110,7 +117,7 @@ void Foam::KinematicParcel<ParcelType>::calc vector Fx = vector::zero; // Calculate new particle velocity - vector U1 = calcVelocity(td, dt, cellI, d0, U0, rho0, mass0, Fx); + vector U1 = calcVelocity(td, dt, cellI, d0, U0, rho0, mass0, Su, dUTrans); // Accumulate carrier phase source terms @@ -118,7 +125,7 @@ void Foam::KinematicParcel<ParcelType>::calc if (td.cloud().coupled()) { // Update momentum transfer - td.cloud().UTrans()[cellI] += np0*mass0*(U0 - U1); + td.cloud().UTrans()[cellI] += np0*dUTrans; } @@ -139,34 +146,68 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity const vector& U, const scalar rho, const scalar mass, - const vector& Fx + const vector& Su, + vector& dUTrans ) const { const polyMesh& mesh = this->cloud().pMesh(); - // Return linearised term from drag model - scalar Cud = td.cloud().drag().Cu(U - Uc_, d, rhoc_, rho, muc_); + // Momentum transfer coefficient + const scalar ptc = + td.cloud().drag().ptc(U - Uc_, d, rhoc_, muc_) + ROOTVSMALL; - // Calculate particle forces - vector Ftot = td.cloud().forces().calc(cellI, dt, rhoc_, rho, Uc_, U); + // Momentum source due to particle forces + const vector PFCoupled = + mass*td.cloud().forces().calcCoupled(cellI, dt, rhoc_, rho, Uc_, U); + const vector PFNonCoupled = + mass*td.cloud().forces().calcNonCoupled(cellI, dt, rhoc_, rho, Uc_, U); // New particle velocity //~~~~~~~~~~~~~~~~~~~~~~ // Update velocity - treat as 3-D - const vector ap = Uc_ + (Ftot + Fx)/(Cud + VSMALL); - const scalar bp = Cud; + const scalar As = this->areaS(d); + const vector ap = Uc_ + (PFCoupled + PFNonCoupled + Su)/(ptc*As); + const scalar bp = 6.0*ptc/(rho*d); + + IntegrationScheme<vector>::integrationResult Ures = + td.cloud().UIntegrator().integrate(U, dt, ap, bp); - vector Unew = td.cloud().UIntegrator().integrate(U, dt, ap, bp).value(); + vector Unew = Ures.value(); - // Apply correction to velocity for reduced-D cases + dUTrans += dt*(ptc*As*(Ures.average() - Uc_) - PFCoupled); + + // Apply correction to velocity and dUTrans for reduced-D cases meshTools::constrainDirection(mesh, mesh.solutionD(), Unew); + meshTools::constrainDirection(mesh, mesh.solutionD(), dUTrans); return Unew; } +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template <class ParcelType> +Foam::KinematicParcel<ParcelType>::KinematicParcel +( + const KinematicParcel<ParcelType>& p +) +: + Particle<ParcelType>(p), + typeId_(p.typeId_), + nParticle_(p.nParticle_), + d_(p.d_), + U_(p.U_), + rho_(p.rho_), + tTurb_(p.tTurb_), + UTurb_(p.UTurb_), + rhoc_(p.rhoc_), + Uc_(p.Uc_), + muc_(p.muc_) +{} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class ParcelType> @@ -218,12 +259,9 @@ bool Foam::KinematicParcel<ParcelType>::move(TrackData& td) if (p.onBoundary() && td.keepParticle) { - if (p.face() > -1) + if (isType<processorPolyPatch>(pbMesh[p.patch(p.face())])) { - if (isType<processorPolyPatch>(pbMesh[p.patch(p.face())])) - { - td.switchProcessor = true; - } + td.switchProcessor = true; } } } @@ -232,6 +270,34 @@ bool Foam::KinematicParcel<ParcelType>::move(TrackData& td) } +template<class ParcelType> +template<class TrackData> +bool Foam::KinematicParcel<ParcelType>::hitPatch +( + const polyPatch& pp, + TrackData& td, + const label patchI +) +{ + ParcelType& p = static_cast<ParcelType&>(*this); + td.cloud().postProcessing().postPatch(p, patchI); + + return td.cloud().patchInteraction().correct(pp, this->face(), U_); +} + + +template<class ParcelType> +bool Foam::KinematicParcel<ParcelType>::hitPatch +( + const polyPatch& pp, + int& td, + const label patchI +) +{ + return false; +} + + template<class ParcelType> template<class TrackData> void Foam::KinematicParcel<ParcelType>::hitProcessorPatch @@ -261,7 +327,7 @@ void Foam::KinematicParcel<ParcelType>::hitWallPatch TrackData& td ) { - td.cloud().wallInteraction().correct(wpp, this->face(), U_); + // Wall interactions handled by generic hitPatch function } diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H index 82d7c2ccd9e8293b10102214c419b686f9bb3266..049ab26bac5569c8f4bf98716ef9309ff10b5f9d 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H @@ -243,20 +243,36 @@ protected: const vector& U, // velocity const scalar rho, // density const scalar mass, // mass - const vector& Fx // additional forces + const vector& Su, // explicit particle momentum source + vector& dUTrans // momentum transfer to carrier ) const; public: - //- Runtime type information - TypeName("KinematicParcel"); + // Static data members + + //- String representation of properties + static string propHeader; + + //- Runtime type information + TypeName("KinematicParcel"); + friend class Cloud<ParcelType>; // Constructors + //- Construct from owner, position, and cloud owner + // Other properties initialised as null + inline KinematicParcel + ( + KinematicCloud<ParcelType>& owner, + const vector& position, + const label cellI + ); + //- Construct from components inline KinematicParcel ( @@ -278,10 +294,13 @@ public: bool readFields = true ); + //- Construct as a copy + KinematicParcel(const KinematicParcel& p); + //- Construct and return a clone - autoPtr<ParcelType> clone() const + autoPtr<KinematicParcel> clone() const { - return autoPtr<ParcelType>(new KinematicParcel<ParcelType>(*this)); + return autoPtr<KinematicParcel>(new KinematicParcel(*this)); } @@ -409,6 +428,27 @@ public: // Patch interactions + //- Overridable function to handle the particle hitting a patch + // Executed before other patch-hitting functions + template<class TrackData> + bool hitPatch + ( + const polyPatch& p, + TrackData& td, + const label patchI + ); + + + //- Overridable function to handle the particle hitting a patch + // Executed before other patch-hitting functions without trackData + bool hitPatch + ( + const polyPatch& p, + int& td, + const label patchI + ); + + //- Overridable function to handle the particle hitting a // processorPatch template<class TrackData> @@ -472,7 +512,7 @@ public: //- Read static void readFields(KinematicCloud<ParcelType>& c); - //- write + //- Write static void writeFields(const KinematicCloud<ParcelType>& c); diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H index 2adc0e944d0215c145e139a04c0a9a19e6544203..e0d927153780af56e42ac11af2db03636bd583b0 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H @@ -63,6 +63,28 @@ inline Foam::KinematicParcel<ParcelType>::trackData::trackData {} +template <class ParcelType> +inline Foam::KinematicParcel<ParcelType>::KinematicParcel +( + KinematicCloud<ParcelType>& owner, + const vector& position, + const label cellI +) +: + Particle<ParcelType>(owner, position, cellI), + typeId_(owner.parcelTypeId()), + nParticle_(0), + d_(0.0), + U_(vector::zero), + rho_(0.0), + tTurb_(0.0), + UTurb_(vector::zero), + rhoc_(0.0), + Uc_(vector::zero), + muc_(0.0) +{} + + template <class ParcelType> inline Foam::KinematicParcel<ParcelType>::KinematicParcel ( diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C index ae96d25a14ab212f2c14a03d86b9a6d0b61f3e8f..c69199cfb7ce7887bc0ae6212057b8ac6ed3974e 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C @@ -29,6 +29,20 @@ License #include "IOField.H" #include "Cloud.H" +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template <class ParcelType> +Foam::string Foam::KinematicParcel<ParcelType>::propHeader = + Particle<ParcelType>::propHeader + + " typeId" + + " nParticle" + + " d" + + " (Ux Uy Uz)" + + " rho" + + " tTurb" + + " UTurb"; + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template <class ParcelType> @@ -102,16 +116,16 @@ void Foam::KinematicParcel<ParcelType>::readFields IOField<label> typeId(c.fieldIOobject("typeId", IOobject::MUST_READ)); c.checkFieldIOobject(c, typeId); + IOField<scalar> + nParticle(c.fieldIOobject("nParticle", IOobject::MUST_READ)); + c.checkFieldIOobject(c, nParticle); + IOField<scalar> d(c.fieldIOobject("d", IOobject::MUST_READ)); c.checkFieldIOobject(c, d); IOField<vector> U(c.fieldIOobject("U", IOobject::MUST_READ)); c.checkFieldIOobject(c, U); - IOField<scalar> - nParticle(c.fieldIOobject("nParticle", IOobject::MUST_READ)); - c.checkFieldIOobject(c, nParticle); - IOField<scalar> rho(c.fieldIOobject("rho", IOobject::MUST_READ)); c.checkFieldIOobject(c, rho); diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C index e5d8e25d5f217bcb71c22d7620f5d4fe8f6f0e61..695ff95a8ef96e42020adfe63d7da93834d4ac93 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -174,14 +174,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::cellValueSourceCorrection const scalar cpc = td.cpInterp().psi()[cellI]; this->cpc_ = (massCell*cpc + addedMass*cpEff)/massCellNew; - const scalar fCarrier = - (1.0 - td.cloud().constProps().hRetentionCoeff()) - /td.cloud().constProps().hRetentionCoeff(); - - const scalar dh = - td.cloud().hsTrans()[cellI] - fCarrier*td.cloud().hcTrans()[cellI]; - - this->Tc_ += dh/(this->cpc_*massCellNew); + this->Tc_ += td.cloud().hsTrans()[cellI]/(this->cpc_*massCellNew); } @@ -211,34 +204,17 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc const label idL = td.cloud().composition().idLiquid(); const label idS = td.cloud().composition().idSolid(); - // Intial ethalpy state - scalar H0H = HEff(td, pc, T0, idG, idL, idS); - scalar H0L = LEff(td, pc, T0, idG, idL, idS); - scalar H0 = H0H - H0L; + // Explicit momentum source for particle + vector Su = vector::zero; + // Momentum transfer from the particle to the carrier phase + vector dUTrans = vector::zero; - // Phase change in liquid phase - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - // Mass transfer due to phase change - scalarField dMassPC(YLiquid_.size(), 0.0); + // Explicit enthalpy source for particle + scalar Sh = 0.0; - // Return enthalpy source and calc mass transfer due to phase change - scalar ShPC = - calcPhaseChange - ( - td, - dt, - cellI, - d0, - T0, - U0, - mass0, - idL, - YMix[LIQ], - YLiquid_, - dMassPC - ); + // Sensible enthalpy transfer from the particle to the carrier phase + scalar dhsTrans = 0.0; // Devolatilisation @@ -247,21 +223,22 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc // Mass transfer due to devolatilisation scalarField dMassDV(YGas_.size(), 0.0); - // Return enthalpy source and calc mass transfer due to devolatilisation - scalar ShDV = - calcDevolatilisation - ( - td, - dt, - T0, - mass0, - this->mass0_, - idG, - YMix[GAS], - YGas_, - canCombust_, - dMassDV - ); + // Calc mass and enthalpy transfer due to devolatilisation + calcDevolatilisation + ( + td, + dt, + T0, + mass0, + this->mass0_, + idG, + YMix[GAS], + YGas_, + canCombust_, + dMassDV, + Sh, + dhsTrans + ); // Surface reactions @@ -273,30 +250,53 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc scalarField dMassSRSolid(YSolid_.size(), 0.0); scalarField dMassSRCarrier(td.cloud().carrierSpecies().size(), 0.0); - // Return enthalpy source and calc mass transfer(s) due to surface reaction - scalar hReaction = - calcSurfaceReactions - ( - td, - dt, - cellI, - d0, - T0, - mass0, - canCombust_, - dMassDV, // assuming d(mass) due to phase change is non-volatile - YMix, - YGas_, - YLiquid_, - YSolid_, - dMassSRGas, - dMassSRLiquid, - dMassSRSolid, - dMassSRCarrier - ); - - // Heat of reaction retained by particle - const scalar ShSR = td.constProps().hRetentionCoeff()*hReaction; + // Clac mass and enthalpy transfer due to surface reactions + calcSurfaceReactions + ( + td, + dt, + cellI, + d0, + T0, + mass0, + canCombust_, + dMassDV, // assuming d(mass) due to phase change is non-volatile + YMix, + YGas_, + YLiquid_, + YSolid_, + dMassSRGas, + dMassSRLiquid, + dMassSRSolid, + dMassSRCarrier, + Sh, + dhsTrans + ); + + + // Phase change in liquid phase + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + // Mass transfer due to phase change + scalarField dMassPC(YLiquid_.size(), 0.0); + + // Calc mass and enthalpy transfer due to phase change + calcPhaseChange + ( + td, + dt, + cellI, + d0, + T0, + U0, + mass0, + idL, + YMix[LIQ], + YLiquid_, + dMassPC, + Sh, + dhsTrans + ); // Update component mass fractions @@ -313,27 +313,18 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc // Heat transfer // ~~~~~~~~~~~~~ - // Total enthalpy source - scalar Sh = ShPC + ShDV + ShSR; - // Calculate new particle temperature - scalar T1 = calcHeatTransfer(td, dt, cellI, d0, U0, rho0, T0, cp0, Sh); - - // Calculate new enthalpy state based on updated composition at new - // temperature - scalar H1H = HEff(td, pc, T1, idG, idL, idS); - scalar H1L = LEff(td, pc, T1, idG, idL, idS); - scalar H1 = H1H - H1L; + scalar T1 = + calcHeatTransfer(td, dt, cellI, d0, U0, rho0, T0, cp0, Sh, dhsTrans); // Motion // ~~~~~~ - // No additional forces - vector Fx = vector::zero; - // Calculate new particle velocity - vector U1 = calcVelocity(td, dt, cellI, d0, U0, rho0, mass0, Fx); + vector U1 = calcVelocity(td, dt, cellI, d0, U0, rho0, mass0, Su, dUTrans); + + dUTrans += 0.5*(mass0 - mass1)*(U0 + U1); // Accumulate carrier phase source terms @@ -344,35 +335,48 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc // Transfer mass lost from particle to carrier mass source forAll(YGas_, i) { - label id = td.cloud().composition().localToGlobalCarrierId(GAS, i); - td.cloud().rhoTrans(id)[cellI] += np0*dMassGas[i]; + label gid = td.cloud().composition().localToGlobalCarrierId(GAS, i); + td.cloud().rhoTrans(gid)[cellI] += np0*dMassGas[i]; + td.cloud().hcTrans()[cellI] += + np0 + *dMassGas[i] + *td.cloud().composition().carrierSpecies()[gid].H(T0); } forAll(YLiquid_, i) { - label id = td.cloud().composition().localToGlobalCarrierId(LIQ, i); - td.cloud().rhoTrans(id)[cellI] += np0*dMassLiquid[i]; + label gid = td.cloud().composition().localToGlobalCarrierId(LIQ, i); + td.cloud().rhoTrans(gid)[cellI] += np0*dMassLiquid[i]; + td.cloud().hcTrans()[cellI] += + np0 + *dMassLiquid[i] + *td.cloud().composition().carrierSpecies()[gid].H(T0); } /* // No mapping between solid components and carrier phase forAll(YSolid_, i) { - label id = td.cloud().composition().localToGlobalCarrierId(SLD, i); - td.cloud().rhoTrans(id)[cellI] += np0*dMassSolid[i]; + label gid = td.cloud().composition().localToGlobalCarrierId(SLD, i); + td.cloud().rhoTrans(gid)[cellI] += np0*dMassSolid[i]; + td.cloud().hcTrans()[cellI] += + np0 + *dMassSolid[i] + *td.cloud().composition().carrierSpecies()[gid].H(T0); } */ forAll(dMassSRCarrier, i) { td.cloud().rhoTrans(i)[cellI] += np0*dMassSRCarrier[i]; + td.cloud().hcTrans()[cellI] += + np0 + *dMassSRCarrier[i] + *td.cloud().composition().carrierSpecies()[i].H(T0); } // Update momentum transfer - td.cloud().UTrans()[cellI] += np0*(mass0*U0 - mass1*U1); + td.cloud().UTrans()[cellI] += np0*dUTrans; // Update sensible enthalpy transfer - td.cloud().hsTrans()[cellI] += np0*(mass0*H0 - mass1*H1); - - // Update chemical enthalpy transfer - td.cloud().hcTrans()[cellI] -= np0*ShSR; + td.cloud().hsTrans()[cellI] += np0*dhsTrans; } @@ -388,29 +392,30 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc // Absorb parcel into carrier phase forAll(YGas_, i) { - label id = + label gid = td.cloud().composition().localToGlobalCarrierId(GAS, i); - td.cloud().rhoTrans(id)[cellI] += np0*mass1*YMix[GAS]*YGas_[i]; + td.cloud().rhoTrans(gid)[cellI] += np0*mass1*YMix[GAS]*YGas_[i]; } forAll(YLiquid_, i) { - label id = + label gid = td.cloud().composition().localToGlobalCarrierId(LIQ, i); - td.cloud().rhoTrans(id)[cellI] += + td.cloud().rhoTrans(gid)[cellI] += np0*mass1*YMix[LIQ]*YLiquid_[i]; } /* // No mapping between solid components and carrier phase forAll(YSolid_, i) { - label id = + label gid = td.cloud().composition().localToGlobalCarrierId(SLD, i); - td.cloud().rhoTrans(id)[cellI] += + td.cloud().rhoTrans(gid)[cellI] += np0*mass1*YMix[SLD]*YSolid_[i]; } */ td.cloud().UTrans()[cellI] += np0*mass1*U1; - td.cloud().hsTrans()[cellI] += np0*mass1*H1; + td.cloud().hsTrans()[cellI] += + np0*mass1*HEff(td, pc, T1, idG, idL, idS); } } @@ -420,9 +425,9 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc else { - this->U_ = U1; - this->T_ = T1; this->cp_ = cpEff(td, pc, T1, idG, idL, idS); + this->T_ = T1; + this->U_ = U1; // Update particle density or diameter if (td.constProps().constantVolume()) @@ -439,7 +444,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc template<class ParcelType> template<class TrackData> -Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation +void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation ( TrackData& td, const scalar dt, @@ -450,7 +455,9 @@ Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation const scalar YVolatileTot, const scalarField& YVolatile, bool& canCombust, - scalarField& dMassDV + scalarField& dMassDV, + scalar& Sh, + scalar& dhsTrans ) const { // Check that model is active, and that the parcel temperature is @@ -459,10 +466,9 @@ Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation ( !td.cloud().devolatilisation().active() || T < td.constProps().Tvap() - || T < td.constProps().Tbp() ) { - return 0.0; + return; } // Total mass of volatiles evolved @@ -482,13 +488,13 @@ Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation td.cloud().addToMassDevolatilisation(this->nParticle_*dMassTot); - return -dMassTot*td.constProps().LDevol(); + Sh -= dMassTot*td.constProps().LDevol()/dt; } template<class ParcelType> template<class TrackData> -Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::calcSurfaceReactions +void Foam::ReactingMultiphaseParcel<ParcelType>::calcSurfaceReactions ( TrackData& td, const scalar dt, @@ -505,13 +511,15 @@ Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::calcSurfaceReactions scalarField& dMassSRGas, scalarField& dMassSRLiquid, scalarField& dMassSRSolid, - scalarField& dMassSRCarrier + scalarField& dMassSRCarrier, + scalar& Sh, + scalar& dhsTrans ) const { // Check that model is active if (!td.cloud().surfaceReaction().active() || !canCombust) { - return 0.0; + return; } // Update surface reactions @@ -542,10 +550,31 @@ Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::calcSurfaceReactions *(sum(dMassSRGas) + sum(dMassSRLiquid) + sum(dMassSRSolid)) ); - return hReaction; + const scalar xsi = min(T/5000.0, 1.0); + const scalar hRetentionCoeffMod = + (1.0 - xsi*xsi)*td.constProps().hRetentionCoeff(); + + Sh += hRetentionCoeffMod *hReaction/dt; + + dhsTrans += (1.0 - hRetentionCoeffMod)*hReaction; } +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template <class ParcelType> +Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel +( + const ReactingMultiphaseParcel<ParcelType>& p +) +: + ReactingParcel<ParcelType>(p), + YGas_(p.YGas_), + YLiquid_(p.YLiquid_), + YSolid_(p.YSolid_) +{} + + // * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // #include "ReactingMultiphaseParcelIO.C" diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H index c3ce7e0073930614e434156f69d73fb1b3291339..e4e311ed90c37ac860a52be6c7a3332ef5c11913 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -223,7 +223,7 @@ protected: //- Calculate Devolatilisation template<class TrackData> - scalar calcDevolatilisation + void calcDevolatilisation ( TrackData& td, const scalar dt, // timestep @@ -234,12 +234,14 @@ protected: const scalar YVolatileTot, // total volatile mass fraction const scalarField& YVolatile, // volatile component mass fractions bool& canCombust, // 'can combust' flag - scalarField& dMassDV // mass transfer - local to particle + scalarField& dMassDV, // mass transfer - local to particle + scalar& Sh, // explicit particle enthalpy source + scalar& dhsTrans // sensible enthalpy transfer to carrier ) const; //- Calculate surface reactions template<class TrackData> - scalar calcSurfaceReactions + void calcSurfaceReactions ( TrackData& td, const scalar dt, // timestep @@ -256,20 +258,38 @@ protected: scalarField& dMassSRGas, // gas-phase mass transfer - local scalarField& dMassSRLiquid,// liquid-phase mass transfer - local scalarField& dMassSRSolid, // solid-phase mass transfer - local - scalarField& dMassSRCarrier// carrier phase mass transfer + scalarField& dMassSRCarrier, // carrier phase mass transfer + scalar& Sh, // explicit particle enthalpy source + scalar& dhsTrans // sensible enthalpy transfer to carrier ) const; public: - //- Runtime type information - TypeName("ReactingMultiphaseParcel"); + // Static data members + + //- String representation of properties + static string propHeader; + + //- Runtime type information + TypeName("ReactingMultiphaseParcel"); + friend class Cloud<ParcelType>; // Constructors + //- Construct from owner, position, and cloud owner + // Other properties initialised as null + inline ReactingMultiphaseParcel + ( + ReactingMultiphaseCloud<ParcelType>& owner, + const vector& position, + const label cellI + ); + + //- Construct from components inline ReactingMultiphaseParcel ( @@ -295,13 +315,17 @@ public: bool readFields = true ); + //- Construct as a copy + ReactingMultiphaseParcel(const ReactingMultiphaseParcel& p); + //- Construct and return a clone - autoPtr<ParcelType> clone() const + autoPtr<ReactingMultiphaseParcel> clone() const { - return autoPtr<ParcelType> - ( - new ReactingMultiphaseParcel<ParcelType>(*this) - ); + return + autoPtr<ReactingMultiphaseParcel> + ( + new ReactingMultiphaseParcel(*this) + ); } @@ -318,6 +342,9 @@ public: //- Return const access to mass fractions of solids inline const scalarField& YSolid() const; + //- Return const access to the canCombust flag + inline bool canCombust() const; + // Edit @@ -330,6 +357,9 @@ public: //- Return access to mass fractions of solids inline scalarField& YSolid(); + //- Return access to the canCombust flag + inline bool& canCombust(); + // Main calculation loop diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H index e70b922ae21621cbcb5ae6665e148697515a29d8..c512c5572847966c507b83edbf13a14d2502efb0 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -85,6 +85,22 @@ inline Foam::ReactingMultiphaseParcel<ParcelType>::trackData::trackData {} +template <class ParcelType> +inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel +( + ReactingMultiphaseCloud<ParcelType>& owner, + const vector& position, + const label cellI +) +: + ReactingParcel<ParcelType>(owner, position, cellI), + YGas_(0), + YLiquid_(0), + YSolid_(0), + canCombust_(false) +{} + + template<class ParcelType> inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel ( @@ -185,6 +201,13 @@ YSolid() const } +template<class ParcelType> +inline bool Foam::ReactingMultiphaseParcel<ParcelType>::canCombust() const +{ + return canCombust_; +} + + template<class ParcelType> inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YGas() { @@ -206,4 +229,10 @@ inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YSolid() } +template<class ParcelType> +inline bool& Foam::ReactingMultiphaseParcel<ParcelType>::canCombust() +{ + return canCombust_; +} + // ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C index b836c1c412663db6213081458eee60b883b3cfe4..512f21e9530950563d4d71e0cfb89e1f54215000 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,6 +27,16 @@ License #include "ReactingMultiphaseParcel.H" #include "IOstreams.H" +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template <class ParcelType> +Foam::string Foam::ReactingMultiphaseParcel<ParcelType>::propHeader = + ReactingParcel<ParcelType>::propHeader + + " nGas(Y1..YN)" + + " nLiquid(Y1..YN)" + + " nSolid(Y1..YN)"; + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class ParcelType> diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C index 39658fcf2f8eccfd5b615f40405e515325aaef2f..b52bfeef29f4c81dc18d8f038fc42a6198b197c3 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C @@ -138,10 +138,17 @@ void Foam::ReactingParcel<ParcelType>::calc const scalar cp0 = this->cp_; const scalar mass0 = this->mass(); - // Intial ethalpy state - scalar H0H = td.cloud().composition().H(0, Y_, pc_, T0); - scalar H0L = td.cloud().composition().L(0, Y_, pc_, T0); - scalar H0 = H0H - H0L; + // Explicit momentum source for particle + vector Su = vector::zero; + + // Momentum transfer from the particle to the carrier phase + vector dUTrans = vector::zero; + + // Explicit enthalpy source for particle + scalar Sh = 0.0; + + // Sensible enthalpy transfer from the particle to the carrier phase + scalar dhsTrans = 0.0; // Phase change @@ -150,9 +157,23 @@ void Foam::ReactingParcel<ParcelType>::calc // Mass transfer due to phase change scalarField dMassPC(Y_.size(), 0.0); - // Return enthalpy source and calc mass transfer due to phase change - scalar ShPC = - calcPhaseChange(td, dt, cellI, d0, T0, U0, mass0, 0, 1.0, Y_, dMassPC); + // Calc mass and enthalpy transfer due to phase change + calcPhaseChange + ( + td, + dt, + cellI, + d0, + T0, + U0, + mass0, + 0, + 1.0, + Y_, + dMassPC, + Sh, + dhsTrans + ); // Update particle component mass and mass fractions scalar mass1 = updateMassFraction(mass0, dMassPC, Y_); @@ -162,12 +183,8 @@ void Foam::ReactingParcel<ParcelType>::calc // ~~~~~~~~~~~~~ // Calculate new particle temperature - scalar T1 = calcHeatTransfer(td, dt, cellI, d0, U0, rho0, T0, cp0, ShPC); - - // Calculate new enthalpy state - scalar H1H = td.cloud().composition().H(0, Y_, pc_, T1); - scalar H1L = td.cloud().composition().L(0, Y_, pc_, T1); - scalar H1 = H1H - H1L; + scalar T1 = + calcHeatTransfer(td, dt, cellI, d0, U0, rho0, T0, cp0, Sh, dhsTrans); // Motion @@ -177,8 +194,9 @@ void Foam::ReactingParcel<ParcelType>::calc vector Fx = vector::zero; // Calculate new particle velocity - vector U1 = calcVelocity(td, dt, cellI, d0, U0, rho0, mass0, Fx); + vector U1 = calcVelocity(td, dt, cellI, d0, U0, rho0, mass0, Su, dUTrans); + dUTrans += 0.5*(mass0 - mass1)*(U0 + U1); // Accumulate carrier phase source terms // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -187,15 +205,19 @@ void Foam::ReactingParcel<ParcelType>::calc // Transfer mass lost from particle to carrier mass source forAll(dMassPC, i) { - label id = td.cloud().composition().localToGlobalCarrierId(0, i); - td.cloud().rhoTrans(id)[cellI] += np0*dMassPC[i]; + label gid = td.cloud().composition().localToGlobalCarrierId(0, i); + td.cloud().rhoTrans(gid)[cellI] += np0*dMassPC[i]; + td.cloud().hcTrans()[cellI] += + np0 + *dMassPC[i] + *td.cloud().composition().carrierSpecies()[gid].H(T0); } // Update momentum transfer - td.cloud().UTrans()[cellI] += np0*(mass0*U0 - mass1*U1); + td.cloud().UTrans()[cellI] += np0*dUTrans; // Update sensible enthalpy transfer - td.cloud().hsTrans()[cellI] += np0*(mass0*H0 - mass1*H1); + td.cloud().hsTrans()[cellI] += np0*dhsTrans; } @@ -210,12 +232,13 @@ void Foam::ReactingParcel<ParcelType>::calc // Absorb parcel into carrier phase forAll(Y_, i) { - label id = + label gid = td.cloud().composition().localToGlobalCarrierId(0, i); - td.cloud().rhoTrans(id)[cellI] += np0*mass1*Y_[i]; + td.cloud().rhoTrans(gid)[cellI] += np0*mass1*Y_[i]; } td.cloud().UTrans()[cellI] += np0*mass1*U1; - td.cloud().hsTrans()[cellI] += np0*mass1*H1; + td.cloud().hcTrans()[cellI] += + np0*mass1*td.cloud().composition().H(0, Y_, pc_, T1); } } @@ -225,9 +248,9 @@ void Foam::ReactingParcel<ParcelType>::calc else { - this->U_ = U1; - this->T_ = T1; this->cp_ = td.cloud().composition().cp(0, Y_, pc_, T1); + this->T_ = T1; + this->U_ = U1; // Update particle density or diameter if (td.constProps().constantVolume()) @@ -244,7 +267,7 @@ void Foam::ReactingParcel<ParcelType>::calc template<class ParcelType> template<class TrackData> -Foam::scalar Foam::ReactingParcel<ParcelType>::calcPhaseChange +void Foam::ReactingParcel<ParcelType>::calcPhaseChange ( TrackData& td, const scalar dt, @@ -256,7 +279,9 @@ Foam::scalar Foam::ReactingParcel<ParcelType>::calcPhaseChange const label idPhase, const scalar YPhase, const scalarField& YComponents, - scalarField& dMassPC + scalarField& dMassPC, + scalar& Sh, + scalar& dhsTrans ) { if @@ -266,7 +291,7 @@ Foam::scalar Foam::ReactingParcel<ParcelType>::calcPhaseChange || YPhase < SMALL ) { - return 0.0; + return; } // Calculate mass transfer due to phase change @@ -275,7 +300,7 @@ Foam::scalar Foam::ReactingParcel<ParcelType>::calcPhaseChange dt, cellI, d, - min(T, td.constProps().Tbp()), // Limit to boiling temperature + T, pc_, this->Tc_, this->muc_/(this->rhoc_ + ROOTVSMALL), @@ -291,13 +316,38 @@ Foam::scalar Foam::ReactingParcel<ParcelType>::calcPhaseChange // Add to cumulative phase change mass td.cloud().addToMassPhaseChange(this->nParticle_*dMassTot); - // Effective latent heat of vaporisation - scalar LEff = td.cloud().composition().L(idPhase, YComponents, pc_, T); + // Enthalphy transfer to carrier phase + forAll(YComponents, i) + { + label gid; + + gid = td.cloud().composition().localToGlobalCarrierId(idPhase, i); + const scalar hv = td.cloud().composition().carrierSpecies()[gid].H(T); - return -dMassTot*LEff; + gid = td.cloud().composition().globalIds(idPhase)[i]; + const scalar hl = + td.cloud().composition().liquids().properties()[gid].h(pc_, T); + + Sh += dMassPC[i]*(hl - hv)/dt; + } } +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template <class ParcelType> +Foam::ReactingParcel<ParcelType>::ReactingParcel +( + const ReactingParcel<ParcelType>& p +) +: + ThermoParcel<ParcelType>(p), + mass0_(p.mass0_), + Y_(p.Y_), + pc_(p.pc_) +{} + + // * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // #include "ReactingParcelIO.C" diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H index 59e22d7d06867b1152ec2679aa056c0e0700bff4..8e351f96f098362f9532da369751e16ced11bcbe 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H @@ -46,6 +46,7 @@ SourceFiles #include "ThermoParcel.H" #include "ReactingCloud.H" +#include "reactingParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -69,6 +70,7 @@ Ostream& operator<< template<class ParcelType> class ReactingParcel : + public reactingParcel, public ThermoParcel<ParcelType> { public: @@ -86,10 +88,7 @@ public: //- Constant volume flag - e.g. during mass transfer Switch constantVolume_; - //- Boiling point [K] - const scalar Tbp_; - - //- Vapourisation temperature [K] + //- Vaporisation temperature [K] const scalar Tvap_; @@ -106,10 +105,7 @@ public: //- Return const access to the constant volume flag inline Switch constantVolume() const; - //- Return const access to the boiling point - inline scalar Tbp() const; - - //- Return const access to the vapourisation temperature + //- Return const access to the vaporisation temperature inline scalar Tvap() const; }; @@ -159,7 +155,7 @@ public: //- Return const access to the constant properties inline const constantProperties& constProps() const; - //- Return conat access to the interpolator for continuous + //- Return const access to the interpolator for continuous // phase pressure field inline const interpolation<scalar>& pInterp() const; }; @@ -188,7 +184,7 @@ protected: //- Calculate Phase change template<class TrackData> - scalar calcPhaseChange + void calcPhaseChange ( TrackData& td, const scalar dt, // timestep @@ -200,7 +196,9 @@ protected: const label idPhase, // id of phase involved in phase change const scalar YPhase, // total mass fraction const scalarField& YComponents, // component mass fractions - scalarField& dMassPC // mass transfer - local to particle + scalarField& dMassPC, // mass transfer - local to particle + scalar& Sh, // explicit particle enthalpy source + scalar& dhsTrans // sensible enthalpy transfer to carrier ); //- Update mass fraction @@ -214,14 +212,29 @@ protected: public: - //- Runtime type information - TypeName("ReactingParcel"); + // Static data members + + //- String representation of properties + static string propHeader; + + //- Runtime type information + TypeName("ReactingParcel"); + friend class Cloud<ParcelType>; // Constructors + //- Construct from owner, position, and cloud owner + // Other properties initialised as null + inline ReactingParcel + ( + ReactingCloud<ParcelType>& owner, + const vector& position, + const label cellI + ); + //- Construct from components inline ReactingParcel ( @@ -244,10 +257,13 @@ public: bool readFields = true ); + //- Construct as a copy + ReactingParcel(const ReactingParcel& p); + //- Construct and return a clone - autoPtr<ParcelType> clone() const + autoPtr<ReactingParcel> clone() const { - return autoPtr<ParcelType>(new ReactingParcel<ParcelType>(*this)); + return autoPtr<ReactingParcel>(new ReactingParcel(*this)); } diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H index 344eb09398a80d60cb3a117cf1da53eb7fc4fd6c..5c2b3c7b2d4b0fb885052120a4eec448831e01d7 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H @@ -35,7 +35,6 @@ inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties ThermoParcel<ParcelType>::constantProperties(parentDict), pMin_(dimensionedScalar(this->dict().lookup("pMin")).value()), constantVolume_(this->dict().lookup("constantVolume")), - Tbp_(dimensionedScalar(this->dict().lookup("Tbp")).value()), Tvap_(dimensionedScalar(this->dict().lookup("Tvap")).value()) {} @@ -71,6 +70,21 @@ inline Foam::ReactingParcel<ParcelType>::trackData::trackData {} +template<class ParcelType> +inline Foam::ReactingParcel<ParcelType>::ReactingParcel +( + ReactingCloud<ParcelType>& owner, + const vector& position, + const label cellI +) +: + ThermoParcel<ParcelType>(owner, position, cellI), + mass0_(0.0), + Y_(0), + pc_(0.0) +{} + + template<class ParcelType> inline Foam::ReactingParcel<ParcelType>::ReactingParcel ( @@ -123,14 +137,6 @@ Foam::ReactingParcel<ParcelType>::constantProperties::constantVolume() const } -template<class ParcelType> -inline Foam::scalar -Foam::ReactingParcel<ParcelType>::constantProperties::Tbp() const -{ - return Tbp_; -} - - template<class ParcelType> inline Foam::scalar Foam::ReactingParcel<ParcelType>::constantProperties::Tvap() const diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C index 968c608d7e2ed252332271828c33c1208a3c8334..b72d2af25a20f7525bd461f8aa1b24f07e4bf8b7 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C @@ -27,6 +27,15 @@ License #include "ReactingParcel.H" #include "IOstreams.H" +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template <class ParcelType> +Foam::string Foam::ReactingParcel<ParcelType>::propHeader = + ThermoParcel<ParcelType>::propHeader + + " mass0" + + " nPhases(Y1..YN)"; + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class ParcelType> @@ -215,11 +224,10 @@ Foam::Ostream& Foam::operator<< os << static_cast<const ThermoParcel<ParcelType>&>(p); os.write ( - reinterpret_cast<const char*>(&p.mass0_), sizeof(p.mass0()) ); - os << p.Y(); + os << p.Y(); } // Check state of Ostream diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C index 5885512511ae853cf146ded11a2cf487cd477319..4596a471259111fbd0092bbbea56b88c676f3c55 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C @@ -96,31 +96,31 @@ void Foam::ThermoParcel<ParcelType>::calc const scalar cp0 = this->cp_; const scalar mass0 = this->mass(); - // Initial enthalpy state - scalar H0 = cp0*T0; + // Explicit momentum source for particle + vector Su = vector::zero; + // Momentum transfer from the particle to the carrier phase + vector dUTrans = vector::zero; + + // Explicit enthalpy source for particle + scalar Sh = 0.0; + + // Sensible enthalpy transfer from the particle to the carrier phase + scalar dhsTrans = 0.0; // Heat transfer // ~~~~~~~~~~~~~ - // No additional enthalpy sources - scalar Sh = 0.0; - // Calculate new particle velocity - scalar T1 = calcHeatTransfer(td, dt, cellI, d0, U0, rho0, T0, cp0, Sh); - - // Calculate new enthalpy state - scalar H1 = cp0*T1; + scalar T1 = + calcHeatTransfer(td, dt, cellI, d0, U0, rho0, T0, cp0, Sh, dhsTrans); // Motion // ~~~~~~ - // No additional forces - vector Fx = vector::zero; - // Calculate new particle velocity - vector U1 = calcVelocity(td, dt, cellI, d0, U0, rho0, mass0, Fx); + vector U1 = calcVelocity(td, dt, cellI, d0, U0, rho0, mass0, Su, dUTrans); // Accumulate carrier phase source terms @@ -128,10 +128,10 @@ void Foam::ThermoParcel<ParcelType>::calc if (td.cloud().coupled()) { // Update momentum transfer - td.cloud().UTrans()[cellI] += np0*mass0*(U0 - U1); + td.cloud().UTrans()[cellI] += np0*dUTrans; // Update sensible enthalpy transfer - td.cloud().hsTrans()[cellI] += np0*mass0*(H0 - H1); + td.cloud().hsTrans()[cellI] += np0*dhsTrans; } // Set new particle properties @@ -153,7 +153,8 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer const scalar rho, const scalar T, const scalar cp, - const scalar Sh + const scalar Sh, + scalar& dhsTrans ) { if (!td.cloud().heatTransfer().active()) @@ -173,38 +174,64 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer this->muc_ ); + const scalar As = this->areaS(d); - // Determine new particle temperature - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - // Determine ap and bp coefficients - scalar ap = Tc_ + Sh/(htc*this->areaS(d) + ROOTVSMALL); - scalar bp = 6.0*htc/(rho*d*cp); - if (td.cloud().radiation()) + if (mag(htc) < ROOTVSMALL && !td.cloud().radiation()) { - // Carrier phase incident radiation field - // - The G field is not interpolated to the parcel position - // Instead, the cell centre value is applied directly - const scalarField& G = td.cloud().mesh().objectRegistry - ::lookupObject<volScalarField>("G"); + return T + dt*Sh/(this->mass()*cp); + } - // Helper variables + scalar ap; + scalar bp; + + if(td.cloud().radiation()) + { + const scalarField& G = + td.cloud().mesh().objectRegistry::lookupObject<volScalarField>("G"); const scalar sigma = radiation::sigmaSB.value(); const scalar epsilon = td.constProps().epsilon0(); - const scalar D = epsilon*sigma*pow3(T)/(htc + ROOTVSMALL) + 1.0; - ap += 0.25*epsilon*G[cellI]/(htc + ROOTVSMALL); - ap /= D; - bp *= D; + + ap = + (Sh/As + htc*Tc_ + epsilon*G[cellI]/4.0) + /(htc + epsilon*sigma*pow3(T)); + + bp = + 6.0 + *(Sh/As + htc*(Tc_ - T) + epsilon*(G[cellI]/4.0 - sigma*pow4(T))) + /(rho*d*cp*(ap - T)); + } + else + { + ap = Tc_ + Sh/As/htc; + bp = 6.0*(Sh/As + htc*(Tc_ - T))/(rho*d*cp*(ap - T)); } // Integrate to find the new parcel temperature IntegrationScheme<scalar>::integrationResult Tres = td.cloud().TIntegrator().integrate(T, dt, ap, bp); + dhsTrans += dt*htc*As*(Tres.average() - Tc_); + return Tres.value(); } +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template <class ParcelType> +Foam::ThermoParcel<ParcelType>::ThermoParcel +( + const ThermoParcel<ParcelType>& p +) +: + KinematicParcel<ParcelType>(p), + T_(p.T_), + cp_(p.cp_), + Tc_(p.Tc_), + cpc_(p.cpc_) +{} + + // * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // #include "ThermoParcelIO.C" diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H index 1927ca3de692ab4b6fe01857e10b8211921d094d..c11fecd11dc9166cfe5f1753686cf6bcd6030132 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H @@ -146,7 +146,7 @@ public: //- Temperature field interpolator const interpolation<scalar>& TInterp_; - //- Scpecific heat capacity field interpolator + //- Specific heat capacity field interpolator const interpolation<scalar>& cpInterp_; @@ -176,11 +176,11 @@ public: //- Return const access to the owner cloud inline const constantProperties& constProps() const; - //- Return conat access to the interpolator for continuous + //- Return const access to the interpolator for continuous // phase temperature field inline const interpolation<scalar>& TInterp() const; - //- Return conat access to the interpolator for continuous + //- Return const access to the interpolator for continuous // phase specific heat capacity field inline const interpolation<scalar>& cpInterp() const; }; @@ -222,20 +222,36 @@ protected: const scalar rho, // density const scalar T, // temperature const scalar cp, // specific heat capacity - const scalar Sh // additional enthalpy sources + const scalar Sh, // explicit particle enthalpy source + scalar& dhsTrans // sensible enthalpy transfer to carrier ); public: - //- Runtime type information - TypeName("ThermoParcel"); + // Static data members + + //- String representation of properties + static string propHeader; + + //- Runtime type information + TypeName("ThermoParcel"); + friend class Cloud<ParcelType>; // Constructors + //- Construct from owner, position, and cloud owner + // Other properties initialised as null + inline ThermoParcel + ( + ThermoCloud<ParcelType>& owner, + const vector& position, + const label cellI + ); + //- Construct from components inline ThermoParcel ( @@ -257,10 +273,13 @@ public: bool readFields = true ); + //- Construct as a copy + ThermoParcel(const ThermoParcel& p); + //- Construct and return a clone - autoPtr<ParcelType> clone() const + autoPtr<ThermoParcel> clone() const { - return autoPtr<ParcelType>(new ThermoParcel<ParcelType>(*this)); + return autoPtr<ThermoParcel>(new ThermoParcel(*this)); } diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H index 6e929b6e691f2c913c122413a2c36df90c3171b7..8ce0cb56915196a30a7348af7582c64161d17523 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H @@ -70,6 +70,22 @@ inline Foam::ThermoParcel<ParcelType>::trackData::trackData {} +template<class ParcelType> +inline Foam::ThermoParcel<ParcelType>::ThermoParcel +( + ThermoCloud<ParcelType>& owner, + const vector& position, + const label cellI +) +: + KinematicParcel<ParcelType>(owner, position, cellI), + T_(0.0), + cp_(0.0), + Tc_(0.0), + cpc_(0.0) +{} + + template<class ParcelType> inline Foam::ThermoParcel<ParcelType>::ThermoParcel ( diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelIO.C index d4f30ce91734218f78c7108d4c937b11a76e058f..827b2f36f41ec7f94068c8f6a7213800d2fa26bb 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelIO.C +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelIO.C @@ -27,6 +27,15 @@ License #include "ThermoParcel.H" #include "IOstreams.H" +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template <class ParcelType> +Foam::string Foam::ThermoParcel<ParcelType>::propHeader = + KinematicParcel<ParcelType>::propHeader + + " T" + + " cp"; + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class ParcelType> diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelHeatTransferModels.C b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcel.C similarity index 71% rename from src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelHeatTransferModels.C rename to src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcel.C index 92e1a6727006de9d3b56bea6f5752aec21d29425..b41cb31df9454bcd2e03ccb799cf146b26fd5a32 100644 --- a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelHeatTransferModels.C +++ b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,22 +24,24 @@ License \*---------------------------------------------------------------------------*/ -#include "coalParcel.H" -#include "ThermoCloud.H" +#include "TrackedReactingParcel.H" -#include "NoHeatTransfer.H" -#include "RanzMarshall.H" +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +template <class ParcelType> +Foam::TrackedReactingParcel<ParcelType>::TrackedReactingParcel +( + const TrackedReactingParcel<ParcelType>& p +) +: + ReactingParcel<ParcelType>(p), + ParticleTrackingData<ParcelType>(p) +{} -namespace Foam -{ - makeHeatTransferModel(ThermoCloud<coalParcel>); - // Add instances of heat transfer model to the table - makeHeatTransferModelType(NoHeatTransfer, ThermoCloud, coalParcel); - makeHeatTransferModelType(RanzMarshall, ThermoCloud, coalParcel); -}; +// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // +#include "TrackedReactingParcelIO.C" // ************************************************************************* // + diff --git a/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcel.H b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcel.H new file mode 100644 index 0000000000000000000000000000000000000000..8df58f8d2c8938473289a9c024877d0bad670d08 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcel.H @@ -0,0 +1,169 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +Class + Foam::TrackedReactingParcel + +Description + Adds tracking to ReactingParcel + +SourceFiles + TrackedReactingParcelI.H + TrackedReactingParcel.C + TrackedReactingParcelIO.C + +\*---------------------------------------------------------------------------*/ + +#ifndef TrackedReactingParcel_H +#define TrackedReactingParcel_H + +#include "ReactingParcel.H" +#include "ParticleTrackingData.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template<class ParcelType> +class TrackedReactingParcel; + +// Forward declaration of friend functions + +template<class ParcelType> +Ostream& operator<< +( + Ostream&, + const TrackedReactingParcel<ParcelType>& +); + +/*---------------------------------------------------------------------------*\ + Class TrackedReactingParcel Declaration +\*---------------------------------------------------------------------------*/ + +template<class ParcelType> +class TrackedReactingParcel +: + public ReactingParcel<ParcelType>, + public ParticleTrackingData<ParcelType> +{ +public: + + typedef typename ReactingParcel<ParcelType>::constantProperties + constantProperties; + + // Static data + + //- Runtime type information + TypeName("TrackedReactingParcel"); + + + // Constructors + + //- Construct from owner, position, and cloud owner + // Other properties initialised as null + inline TrackedReactingParcel + ( + ReactingCloud<ParcelType>& owner, + const vector& position, + const label cellI + ); + + //- Construct from components + inline TrackedReactingParcel + ( + ReactingCloud<ParcelType>& owner, + const vector& position, + const label cellI, + const label typeId, + const scalar nParticle0, + const scalar d0, + const vector& U0, + const scalarField& Y0, + const constantProperties& constProps + ); + + //- Construct from Istream + TrackedReactingParcel + ( + const Cloud<ParcelType>& c, + Istream& is, + bool readFields = true + ); + + //- Construct as a copy + TrackedReactingParcel(const TrackedReactingParcel& p); + + //- Construct and return a clone + autoPtr<TrackedReactingParcel> clone() const + { + return + autoPtr<TrackedReactingParcel> + ( + new TrackedReactingParcel(*this) + ); + } + + + // Member Functions + + // I-O + + //- Read + static void readFields(ReactingCloud<ParcelType>& c); + + //- Write + static void writeFields(const ReactingCloud<ParcelType>& c); + + + // Ostream Operator + + friend Ostream& operator<< <ParcelType> + ( + Ostream&, + const TrackedReactingParcel<ParcelType>& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "TrackedReactingParcelI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "TrackedReactingParcel.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // + diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.C b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcelI.H similarity index 66% rename from src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.C rename to src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcelI.H index 72ac1f4842f72de5353f4b7d7f7263a55f9e4235..a3bf01eb35772d6f5fdd64feafc21de6449b8a61 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcelI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,23 +24,25 @@ License \*---------------------------------------------------------------------------*/ -#include "basicReactingParcel.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(basicReactingParcel, 0); - defineParticleTypeNameAndDebug(basicReactingParcel, 0); - defineParcelTypeNameAndDebug(basicReactingParcel, 0); -}; +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +template <class ParcelType> +inline Foam::TrackedReactingParcel<ParcelType>::TrackedReactingParcel +( + ReactingCloud<ParcelType>& owner, + const vector& position, + const label cellI +) +: + ReactingParcel<ParcelType>(owner, position, cellI), + ParticleTrackingData<ParcelType>(owner) +{} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::basicReactingParcel::basicReactingParcel +template <class ParcelType> +inline Foam::TrackedReactingParcel<ParcelType>::TrackedReactingParcel ( - ReactingCloud<basicReactingParcel>& owner, + ReactingCloud<ParcelType>& owner, const vector& position, const label cellI, const label typeId, @@ -51,7 +53,7 @@ Foam::basicReactingParcel::basicReactingParcel const constantProperties& constProps ) : - ReactingParcel<basicReactingParcel> + ReactingParcel<ParcelType> ( owner, position, @@ -62,24 +64,8 @@ Foam::basicReactingParcel::basicReactingParcel U0, Y0, constProps - ) -{} - - -Foam::basicReactingParcel::basicReactingParcel -( - const Cloud<basicReactingParcel>& cloud, - Istream& is, - bool readFields -) -: - ReactingParcel<basicReactingParcel>(cloud, is, readFields) -{} - - -// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // - -Foam::basicReactingParcel::~basicReactingParcel() + ), + ParticleTrackingData<ParcelType>(owner) {} diff --git a/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcelIO.C new file mode 100644 index 0000000000000000000000000000000000000000..8ce5d9b2f2f22a726598366796204702741a40b1 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcelIO.C @@ -0,0 +1,105 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "TrackedReactingParcel.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template <class ParcelType> +Foam::TrackedReactingParcel<ParcelType>::TrackedReactingParcel +( + const Cloud<ParcelType>& cloud, + Istream& is, + bool readFields +) +: + ReactingParcel<ParcelType>(cloud, is, readFields), + ParticleTrackingData<ParcelType>(cloud, is, readFields) +{} + + +template<class ParcelType> +void Foam::TrackedReactingParcel<ParcelType>::readFields +( + ReactingCloud<ParcelType>& c +) +{ + if (!c.size()) + { + return; + } + + ReactingParcel<ParcelType>::readFields(c); + ParticleTrackingData<ParcelType>::readFields(c); +} + + +template<class ParcelType> +void Foam::TrackedReactingParcel<ParcelType>::writeFields +( + const ReactingCloud<ParcelType>& c +) +{ + ReactingParcel<ParcelType>::writeFields(c); + ParticleTrackingData<ParcelType>::writeFields(c); +} + + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +template<class ParcelType> +Foam::Ostream& Foam::operator<< +( + Ostream& os, + const TrackedReactingParcel<ParcelType>& p +) +{ + if (os.format() == IOstream::ASCII) + { + os << static_cast<const ReactingParcel<ParcelType>&>(p) + << static_cast<const ParticleTrackingData<ParcelType>&>(p); + } + else + { + os << static_cast<const ReactingParcel<ParcelType>&>(p) + << static_cast<const ParticleTrackingData<ParcelType>&>(p); + } + + // Check state of Ostream + os.check + ( + "Ostream& operator<<" + "(" + "Ostream&, " + "const TrackedReactingParcel<ParcelType>&" + ")" + ); + + return os; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/baseClasses/reactingParcel/reactingParcel.C b/src/lagrangian/intermediate/parcels/baseClasses/reactingParcel/reactingParcel.C new file mode 100644 index 0000000000000000000000000000000000000000..2974454658e5349c0ec4ddd1a354a85b30334db8 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/baseClasses/reactingParcel/reactingParcel.C @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "reactingParcel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(reactingParcel, 0); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::reactingParcel::reactingParcel() +{} + + +// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // + +Foam::reactingParcel::~reactingParcel() +{} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/baseClasses/reactingParcel/reactingParcel.H b/src/lagrangian/intermediate/parcels/baseClasses/reactingParcel/reactingParcel.H new file mode 100644 index 0000000000000000000000000000000000000000..e78b15347d4483d63cba2e7ef0b24a6f4727a3cc --- /dev/null +++ b/src/lagrangian/intermediate/parcels/baseClasses/reactingParcel/reactingParcel.H @@ -0,0 +1,81 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +Class + Foam::basicReactingParcel + +Description + Base class for reacting parcel - simply used to set the contiguous flag + +SourceFiles + reactingParcel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef reactingParcel_H +#define reactingParcel_H + +#include "typeInfo.H" +#include "contiguous.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class reactingParcel Declaration +\*---------------------------------------------------------------------------*/ + +class reactingParcel +{ +public: + + //- Run-time type information + TypeName("reactingParcel"); + + //- Construct null + reactingParcel(); + + //- Destructor + virtual ~reactingParcel(); +}; + + +template<> +inline bool contiguous<reactingParcel>() +{ + return false; // Derived classes include scalar lists/fields +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/BasicReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/BasicReactingMultiphaseParcel.C new file mode 100644 index 0000000000000000000000000000000000000000..2189d8d8be909c0a6c852955b82a9af5839e9576 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/BasicReactingMultiphaseParcel.C @@ -0,0 +1,120 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "BasicReactingMultiphaseParcel.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class ThermoType> +Foam::BasicReactingMultiphaseParcel<ThermoType>::BasicReactingMultiphaseParcel +( + ReactingMultiphaseCloud<BasicReactingMultiphaseParcel<ThermoType> >& owner, + const vector& position, + const label cellI +) +: + ReactingMultiphaseParcel<BasicReactingMultiphaseParcel<ThermoType> > + ( + owner, + position, + cellI + ) +{} + + +template<class ThermoType> +Foam::BasicReactingMultiphaseParcel<ThermoType>::BasicReactingMultiphaseParcel +( + ReactingMultiphaseCloud<BasicReactingMultiphaseParcel<ThermoType> >& owner, + const vector& position, + const label cellI, + const label typeId, + const scalar nParticle0, + const scalar d0, + const vector& U0, + const scalarField& YGas0, + const scalarField& YLiquid0, + const scalarField& YSolid0, + const scalarField& Y0, + const typename + ReactingMultiphaseParcel<BasicReactingMultiphaseParcel>:: + constantProperties& constProps +) +: + ReactingMultiphaseParcel<BasicReactingMultiphaseParcel<ThermoType> > + ( + owner, + position, + cellI, + typeId, + nParticle0, + d0, + U0, + YGas0, + YLiquid0, + YSolid0, + Y0, + constProps + ) +{} + + +template<class ThermoType> +Foam::BasicReactingMultiphaseParcel<ThermoType>::BasicReactingMultiphaseParcel +( + const Cloud<BasicReactingMultiphaseParcel<ThermoType> >& cloud, + Istream& is, + bool readFields +) +: + ReactingMultiphaseParcel<BasicReactingMultiphaseParcel<ThermoType> > + ( + cloud, + is, + readFields + ) +{} + + +template<class ThermoType> +Foam::BasicReactingMultiphaseParcel<ThermoType>::BasicReactingMultiphaseParcel +( + const BasicReactingMultiphaseParcel<ThermoType>& p +) +: + ReactingMultiphaseParcel<BasicReactingMultiphaseParcel<ThermoType> >(p) +{} + + +// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // + +template<class ThermoType> +Foam::BasicReactingMultiphaseParcel<ThermoType>:: +~BasicReactingMultiphaseParcel() +{} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.H b/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/BasicReactingMultiphaseParcel.H similarity index 56% rename from src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.H rename to src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/BasicReactingMultiphaseParcel.H index cc537e56380eb666dbefb6db4bca83efcd293d33..f216f8f54780b9b87ac2d928dd9ab4e2f9fbf4c9 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.H +++ b/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/BasicReactingMultiphaseParcel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,47 +23,65 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::basicReactingMultiphaseParcel + Foam::BasicReactingMultiphaseParcel Description SourceFiles - basicReactingMultiphaseParcel.C - basicReactingMultiphaseParcelIO.C + BasicReactingMultiphaseParcel.C + BasicReactingMultiphaseParcelIO.C \*---------------------------------------------------------------------------*/ -#ifndef basicReactingMultiphaseParcel_H -#define basicReactingMultiphaseParcel_H +#ifndef BasicReactingMultiphaseParcel_H +#define BasicReactingMultiphaseParcel_H #include "ReactingMultiphaseParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + namespace Foam { +// Forward declaration of classes +template<class ThermoType> +class BasicReactingMultiphaseParcel; + /*---------------------------------------------------------------------------*\ - Class basicReactingMultiphaseParcel Declaration + Class BasicReactingMultiphaseParcel Declaration \*---------------------------------------------------------------------------*/ -class basicReactingMultiphaseParcel +template<class ThermoType> +class BasicReactingMultiphaseParcel : - public ReactingMultiphaseParcel<basicReactingMultiphaseParcel> + public ReactingMultiphaseParcel<BasicReactingMultiphaseParcel<ThermoType> > { public: + //- The type of thermodynamics this parcel was instantiated for + typedef ThermoType thermoType; + //- Run-time type information - TypeName("basicReactingMultiphaseParcel"); + TypeName("BasicReactingMultiphaseParcel"); // Constructors + //- Construct from owner, position, and cloud owner + // Other properties initialised as null + BasicReactingMultiphaseParcel + ( + ReactingMultiphaseCloud<BasicReactingMultiphaseParcel>& owner, + const vector& position, + const label cellI + ); + //- Construct from components - basicReactingMultiphaseParcel + BasicReactingMultiphaseParcel ( - ReactingMultiphaseCloud<basicReactingMultiphaseParcel>& owner, + ReactingMultiphaseCloud<BasicReactingMultiphaseParcel>& owner, const vector& position, const label cellI, const label typeId, @@ -74,40 +92,47 @@ public: const scalarField& YLiquid0, const scalarField& YSolid0, const scalarField& Y0, - const constantProperties& constProps + const typename + ReactingMultiphaseParcel<BasicReactingMultiphaseParcel>:: + constantProperties& constProps ); //- Construct from Istream - basicReactingMultiphaseParcel + BasicReactingMultiphaseParcel ( - const Cloud<basicReactingMultiphaseParcel>& c, + const Cloud<BasicReactingMultiphaseParcel>& c, Istream& is, bool readFields = true ); + //- Construct as a copy + BasicReactingMultiphaseParcel(const BasicReactingMultiphaseParcel& p); + //- Construct and return a clone - autoPtr<basicReactingMultiphaseParcel> clone() const + autoPtr<BasicReactingMultiphaseParcel> clone() const { - return autoPtr<basicReactingMultiphaseParcel> - (new basicReactingMultiphaseParcel(*this)); + return + autoPtr<BasicReactingMultiphaseParcel> + ( + new BasicReactingMultiphaseParcel(*this) + ); } //- Destructor - virtual ~basicReactingMultiphaseParcel(); + virtual ~BasicReactingMultiphaseParcel(); }; -template<> -inline bool contiguous<basicReactingMultiphaseParcel>() -{ - return false; // Now have scalar lists/fields (mass fractions) -} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam +#ifdef NoRepository + #include "BasicReactingMultiphaseParcel.C" +#endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C new file mode 100644 index 0000000000000000000000000000000000000000..d73d63e9dd6d1a3dae186c26aa94faaf94767624 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "createReactingMultiphaseParcelTypes.H" +#include "BasicReactingMultiphaseParcel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + createReactingMultiphaseParcelType(BasicReactingMultiphaseParcel); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSubmodels.C b/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSubmodels.C new file mode 100644 index 0000000000000000000000000000000000000000..08c87530c37f60cfc1736f1894152080b6870a85 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSubmodels.C @@ -0,0 +1,77 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "BasicReactingMultiphaseParcel.H" + +// Kinematic +#include "makeReactingParcelDispersionModels.H" +#include "makeReactingParcelDragModels.H" +#include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant +#include "makeReactingParcelPatchInteractionModels.H" +#include "makeReactingParcelPostProcessingModels.H" + +// Thermodynamic +#include "makeReactingParcelHeatTransferModels.H" + +// Reacting +#include "makeReactingMultiphaseParcelCompositionModels.H" // MP variant +#include "makeReactingParcelPhaseChangeModels.H" + +// Reacting multiphase +#include "makeReactingMultiphaseParcelDevolatilisationModels.H" +#include "makeReactingMultiphaseParcelSurfaceReactionModels.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + // Kinematic sub-models + makeReactingDispersionModels(BasicReactingMultiphaseParcel); + makeReactingDragModels(BasicReactingMultiphaseParcel); + makeReactingMultiphaseInjectionModels(BasicReactingMultiphaseParcel); + makeReactingPatchInteractionModels(BasicReactingMultiphaseParcel); + makeReactingPostProcessingModels(BasicReactingMultiphaseParcel); + + // Thermo sub-models + makeReactingHeatTransferModels(BasicReactingMultiphaseParcel); + + // Reacting sub-models + makeReactingMultiphaseCompositionModels(BasicReactingMultiphaseParcel); + makeReactingPhaseChangeModels(BasicReactingMultiphaseParcel); + + // Reacting multiphase sub-models + makeReactingMultiphaseDevolatilisationModels + ( + BasicReactingMultiphaseParcel + ); + makeReactingMultiphaseSurfaceReactionModels + ( + BasicReactingMultiphaseParcel + ); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/BasicReactingParcel.C similarity index 62% rename from src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.C rename to src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/BasicReactingParcel.C index d200738319074ca40bbab59fb124b1b909bab94f..d2b00fdf73f3b6aef58d7d53fbe37a79f4f16f51 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.C +++ b/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/BasicReactingParcel.C @@ -24,37 +24,38 @@ License \*---------------------------------------------------------------------------*/ -#include "basicReactingMultiphaseParcel.H" +#include "BasicReactingParcel.H" -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(basicReactingMultiphaseParcel, 0); - defineParticleTypeNameAndDebug(basicReactingMultiphaseParcel, 0); - defineParcelTypeNameAndDebug(basicReactingMultiphaseParcel, 0); -}; +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +template<class ThermoType> +Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel +( + ReactingCloud<BasicReactingParcel<ThermoType> >& owner, + const vector& position, + const label cellI +) +: + ReactingParcel<BasicReactingParcel<ThermoType> >(owner, position, cellI) +{} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel +template<class ThermoType> +Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel ( - ReactingMultiphaseCloud<basicReactingMultiphaseParcel>& owner, + ReactingCloud<BasicReactingParcel<ThermoType> >& owner, const vector& position, const label cellI, const label typeId, const scalar nParticle0, const scalar d0, const vector& U0, - const scalarField& YGas0, - const scalarField& YLiquid0, - const scalarField& YSolid0, const scalarField& Y0, - const constantProperties& constProps + const typename ReactingParcel<BasicReactingParcel<ThermoType> >:: + constantProperties& constProps ) : - ReactingMultiphaseParcel<basicReactingMultiphaseParcel> + ReactingParcel<BasicReactingParcel<ThermoType> > ( owner, position, @@ -63,34 +64,38 @@ Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel nParticle0, d0, U0, - YGas0, - YLiquid0, - YSolid0, Y0, constProps ) {} -Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel +template<class ThermoType> +Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel ( - const Cloud<basicReactingMultiphaseParcel>& cloud, + const Cloud<BasicReactingParcel<ThermoType> >& cloud, Istream& is, bool readFields ) : - ReactingMultiphaseParcel<basicReactingMultiphaseParcel> - ( - cloud, - is, - readFields - ) + ReactingParcel<BasicReactingParcel<ThermoType> >(cloud, is, readFields) +{} + + +template<class ThermoType> +Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel +( + const BasicReactingParcel<ThermoType>& p +) +: + ReactingParcel<BasicReactingParcel>(p) {} // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // -Foam::basicReactingMultiphaseParcel::~basicReactingMultiphaseParcel() +template<class ThermoType> +Foam::BasicReactingParcel<ThermoType>::~BasicReactingParcel() {} diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H b/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/BasicReactingParcel.H similarity index 60% rename from src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H rename to src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/BasicReactingParcel.H index fae88a2da7bd8a26295b904ba8c5830c2082036f..b8b44eb237e4e2973a1abdbabab0fd943a61fbf7 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H +++ b/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/BasicReactingParcel.H @@ -23,19 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::basicReactingParcel + Foam::BasicReactingParcel Description SourceFiles - basicReactingParcel.C - basicReactingParcelIO.C + BasicReactingParcel.C + BasicReactingParcelIO.C \*---------------------------------------------------------------------------*/ -#ifndef basicReactingParcel_H -#define basicReactingParcel_H +#ifndef BasicReactingParcel_H +#define BasicReactingParcel_H #include "ReactingParcel.H" @@ -44,26 +44,43 @@ SourceFiles namespace Foam { +// Forward declaration of classes +template<class ThermoType> +class BasicReactingParcel; + /*---------------------------------------------------------------------------*\ - Class basicReactingParcel Declaration + Class BasicReactingParcel Declaration \*---------------------------------------------------------------------------*/ -class basicReactingParcel +template<class ThermoType> +class BasicReactingParcel : - public ReactingParcel<basicReactingParcel> + public ReactingParcel<BasicReactingParcel<ThermoType> > { public: + //- The type of thermodynamics this parcel was instantiated for + typedef ThermoType thermoType; + //- Run-time type information - TypeName("basicReactingParcel"); + TypeName("BasicReactingParcel"); // Constructors + //- Construct from owner, position, and cloud owner + // Other properties initialised as null + BasicReactingParcel + ( + ReactingCloud<BasicReactingParcel>& owner, + const vector& position, + const label cellI + ); + //- Construct from components - basicReactingParcel + BasicReactingParcel ( - ReactingCloud<basicReactingParcel>& owner, + ReactingCloud<BasicReactingParcel>& owner, const vector& position, const label cellI, const label typeId, @@ -71,39 +88,46 @@ public: const scalar d0, const vector& U0, const scalarField& Y0, - const constantProperties& constProps + const typename ReactingParcel<BasicReactingParcel>:: + constantProperties& constProps ); //- Construct from Istream - basicReactingParcel + BasicReactingParcel ( - const Cloud<basicReactingParcel>& c, + const Cloud<BasicReactingParcel>& c, Istream& is, bool readFields = true ); + //- Construct as a copy + BasicReactingParcel(const BasicReactingParcel& p); + //- Construct and return a clone - autoPtr<basicReactingParcel> clone() const + autoPtr<BasicReactingParcel> clone() const { - return autoPtr<basicReactingParcel>(new basicReactingParcel(*this)); + return + autoPtr<BasicReactingParcel> + ( + new BasicReactingParcel(*this) + ); } //- Destructor - virtual ~basicReactingParcel(); + virtual ~BasicReactingParcel(); }; -template<> -inline bool contiguous<basicReactingParcel>() -{ - return false; // Now have scalar lists/fields (mass fractions) -} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam +#ifdef NoRepository + #include "BasicReactingParcel.C" +#endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelDragModels.C b/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/defineBasicReactingParcel.C similarity index 79% rename from src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelDragModels.C rename to src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/defineBasicReactingParcel.C index 0c43e221b1a42eeb12dd8f5afc8505dcb6626ff0..2c2e78630d691b2d398b09cbb32587da5e617e3d 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelDragModels.C +++ b/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/defineBasicReactingParcel.C @@ -24,21 +24,14 @@ License \*---------------------------------------------------------------------------*/ -#include "basicReactingParcel.H" -#include "KinematicCloud.H" - -#include "NoDrag.H" -#include "SphereDrag.H" +#include "createReactingParcelTypes.H" +#include "BasicReactingParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - makeDragModel(KinematicCloud<basicReactingParcel>); - - // Add instances of drag model to the table - makeDragModelType(NoDrag, KinematicCloud, basicReactingParcel); - makeDragModelType(SphereDrag, KinematicCloud, basicReactingParcel); + createReactingParcelType(BasicReactingParcel); }; diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelDispersionModels.C b/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/makeBasicReactingParcelSubmodels.C similarity index 55% rename from src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelDispersionModels.C rename to src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/makeBasicReactingParcelSubmodels.C index 8e4a77d5e3038ad65a0bf05d3ead1451bf64a6f9..a05fd96a37ccedb7d6d77d03705ab66ec50fa611 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelDispersionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/makeBasicReactingParcelSubmodels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,44 +24,39 @@ License \*---------------------------------------------------------------------------*/ -#include "basicReactingMultiphaseParcel.H" -#include "KinematicCloud.H" +#include "BasicReactingParcel.H" -#include "NoDispersion.H" -#include "GradientDispersionRAS.H" -#include "StochasticDispersionRAS.H" +// Kinematic +#include "makeReactingParcelDispersionModels.H" +#include "makeReactingParcelDragModels.H" +#include "makeReactingParcelInjectionModels.H" +#include "makeReactingParcelPatchInteractionModels.H" +#include "makeReactingParcelPostProcessingModels.H" + +// Thermodynamic +#include "makeReactingParcelHeatTransferModels.H" + +// Reacting +#include "makeReactingParcelCompositionModels.H" +#include "makeReactingParcelPhaseChangeModels.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - makeDispersionModel(KinematicCloud<basicReactingMultiphaseParcel>); - - defineNamedTemplateTypeNameAndDebug - ( - DispersionRASModel<KinematicCloud<basicReactingMultiphaseParcel> >, - 0 - ); - - // Add instances of dispersion model to the table - makeDispersionModelType - ( - NoDispersion, - KinematicCloud, - basicReactingMultiphaseParcel - ); - makeDispersionModelType - ( - GradientDispersionRAS, - KinematicCloud, - basicReactingMultiphaseParcel - ); - makeDispersionModelType - ( - StochasticDispersionRAS, - KinematicCloud, - basicReactingMultiphaseParcel - ); + // Kinematic sub-models + makeReactingDispersionModels(BasicReactingParcel); + makeReactingDragModels(BasicReactingParcel); + makeReactingInjectionModels(BasicReactingParcel); + makeReactingPatchInteractionModels(BasicReactingParcel); + makeReactingPostProcessingModels(BasicReactingParcel); + + // Thermo sub-models + makeReactingHeatTransferModels(BasicReactingParcel); + + // Reacting sub-models + makeReactingCompositionModels(BasicReactingParcel); + makeReactingPhaseChangeModels(BasicReactingParcel); }; diff --git a/src/lagrangian/intermediate/parcels/derived/BasicTrackedReactingParcel/BasicTrackedReactingParcel.C b/src/lagrangian/intermediate/parcels/derived/BasicTrackedReactingParcel/BasicTrackedReactingParcel.C new file mode 100644 index 0000000000000000000000000000000000000000..db48ba437f5a0a47f66ba8e14de956729063ed0e --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/BasicTrackedReactingParcel/BasicTrackedReactingParcel.C @@ -0,0 +1,113 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "BasicTrackedReactingParcel.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class ThermoType> +Foam::BasicTrackedReactingParcel<ThermoType>::BasicTrackedReactingParcel +( + ReactingCloud<BasicTrackedReactingParcel<ThermoType> >& owner, + const vector& position, + const label cellI +) +: + TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> > + ( + owner, + position, + cellI + ) +{} + + +template<class ThermoType> +Foam::BasicTrackedReactingParcel<ThermoType>::BasicTrackedReactingParcel +( + ReactingCloud<BasicTrackedReactingParcel<ThermoType> >& owner, + const vector& position, + const label cellI, + const label typeId, + const scalar nParticle0, + const scalar d0, + const vector& U0, + const scalarField& Y0, + const typename + TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> >:: + constantProperties& constProps +) +: + TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> > + ( + owner, + position, + cellI, + typeId, + nParticle0, + d0, + U0, + Y0, + constProps + ) +{} + + +template<class ThermoType> +Foam::BasicTrackedReactingParcel<ThermoType>::BasicTrackedReactingParcel +( + const Cloud<BasicTrackedReactingParcel<ThermoType> >& cloud, + Istream& is, + bool readFields +) +: + TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> > + ( + cloud, + is, + readFields + ) +{} + + +template<class ThermoType> +Foam::BasicTrackedReactingParcel<ThermoType>::BasicTrackedReactingParcel +( + const BasicTrackedReactingParcel<ThermoType>& p +) +: + TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> >(p) +{} + + +// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // + +template<class ThermoType> +Foam::BasicTrackedReactingParcel<ThermoType>::~BasicTrackedReactingParcel() +{} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/BasicTrackedReactingParcel/BasicTrackedReactingParcel.H b/src/lagrangian/intermediate/parcels/derived/BasicTrackedReactingParcel/BasicTrackedReactingParcel.H new file mode 100644 index 0000000000000000000000000000000000000000..8c30301f9c2d5c88b3f0f105bc670b9bed161240 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/BasicTrackedReactingParcel/BasicTrackedReactingParcel.H @@ -0,0 +1,137 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +Class + Foam::BasicTrackedReactingParcel + +Description + + +SourceFiles + BasicTrackedReactingParcel.C + BasicTrackedReactingParcelIO.C + +\*---------------------------------------------------------------------------*/ + +#ifndef BasicTrackedReactingParcel_H +#define BasicTrackedReactingParcel_H + +#include "TrackedReactingParcel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes +template<class ThermoType> +class BasicTrackedReactingParcel; + +/*---------------------------------------------------------------------------*\ + Class BasicTrackedReactingParcel Declaration +\*---------------------------------------------------------------------------*/ + +template<class ThermoType> +class BasicTrackedReactingParcel +: + public TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> > +{ + +public: + + //- The type of thermodynamics this parcel was instantiated for + typedef ThermoType thermoType; + + //- Run-time type information + TypeName("BasicTrackedReactingParcel"); + + // Constructors + + //- Construct from owner, position, and cloud owner + // Other properties initialised as null + BasicTrackedReactingParcel + ( + ReactingCloud<BasicTrackedReactingParcel>& owner, + const vector& position, + const label cellI + ); + + //- Construct from components + BasicTrackedReactingParcel + ( + ReactingCloud<BasicTrackedReactingParcel>& owner, + const vector& position, + const label cellI, + const label typeId, + const scalar nParticle0, + const scalar d0, + const vector& U0, + const scalarField& Y0, + const typename + TrackedReactingParcel<BasicTrackedReactingParcel>:: + constantProperties& constProps + ); + + //- Construct from Istream + BasicTrackedReactingParcel + ( + const Cloud<BasicTrackedReactingParcel>& c, + Istream& is, + bool readFields = true + ); + + //- Construct as a copy + BasicTrackedReactingParcel(const BasicTrackedReactingParcel& p); + + //- Construct and return a clone + autoPtr<BasicTrackedReactingParcel> clone() const + { + return + autoPtr<BasicTrackedReactingParcel> + ( + new BasicTrackedReactingParcel(*this) + ); + } + + + //- Destructor + virtual ~BasicTrackedReactingParcel(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "BasicTrackedReactingParcel.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/BasicTrackedReactingParcel/defineTrackedReactingParcel.C b/src/lagrangian/intermediate/parcels/derived/BasicTrackedReactingParcel/defineTrackedReactingParcel.C new file mode 100644 index 0000000000000000000000000000000000000000..239ebccb3b451a6178984693820f21a66687fac1 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/BasicTrackedReactingParcel/defineTrackedReactingParcel.C @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "createTrackedReactingParcelTypes.H" +#include "BasicTrackedReactingParcel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + createTrackedReactingParcelType(BasicTrackedReactingParcel); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDispersionModels.C b/src/lagrangian/intermediate/parcels/derived/BasicTrackedReactingParcel/makeBasicTrackedReactingParcelSubmodels.C similarity index 54% rename from src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDispersionModels.C rename to src/lagrangian/intermediate/parcels/derived/BasicTrackedReactingParcel/makeBasicTrackedReactingParcelSubmodels.C index d6f1cc823227fd1e137fb5901c60368b7165652d..7d94a79bea88df99a17c5c945bacc614518895b4 100644 --- a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDispersionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/BasicTrackedReactingParcel/makeBasicTrackedReactingParcelSubmodels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,44 +24,39 @@ License \*---------------------------------------------------------------------------*/ -#include "coalParcel.H" -#include "KinematicCloud.H" +#include "BasicTrackedReactingParcel.H" -#include "NoDispersion.H" -#include "GradientDispersionRAS.H" -#include "StochasticDispersionRAS.H" +// Kinematic +#include "makeReactingParcelDispersionModels.H" +#include "makeReactingParcelDragModels.H" +#include "makeReactingParcelInjectionModels.H" +#include "makeReactingParcelPatchInteractionModels.H" +#include "makeReactingParcelPostProcessingModels.H" + +// Thermo +#include "makeReactingParcelHeatTransferModels.H" + +// Reacting +#include "makeReactingParcelCompositionModels.H" +#include "makeReactingParcelPhaseChangeModels.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - makeDispersionModel(KinematicCloud<coalParcel>); - - defineNamedTemplateTypeNameAndDebug - ( - DispersionRASModel<KinematicCloud<coalParcel> >, - 0 - ); - - // Add instances of dispersion model to the table - makeDispersionModelType - ( - NoDispersion, - KinematicCloud, - coalParcel - ); - makeDispersionModelType - ( - GradientDispersionRAS, - KinematicCloud, - coalParcel - ); - makeDispersionModelType - ( - StochasticDispersionRAS, - KinematicCloud, - coalParcel - ); + // Kinematic sub-models + makeReactingDispersionModels(BasicTrackedReactingParcel); + makeReactingDragModels(BasicTrackedReactingParcel); + makeReactingInjectionModels(BasicTrackedReactingParcel); + makeReactingPatchInteractionModels(BasicTrackedReactingParcel); + makeReactingPostProcessingModels(BasicTrackedReactingParcel); + + // Thermo sub-models + makeReactingHeatTransferModels(BasicTrackedReactingParcel); + + // Reacting sub-models + makeReactingCompositionModels(BasicTrackedReactingParcel); + makeReactingPhaseChangeModels(BasicTrackedReactingParcel); }; diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/basicKinematicParcel.C b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/basicKinematicParcel.C index d207887826320ef12c6d724f9d52b150be3451dd..e7f883dcfdacd0c275f2bb7b7f8c942c1957e980 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/basicKinematicParcel.C +++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/basicKinematicParcel.C @@ -38,6 +38,17 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +Foam::basicKinematicParcel::basicKinematicParcel +( + KinematicCloud<basicKinematicParcel>& owner, + const vector& position, + const label cellI +) +: + KinematicParcel<basicKinematicParcel>(owner, position, cellI) +{} + + Foam::basicKinematicParcel::basicKinematicParcel ( KinematicCloud<basicKinematicParcel>& owner, @@ -75,6 +86,15 @@ Foam::basicKinematicParcel::basicKinematicParcel {} +Foam::basicKinematicParcel::basicKinematicParcel +( + const basicKinematicParcel& p +) +: + KinematicParcel<basicKinematicParcel>(p) +{} + + // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // Foam::basicKinematicParcel::~basicKinematicParcel() diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/basicKinematicParcel.H b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/basicKinematicParcel.H index 0e5733870f2afc8ec47a9174c83c285ea69e5beb..18b43cbbadc5baa621870b145d8c22b32b8f050e 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/basicKinematicParcel.H +++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/basicKinematicParcel.H @@ -60,6 +60,15 @@ public: // Constructors + //- Construct from owner, position, and cloud owner + // Other properties initialised as null + basicKinematicParcel + ( + KinematicCloud<basicKinematicParcel>& owner, + const vector& position, + const label cellI + ); + //- Construct from components basicKinematicParcel ( @@ -81,11 +90,17 @@ public: bool readFields = true ); + //- Construct as a copy + basicKinematicParcel(const basicKinematicParcel& p); + //- Construct and return a clone autoPtr<basicKinematicParcel> clone() const { - return autoPtr<basicKinematicParcel> - (new basicKinematicParcel(*this)); + return + autoPtr<basicKinematicParcel> + ( + new basicKinematicParcel(*this) + ); } diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/defineBasicKinematicParcel.C b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/defineBasicKinematicParcel.C index 82698ce0dfd1682ec94fecd6ef5447c1adcb6891..e7c1b578da4973a572b62987e48346ca2427152c 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/defineBasicKinematicParcel.C +++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/defineBasicKinematicParcel.C @@ -26,15 +26,17 @@ License #include "basicKinematicParcel.H" #include "KinematicCloud.H" +#include "makeParcelIOList.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -// defineTemplateTypeNameAndDebug(IOPosition<basicKinematicParcel>, 0); - defineTemplateTypeNameAndDebug(Cloud<basicKinematicParcel>, 0); defineParcelTypeNameAndDebug(KinematicCloud<basicKinematicParcel>, 0); -// defineTemplateTypeNameAndDebug(KinematicCloud<basicKinematicParcel>, 0); + + makeParcelIOList(basicKinematicParcel); }; diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelWallInteractionModels.C b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelSubmodels.C similarity index 70% rename from src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelWallInteractionModels.C rename to src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelSubmodels.C index 544cddaf2ad164fd975e392223ba9eda0a0ff541..6aaa63f9c0614e9b462fba14bb5a96923051ce39 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelWallInteractionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelSubmodels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,30 +25,24 @@ License \*---------------------------------------------------------------------------*/ #include "basicKinematicParcel.H" -#include "KinematicCloud.H" -#include "Rebound.H" -#include "StandardWallInteraction.H" +// Kinematic +#include "makeParcelDispersionModels.H" +#include "makeParcelDragModels.H" +#include "makeParcelInjectionModels.H" +#include "makeParcelPatchInteractionModels.H" +#include "makeParcelPostProcessingModels.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - makeWallInteractionModel(KinematicCloud<basicKinematicParcel>); - - // Add instances of wall interaction model to the table - makeWallInteractionModelType - ( - Rebound, - KinematicCloud, - basicKinematicParcel - ); - makeWallInteractionModelType - ( - StandardWallInteraction, - KinematicCloud, - basicKinematicParcel - ); + // Kinematic sub-models + makeParcelDispersionModels(basicKinematicParcel); + makeParcelDragModels(basicKinematicParcel); + makeParcelInjectionModels(basicKinematicParcel); + makeParcelPatchInteractionModels(basicKinematicParcel); + makeParcelPostProcessingModels(basicKinematicParcel); }; diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelInjectionModels.C b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelInjectionModels.C deleted file mode 100644 index 272ea3e06d261bf58e7246074e0b262caf98fb8f..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/submodels/makeBasicKinematicParcelInjectionModels.C +++ /dev/null @@ -1,69 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicKinematicParcel.H" -#include "KinematicCloud.H" - -#include "ConeInjection.H" -#include "FieldActivatedInjection.H" -#include "ManualInjection.H" -#include "NoInjection.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeInjectionModel(KinematicCloud<basicKinematicParcel>); - - // Add instances of injection model to the table - makeInjectionModelType - ( - ConeInjection, - KinematicCloud, - basicKinematicParcel - ); - makeInjectionModelType - ( - FieldActivatedInjection, - KinematicCloud, - basicKinematicParcel - ); - makeInjectionModelType - ( - ManualInjection, - KinematicCloud, - basicKinematicParcel - ); - makeInjectionModelType - ( - NoInjection, - KinematicCloud, - basicKinematicParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C deleted file mode 100644 index 5278c5e0f5a27a944b69207ea4c543473016b80e..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C +++ /dev/null @@ -1,99 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicReactingMultiphaseParcel.H" -#include "ReactingMultiphaseCloud.H" - -namespace Foam -{ - defineTemplateTypeNameAndDebug(Cloud<basicReactingMultiphaseParcel>, 0); - - defineParcelTypeNameAndDebug - ( - KinematicParcel<basicReactingMultiphaseParcel>, - 0 - ); -// defineTemplateTypeNameAndDebug -// ( -// KinematicParcel<basicReactingMultiphaseParcel>, -// 0 -// ); - defineParcelTypeNameAndDebug - ( - ThermoParcel<basicReactingMultiphaseParcel>, - 0 - ); - defineTemplateTypeNameAndDebug - ( - ThermoParcel<basicReactingMultiphaseParcel>, - 0 - ); - defineParcelTypeNameAndDebug - ( - ReactingParcel<basicReactingMultiphaseParcel>, - 0 - ); - defineTemplateTypeNameAndDebug - ( - ReactingParcel<basicReactingMultiphaseParcel>, - 0 - ); - defineParcelTypeNameAndDebug - ( - ReactingMultiphaseParcel<basicReactingMultiphaseParcel>, - 0 - ); - defineTemplateTypeNameAndDebug - ( - ReactingMultiphaseParcel<basicReactingMultiphaseParcel>, - 0 - ); - - defineParcelTypeNameAndDebug - ( - KinematicCloud<basicReactingMultiphaseParcel>, - 0 - ); - defineParcelTypeNameAndDebug - ( - ThermoCloud<basicReactingMultiphaseParcel>, - 0 - ); - defineParcelTypeNameAndDebug - ( - ReactingCloud<basicReactingMultiphaseParcel>, - 0 - ); - defineParcelTypeNameAndDebug - ( - ReactingMultiphaseCloud<basicReactingMultiphaseParcel>, - 0 - ); - -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelCompositionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelCompositionModels.C deleted file mode 100644 index 4dd31ffb585177c7b2655b86d44ec288c03e32af..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelCompositionModels.C +++ /dev/null @@ -1,51 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicReactingMultiphaseParcel.H" -#include "ReactingCloud.H" - -#include "SingleMixtureFraction.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeCompositionModel - ( - ReactingCloud<basicReactingMultiphaseParcel> - ); - - // Add instances of composition model to the table - makeCompositionModelType - ( - SingleMixtureFraction, - ReactingCloud, - basicReactingMultiphaseParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelDevolatilisationModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelDevolatilisationModels.C deleted file mode 100644 index 8704e48d801561ce3c543afc7e09d47090e50323..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelDevolatilisationModels.C +++ /dev/null @@ -1,65 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicReactingMultiphaseParcel.H" -#include "ReactingMultiphaseCloud.H" - -#include "NoDevolatilisation.H" -#include "ConstantRateDevolatilisation.H" -#include "SingleKineticRateDevolatilisation.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeDevolatilisationModel - ( - ReactingMultiphaseCloud<basicReactingMultiphaseParcel> - ); - - // Add instances of devolatilisation model to the table - makeDevolatilisationModelType - ( - NoDevolatilisation, - ReactingMultiphaseCloud, - basicReactingMultiphaseParcel - ); - makeDevolatilisationModelType - ( - ConstantRateDevolatilisation, - ReactingMultiphaseCloud, - basicReactingMultiphaseParcel - ); - makeDevolatilisationModelType - ( - SingleKineticRateDevolatilisation, - ReactingMultiphaseCloud, - basicReactingMultiphaseParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelHeatTransferModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelHeatTransferModels.C deleted file mode 100644 index f501421d8bb869808909eb53cad995167a36543f..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelHeatTransferModels.C +++ /dev/null @@ -1,55 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicReactingMultiphaseParcel.H" -#include "ThermoCloud.H" - -#include "NoHeatTransfer.H" -#include "RanzMarshall.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeHeatTransferModel(ThermoCloud<basicReactingMultiphaseParcel>); - - // Add instances of heat transfer model to the table - makeHeatTransferModelType - ( - NoHeatTransfer, - ThermoCloud, - basicReactingMultiphaseParcel - ); - makeHeatTransferModelType - ( - RanzMarshall, - ThermoCloud, - basicReactingMultiphaseParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelInjectionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelInjectionModels.C deleted file mode 100644 index 6b427ae7c2427bd5edb50d76734d3b0124c25a95..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelInjectionModels.C +++ /dev/null @@ -1,69 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicReactingMultiphaseParcel.H" -#include "ReactingCloud.H" - -#include "ConeInjection.H" -#include "FieldActivatedInjection.H" -#include "ManualInjection.H" -#include "NoInjection.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeInjectionModel(KinematicCloud<basicReactingMultiphaseParcel>); - - // Add instances of injection model to the table - makeInjectionModelType - ( - ConeInjection, - KinematicCloud, - basicReactingMultiphaseParcel - ); - makeInjectionModelType - ( - FieldActivatedInjection, - KinematicCloud, - basicReactingMultiphaseParcel - ); - makeInjectionModelType - ( - ManualInjection, - KinematicCloud, - basicReactingMultiphaseParcel - ); - makeInjectionModelType - ( - NoInjection, - KinematicCloud, - basicReactingMultiphaseParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelPhaseChangeModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelPhaseChangeModels.C deleted file mode 100644 index 99e9dfb89ba8eec740fd62e73fc72616fd62305b..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelPhaseChangeModels.C +++ /dev/null @@ -1,58 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicReactingMultiphaseParcel.H" -#include "ReactingCloud.H" - -#include "NoPhaseChange.H" -#include "LiquidEvaporation.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makePhaseChangeModel - ( - ReactingCloud<basicReactingMultiphaseParcel> - ); - - // Add instances of phase change model to the table - makePhaseChangeModelType - ( - NoPhaseChange, - ReactingCloud, - basicReactingMultiphaseParcel - ); - makePhaseChangeModelType - ( - LiquidEvaporation, - ReactingCloud, - basicReactingMultiphaseParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelSurfaceReactionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelSurfaceReactionModels.C deleted file mode 100644 index d0478807400a41a0d301e19faaffcc0be0bfa3a0..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelSurfaceReactionModels.C +++ /dev/null @@ -1,51 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicReactingMultiphaseParcel.H" -#include "ReactingMultiphaseCloud.H" - -#include "NoSurfaceReaction.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeSurfaceReactionModel - ( - ReactingMultiphaseCloud<basicReactingMultiphaseParcel> - ); - - // Add instances of surface reaction model to the table - makeSurfaceReactionModelType - ( - NoSurfaceReaction, - ReactingMultiphaseCloud, - basicReactingMultiphaseParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelWallInteractionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelWallInteractionModels.C deleted file mode 100644 index 3e7d911f8f3fd5c1fe20c18dc94554967736fdb0..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelWallInteractionModels.C +++ /dev/null @@ -1,55 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicReactingMultiphaseParcel.H" -#include "KinematicCloud.H" - -#include "Rebound.H" -#include "StandardWallInteraction.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeWallInteractionModel(KinematicCloud<basicReactingMultiphaseParcel>); - - // Add instances of wall interaction model to the table - makeWallInteractionModelType - ( - Rebound, - KinematicCloud, - basicReactingMultiphaseParcel - ); - makeWallInteractionModelType - ( - StandardWallInteraction, - KinematicCloud, - basicReactingMultiphaseParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/defineBasicReactingParcel.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/defineBasicReactingParcel.C deleted file mode 100644 index 5c45881ccf773ea0a287385acc024160d90dcacf..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/defineBasicReactingParcel.C +++ /dev/null @@ -1,53 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicReactingParcel.H" -#include "ReactingCloud.H" - -namespace Foam -{ - defineTemplateTypeNameAndDebug(Cloud<basicReactingParcel>, 0); - - defineParcelTypeNameAndDebug(KinematicParcel<basicReactingParcel>, 0); -// defineTemplateTypeNameAndDebug(KinematicParcel<basicReactingParcel>, 0); - defineParcelTypeNameAndDebug(ThermoParcel<basicReactingParcel>, 0); - defineTemplateTypeNameAndDebug(ThermoParcel<basicReactingParcel>, 0); - defineParcelTypeNameAndDebug(ReactingParcel<basicReactingParcel>, 0); - defineTemplateTypeNameAndDebug(ReactingParcel<basicReactingParcel>, 0); - - defineParcelTypeNameAndDebug(KinematicCloud<basicReactingParcel>, 0); -// defineTemplateTypeNameAndDebug(KinematicCloud<basicReactingParcel>, 0); - - defineParcelTypeNameAndDebug(ThermoCloud<basicReactingParcel>, 0); -// defineTemplateTypeNameAndDebug(ThermoCloud<basicReactingParcel>, 0); - - defineParcelTypeNameAndDebug(ReactingCloud<basicReactingParcel>, 0); -// defineTemplateTypeNameAndDebug(ReactingCloud<basicReactingParcel>, 0); - -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelDispersionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelDispersionModels.C deleted file mode 100644 index d2b6132bcaa1d945630db56ed4d49c2c952433ae..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelDispersionModels.C +++ /dev/null @@ -1,68 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicReactingParcel.H" -#include "KinematicCloud.H" - -#include "NoDispersion.H" -#include "GradientDispersionRAS.H" -#include "StochasticDispersionRAS.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeDispersionModel(KinematicCloud<basicReactingParcel>); - - defineNamedTemplateTypeNameAndDebug - ( - DispersionRASModel<KinematicCloud<basicReactingParcel> >, - 0 - ); - - // Add instances of dispersion model to the table - makeDispersionModelType - ( - NoDispersion, - KinematicCloud, - basicReactingParcel - ); - makeDispersionModelType - ( - GradientDispersionRAS, - KinematicCloud, - basicReactingParcel - ); - makeDispersionModelType - ( - StochasticDispersionRAS, - KinematicCloud, - basicReactingParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelHeatTransferModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelHeatTransferModels.C deleted file mode 100644 index 5bc2ea33a89138eae638d916392690bb8ba1b1b3..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelHeatTransferModels.C +++ /dev/null @@ -1,55 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicReactingParcel.H" -#include "ThermoCloud.H" - -#include "NoHeatTransfer.H" -#include "RanzMarshall.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeHeatTransferModel(ThermoCloud<basicReactingParcel>); - - // Add instances of heat transfer model to the table - makeHeatTransferModelType - ( - NoHeatTransfer, - ThermoCloud, - basicReactingParcel - ); - makeHeatTransferModelType - ( - RanzMarshall, - ThermoCloud, - basicReactingParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelInjectionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelInjectionModels.C deleted file mode 100644 index 4ed4e7894ae31e63d9ba040af2a6130ed18f528b..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelInjectionModels.C +++ /dev/null @@ -1,69 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicReactingParcel.H" -#include "ReactingCloud.H" - -#include "ConeInjection.H" -#include "FieldActivatedInjection.H" -#include "ManualInjection.H" -#include "NoInjection.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeInjectionModel(KinematicCloud<basicReactingParcel>); - - // Add instances of injection model to the table - makeInjectionModelType - ( - ConeInjection, - KinematicCloud, - basicReactingParcel - ); - makeInjectionModelType - ( - FieldActivatedInjection, - KinematicCloud, - basicReactingParcel - ); - makeInjectionModelType - ( - ManualInjection, - KinematicCloud, - basicReactingParcel - ); - makeInjectionModelType - ( - NoInjection, - KinematicCloud, - basicReactingParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelPhaseChangeModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelPhaseChangeModels.C deleted file mode 100644 index f8ce035ada1133bee9bed0f3517eeb6b6b9202a1..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelPhaseChangeModels.C +++ /dev/null @@ -1,55 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicReactingParcel.H" -#include "ReactingCloud.H" - -#include "NoPhaseChange.H" -#include "LiquidEvaporation.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makePhaseChangeModel(ReactingCloud<basicReactingParcel>); - - // Add instances of phase change model to the table - makePhaseChangeModelType - ( - NoPhaseChange, - ReactingCloud, - basicReactingParcel - ); - makePhaseChangeModelType - ( - LiquidEvaporation, - ReactingCloud, - basicReactingParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelWallInteractionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelWallInteractionModels.C deleted file mode 100644 index 637fd92aaede265680644ad8224f85f9d4528286..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/submodels/makeBasicReactingParcelWallInteractionModels.C +++ /dev/null @@ -1,55 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicReactingParcel.H" -#include "KinematicCloud.H" - -#include "Rebound.H" -#include "StandardWallInteraction.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeWallInteractionModel(KinematicCloud<basicReactingParcel>); - - // Add instances of wall interaction model to the table - makeWallInteractionModelType - ( - Rebound, - KinematicCloud, - basicReactingParcel - ); - makeWallInteractionModelType - ( - StandardWallInteraction, - KinematicCloud, - basicReactingParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.C b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.C index 095b217aca799ecb700f0f6e2538e0d9c7a52976..7f2524cbd282cfb8d9543c069d22b07db8add93b 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.C +++ b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.C @@ -38,6 +38,17 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +Foam::basicThermoParcel::basicThermoParcel +( + ThermoCloud<basicThermoParcel>& owner, + const vector position, + const label cellI +) +: + ThermoParcel<basicThermoParcel>(owner, position, cellI) +{} + + Foam::basicThermoParcel::basicThermoParcel ( ThermoCloud<basicThermoParcel>& owner, @@ -75,6 +86,15 @@ Foam::basicThermoParcel::basicThermoParcel {} +Foam::basicThermoParcel::basicThermoParcel +( + const basicThermoParcel& p +) +: + ThermoParcel<basicThermoParcel>(p) +{} + + // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // Foam::basicThermoParcel::~basicThermoParcel() diff --git a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.H b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.H index ec74d2add8ae675110efcafd9a84a8f8acff7044..974c36e23a96f51bb57d3009fea0a1951fbf331e 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.H +++ b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.H @@ -59,6 +59,15 @@ public: // Constructors + //- Construct from owner, position, and cloud owner + // Other properties initialised as null + basicThermoParcel + ( + ThermoCloud<basicThermoParcel>& owner, + const vector position, + const label cellI + ); + //- Construct from components basicThermoParcel ( @@ -80,10 +89,17 @@ public: bool readFields = true ); + //- Construct as a copy + basicThermoParcel(const basicThermoParcel& p); + //- Construct and return a clone autoPtr<basicThermoParcel> clone() const { - return autoPtr<basicThermoParcel>(new basicThermoParcel(*this)); + return + autoPtr<basicThermoParcel> + ( + new basicThermoParcel(*this) + ); } diff --git a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/defineBasicThermoParcel.C b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/defineBasicThermoParcel.C index ba76c4675628d835618cb695e419defbe6103cf8..2e67f54e815ab2e3e296126edae8ccd005471e2c 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/defineBasicThermoParcel.C +++ b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/defineBasicThermoParcel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,21 +26,23 @@ License #include "basicThermoParcel.H" #include "ThermoCloud.H" +#include "makeParcelIOList.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { defineTemplateTypeNameAndDebug(Cloud<basicThermoParcel>, 0); defineParcelTypeNameAndDebug(KinematicParcel<basicThermoParcel>, 0); -// defineTemplateTypeNameAndDebug(KinematicParcel<basicThermoParcel>, 0); defineParcelTypeNameAndDebug(ThermoParcel<basicThermoParcel>, 0); defineTemplateTypeNameAndDebug(ThermoParcel<basicThermoParcel>, 0); defineParcelTypeNameAndDebug(KinematicCloud<basicThermoParcel>, 0); -// defineTemplateTypeNameAndDebug(KinematicCloud<basicThermoParcel>, 0); defineParcelTypeNameAndDebug(ThermoCloud<basicThermoParcel>, 0); -// defineTemplateTypeNameAndDebug(ThermoCloud<basicThermoParcel>, 0); + + makeParcelIOList(basicThermoParcel); }; diff --git a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelWallInteractionModels.C b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelSubmodels.C similarity index 66% rename from src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelWallInteractionModels.C rename to src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelSubmodels.C index 361ffffdb10e8f21a636c54ca694e65054debe6e..044d8db68ed797c97f9b181bdec78326a1ee9656 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelWallInteractionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelSubmodels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,29 +25,30 @@ License \*---------------------------------------------------------------------------*/ #include "basicThermoParcel.H" -#include "KinematicCloud.H" -#include "Rebound.H" -#include "StandardWallInteraction.H" + +// Kinematic +#include "makeParcelDispersionModels.H" +#include "makeParcelDragModels.H" +#include "makeParcelInjectionModels.H" +#include "makeParcelPatchInteractionModels.H" +#include "makeParcelPostProcessingModels.H" + +// Thermodynamic +#include "makeParcelHeatTransferModels.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - makeWallInteractionModel(KinematicCloud<basicThermoParcel>); - - // Add instances of wall interaction model to the table - makeWallInteractionModelType - ( - Rebound, - KinematicCloud, - basicThermoParcel - ); - makeWallInteractionModelType - ( - StandardWallInteraction, - KinematicCloud, - basicThermoParcel - ); + // Kinematic sub-models + makeParcelDispersionModels(basicThermoParcel); + makeParcelDragModels(basicThermoParcel); + makeParcelInjectionModels(basicThermoParcel); + makeParcelPatchInteractionModels(basicThermoParcel); + makeParcelPostProcessingModels(basicThermoParcel); + + // Thermo sub-models + makeParcelHeatTransferModels(basicThermoParcel); }; diff --git a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelDispersionModels.C b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelDispersionModels.C deleted file mode 100644 index 86bc63c72a7626294862f46bf281dd0848d37225..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelDispersionModels.C +++ /dev/null @@ -1,67 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicThermoParcel.H" -#include "KinematicCloud.H" -#include "NoDispersion.H" -#include "GradientDispersionRAS.H" -#include "StochasticDispersionRAS.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeDispersionModel(KinematicCloud<basicThermoParcel>); - - defineNamedTemplateTypeNameAndDebug - ( - DispersionRASModel<KinematicCloud<basicThermoParcel> >, - 0 - ); - - // Add instances of dispersion model to the table - makeDispersionModelType - ( - NoDispersion, - KinematicCloud, - basicThermoParcel - ); - makeDispersionModelType - ( - GradientDispersionRAS, - KinematicCloud, - basicThermoParcel - ); - makeDispersionModelType - ( - StochasticDispersionRAS, - KinematicCloud, - basicThermoParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelHeatTransferModels.C b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelHeatTransferModels.C deleted file mode 100644 index afb3ae0833ba89d779c0ee14ba7c0d4544545f99..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelHeatTransferModels.C +++ /dev/null @@ -1,44 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 "basicThermoParcel.H" -#include "ThermoCloud.H" -#include "NoHeatTransfer.H" -#include "RanzMarshall.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makeHeatTransferModel(ThermoCloud<basicThermoParcel>); - - // Add instances of heat transfer model to the table - makeHeatTransferModelType(NoHeatTransfer, ThermoCloud, basicThermoParcel); - makeHeatTransferModelType(RanzMarshall, ThermoCloud, basicThermoParcel); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/createReactingMultiphaseParcelTypes.H b/src/lagrangian/intermediate/parcels/include/createReactingMultiphaseParcelTypes.H new file mode 100644 index 0000000000000000000000000000000000000000..9c1a6baf61e35a2e757f1f321c4dbd2551863788 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/createReactingMultiphaseParcelTypes.H @@ -0,0 +1,94 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef createReactingMultiphaseParcelTypes_H +#define createReactingMultiphaseParcelTypes_H + +#include "makeParcelIOList.H" +#include "reactingThermoTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define createReactingMultiphaseParcelType(ParcelType) \ + \ + createReactingMultiphaseParcelThermoType \ + ( \ + ParcelType, \ + specieConstProperties \ + ); \ + createReactingMultiphaseParcelThermoType \ + ( \ + ParcelType, \ + specieReactingProperties \ + ); + + +#define createReactingMultiphaseParcelThermoType(ParcelType, ThermoType) \ + \ + typedef ParcelType<ThermoType> ParcelType##ThermoType; \ + \ + makeParcelIOList(ParcelType##ThermoType); \ + \ + defineTemplateTypeNameAndDebug(ParcelType##ThermoType, 0); \ + defineTemplateTypeNameAndDebug(Particle<ParcelType##ThermoType>, 0); \ + defineTemplateTypeNameAndDebug(Cloud<ParcelType##ThermoType>, 0); \ + \ + defineParcelTypeNameAndDebug(KinematicParcel<ParcelType##ThermoType>, 0); \ + defineTemplateTypeNameAndDebug \ + ( \ + KinematicParcel<ParcelType##ThermoType>, \ + 0 \ + ); \ + defineParcelTypeNameAndDebug(ThermoParcel<ParcelType##ThermoType>, 0); \ + defineTemplateTypeNameAndDebug(ThermoParcel<ParcelType##ThermoType>, 0); \ + defineParcelTypeNameAndDebug(ReactingParcel<ParcelType##ThermoType>, 0); \ + defineTemplateTypeNameAndDebug(ReactingParcel<ParcelType##ThermoType>, 0);\ + defineParcelTypeNameAndDebug \ + ( \ + ReactingMultiphaseParcel<ParcelType##ThermoType>, \ + 0 \ + ); \ + defineTemplateTypeNameAndDebug \ + ( \ + ReactingMultiphaseParcel<ParcelType##ThermoType>, \ + 0 \ + ); \ + \ + defineParcelTypeNameAndDebug(KinematicCloud<ParcelType##ThermoType>, 0); \ + defineParcelTypeNameAndDebug(ThermoCloud<ParcelType##ThermoType>, 0); \ + defineParcelTypeNameAndDebug(ReactingCloud<ParcelType##ThermoType>, 0); \ + defineParcelTypeNameAndDebug \ + ( \ + ReactingMultiphaseCloud<ParcelType##ThermoType>, \ + 0 \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/createReactingParcelTypes.H b/src/lagrangian/intermediate/parcels/include/createReactingParcelTypes.H new file mode 100644 index 0000000000000000000000000000000000000000..78bdf1aae4de76d7ef1ce00acbae73a5548ba78b --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/createReactingParcelTypes.H @@ -0,0 +1,71 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef createReactingParcelTypes_H +#define createReactingParcelTypes_H + +#include "makeParcelIOList.H" +#include "reactingThermoTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define createReactingParcelType(ParcelType) \ + \ + createReactingParcelThermoType(ParcelType, specieConstProperties); \ + createReactingParcelThermoType(ParcelType, specieReactingProperties); + + +#define createReactingParcelThermoType(ParcelType, ThermoType) \ + \ + typedef ParcelType<ThermoType> ParcelType##ThermoType; \ + \ + makeParcelIOList(ParcelType##ThermoType); \ + \ + defineTemplateTypeNameAndDebug(ParcelType##ThermoType, 0); \ + defineTemplateTypeNameAndDebug(Particle<ParcelType##ThermoType>, 0); \ + defineTemplateTypeNameAndDebug(Cloud<ParcelType##ThermoType>, 0); \ + \ + defineParcelTypeNameAndDebug(KinematicParcel<ParcelType##ThermoType>, 0); \ + defineTemplateTypeNameAndDebug \ + ( \ + KinematicParcel<ParcelType##ThermoType>, \ + 0 \ + ); \ + defineParcelTypeNameAndDebug(ThermoParcel<ParcelType##ThermoType>, 0); \ + defineTemplateTypeNameAndDebug(ThermoParcel<ParcelType##ThermoType>, 0); \ + defineParcelTypeNameAndDebug(ReactingParcel<ParcelType##ThermoType>, 0); \ + defineTemplateTypeNameAndDebug(ReactingParcel<ParcelType##ThermoType>, 0);\ + \ + defineParcelTypeNameAndDebug(KinematicCloud<ParcelType##ThermoType>, 0); \ + defineParcelTypeNameAndDebug(ThermoCloud<ParcelType##ThermoType>, 0); \ + defineParcelTypeNameAndDebug(ReactingCloud<ParcelType##ThermoType>, 0); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/createTrackedReactingParcelTypes.H b/src/lagrangian/intermediate/parcels/include/createTrackedReactingParcelTypes.H new file mode 100644 index 0000000000000000000000000000000000000000..fb357cb7c8b61a678e08141edc3e8d02084b2868 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/createTrackedReactingParcelTypes.H @@ -0,0 +1,70 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef createTrackedReactingParcelTypes_H +#define createTrackedReactingParcelTypes_H + +#include "createReactingParcelTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define createTrackedReactingParcelType(ParcelType) \ + \ + createTrackedReactingParcelThermoType \ + ( \ + ParcelType, \ + specieConstProperties \ + ); \ + createTrackedReactingParcelThermoType \ + ( \ + ParcelType, \ + specieReactingProperties \ + ); + + +#define createTrackedReactingParcelThermoType(ParcelType, ThermoType) \ + \ + createReactingParcelThermoType(ParcelType, ThermoType); \ + \ + typedef ParcelType<ThermoType> ParcelType##ThermoType; \ + \ + defineParcelTypeNameAndDebug \ + ( \ + TrackedReactingParcel<ParcelType##ThermoType>, \ + 0 \ + ); \ + defineTemplateTypeNameAndDebug \ + ( \ + TrackedReactingParcel<ParcelType##ThermoType>, \ + 0 \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelDispersionModels.H b/src/lagrangian/intermediate/parcels/include/makeParcelDispersionModels.H new file mode 100644 index 0000000000000000000000000000000000000000..4763688f5205dd39241b779c1ad47738c12318c8 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeParcelDispersionModels.H @@ -0,0 +1,74 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeParcelDispersionModels_h +#define makeParcelDispersionModels_h + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "KinematicCloud.H" + +#include "NoDispersion.H" +#include "GradientDispersionRAS.H" +#include "StochasticDispersionRAS.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeParcelDispersionModels(ParcelType) \ + \ + makeDispersionModel(KinematicCloud<ParcelType>); \ + \ + defineNamedTemplateTypeNameAndDebug \ + ( \ + DispersionRASModel<KinematicCloud<ParcelType> >, \ + 0 \ + ); \ + \ + makeDispersionModelType \ + ( \ + NoDispersion, \ + KinematicCloud, \ + ParcelType \ + ); \ + makeDispersionModelType \ + ( \ + GradientDispersionRAS, \ + KinematicCloud, \ + ParcelType \ + ); \ + makeDispersionModelType \ + ( \ + StochasticDispersionRAS, \ + KinematicCloud, \ + ParcelType \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelDragModels.C b/src/lagrangian/intermediate/parcels/include/makeParcelDragModels.H similarity index 64% rename from src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelDragModels.C rename to src/lagrangian/intermediate/parcels/include/makeParcelDragModels.H index 5e56985952fa0a004e1b4d7d38a1cebe9445ec76..0d47aaf2393bd880b63e3cdbeafb4fdfa12e952a 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/submodels/makeBasicReactingMultiphaseParcelDragModels.C +++ b/src/lagrangian/intermediate/parcels/include/makeParcelDragModels.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,11 @@ License \*---------------------------------------------------------------------------*/ -#include "basicReactingMultiphaseParcel.H" +#ifndef makeParcelDragModels_H +#define makeParcelDragModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #include "KinematicCloud.H" #include "NoDrag.H" @@ -32,19 +36,16 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - makeDragModel(KinematicCloud<basicReactingMultiphaseParcel>); +#define makeParcelDragModels(ParcelType) \ + \ + makeDragModel(KinematicCloud<ParcelType>); \ + \ + makeDragModelType(NoDrag, KinematicCloud, ParcelType); \ + makeDragModelType(SphereDrag, KinematicCloud, ParcelType); - // Add instances of drag model to the table - makeDragModelType(NoDrag, KinematicCloud, basicReactingMultiphaseParcel); - makeDragModelType - ( - SphereDrag, - KinematicCloud, - basicReactingMultiphaseParcel - ); -}; +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif // ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelHeatTransferModels.H b/src/lagrangian/intermediate/parcels/include/makeParcelHeatTransferModels.H new file mode 100644 index 0000000000000000000000000000000000000000..a2ce1942020b529d3ec1c651296ae8bc53ebeead --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeParcelHeatTransferModels.H @@ -0,0 +1,61 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeParcelHeatTransferModels_H +#define makeParcelHeatTransferModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "ThermoCloud.H" + +#include "NoHeatTransfer.H" +#include "RanzMarshall.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeParcelHeatTransferModels(ParcelType) \ + \ + makeHeatTransferModel(ThermoCloud<ParcelType>); \ + \ + makeHeatTransferModelType \ + ( \ + NoHeatTransfer, \ + ThermoCloud, \ + ParcelType \ + ); \ + makeHeatTransferModelType \ + ( \ + RanzMarshall, \ + ThermoCloud, \ + ParcelType \ + ); \ + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelInjectionModels.H b/src/lagrangian/intermediate/parcels/include/makeParcelInjectionModels.H new file mode 100644 index 0000000000000000000000000000000000000000..5483f56f6191e586f9284bb7aa0c10cd99630a44 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeParcelInjectionModels.H @@ -0,0 +1,89 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeParcelInjectionModels_H +#define makeParcelInjectionModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "KinematicCloud.H" + +#include "ConeInjection.H" +#include "ConeInjectionMP.H" +#include "FieldActivatedInjection.H" +#include "KinematicLookupTableInjection.H" +#include "ManualInjection.H" +#include "NoInjection.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeParcelInjectionModels(ParcelType) \ + \ + makeInjectionModel(KinematicCloud<ParcelType>); \ + \ + makeInjectionModelType \ + ( \ + ConeInjection, \ + KinematicCloud, \ + ParcelType \ + ); \ + makeInjectionModelType \ + ( \ + ConeInjectionMP, \ + KinematicCloud, \ + ParcelType \ + ); \ + makeInjectionModelType \ + ( \ + FieldActivatedInjection, \ + KinematicCloud, \ + ParcelType \ + ); \ + makeInjectionModelType \ + ( \ + KinematicLookupTableInjection, \ + KinematicCloud, \ + ParcelType \ + ); \ + makeInjectionModelType \ + ( \ + ManualInjection, \ + KinematicCloud, \ + ParcelType \ + ); \ + makeInjectionModelType \ + ( \ + NoInjection, \ + KinematicCloud, \ + ParcelType \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelPatchInteractionModels.H b/src/lagrangian/intermediate/parcels/include/makeParcelPatchInteractionModels.H new file mode 100644 index 0000000000000000000000000000000000000000..f3141b67d3eb99584852a8830c2fb3968ae7c51b --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeParcelPatchInteractionModels.H @@ -0,0 +1,68 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeParcelPatchInteractionModels_H +#define makeParcelPatchInteractionModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "KinematicCloud.H" + +#include "LocalInteraction.H" +#include "Rebound.H" +#include "StandardWallInteraction.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeParcelPatchInteractionModels(ParcelType) \ + \ + makePatchInteractionModel(KinematicCloud<ParcelType>); \ + \ + makePatchInteractionModelType \ + ( \ + LocalInteraction, \ + KinematicCloud, \ + ParcelType \ + ); \ + makePatchInteractionModelType \ + ( \ + Rebound, \ + KinematicCloud, \ + ParcelType \ + ); \ + makePatchInteractionModelType \ + ( \ + StandardWallInteraction, \ + KinematicCloud, \ + ParcelType \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelPostProcessingModels.H b/src/lagrangian/intermediate/parcels/include/makeParcelPostProcessingModels.H new file mode 100644 index 0000000000000000000000000000000000000000..51aa8e2a53c07127d0b6ba4e902ca29cda84eae4 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeParcelPostProcessingModels.H @@ -0,0 +1,61 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeParcelPostProcessingModels_H +#define makeParcelPostProcessingModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "KinematicCloud.H" + +#include "NoPostProcessing.H" +#include "PatchPostProcessing.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeParcelPostProcessingModels(ParcelType) \ + \ + makePostProcessingModel(KinematicCloud<ParcelType>); \ + \ + makePostProcessingModelType \ + ( \ + NoPostProcessing, \ + KinematicCloud, \ + ParcelType \ + ); \ + makePostProcessingModelType \ + ( \ + PatchPostProcessing, \ + KinematicCloud, \ + ParcelType \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelCompositionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelCompositionModels.H new file mode 100644 index 0000000000000000000000000000000000000000..654582e3c1d256a7f9bbb31e3dd8e2f024fad1de --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelCompositionModels.H @@ -0,0 +1,70 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeReactingMultiphaseParcelCompositionModels_H +#define makeReactingMultiphaseParcelCompositionModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "reactingThermoTypes.H" +#include "ReactingCloud.H" + +#include "SingleMixtureFraction.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeReactingMultiphaseCompositionModels(ParcelType) \ + \ + makeReactingMultiphaseCompositionModelThermoType \ + ( \ + ParcelType, \ + specieConstProperties \ + ); \ + makeReactingMultiphaseCompositionModelThermoType \ + ( \ + ParcelType, \ + specieReactingProperties \ + ); + + +#define makeReactingMultiphaseCompositionModelThermoType(ParcelType, ThermoType)\ + \ + makeCompositionModel(ReactingCloud<ParcelType<ThermoType> >); \ + \ + makeCompositionModelThermoType \ + ( \ + SingleMixtureFraction, \ + ReactingCloud, \ + ParcelType, \ + ThermoType \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelDevolatilisationModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelDevolatilisationModels.H new file mode 100644 index 0000000000000000000000000000000000000000..85e9192a59ca84bcf14cea726c01566b60aa2d05 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelDevolatilisationModels.H @@ -0,0 +1,89 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeReactingMultiphaseParcelDevolatilisationModels_H +#define makeReactingMultiphaseParcelDevolatilisationModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "reactingThermoTypes.H" +#include "ReactingMultiphaseCloud.H" + +#include "ConstantRateDevolatilisation.H" +#include "NoDevolatilisation.H" +#include "SingleKineticRateDevolatilisation.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeReactingMultiphaseDevolatilisationModels(ParcelType) \ + \ + makeReactingMultiphaseDevolatilisationModelThermoType \ + ( \ + ParcelType, \ + specieConstProperties \ + ); \ + makeReactingMultiphaseDevolatilisationModelThermoType \ + ( \ + ParcelType, \ + specieReactingProperties \ + ); + + +#define makeReactingMultiphaseDevolatilisationModelThermoType(ParcelType, ThermoType)\ + \ + makeDevolatilisationModel \ + ( \ + ReactingMultiphaseCloud<ParcelType<ThermoType> > \ + ); \ + \ + makeDevolatilisationModelThermoType \ + ( \ + ConstantRateDevolatilisation, \ + ReactingMultiphaseCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeDevolatilisationModelThermoType \ + ( \ + NoDevolatilisation, \ + ReactingMultiphaseCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeDevolatilisationModelThermoType \ + ( \ + SingleKineticRateDevolatilisation, \ + ReactingMultiphaseCloud, \ + ParcelType, \ + ThermoType \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H new file mode 100644 index 0000000000000000000000000000000000000000..fe7a669d7e9f3303dc8098e102c987b66739add1 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H @@ -0,0 +1,103 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeReactingMultiphaseParcelInjectionModels_H +#define makeReactingMultiphaseParcelInjectionModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "reactingThermoTypes.H" +#include "KinematicCloud.H" + +#include "ConeInjection.H" +#include "ConeInjectionMP.H" +#include "FieldActivatedInjection.H" +#include "ManualInjection.H" +#include "NoInjection.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeReactingMultiphaseInjectionModels(ParcelType) \ + \ + makeReactingMultiphaseInjectionModelThermoType \ + ( \ + ParcelType, \ + specieConstProperties \ + ); \ + \ + makeReactingMultiphaseInjectionModelThermoType \ + ( \ + ParcelType, \ + specieReactingProperties \ + ); + + +#define makeReactingMultiphaseInjectionModelThermoType(ParcelType, ThermoType)\ + \ + makeInjectionModel(KinematicCloud<ParcelType<ThermoType> >); \ + \ + makeInjectionModelThermoType \ + ( \ + ConeInjection, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeInjectionModelThermoType \ + ( \ + ConeInjectionMP, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeInjectionModelThermoType \ + ( \ + FieldActivatedInjection, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeInjectionModelThermoType \ + ( \ + ManualInjection, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeInjectionModelThermoType \ + ( \ + NoInjection, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); \ + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelSurfaceReactionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelSurfaceReactionModels.H new file mode 100644 index 0000000000000000000000000000000000000000..d85a073dde6f0c1a53098952abca716addef4ffa --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelSurfaceReactionModels.H @@ -0,0 +1,73 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeReactingMultiphaseParcelSurfaceReactionModels_H +#define makeReactingMultiphaseParcelSurfaceReactionModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "reactingThermoTypes.H" +#include "ReactingMultiphaseCloud.H" + +#include "NoSurfaceReaction.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeReactingMultiphaseSurfaceReactionModels(ParcelType) \ + \ + makeReactingMultiphaseSurfaceReactionModelThermoType \ + ( \ + ParcelType, \ + specieConstProperties \ + ); \ + makeReactingMultiphaseSurfaceReactionModelThermoType \ + ( \ + ParcelType, \ + specieReactingProperties \ + ); + + +#define makeReactingMultiphaseSurfaceReactionModelThermoType(ParcelType, ThermoType)\ + \ + makeSurfaceReactionModel \ + ( \ + ReactingMultiphaseCloud<ParcelType<ThermoType> > \ + ); \ + \ + makeSurfaceReactionModelThermoType \ + ( \ + NoSurfaceReaction, \ + ReactingMultiphaseCloud, \ + ParcelType, \ + ThermoType \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelCompositionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelCompositionModels.H new file mode 100644 index 0000000000000000000000000000000000000000..475095871f85befcfef55dfe451bcba5626e31ab --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelCompositionModels.H @@ -0,0 +1,70 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeReactingParcelCompositionModels_H +#define makeReactingParcelCompositionModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "reactingThermoTypes.H" +#include "ReactingCloud.H" + +#include "SinglePhaseMixture.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeReactingCompositionModels(ParcelType) \ + \ + makeReactingCompositionModelThermoType \ + ( \ + ParcelType, \ + specieConstProperties \ + ); \ + makeReactingCompositionModelThermoType \ + ( \ + ParcelType, \ + specieReactingProperties \ + ); + + +#define makeReactingCompositionModelThermoType(ParcelType, ThermoType) \ + \ + makeCompositionModel(ReactingCloud<ParcelType<ThermoType> >); \ + \ + makeCompositionModelThermoType \ + ( \ + SinglePhaseMixture, \ + ReactingCloud, \ + ParcelType, \ + ThermoType \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelDispersionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelDispersionModels.H new file mode 100644 index 0000000000000000000000000000000000000000..534e85e190dfded6671c5736663f5373ced5dbdb --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelDispersionModels.H @@ -0,0 +1,93 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeReactingParcelDispersionModels_H +#define makeReactingParcelDispersionModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "reactingThermoTypes.H" +#include "KinematicCloud.H" + +#include "NoDispersion.H" +#include "GradientDispersionRAS.H" +#include "StochasticDispersionRAS.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeReactingDispersionModels(ParcelType) \ + \ + makeReactingDispersionModelThermoType \ + ( \ + ParcelType, \ + specieConstProperties \ + ); \ + \ + makeReactingDispersionModelThermoType \ + ( \ + ParcelType, \ + specieReactingProperties \ + ); + + +#define makeReactingDispersionModelThermoType(ParcelType, ThermoType) \ + \ + makeDispersionModel(KinematicCloud<ParcelType<ThermoType> >); \ + \ + defineNamedTemplateTypeNameAndDebug \ + ( \ + DispersionRASModel<KinematicCloud<ParcelType<ThermoType> > >, \ + 0 \ + ); \ + \ + makeDispersionModelThermoType \ + ( \ + NoDispersion, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeDispersionModelThermoType \ + ( \ + GradientDispersionRAS, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeDispersionModelThermoType \ + ( \ + StochasticDispersionRAS, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelDragModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelDragModels.H new file mode 100644 index 0000000000000000000000000000000000000000..545995ec4d86849b73c951f6273750d9b92b9179 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelDragModels.H @@ -0,0 +1,78 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeReactingParcelDragModels_H +#define makeReactingParcelDragModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "reactingThermoTypes.H" +#include "KinematicCloud.H" + +#include "NoDrag.H" +#include "SphereDrag.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeReactingDragModels(ParcelType) \ + \ + makeReactingDragModelThermoType \ + ( \ + ParcelType, \ + specieConstProperties \ + ); \ + makeReactingDragModelThermoType \ + ( \ + ParcelType, \ + specieReactingProperties \ + ); + + +#define makeReactingDragModelThermoType(ParcelType, ThermoType) \ + \ + makeDragModel(KinematicCloud<ParcelType<ThermoType> >); \ + \ + makeDragModelThermoType \ + ( \ + NoDrag, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeDragModelThermoType \ + ( \ + SphereDrag, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelHeatTransferModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelHeatTransferModels.H new file mode 100644 index 0000000000000000000000000000000000000000..02290b68c260f9796f67f58dc13a0e7c0dce0510 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelHeatTransferModels.H @@ -0,0 +1,78 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeReactingParcelHeatTransferModels_H +#define makeReactingParcelHeatTransferModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "reactingThermoTypes.H" +#include "ThermoCloud.H" + +#include "NoHeatTransfer.H" +#include "RanzMarshall.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeReactingHeatTransferModels(ParcelType) \ + \ + makeReactingHeatTransferModelThermoType \ + ( \ + ParcelType, \ + specieConstProperties \ + ); \ + makeReactingHeatTransferModelThermoType \ + ( \ + ParcelType, \ + specieReactingProperties \ + ); + + +#define makeReactingHeatTransferModelThermoType(ParcelType, ThermoType) \ + \ + makeHeatTransferModel(ThermoCloud<ParcelType<ThermoType> >); \ + \ + makeHeatTransferModelThermoType \ + ( \ + NoHeatTransfer, \ + ThermoCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeHeatTransferModelThermoType \ + ( \ + RanzMarshall, \ + ThermoCloud, \ + ParcelType, \ + ThermoType \ + ); \ + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelInjectionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelInjectionModels.H new file mode 100644 index 0000000000000000000000000000000000000000..c691fee62c8d12374ba38c341d360213d15bff49 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelInjectionModels.H @@ -0,0 +1,111 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeReactingParcelInjectionModels_H +#define makeReactingParcelInjectionModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "reactingThermoTypes.H" +#include "KinematicCloud.H" + +#include "ConeInjection.H" +#include "ConeInjectionMP.H" +#include "FieldActivatedInjection.H" +#include "ManualInjection.H" +#include "NoInjection.H" +#include "ReactingLookupTableInjection.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeReactingInjectionModels(ParcelType) \ + \ + makeReactingInjectionModelThermoType \ + ( \ + ParcelType, \ + specieConstProperties \ + ); \ + \ + makeReactingInjectionModelThermoType \ + ( \ + ParcelType, \ + specieReactingProperties \ + ); + + +#define makeReactingInjectionModelThermoType(ParcelType, ThermoType) \ + \ + makeInjectionModel(KinematicCloud<ParcelType<ThermoType> >); \ + \ + makeInjectionModelThermoType \ + ( \ + ConeInjection, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeInjectionModelThermoType \ + ( \ + ConeInjectionMP, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeInjectionModelThermoType \ + ( \ + FieldActivatedInjection, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeInjectionModelThermoType \ + ( \ + ManualInjection, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeInjectionModelThermoType \ + ( \ + NoInjection, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makeInjectionModelThermoType \ + ( \ + ReactingLookupTableInjection, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelPatchInteractionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelPatchInteractionModels.H new file mode 100644 index 0000000000000000000000000000000000000000..6c64d7d50e2b6e43ab19fd66119622b16ef45032 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelPatchInteractionModels.H @@ -0,0 +1,87 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeReactingParcelPatchInteractionModels_H +#define makeReactingParcelPatchInteractionModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "reactingThermoTypes.H" +#include "KinematicCloud.H" + +#include "LocalInteraction.H" +#include "Rebound.H" +#include "StandardWallInteraction.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeReactingPatchInteractionModels(ParcelType) \ + \ + makeReactingPatchInteractionModelThermoType \ + ( \ + ParcelType, \ + specieConstProperties \ + ); \ + \ + makeReactingPatchInteractionModelThermoType \ + ( \ + ParcelType, \ + specieReactingProperties \ + ); + + +#define makeReactingPatchInteractionModelThermoType(ParcelType, ThermoType) \ + \ + makePatchInteractionModel(KinematicCloud<ParcelType<ThermoType> >); \ + \ + makePatchInteractionModelThermoType \ + ( \ + LocalInteraction, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makePatchInteractionModelThermoType \ + ( \ + Rebound, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makePatchInteractionModelThermoType \ + ( \ + StandardWallInteraction, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelPhaseChangeModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelPhaseChangeModels.H new file mode 100644 index 0000000000000000000000000000000000000000..cd2fab217054d63a2dbbecd11a10762d64afcc5c --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelPhaseChangeModels.H @@ -0,0 +1,79 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeReactingParcelPhaseChangeModels_H +#define makeReactingParcelPhaseChangeModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "reactingThermoTypes.H" +#include "ReactingCloud.H" + +#include "NoPhaseChange.H" +#include "LiquidEvaporation.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeReactingPhaseChangeModels(ParcelType) \ + \ + makeReactingPhaseChangeModelThermoType \ + ( \ + ParcelType, \ + specieConstProperties \ + ); \ + \ + makeReactingPhaseChangeModelThermoType \ + ( \ + ParcelType, \ + specieReactingProperties \ + ); + + +#define makeReactingPhaseChangeModelThermoType(ParcelType, ThermoType) \ + \ + makePhaseChangeModel(ReactingCloud<ParcelType<ThermoType> >); \ + \ + makePhaseChangeModelThermoType \ + ( \ + NoPhaseChange, \ + ReactingCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makePhaseChangeModelThermoType \ + ( \ + LiquidEvaporation, \ + ReactingCloud, \ + ParcelType, \ + ThermoType \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelPostProcessingModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelPostProcessingModels.H new file mode 100644 index 0000000000000000000000000000000000000000..f316b1c460d5435454e593c6d43ab0675e9c05e0 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelPostProcessingModels.H @@ -0,0 +1,79 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +#ifndef makeReactingParcelPostProcessingModels_H +#define makeReactingParcelPostProcessingModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "reactingThermoTypes.H" +#include "KinematicCloud.H" + +#include "NoPostProcessing.H" +#include "PatchPostProcessing.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeReactingPostProcessingModels(ParcelType) \ + \ + makeReactingPostProcessingModelThermoType \ + ( \ + ParcelType, \ + specieConstProperties \ + ); \ + \ + makeReactingPostProcessingModelThermoType \ + ( \ + ParcelType, \ + specieReactingProperties \ + ); + + +#define makeReactingPostProcessingModelThermoType(ParcelType, ThermoType) \ + \ + makePostProcessingModel(KinematicCloud<ParcelType<ThermoType> >); \ + \ + makePostProcessingModelThermoType \ + ( \ + NoPostProcessing, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); \ + makePostProcessingModelThermoType \ + ( \ + PatchPostProcessing, \ + KinematicCloud, \ + ParcelType, \ + ThermoType \ + ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudThermoTypes.H b/src/lagrangian/intermediate/parcels/include/reactingThermoTypes.H similarity index 78% rename from src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudThermoTypes.H rename to src/lagrangian/intermediate/parcels/include/reactingThermoTypes.H index 2341e65aa027a792bc4c51e1a4063b0b39417398..9f176ade30950836f3971d65998686b82dab5234 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudThermoTypes.H +++ b/src/lagrangian/intermediate/parcels/include/reactingThermoTypes.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,34 +23,27 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Typedefs - Foam::cloudThermoTypes + Foam::ReactingCloudThermoTypes Description + Type definitions for available thermo pacakges \*---------------------------------------------------------------------------*/ -#ifndef ReactingCloudThermoTypes_H -#define ReactingCloudThermoTypes_H +#ifndef reactingThermoTypes_H +#define reactingThermoTypes_H -#include "sutherlandTransport.H" -#include "multiComponentMixture.H" -#include "specie.H" -#include "constTransport.H" -#include "specieThermo.H" +#include "perfectGas.H" #include "hConstThermo.H" #include "janafThermo.H" -#include "perfectGas.H" +#include "specieThermo.H" +#include "sutherlandTransport.H" +#include "constTransport.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -// typedef multiComponentMixture<constTransport<specieThermo<hConstThermo<perfectGas> > > > specieProperties; -// typedef hConstThermo<perfectGas> specieProperties; - -// typedef sutherlandTransport<specieThermo<janafThermo<perfectGas> > > -// specieProperties; - typedef sutherlandTransport<specieThermo<janafThermo<perfectGas> > > specieReactingProperties; diff --git a/src/lagrangian/intermediate/particleForces/particleForces.C b/src/lagrangian/intermediate/particleForces/particleForces.C index 44d758351fbdf684ece31993acd6b5e23796bbfa..d81ebadefcbdc5cf8cf0b4285540e7038baa6dd7 100644 --- a/src/lagrangian/intermediate/particleForces/particleForces.C +++ b/src/lagrangian/intermediate/particleForces/particleForces.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -115,7 +115,7 @@ const Foam::word& Foam::particleForces::gradUName() const } -Foam::vector Foam::particleForces::calc +Foam::vector Foam::particleForces::calcCoupled ( const label cellI, const scalar dt, @@ -127,12 +127,6 @@ Foam::vector Foam::particleForces::calc { vector Ftot = vector::zero; - // Gravity force - if (gravity_) - { - Ftot += g_*(1.0 - rhoc/rho); - } - // Virtual mass force if (virtualMass_) { @@ -152,5 +146,27 @@ Foam::vector Foam::particleForces::calc } +Foam::vector Foam::particleForces::calcNonCoupled +( + const label cellI, + const scalar dt, + const scalar rhoc, + const scalar rho, + const vector& Uc, + const vector& U +) const +{ + vector Ftot = vector::zero; + + // Gravity force + if (gravity_) + { + Ftot += g_*(1.0 - rhoc/rho); + } + + return Ftot; +} + + // ************************************************************************* // diff --git a/src/lagrangian/intermediate/particleForces/particleForces.H b/src/lagrangian/intermediate/particleForces/particleForces.H index 8258e35be2f753136e5a7e2e38debf6dc947d095..aab27da4653faa4fa950f2c4463f69e6896271b8 100644 --- a/src/lagrangian/intermediate/particleForces/particleForces.H +++ b/src/lagrangian/intermediate/particleForces/particleForces.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -132,8 +132,19 @@ public: // Evaluation - //- Calculate the net particle force - vector calc + //- Calculate action/reaction forces between carrier and particles + vector calcCoupled + ( + const label cellI, + const scalar dt, + const scalar rhoc, + const scalar rho, + const vector& Uc, + const vector& U + ) const; + + //- Calculate external forces applied to the particles + vector calcNonCoupled ( const label cellI, const scalar dt, diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C index eb451ba36f07fe864ae3f33cac1c15b0c0858d85..5f04d57d30689b22b5ea80684aed369fc1c1d12b 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,47 +44,6 @@ const Foam::NamedEnum<Foam::phaseProperties::phaseType, 4> // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::phaseProperties::setGlobalIds -( - const PtrList<volScalarField>& YGas -) -{ - forAll(names_, i) - { - forAll (YGas, j) - { - word specieName = YGas[j].name(); - - if (specieName == names_[i]) - { - globalIds_[i] = j; - break; - } - } - if (globalIds_[i] == -1) - { - wordList globalCarrierNames(YGas.size()); - - forAll (YGas, k) - { - globalCarrierNames[k] = YGas[k].name(); - } - - FatalErrorIn - ( - "void phaseProperties::setGlobalIds" - "(" - "const PtrList<volScalarField>&" - ")" - ) << "Could not find carrier species " << names_[i] - << " in species list" << nl - << "Available species are: " << nl << globalCarrierNames << nl - << exit(FatalError); - } - } -} - - void Foam::phaseProperties::setGlobalIds(const wordList& globalNames) { forAll(names_, i) @@ -113,18 +72,16 @@ void Foam::phaseProperties::setGlobalIds(const wordList& globalNames) void Foam::phaseProperties::setGlobalCarrierIds ( - const PtrList<volScalarField>& YGas + const wordList& carrierNames ) { globalCarrierIds_ = -1; forAll(names_, i) { - forAll (YGas, j) + forAll (carrierNames, j) { - word specieName = YGas[j].name(); - - if (specieName == names_[i]) + if (carrierNames[j] == names_[i]) { globalCarrierIds_[i] = j; break; @@ -132,21 +89,15 @@ void Foam::phaseProperties::setGlobalCarrierIds } if (globalCarrierIds_[i] == -1) { - wordList gasNames(YGas.size()); - forAll(YGas, gasI) - { - gasNames[gasI] = YGas[gasI].name(); - } - FatalErrorIn ( "void Foam::phaseProperties::setGlobalCarrierIds" "(" - "const PtrList<volScalarField>&" + "const wordList&" ")" - ) << "Could not find gas specie " << names_[i] + ) << "Could not find carrier specie " << names_[i] << " in species list" << nl - << "Available species are: " << nl << gasNames << nl + << "Available species are: " << nl << carrierNames << nl << exit(FatalError); } } @@ -242,7 +193,7 @@ Foam::phaseProperties::~phaseProperties() void Foam::phaseProperties::initialiseGlobalIds ( - const PtrList<volScalarField>& YGas, + const wordList& gasNames, const wordList& liquidNames, const wordList& solidNames ) @@ -253,7 +204,7 @@ void Foam::phaseProperties::initialiseGlobalIds { case GAS: { - setGlobalIds(YGas); + setGlobalIds(gasNames); forAll(globalCarrierIds_, i) { globalCarrierIds_[i] = globalIds_[i]; @@ -263,7 +214,7 @@ void Foam::phaseProperties::initialiseGlobalIds case LIQUID: { setGlobalIds(liquidNames); - setGlobalCarrierIds(YGas); + setGlobalCarrierIds(gasNames); break; } case SOLID: @@ -274,7 +225,7 @@ void Foam::phaseProperties::initialiseGlobalIds "phaseProperties::initialiseGlobalIds(...)" ) << "Assuming no mapping between solid and carrier species" << endl; -// setGlobalCarrierIds(YGas); +// setGlobalCarrierIds(gasNames); break; } default: diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H index c87f51b7a05dd255b41c05bbed89ce4a4732472b..eaa44b6afb59d4c0b90d2fd84c62738f739d1b16 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,6 +30,7 @@ Description SourceFiles phaseProperties.C + phasePropertiesIO.C \*---------------------------------------------------------------------------*/ @@ -94,15 +95,12 @@ private: // Private member functions - //- Set global ids - specialisation for carrier phases - void setGlobalIds(const PtrList<volScalarField>& YGas); - - //- Set global ids - liquid and solid phases + //- Set global ids void setGlobalIds(const wordList& globalNames); //- Set global carrier ids - attempts to map component names to global // carrier species - void setGlobalCarrierIds(const PtrList<volScalarField>& YGas); + void setGlobalCarrierIds(const wordList& carrierNames); //- Check the total mass fraction void checkTotalMassFraction() const; @@ -134,7 +132,7 @@ public: //- Initialise the global ids void initialiseGlobalIds ( - const PtrList<volScalarField>& YGas, + const wordList& gasNames, const wordList& liquidNames, const wordList& solidNames ); @@ -163,10 +161,10 @@ public: //- Return non-const access to a component mass fraction scalar& Y(const label cmptI); - //- Return const acccess to the global ids + //- Return const access to the global ids const labelList& globalIds() const; - //- Return const acccess to the map to the carrier global ids + //- Return const access to the map to the carrier global ids const labelList& globalCarrierIds() const; //- Return the global id of a component in the local list by name diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C index 2fbb79039b7366ffc5a47a28eb7ba288fc481354..f738cf2683683f5a8aaded5500f7b511772db846 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/intermediate/phaseProperties/phasePropertiesList/phasePropertiesList.C b/src/lagrangian/intermediate/phaseProperties/phasePropertiesList/phasePropertiesList.C index f1146e0245cc4339ecc5196a3c0c72c77665db50..2d3f7ce7add1aec039013e7006d4b2618e2bd82c 100644 --- a/src/lagrangian/intermediate/phaseProperties/phasePropertiesList/phasePropertiesList.C +++ b/src/lagrangian/intermediate/phaseProperties/phasePropertiesList/phasePropertiesList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,7 @@ License Foam::phasePropertiesList::phasePropertiesList ( Istream& is, - const PtrList<volScalarField>& YGas, + const wordList& gasNames, const wordList& liquidNames, const wordList& solidNames ) @@ -42,7 +42,7 @@ Foam::phasePropertiesList::phasePropertiesList { forAll(props_, i) { - props_[i].initialiseGlobalIds(YGas, liquidNames, solidNames); + props_[i].initialiseGlobalIds(gasNames, liquidNames, solidNames); } phaseTypeNames_.setSize(props_.size()); diff --git a/src/lagrangian/intermediate/phaseProperties/phasePropertiesList/phasePropertiesList.H b/src/lagrangian/intermediate/phaseProperties/phasePropertiesList/phasePropertiesList.H index 4247f2c4badb946f8afc8f05a37ce2123a14f503..50f6c62ebd65cc2a3d99b6b8333aec61da49f1ac 100644 --- a/src/lagrangian/intermediate/phaseProperties/phasePropertiesList/phasePropertiesList.H +++ b/src/lagrangian/intermediate/phaseProperties/phasePropertiesList/phasePropertiesList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,7 +70,7 @@ public: phasePropertiesList ( Istream& is, - const PtrList<volScalarField>& YGas, + const wordList& gasNames, const wordList& liquidNames, const wordList& solidNames ); diff --git a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelInjectionModels.C b/src/lagrangian/intermediate/submodels/IO/IOList/makeParcelIOList.H similarity index 59% rename from src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelInjectionModels.C rename to src/lagrangian/intermediate/submodels/IO/IOList/makeParcelIOList.H index 2bf6f2e1b3dfda80d65e35abc203087b5d70d867..fb463a8289e69b43508b45e5c9e4d9a35e9d3729 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/submodels/makeBasicThermoParcelInjectionModels.C +++ b/src/lagrangian/intermediate/submodels/IO/IOList/makeParcelIOList.H @@ -22,50 +22,32 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +Description + Macros for defining parcel IOLists + \*---------------------------------------------------------------------------*/ -#include "basicThermoParcel.H" -#include "ThermoCloud.H" +#ifndef makeParcelIOList_H +#define makeParcelIOList_H -#include "ConeInjection.H" -#include "FieldActivatedInjection.H" -#include "ManualInjection.H" -#include "NoInjection.H" +#include "IOPtrList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - makeInjectionModel(KinematicCloud<basicThermoParcel>); - - // Add instances of injection model to the table - - makeInjectionModelType - ( - ConeInjection, - KinematicCloud, - basicThermoParcel - ); - makeInjectionModelType - ( - FieldActivatedInjection, - KinematicCloud, - basicThermoParcel - ); - makeInjectionModelType - ( - ManualInjection, - KinematicCloud, - basicThermoParcel - ); - makeInjectionModelType - ( - NoInjection, - KinematicCloud, - basicThermoParcel +#define makeParcelIOList(ParcelType) \ + \ + typedef IOPtrList<ParcelType> IOPtrList##ParcelType; \ + \ + defineTemplateTypeNameAndDebugWithName \ + ( \ + IOPtrList##ParcelType, \ + "IOPtrList<"#ParcelType">", \ + 0 \ ); -}; +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#endif // ************************************************************************* // + diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.C index fa37b022edb490dd171ad715ac4b43ca7c7f7fb3..dc89a44b9d7752fc1eff83570c90185e40b2e995 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.C @@ -22,8 +22,6 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Description - \*---------------------------------------------------------------------------*/ #include "DispersionModel.H" diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H index 085ff97b8adc42655f7993c64c60adeeebf0cf81..74131b6fff2592735c594ac5d6fdd2cd83245fca 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H @@ -42,7 +42,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class DispersionModel Declaration + Class DispersionModel Declaration \*---------------------------------------------------------------------------*/ template<class CloudType> @@ -54,7 +54,7 @@ class DispersionModel //- Cloud dictionary const dictionary& dict_; - // Reference to the owner cloud class + //- Reference to the owner cloud class CloudType& owner_; @@ -160,6 +160,20 @@ public: add##SS##CloudType##ParcelType##ConstructorToTable_; +#define makeDispersionModelThermoType(SS, CloudType, ParcelType, ThermoType) \ + \ + defineNamedTemplateTypeNameAndDebug \ + ( \ + SS<CloudType<ParcelType<ThermoType> > >, \ + 0 \ + ); \ + \ + DispersionModel<CloudType<ParcelType<ThermoType> > >:: \ + adddictionaryConstructorToTable \ + <SS<CloudType<ParcelType<ThermoType> > > > \ + add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C index 4e834244453dd2403aae07d6793562107d1b1ab1..6c028d0205602a984a591810be5a2b14d8886e8a 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.C @@ -22,8 +22,6 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Description - \*---------------------------------------------------------------------------*/ #include "DispersionRASModel.H" diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C index daac8b5af3f126394fc5a00bfc5ff0c217616868..a8fdac2b472b917042f950a4bac52155bde8b8ad 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C @@ -22,8 +22,6 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Description - \*---------------------------------------------------------------------------*/ #include "GradientDispersionRAS.H" diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.C index 221eb2b229cb920742b4d2df4255804f50a5a4bd..56745ef686818ab433e3b3e11c0df6320ea4c0bd 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.C @@ -22,8 +22,6 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Description - \*---------------------------------------------------------------------------*/ #include "NoDispersion.H" diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.C index f9a51f050eb89d153039a8e2c9b5f969d4844595..fb03ca581c716d493b88b0611867745787e4924c 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.C @@ -22,8 +22,6 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Description - \*---------------------------------------------------------------------------*/ #include "StochasticDispersionRAS.H" diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.C b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.C index f1b98e609c2e0b0ae27a533a2a57e09c2d0735e6..1eb7f86b48effaee07d38f4ec60cacafd0e0ce09 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.C @@ -64,12 +64,11 @@ const Foam::dictionary& Foam::DragModel<CloudType>::dict() const template<class CloudType> -Foam::scalar Foam::DragModel<CloudType>::Cu +Foam::scalar Foam::DragModel<CloudType>::ptc ( const vector& Ur, const scalar d, const scalar rhoc, - const scalar rhop, const scalar mu ) const { @@ -79,7 +78,7 @@ Foam::scalar Foam::DragModel<CloudType>::Cu const scalar Cd = this->Cd(Re); - return 3.0*Cd*rhoc*magUr/(4.0*d*rhop); + return Cd*rhoc*magUr/8.0; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H index 5623c7f30e4984b1b1774af8059d12ce5eb0b11e..69130b168ca54d846a1c5d2d1b671183335f1361 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H @@ -58,7 +58,7 @@ class DragModel //- The cloud dictionary const dictionary& dict_; - // reference to the owner cloud class + //- Reference to the owner cloud class CloudType& owner_; @@ -120,14 +120,13 @@ public: //- Return drag coefficient virtual scalar Cd(const scalar Re) const = 0; - //- Return linearised coefficient for velocity equation - // Drag force per unit particle mass = Cu(U - Up) - scalar Cu + //- Return momentum transfer coefficient + // Drag force per unit particle surface area = ptc(U - Up) + scalar ptc ( const vector& Ur, const scalar d, const scalar rhoc, - const scalar rhop, const scalar mu ) const; }; @@ -155,6 +154,20 @@ public: add##SS##CloudType##ParcelType##ConstructorToTable_; +#define makeDragModelThermoType(SS, CloudType, ParcelType, ThermoType) \ + \ + defineNamedTemplateTypeNameAndDebug \ + ( \ + SS<CloudType<ParcelType<ThermoType> > >, \ + 0 \ + ); \ + \ + DragModel<CloudType<ParcelType<ThermoType> > >:: \ + adddictionaryConstructorToTable \ + <SS<CloudType<ParcelType<ThermoType> > > > \ + add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C index a812eb918979e90930138f617cb493600d5f5781..b7dd300b45857b920c986b79e63726db8020f478 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C @@ -77,6 +77,7 @@ Foam::ConeInjection<CloudType>::ConeInjection InjectionModel<CloudType>(dict, owner, typeName), duration_(readScalar(this->coeffDict().lookup("duration"))), position_(this->coeffDict().lookup("position")), + injectorCell_(-1), direction_(this->coeffDict().lookup("direction")), parcelsPerSecond_ ( @@ -145,6 +146,9 @@ Foam::ConeInjection<CloudType>::ConeInjection // Set total volume to inject this->volumeTotal_ = volumeFlowRate_().integrate(0.0, duration_); + + // Set/cache the injector cell + this->findCellAtPosition(injectorCell_, position_); } @@ -174,6 +178,7 @@ Foam::scalar Foam::ConeInjection<CloudType>::timeEnd() const template<class CloudType> void Foam::ConeInjection<CloudType>::setPositionAndCell ( + const label, const label, const scalar, vector& position, @@ -181,17 +186,20 @@ void Foam::ConeInjection<CloudType>::setPositionAndCell ) { position = position_; - this->findCellAtPosition(cellOwner, position); + cellOwner = injectorCell_; } template<class CloudType> -Foam::vector Foam::ConeInjection<CloudType>::velocity +void Foam::ConeInjection<CloudType>::setProperties ( + const label parcelI, const label, - const scalar time + const scalar time, + typename CloudType::parcelType& parcel ) { + // set particle velocity const scalar deg2Rad = mathematicalConstant::pi/180.0; scalar t = time - this->SOI_; @@ -210,23 +218,22 @@ Foam::vector Foam::ConeInjection<CloudType>::velocity dirVec += normal; dirVec /= mag(dirVec); - return Umag_().value(t)*dirVec; + parcel.U() = Umag_().value(t)*dirVec; + + // set particle diameter + parcel.d() = parcelPDF_().sample(); } template<class CloudType> -Foam::scalar Foam::ConeInjection<CloudType>::d0 -( - const label, - const scalar -) const +bool Foam::ConeInjection<CloudType>::fullyDescribed() const { - return parcelPDF_().sample(); + return false; } template<class CloudType> -bool Foam::ConeInjection<CloudType>::validInjection(const label parcelI) +bool Foam::ConeInjection<CloudType>::validInjection(const label) { return true; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H index 0c07e4622a63f1bd31ace06f01fecb39099257ac..4e43f9b37459e0ba7996e01fd392e12af39e64ba 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H @@ -53,6 +53,8 @@ SourceFiles namespace Foam { +// Forward declaration of classes + template<class Type> class DataEntry; @@ -67,14 +69,14 @@ class ConeInjection { // Private data - //- Coefficients dictionary - dictionary coeffDict_; - //- Injection duration [s] const scalar duration_; //- Injector position [m] - const vector position_; + vector position_; + + //- Cell containing injector position [] + label injectorCell_; //- Injector direction [] vector direction_; @@ -111,14 +113,14 @@ protected: // Protected member functions - //- Number of parcels to introduce over the time step + //- Number of parcels to introduce over the time step relative to SOI label parcelsToInject ( const scalar time0, const scalar time1 ) const; - //- Number of parcels to introduce over the time step + //- Number of parcels to introduce over the time step relative to SOI scalar volumeToInject ( const scalar time0, @@ -158,31 +160,30 @@ public: // Injection geometry //- Set the injection position and owner cell - void setPositionAndCell + virtual void setPositionAndCell ( const label parcelI, + const label nParcels, const scalar time, vector& position, label& cellOwner ); - //- Return the velocity of the parcel to introduce at a time - vector velocity + //- Set the parcel properties + virtual void setProperties ( const label parcelI, - const scalar time + const label nParcels, + const scalar time, + typename CloudType::parcelType& parcel ); - //- Return the diameter of the parcel to introduce at a time - scalar d0 - ( - const label parcelI, - const scalar time - ) const; + //- Flag to identify whether model fully describes the parcel + virtual bool fullyDescribed() const; //- Return flag to identify whether or not injection in cellI is // permitted - bool validInjection(const label parcelI); + virtual bool validInjection(const label parcelI); }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.C new file mode 100644 index 0000000000000000000000000000000000000000..17af3bb8702d60c269eba2491345b88fa6a0fbf5 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.C @@ -0,0 +1,289 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "ConeInjectionMP.H" +#include "DataEntry.H" + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +template<class CloudType> +Foam::label Foam::ConeInjectionMP<CloudType>::parcelsToInject +( + const scalar time0, + const scalar time1 +) const +{ + if ((time0 >= 0.0) && (time0 < duration_)) + { + const scalar targetVolume = volumeFlowRate_().integrate(0, time1); + + const label targetParcels = + parcelsPerInjector_*targetVolume/this->volumeTotal_; + + const label nToInject = targetParcels - nInjected_; + + nInjected_ += nToInject; + + return positions_.size()*nToInject; + } + else + { + return 0; + } +} + + +template<class CloudType> +Foam::scalar Foam::ConeInjectionMP<CloudType>::volumeToInject +( + const scalar time0, + const scalar time1 +) const +{ + if ((time0 >= 0.0) && (time0 < duration_)) + { + return volumeFlowRate_().integrate(time0, time1); + } + else + { + return 0.0; + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::ConeInjectionMP<CloudType>::ConeInjectionMP +( + const dictionary& dict, + CloudType& owner +) +: + InjectionModel<CloudType>(dict, owner, typeName), + positionsFile_(this->coeffDict().lookup("positionsFile")), + positions_ + ( + IOobject + ( + positionsFile_, + owner.db().time().constant(), + owner.mesh(), + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ), + injectorCells_(positions_.size()), + axesFile_(this->coeffDict().lookup("axesFile")), + axes_ + ( + IOobject + ( + axesFile_, + owner.db().time().constant(), + owner.mesh(), + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ), + duration_(readScalar(this->coeffDict().lookup("duration"))), + parcelsPerInjector_ + ( + readScalar(this->coeffDict().lookup("parcelsPerInjector")) + ), + volumeFlowRate_ + ( + DataEntry<scalar>::New + ( + "volumeFlowRate", + this->coeffDict() + ) + ), + Umag_ + ( + DataEntry<scalar>::New + ( + "Umag", + this->coeffDict() + ) + ), + thetaInner_ + ( + DataEntry<scalar>::New + ( + "thetaInner", + this->coeffDict() + ) + ), + thetaOuter_ + ( + DataEntry<scalar>::New + ( + "thetaOuter", + this->coeffDict() + ) + ), + parcelPDF_ + ( + pdf::New + ( + this->coeffDict().subDict("parcelPDF"), + owner.rndGen() + ) + ), + nInjected_(this->parcelsAddedTotal()), + tanVec1_(positions_.size()), + tanVec2_(positions_.size()) +{ + // Normalise direction vector and determine direction vectors + // tangential to direction + forAll(axes_, i) + { + axes_[i] /= mag(axes_[i]); + + vector tangent = vector::zero; + scalar magTangent = 0.0; + + while (magTangent < SMALL) + { + vector v = this->owner().rndGen().vector01(); + + tangent = v - (v & axes_[i])*axes_[i]; + magTangent = mag(tangent); + } + + tanVec1_[i] = tangent/magTangent; + tanVec2_[i] = axes_[i]^tanVec1_[i]; + } + + // Set total volume to inject + this->volumeTotal_ = volumeFlowRate_().integrate(0.0, duration_); + + // Set/cache the injector cells + forAll(positions_, i) + { + this->findCellAtPosition + ( + injectorCells_[i], + positions_[i] + ); + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::ConeInjectionMP<CloudType>::~ConeInjectionMP() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +bool Foam::ConeInjectionMP<CloudType>::active() const +{ + return true; +} + + +template<class CloudType> +Foam::scalar Foam::ConeInjectionMP<CloudType>::timeEnd() const +{ + return this->SOI_ + duration_; +} + + +template<class CloudType> +void Foam::ConeInjectionMP<CloudType>::setPositionAndCell +( + const label parcelI, + const label, + const scalar, + vector& position, + label& cellOwner +) +{ + const label i = parcelI%positions_.size(); + + position = positions_[i]; + cellOwner = injectorCells_[i]; +} + + +template<class CloudType> +void Foam::ConeInjectionMP<CloudType>::setProperties +( + const label parcelI, + const label, + const scalar time, + typename CloudType::parcelType& parcel +) +{ + // set particle velocity + const label i = parcelI%positions_.size(); + + const scalar deg2Rad = mathematicalConstant::pi/180.0; + + scalar t = time - this->SOI_; + scalar ti = thetaInner_().value(t); + scalar to = thetaOuter_().value(t); + scalar coneAngle = this->owner().rndGen().scalar01()*(to - ti) + ti; + + coneAngle *= deg2Rad; + scalar alpha = sin(coneAngle); + scalar dcorr = cos(coneAngle); + scalar beta = + 2.0*mathematicalConstant::pi*this->owner().rndGen().scalar01(); + + vector normal = alpha*(tanVec1_[i]*cos(beta) + tanVec2_[i]*sin(beta)); + vector dirVec = dcorr*axes_[i]; + dirVec += normal; + + dirVec /= mag(dirVec); + + parcel.U() = Umag_().value(t)*dirVec; + + // set particle diameter + parcel.d() = parcelPDF_().sample(); +} + + +template<class CloudType> +bool Foam::ConeInjectionMP<CloudType>::fullyDescribed() const +{ + return false; +} + + +template<class CloudType> +bool Foam::ConeInjectionMP<CloudType>::validInjection(const label parcelI) +{ + return true; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.H new file mode 100644 index 0000000000000000000000000000000000000000..cb10e93cec5ab6b98606567210128171b33e6c26 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.H @@ -0,0 +1,214 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +Class + Foam::ConeInjectionMP + +Description + Cone injection multi-point + + - User specifies + - time of start of injection + - injector positions + - directions (along injection axes) + - parcel flow rate + - parcel velocities + - inner and outer cone angles + - Parcel diameters obtained by PDF model + +SourceFiles + ConeInjectionMP.C + +\*---------------------------------------------------------------------------*/ + +#ifndef ConeInjectionMP_H +#define ConeInjectionMP_H + +#include "InjectionModel.H" +#include "pdf.H" +#include "vectorList.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes + +template<class Type> +class DataEntry; + +/*---------------------------------------------------------------------------*\ + Class ConeInjectionMP Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class ConeInjectionMP +: + public InjectionModel<CloudType> +{ + // Private data + + //- Name of file containing positions data + const word positionsFile_; + + //- Field of injector positions + vectorIOField positions_; + + //- Field of cell labels corresoponding to injector positions + labelList injectorCells_; + + //- Name of file containing axes data + const word axesFile_; + + //- Field of injector positions + vectorIOField axes_; + + //- Injection duration [s] + const scalar duration_; + + //- Number of parcels to introduce per injector + const label parcelsPerInjector_; + + //- Volume flow rate of parcels to introduce relative to SOI [m^3] + const autoPtr<DataEntry<scalar> > volumeFlowRate_; + + //- Parcel velocity magnitude relative to SOI [m/s] + const autoPtr<DataEntry<scalar> > Umag_; + + //- Inner cone angle relative to SOI [deg] + const autoPtr<DataEntry<scalar> > thetaInner_; + + //- Outer cone angle relative to SOI [deg] + const autoPtr<DataEntry<scalar> > thetaOuter_; + + //- Parcel size PDF model + const autoPtr<pdf> parcelPDF_; + + //- Number of parcels per injector already injected + mutable label nInjected_; + + + // Tangential vectors to the direction vector + + //- First tangential vector + vectorList tanVec1_; + + //- Second tangential vector + vectorList tanVec2_; + + +protected: + + // Protected member functions + + //- Number of parcels to introduce over the time step + label parcelsToInject + ( + const scalar time0, + const scalar time1 + ) const; + + //- Number of parcels to introduce over the time step + scalar volumeToInject + ( + const scalar time0, + const scalar time1 + ) const; + + +public: + + //- Runtime type information + TypeName("ConeInjectionMP"); + + + // Constructors + + //- Construct from dictionary + ConeInjectionMP + ( + const dictionary& dict, + CloudType& owner + ); + + + //- Destructor + virtual ~ConeInjectionMP(); + + + // Member Functions + + //- Flag to indicate whether model activates injection model + bool active() const; + + //- Return the end-of-injection time + scalar timeEnd() const; + + + // Injection geometry + + //- Set the injection position and owner cell + virtual void setPositionAndCell + ( + const label parcelI, + const label nParcels, + const scalar time, + vector& position, + label& cellOwner + ); + + //- Set the parcel properties + virtual void setProperties + ( + const label parcelI, + const label nParcels, + const scalar time, + typename CloudType::parcelType& parcel + ); + + //- Flag to identify whether model fully describes the parcel + virtual bool fullyDescribed() const; + + //- Return flag to identify whether or not injection in cellI is + // permitted + virtual bool validInjection(const label parcelI); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "ConeInjectionMP.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C index fb241b2f450555b34cbbd9e613a1b3b5434798b7..8429ca7ca6543c88b80066ec1bfde05d61063e82 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -131,7 +131,7 @@ Foam::FieldActivatedInjection<CloudType>::FieldActivatedInjection *sum(pow3(diameters_)) *mathematicalConstant::pi/6.0; - // Set/cahce the injector cells + // Set/cache the injector cells forAll(positions_, i) { this->findCellAtPosition @@ -170,6 +170,7 @@ template<class CloudType> void Foam::FieldActivatedInjection<CloudType>::setPositionAndCell ( const label parcelI, + const label, const scalar, vector& position, label& cellOwner @@ -181,24 +182,26 @@ void Foam::FieldActivatedInjection<CloudType>::setPositionAndCell template<class CloudType> -Foam::vector Foam::FieldActivatedInjection<CloudType>::velocity +void Foam::FieldActivatedInjection<CloudType>::setProperties ( + const label parcelI, const label, - const scalar + const scalar, + typename CloudType::parcelType& parcel ) { - return U0_; + // set particle velocity + parcel.U() = U0_; + + // set particle diameter + parcel.d() = diameters_[parcelI]; } template<class CloudType> -Foam::scalar Foam::FieldActivatedInjection<CloudType>::d0 -( - const label parcelI, - const scalar -) const +bool Foam::FieldActivatedInjection<CloudType>::fullyDescribed() const { - return diameters_[parcelI]; + return false; } @@ -212,8 +215,8 @@ bool Foam::FieldActivatedInjection<CloudType>::validInjection if ( - nParcelsInjected_[parcelI] < nParcelsPerInjector_ - && factor_*referenceField_[cellI] > thresholdField_[cellI] + nParcelsInjected_[parcelI] < nParcelsPerInjector_ + && factor_*referenceField_[cellI] > thresholdField_[cellI] ) { nParcelsInjected_[parcelI]++; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H index 194add8ca95f74b464f18ebdebc3c134875c2399..aa7c6e16f631cbcfd7fdf38b5ba5c7ec90da0872 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -87,14 +87,14 @@ class FieldActivatedInjection //- Field of injector (x,y,z) positions vectorIOField positions_; - //- Field of cell labels corresoponding to injector positions - labelField injectorCells_; + //- Field of cell labels corresponding to injector positions + labelList injectorCells_; //- Number of parcels per injector const label nParcelsPerInjector_; //- Field of number of parcels injected for each injector - labelField nParcelsInjected_; + labelList nParcelsInjected_; // Parcel properties @@ -103,7 +103,7 @@ class FieldActivatedInjection const vector U0_; //- Field of parcel diameters - scalarField diameters_; + scalarList diameters_; //- Parcel size PDF model const autoPtr<pdf> parcelPDF_; @@ -113,14 +113,14 @@ protected: // Protected member functions - //- Number of parcels to introduce over the time step + //- Number of parcels to introduce over the time step relative to SOI label parcelsToInject ( const scalar time0, const scalar time1 ) const; - //- Volume of parcels to introduce over the time step + //- Volume of parcels to introduce over the time step relative to SOI scalar volumeToInject ( const scalar time0, @@ -160,31 +160,30 @@ public: // Injection geometry //- Set the injection position and owner cell - void setPositionAndCell + virtual void setPositionAndCell ( const label parcelI, + const label nParcels, const scalar time, vector& position, label& cellOwner ); - //- Return the velocity of the parcel to introduce at a time - vector velocity + //- Set the parcel properties + virtual void setProperties ( const label parcelI, - const scalar time + const label nParcels, + const scalar time, + typename CloudType::parcelType& parcel ); - //- Return the diameter of the parcel to introduce at a time - scalar d0 - ( - const label parcelI, - const scalar time - ) const; + //- Flag to identify whether model fully describes the parcel + virtual bool fullyDescribed() const; //- Return flag to identify whether or not injection in cellI is // permitted - bool validInjection(const label parcelI); + virtual bool validInjection(const label parcelI); }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index 6a0ba9544bc4a61eb47055786de2c448fe5b3417..abbba2698d004ea46afbc4b8048ce1abe52fa34a 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -88,8 +88,7 @@ void Foam::InjectionModel<CloudType>::writeProps() template<class CloudType> void Foam::InjectionModel<CloudType>::prepareForNextTimeStep ( - const scalar time0, - const scalar time1, + const scalar time, label& newParcels, scalar& newVolume ) @@ -99,15 +98,15 @@ void Foam::InjectionModel<CloudType>::prepareForNextTimeStep newVolume = 0.0; // Return if not started injection event - if (time1 < SOI_) + if (time < SOI_) { - timeStep0_ = time1; + timeStep0_ = time; return; } // Make times relative to SOI scalar t0 = timeStep0_ - SOI_; - scalar t1 = time1 - SOI_; + scalar t1 = time - SOI_; // Number of parcels to inject newParcels = parcelsToInject(t0, t1); @@ -123,7 +122,7 @@ void Foam::InjectionModel<CloudType>::prepareForNextTimeStep else { // advance value of timeStep0_ - timeStep0_ = time1; + timeStep0_ = time; } } @@ -348,13 +347,13 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td) } const scalar time = owner_.db().time().value(); - const scalar continuousDt = owner_.db().time().deltaT().value(); + const scalar carrierDt = owner_.db().time().deltaT().value(); const polyMesh& mesh = owner_.mesh(); // Prepare for next time step label newParcels = 0; scalar newVolume = 0.0; - prepareForNextTimeStep(time0_, time, newParcels, newVolume); + prepareForNextTimeStep(time, newParcels, newVolume); // Return if no parcels are required if (newParcels == 0) @@ -363,18 +362,12 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td) return; } - // Particle density given by constant properties - const scalar rho = td.constProps().rho0(); - // Volume fraction to introduce during this timestep const scalar volFraction = volumeFraction(newVolume); // Duration of injection period during this timestep - const scalar deltaT = min - ( - continuousDt, - min(time - SOI_, timeEnd() - time0_) - ); + const scalar deltaT = + max(0.0, min(carrierDt, min(time - SOI_, timeEnd() - time0_))); // Pad injection time if injection starts during this timestep const scalar padTime = max(0.0, SOI_ - time0_); @@ -383,44 +376,56 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td) label parcelsAdded = 0; for (label parcelI=0; parcelI<newParcels; parcelI++) { - // Calculate the pseudo time of injection for parcel 'parcelI' - scalar timeInj = time0_ + padTime + deltaT*parcelI/newParcels; - - // Determine the injection position and owner cell - label cellI = -1; - vector pos = vector::zero; - setPositionAndCell(parcelI, timeInj, pos, cellI); - - if (cellI > -1) + if (validInjection(parcelI)) { - if (validInjection(parcelI)) - { - // Diameter of parcels - scalar d = d0(parcelI, timeInj); - - // Number of particles per parcel - scalar nP = setNumberOfParticles - ( - newParcels, - newVolume, - volFraction, - d, - rho - ); + // Calculate the pseudo time of injection for parcel 'parcelI' + scalar timeInj = time0_ + padTime + deltaT*parcelI/newParcels; - // Velocity of parcels - vector U = velocity(parcelI, timeInj); + // Determine the injection position and owner cell + label cellI = -1; + vector pos = vector::zero; + setPositionAndCell(parcelI, newParcels, timeInj, pos, cellI); + if (cellI > -1) + { // Lagrangian timestep scalar dt = time - timeInj; - // Apply corrections for 2-D cases + // Apply corrections to position for 2-D cases meshTools::constrainToMeshCentre(mesh, pos); - meshTools::constrainDirection(mesh, mesh.solutionD(), U); + + // Create a new parcel + parcelType* pPtr = new parcelType(td.cloud(), pos, cellI); + + // Assign new parcel properties in injection model + setProperties(parcelI, newParcels, timeInj, *pPtr); + + // Check new parcel properties + td.cloud().checkParcelProperties(pPtr, dt, fullyDescribed()); + + // Apply correction to velocity for 2-D cases + meshTools::constrainDirection + ( + mesh, + mesh.solutionD(), + pPtr->U() + ); + + // Number of particles per parcel + pPtr->nParticle() = + setNumberOfParticles + ( + newParcels, + newVolume, + volFraction, + pPtr->d(), + pPtr->rho() + ); // Add the new parcel - td.cloud().addNewParcel(pos, cellI, d, U, nP, dt); - massInjected_ += nP*rho*mathematicalConstant::pi*pow3(d)/6.0; + td.cloud().addParticle(pPtr); + + massInjected_ += pPtr->nParticle()*pPtr->mass(); parcelsAdded++; } } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H index 36820ac3184d9e324c1dde78a34f1dc63bed83c8..d90624ebcd3715a1bcfdd74c6b4029b2b6af09ef 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H @@ -26,7 +26,19 @@ Class Foam::InjectionModel Description - Templated injection model class + Templated injection model class. + + The injection model nominally describes the parcel: + - position + - diameter + - velocity + In this case, the fullyDescribed() flag should be set to 0 (false). When + the parcel is then added to the cloud, the remaining properties are + populated using values supplied in the constant properties. + + If, however, all of a parcel's properties are described in the model, the + fullDescribed() flag should be set to 1 (true). + SourceFiles InjectionModel.C @@ -73,7 +85,7 @@ private: //- The cloud dictionary const dictionary& dict_; - // Reference to the owner cloud class + //- Reference to the owner cloud class CloudType& owner_; //- The coefficients dictionary @@ -93,6 +105,9 @@ protected: // Protected data + //- Convenience typedef for parcel type + typedef typename CloudType::parcelType parcelType; + // Global injection properties //- Start of injection [s] @@ -132,14 +147,14 @@ protected: // Protected member functions - //- Number of parcels to introduce over the time step + //- Number of parcels to introduce over the time step relative to SOI virtual label parcelsToInject ( const scalar time0, const scalar time1 ) const = 0; - //- Volume of parcels to introduce over the time step + //- Volume of parcels to introduce over the time step relative to SOI virtual scalar volumeToInject ( const scalar time0, @@ -153,8 +168,7 @@ protected: //- Determine properties for next time step/injection interval virtual void prepareForNextTimeStep ( - const scalar time0, - const scalar time1, + const scalar time, label& newParcels, scalar& newVolume ); @@ -255,7 +269,7 @@ public: //- Return mass of particles to introduce inline scalar massTotal() const; - //- Return mass of particles injected (cummulative) + //- Return mass of particles injected (cumulative) inline scalar massInjected() const; //- Return the end-of-injection time @@ -286,31 +300,26 @@ public: virtual void setPositionAndCell ( const label parcelI, + const label nParcels, const scalar time, vector& position, label& cellOwner ) = 0; - //- Return the velocity of the parcel to introduce at a time - virtual vector velocity + //- Set the parcel properties + virtual void setProperties ( const label parcelI, - const scalar time + const label nParcels, + const scalar time, + typename CloudType::parcelType& parcel ) = 0; - //- Return the diameter of the parcel to introduce at a time - virtual scalar d0 - ( - const label parcelI, - const scalar time - ) const = 0; + //- Flag to identify whether model fully describes the parcel + virtual bool fullyDescribed() const = 0; }; -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "InjectionModelI.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam @@ -333,6 +342,25 @@ public: add##SS##CloudType##ParcelType##ConstructorToTable_; +#define makeInjectionModelThermoType(SS, CloudType, ParcelType, ThermoType) \ + \ + defineNamedTemplateTypeNameAndDebug \ + ( \ + SS<CloudType<ParcelType<ThermoType> > >, \ + 0 \ + ); \ + \ + InjectionModel<CloudType<ParcelType<ThermoType> > >:: \ + adddictionaryConstructorToTable \ + <SS<CloudType<ParcelType<ThermoType> > > > \ + add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; + + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "InjectionModelI.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.C new file mode 100644 index 0000000000000000000000000000000000000000..5fd976e0160d5ba25a548b86730e38b007085d3b --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.C @@ -0,0 +1,241 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "KinematicLookupTableInjection.H" +#include "scalarIOList.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template<class CloudType> +Foam::label Foam::KinematicLookupTableInjection<CloudType>::INPUT_FILE_COLS = 9; + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +template<class CloudType> +Foam::label Foam::KinematicLookupTableInjection<CloudType>::parcelsToInject +( + const scalar time0, + const scalar time1 +) const +{ + if ((time0 >= 0.0) && (time0 < duration_)) + { + return round(injectorCells_.size()*(time1 - time0)*nParcelsPerSecond_); + } + else + { + return 0; + } +} + + +template<class CloudType> +Foam::scalar Foam::KinematicLookupTableInjection<CloudType>::volumeToInject +( + const scalar time0, + const scalar time1 +) const +{ + scalar volume = 0.0; + if ((time0 >= 0.0) && (time0 < duration_)) + { + forAll(mDot_, injectorI) + { + volume += mDot_[injectorI]/rho_[injectorI]*(time1 - time0); + } + } + + return volume; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::KinematicLookupTableInjection<CloudType>::KinematicLookupTableInjection +( + const dictionary& dict, + CloudType& owner +) +: + InjectionModel<CloudType>(dict, owner, typeName), + inputFileName_(this->coeffDict().lookup("inputFile")), + duration_(readScalar(this->coeffDict().lookup("duration"))), + nParcelsPerSecond_ + ( + readScalar(this->coeffDict().lookup("parcelsPerSecond")) + ), + x_(0), + U_(0), + d_(0), + rho_(0), + mDot_(0), + injectorCells_(0) +{ + scalarListIOList injectorData + ( + IOobject + ( + inputFileName_, + owner.db().time().constant(), + owner.db(), + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + x_.setSize(injectorData.size()); + U_.setSize(injectorData.size()); + d_.setSize(injectorData.size()); + rho_.setSize(injectorData.size()); + mDot_.setSize(injectorData.size()); + + // Populate lists + forAll(injectorData, injectorI) + { + if (injectorData[injectorI].size() != INPUT_FILE_COLS) + { + FatalErrorIn + ( + "KinematicLookupTableInjection" + "(" + "const dictionary&," + "CloudType& owner" + ")" + ) << "Incorrect number of entries in injector specification " + << "- found " << injectorData[injectorI].size() + << ", expected " << INPUT_FILE_COLS << ":" << nl + << " x0 x1 x2 u0 u1 u2 d rho mDot " << nl + << exit(FatalError); + } + x_[injectorI].component(0) = injectorData[injectorI][0]; + x_[injectorI].component(1) = injectorData[injectorI][1]; + x_[injectorI].component(2) = injectorData[injectorI][2]; + U_[injectorI].component(0) = injectorData[injectorI][3]; + U_[injectorI].component(1) = injectorData[injectorI][4]; + U_[injectorI].component(2) = injectorData[injectorI][5]; + d_[injectorI] = injectorData[injectorI][6]; + rho_[injectorI] = injectorData[injectorI][7]; + mDot_[injectorI] = injectorData[injectorI][8]; + } + + // Set/cache the injector cells + injectorCells_.setSize(injectorData.size()); + forAll(x_, injectorI) + { + this->findCellAtPosition(injectorCells_[injectorI], x_[injectorI]); + } + + // Determine volume of particles to inject + this->volumeTotal_ = 0.0; + forAll(mDot_, injectorI) + { + this->volumeTotal_ += mDot_[injectorI]/rho_[injectorI]; + } + this->volumeTotal_ *= duration_; +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::KinematicLookupTableInjection<CloudType>::~KinematicLookupTableInjection() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +bool Foam::KinematicLookupTableInjection<CloudType>::active() const +{ + return true; +} + + +template<class CloudType> +Foam::scalar Foam::KinematicLookupTableInjection<CloudType>::timeEnd() const +{ + return this->SOI_ + duration_; +} + + +template<class CloudType> +void Foam::KinematicLookupTableInjection<CloudType>::setPositionAndCell +( + const label parcelI, + const label nParcels, + const scalar time, + vector& position, + label& cellOwner +) +{ + label injectorI = parcelI*injectorCells_.size()/nParcels; + + position = x_[injectorI]; + cellOwner = injectorCells_[injectorI]; +} + + +template<class CloudType> +void Foam::KinematicLookupTableInjection<CloudType>::setProperties +( + const label parcelI, + const label nParcels, + const scalar, + typename CloudType::parcelType& parcel +) +{ + label injectorI = parcelI*injectorCells_.size()/nParcels; + + // set particle velocity + parcel.U() = U_[injectorI]; + + // set particle diameter + parcel.d() = d_[injectorI]; + + // set particle density + parcel.rho() = rho_[injectorI]; +} + + +template<class CloudType> +bool Foam::KinematicLookupTableInjection<CloudType>::fullyDescribed() const +{ + return true; +} + + +template<class CloudType> +bool Foam::KinematicLookupTableInjection<CloudType>::validInjection +( + const label +) +{ + return true; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.H new file mode 100644 index 0000000000000000000000000000000000000000..b3dd74099ccc89ef90f6305c4da8f0ec638ee5cb --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.H @@ -0,0 +1,193 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +Class + Foam::KinematicLookupTableInjection + +Description + Particle injection sources read from look-up table. Each row corresponds to + an injection site. + + ( + (x y z u v w d rho mDot) + ); + + where: + x, y, z = global cartesian co-ordinates [m] + u, v, w = global cartesian velocity components [m/s] + d = diameter [m] + rho = density [kg/m3] + mDot = mass flow rate [kg/m3] + +SourceFiles + KinematicLookupTableInjection.C + +\*---------------------------------------------------------------------------*/ + +#ifndef KinematicLookupTableInjection_H +#define KinematicLookupTableInjection_H + +#include "InjectionModel.H" +#include "pdf.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class KinematicLookupTableInjection Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class KinematicLookupTableInjection +: + public InjectionModel<CloudType> +{ + // Private data + + //- Name of file containing injector/parcel data + const word inputFileName_; + + //- Injection duration - common to all injection sources + const scalar duration_; + + //- Number of parcels per injector - common to all injection sources + const label nParcelsPerSecond_; + + //- List of parcel position per injector / [m] + List<point> x_; + + //- List of parcel velocity per injector / [m] + List<vector> U_; + + //- List of parcel diameter per injector / [m] + List<scalar> d_; + + //- List of parcel fluid density pre injector / [kg/m3] + List<scalar> rho_; + + //- List of parcel injection mass flow per injector / [kg/s] + List<scalar> mDot_; + + //- List of injector cells per injector + List<label> injectorCells_; + + //- Number of columns expected in input file + static label INPUT_FILE_COLS; + + +protected: + + // Protected member functions + + //- Number of parcels to introduce over the time step relative to SOI + label parcelsToInject + ( + const scalar time0, + const scalar time1 + ) const; + + //- Volume of parcels to introduce over the time step relative to SOI + scalar volumeToInject + ( + const scalar time0, + const scalar time1 + ) const; + + +public: + + //- Runtime type information + TypeName("KinematicLookupTableInjection"); + + + // Constructors + + //- Construct from dictionary + KinematicLookupTableInjection + ( + const dictionary& dict, + CloudType& owner + ); + + + //- Destructor + virtual ~KinematicLookupTableInjection(); + + + // Member Functions + + //- Flag to indicate whether model activates injection model + bool active() const; + + //- Return the end-of-injection time + scalar timeEnd() const; + + + // Injection geometry + + //- Set the injection position and owner cell + virtual void setPositionAndCell + ( + const label parcelI, + const label nParcels, + const scalar time, + vector& position, + label& cellOwner + ); + + //- Set the parcel properties + virtual void setProperties + ( + const label parcelI, + const label nParcels, + const scalar time, + typename CloudType::parcelType& parcel + ); + + //- Flag to identify whether model fully describes the parcel + virtual bool fullyDescribed() const; + + //- Return flag to identify whether or not injection in cellI is + // permitted + virtual bool validInjection(const label parcelI); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "KinematicLookupTableInjection.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C index 6d71828c237ca36ed0bc29e3b22e1db97a47adb7..afcd15f30308226ed2f1d48d3a2f11b78639fc39 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C @@ -130,7 +130,7 @@ template<class CloudType> Foam::scalar Foam::ManualInjection<CloudType>::timeEnd() const { // Not used - return 0.0; + return this->SOI_; } @@ -138,6 +138,7 @@ template<class CloudType> void Foam::ManualInjection<CloudType>::setPositionAndCell ( const label parcelI, + const label, const scalar time, vector& position, label& cellOwner @@ -149,24 +150,26 @@ void Foam::ManualInjection<CloudType>::setPositionAndCell template<class CloudType> -Foam::vector Foam::ManualInjection<CloudType>::velocity +void Foam::ManualInjection<CloudType>::setProperties ( + const label parcelI, const label, - const scalar + const scalar, + typename CloudType::parcelType& parcel ) { - return U0_; + // set particle velocity + parcel.U() = U0_; + + // set particle diameter + parcel.d() = diameters_[parcelI]; } template<class CloudType> -Foam::scalar Foam::ManualInjection<CloudType>::d0 -( - const label parcelI, - const scalar -) const +bool Foam::ManualInjection<CloudType>::fullyDescribed() const { - return diameters_[parcelI]; + return false; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H index a9b4ae0f5c241a979f78271c2776279a32b957f4..e3ab4853c57948ff88d12775b48086260fc5c287 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H @@ -40,8 +40,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef manualInjection_H -#define manualInjection_H +#ifndef ManualInjection_H +#define ManualInjection_H #include "InjectionModel.H" #include "pdf.H" @@ -62,9 +62,6 @@ class ManualInjection { // Private data - //- Coefficients dictionary - dictionary coeffDict_; - //- Name of file containing positions data const word positionsFile_; @@ -72,7 +69,7 @@ class ManualInjection vectorIOField positions_; //- Field of parcel diameters - scalarField diameters_; + scalarList diameters_; //- Initial parcel velocity const vector U0_; @@ -88,14 +85,14 @@ protected: // Protected member functions - //- Number of parcels to introduce over the time step + //- Number of parcels to introduce over the time step relative to SOI label parcelsToInject ( const scalar time0, const scalar time1 ) const; - //- Volume of parcels to introduce over the time step + //- Volume of parcels to introduce over the time step relative to SOI scalar volumeToInject ( const scalar time0, @@ -135,31 +132,30 @@ public: // Injection geometry //- Set the injection position and owner cell - void setPositionAndCell + virtual void setPositionAndCell ( const label parcelI, + const label nParcels, const scalar time, vector& position, label& cellOwner ); - //- Return the velocity of the parcel to introduce at a time - vector velocity + //- Set the parcel properties + virtual void setProperties ( const label parcelI, - const scalar time + const label nParcels, + const scalar time, + typename CloudType::parcelType& parcel ); - //- Return the diameter of the parcel to introduce at a time - scalar d0 - ( - const label parcelI, - const scalar time - ) const; + //- Flag to identify whether model fully describes the parcel + virtual bool fullyDescribed() const; //- Return flag to identify whether or not injection in cellI is // permitted - bool validInjection(const label parcelI); + virtual bool validInjection(const label parcelI); }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.C index 5e51bc26a9ee1c3a8c392dc9248df4287d90fb06..9e8019e5373a21f031105bb8a98b598a8df80cbe 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.C @@ -90,6 +90,7 @@ Foam::scalar Foam::NoInjection<CloudType>::timeEnd() const template<class CloudType> void Foam::NoInjection<CloudType>::setPositionAndCell ( + const label, const label, const scalar, vector&, @@ -99,24 +100,26 @@ void Foam::NoInjection<CloudType>::setPositionAndCell template<class CloudType> -Foam::vector Foam::NoInjection<CloudType>::velocity +void Foam::NoInjection<CloudType>::setProperties ( const label, - const scalar + const label, + const scalar, + typename CloudType::parcelType& parcel ) { - return vector::zero; + // set particle velocity + parcel.U() = vector::zero; + + // set particle diameter + parcel.d() = 0.0; } template<class CloudType> -Foam::scalar Foam::NoInjection<CloudType>::d0 -( - const label, - const scalar -) const +bool Foam::NoInjection<CloudType>::fullyDescribed() const { - return 0.0; + return false; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H index e05790a64e928e90e3d00e8d7c3326cf97e5f3e9..6f2950b17cdf16df1090e8f1ba136543f1b5f981 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H @@ -33,8 +33,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef noInjection_H -#define noInjection_H +#ifndef NoInjection_H +#define NoInjection_H #include "InjectionModel.H" @@ -56,14 +56,14 @@ protected: // Protected member functions - //- Number of parcels to introduce over the time step + //- Number of parcels to introduce over the time step relative to SOI label parcelsToInject ( const scalar, const scalar ) const; - //- Volume of parcels to introduce over the time step + //- Volume of parcels to introduce over the time step relative to SOI scalar volumeToInject ( const scalar, @@ -103,31 +103,29 @@ public: // Injection geometry //- Set the injection position and owner cell - void setPositionAndCell + virtual void setPositionAndCell ( const label parcelI, + const label nParcels, const scalar time, vector& position, label& cellOwner ); - //- Return the velocity of the parcel to introduce at a time - vector velocity + virtual void setProperties ( const label parcelI, - const scalar time + const label nParcels, + const scalar time, + typename CloudType::parcelType& parcel ); - //- Return the diameter of the parcel to introduce at a time - scalar d0 - ( - const label parcelI, - const scalar time - ) const; + //- Flag to identify whether model fully describes the parcel + virtual bool fullyDescribed() const; //- Return flag to identify whether or not injection in cellI is // permitted - bool validInjection(const label cellI); + virtual bool validInjection(const label cellI); }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C new file mode 100644 index 0000000000000000000000000000000000000000..257f2af21a9d9632fdc561fc9f25cdb7f1a46cf0 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C @@ -0,0 +1,140 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "LocalInteraction.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template <class CloudType> +bool Foam::LocalInteraction<CloudType>::applyToPatch(const polyPatch& pp) const +{ + forAll(patchIds_, patchI) + { + if (patchIds_[patchI] == pp.index()) + { + return true; + } + } + + return false; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template <class CloudType> +Foam::LocalInteraction<CloudType>::LocalInteraction +( + const dictionary& dict, + CloudType& cloud +) +: + PatchInteractionModel<CloudType>(dict, cloud, typeName), + patchData_(this->coeffDict().lookup("patches")), + patchIds_(patchData_.size()) +{ + const polyMesh& mesh = cloud.mesh(); + const polyBoundaryMesh& bMesh = mesh.boundaryMesh(); + + forAll(patchData_, patchI) + { + const word& patchName = patchData_[patchI].patchName(); + patchIds_[patchI] = bMesh.findPatchID(patchName); + if (patchIds_[patchI] < 0) + { + FatalErrorIn("LocalInteraction(const dictionary&, CloudType&)") + << "Patch " << patchName << " not found. Available patches " + << "are: " << bMesh.names() << exit(FatalError); + } + } + + // check that all walls are specified + DynamicList<word> badWalls; + forAll(bMesh, patchI) + { + if (isA<wallPolyPatch>(bMesh[patchI]) && !applyToPatch(bMesh[patchI])) + { + badWalls.append(bMesh[patchI].name()); + } + } + + if (badWalls.size() > 0) + { + FatalErrorIn("LocalInteraction(const dictionary&, CloudType&)") + << "All wall patches must be specified when employing local patch " + << "interaction. Please specify data for patches:" << nl + << badWalls << nl << exit(FatalError); + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template <class CloudType> +Foam::LocalInteraction<CloudType>::~LocalInteraction() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +bool Foam::LocalInteraction<CloudType>::active() const +{ + return true; +} + + +template <class CloudType> +bool Foam::LocalInteraction<CloudType>::correct +( + const polyPatch& pp, + const label faceId, + vector& U +) const +{ + if (applyToPatch(pp)) + { + vector nw = pp.faceAreas()[pp.whichFace(faceId)]; + nw /= mag(nw); + + scalar Un = U & nw; + vector Ut = U - Un*nw; + + if (Un > 0) + { + U -= (1.0 + patchData_[pp.index()].e())*Un*nw; + } + + U -= patchData_[pp.index()].mu()*Ut; + + return true; + } + + return false; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H new file mode 100644 index 0000000000000000000000000000000000000000..a53d6398efb22b488f37cd34c98736061d1a39b9 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H @@ -0,0 +1,186 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +Class + Foam::LocalInteraction + +Description + Patch interaction specified on a patch-by-patch basis + +\*---------------------------------------------------------------------------*/ + +#ifndef LocalInteraction_H +#define LocalInteraction_H + +#include "PatchInteractionModel.H" +#include "dictionaryEntry.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +/*---------------------------------------------------------------------------*\ + Class LocalInteraction Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class LocalInteraction +: + public PatchInteractionModel<CloudType> +{ + class patchInteractionData + { + // Private data + + //- Patch name + word patchName_; + + //- Elasticity coefficient + scalar e_; + + //- Restitution coefficient + scalar mu_; + + + public: + + //- Construct null + patchInteractionData() + : + patchName_("unknownPatch"), + e_(0.0), + mu_(0.0) + {} + + //- Construct from dictionary + patchInteractionData(const dictionary& dict); + + // Member functions + + // Access + + //- Return const access to the patch name + const word& patchName() const + { + return patchName_; + } + + //- Return const access to the elasticity coefficient + scalar e() const + { + return e_; + } + + //- Return const access to the restitution coefficient + scalar mu() const + { + return mu_; + } + + + // I-O + + //- Istream operator + friend Istream& operator>>(Istream& is, patchInteractionData& pid) + { + is.check + ( + "Istream& operator>>" + "(Istream&, patchInteractionData&)" + ); + + const dictionaryEntry entry(dictionary::null, is); + + pid.patchName_ = entry.keyword(); + entry.lookup("e") >> pid.e_; + entry.lookup("mu") >> pid.mu_; + + return is; + } + }; + + + // Private data + + //- List of participating patches + const List<patchInteractionData> patchData_; + + //- List of participating patch ids + List<label> patchIds_; + + + // Private member functions + + //- Returns true if patch is in patchIds_ list + bool applyToPatch(const polyPatch& pp) const; + + + +public: + + //- Runtime type information + TypeName("LocalInteraction"); + + + // Constructors + + //- Construct from dictionary + LocalInteraction(const dictionary& dict, CloudType& cloud); + + + //- Destructor + virtual ~LocalInteraction(); + + + // 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 + ( + const polyPatch& pp, + const label faceId, + vector& U + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "LocalInteraction.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/NewWallInteractionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/NewPatchInteractionModel.C similarity index 71% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/NewWallInteractionModel.C rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/NewPatchInteractionModel.C index 522432191af717485be937013e972ea969ac5c06..83740bb684d1e0dea8fdf4a8acc637fc5854170a 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/NewWallInteractionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/NewPatchInteractionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,43 +24,43 @@ License \*---------------------------------------------------------------------------*/ -#include "WallInteractionModel.H" +#include "PatchInteractionModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template<class CloudType> -Foam::autoPtr<Foam::WallInteractionModel<CloudType> > -Foam::WallInteractionModel<CloudType>::New +Foam::autoPtr<Foam::PatchInteractionModel<CloudType> > +Foam::PatchInteractionModel<CloudType>::New ( const dictionary& dict, CloudType& owner ) { - word WallInteractionModelType(dict.lookup("WallInteractionModel")); + word PatchInteractionModelType(dict.lookup("PatchInteractionModel")); - Info<< "Selecting WallInteractionModel " << WallInteractionModelType + Info<< "Selecting PatchInteractionModel " << PatchInteractionModelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(WallInteractionModelType); + dictionaryConstructorTablePtr_->find(PatchInteractionModelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn ( - "WallInteractionModel<CloudType>::New" + "PatchInteractionModel<CloudType>::New" "(" "const dictionary&, " "CloudType&" ")" - ) << "Unknown WallInteractionModelType type " - << WallInteractionModelType + ) << "Unknown PatchInteractionModelType type " + << PatchInteractionModelType << ", constructor not in hash table" << nl << nl - << " Valid WallInteractionModel types are:" << nl + << " Valid PatchInteractionModel types are:" << nl << dictionaryConstructorTablePtr_->toc() << exit(FatalError); } - return autoPtr<WallInteractionModel<CloudType> >(cstrIter()(dict, owner)); + return autoPtr<PatchInteractionModel<CloudType> >(cstrIter()(dict, owner)); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C similarity index 81% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.C rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C index 5ee04a0a1cd82ae0cef3c81dab963269801b7d4b..117e6005c8c98cd61f275cd512c8e8ac281070a4 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,12 +24,12 @@ License \*---------------------------------------------------------------------------*/ -#include "WallInteractionModel.H" +#include "PatchInteractionModel.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class CloudType> -Foam::WallInteractionModel<CloudType>::WallInteractionModel +Foam::PatchInteractionModel<CloudType>::PatchInteractionModel ( const dictionary& dict, CloudType& owner, @@ -45,7 +45,7 @@ Foam::WallInteractionModel<CloudType>::WallInteractionModel // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template<class CloudType> -Foam::WallInteractionModel<CloudType>::~WallInteractionModel() +Foam::PatchInteractionModel<CloudType>::~PatchInteractionModel() {} @@ -53,14 +53,14 @@ Foam::WallInteractionModel<CloudType>::~WallInteractionModel() template<class CloudType> const CloudType& -Foam::WallInteractionModel<CloudType>::owner() const +Foam::PatchInteractionModel<CloudType>::owner() const { return owner_; } template<class CloudType> -const Foam::dictionary& Foam::WallInteractionModel<CloudType>::dict() const +const Foam::dictionary& Foam::PatchInteractionModel<CloudType>::dict() const { return dict_; } @@ -68,7 +68,7 @@ const Foam::dictionary& Foam::WallInteractionModel<CloudType>::dict() const template<class CloudType> const Foam::dictionary& -Foam::WallInteractionModel<CloudType>::coeffDict() const +Foam::PatchInteractionModel<CloudType>::coeffDict() const { return coeffDict_; } @@ -76,7 +76,7 @@ Foam::WallInteractionModel<CloudType>::coeffDict() const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewWallInteractionModel.C" +#include "NewPatchInteractionModel.C" // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H similarity index 65% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.H rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H index 6f9648231feb6b3c746e0e9c7ee061306752fb82..986d30d3a1c20d513a170fe4d03096351f8fa790 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,20 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::WallInteractionModel - + Foam::PatchInteractionModel Description - Templated wall interaction model class + Templated patch interaction model class SourceFiles - WallInteractionModel.C - NewWallInteractionModel.C + PatchInteractionModel.C + NewPatchInteractionModel.C \*---------------------------------------------------------------------------*/ -#ifndef WallInteractionModel_H -#define WallInteractionModel_H +#ifndef PatchInteractionModel_H +#define PatchInteractionModel_H #include "IOdictionary.H" #include "autoPtr.H" @@ -48,18 +47,18 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class WallInteractionModel Declaration + Class PatchInteractionModel Declaration \*---------------------------------------------------------------------------*/ template<class CloudType> -class WallInteractionModel +class PatchInteractionModel { // Private data //- The cloud dictionary const dictionary& dict_; - // reference to the owner cloud class + //- Reference to the owner cloud class CloudType& owner_; //- The coefficients dictionary @@ -69,13 +68,13 @@ class WallInteractionModel public: //- Runtime type information - TypeName("WallInteractionModel"); + TypeName("PatchInteractionModel"); //- Declare runtime constructor selection table declareRunTimeSelectionTable ( autoPtr, - WallInteractionModel, + PatchInteractionModel, dictionary, ( const dictionary& dict, @@ -88,7 +87,7 @@ public: // Constructors //- Construct from components - WallInteractionModel + PatchInteractionModel ( const dictionary& dict, CloudType& owner, @@ -97,11 +96,11 @@ public: //- Destructor - virtual ~WallInteractionModel(); + virtual ~PatchInteractionModel(); //- Selector - static autoPtr<WallInteractionModel<CloudType> > New + static autoPtr<PatchInteractionModel<CloudType> > New ( const dictionary& dict, CloudType& owner @@ -122,13 +121,14 @@ public: // Member Functions - //- Flag to indicate whether model activates heat transfer model + //- Flag to indicate whether model activates patch interaction model virtual bool active() const = 0; - //- Apply wall correction - virtual void correct + //- Apply velocity correction + // Returns true if particle remains in same cell + virtual bool correct ( - const wallPolyPatch& wpp, + const polyPatch& pp, const label faceId, vector& U ) const = 0; @@ -141,30 +141,44 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeWallInteractionModel(CloudType) \ +#define makePatchInteractionModel(CloudType) \ \ - defineNamedTemplateTypeNameAndDebug(WallInteractionModel<CloudType>, 0); \ + defineNamedTemplateTypeNameAndDebug(PatchInteractionModel<CloudType>, 0); \ \ defineTemplateRunTimeSelectionTable \ ( \ - WallInteractionModel<CloudType>, \ + PatchInteractionModel<CloudType>, \ dictionary \ ); -#define makeWallInteractionModelType(SS, CloudType, ParcelType) \ +#define makePatchInteractionModelType(SS, CloudType, ParcelType) \ \ defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \ \ - WallInteractionModel<CloudType<ParcelType> >:: \ + PatchInteractionModel<CloudType<ParcelType> >:: \ adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \ add##SS##CloudType##ParcelType##ConstructorToTable_; +#define makePatchInteractionModelThermoType(SS, CloudType, ParcelType, ThermoType)\ + \ + defineNamedTemplateTypeNameAndDebug \ + ( \ + SS<CloudType<ParcelType<ThermoType> > >, \ + 0 \ + ); \ + \ + PatchInteractionModel<CloudType<ParcelType<ThermoType> > >:: \ + adddictionaryConstructorToTable \ + <SS<CloudType<ParcelType<ThermoType> > > > \ + add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "WallInteractionModel.C" +# include "PatchInteractionModel.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C similarity index 88% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.C rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C index a437c67edbdc18a44bc3b96710de2ab02f3afd6b..e5cfdd3540105e38d9f32f211a131923642faadb 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Foam::Rebound<CloudType>::Rebound CloudType& cloud ) : - WallInteractionModel<CloudType>(dict, cloud, typeName), + PatchInteractionModel<CloudType>(dict, cloud, typeName), UFactor_(readScalar(this->coeffDict().lookup("UFactor"))) {} @@ -57,14 +57,14 @@ bool Foam::Rebound<CloudType>::active() const template<class CloudType> -void Foam::Rebound<CloudType>::correct +bool Foam::Rebound<CloudType>::correct ( - const wallPolyPatch& wpp, + const polyPatch& pp, const label faceId, vector& U ) const { - vector nw = wpp.faceAreas()[wpp.whichFace(faceId)]; + vector nw = pp.faceAreas()[pp.whichFace(faceId)]; nw /= mag(nw); scalar Un = U & nw; @@ -76,6 +76,8 @@ void Foam::Rebound<CloudType>::correct } U -= Ut; + + return true; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.H similarity index 82% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.H rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.H index da99ceec6722e38a94247ecb5956bcb94fbdd434..7e3126996f92760256966da6945c608d127832bf 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,14 +26,14 @@ Class Foam::Rebound Description - Simple rebound wall interaction model + Simple rebound patch interaction model \*---------------------------------------------------------------------------*/ #ifndef Rebound_H #define Rebound_H -#include "WallInteractionModel.H" +#include "PatchInteractionModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,7 +46,7 @@ namespace Foam template<class CloudType> class Rebound : - public WallInteractionModel<CloudType> + public PatchInteractionModel<CloudType> { // Private data @@ -64,11 +64,7 @@ public: // Constructors //- Construct from dictionary - Rebound - ( - const dictionary& dict, - CloudType& cloud - ); + Rebound(const dictionary& dict, CloudType& cloud); //- Destructor @@ -77,13 +73,14 @@ public: // Member Functions - //- Flag to indicate whether model activates heat transfer model - bool active() const; + //- Flag to indicate whether model activates patch interaction model + virtual bool active() const; - //- Apply wall correction - virtual void correct + //- Apply velocity correction + // Returns true if particle remains in same cell + virtual bool correct ( - const wallPolyPatch& wpp, + const polyPatch& pp, const label faceId, vector& U ) const; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C similarity index 80% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.C rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C index 0c09c4be378e9f5de7ce012c112489ef162d038b..f87c0dd08b927c739ee6b9ca9592f98a8df8dbda 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,8 +24,6 @@ License \*---------------------------------------------------------------------------*/ -#include "error.H" - #include "StandardWallInteraction.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -37,7 +35,7 @@ Foam::StandardWallInteraction<CloudType>::StandardWallInteraction CloudType& cloud ) : - WallInteractionModel<CloudType>(dict, cloud, typeName), + PatchInteractionModel<CloudType>(dict, cloud, typeName), e_(dimensionedScalar(this->coeffDict().lookup("e")).value()), mu_(dimensionedScalar(this->coeffDict().lookup("mu")).value()) {} @@ -60,25 +58,32 @@ bool Foam::StandardWallInteraction<CloudType>::active() const template <class CloudType> -void Foam::StandardWallInteraction<CloudType>::correct +bool Foam::StandardWallInteraction<CloudType>::correct ( - const wallPolyPatch& wpp, + const polyPatch& pp, const label faceId, vector& U ) const { - vector nw = wpp.faceAreas()[wpp.whichFace(faceId)]; - nw /= mag(nw); + if (isA<wallPolyPatch>(pp)) + { + vector nw = pp.faceAreas()[pp.whichFace(faceId)]; + nw /= mag(nw); - scalar Un = U & nw; - vector Ut = U - Un*nw; + scalar Un = U & nw; + vector Ut = U - Un*nw; - if (Un > 0) - { - U -= (1.0 + e_)*Un*nw; + if (Un > 0) + { + U -= (1.0 + e_)*Un*nw; + } + + U -= mu_*Ut; + + return true; } - U -= mu_*Ut; + return false; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.H similarity index 83% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.H rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.H index afdc572103145295cbe9767ea7e17ca31214f4af..3e2175e4698cbbf05c5a9a7175469ae12403a4ee 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,7 +33,7 @@ Description #ifndef StandardWallInteraction_H #define StandardWallInteraction_H -#include "WallInteractionModel.H" +#include "PatchInteractionModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,14 +46,14 @@ namespace Foam template<class CloudType> class StandardWallInteraction : - public WallInteractionModel<CloudType> + public PatchInteractionModel<CloudType> { // Private data //- Elasticity const scalar e_; - //-Restitution coefficient + //- Restitution coefficient const scalar mu_; @@ -66,11 +66,7 @@ public: // Constructors //- Construct from dictionary - StandardWallInteraction - ( - const dictionary& dict, - CloudType& cloud - ); + StandardWallInteraction(const dictionary& dict, CloudType& cloud); //- Destructor @@ -79,13 +75,14 @@ public: // Member Functions - //- Flag to indicate whether model activates heat transfer model - bool active() const; + //- Flag to indicate whether model activates patch interaction model + virtual bool active() const; - //- Apply wall correction - virtual void correct + //- Apply velocity correction + // Returns true if particle remains in same cell + virtual bool correct ( - const wallPolyPatch& wpp, + const polyPatch& pp, const label faceId, vector& U ) const; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/NoPostProcessing/NoPostProcessing.C b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/NoPostProcessing/NoPostProcessing.C new file mode 100644 index 0000000000000000000000000000000000000000..b1842b858a17fbd1122ef59e12e7c0400aacfda7 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/NoPostProcessing/NoPostProcessing.C @@ -0,0 +1,78 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "NoPostProcessing.H" + +// * * * * * * * * * * * * * protected Member Functions * * * * * * * * * * // + +template<class CloudType> +void Foam::NoPostProcessing<CloudType>::write() +{ +// do nothing +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::NoPostProcessing<CloudType>::NoPostProcessing +( + const dictionary&, + CloudType& owner +) +: + PostProcessingModel<CloudType>(owner) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::NoPostProcessing<CloudType>::~NoPostProcessing() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +bool Foam::NoPostProcessing<CloudType>::active() const +{ + return false; +} + + +template<class CloudType> +void Foam::NoPostProcessing<CloudType>::postPatch +( + const typename CloudType::parcelType&, + const label +) +{ +// do nothing +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/NoPostProcessing/NoPostProcessing.H b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/NoPostProcessing/NoPostProcessing.H new file mode 100644 index 0000000000000000000000000000000000000000..6328cc67212de074cc002511bc41612c3f820554 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/NoPostProcessing/NoPostProcessing.H @@ -0,0 +1,109 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +Class + Foam::NoPostProcessing + +Description + Place holder for 'none' option + +SourceFiles + NoPostProcessing.C + +\*---------------------------------------------------------------------------*/ + +#ifndef NoPostProcessing_H +#define NoPostProcessing_H + +#include "PostProcessingModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class NoPostProcessing Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class NoPostProcessing +: + public PostProcessingModel<CloudType> +{ +protected: + + // Protected member functions + + //- Write post-processing info + void write(); + + +public: + + //- Runtime type information + TypeName("none"); + + + // Constructors + + //- Construct from components + NoPostProcessing(const dictionary&, CloudType&); + + + //- Destructor + virtual ~NoPostProcessing(); + + + // Member Functions + + // Evaluation + + //- Flag to indicate whether model activates post-processing model + virtual bool active() const; + + //- Gather post-processing info on patch + virtual void postPatch + ( + const typename CloudType::parcelType& p, + const label patchI + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "NoPostProcessing.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.C b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.C new file mode 100644 index 0000000000000000000000000000000000000000..8bd67c31daf6211257ef6bdc90440139f8c14e20 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.C @@ -0,0 +1,143 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "PatchPostProcessing.H" +#include "IOPtrList.H" + +// * * * * * * * * * * * * * protected Member Functions * * * * * * * * * * // + +template<class CloudType> +void Foam::PatchPostProcessing<CloudType>::write() +{ + forAll(patchData_, patchI) + { + IOPtrList<parcelType> postObject + ( + IOobject + ( + patchNames_[patchI] + ".post", + this->owner().time().timeName(), + "postProcessing", + this->owner(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + patchData_[patchI].size() + ); + + forAll(postObject, ptrI) + { + postObject.set(ptrI, patchData_[patchI][ptrI].ptr()); + } + + postObject.note() = parcelType::propHeader; + + postObject.writeObject + ( + IOstream::ASCII, + IOstream::currentVersion, + mesh_.time().writeCompression() + ); + + patchData_[patchI].clearStorage(); + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::PatchPostProcessing<CloudType>::PatchPostProcessing +( + const dictionary& dict, + CloudType& owner +) +: + PostProcessingModel<CloudType>(dict, owner, typeName), + mesh_(owner.mesh()), + patchNames_(this->coeffDict().lookup("patches")), + patchData_(patchNames_.size()), + globalToLocalPatchIds_(patchNames_.size()) +{ + labelList localToGlobal(patchNames_.size()); + forAll(patchNames_, patchI) + { + label id = mesh_.boundaryMesh().findPatchID(patchNames_[patchI]); + if (id < 0) + { + FatalErrorIn + ( + "PatchPostProcessing<CloudType>::PatchPostProcessing" + "(" + "const dictionary&, " + "CloudType& owner" + ")" + )<< "Requested patch " << patchNames_[patchI] << " not found" << nl + << "Available patches are: " << mesh_.boundaryMesh().names() << nl + << exit(FatalError); + } + localToGlobal[patchI] = id; + } + + forAll(localToGlobal, patchI) + { + globalToLocalPatchIds_[localToGlobal[patchI]] = patchI; + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::PatchPostProcessing<CloudType>::~PatchPostProcessing() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +bool Foam::PatchPostProcessing<CloudType>::active() const +{ + return true; +} + + +template<class CloudType> +void Foam::PatchPostProcessing<CloudType>::postPatch +( + const parcelType& p, + const label patchI +) +{ + label localPatchI = globalToLocalPatchIds_[patchI]; + if (patchData_[localPatchI].size() < maxStoredParcels_) + { + patchData_[localPatchI].append(p.clone()); + } +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.H b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.H new file mode 100644 index 0000000000000000000000000000000000000000..78c5e205082338ba9cb5166f93904eaa5ab08bcf --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.H @@ -0,0 +1,148 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +Class + Foam::PatchPostProcessing + +Description + Standard post-processing + +SourceFiles + PatchPostProcessing.C + +\*---------------------------------------------------------------------------*/ + +#ifndef PatchPostProcessing_H +#define PatchPostProcessing_H + +#include "PostProcessingModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class PatchPostProcessing Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class PatchPostProcessing +: + public PostProcessingModel<CloudType> +{ + // Private data + + typedef typename CloudType::parcelType parcelType; + + //- Reference to the mesh + const polyMesh& mesh_; + + //- Maximum number of parcels to store per patch + label maxStoredParcels_; + + //- List of patch names + wordList patchNames_; + + //- List of parcel data per patch + List<DynamicList<autoPtr<parcelType> > > patchData_; + + //- Mapping from global to local patch ids + labelList globalToLocalPatchIds_; + + +protected: + + // Protected member functions + + //- Write post-processing info + void write(); + + +public: + + //- Runtime type information + TypeName("PatchPostProcessing"); + + + // Constructors + + //- Construct from dictionary + PatchPostProcessing(const dictionary& dict, CloudType& owner); + + + //- Destructor + virtual ~PatchPostProcessing(); + + + // Member Functions + + // Access + + //- Return const access to the mesh + inline const polyMesh& mesh() const; + + //- Return maximum number of parcels to store per patch + inline label maxStoredParcels() const; + + //- Return const access to the list of patch names + inline const wordList& patchNames() const; + + //- Return const mapping from global to local patch ids + inline const labelList& globalToLocalPatchIds() const; + + + // Evaluation + + //- Flag to indicate whether model activates post-processing model + virtual bool active() const; + + //- Gather post-processing info on patch + virtual void postPatch + ( + const parcelType& p, + const label patchI + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "PatchPostProcessingI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "PatchPostProcessing.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessingI.H b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessingI.H new file mode 100644 index 0000000000000000000000000000000000000000..3ecdf058e82da9e18a7c1c7b2221b4e7da5ea459 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessingI.H @@ -0,0 +1,56 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +const Foam::polyMesh& Foam::PatchPostProcessing<CloudType>::mesh() const +{ + return mesh_; +} + + +template<class CloudType> +Foam::label Foam::PatchPostProcessing<CloudType>::maxStoredParcels() const +{ + return maxStoredParcels_; +} + + +template<class CloudType> +const Foam::wordList& Foam::PatchPostProcessing<CloudType>::patchNames() const +{ + return patchNames_; +} + + +template<class CloudType> +const Foam::labelList& +Foam::PatchPostProcessing<CloudType>::globalToLocalPatchIds() const +{ + return globalToLocalPatchIds_; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/NewPostProcessingModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/NewPostProcessingModel.C new file mode 100644 index 0000000000000000000000000000000000000000..29c096b67769cefbb1626097d6f6c16b38f6ff22 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/NewPostProcessingModel.C @@ -0,0 +1,66 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "PostProcessingModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::autoPtr<Foam::PostProcessingModel<CloudType> > +Foam::PostProcessingModel<CloudType>::New +( + const dictionary& dict, + CloudType& owner +) +{ + word PostProcessingModelType(dict.lookup("PostProcessingModel")); + + Info<< "Selecting PostProcessingModel " << PostProcessingModelType << endl; + + typename dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(PostProcessingModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "PostProcessingModel<CloudType>::New" + "(" + "const dictionary&, " + "CloudType&" + ")" + ) << "Unknown PostProcessingModelType type " + << PostProcessingModelType + << ", constructor not in hash table" << nl << nl + << " Valid PostProcessingModel types are:" << nl + << dictionaryConstructorTablePtr_->toc() << exit(FatalError); + } + + return autoPtr<PostProcessingModel<CloudType> >(cstrIter()(dict, owner)); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.C new file mode 100644 index 0000000000000000000000000000000000000000..15d429493fee8c1be0678948a7502a8216f340ea --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.C @@ -0,0 +1,77 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "PostProcessingModel.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::PostProcessingModel<CloudType>::PostProcessingModel(CloudType& owner) +: + dict_(dictionary::null), + owner_(owner), + coeffDict_(dictionary::null) +{} + + +template<class CloudType> +Foam::PostProcessingModel<CloudType>::PostProcessingModel +( + const dictionary& dict, + CloudType& owner, + const word& type +) +: + dict_(dict), + owner_(owner), + coeffDict_(dict.subDict(type + "Coeffs")) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::PostProcessingModel<CloudType>::~PostProcessingModel() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +void Foam::PostProcessingModel<CloudType>::post() +{ + if (owner_.time().outputTime()) + { + this->write(); + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "NewPostProcessingModel.C" + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.H b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.H new file mode 100644 index 0000000000000000000000000000000000000000..311169aa3aa472f0659b86c1e4ed7ab9cc80e433 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.H @@ -0,0 +1,209 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +Class + Foam::PostProcessingModel + +Description + Templated post-processing model class + +SourceFiles + PostProcessingModel.C + NewPostProcessingModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef PostProcessingModel_H +#define PostProcessingModel_H + +#include "IOdictionary.H" +#include "autoPtr.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class PostProcessingModel Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class PostProcessingModel +{ + // Private data + + //- The cloud dictionary + const dictionary& dict_; + + //- Reference to the owner cloud class + CloudType& owner_; + + //- The coefficients dictionary + const dictionary coeffDict_; + + +protected: + + // Protected member functions + + //- Write post-processing info + virtual void write() = 0; + + +public: + + //- Runtime type information + TypeName("PostProcessingModel"); + + //- Declare runtime constructor selection table + declareRunTimeSelectionTable + ( + autoPtr, + PostProcessingModel, + dictionary, + ( + const dictionary& dict, + CloudType& owner + ), + (dict, owner) + ); + + + // Constructors + + //- Construct null from owner + PostProcessingModel(CloudType& owner); + + //- Construct from dictionary + PostProcessingModel + ( + const dictionary& dict, + CloudType& owner, + const word& type + ); + + + //- Destructor + virtual ~PostProcessingModel(); + + + //- Selector + static autoPtr<PostProcessingModel<CloudType> > New + ( + const dictionary& dict, + CloudType& owner + ); + + + // Member Functions + + // Access + + //- Return the owner cloud dictionary + inline const dictionary& dict() const; + + //- Return const access the owner cloud object + inline const CloudType& owner() const; + + //- Return non-const access the owner cloud object for manipulation + inline CloudType& owner(); + + //- Return the coefficients dictionary + inline const dictionary& coeffDict() const; + + + // Evaluation + + //- Main post-processing function + virtual void post(); + + //- Flag to indicate whether model activates post-processing model + virtual bool active() const = 0; + + //- Gather post-processing info on patch + virtual void postPatch + ( + const typename CloudType::parcelType& p, + const label patchI + ) = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makePostProcessingModel(CloudType) \ + \ + defineNamedTemplateTypeNameAndDebug(PostProcessingModel<CloudType>, 0); \ + \ + defineTemplateRunTimeSelectionTable \ + ( \ + PostProcessingModel<CloudType>, \ + dictionary \ + ); + + +#define makePostProcessingModelType(SS, CloudType, ParcelType) \ + \ + defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \ + \ + PostProcessingModel<CloudType<ParcelType> >:: \ + adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \ + add##SS##CloudType##ParcelType##ConstructorToTable_; + + +#define makePostProcessingModelThermoType(SS, CloudType, ParcelType, ThermoType)\ + \ + defineNamedTemplateTypeNameAndDebug \ + ( \ + SS<CloudType<ParcelType<ThermoType> > >, \ + 0 \ + ); \ + \ + PostProcessingModel<CloudType<ParcelType<ThermoType> > >:: \ + adddictionaryConstructorToTable \ + <SS<CloudType<ParcelType<ThermoType> > > > \ + add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "PostProcessingModelI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "PostProcessingModel.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelI.H b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelI.H new file mode 100644 index 0000000000000000000000000000000000000000..0a95224da503f494be1c5de411eb787381a4da92 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelI.H @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +const Foam::dictionary& Foam::PostProcessingModel<CloudType>::dict() const +{ + return dict_; +} + + +template<class CloudType> +const CloudType& Foam::PostProcessingModel<CloudType>::owner() const +{ + return owner_; +} + + +template<class CloudType> +CloudType& Foam::PostProcessingModel<CloudType>::owner() +{ + return owner_; +} + + +template<class CloudType> +const Foam::dictionary& Foam::PostProcessingModel<CloudType>::coeffDict() const +{ + return coeffDict_; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C index 4336b72baa3b282e33914f0533e0b9f3fb4f2ab0..4154dcf06c40b0eca5212abaa797a095f776b559 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -64,7 +64,7 @@ Foam::CompositionModel<CloudType>::CompositionModel phaseProps_ ( coeffDict_.lookup("phases"), - carrierThermo_.composition().Y(), + carrierThermo_.composition().species(), liquids_().components(), solids_().components() ) @@ -110,7 +110,7 @@ Foam::CompositionModel<CloudType>::carrierThermo() const template<class CloudType> -const Foam::PtrList<Foam::specieReactingProperties>& +const Foam::PtrList<typename CloudType::thermoType>& Foam::CompositionModel<CloudType>::carrierSpecies() const { return carrierSpecies_; @@ -184,9 +184,9 @@ Foam::label Foam::CompositionModel<CloudType>::globalCarrierId const word& cmptName ) const { - forAll(carrierThermo_.composition().Y(), i) + forAll(carrierThermo_.composition().species(), i) { - word carrierSpecieName = carrierThermo_.composition().Y()[i].name(); + word carrierSpecieName = carrierThermo_.composition().species()[i]; if (cmptName == carrierSpecieName) { return i; diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H index 8fb8762cf02c970feb4db9dceb8ca9e6b8050af9..1e0b800b45709680d18fc421aba7f9b5805e02df 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -78,7 +78,7 @@ class CompositionModel hCombustionThermo& carrierThermo_; //- Reference to the carrier phase species - const PtrList<specieReactingProperties>& carrierSpecies_; + const PtrList<typename CloudType::thermoType>& carrierSpecies_; //- Global (additional) liquid properties data autoPtr<liquidMixture> liquids_; @@ -152,7 +152,8 @@ public: // Composition lists //- Return the carrier species - const PtrList<specieReactingProperties>& carrierSpecies() const; + const PtrList<typename CloudType::thermoType>& + carrierSpecies() const; //- Return the global (additional) liquids const liquidMixture& liquids() const; @@ -281,13 +282,18 @@ public: ); -#define makeCompositionModelType(SS, CloudType, ParcelType) \ +#define makeCompositionModelThermoType(SS, CloudType, ParcelType, ThermoType) \ \ - defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \ + defineNamedTemplateTypeNameAndDebug \ + ( \ + SS<CloudType<ParcelType<ThermoType> > >, \ + 0 \ + ); \ \ - CompositionModel<CloudType<ParcelType> >:: \ - adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \ - add##SS##CloudType##ParcelType##ConstructorToTable_; + CompositionModel<CloudType<ParcelType<ThermoType> > >:: \ + adddictionaryConstructorToTable \ + <SS<CloudType<ParcelType<ThermoType> > > > \ + add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/NewCompositionModel.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/NewCompositionModel.C index 4a9f8d7b745db2ab56a30ee3d5f38b2d424134c6..81d338176c1566f32a42aa47b41d78a4ea4b317c 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/NewCompositionModel.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/NewCompositionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.C index fb00ddc76330fe00b7d730ef300052111120e7f1..64240eab73ef0ec1e2fb75fd1126eed020d7cdba 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.H b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.H index c2b7198a2581da1483d2e7a3c3ea408866b1c0fb..3555f616f7433c90b261d0403f3f2656ff1582c4 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.H +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.C index a2ae2053d1ff055d17a41f8e996f9af4007020ae..5be1ce0a495cb03f09176330c3f3ae4b03ef0466 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.H b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.H index 91a727587dc7fe57fa1f4de3ff8852ea42a70f62..f7fda36a90829efd6e821d9b5638f28c7add25b4 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.H +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -141,13 +141,13 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#ifdef NoRepository -# include "SinglePhaseMixture.C" -#endif +} // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam +#ifdef NoRepository +# include "SinglePhaseMixture.C" +#endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.C b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.C new file mode 100644 index 0000000000000000000000000000000000000000..2de0366b31230928c3cec60622aee9f8cf1b6699 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.C @@ -0,0 +1,270 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "ReactingLookupTableInjection.H" +#include "scalarIOList.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template<class CloudType> +Foam::label Foam::ReactingLookupTableInjection<CloudType>::INPUT_FILE_COLS = 12; + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +template<class CloudType> +Foam::label Foam::ReactingLookupTableInjection<CloudType>::parcelsToInject +( + const scalar time0, + const scalar time1 +) const +{ + if ((time0 >= 0.0) && (time0 < duration_)) + { + return round(injectorCells_.size()*(time1 - time0)*nParcelsPerSecond_); + } + else + { + return 0; + } +} + + +template<class CloudType> +Foam::scalar Foam::ReactingLookupTableInjection<CloudType>::volumeToInject +( + const scalar time0, + const scalar time1 +) const +{ + scalar volume = 0.0; + if ((time0 >= 0.0) && (time0 < duration_)) + { + forAll(mDot_, injectorI) + { + volume += mDot_[injectorI]/rho_[injectorI]*(time1 - time0); + } + } + + return volume; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::ReactingLookupTableInjection<CloudType>::ReactingLookupTableInjection +( + const dictionary& dict, + CloudType& owner +) +: + InjectionModel<CloudType>(dict, owner, typeName), + inputFileName_(this->coeffDict().lookup("inputFile")), + duration_(readScalar(this->coeffDict().lookup("duration"))), + nParcelsPerSecond_ + ( + readScalar(this->coeffDict().lookup("parcelsPerSecond")) + ), + x_(0), + U_(0), + d_(0), + rho_(0), + mDot_(0), + T_(0), + cp_(0), + Y_(0), + injectorCells_(0) +{ + scalarListIOList injectorData + ( + IOobject + ( + inputFileName_, + owner.db().time().constant(), + owner.db(), + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + x_.setSize(injectorData.size()); + U_.setSize(injectorData.size()); + d_.setSize(injectorData.size()); + rho_.setSize(injectorData.size()); + mDot_.setSize(injectorData.size()); + T_.setSize(injectorData.size()); + cp_.setSize(injectorData.size()); + Y_.setSize(injectorData.size()); + + // Populate lists + forAll(injectorData, injectorI) + { + if (injectorData[injectorI].size() != INPUT_FILE_COLS) + { + FatalErrorIn + ( + "ReactingLookupTableInjection" + "(" + "const dictionary&," + "CloudType& owner" + ")" + ) << "Incorrect number of entries in injector specification " + << "- found " << injectorData[injectorI].size() + << ", expected a minimum of " << INPUT_FILE_COLS << ":" << nl + << " x0 x1 x2 u0 u1 u2 d rho mDot T cp Y0..YN" + << nl << exit(FatalError); + } + x_[injectorI].component(0) = injectorData[injectorI][0]; + x_[injectorI].component(1) = injectorData[injectorI][1]; + x_[injectorI].component(2) = injectorData[injectorI][2]; + U_[injectorI].component(0) = injectorData[injectorI][3]; + U_[injectorI].component(1) = injectorData[injectorI][4]; + U_[injectorI].component(2) = injectorData[injectorI][5]; + d_[injectorI] = injectorData[injectorI][6]; + rho_[injectorI] = injectorData[injectorI][7]; + mDot_[injectorI] = injectorData[injectorI][8]; + T_[injectorI] = injectorData[injectorI][9]; + cp_[injectorI] = injectorData[injectorI][10]; + + Y_[injectorI].setSize + ( + injectorData[injectorI].size() - INPUT_FILE_COLS + 1 + ); + label Yi = 0; + for + ( + label i = INPUT_FILE_COLS-1; + i < injectorData[injectorI].size(); + i++ + ) + { + Y_[injectorI][Yi++] = injectorData[injectorI][i]; + } + } + + // Set/cache the injector cells + injectorCells_.setSize(injectorData.size()); + forAll(x_, injectorI) + { + this->findCellAtPosition(injectorCells_[injectorI], x_[injectorI]); + } + + // Determine volume of particles to inject + this->volumeTotal_ = 0.0; + forAll(mDot_, injectorI) + { + this->volumeTotal_ += mDot_[injectorI]/rho_[injectorI]; + } + this->volumeTotal_ *= duration_; +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::ReactingLookupTableInjection<CloudType>::~ReactingLookupTableInjection() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +bool Foam::ReactingLookupTableInjection<CloudType>::active() const +{ + return true; +} + + +template<class CloudType> +Foam::scalar Foam::ReactingLookupTableInjection<CloudType>::timeEnd() const +{ + return this->SOI_ + duration_; +} + + +template<class CloudType> +void Foam::ReactingLookupTableInjection<CloudType>::setPositionAndCell +( + const label parcelI, + const label nParcels, + const scalar time, + vector& position, + label& cellOwner +) +{ + label injectorI = parcelI*injectorCells_.size()/nParcels; + + position = x_[injectorI]; + cellOwner = injectorCells_[injectorI]; +} + + +template<class CloudType> +void Foam::ReactingLookupTableInjection<CloudType>::setProperties +( + const label parcelI, + const label nParcels, + const scalar, + typename CloudType::parcelType& parcel +) +{ + label injectorI = parcelI*injectorCells_.size()/nParcels; + + // set particle velocity + parcel.U() = U_[injectorI]; + + // set particle diameter + parcel.d() = d_[injectorI]; + + // set particle density + parcel.rho() = rho_[injectorI]; + + // set particle temperature + parcel.T() = T_[injectorI]; + + // set particle specific heat capacity + parcel.cp() = cp_[injectorI]; + + // set particle component mass fractions + parcel.Y() = Y_[injectorI]; +} + + +template<class CloudType> +bool Foam::ReactingLookupTableInjection<CloudType>::fullyDescribed() const +{ + return true; +} + + +template<class CloudType> +bool Foam::ReactingLookupTableInjection<CloudType>::validInjection(const label) +{ + return true; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.H b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.H new file mode 100644 index 0000000000000000000000000000000000000000..3ca571ee1e626957a6ce2d4895c381522c7d0e7c --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.H @@ -0,0 +1,204 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +Class + Foam::ReactingLookupTableInjection + +Description + Particle injection sources read from look-up table. Each row corresponds to + an injection site. + + ( + (x y z u v w d rho mDot T cp Y0..YN) + ); + + where: + x, y, z = global cartesian co-ordinates [m] + u, v, w = global cartesian velocity components [m/s] + d = diameter [m] + rho = density [kg/m3] + mDot = mass flow rate [kg/m3] + T = temperature [K] + cp = specific heat capacity [J/kg/K] + +SourceFiles + ReactingLookupTableInjection.C + +\*---------------------------------------------------------------------------*/ + +#ifndef ReactingLookupTableInjection_H +#define ReactingLookupTableInjection_H + +#include "InjectionModel.H" +#include "pdf.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class ReactingLookupTableInjection Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class ReactingLookupTableInjection +: + public InjectionModel<CloudType> +{ + // Private data + + //- Name of file containing injector/parcel data + const word inputFileName_; + + //- Injection duration - common to all injection sources + const scalar duration_; + + //- Number of parcels per injector - common to all injection sources + const label nParcelsPerSecond_; + + //- List of parcel position per injector / [m] + List<point> x_; + + //- List of parcel velocity per injector / [m] + List<vector> U_; + + //- List of parcel diameter per injector / [m] + List<scalar> d_; + + //- List of parcel fluid density pre injector / [kg/m3] + List<scalar> rho_; + + //- List of parcel injection mass flow per injector / [kg/s] + List<scalar> mDot_; + + //- List of parcel temperature flow per injector / [K] + List<scalar> T_; + + //- List of parcel specific heat capacity per injector / [J/kg/K] + List<scalar> cp_; + + //- List of parcel specie mass fractions per injector / [] + List<scalarList> Y_; + + //- List of injector cells per injector + List<label> injectorCells_; + + //- Number of columns expected in input file + static label INPUT_FILE_COLS; + + +protected: + + // Protected member functions + + //- Number of parcels to introduce over the time step relative to SOI + label parcelsToInject + ( + const scalar time0, + const scalar time1 + ) const; + + //- Volume of parcels to introduce over the time step relative to SOI + scalar volumeToInject + ( + const scalar time0, + const scalar time1 + ) const; + + +public: + + //- Runtime type information + TypeName("ReactingLookupTableInjection"); + + + // Constructors + + //- Construct from dictionary + ReactingLookupTableInjection + ( + const dictionary& dict, + CloudType& owner + ); + + + //- Destructor + virtual ~ReactingLookupTableInjection(); + + + // Member Functions + + //- Flag to indicate whether model activates injection model + bool active() const; + + //- Return the end-of-injection time + scalar timeEnd() const; + + + // Injection geometry + + //- Set the injection position and owner cell + virtual void setPositionAndCell + ( + const label parcelI, + const label nParcels, + const scalar time, + vector& position, + label& cellOwner + ); + + //- Set the parcel properties + virtual void setProperties + ( + const label parcelI, + const label nParcels, + const scalar time, + typename CloudType::parcelType& parcel + ); + + //- Flag to identify whether model fully describes the parcel + virtual bool fullyDescribed() const; + + //- Return flag to identify whether or not injection in cellI is + // permitted + virtual bool validInjection(const label parcelI); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "ReactingLookupTableInjection.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C index d0afb84cb0f2ce89ea90b266cd2eb7872e739a95..b7caef3652d1f71f8b2406c6f4100adb5bd1f905 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C @@ -153,8 +153,8 @@ void Foam::LiquidEvaporation<CloudType>::calculate // Reynolds number scalar Re = mag(Ur)*d/(nuc + ROOTVSMALL); - // film temperature evaluated using the 1/3 rule - scalar Tf = (2.0*T + Tc)/3.0; + // film temperature evaluated using the particle temperature + scalar Tf = T; // calculate mass transfer of each specie in liquid forAll(activeLiquids_, i) @@ -168,7 +168,7 @@ void Foam::LiquidEvaporation<CloudType>::calculate // saturation pressure for species i [pa] // - carrier phase pressure assumed equal to the liquid vapour pressure // close to the surface - scalar pSat = liquids_->properties()[lid].pv(pc, Tf); + scalar pSat = min(liquids_->properties()[lid].pv(pc, Tf), pc); // Schmidt number scalar Sc = nuc/(Dab + ROOTVSMALL); @@ -179,13 +179,13 @@ void Foam::LiquidEvaporation<CloudType>::calculate // mass transfer coefficient [m/s] scalar kc = Sh*Dab/(d + ROOTVSMALL); - // vapour concentration at droplet surface [kgmol/m3] + // vapour concentration at droplet surface [kmol/m3] scalar Cs = pSat/(specie::RR*Tf); - // vapour concentration in bulk gas [kgmol/m3] + // vapour concentration in bulk gas [kmol/m3] scalar Cinf = Xc[gid]*pc/(specie::RR*Tc); - // molar flux of vapour [kgmol/m2/s] + // molar flux of vapour [kmol/m2/s] scalar Ni = max(kc*(Cs - Cinf), 0.0); // mass transfer [kg] diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H index 9c650f1c2efa4ac1b2e3c60dc8ab47b907b43a57..7e569736cab10d9dbb4dac3f464f9a5abbf2a22d 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H @@ -72,7 +72,7 @@ protected: //- Sherwood number as a function of Reynolds and Schmidt numbers scalar Sh(const scalar Re, const scalar Sc) const; - //- Calculate the carrier phase comonent volume fractions at cellI + //- Calculate the carrier phase component volume fractions at cellI scalarField calcXc(const label cellI) const; @@ -99,10 +99,10 @@ public: // Member Functions //- Flag to indicate whether model activates phase change model - bool active() const; + virtual bool active() const; //- Update model - void calculate + virtual void calculate ( const scalar dt, const label cellI, diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H index 6419f127ff71a29851b8d33286f493c0eb8448a2..007fa73344ff48732e4dd396c97b8bb131c8e53c 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H @@ -67,10 +67,10 @@ public: // Member Functions //- Flag to indicate whether model activates phase change model - bool active() const; + virtual bool active() const; //- Update model - void calculate + virtual void calculate ( const scalar dt, const label cellI, diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H index b8ebc644b01a88e5cb447417d2bb6fcf6f2189e7..2e0f03a3f52510fb46a661246636c0cad340bbc8 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H @@ -168,13 +168,18 @@ public: ); -#define makePhaseChangeModelType(SS, CloudType, ParcelType) \ +#define makePhaseChangeModelThermoType(SS, CloudType, ParcelType, ThermoType) \ \ - defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \ + defineNamedTemplateTypeNameAndDebug \ + ( \ + SS<CloudType<ParcelType<ThermoType> > >, \ + 0 \ + ); \ \ - PhaseChangeModel<CloudType<ParcelType> >:: \ - adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \ - add##SS##CloudType##ParcelType##ConstructorToTable_; + PhaseChangeModel<CloudType<ParcelType<ThermoType> > >:: \ + adddictionaryConstructorToTable \ + <SS<CloudType<ParcelType<ThermoType> > > > \ + add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.C index 77cea7e00b0e5d5ec678057c12702f647a6e0225..d8d522ff90b4909cbab192757e19ae553637d187 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.H index a026bae9a9461e4ebb116efc57f11d6c2369cf3e..b787a9b28254a4c8c09972040a276ace88e47975 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -85,10 +85,10 @@ public: // Member Functions //- Flag to indicate whether model activates devolatilisation model - bool active() const; + virtual bool active() const; //- Update model - scalar calculate + virtual scalar calculate ( const scalar dt, const scalar mass0, diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.C index 6a3d3efeb2363fc23743977e7e42ebfa7bd13e0d..4239eb19958f8c70326f6aba9a7eea4fe23181ae 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H index bb4e7ddc637f9212e466f011136e66667c73e55e..b7edc60275d7b403049c66a4a1157c3c01f71167 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -160,13 +160,18 @@ public: ); -#define makeDevolatilisationModelType(SS, CloudType, ParcelType) \ +#define makeDevolatilisationModelThermoType(SS, CloudType, ParcelType, ThermoType)\ \ - defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \ + defineNamedTemplateTypeNameAndDebug \ + ( \ + SS<CloudType<ParcelType<ThermoType> > >, \ + 0 \ + ); \ \ - DevolatilisationModel<CloudType<ParcelType> >:: \ - adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \ - add##SS##CloudType##ParcelType##ConstructorToTable_; + DevolatilisationModel<CloudType<ParcelType<ThermoType> > >:: \ + adddictionaryConstructorToTable \ + <SS<CloudType<ParcelType<ThermoType> > > > \ + add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/NewDevolatilisationModel.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/NewDevolatilisationModel.C index 838bdf75e21f5e95fae32cb211cb56745da842d1..cac0375b2816f94748edd2a0f12944a38483a51e 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/NewDevolatilisationModel.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/NewDevolatilisationModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/NoDevolatilisation/NoDevolatilisation.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/NoDevolatilisation/NoDevolatilisation.C index c0431a61f3b2faf4f9f66dbb70ae4c029d2e3760..0961826a23c089aea4dd03fe2d22f652f851cf35 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/NoDevolatilisation/NoDevolatilisation.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/NoDevolatilisation/NoDevolatilisation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/NoDevolatilisation/NoDevolatilisation.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/NoDevolatilisation/NoDevolatilisation.H index 4dbea82607a2a9fcbacc7fa84f515789cafb79dd..687978a0a2a20af61a28e4b94fce803d669ad6f6 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/NoDevolatilisation/NoDevolatilisation.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/NoDevolatilisation/NoDevolatilisation.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -68,10 +68,10 @@ public: // Member Functions //- Flag to indicate whether model activates devolatilisation model - bool active() const; + virtual bool active() const; //- Update model - scalar calculate + virtual scalar calculate ( const scalar, const scalar, diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C index 2d09c134a974fe160a4c342cb18f8d0cfd5e2658..6f95dd54f9482924d3d355771a0ab00172f55c9c 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H index 91bd5f06122208d02b266798f4c262eb9a101cf4..48fec17b833019497d909c42bfebdc0e2e7f5838 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -87,10 +87,10 @@ public: // Member Functions //- Flag to indicate whether model activates devolatilisation model - bool active() const; + virtual bool active() const; //- Update model - scalar calculate + virtual scalar calculate ( const scalar dt, const scalar mass0, diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H index 2deacb3465f3bb6cfe985aa0a516523c82a42b59..f876563fec613eadc020828d1ab89e9cea0bcaf9 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H @@ -60,7 +60,7 @@ class SurfaceReactionModel //- The cloud dictionary const dictionary& dict_; - // reference to the owner cloud class + //- Reference to the owner cloud class CloudType& owner_; //- The coefficients dictionary @@ -172,22 +172,18 @@ public: ); -#define makeSurfaceReactionModelType(SS, CloudType, ParcelType) \ +#define makeSurfaceReactionModelThermoType(SS, CloudType, ParcelType, ThermoType)\ \ - defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \ - \ - SurfaceReactionModel<CloudType<ParcelType> >:: \ - adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \ - add##SS##CloudType##ParcelType##ConstructorToTable_; - - -#define makeSurfaceReactionModelTypeInstance(SS, CloudType, ParcelType) \ - \ - defineNamedTemplateTypeNameAndDebug(SS, 0); \ + defineNamedTemplateTypeNameAndDebug \ + ( \ + SS<CloudType<ParcelType<ThermoType> > >, \ + 0 \ + ); \ \ - SurfaceReactionModel<CloudType<ParcelType> >:: \ - adddictionaryConstructorToTable<SS> \ - add##SS##CloudType##ParcelType##ConstructorToTable_; + SurfaceReactionModel<CloudType<ParcelType<ThermoType> > >:: \ + adddictionaryConstructorToTable \ + <SS<CloudType<ParcelType<ThermoType> > > > \ + add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H index 1924be16c9bef032cbdd6b9d30eed5d894752ab1..baf61f2395e973377c975c5f21b4c8f5c6b313fd 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H @@ -61,7 +61,7 @@ class HeatTransferModel //- Reference to the owner cloud class CloudType& owner_; - //- The coefficents dictionary + //- The coefficients dictionary const dictionary coeffDict_; @@ -138,7 +138,7 @@ public: virtual scalar Pr() const = 0; //- Return heat transfer coefficient - scalar h + virtual scalar h ( const scalar dp, const vector& Ur, @@ -150,7 +150,7 @@ public: ) const; //- Return linearised coefficient for temperature equation - scalar Cu + virtual scalar Cu ( const scalar dp, const vector& Ur, @@ -189,6 +189,20 @@ public: add##SS##CloudType##ParcelType##ConstructorToTable_; +#define makeHeatTransferModelThermoType(SS, CloudType, ParcelType, ThermoType)\ + \ + defineNamedTemplateTypeNameAndDebug \ + ( \ + SS<CloudType<ParcelType<ThermoType> > >, \ + 0 \ + ); \ + \ + HeatTransferModel<CloudType<ParcelType<ThermoType> > >:: \ + adddictionaryConstructorToTable \ + <SS<CloudType<ParcelType<ThermoType> > > > \ + add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H index f03b4b3dc5fb1fc5ea169d1ef1f354e5156c0256..2941b4c2b7b9f6eb08515dff5e39c669fcc333a7 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H @@ -67,17 +67,17 @@ public: // Member Functions //- Flag to indicate whether model activates heat transfer model - bool active() const; + virtual bool active() const; //- Nusselt number - scalar Nu + virtual scalar Nu ( const scalar, const scalar ) const; //- Prandtl number - scalar Pr() const; + virtual scalar Pr() const; }; diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.C index b728282001a0dc7a3f9a8b454fe052fae6d9336f..8e9b6e9379e1dacf996c00baed606fcf1f092bc2 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.C @@ -24,8 +24,6 @@ License \*---------------------------------------------------------------------------*/ -#include "error.H" - #include "RanzMarshall.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H index 38d5e040aed7c47013bbcdc5a5d2615fcf12b481..f010160c1feb51aef1ec100b5fd4ae04692dc95c 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H @@ -77,17 +77,17 @@ public: // Member Functions //- Flag to indicate whether model activates heat transfer model - bool active() const; + virtual bool active() const; //- Nusselt number - scalar Nu + virtual scalar Nu ( const scalar Re, const scalar Pr ) const; //- Prandtl number - scalar Pr() const; + virtual scalar Pr() const; }; diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.C b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.C new file mode 100644 index 0000000000000000000000000000000000000000..ad7e13b6d20417d9364345d3da04628588241777 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.C @@ -0,0 +1,250 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 "ThermoLookupTableInjection.H" +#include "scalarIOList.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template<class CloudType> +Foam::label Foam::ThermoLookupTableInjection<CloudType>::INPUT_FILE_COLS = 11; + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +template<class CloudType> +Foam::label Foam::ThermoLookupTableInjection<CloudType>::parcelsToInject +( + const scalar time0, + const scalar time1 +) const +{ + if ((time0 >= 0.0) && (time0 < duration_)) + { + return round(injectorCells_.size()*(time1 - time0)*nParcelsPerSecond_); + } + else + { + return 0; + } +} + + +template<class CloudType> +Foam::scalar Foam::ThermoLookupTableInjection<CloudType>::volumeToInject +( + const scalar time0, + const scalar time1 +) const +{ + scalar volume = 0.0; + if ((time0 >= 0.0) && (time0 < duration_)) + { + forAll(mDot_, injectorI) + { + volume += mDot_[injectorI]/rho_[injectorI]*(time1 - time0); + } + } + + return volume; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::ThermoLookupTableInjection<CloudType>::ThermoLookupTableInjection +( + const dictionary& dict, + CloudType& owner +) +: + InjectionModel<CloudType>(dict, owner, typeName), + inputFileName_(this->coeffDict().lookup("inputFile")), + duration_(readScalar(this->coeffDict().lookup("duration"))), + nParcelsPerSecond_ + ( + readScalar(this->coeffDict().lookup("parcelsPerSecond")) + ), + x_(0), + U_(0), + d_(0), + rho_(0), + mDot_(0), + T_(0), + cp_(0), + injectorCells_(0) +{ + scalarListIOList injectorData + ( + IOobject + ( + inputFileName_, + owner.db().time().constant(), + owner.db(), + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + x_.setSize(injectorData.size()); + U_.setSize(injectorData.size()); + d_.setSize(injectorData.size()); + rho_.setSize(injectorData.size()); + mDot_.setSize(injectorData.size()); + T_.setSize(injectorData.size()); + cp_.setSize(injectorData.size()); + + // Populate lists + forAll(injectorData, injectorI) + { + if (injectorData[injectorI].size() != INPUT_FILE_COLS) + { + FatalErrorIn + ( + "ThermoLookupTableInjection" + "(" + "const dictionary&," + "CloudType& owner" + ")" + ) << "Incorrect number of entries in injector specification " + << "- found " << injectorData[injectorI].size() + << ", expected " << INPUT_FILE_COLS << ":" << nl + << " x0 x1 x2 u0 u1 u2 d rho mDot T cp" + << nl << exit(FatalError); + } + x_[injectorI].component(0) = injectorData[injectorI][0]; + x_[injectorI].component(1) = injectorData[injectorI][1]; + x_[injectorI].component(2) = injectorData[injectorI][2]; + U_[injectorI].component(0) = injectorData[injectorI][3]; + U_[injectorI].component(1) = injectorData[injectorI][4]; + U_[injectorI].component(2) = injectorData[injectorI][5]; + d_[injectorI] = injectorData[injectorI][6]; + rho_[injectorI] = injectorData[injectorI][7]; + mDot_[injectorI] = injectorData[injectorI][8]; + T_[injectorI] = injectorData[injectorI][9]; + cp_[injectorI] = injectorData[injectorI][10]; + } + + // Set/cache the injector cells + injectorCells_.setSize(injectorData.size()); + forAll(x_, injectorI) + { + this->findCellAtPosition(injectorCells_[injectorI], x_[injectorI]); + } + + // Determine volume of particles to inject + this->volumeTotal_ = 0.0; + forAll(mDot_, injectorI) + { + this->volumeTotal_ += mDot_[injectorI]/rho_[injectorI]; + } + this->volumeTotal_ *= duration_; +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::ThermoLookupTableInjection<CloudType>::~ThermoLookupTableInjection() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +bool Foam::ThermoLookupTableInjection<CloudType>::active() const +{ + return true; +} + + +template<class CloudType> +Foam::scalar Foam::ThermoLookupTableInjection<CloudType>::timeEnd() const +{ + return this->SOI_ + duration_; +} + + +template<class CloudType> +void Foam::ThermoLookupTableInjection<CloudType>::setPositionAndCell +( + const label parcelI, + const label nParcels, + const scalar time, + vector& position, + label& cellOwner +) +{ + label injectorI = parcelI*injectorCells_.size()/nParcels; + + position = x_[injectorI]; + cellOwner = injectorCells_[injectorI]; +} + + +template<class CloudType> +void Foam::ThermoLookupTableInjection<CloudType>::setProperties +( + const label parcelI, + const label nParcels, + const scalar, + typename CloudType::parcelType* pPtr +) +{ + label injectorI = parcelI*injectorCells_.size()/nParcels; + + // set particle velocity + parcel.U() = U_[injectorI]; + + // set particle diameter + parcel.d() = d_[injectorI]; + + // set particle density + parcel.rho() = rho_[injectorI]; + + // set particle temperature + parcel.T() = T_[injectorI]; + + // set particle specific heat capacity + parcel.cp() = cp_[injectorI]; +} + + +template<class CloudType> +bool Foam::ThermoLookupTableInjection<CloudType>::fullyDescribed() const +{ + return true; +} + + +template<class CloudType> +bool Foam::ThermoLookupTableInjection<CloudType>::validInjection(const label) +{ + return true; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.H b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.H new file mode 100644 index 0000000000000000000000000000000000000000..9a5fd2c6a300b013f9867d1be1bfe1be57372890 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.H @@ -0,0 +1,204 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2009 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 + +Class + Foam::ThermoLookupTableInjection + +Description + Particle injection sources read from look-up table. Each row corresponds to + an injection site. + + ( + (x y z u v w d rho mDot T cp) + ); + + where: + x, y, z = global cartesian co-ordinates [m] + u, v, w = global cartesian velocity components [m/s] + d = diameter [m] + rho = density [kg/m3] + mDot = mass flow rate [kg/m3] + T = temperature [K] + cp = specific heat capacity [J/kg/K] + +SourceFiles + ThermoLookupTableInjection.C + +\*---------------------------------------------------------------------------*/ + +#ifndef ThermoLookupTableInjection_H +#define ThermoLookupTableInjection_H + +#include "InjectionModel.H" +#include "pdf.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class ThermoLookupTableInjection Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class ThermoLookupTableInjection +: + public InjectionModel<CloudType> +{ + // Private data + + //- Name of file containing injector/parcel data + const word inputFileName_; + + //- Injection duration - common to all injection sources + const scalar duration_; + + //- Number of parcels per injector - common to all injection sources + const label nParcelsPerSecond_; + + //- List of parcel position per injector / [m] + List<point> x_; + + //- List of parcel velocity per injector / [m] + List<vector> U_; + + //- List of parcel diameter per injector / [m] + List<scalar> d_; + + //- List of parcel fluid density pre injector / [kg/m3] + List<scalar> rho_; + + //- List of parcel injection mass flow per injector / [kg/s] + List<scalar> mDot_; + + //- List of parcel temperature flow per injector / [K] + List<scalar> T_; + + //- List of parcel specific heat capacity per injector / [J/kg/K] + List<scalar> cp_; + + //- List of injector cells per injector + List<label> injectorCells_; + + //- Number of columns expected in input file + static label INPUT_FILE_COLS; + + +protected: + + // Protected member functions + + //- Number of parcels to introduce over the time step relative to SOI + label parcelsToInject + ( + const scalar time0, + const scalar time1 + ) const; + + //- Volume of parcels to introduce over the time step relative to SOI + scalar volumeToInject + ( + const scalar time0, + const scalar time1 + ) const; + + +public: + + //- Runtime type information + TypeName("ThermoLookupTableInjection"); + + + // Constructors + + //- Construct from dictionary + ThermoLookupTableInjection + ( + const dictionary& dict, + CloudType& owner + ); + + + //- Destructor + virtual ~ThermoLookupTableInjection(); + + + // Member Functions + + //- Flag to indicate whether model activates injection model + bool active() const; + + //- Return the end-of-injection time + scalar timeEnd() const; + + + // Injection geometry + + //- Set the injection position and owner cell + virtual void setPositionAndCell + ( + const label parcelI, + const label nParcels, + const scalar time, + vector& position, + label& cellOwner + ); + + //- Set the parcel properties + virtual void setProperties + ( + const label parcelI, + const label nParcels, + const scalar time, + typename CloudType::parcelType& parcel + ); + + //- Flag to identify whether model fully describes the parcel + virtual bool fullyDescribed() const + { + return true; + } + + //- Return flag to identify whether or not injection in cellI is + // permitted + virtual bool validInjection(const label parcelI); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "ThermoLookupTableInjection.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.C b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.C index ac45040c096840c13064609ed9b80de5b6ef4543..bc9c502ffb57f90181a70127c23c67563e4eb8f1 100644 --- a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.C +++ b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.C @@ -241,6 +241,28 @@ void Foam::molecule::setSiteSizes(label size) } +bool Foam::molecule::hitPatch +( + const polyPatch&, + molecule::trackData&, + const label +) +{ + return false; +} + + +bool Foam::molecule::hitPatch +( + const polyPatch&, + int&, + const label +) +{ + return false; +} + + void Foam::molecule::hitProcessorPatch ( const processorPolyPatch&, diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H index 04e33428e99948adae78dbf6645dabc258d42ddd..0ee16f461f00cc2b61c28b694aa290a877448175 100644 --- a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H +++ b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H @@ -256,7 +256,8 @@ public: // Member Functions - //- Tracking + // Tracking + bool move(trackData&); void transformProperties(const tensor& T); @@ -267,6 +268,7 @@ public: void setSiteSizes(label size); + // Access inline const tensor& Q() const; @@ -305,8 +307,27 @@ public: inline label id() const; + // Member Operators + //- Overridable function to handle the particle hitting a patch + // Executed before other patch-hitting functions + bool hitPatch + ( + const polyPatch&, + molecule::trackData& td, + const label patchI + ); + + //- Overridable function to handle the particle hitting a patch + // Executed before other patch-hitting functions without trackData + bool hitPatch + ( + const polyPatch& p, + int& td, + const label patchI + ); + //- Overridable function to handle the particle hitting a processorPatch void hitProcessorPatch ( diff --git a/src/lagrangian/solidParticle/solidParticle.C b/src/lagrangian/solidParticle/solidParticle.C index 7b9fdf18a6444245442508c3dcd2971b558c0671..e77b9cf8a2f94ac4fd8736e217b9b0ebb9de3874 100644 --- a/src/lagrangian/solidParticle/solidParticle.C +++ b/src/lagrangian/solidParticle/solidParticle.C @@ -84,12 +84,9 @@ bool Foam::solidParticle::move(solidParticle::trackData& td) if (onBoundary() && td.keepParticle) { - if (face() > -1) + if (isType<processorPolyPatch>(pbMesh[patch(face())])) { - if (isType<processorPolyPatch>(pbMesh[patch(face())])) - { - td.switchProcessor = true; - } + td.switchProcessor = true; } } } @@ -98,6 +95,28 @@ bool Foam::solidParticle::move(solidParticle::trackData& td) } +bool Foam::solidParticle::hitPatch +( + const polyPatch&, + solidParticle::trackData&, + const label +) +{ + return false; +} + + +bool Foam::solidParticle::hitPatch +( + const polyPatch&, + int&, + const label +) +{ + return false; +} + + void Foam::solidParticle::hitProcessorPatch ( const processorPolyPatch&, diff --git a/src/lagrangian/solidParticle/solidParticle.H b/src/lagrangian/solidParticle/solidParticle.H index a0977520cc07a9e6f63ea47162fa7b59de26f722..4847970f2fc452a29ba8384c3103f1251fecb63c 100644 --- a/src/lagrangian/solidParticle/solidParticle.H +++ b/src/lagrangian/solidParticle/solidParticle.H @@ -163,68 +163,91 @@ public: inline scalar wallImpactDistance(const vector& n) const; - //- Tracking - bool move(trackData&); + // Tracking + //- Move + bool move(trackData&); - //- Overridable function to handle the particle hitting a processorPatch - void hitProcessorPatch - ( - const processorPolyPatch&, - solidParticle::trackData& td - ); - //- Overridable function to handle the particle hitting a processorPatch - //- without trackData - void hitProcessorPatch - ( - const processorPolyPatch&, - int& - ); + // Patch interactions - //- Overridable function to handle the particle hitting a wallPatch - void hitWallPatch - ( - const wallPolyPatch&, - solidParticle::trackData& td - ); + //- Overridable function to handle the particle hitting a patch + // Executed before other patch-hitting functions + bool hitPatch + ( + const polyPatch&, + solidParticle::trackData& td, + const label patchI + ); - //- Overridable function to handle the particle hitting a wallPatch - //- without trackData - void hitWallPatch - ( - const wallPolyPatch&, - int& - ); + //- Overridable function to handle the particle hitting a patch + // Executed before other patch-hitting functions without trackData + bool hitPatch + ( + const polyPatch& p, + int& td, + const label patchI + ); - //- Overridable function to handle the particle hitting a polyPatch - void hitPatch - ( - const polyPatch&, - solidParticle::trackData& td - ); + //- Overridable function to handle the particle hitting a + // processorPatch + void hitProcessorPatch + ( + const processorPolyPatch&, + solidParticle::trackData& td + ); - //- Overridable function to handle the particle hitting a polyPatch - //- without trackData - void hitPatch - ( - const polyPatch&, - int& - ); + //- Overridable function to handle the particle hitting a + // processorPatch without trackData + void hitProcessorPatch + ( + const processorPolyPatch&, + int& + ); - //- Transform the physical properties of the particle - // according to the given transformation tensor - void transformProperties - ( - const tensor& T - ); + //- Overridable function to handle the particle hitting a wallPatch + void hitWallPatch + ( + const wallPolyPatch&, + solidParticle::trackData& td + ); - //- Transform the physical properties of the particle - // according to the given separation vector - void transformProperties - ( - const vector& separation - ); + //- Overridable function to handle the particle hitting a wallPatch + //- without trackData + void hitWallPatch + ( + const wallPolyPatch&, + int& + ); + + //- Overridable function to handle the particle hitting a polyPatch + void hitPatch + ( + const polyPatch&, + solidParticle::trackData& td + ); + + //- Overridable function to handle the particle hitting a polyPatch + //- without trackData + void hitPatch + ( + const polyPatch&, + int& + ); + + //- Transform the physical properties of the particle + // according to the given transformation tensor + void transformProperties + ( + const tensor& T + ); + + //- Transform the physical properties of the particle + // according to the given separation vector + void transformProperties + ( + const vector& separation + ); // I-O diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/IOfieldMinMax.H b/src/postProcessing/functionObjects/field/fieldMinMax/IOfieldMinMax.H index 6215d670ca4c15b329e6f186762d1610e56d58f6..90b2d1484018d6e689dcf82819d21d91583af49f 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/IOfieldMinMax.H +++ b/src/postProcessing/functionObjects/field/fieldMinMax/IOfieldMinMax.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C index 509e483f2b79c0b07b7d928a998f9d1b8b67f1fe..ec77782df4e7100291150b701ecb5bafb280bc0b 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H index 812359f71caa3edffcf8b43629c58db520f05823..8c8a3aaf479a3a788b43fd07d9ae1af829fa0f86 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxFunctionObject.C b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxFunctionObject.C index 384388833fe64bba0bdf69f0e59ff42b72ed2906..ad124b6e7b0f6254ee8a9b7b79e3fd546d0ed236 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxFunctionObject.C +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxFunctionObject.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxFunctionObject.H b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxFunctionObject.H index 7d9240ab7ecdd9e857d6ed24c64a693368477c2e..a5af27af513d1a0de44cd25052b0aae687ece873 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxFunctionObject.H +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxFunctionObject.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C index 06d6bd585e447b36db17f970c12fdd62c35820d4..25daf62dd6ee73ecaacf41d0a340eb7d30332327 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/systemCall/IOsystemCall.H b/src/postProcessing/functionObjects/systemCall/IOsystemCall.H index beb33d593c6f0cc3515952c5bb623821c9a60aac..827569da14d636245e534d097737f4e31d60e92c 100644 --- a/src/postProcessing/functionObjects/systemCall/IOsystemCall.H +++ b/src/postProcessing/functionObjects/systemCall/IOsystemCall.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/systemCall/systemCall.C b/src/postProcessing/functionObjects/systemCall/systemCall.C index 6fdf84d70c6adf76c53cb729e58d4667e38b9379..44f7948c80a1bdd00a524b4b7e69a1058a7f5cf7 100644 --- a/src/postProcessing/functionObjects/systemCall/systemCall.C +++ b/src/postProcessing/functionObjects/systemCall/systemCall.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/systemCall/systemCall.H b/src/postProcessing/functionObjects/systemCall/systemCall.H index 6dc8fed5294e6f3d7a8b58f17208581cb09437d3..042ee0fc4d8667749314e03cea856dbff25c6016 100644 --- a/src/postProcessing/functionObjects/systemCall/systemCall.H +++ b/src/postProcessing/functionObjects/systemCall/systemCall.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/systemCall/systemCallFunctionObject.C b/src/postProcessing/functionObjects/systemCall/systemCallFunctionObject.C index 096b43ca1cafc3bec63e72550886410c42b56cc6..196ed81e5cc1213b0b234b92d66d5a9899974014 100644 --- a/src/postProcessing/functionObjects/systemCall/systemCallFunctionObject.C +++ b/src/postProcessing/functionObjects/systemCall/systemCallFunctionObject.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/systemCall/systemCallFunctionObject.H b/src/postProcessing/functionObjects/systemCall/systemCallFunctionObject.H index 875c78970bf928d6b05c43647f6df51aa12f76e6..ad4f429cabd8feb81cfca8de8748e99b04dd2fd6 100644 --- a/src/postProcessing/functionObjects/systemCall/systemCallFunctionObject.H +++ b/src/postProcessing/functionObjects/systemCall/systemCallFunctionObject.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/IOdsmcFields.C b/src/postProcessing/functionObjects/utilities/dsmcFields/IOdsmcFields.C index 32627acb3c5ceb3e2873fe858317d3e8af80114d..01a2d6b9ffb49996efb43e7d91d8d8964078ac8e 100644 --- a/src/postProcessing/functionObjects/utilities/dsmcFields/IOdsmcFields.C +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/IOdsmcFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C index 273c88f3699822572bce150ad303b3224f5574ce..8957dee17cda6ce696f191b04e79c4347f020994 100644 --- a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.H b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.H index b53dda6700040633582cdc054b92eb4aee4ee5ab..3e6b33c0d37ed766bd83480e540cc583d58508e9 100644 --- a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.H +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.C b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.C index cd5324f25b103be5086875e4863677e053ce95ee..b2bb31b828561462d662a41ec9acad29f28abf44 100644 --- a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.C +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.H b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.H index cf34cdaa2e4d9a2ef03fa1fbee6644c4bf63ea1a..758626798c8563a706959d890368ba74f44e9dd3 100644 --- a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.H +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFieldsFunctionObject.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/utilities/staticPressure/IOstaticPressure.H b/src/postProcessing/functionObjects/utilities/staticPressure/IOstaticPressure.H index 8409c7f103b4c0d319d74acdedc5f8a85c763c53..524e44514445e362e801528435777b68211c257f 100644 --- a/src/postProcessing/functionObjects/utilities/staticPressure/IOstaticPressure.H +++ b/src/postProcessing/functionObjects/utilities/staticPressure/IOstaticPressure.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/utilities/staticPressure/staticPressure.C b/src/postProcessing/functionObjects/utilities/staticPressure/staticPressure.C index 9ca4f715df0025bee3e4e2c11c4e7f5cd7796d0a..f8678015f0ebe1db02f786bb81138a41db813642 100644 --- a/src/postProcessing/functionObjects/utilities/staticPressure/staticPressure.C +++ b/src/postProcessing/functionObjects/utilities/staticPressure/staticPressure.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/utilities/staticPressure/staticPressure.H b/src/postProcessing/functionObjects/utilities/staticPressure/staticPressure.H index 0a7be2c6204bf045fd6f951e6cce23f33e8712f2..71c4fd3516b5d9947dbe70ac694b12de1f7258f0 100644 --- a/src/postProcessing/functionObjects/utilities/staticPressure/staticPressure.H +++ b/src/postProcessing/functionObjects/utilities/staticPressure/staticPressure.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/utilities/staticPressure/staticPressureFunctionObject.C b/src/postProcessing/functionObjects/utilities/staticPressure/staticPressureFunctionObject.C index d84c802a4a8825cbaf49cd978f10b077fbf24a33..9d13a5739e03b9e8adf1fd36e79813d7aeb28d62 100644 --- a/src/postProcessing/functionObjects/utilities/staticPressure/staticPressureFunctionObject.C +++ b/src/postProcessing/functionObjects/utilities/staticPressure/staticPressureFunctionObject.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/postProcessing/functionObjects/utilities/staticPressure/staticPressureFunctionObject.H b/src/postProcessing/functionObjects/utilities/staticPressure/staticPressureFunctionObject.H index 40f425d4b1892b8f09aa0edb442a44d2fae72614..0ddb184d22edc949f28fb4cdcc79c02d1bfc3364 100644 --- a/src/postProcessing/functionObjects/utilities/staticPressure/staticPressureFunctionObject.H +++ b/src/postProcessing/functionObjects/utilities/staticPressure/staticPressureFunctionObject.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/thermophysicalModels/combustion/mixtureThermos/mixtures/combustionMixture/combustionMixture.H b/src/thermophysicalModels/combustion/mixtureThermos/mixtures/combustionMixture/combustionMixture.H index f109ace2ac149beeaa3a55e28033639198e019a3..5e00e79e80471bed612bd2b5b5e791ef2c0575d1 100644 --- a/src/thermophysicalModels/combustion/mixtureThermos/mixtures/combustionMixture/combustionMixture.H +++ b/src/thermophysicalModels/combustion/mixtureThermos/mixtures/combustionMixture/combustionMixture.H @@ -84,6 +84,12 @@ public: // Member functions + //- Return the table of species + const speciesTable& species() const + { + return species_; + } + //- Return the mass-fraction fields PtrList<volScalarField>& Y() { diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/alphat b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/alphat new file mode 100644 index 0000000000000000000000000000000000000000..dc2104f83c5ce3f90987cad077de403fcd15988e --- /dev/null +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/alphat @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + front + { + type compressible::alphatWallFunction; + value uniform 0; + } + back + { + type compressible::alphatWallFunction; + value uniform 0; + } + wall + { + type compressible::alphatWallFunction; + value uniform 0; + } + porosityWall + { + type compressible::alphatWallFunction; + value uniform 0; + } + inlet + { + type calculated; + value uniform 0; + } + outlet + { + type calculated; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/epsilon b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/epsilon index 13cfc84a0ec1f4c5046a0e4d04d0b7a446a7d611..e0c4dcffbcfbaa46aba58a4bc0f5f0f8f72f3c7e 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/epsilon +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/epsilon @@ -23,31 +23,31 @@ boundaryField { front { - type epsilonWallFunction; - value uniform 0; + type compressible::epsilonWallFunction; + value uniform 200; } back { - type epsilonWallFunction; - value uniform 0; + type compressible::epsilonWallFunction; + value uniform 200; } wall { - type epsilonWallFunction; - value uniform 0; + type compressible::epsilonWallFunction; + value uniform 200; } porosityWall { - type epsilonWallFunction; - value uniform 0; + type compressible::epsilonWallFunction; + value uniform 200; } inlet { - type turbulentMixingLengthDissipationRateInlet; + type compressible::turbulentMixingLengthDissipationRateInlet; mixingLength 0.005; value uniform 200; } diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/k b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/k index 16c1e28fb894fe44a909cc4caa010fb591b74072..1243952ec2d5bc9a98375a7c5de17f4f406689c2 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/k +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/k @@ -23,26 +23,26 @@ boundaryField { front { - type kQRWallFunction; - value uniform 0; + type compressible::kQRWallFunction; + value uniform 1; } back { - type kQRWallFunction; - value uniform 0; + type compressible::kQRWallFunction; + value uniform 1; } wall { - type kQRWallFunction; - value uniform 0; + type compressible::kQRWallFunction; + value uniform 1; } porosityWall { - type kQRWallFunction; - value uniform 0; + type compressible::kQRWallFunction; + value uniform 1; } inlet diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/alphat b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/alphat new file mode 100644 index 0000000000000000000000000000000000000000..5b9884a613ee886a95cb72e4cd55c77c0657e501 --- /dev/null +++ b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/alphat @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + floor + { + type compressible::alphatWallFunction; + value uniform 0; + } + ceiling + { + type compressible::alphatWallFunction; + value uniform 0; + } + fixedWalls + { + type compressible::alphatWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/pd b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/mut similarity index 73% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/pd rename to tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/mut index 3a679ba63a51f43776afa9f72c8fe4e69e328aac..7c893682965996d4b4b48036a27527eeab2ebdf6 100644 --- a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/pd +++ b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/mut @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,11 +10,12 @@ FoamFile version 2.0; format ascii; class volScalarField; - object pd; + location "0"; + object mut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -2 0 0 0 0]; +dimensions [1 -1 -1 0 0 0 0]; internalField uniform 0; @@ -22,21 +23,20 @@ boundaryField { floor { - type fixedFluxBuoyantPressure; + type mutWallFunction; value uniform 0; } - ceiling { - type fixedFluxBuoyantPressure; + type mutWallFunction; value uniform 0; } - fixedWalls { - type fixedFluxBuoyantPressure; + type mutWallFunction; value uniform 0; } } + // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/p b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/p index 10cf8ccf8e1db93392b06f55e43b51c5006cde71..188522464acb9b347136541e983dc3d02d2b0d32 100644 --- a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/p +++ b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/p @@ -16,26 +16,26 @@ FoamFile dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 100000; +internalField uniform 1e5; boundaryField { floor { - type calculated; - value uniform 100000; + type fixedFluxBuoyantPressure; + value uniform 1e5; } ceiling { - type calculated; - value uniform 100000; + type fixedFluxBuoyantPressure; + value uniform 1e5; } fixedWalls { - type calculated; - value uniform 100000; + type fixedFluxBuoyantPressure; + value uniform 1e5; } } diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSchemes index 583bf08e11cb06903ecea9b68ba94a197d2ebed3..35b5a3de97726aa485d4a2b0953e416448dbb7b3 100644 --- a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSchemes @@ -42,7 +42,7 @@ laplacianSchemes { default none; laplacian(muEff,U) Gauss linear corrected; - laplacian((rho*(1|A(U))),pd) Gauss linear corrected; + laplacian((rho*(1|A(U))),p) Gauss linear corrected; laplacian(alphaEff,h) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected; @@ -62,7 +62,7 @@ snGradSchemes fluxRequired { default no; - pd ; + p ; } diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution index c7dcb8279da2f8d7c4afc7063a37071da1f38f73..ffe5b53f56aa268749c19d3ceede84925d35c365 100644 --- a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution @@ -25,7 +25,7 @@ solvers relTol 0; } - pd + p { solver PCG; preconditioner DIC; @@ -33,7 +33,7 @@ solvers relTol 0.1; } - pdFinal + pFinal { solver PCG; preconditioner DIC; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/pd b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/mut similarity index 73% rename from tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/pd rename to tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/mut index 3a679ba63a51f43776afa9f72c8fe4e69e328aac..7c893682965996d4b4b48036a27527eeab2ebdf6 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/pd +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/mut @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,11 +10,12 @@ FoamFile version 2.0; format ascii; class volScalarField; - object pd; + location "0"; + object mut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -2 0 0 0 0]; +dimensions [1 -1 -1 0 0 0 0]; internalField uniform 0; @@ -22,21 +23,20 @@ boundaryField { floor { - type fixedFluxBuoyantPressure; + type mutWallFunction; value uniform 0; } - ceiling { - type fixedFluxBuoyantPressure; + type mutWallFunction; value uniform 0; } - fixedWalls { - type fixedFluxBuoyantPressure; + type mutWallFunction; value uniform 0; } } + // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/p b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/p index 10cf8ccf8e1db93392b06f55e43b51c5006cde71..188522464acb9b347136541e983dc3d02d2b0d32 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/p +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/p @@ -16,26 +16,26 @@ FoamFile dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 100000; +internalField uniform 1e5; boundaryField { floor { - type calculated; - value uniform 100000; + type fixedFluxBuoyantPressure; + value uniform 1e5; } ceiling { - type calculated; - value uniform 100000; + type fixedFluxBuoyantPressure; + value uniform 1e5; } fixedWalls { - type calculated; - value uniform 100000; + type fixedFluxBuoyantPressure; + value uniform 1e5; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSchemes index 9dbebd21cbc1a0cd01091dde9e0cbcd63a459855..cb548b9d9fa88a28a17aefd4f99b9edeee80ea47 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSchemes @@ -41,7 +41,7 @@ laplacianSchemes { default none; laplacian(muEff,U) Gauss linear corrected; - laplacian((rho*(1|A(U))),pd) Gauss linear corrected; + laplacian((rho*(1|A(U))),p) Gauss linear corrected; laplacian(alphaEff,h) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected; @@ -61,7 +61,7 @@ snGradSchemes fluxRequired { default no; - pd ; + p ; } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSolution index dfbfd6a27f1d095120342e7f47910f85b53f92c8..9ff08c3657a4d84256fde4866772cbca40ae5dcf 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - pd + p { solver PCG; preconditioner DIC; @@ -69,16 +69,16 @@ solvers SIMPLE { nNonOrthogonalCorrectors 0; - pdRefCell 0; - pdRefValue 0; + pRefCell 0; + pRefValue 1e5; } relaxationFactors { rho 1; - pd 0.3; + p 0.3; U 0.7; - h 0.7; + h 0.1; k 0.7; epsilon 0.7; R 0.7; diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/CH4 b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/CH4 similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/CH4 rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/CH4 diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/CO b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/CO similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/CO rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/CO diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/CO2 b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/CO2 similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/CO2 rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/CO2 diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/G b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/G similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/G rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/G diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/H2 b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/H2 similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/H2 rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/H2 diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/H2O b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/H2O similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/H2O rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/H2O diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/N2 b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/N2 similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/N2 rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/N2 diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/O2 b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/O2 similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/O2 rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/O2 diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/T b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/T similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/T rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/T diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/U b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/U similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/U rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/U diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/epsilon b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/epsilon similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/epsilon rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/epsilon diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/k b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/k similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/k rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/k diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/p b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/p similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/p rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/p diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/p.org b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/p.org similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/0/p.org rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/p.org diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/chem.inp b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/chem.inp similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/chem.inp rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/chem.inp diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/foam.dat b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/foam.dat similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/foam.dat rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/foam.dat diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/foam.inp b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/foam.inp similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/foam.inp rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/foam.inp diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/therm.dat b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/therm.dat similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/therm.dat rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/therm.dat diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/RASProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/RASProperties similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/RASProperties rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/RASProperties diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/chemistryProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/chemistryProperties similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/chemistryProperties rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/chemistryProperties diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Positions b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Positions similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Positions rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Positions diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties similarity index 97% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties index 4886a81f6f498f3647253329c44ec7b535ebd977..8f53d4c4b002c03c44517a65d7bf6f7c18153540 100644 --- a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties @@ -21,7 +21,7 @@ DragModel SphereDrag; DispersionModel StochasticDispersionRAS; -WallInteractionModel StandardWallInteraction; +PatchInteractionModel StandardWallInteraction; HeatTransferModel RanzMarshall; @@ -33,6 +33,8 @@ DevolatilisationModel ConstantRateDevolatilisation; SurfaceReactionModel COxidationDiffusionLimitedRate; +PostProcessingModel none; + radiation on; coupled true; @@ -52,7 +54,6 @@ constantProperties cp0 cp0 [ 0 2 -2 -1 0 ] 4187; epsilon0 epsilon0 [ 0 0 0 0 0 ] 1; f0 f0 [ 0 0 0 0 0 ] 0.5; - Tbp Tbp [ 0 0 0 1 0 ] 400; Tvap Tvap [ 0 0 0 1 0 ] 400; LDevol LDevol [ 0 0 0 0 0 ] 0; hRetentionCoeff hRetentionCoeff [ 0 0 0 0 0 ] 1; diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/enthalpySourceProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/enthalpySourceProperties similarity index 98% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/enthalpySourceProperties rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/enthalpySourceProperties index 614c9a41b3d7cf97812034dc06b9cf308fb3650b..9c1295cc93c7296b01b2e4f6a974827096d94134 100644 --- a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/enthalpySourceProperties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/enthalpySourceProperties @@ -15,6 +15,8 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +active yes; + cellSource sphereToCell; volumeType absolute; diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/environmentalProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/environmentalProperties similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/environmentalProperties rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/environmentalProperties diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties similarity index 97% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties index aec7c430a7183ef1b6295c5e4958d67f761a3ec5..51e1df08101c3ce45839e94cdfa1168e2f9a7d66 100644 --- a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties @@ -21,10 +21,12 @@ DragModel SphereDrag; DispersionModel StochasticDispersionRAS; -WallInteractionModel StandardWallInteraction; +PatchInteractionModel StandardWallInteraction; HeatTransferModel RanzMarshall; +PostProcessingModel none; + radiation on; coupled true; diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestonePositions b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestonePositions similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestonePositions rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestonePositions diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/polyMesh/blockMeshDict b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/polyMesh/blockMeshDict rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/polyMesh/blockMeshDict diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/radiationProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/radiationProperties similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/radiationProperties rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/radiationProperties diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/thermophysicalProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/thermophysicalProperties similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/thermophysicalProperties rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/thermophysicalProperties diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/turbulenceProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/turbulenceProperties similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/constant/turbulenceProperties rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/turbulenceProperties diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/system/controlDict b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/controlDict similarity index 98% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/system/controlDict rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/controlDict index 6cc0b6002cb72e1ffeaba9ab9897ffb023a34702..50cd97415e2827afb6d1ef6cca3d46ef50788b72 100644 --- a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/system/controlDict +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/controlDict @@ -47,7 +47,7 @@ runTimeModifiable yes; adjustTimeStep yes; -maxCo 0.2; +maxCo 1.0; maxDeltaT 1; diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/system/decomposeParDict b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/decomposeParDict similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/system/decomposeParDict rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/decomposeParDict diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes diff --git a/tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution similarity index 100% rename from tutorials/Lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution rename to tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/G b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/G similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/G rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/G diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/H2O b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/H2O similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/H2O rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/H2O diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/N2 b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/N2 similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/N2 rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/N2 diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/O2 b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/O2 similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/O2 rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/O2 diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/T b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/T similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/T rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/T diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/U b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/U similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/U rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/U diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/epsilon b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/epsilon similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/epsilon rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/epsilon diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/k b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/k similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/k rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/k diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/p b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/p similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/0/p rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/p diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/chemkin/chem.inp b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/chem.inp similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/chemkin/chem.inp rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/chem.inp diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/chemkin/foam.dat b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/foam.dat similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/chemkin/foam.dat rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/foam.dat diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/chemkin/foam.inp b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/foam.inp similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/chemkin/foam.inp rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/foam.inp diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/chemkin/therm.dat b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/therm.dat similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/chemkin/therm.dat rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/therm.dat diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/chemistryProperties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/chemistryProperties similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/chemistryProperties rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/chemistryProperties diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/environmentalProperties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/environmentalProperties similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/environmentalProperties rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/environmentalProperties diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/polyMesh/blockMeshDict b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/polyMesh/blockMeshDict rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/polyMesh/blockMeshDict diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/radiationProperties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/radiationProperties similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/radiationProperties rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/radiationProperties diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Positions b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Positions similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Positions rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Positions diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties similarity index 96% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties index 470165c7f2280f7e6f6ed277e687a27f33dd55c2..be03e91343092bf58fa5b353f4fa76a49d3d05d7 100644 --- a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties @@ -21,7 +21,7 @@ DragModel SphereDrag; DispersionModel none; -WallInteractionModel StandardWallInteraction; +PatchInteractionModel StandardWallInteraction; HeatTransferModel RanzMarshall; @@ -29,6 +29,8 @@ CompositionModel SinglePhaseMixture; PhaseChangeModel LiquidEvaporation; +PostProcessingModel none; + radiation off; coupled true; @@ -48,7 +50,6 @@ constantProperties cp0 cp0 [ 0 2 -2 -1 0 ] 4187; epsilon0 epsilon0 [ 0 0 0 0 0 ] 1; f0 f0 [ 0 0 0 0 0 ] 0.5; - Tbp Tbp [ 0 0 0 1 0 ] 393; Tvap Tvap [ 0 0 0 1 0 ] 273; constantVolume false; } diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/thermophysicalProperties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/thermophysicalProperties similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/thermophysicalProperties rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/thermophysicalProperties diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/turbulenceProperties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/turbulenceProperties similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/constant/turbulenceProperties rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/turbulenceProperties diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/system/controlDict b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/controlDict similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/system/controlDict rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/controlDict diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/system/decomposeParDict b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/decomposeParDict similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/system/decomposeParDict rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/decomposeParDict diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/system/fvSchemes b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSchemes similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/system/fvSchemes rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSchemes diff --git a/tutorials/Lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution similarity index 100% rename from tutorials/Lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution rename to tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/Make/files b/tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/Make/files similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/Make/files rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/Make/files diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/Make/options b/tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/Make/options similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/Make/options rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/Make/options diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/UEqn.H b/tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/UEqn.H similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/UEqn.H rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/UEqn.H diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/createClouds.H b/tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/createClouds.H similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/createClouds.H rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/createClouds.H diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/createFields.H b/tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/createFields.H similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/createFields.H rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/createFields.H diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/hEqn.H b/tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/hEqn.H similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/hEqn.H rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/hEqn.H diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/pEqn.H b/tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/pEqn.H similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/pEqn.H rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/pEqn.H diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam.C b/tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam.C similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam.C rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam/rhoPisoTwinParcelFoam.C diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/G b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/G similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/G rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/G diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/T b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/T similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/T rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/T diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/U b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/U similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/U rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/U diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/epsilon b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/epsilon similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/epsilon rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/epsilon diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/k b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/k similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/k rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/k diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/p b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/p similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/p rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/p diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/RASProperties b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/RASProperties similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/RASProperties rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/RASProperties diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/environmentalProperties b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/environmentalProperties similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/environmentalProperties rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/environmentalProperties diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/kinematicCloud1Positions b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/kinematicCloud1Positions similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/kinematicCloud1Positions rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/kinematicCloud1Positions diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/kinematicCloud1Properties b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/kinematicCloud1Properties similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/kinematicCloud1Properties rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/kinematicCloud1Properties diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/polyMesh/blockMeshDict b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/polyMesh/blockMeshDict rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/polyMesh/blockMeshDict diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/polyMesh/boundary b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/polyMesh/boundary similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/polyMesh/boundary rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/polyMesh/boundary diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/thermoCloud1Positions b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/thermoCloud1Positions similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/thermoCloud1Positions rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/thermoCloud1Positions diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/thermoCloud1Properties b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/thermoCloud1Properties similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/thermoCloud1Properties rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/thermoCloud1Properties diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/thermophysicalProperties b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/thermophysicalProperties similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/thermophysicalProperties rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/constant/thermophysicalProperties diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/controlDict b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/controlDict similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/controlDict rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/controlDict diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/decomposeParDict b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/decomposeParDict similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/decomposeParDict rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/decomposeParDict diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/fvSchemes b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/fvSchemes similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/fvSchemes rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/fvSchemes diff --git a/tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/fvSolution b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/fvSolution similarity index 100% rename from tutorials/Lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/fvSolution rename to tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/fvSolution diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/G b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/G new file mode 100644 index 0000000000000000000000000000000000000000..0b9581fe5cd0c4ddd5b7eea8b4487e96400da5f3 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/G @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object G; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 0 -3 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + walls + { + type MarshakRadiation; + T T; + emissivity 1.0; + value uniform 0; + } + + inlet + { + type MarshakRadiation; + T T; + emissivity 1.0; + value uniform 0; + } + + outlet + { + type zeroGradient; + } + + cycLeft + { + type cyclic; + } + + cycRight + { + type cyclic; + } + + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/H2O b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/H2O new file mode 100644 index 0000000000000000000000000000000000000000..cb32465490b8e610dfa66873fc9271648ecf6f5f --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/H2O @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object H2O; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + walls + { + type zeroGradient; + } + + inlet + { + type fixedValue; + value uniform 0; + } + + outlet + { + type zeroGradient; + } + + cycLeft + { + type cyclic; + } + + cycRight + { + type cyclic; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/N2 b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/N2 new file mode 100644 index 0000000000000000000000000000000000000000..73ed14ee5dc38ff8073289c5f68bf0295d92bd7a --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/N2 @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object N2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.79; + +boundaryField +{ + walls + { + type zeroGradient; + } + + inlet + { + type fixedValue; + value uniform 0.79; + } + + outlet + { + type zeroGradient; + } + + cycLeft + { + type cyclic; + } + + cycRight + { + type cyclic; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/O2 b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/O2 new file mode 100644 index 0000000000000000000000000000000000000000..708683ea5597ae05bc13c7c2b35a1ddddbaac0cb --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/O2 @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object O2; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.21; + +boundaryField +{ + walls + { + type zeroGradient; + } + + inlet + { + type fixedValue; + value uniform 0.21; + } + + outlet + { + type zeroGradient; + } + + cycLeft + { + type cyclic; + } + + cycRight + { + type cyclic; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/T b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/T new file mode 100644 index 0000000000000000000000000000000000000000..0d04413e056717eb2f0b91539c8f3a9b4b8cfa2e --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/T @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + location "0"; + class volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 350; + +boundaryField +{ + walls + { + type fixedValue; + value uniform 400; + } + + inlet + { + type fixedValue; + value uniform 350; + } + + outlet + { + type zeroGradient; + } + + cycLeft + { + type cyclic; + } + + cycRight + { + type cyclic; + ] + + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/U b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/U new file mode 100644 index 0000000000000000000000000000000000000000..206079cdbf9a0895a5bafee07d51eb6471efef91 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/U @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + location "0"; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + walls + { + type fixedValue; + value uniform (0 0 0); + } + + inlet + { + type fixedValue; + value uniform (0.5 0 0); + } + + outlet + { + type zeroGradient; + } + + cycLeft + { + type cyclic; + } + + cycRight + { + type cyclic; + } + + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/epsilon b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/epsilon new file mode 100644 index 0000000000000000000000000000000000000000..481f993b2829d6a1dcf4117d17ae7cb7e69bcacf --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/epsilon @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 4.49e-05; + +boundaryField +{ + walls + { + type compressible::epsilonWallFunction; + value uniform 4.49e-05; + } + + inlet + { + type fixedValue; + value uniform 4.49e-05; + } + + outlet + { + type zeroGradient; + } + + cycLeft + { + type cyclic; + } + + cycRight + { + type cyclic; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/k b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/k new file mode 100644 index 0000000000000000000000000000000000000000..55c9edb64c6304fac7c7ed48a9767bfac5681b76 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/k @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 9.38e-04; + +boundaryField +{ + walls + { + type compressible::kQRWallFunction; + value uniform 9.38e-04; + } + + inlet + { + type fixedValue; + value uniform 9.38e-04; + } + + outlet + { + type zeroGradient; + } + + cycLeft + { + type cyclic; + } + + cycRight + { + type cyclic; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/p b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/p new file mode 100644 index 0000000000000000000000000000000000000000..00a08bfea05e9cb76becb60bfc27cf7c07b6942e --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/0/p @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 100000; + +boundaryField +{ + walls + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + outlet + { + type fixedValue; + value uniform 100000; + } + + cycLeft + { + type cyclic; + } + + cycRight + { + type cyclic; + } + + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/Allrun b/tutorials/lagrangian/trackedReactingParcelFoam/filter/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..68d74e3f344237944e77206bc85e3c7df36d36e6 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/Allrun @@ -0,0 +1,24 @@ +#!/bin/sh + +# create mesh +blockMesh >& log.blockMesh + +# create sets - 1 +setSet -batch system/sets.setSet >& log.setSet1 + +# create the first cyclic - lhs of porous zone +createBaffles cycLeft cycLeft -overwrite >& log.createBaffles1 + +# create sets - 2 (ordering changed after createBaffles) +setSet -batch system/sets.setSet >& log.setSet2 + +# create the second cyclic - rhs of porous zone +createBaffles cycRight cycRight -overwrite >& log.createBaffles2 + +# create sets - 3 (ordering changed after createBaffles) +setSet -batch system/sets.setSet >& log.setSet3 + +# convert sets to zones +setsToZones -noFlipMap >& log.setsToZones + + diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/chemkin/foam.dat b/tutorials/lagrangian/trackedReactingParcelFoam/filter/chemkin/foam.dat new file mode 100644 index 0000000000000000000000000000000000000000..36ef32431218784d9c10aa1609870debbbbb5924 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/chemkin/foam.dat @@ -0,0 +1,17 @@ +( +O2 O2 1 31.9988 + 200 5000 1000 + 3.69758 0.00061352 -1.25884e-07 1.77528e-11 -1.13644e-15 -1233.93 3.18917 + 3.21294 0.00112749 -5.75615e-07 1.31388e-09 -8.76855e-13 -1005.25 6.03474 + 1.67212e-06 170.672 +H2O H2O 1 18.0153 + 200 5000 1000 + 2.67215 0.00305629 -8.73026e-07 1.201e-10 -6.39162e-15 -29899.2 6.86282 + 3.38684 0.00347498 -6.3547e-06 6.96858e-09 -2.50659e-12 -30208.1 2.59023 + 1.67212e-06 170.672 +N2 N2 1 28.0134 + 200 5000 1000 + 2.92664 0.00148798 -5.68476e-07 1.0097e-10 -6.75335e-15 -922.798 5.98053 + 3.29868 0.00140824 -3.96322e-06 5.64152e-09 -2.44486e-12 -1020.9 3.95037 + 1.67212e-06 170.672 +) diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/chemkin/foam.inp b/tutorials/lagrangian/trackedReactingParcelFoam/filter/chemkin/foam.inp new file mode 100644 index 0000000000000000000000000000000000000000..80d66f62c04dbc0e5638ad8912f02619e526e7be --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/chemkin/foam.inp @@ -0,0 +1,11 @@ +species +( + O2 + H2O + N2 +) +; + +reactions +( +); diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/chemistryProperties b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/chemistryProperties new file mode 100644 index 0000000000000000000000000000000000000000..53a5860d33ad658f415a68c944c3a89007fe22d3 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/chemistryProperties @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object chemistryProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +chemistry off; + +turbulentReaction off; + +chemistrySolver ODE; + +initialChemicalTimeStep 1e-07; + +sequentialCoeffs +{ + cTauChem 0.001; +} + +EulerImplicitCoeffs +{ + cTauChem 0.05; + equilibriumRateLimiter off; +} + +ODECoeffs +{ + ODESolver RK; + eps 0.05; + scale 1; +} + +Cmix Cmix [ 0 0 0 0 0 0 0 ] 1; + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/environmentalProperties b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/environmentalProperties new file mode 100644 index 0000000000000000000000000000000000000000..e5124f24528a9aefc741713cd06a11917107de2a --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/environmentalProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object environmentalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +g g [ 0 1 -2 0 0 0 0 ] ( 0 0 0 ); + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/parcelInjectionProperties b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/parcelInjectionProperties new file mode 100644 index 0000000000000000000000000000000000000000..fd263fee4922111dce6b8189d52a3017aec70c06 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/parcelInjectionProperties @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object scalarListList; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// x y z u v w d rho mDot T cp Y0..YN +( + (0.1 0.3 0.0 2.0 0.0 0.0 0.001 1000 0.2 300 4200 1.0) + (0.1 0.4 0.0 2.0 0.0 0.0 0.001 1000 0.2 300 4200 1.0) + (0.1 0.5 0.0 2.0 0.0 0.0 0.001 1000 0.2 300 4200 1.0) + (0.1 0.6 0.0 2.0 0.0 0.0 0.001 1000 0.2 300 4200 1.0) + (0.1 0.7 0.0 2.0 0.0 0.0 0.001 1000 0.2 300 4200 1.0) +); + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/particleTrackProperties b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/particleTrackProperties new file mode 100644 index 0000000000000000000000000000000000000000..1dcc0258d537ffe209e6ce5ea19a7a6a31a6536c --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/particleTrackProperties @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object particleTrackProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +cloudName reactingCloud1; + +sampleFrequency 1; + +maxPositions 1000000; + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/pointMassSourcesProperties b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/pointMassSourcesProperties new file mode 100644 index 0000000000000000000000000000000000000000..e4f61e9a20ca2f71479b0f558fdd4e3611920f55 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/pointMassSourcesProperties @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object pointMassSourcesProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +active true; + +pointSources +( + source1 + { + timeStart 0.2; + duration 0.5; + location (2.75 0.5 0); + fieldData + ( + (H2O 0.1) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/blockMeshDict b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..99b6b4f9111a08de5ed52c51e4ea6908a0dfbfde --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/blockMeshDict @@ -0,0 +1,113 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant/polyMesh"; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (0.00 0.25 0) // 0 + (1.00 0.25 0) // 1 + (1.25 0.00 0) // 2 + (2.25 0.00 0) // 3 + (2.50 0.25 0) // 4 + (4.00 0.25 0) // 5 + + (4.00 0.75 0) // 6 + (2.50 0.75 0) // 7 + (2.25 1.00 0) // 8 + (1.25 1.00 0) // 9 + (1.00 0.75 0) // 10 + (0.00 0.75 0) // 11 + + + (0.00 0.25 0.1) // 12 + (1.00 0.25 0.1) // 13 + (1.25 0.00 0.1) // 14 + (2.25 0.00 0.1) // 15 + (2.50 0.25 0.1) // 16 + (4.00 0.25 0.1) // 17 + + (4.00 0.75 0.1) // 18 + (2.50 0.75 0.1) // 19 + (2.25 1.00 0.1) // 20 + (1.25 1.00 0.1) // 21 + (1.00 0.75 0.1) // 22 + (0.00 0.75 0.1) // 23 +); + +blocks +( + hex ( 0 1 10 11 12 13 22 23) (20 20 1) simpleGrading (1 1 1) + hex ( 1 2 9 10 13 14 21 22) ( 8 20 1) simpleGrading (1 1 1) + hex ( 2 3 8 9 14 15 20 21) (20 20 1) simpleGrading (1 1 1) + hex ( 3 4 7 8 15 16 19 20) ( 8 20 1) simpleGrading (1 1 1) + hex ( 4 5 6 7 16 17 18 19) (30 20 1) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + wall walls + ( + ( 0 1 13 12) + ( 1 2 14 13) + ( 2 3 15 14) + ( 3 4 16 15) + ( 4 5 17 16) + ( 6 7 19 18) + ( 7 8 20 19) + ( 8 9 21 20) + ( 9 10 22 21) + (10 11 23 22) + ) + + patch inlet + ( + (11 0 12 23) + ) + + patch outlet + ( + ( 5 6 18 17) + ) + + cyclic cycLeft + () + + cyclic cycRight + () + + empty frontAndBack + ( + ( 0 11 10 1) + ( 1 10 9 2) + ( 2 9 8 3) + ( 3 8 7 4) + ( 4 7 6 5) + (12 13 22 23) + (13 14 21 22) + (14 15 20 21) + (15 16 19 20) + (16 17 18 19) + ) +); + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/cycLeft b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/cycLeft new file mode 100644 index 0000000000000000000000000000000000000000..637d83fb4b41e5bbe9495fc5d1f3383a49045f61 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/cycLeft @@ -0,0 +1,63 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev.FT | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class faceSet; + location "constant/polyMesh/sets"; + object cycLeft; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +40 +( +3506 +3507 +3508 +3509 +3510 +3511 +3512 +3513 +3514 +3515 +3516 +3517 +3518 +3519 +3520 +3521 +3522 +3523 +3524 +3525 +3526 +3527 +3528 +3529 +3530 +3531 +3532 +3533 +3534 +3535 +3536 +3537 +3538 +3539 +3540 +3541 +3542 +3543 +3544 +3545 +) + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/cycLeft_old b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/cycLeft_old new file mode 100644 index 0000000000000000000000000000000000000000..c2d3df10a3d0dd05db43dbb11e3e30fd4bac28a4 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/cycLeft_old @@ -0,0 +1,893 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev.FT | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class topoSet; + location "constant/polyMesh/sets"; + object cycLeft_old; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +870 +( +6144 +6145 +6146 +6147 +6148 +6149 +6150 +6151 +6152 +6153 +6154 +6155 +6156 +6157 +6158 +6159 +6160 +6161 +6162 +6163 +6164 +6165 +4246 +4247 +4248 +4249 +4250 +4251 +4252 +4253 +4254 +4255 +4256 +4257 +4258 +4259 +4260 +4261 +4262 +4263 +4264 +4265 +4266 +4267 +4268 +4269 +4270 +4271 +4272 +4273 +4274 +4275 +4276 +4277 +4278 +4279 +4280 +4281 +4282 +4283 +4284 +4285 +4286 +4287 +4288 +4289 +4290 +4291 +4292 +4293 +4294 +4295 +4296 +4297 +4298 +4299 +4300 +4301 +4302 +4303 +4304 +4305 +4306 +4307 +4308 +4309 +4310 +4311 +4312 +4313 +4314 +4315 +4316 +4317 +4318 +4319 +4320 +4321 +4322 +4323 +4324 +4325 +4326 +4327 +4328 +4329 +4330 +4331 +4332 +4333 +4334 +4335 +4336 +4337 +4338 +4339 +4340 +4341 +4342 +4343 +4344 +4345 +4346 +4347 +4348 +4349 +4350 +4351 +4352 +4353 +4354 +4355 +4356 +4357 +4358 +4359 +4360 +4361 +4362 +4363 +4364 +4365 +4366 +4367 +4368 +4369 +4370 +4371 +4372 +4373 +4374 +4375 +4376 +4377 +4378 +4379 +4380 +4381 +4382 +4383 +4384 +4385 +4386 +4387 +4388 +4389 +4390 +4391 +4392 +4393 +4394 +4395 +4396 +4397 +4398 +4399 +4400 +4401 +4402 +4403 +4404 +4405 +4406 +4407 +4408 +4409 +4410 +4411 +4412 +4413 +4414 +4415 +4416 +4417 +4418 +4419 +4420 +4421 +4422 +4423 +4424 +4425 +4426 +4427 +4428 +4429 +4430 +4431 +4432 +4433 +4434 +4435 +4436 +4437 +4438 +4439 +4440 +4441 +4442 +4443 +4444 +4445 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 +1118 +1119 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1215 +1216 +1217 +1218 +1219 +1220 +1221 +1222 +1223 +1224 +1225 +1226 +1227 +1228 +1229 +1230 +1231 +1232 +1233 +1253 +1254 +1255 +1256 +1257 +1258 +1259 +1260 +1261 +1262 +1263 +1264 +1265 +1266 +1267 +1268 +1269 +1270 +1271 +3327 +3328 +3329 +3330 +3331 +3332 +3333 +3334 +3335 +3336 +1291 +1292 +1293 +1294 +1295 +1296 +1297 +1298 +1299 +1300 +1301 +1302 +1303 +1304 +1305 +1306 +1307 +1308 +1309 +1329 +1330 +1331 +1332 +1333 +1334 +1335 +1336 +1337 +1338 +1339 +1340 +1341 +1342 +1343 +1344 +1345 +1346 +1347 +1367 +1368 +1369 +1370 +1371 +1372 +1373 +1374 +1375 +3423 +1376 +3424 +1377 +3425 +1378 +3426 +1379 +3427 +1380 +3428 +1381 +3429 +1382 +3430 +3431 +1383 +3432 +1384 +1385 +1405 +1406 +1407 +1408 +1409 +1410 +1411 +1412 +1413 +1414 +1415 +1416 +1417 +1418 +1419 +1420 +1421 +1422 +1423 +1443 +1444 +1445 +1446 +1447 +1448 +1449 +1450 +1451 +1452 +1453 +1454 +1455 +1456 +1457 +3506 +1458 +3507 +1459 +3508 +1460 +3509 +1461 +3510 +3511 +3512 +3513 +3514 +3515 +3516 +3517 +3518 +3519 +3520 +3521 +3522 +3523 +3524 +3525 +3526 +3527 +3528 +3529 +1481 +3530 +1482 +3531 +1483 +3532 +1484 +3533 +1485 +3534 +1486 +3535 +1487 +3536 +1488 +1489 +3537 +1490 +3538 +1491 +3539 +1492 +3540 +1493 +3541 +1494 +3542 +1495 +3543 +1496 +3544 +1497 +3545 +3546 +1498 +3547 +1499 +3548 +3549 +3550 +3551 +3552 +3553 +3554 +3555 +3556 +3557 +3558 +3559 +3560 +3561 +3562 +3563 +3564 +3565 +3566 +3567 +1519 +3568 +1520 +3569 +1521 +3570 +1522 +3571 +1523 +3572 +1524 +3573 +1525 +3574 +1526 +3575 +1527 +3576 +1528 +3577 +1529 +3578 +1530 +3579 +1531 +3580 +1532 +3581 +1533 +3582 +1534 +3583 +1535 +3584 +1536 +3585 +1537 +1557 +1558 +1559 +1560 +1561 +1562 +1563 +1564 +1565 +1566 +1567 +1568 +1569 +1570 +1571 +1572 +1573 +1574 +1575 +1595 +1596 +1597 +1598 +1599 +1600 +1601 +1602 +1603 +1604 +1605 +1606 +1607 +1608 +1609 +1610 +1611 +1612 +1613 +1633 +1634 +1635 +1636 +1637 +1638 +1639 +1640 +1641 +1642 +1643 +1644 +1645 +1646 +1647 +1648 +1649 +1650 +1651 +1671 +1672 +1673 +1674 +1675 +1676 +1677 +1678 +1679 +1680 +1681 +1682 +1683 +1684 +1685 +1686 +1687 +1688 +1689 +1709 +1710 +1711 +1712 +1713 +1714 +1715 +1716 +1717 +1718 +1719 +1720 +1721 +1722 +1723 +1724 +1725 +1726 +1727 +1747 +1748 +1749 +1750 +1751 +1752 +1753 +1754 +1755 +1756 +1757 +1758 +1759 +1760 +1761 +1762 +1763 +1764 +1765 +1785 +1786 +1787 +1788 +1789 +1790 +1791 +1792 +1793 +1794 +1795 +1796 +1797 +1798 +1799 +1800 +1801 +1802 +1803 +1818 +1819 +1820 +1821 +1822 +1823 +1824 +1825 +1826 +5966 +5967 +5968 +5969 +5970 +5971 +5972 +5973 +5974 +5975 +5976 +5977 +5978 +5979 +5980 +5981 +5982 +5983 +5984 +5985 +5986 +5987 +5988 +5989 +5990 +5991 +5992 +5993 +5994 +5995 +5996 +5997 +5998 +5999 +6000 +6001 +6002 +6003 +6004 +6005 +6006 +6007 +6008 +6009 +6010 +6011 +6012 +6013 +6014 +6015 +6016 +6017 +6018 +6019 +6020 +6021 +6022 +6023 +6024 +6025 +6026 +6027 +6028 +6029 +6030 +6031 +6032 +6033 +6034 +6035 +6036 +6037 +6038 +6039 +6040 +6041 +6042 +6043 +6044 +6045 +6046 +6047 +6048 +6049 +6050 +6051 +6052 +6053 +6054 +6055 +6056 +6057 +6058 +6059 +6060 +6061 +6062 +6063 +6064 +6065 +6066 +6067 +6068 +6069 +6070 +6071 +6072 +6073 +6074 +6075 +6076 +6077 +6078 +6079 +6080 +6081 +6082 +6083 +6084 +6085 +6086 +6087 +6088 +6089 +6090 +6091 +6092 +6093 +6094 +6095 +6096 +6097 +6098 +6099 +6100 +6101 +6102 +6103 +6104 +6105 +6106 +6107 +6108 +6109 +6110 +6111 +6112 +6113 +6114 +6115 +6116 +6117 +6118 +6119 +6120 +6121 +6122 +6123 +6124 +6125 +6126 +6127 +6128 +6129 +6130 +6131 +6132 +6133 +6134 +6135 +6136 +6137 +6138 +6139 +6140 +6141 +6142 +6143 +) + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/cycRight b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/cycRight new file mode 100644 index 0000000000000000000000000000000000000000..37cdc37250e049cea02c4c9272fc7629bfe4e90e --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/cycRight @@ -0,0 +1,63 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev.FT | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class faceSet; + location "constant/polyMesh/sets"; + object cycRight; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +40 +( +3546 +3547 +3548 +3549 +3550 +3551 +3552 +3553 +3554 +3555 +3556 +3557 +3558 +3559 +3560 +3561 +3562 +3563 +3564 +3565 +3566 +3567 +3568 +3569 +3570 +3571 +3572 +3573 +3574 +3575 +3576 +3577 +3578 +3579 +3580 +3581 +3582 +3583 +3584 +3585 +) + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/cycRight_old b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/cycRight_old new file mode 100644 index 0000000000000000000000000000000000000000..f0f4e98da521c1704c76e9c2dfc65df9a1d4534b --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/cycRight_old @@ -0,0 +1,893 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev.FT | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class topoSet; + location "constant/polyMesh/sets"; + object cycRight_old; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +870 +( +6144 +6145 +6146 +6147 +6148 +6149 +6150 +6151 +6152 +6153 +6154 +6155 +6156 +6157 +6158 +6159 +6160 +6161 +6162 +6163 +6164 +6165 +4246 +4247 +4248 +4249 +4250 +4251 +4252 +4253 +4254 +4255 +4256 +4257 +4258 +4259 +4260 +4261 +4262 +4263 +4264 +4265 +4266 +4267 +4268 +4269 +4270 +4271 +4272 +4273 +4274 +4275 +4276 +4277 +4278 +4279 +4280 +4281 +4282 +4283 +4284 +4285 +4286 +4287 +4288 +4289 +4290 +4291 +4292 +4293 +4294 +4295 +4296 +4297 +4298 +4299 +4300 +4301 +4302 +4303 +4304 +4305 +4306 +4307 +4308 +4309 +4310 +4311 +4312 +4313 +4314 +4315 +4316 +4317 +4318 +4319 +4320 +4321 +4322 +4323 +4324 +4325 +4326 +4327 +4328 +4329 +4330 +4331 +4332 +4333 +4334 +4335 +4336 +4337 +4338 +4339 +4340 +4341 +4342 +4343 +4344 +4345 +4346 +4347 +4348 +4349 +4350 +4351 +4352 +4353 +4354 +4355 +4356 +4357 +4358 +4359 +4360 +4361 +4362 +4363 +4364 +4365 +4366 +4367 +4368 +4369 +4370 +4371 +4372 +4373 +4374 +4375 +4376 +4377 +4378 +4379 +4380 +4381 +4382 +4383 +4384 +4385 +4386 +4387 +4388 +4389 +4390 +4391 +4392 +4393 +4394 +4395 +4396 +4397 +4398 +4399 +4400 +4401 +4402 +4403 +4404 +4405 +4406 +4407 +4408 +4409 +4410 +4411 +4412 +4413 +4414 +4415 +4416 +4417 +4418 +4419 +4420 +4421 +4422 +4423 +4424 +4425 +4426 +4427 +4428 +4429 +4430 +4431 +4432 +4433 +4434 +4435 +4436 +4437 +4438 +4439 +4440 +4441 +4442 +4443 +4444 +4445 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 +1118 +1119 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1215 +1216 +1217 +1218 +1219 +1220 +1221 +1222 +1223 +1224 +1225 +1226 +1227 +1228 +1229 +1230 +1231 +1232 +1233 +1253 +1254 +1255 +1256 +1257 +1258 +1259 +1260 +1261 +1262 +1263 +1264 +1265 +1266 +1267 +1268 +1269 +1270 +1271 +3327 +3328 +3329 +3330 +3331 +3332 +3333 +3334 +3335 +3336 +1291 +1292 +1293 +1294 +1295 +1296 +1297 +1298 +1299 +1300 +1301 +1302 +1303 +1304 +1305 +1306 +1307 +1308 +1309 +1329 +1330 +1331 +1332 +1333 +1334 +1335 +1336 +1337 +1338 +1339 +1340 +1341 +1342 +1343 +1344 +1345 +1346 +1347 +1367 +1368 +1369 +1370 +1371 +1372 +1373 +1374 +1375 +3423 +1376 +3424 +1377 +3425 +1378 +3426 +1379 +3427 +1380 +3428 +1381 +3429 +1382 +3430 +3431 +1383 +3432 +1384 +1385 +1405 +1406 +1407 +1408 +1409 +1410 +1411 +1412 +1413 +1414 +1415 +1416 +1417 +1418 +1419 +1420 +1421 +1422 +1423 +1443 +1444 +1445 +1446 +1447 +1448 +1449 +1450 +1451 +1452 +1453 +1454 +1455 +1456 +1457 +3506 +1458 +3507 +1459 +3508 +1460 +3509 +1461 +3510 +3511 +3512 +3513 +3514 +3515 +3516 +3517 +3518 +3519 +3520 +3521 +3522 +3523 +3524 +3525 +3526 +3527 +3528 +3529 +1481 +3530 +1482 +3531 +1483 +3532 +1484 +3533 +1485 +3534 +1486 +3535 +1487 +3536 +1488 +1489 +3537 +1490 +3538 +1491 +3539 +1492 +3540 +1493 +3541 +1494 +3542 +1495 +3543 +1496 +3544 +1497 +3545 +3546 +1498 +3547 +1499 +3548 +3549 +3550 +3551 +3552 +3553 +3554 +3555 +3556 +3557 +3558 +3559 +3560 +3561 +3562 +3563 +3564 +3565 +3566 +3567 +1519 +3568 +1520 +3569 +1521 +3570 +1522 +3571 +1523 +3572 +1524 +3573 +1525 +3574 +1526 +3575 +1527 +3576 +1528 +3577 +1529 +3578 +1530 +3579 +1531 +3580 +1532 +3581 +1533 +3582 +1534 +3583 +1535 +3584 +1536 +3585 +1537 +1557 +1558 +1559 +1560 +1561 +1562 +1563 +1564 +1565 +1566 +1567 +1568 +1569 +1570 +1571 +1572 +1573 +1574 +1575 +1595 +1596 +1597 +1598 +1599 +1600 +1601 +1602 +1603 +1604 +1605 +1606 +1607 +1608 +1609 +1610 +1611 +1612 +1613 +1633 +1634 +1635 +1636 +1637 +1638 +1639 +1640 +1641 +1642 +1643 +1644 +1645 +1646 +1647 +1648 +1649 +1650 +1651 +1671 +1672 +1673 +1674 +1675 +1676 +1677 +1678 +1679 +1680 +1681 +1682 +1683 +1684 +1685 +1686 +1687 +1688 +1689 +1709 +1710 +1711 +1712 +1713 +1714 +1715 +1716 +1717 +1718 +1719 +1720 +1721 +1722 +1723 +1724 +1725 +1726 +1727 +1747 +1748 +1749 +1750 +1751 +1752 +1753 +1754 +1755 +1756 +1757 +1758 +1759 +1760 +1761 +1762 +1763 +1764 +1765 +1785 +1786 +1787 +1788 +1789 +1790 +1791 +1792 +1793 +1794 +1795 +1796 +1797 +1798 +1799 +1800 +1801 +1802 +1803 +1818 +1819 +1820 +1821 +1822 +1823 +1824 +1825 +1826 +5966 +5967 +5968 +5969 +5970 +5971 +5972 +5973 +5974 +5975 +5976 +5977 +5978 +5979 +5980 +5981 +5982 +5983 +5984 +5985 +5986 +5987 +5988 +5989 +5990 +5991 +5992 +5993 +5994 +5995 +5996 +5997 +5998 +5999 +6000 +6001 +6002 +6003 +6004 +6005 +6006 +6007 +6008 +6009 +6010 +6011 +6012 +6013 +6014 +6015 +6016 +6017 +6018 +6019 +6020 +6021 +6022 +6023 +6024 +6025 +6026 +6027 +6028 +6029 +6030 +6031 +6032 +6033 +6034 +6035 +6036 +6037 +6038 +6039 +6040 +6041 +6042 +6043 +6044 +6045 +6046 +6047 +6048 +6049 +6050 +6051 +6052 +6053 +6054 +6055 +6056 +6057 +6058 +6059 +6060 +6061 +6062 +6063 +6064 +6065 +6066 +6067 +6068 +6069 +6070 +6071 +6072 +6073 +6074 +6075 +6076 +6077 +6078 +6079 +6080 +6081 +6082 +6083 +6084 +6085 +6086 +6087 +6088 +6089 +6090 +6091 +6092 +6093 +6094 +6095 +6096 +6097 +6098 +6099 +6100 +6101 +6102 +6103 +6104 +6105 +6106 +6107 +6108 +6109 +6110 +6111 +6112 +6113 +6114 +6115 +6116 +6117 +6118 +6119 +6120 +6121 +6122 +6123 +6124 +6125 +6126 +6127 +6128 +6129 +6130 +6131 +6132 +6133 +6134 +6135 +6136 +6137 +6138 +6139 +6140 +6141 +6142 +6143 +) + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/filter b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/filter new file mode 100644 index 0000000000000000000000000000000000000000..69a220b27d6b5c8fdf9e6cd5e72e964fb2c6bffa --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/filter @@ -0,0 +1,223 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev.FT | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class cellSet; + location "constant/polyMesh/sets"; + object filter; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +200 +( +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +905 +906 +907 +908 +909 +910 +911 +912 +913 +914 +925 +926 +927 +928 +929 +930 +931 +932 +933 +934 +945 +946 +947 +948 +949 +950 +951 +952 +953 +954 +) + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/filter_old b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/filter_old new file mode 100644 index 0000000000000000000000000000000000000000..23213bdb87781ea3f3191ce47a8397401db7f408 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/filter_old @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev.FT | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class topoSet; + location "constant/polyMesh/sets"; + object filter_old; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +0 +( +) + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/leftFluid b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/leftFluid new file mode 100644 index 0000000000000000000000000000000000000000..f2907ad0b5a2f7e89636e423e6ab482b98f8fb6c --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/leftFluid @@ -0,0 +1,683 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev.FT | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class cellSet; + location "constant/polyMesh/sets"; + object leftFluid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +660 +( +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +580 +581 +582 +583 +584 +600 +601 +602 +603 +604 +620 +621 +622 +623 +624 +640 +641 +642 +643 +644 +660 +661 +662 +663 +664 +680 +681 +682 +683 +684 +700 +701 +702 +703 +704 +720 +721 +722 +723 +724 +740 +741 +742 +743 +744 +760 +761 +762 +763 +764 +780 +781 +782 +783 +784 +800 +801 +802 +803 +804 +820 +821 +822 +823 +824 +840 +841 +842 +843 +844 +860 +861 +862 +863 +864 +880 +881 +882 +883 +884 +900 +901 +902 +903 +904 +920 +921 +922 +923 +924 +940 +941 +942 +943 +944 +) + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/rightFluid b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/rightFluid new file mode 100644 index 0000000000000000000000000000000000000000..d1d4226be6df5334e86deba685cf2acbe2b74ce0 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/polyMesh/sets/rightFluid @@ -0,0 +1,883 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev.FT | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class cellSet; + location "constant/polyMesh/sets"; + object rightFluid; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +860 +( +575 +576 +577 +578 +579 +595 +596 +597 +598 +599 +615 +616 +617 +618 +619 +635 +636 +637 +638 +639 +655 +656 +657 +658 +659 +675 +676 +677 +678 +679 +695 +696 +697 +698 +699 +715 +716 +717 +718 +719 +735 +736 +737 +738 +739 +755 +756 +757 +758 +759 +775 +776 +777 +778 +779 +795 +796 +797 +798 +799 +815 +816 +817 +818 +819 +835 +836 +837 +838 +839 +855 +856 +857 +858 +859 +875 +876 +877 +878 +879 +895 +896 +897 +898 +899 +915 +916 +917 +918 +919 +935 +936 +937 +938 +939 +955 +956 +957 +958 +959 +960 +961 +962 +963 +964 +965 +966 +967 +968 +969 +970 +971 +972 +973 +974 +975 +976 +977 +978 +979 +980 +981 +982 +983 +984 +985 +986 +987 +988 +989 +990 +991 +992 +993 +994 +995 +996 +997 +998 +999 +1000 +1001 +1002 +1003 +1004 +1005 +1006 +1007 +1008 +1009 +1010 +1011 +1012 +1013 +1014 +1015 +1016 +1017 +1018 +1019 +1020 +1021 +1022 +1023 +1024 +1025 +1026 +1027 +1028 +1029 +1030 +1031 +1032 +1033 +1034 +1035 +1036 +1037 +1038 +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052 +1053 +1054 +1055 +1056 +1057 +1058 +1059 +1060 +1061 +1062 +1063 +1064 +1065 +1066 +1067 +1068 +1069 +1070 +1071 +1072 +1073 +1074 +1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 +1083 +1084 +1085 +1086 +1087 +1088 +1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 +1118 +1119 +1120 +1121 +1122 +1123 +1124 +1125 +1126 +1127 +1128 +1129 +1130 +1131 +1132 +1133 +1134 +1135 +1136 +1137 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +1200 +1201 +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 +1211 +1212 +1213 +1214 +1215 +1216 +1217 +1218 +1219 +1220 +1221 +1222 +1223 +1224 +1225 +1226 +1227 +1228 +1229 +1230 +1231 +1232 +1233 +1234 +1235 +1236 +1237 +1238 +1239 +1240 +1241 +1242 +1243 +1244 +1245 +1246 +1247 +1248 +1249 +1250 +1251 +1252 +1253 +1254 +1255 +1256 +1257 +1258 +1259 +1260 +1261 +1262 +1263 +1264 +1265 +1266 +1267 +1268 +1269 +1270 +1271 +1272 +1273 +1274 +1275 +1276 +1277 +1278 +1279 +1280 +1281 +1282 +1283 +1284 +1285 +1286 +1287 +1288 +1289 +1290 +1291 +1292 +1293 +1294 +1295 +1296 +1297 +1298 +1299 +1300 +1301 +1302 +1303 +1304 +1305 +1306 +1307 +1308 +1309 +1310 +1311 +1312 +1313 +1314 +1315 +1316 +1317 +1318 +1319 +1320 +1321 +1322 +1323 +1324 +1325 +1326 +1327 +1328 +1329 +1330 +1331 +1332 +1333 +1334 +1335 +1336 +1337 +1338 +1339 +1340 +1341 +1342 +1343 +1344 +1345 +1346 +1347 +1348 +1349 +1350 +1351 +1352 +1353 +1354 +1355 +1356 +1357 +1358 +1359 +1360 +1361 +1362 +1363 +1364 +1365 +1366 +1367 +1368 +1369 +1370 +1371 +1372 +1373 +1374 +1375 +1376 +1377 +1378 +1379 +1380 +1381 +1382 +1383 +1384 +1385 +1386 +1387 +1388 +1389 +1390 +1391 +1392 +1393 +1394 +1395 +1396 +1397 +1398 +1399 +1400 +1401 +1402 +1403 +1404 +1405 +1406 +1407 +1408 +1409 +1410 +1411 +1412 +1413 +1414 +1415 +1416 +1417 +1418 +1419 +1420 +1421 +1422 +1423 +1424 +1425 +1426 +1427 +1428 +1429 +1430 +1431 +1432 +1433 +1434 +1435 +1436 +1437 +1438 +1439 +1440 +1441 +1442 +1443 +1444 +1445 +1446 +1447 +1448 +1449 +1450 +1451 +1452 +1453 +1454 +1455 +1456 +1457 +1458 +1459 +1460 +1461 +1462 +1463 +1464 +1465 +1466 +1467 +1468 +1469 +1470 +1471 +1472 +1473 +1474 +1475 +1476 +1477 +1478 +1479 +1480 +1481 +1482 +1483 +1484 +1485 +1486 +1487 +1488 +1489 +1490 +1491 +1492 +1493 +1494 +1495 +1496 +1497 +1498 +1499 +1500 +1501 +1502 +1503 +1504 +1505 +1506 +1507 +1508 +1509 +1510 +1511 +1512 +1513 +1514 +1515 +1516 +1517 +1518 +1519 +1520 +1521 +1522 +1523 +1524 +1525 +1526 +1527 +1528 +1529 +1530 +1531 +1532 +1533 +1534 +1535 +1536 +1537 +1538 +1539 +1540 +1541 +1542 +1543 +1544 +1545 +1546 +1547 +1548 +1549 +1550 +1551 +1552 +1553 +1554 +1555 +1556 +1557 +1558 +1559 +1560 +1561 +1562 +1563 +1564 +1565 +1566 +1567 +1568 +1569 +1570 +1571 +1572 +1573 +1574 +1575 +1576 +1577 +1578 +1579 +1580 +1581 +1582 +1583 +1584 +1585 +1586 +1587 +1588 +1589 +1590 +1591 +1592 +1593 +1594 +1595 +1596 +1597 +1598 +1599 +1600 +1601 +1602 +1603 +1604 +1605 +1606 +1607 +1608 +1609 +1610 +1611 +1612 +1613 +1614 +1615 +1616 +1617 +1618 +1619 +1620 +1621 +1622 +1623 +1624 +1625 +1626 +1627 +1628 +1629 +1630 +1631 +1632 +1633 +1634 +1635 +1636 +1637 +1638 +1639 +1640 +1641 +1642 +1643 +1644 +1645 +1646 +1647 +1648 +1649 +1650 +1651 +1652 +1653 +1654 +1655 +1656 +1657 +1658 +1659 +1660 +1661 +1662 +1663 +1664 +1665 +1666 +1667 +1668 +1669 +1670 +1671 +1672 +1673 +1674 +1675 +1676 +1677 +1678 +1679 +1680 +1681 +1682 +1683 +1684 +1685 +1686 +1687 +1688 +1689 +1690 +1691 +1692 +1693 +1694 +1695 +1696 +1697 +1698 +1699 +1700 +1701 +1702 +1703 +1704 +1705 +1706 +1707 +1708 +1709 +1710 +1711 +1712 +1713 +1714 +1715 +1716 +1717 +1718 +1719 +) + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/porousZones b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/porousZones new file mode 100644 index 0000000000000000000000000000000000000000..f938b2836e47c4ea4f1ffe254d9381dc282e7653 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/porousZones @@ -0,0 +1,36 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object porousZones; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +( + filter // name of cell zone + { + coordinateSystem + { + e1 (1 0 0); + e2 (0 1 1); + } + + Darcy + { + d d [0 -2 0 0 0 0 0] (5e7 -1000 -1000); + f f [0 -1 0 0 0 0 0] (0 0 0); + } + } +) + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/radiationProperties b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/radiationProperties new file mode 100644 index 0000000000000000000000000000000000000000..59468cd924256aa242b4f679efcef467ddf95b20 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/radiationProperties @@ -0,0 +1,65 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object radiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +radiation off; + +radiationModel P1; + +solverFreq 10; + +noRadiation +{ +} + +P1Coeffs +{ + C C [ 0 0 0 0 0 0 0 ] 0; +} + +absorptionEmissionModel binaryAbsorptionEmission; + +binaryAbsorptionEmissionCoeffs +{ + model1 + { + absorptionEmissionModel constantAbsorptionEmission; + constantAbsorptionEmissionCoeffs + { + a a [ 0 -1 0 0 0 0 0 ] 0.5; + e e [ 0 -1 0 0 0 0 0 ] 0.5; + E E [ 1 -1 -3 0 0 0 0 ] 0; + } + } + model2 + { + absorptionEmissionModel cloudAbsorptionEmission; + cloudAbsorptionEmissionCoeffs + { + cloudNames ( coalCloud1 limestoneCloud1 ); + } + } +} + +scatterModel cloudScatter; + +cloudScatterCoeffs +{ + cloudNames ( coalCloud1 limestoneCloud1 ); +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/reactingCloud1Positions b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/reactingCloud1Positions new file mode 100644 index 0000000000000000000000000000000000000000..6d19cbc19bad9ca1c5c8ba0b7c51cd24b0778b37 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/reactingCloud1Positions @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class vectorField; + location "constant"; + object reactingCloud1Positions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +( +(0.002 0.002 0.00005) +(0.004 0.002 0.00005) +(0.006 0.002 0.00005) +(0.008 0.002 0.00005) +(0.010 0.002 0.00005) +(0.002 0.004 0.00005) +(0.004 0.004 0.00005) +(0.006 0.004 0.00005) +(0.008 0.004 0.00005) +(0.010 0.004 0.00005) +(0.002 0.006 0.00005) +(0.004 0.006 0.00005) +(0.006 0.006 0.00005) +(0.008 0.006 0.00005) +(0.010 0.006 0.00005) +(0.002 0.008 0.00005) +(0.004 0.008 0.00005) +(0.006 0.008 0.00005) +(0.008 0.008 0.00005) +(0.010 0.008 0.00005) +(0.002 0.010 0.00005) +(0.004 0.010 0.00005) +(0.006 0.010 0.00005) +(0.008 0.010 0.00005) +(0.010 0.010 0.00005) +) +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/reactingCloud1Properties b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/reactingCloud1Properties new file mode 100644 index 0000000000000000000000000000000000000000..a1d4354ab1137adc7835e5cd87b3997653e0e40f --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/reactingCloud1Properties @@ -0,0 +1,167 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object reactingCloud1Properties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +InjectionModel ReactingLookupTableInjection; + +DragModel SphereDrag; + +DispersionModel none; + +PatchInteractionModel LocalInteraction; + +HeatTransferModel RanzMarshall; + +CompositionModel SinglePhaseMixture; + +PhaseChangeModel LiquidEvaporation; + +PostProcessingModel PatchPostProcessing; + +radiation off; + +coupled true; + +cellValueSourceCorrection on; + +parcelTypeId 1; + +constantProperties +{ + rhoMin rhoMin [ 1 -3 0 0 0 ] 1e-15; + TMin TMin [ 0 0 0 1 0 ] 200; + pMin pMin [ 1 -1 2 0 0 ] 1000; + rho0 rho0 [ 1 -3 0 0 0 ] 1000; + minParticleMass minParticleMass [ 1 0 0 0 0 ] 1e-15; + T0 T0 [ 0 0 0 1 0 ] 300; + cp0 cp0 [ 0 2 -2 -1 0 ] 4100; + epsilon0 epsilon0 [ 0 0 0 0 0 ] 1; + f0 f0 [ 0 0 0 0 0 ] 0.5; + Tvap Tvap [ 0 0 0 1 0 ] 273; + constantVolume false; +} + +interpolationSchemes +{ + rho cell; + U cellPointFace; + mu cell; + T cell; + Cp cell; + p cell; +} + +integrationSchemes +{ + U Euler; + T Analytical; +} + +particleForces +{ + gravity on; + virtualMass off; + Cvm 0.5; + pressureGradient off; + gradU gradU; +} + +ManualInjectionCoeffs +{ + massTotal massTotal [ 1 0 0 0 0 ] 1e-7; + parcelBasisType mass; + SOI 0; + positionsFile "reactingCloud1Positions"; + U0 ( 0 0 0 ); + parcelPDF + { + pdfType uniform; + uniformPDF + { + minValue 1e-04; + maxValue 1e-04; + } + } +} + +ReactingLookupTableInjectionCoeffs +{ + massTotal massTotal [ 1 0 0 0 0 ] 1e-7; + parcelBasisType mass; + SOI 0; + inputFile "parcelInjectionProperties"; + duration 1.0; + parcelsPerSecond 1e2; +} + + +StandardWallInteractionCoeffs +{ + e e [ 0 0 0 0 0 ] 1; + mu mu [ 0 0 0 0 0 ] 0; +} + +LocalInteractionCoeffs +{ + patches + ( + walls + { + e 1; + mu 0; + } + cycLeft + { + e 1; + mu 0; + } + ); +} + +RanzMarshallCoeffs +{ + Pr Pr [ 0 0 0 0 0 ] 0.7; +} + +SinglePhaseMixtureCoeffs +{ + phases + ( + liquid + { + H2O 1; + } + ); +} + +LiquidEvaporationCoeffs +{ + activeLiquids + ( + H2O + ); +} + +PatchPostProcessingCoeffs +{ + patches + ( + cycLeft + ); +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/thermophysicalProperties b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/thermophysicalProperties new file mode 100644 index 0000000000000000000000000000000000000000..04b13b12cf071d823be29a6c41dc37ec5ab58875 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/thermophysicalProperties @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType hMixtureThermo<reactingMixture>; + +chemistryReader foamChemistryReader; + +foamChemistryFile "$FOAM_CASE/chemkin/foam.inp"; + +foamChemistryThermoFile "$FOAM_CASE/chemkin/foam.dat"; + +liquidComponents ( H2O ); + +solidFuelComponents ( ); + +inertSpecie N2; + +H2O H2O defaultCoeffs; + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/turbulenceProperties b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..78f28eca604be4d8fc94d38d23ae0cbb679b18fb --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/constant/turbulenceProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RASModel; + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/cellSetDict b/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/cellSetDict new file mode 100644 index 0000000000000000000000000000000000000000..42393046f74652f8a8f671aac5d75b5b0504df03 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/cellSetDict @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object cellSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +name filter; + +action new; + +topoSetSources +( + // Cells with cell centre within box + boxToCell + { + box (1.5 -1 -1) (2 1 1); + } +); + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/controlDict b/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..a1aa89cd091f1ff7050767fd9afc25fdabc216b7 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/controlDict @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 5; + +deltaT 0.001; + +writeControl adjustableRunTime; + +writeInterval 0.1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 10; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 1.0; + +maxDeltaT 1; + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/decomposeParDict b/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..e9784a98d78f4c2d7f0435a759a78ad3f30a0226 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/decomposeParDict @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method metis; + +simpleCoeffs +{ + n ( 2 2 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 1 1 1 ); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + processorWeights ( 1 1 1 1 ); +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/fvSchemes b/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..99267208eae1f5130781bee35206d73e203fc64a --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/fvSchemes @@ -0,0 +1,72 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss upwind; + div(phid,p) Gauss upwind; + div(phiU,p) Gauss linear; + div(phi,h) Gauss upwind; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(U) Gauss linear; + div((muEff*dev2(grad(U).T()))) Gauss linear; + div(phi,Yi_h) Gauss upwind; +} + +laplacianSchemes +{ + default Gauss linear corrected; + laplacian(muEff,U) Gauss linear corrected; + laplacian(mut,U) Gauss linear corrected; + laplacian(DkEff,k) Gauss linear corrected; + laplacian(DepsilonEff,epsilon) Gauss linear corrected; + laplacian(DREff,R) Gauss linear corrected; + laplacian((rho*(1|A(U))),p) Gauss linear corrected; + laplacian(alphaEff,h) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p ; +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/fvSolution b/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..007553788aabe5cba859f93b043fc622f55414fb --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/fvSolution @@ -0,0 +1,154 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + rho + { + solver PCG; + preconditioner DIC; + tolerance 1e-05; + relTol 0; + } + U + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + p + { + solver GAMG; + + tolerance 1e-6; + relTol 0; + + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + + cacheAgglomeration true; + + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + }; + G + { + solver PCG; + preconditioner DIC; + tolerance 1e-05; + relTol 0; + } + Yi + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-06; + relTol 0; + } + CO2 + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-06; + relTol 0; + } + O2 + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-06; + relTol 0; + } + N2 + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-06; + relTol 0; + } + CH4 + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-06; + relTol 0; + } + H2 + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-06; + relTol 0; + } + H2O + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-06; + relTol 0; + } + CO + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-06; + relTol 0; + } + h + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + R + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + k + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + epsilon + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } +} + +PISO +{ + transonic no; + nOuterCorrectors 2; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + momentumPredictor yes; +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/sets.setSet b/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/sets.setSet new file mode 100644 index 0000000000000000000000000000000000000000..b6137ed52b04b0259a4cc4c5617c95a634d14e12 --- /dev/null +++ b/tutorials/lagrangian/trackedReactingParcelFoam/filter/system/sets.setSet @@ -0,0 +1,10 @@ +cellSet filter new boxToCell (1.5 -10 -10) (2 10 10) +cellSet leftFluid new boxToCell (-10 -10 -10) (1.5 10 10) +cellSet rightFluid new boxToCell (2 -1 -1) (10 10 10) + +faceSet cycLeft new cellToFace filter all +faceSet cycLeft subset cellToFace leftFluid all + +faceSet cycRight new cellToFace filter all +faceSet cycRight subset cellToFace rightFluid all +