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/README b/README index 093280c6fbdc88dfbd21a892c3cbbc9f4dbaf46d..bcce7c5da9b06f3fe8d227d9f3002691990040ba 100644 --- a/README +++ b/README @@ -14,11 +14,10 @@ General Public License terms under which you can copy the files. * System requirements - OpenFOAM is developed and tested on Linux, but should work with other Unix - style systems. To check your system setup, execute the foamSystemCheck script - in the bin/ directory of the OpenFOAM installation. If no problems are - reported, proceed to "3. Installation"; otherwise contact your system - administrator. + OpenFOAM is developed and tested on Linux, but should work with other POSIX + systems. To check your system setup, execute the foamSystemCheck script in + the bin/ directory of the OpenFOAM installation. If no problems are reported, + proceed to "3. Installation"; otherwise contact your system administrator. If the user wishes to run OpenFOAM in 32/64-bit mode they should consult the section "Running OpenFOAM in 32-bit mode". diff --git a/applications/solvers/Lagrangian/kinematicParcelFoam/Make/files b/applications/solvers/Lagrangian/kinematicParcelFoam/Make/files deleted file mode 100644 index a63fc64fa7371272e4c6f383b3181174750ea186..0000000000000000000000000000000000000000 --- a/applications/solvers/Lagrangian/kinematicParcelFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -kinematicParcelFoam.C - -EXE = $(FOAM_APPBIN)/kinematicParcelFoam diff --git a/applications/solvers/basic/potentialFoam/potentialFoam.C b/applications/solvers/basic/potentialFoam/potentialFoam.C index 9d2073bf2e3cf324d45b1d5cb6fffbe6fce4b531..49188fcf0086fd314654d0b74c5768ae90c4db37 100644 --- a/applications/solvers/basic/potentialFoam/potentialFoam.C +++ b/applications/solvers/basic/potentialFoam/potentialFoam.C @@ -97,7 +97,7 @@ int main(int argc, char *argv[]) U.write(); phi.write(); - if (args.options().found("writep")) + if (args.optionFound("writep")) { p.write(); } diff --git a/applications/solvers/combustion/coalChemistryFoam/Make/files b/applications/solvers/combustion/coalChemistryFoam/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..552d73450173870f57cee6a4b126b16fd63d08be --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/Make/files @@ -0,0 +1,3 @@ +coalChemistryFoam.C + +EXE = $(FOAM_APPBIN)/coalChemistryFoam diff --git a/applications/solvers/combustion/coalChemistryFoam/Make/options b/applications/solvers/combustion/coalChemistryFoam/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..d1dd07691bb4999db85d94725ccac1ee912e6173 --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/Make/options @@ -0,0 +1,39 @@ +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 \ + -lcoalCombustion\ + -lspecie \ + -lbasicThermophysicalModels \ + -lliquids \ + -lliquidMixture \ + -lsolids \ + -lsolidMixture \ + -lthermophysicalFunctions \ + -lcombustionThermophysicalModels \ + -lchemistryModel \ + -lradiation \ + -lODE diff --git a/applications/solvers/combustion/coalChemistryFoam/UEqn.H b/applications/solvers/combustion/coalChemistryFoam/UEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..b02a7c61e86523217ddf733841a2084e46cc2673 --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/UEqn.H @@ -0,0 +1,17 @@ + fvVectorMatrix UEqn + ( + fvm::ddt(rho, U) + + fvm::div(phi, U) + + turbulence->divDevRhoReff(U) + == + rho.dimensionedInternalField()*g + + coalParcels.SU() + + limestoneParcels.SU() + ); + + UEqn.relax(); + + if (momentumPredictor) + { + solve(UEqn == -fvc::grad(p)); + } diff --git a/applications/solvers/combustion/coalChemistryFoam/YEqn.H b/applications/solvers/combustion/coalChemistryFoam/YEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..5c84cfdb3f5eae620a53dd50b8a0d32e6abb1fac --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/YEqn.H @@ -0,0 +1,43 @@ +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) + == + coalParcels.Srho(i) + + kappa*chemistry.RR(i)().dimensionedInternalField() + ); + + Yi.max(0.0); + Yt += Yi; + } + else + { + inertIndex = i; + } + } + + Y[inertIndex] = scalar(1) - Yt; + Y[inertIndex].max(0.0); +} diff --git a/applications/solvers/combustion/coalChemistryFoam/additionalOutput.H b/applications/solvers/combustion/coalChemistryFoam/additionalOutput.H new file mode 100644 index 0000000000000000000000000000000000000000..9edd35eb7cab9acd294ba6a9e73b6ee8087b1c0d --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/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/combustion/coalChemistryFoam/chemistry.H b/applications/solvers/combustion/coalChemistryFoam/chemistry.H new file mode 100644 index 0000000000000000000000000000000000000000..07b1e9953b0db867186f6c668d27a9415a26c265 --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/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/combustion/coalChemistryFoam/coalChemistryFoam.C b/applications/solvers/combustion/coalChemistryFoam/coalChemistryFoam.C new file mode 100644 index 0000000000000000000000000000000000000000..f5fc4faea60a3445be00566bfcad67f9904cfbbc --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/coalChemistryFoam.C @@ -0,0 +1,134 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + coalChemistryFoam + +Description + Transient solver for compressible, turbulent flow with coal and + limestone parcel injections, and combustion. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "hCombustionThermo.H" +#include "turbulenceModel.H" +#include "basicThermoCloud.H" +#include "CoalCloud.H" +#include "chemistryModel.H" +#include "chemistrySolver.H" +#include "reactingThermoTypes.H" +#include "timeActivatedExplicitCellSource.H" +#include "radiationModel.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 "createClouds.H" + #include "createRadiationModel.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; + + rhoEffLagrangian = coalParcels.rhoEff() + limestoneParcels.rhoEff(); + pDyn = 0.5*rho*magSqr(U); + + coalParcels.evolve(); + + coalParcels.info(); + + Info<< endl; + + limestoneParcels.evolve(); + + limestoneParcels.info(); + + Info<< endl; + + #include "chemistry.H" + #include "rhoEqn.H" + + // --- PIMPLE loop + for (int ocorr=1; ocorr<=nOuterCorr; ocorr++) + { + #include "UEqn.H" + #include "YEqn.H" + #include "hEqn.H" + + // --- PISO loop + for (int corr=1; corr<=nCorr; corr++) + { + #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/combustion/coalChemistryFoam/createClouds.H b/applications/solvers/combustion/coalChemistryFoam/createClouds.H new file mode 100644 index 0000000000000000000000000000000000000000..4ed459b1507d7064f1a996c6aad3e0dcac95331b --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/createClouds.H @@ -0,0 +1,19 @@ +Info<< "\nConstructing coal cloud" << endl; +CoalCloud<specieReactingProperties> coalParcels +( + "coalCloud1", + rho, + U, + g, + thermo() +); + +Info<< "\nConstructing limestone cloud" << endl; +basicThermoCloud limestoneParcels +( + "limestoneCloud1", + rho, + U, + g, + thermo() +); diff --git a/applications/solvers/combustion/coalChemistryFoam/createFields.H b/applications/solvers/combustion/coalChemistryFoam/createFields.H new file mode 100644 index 0000000000000000000000000000000000000000..7232cc424478db7ab9195ca6fef16e61fdf98110 --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/createFields.H @@ -0,0 +1,129 @@ + Info<< "Reading thermophysical properties\n" << 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() + ); + + // lagrangian effective density field - used externally (optional) + volScalarField rhoEffLagrangian + ( + IOobject + ( + "rhoEffLagrangian", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("zero", dimDensity, 0.0) + ); + + // dynamic pressure field - used externally (optional) + volScalarField pDyn + ( + IOobject + ( + "pDyn", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("zero", dimPressure, 0.0) + ); + + + Info<< "\nReading field U\n" << 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\n" << endl; + autoPtr<compressible::turbulenceModel> turbulence + ( + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo() + ) + ); + + Info<< "Creating field DpDt\n" << endl; + volScalarField DpDt = + fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); + + Info<< "\nConstructing explicit enthalpy cell source" << endl; + timeActivatedExplicitCellSource enthalpySource + ( + "enthalpySource", + mesh, + h.dimensions()*phi.dimensions()/mesh.V().dimensions() + ); + + Info << "Constructing chemical mechanism" << endl; + chemistryModel chemistry + ( + thermo(), + rho + ); + + multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields; + + forAll (Y, i) + { + fields.add(Y[i]); + } + fields.add(h); diff --git a/applications/solvers/combustion/coalChemistryFoam/hEqn.H b/applications/solvers/combustion/coalChemistryFoam/hEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..6f0d5324379d84066f24c78911b6c0e6d32ab766 --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/hEqn.H @@ -0,0 +1,22 @@ +{ + fvScalarMatrix hEqn + ( + fvm::ddt(rho, h) + + fvm::div(phi, h) + - fvm::laplacian(turbulence->alphaEff(), h) + == + DpDt + + coalParcels.Sh() + + limestoneParcels.Sh() + + enthalpySource.Su() + + radiation->Sh(thermo()) + ); + + hEqn.relax(); + + hEqn.solve(); + + thermo->correct(); + + radiation->correct(); +} diff --git a/applications/solvers/combustion/coalChemistryFoam/pEqn.H b/applications/solvers/combustion/coalChemistryFoam/pEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..4a94c725bc13905bc9f015c54ed8741f7f7c8da4 --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/pEqn.H @@ -0,0 +1,72 @@ +rho = thermo->rho(); + +volScalarField rUA = 1.0/UEqn.A(); +U = rUA*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++) + { + fvScalarMatrix pEqn + ( + fvm::ddt(psi, p) + + fvm::div(phid, p) + - fvm::laplacian(rho*rUA, p) + == + coalParcels.Srho() + ); + + pEqn.solve(); + + if (nonOrth == nNonOrthCorr) + { + phi == pEqn.flux(); + } + } +} +else +{ + phi = + fvc::interpolate(rho)* + ( + (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rUA, rho, U, phi) + ); + + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvm::ddt(psi, p) + + fvc::div(phi) + - fvm::laplacian(rho*rUA, p) + == + coalParcels.Srho() + ); + + pEqn.solve(); + + if (nonOrth == nNonOrthCorr) + { + phi += pEqn.flux(); + } + } +} + +#include "rhoEqn.H" +#include "compressibleContinuityErrs.H" + +U -= rUA*fvc::grad(p); +U.correctBoundaryConditions(); + +DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/combustion/coalChemistryFoam/readChemistryProperties.H b/applications/solvers/combustion/coalChemistryFoam/readChemistryProperties.H new file mode 100644 index 0000000000000000000000000000000000000000..1a60e6fb34645a004fd39321f7a54d3bd5b45381 --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/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/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCECStencilObject.C b/applications/solvers/combustion/coalChemistryFoam/rhoEqn.H similarity index 83% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCECStencilObject.C rename to applications/solvers/combustion/coalChemistryFoam/rhoEqn.H index f27e24118f6928c4dc79332be76a88d839542df7..ce337f5acf76fdf2f21080c15ce27973d4fc93cf 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCECStencilObject.C +++ 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-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,17 +22,22 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -\*---------------------------------------------------------------------------*/ - -#include "upwindCECStencilObject.H" +Global + rhoEqn +Description + Solve the continuity for density. -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // +\*---------------------------------------------------------------------------*/ -namespace Foam { - defineTypeNameAndDebug(upwindCECStencilObject, 0); + solve + ( + fvm::ddt(rho) + + fvc::div(phi) + == + coalParcels.Srho() + ); } - // ************************************************************************* // diff --git a/applications/solvers/combustion/reactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/createFields.H index cf0532b0f3a9079454779e4cb04a1054277129b3..510f7d4236631404dea74eecb2886c3600d2cb4c 100644 --- a/applications/solvers/combustion/reactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/createFields.H @@ -37,7 +37,6 @@ volVectorField U volScalarField& p = thermo->p(); const volScalarField& psi = thermo->psi(); -const volScalarField& T = thermo->T(); volScalarField& h = thermo->h(); @@ -99,5 +98,5 @@ volScalarField dQ IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("zero", dimensionSet(1,-3,-1,0,0,0,0), 0.0) + dimensionedScalar("zero", dimensionSet(1, -3, -1, 0, 0, 0, 0), 0.0) ); 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/heatTransfer/chtMultiRegionFoam/Make/files b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/files index 9d9152930a9c359695a4e969886336ce38466f62..9b95197f541bfa2b20797804bf04054db815eb9f 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/files +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/files @@ -1,10 +1,6 @@ regionProperties/regionProperties.C -coupleManager/coupleManager.C - derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C -derivedFvPatchFields/solidWallHeatFluxTemperatureCoupled/solidWallHeatFluxTemperatureCoupledFvPatchScalarField.C -derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.C derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C fluid/compressibleCourantNo.C diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options index a8797ca4564489292b11cf720b6ce80816a67192..12316d6bc7b7f06ed9d1f31316b9fd5c616d7e4e 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options @@ -2,9 +2,7 @@ EXE_INC = \ -Ifluid \ -Isolid \ -IregionProperties \ - -IcoupleManager \ - -IderivedFvPatchFields/solidWallTemperatureCoupled \ - -IderivedFvPatchFields/solidWallHeatFluxTemperatureCoupled \ + -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C index faff0edba042b2976c9fca21ec5fb09a0d8d6bca..7ad940bcff1bf5910c2c78253d5068b78a80f768 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C @@ -67,6 +67,7 @@ int main(int argc, char *argv[]) while (runTime.run()) { # include "readTimeControls.H" +# include "readPIMPLEControls.H" if (fluidRegions.size()) { @@ -78,22 +79,36 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - forAll(fluidRegions, i) + if (nOuterCorr != 1) { - Info<< "\nSolving for fluid region " - << fluidRegions[i].name() << endl; -# include "setRegionFluidFields.H" -# include "readFluidMultiRegionPISOControls.H" -# include "solveFluid.H" + forAll(fluidRegions, i) + { +# include "setRegionFluidFields.H" +# include "storeOldFluidFields.H" + } } - forAll(solidRegions, i) + + // --- PIMPLE loop + for (int oCorr=0; oCorr<nOuterCorr; oCorr++) { - Info<< "\nSolving for solid region " - << solidRegions[i].name() << endl; -# include "setRegionSolidFields.H" -# include "readSolidMultiRegionPISOControls.H" -# include "solveSolid.H" + forAll(fluidRegions, i) + { + Info<< "\nSolving for fluid region " + << fluidRegions[i].name() << endl; +# include "setRegionFluidFields.H" +# include "readFluidMultiRegionPIMPLEControls.H" +# include "solveFluid.H" + } + + forAll(solidRegions, i) + { + Info<< "\nSolving for solid region " + << solidRegions[i].name() << endl; +# include "setRegionSolidFields.H" +# include "readSolidMultiRegionPIMPLEControls.H" +# include "solveSolid.H" + } } runTime.write(); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.C deleted file mode 100644 index 1668e1144c46f13024e37813296b96642fbcbc92..0000000000000000000000000000000000000000 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.C +++ /dev/null @@ -1,186 +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 "coupleManager.H" -#include "OFstream.H" -#include "regionProperties.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::coupleManager::coupleManager(const fvPatch& patch) -: - patch_(patch), - neighbourRegionName_("undefined-neighbourRegionName"), - neighbourPatchName_("undefined-neighbourPatchName"), - neighbourFieldName_("undefined-neighbourFieldName"), - localRegion_(patch_.boundaryMesh().mesh()) -{} - - -Foam::coupleManager::coupleManager -( - const fvPatch& patch, - const dictionary& dict -) -: - patch_(patch), - neighbourRegionName_(dict.lookup("neighbourRegionName")), - neighbourPatchName_(dict.lookup("neighbourPatchName")), - neighbourFieldName_(dict.lookup("neighbourFieldName")), - localRegion_(patch_.boundaryMesh().mesh()) -{} - - -Foam::coupleManager::coupleManager -( - const coupleManager& cm -) -: - patch_(cm.patch()), - neighbourRegionName_(cm.neighbourRegionName()), - neighbourPatchName_(cm.neighbourPatchName()), - neighbourFieldName_(cm.neighbourFieldName()), - localRegion_(patch_.boundaryMesh().mesh()) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::coupleManager::~coupleManager() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -bool Foam::coupleManager::regionOwner() const -{ - const fvMesh& nbrRegion = neighbourRegion(); - - const regionProperties& props = - localRegion_.objectRegistry::parent().lookupObject<regionProperties> - ( - "regionProperties" - ); - - label myIndex = findIndex(props.fluidRegionNames(), localRegion_.name()); - if (myIndex == -1) - { - label i = findIndex(props.solidRegionNames(), localRegion_.name()); - - if (i == -1) - { - FatalErrorIn("coupleManager::regionOwner() const") - << "Cannot find region " << localRegion_.name() - << " neither in fluids " << props.fluidRegionNames() - << " nor in solids " << props.solidRegionNames() - << exit(FatalError); - } - myIndex = props.fluidRegionNames().size() + i; - } - label nbrIndex = findIndex(props.fluidRegionNames(), nbrRegion.name()); - if (nbrIndex == -1) - { - label i = findIndex(props.solidRegionNames(), nbrRegion.name()); - - if (i == -1) - { - FatalErrorIn("coupleManager::regionOwner() const") - << "Cannot find region " << nbrRegion.name() - << " neither in fluids " << props.fluidRegionNames() - << " nor in solids " << props.solidRegionNames() - << exit(FatalError); - } - nbrIndex = props.fluidRegionNames().size() + i; - } - - return myIndex < nbrIndex; -} - - -void Foam::coupleManager::checkCouple() const -{ - Info<< "neighbourRegionName_ = " << neighbourRegionName_ << endl; - Info<< "neighbourPatchName_ = " << neighbourPatchName_ << endl; - Info<< "neighbourFieldName_ = " << neighbourFieldName_ << endl; - - const fvPatch& nPatch = neighbourPatch(); - - if (patch_.size() != nPatch.size()) - { - FatalErrorIn("Foam::coupleManager::checkCouple()") - << "Unequal patch sizes:" << nl - << " patch name (size) = " << patch_.name() - << "(" << patch_.size() << ")" << nl - << " neighbour patch name (size) = " - << nPatch.name() << "(" << patch_.size() << ")" << nl - << abort(FatalError); - } -} - - -void Foam::coupleManager::coupleToObj() const -{ - const fvPatch& nPatch = neighbourPatch(); - - OFstream obj - ( - patch_.name() + "_to_" + nPatch.name() + "_couple.obj" - ); - const vectorField& c1 = patch_.Cf(); - const vectorField& c2 = neighbourPatch().Cf(); - - if (c1.size() != c2.size()) - { - FatalErrorIn("coupleManager::coupleToObj() const") - << "Coupled patches are of unequal size:" << nl - << " patch0 = " << patch_.name() - << "(" << patch_.size() << ")" << nl - << " patch1 = " << nPatch.name() - << "(" << nPatch.size() << ")" << nl - << abort(FatalError); - } - - forAll(c1, i) - { - obj << "v " << c1[i].x() << " " << c1[i].y() << " " << c1[i].z() << nl - << "v " << c2[i].x() << " " << c2[i].y() << " " << c2[i].z() << nl - << "l " << (2*i + 1) << " " << (2*i + 2) << endl; - } -} - - -void Foam::coupleManager::writeEntries(Ostream& os) const -{ - os.writeKeyword("neighbourRegionName"); - os << neighbourRegionName_ << token::END_STATEMENT << nl; - os.writeKeyword("neighbourPatchName"); - os << neighbourPatchName_ << token::END_STATEMENT << nl; - os.writeKeyword("neighbourFieldName"); - os << neighbourFieldName_ << token::END_STATEMENT << nl; -} - - -// ************************************************************************* // diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.H deleted file mode 100644 index f1f73d23efe8505664cb5886dd3b37a5dc6727d2..0000000000000000000000000000000000000000 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.H +++ /dev/null @@ -1,170 +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 - -Class - coupleManager - -Description - Object to handle the coupling of region patches. It can be queried to - return the neighbour information. - -SourceFiles - coupleManager.C - -\*---------------------------------------------------------------------------*/ - -#ifndef coupleManager_H -#define coupleManager_H - -#include "Ostream.H" -#include "dictionary.H" -#include "fvPatch.H" -#include "fvMesh.H" -#include "Time.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class coupleManager Declaration -\*---------------------------------------------------------------------------*/ - -class coupleManager -{ - // Private data - - //- Reference to the local fvPatch - const fvPatch& patch_; - - //- Name of neighbour region - word neighbourRegionName_; - - //- Name of patch on the neighbour region - word neighbourPatchName_; - - //- Name of field on the neighbour region - word neighbourFieldName_; - - //- Reference to the local region - const fvMesh& localRegion_; - - - // Private Member Functions - - //- Disallow default bitwise assignment - void operator=(const coupleManager&); - - -public: - - // Constructors - - //- Construct from fvPatch - coupleManager(const fvPatch& patch); - - //- Construct from fvPatch and dictionary - coupleManager(const fvPatch& patch, const dictionary& dict); - - //- Copy constructor - coupleManager(const coupleManager& cm); - - - // Destructor - - ~coupleManager(); - - - // Member Functions - - // Access - - //- Return a reference to the local patch - inline const fvPatch& patch() const; - - //- Return the name of the neighbour region - inline const word& neighbourRegionName() const; - - //- Return the name of the patch on the neighbour region - inline const word& neighbourPatchName() const; - - //- Return the name of the field on the neighbour region - inline const word& neighbourFieldName() const; - - //- Return a reference to the neighbour mesh - inline const fvMesh& neighbourRegion() const; - - //- Return the neighbour patch ID - inline label neighbourPatchID() const; - - //- Return a reference to the neighbour patch - inline const fvPatch& neighbourPatch() const; - - //- Return a reference to the neighbour patch field - template<class Type> - inline const fvPatchField<Type>& neighbourPatchField() const; - - //- Am I owner (= first to evaluate) of this region interface? - bool regionOwner() const; - - //- Check that the couple is valid - void checkCouple() const; - - - // Edit - - //- Return the name of the neighbour region - word& neighbourRegionName(); - - //- Return the name of the patch on the neighbour region - word& neighbourPatchName(); - - //- Return the name of the field on the neighbour region - word& neighbourFieldName(); - - - // Write - - //- Write couple to obj file - void coupleToObj() const; - - //- Write entries for patches - void writeEntries(Ostream& os) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "coupleManagerI.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManagerI.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManagerI.H deleted file mode 100644 index 45e059ebae27d425e90403927352f7f36c5e8cde..0000000000000000000000000000000000000000 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManagerI.H +++ /dev/null @@ -1,98 +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 - -\*---------------------------------------------------------------------------*/ - -inline const Foam::fvPatch& Foam::coupleManager::patch() const -{ - return patch_; -}; - - -inline const Foam::word& Foam::coupleManager::neighbourRegionName() const -{ - return neighbourRegionName_; -}; - - -inline const Foam::word& Foam::coupleManager::neighbourPatchName() const -{ - return neighbourPatchName_; -}; - - -inline const Foam::word& Foam::coupleManager::neighbourFieldName() const -{ - return neighbourFieldName_; -}; - - -inline const Foam::fvMesh& Foam::coupleManager::neighbourRegion() const -{ - return localRegion_.objectRegistry::parent() - .lookupObject<fvMesh>(neighbourRegionName_); -} - - -inline Foam::label Foam::coupleManager::neighbourPatchID() const -{ - return neighbourRegion().boundaryMesh().findPatchID(neighbourPatchName_); -} - - -inline const Foam::fvPatch& Foam::coupleManager::neighbourPatch() const -{ - return neighbourRegion().boundary()[neighbourPatchID()]; -} - - -template<class Type> -inline const Foam::fvPatchField<Type>& -Foam::coupleManager::neighbourPatchField() const -{ - return neighbourPatch().lookupPatchField - <GeometricField<Type, fvPatchField, volMesh>, Type> - (neighbourFieldName_); -} - - -inline Foam::word& Foam::coupleManager::neighbourRegionName() -{ - return neighbourRegionName_; -}; - - -inline Foam::word& Foam::coupleManager::neighbourPatchName() -{ - return neighbourPatchName_; -}; - - -inline Foam::word& Foam::coupleManager::neighbourFieldName() -{ - return neighbourFieldName_; -}; - - -// ************************************************************************* // diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperatureCoupled/solidWallHeatFluxTemperatureCoupledFvPatchScalarField.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperatureCoupled/solidWallHeatFluxTemperatureCoupledFvPatchScalarField.C deleted file mode 100644 index 07bcac29a683edc4dcb95805f63df358f7613d77..0000000000000000000000000000000000000000 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperatureCoupled/solidWallHeatFluxTemperatureCoupledFvPatchScalarField.C +++ /dev/null @@ -1,150 +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 "solidWallHeatFluxTemperatureCoupledFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" - -#include "solidWallTemperatureCoupledFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::solidWallHeatFluxTemperatureCoupledFvPatchScalarField:: -solidWallHeatFluxTemperatureCoupledFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedGradientFvPatchScalarField(p, iF), - coupleManager_(p), - KName_("undefined-K") -{} - - -Foam::solidWallHeatFluxTemperatureCoupledFvPatchScalarField:: -solidWallHeatFluxTemperatureCoupledFvPatchScalarField -( - const solidWallHeatFluxTemperatureCoupledFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedGradientFvPatchScalarField(ptf, p, iF, mapper), - coupleManager_(ptf.coupleManager_), - KName_(ptf.KName_) -{} - - -Foam::solidWallHeatFluxTemperatureCoupledFvPatchScalarField:: -solidWallHeatFluxTemperatureCoupledFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - fixedGradientFvPatchScalarField(p, iF), - coupleManager_(p, dict), - KName_(dict.lookup("K")) -{ - if (dict.found("value")) - { - fvPatchField<scalar>::operator= - ( - scalarField("value", dict, p.size()) - ); - } - else - { - evaluate(); - } -} - - -Foam::solidWallHeatFluxTemperatureCoupledFvPatchScalarField:: -solidWallHeatFluxTemperatureCoupledFvPatchScalarField -( - const solidWallHeatFluxTemperatureCoupledFvPatchScalarField& whftcsf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedGradientFvPatchScalarField(whftcsf, iF), - coupleManager_(whftcsf.coupleManager_), - KName_(whftcsf.KName_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::solidWallHeatFluxTemperatureCoupledFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const fvPatchField<scalar>& neighbourField = - coupleManager_.neighbourPatchField<scalar>(); - - const fvPatchField<scalar>& K = - patch().lookupPatchField<volScalarField, scalar>(KName_); - - gradient() = -refCast<const solidWallTemperatureCoupledFvPatchScalarField> - (neighbourField).flux()/K; - - fixedGradientFvPatchScalarField::updateCoeffs(); -} - - -void Foam::solidWallHeatFluxTemperatureCoupledFvPatchScalarField::write -( - Ostream& os -) const -{ - fvPatchScalarField::write(os); - coupleManager_.writeEntries(os); - os.writeKeyword("K") << KName_ << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -makePatchTypeField -( - fvPatchScalarField, - solidWallHeatFluxTemperatureCoupledFvPatchScalarField -); - -} // End namespace Foam - -// ************************************************************************* // diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperatureCoupled/solidWallHeatFluxTemperatureCoupledFvPatchScalarField.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperatureCoupled/solidWallHeatFluxTemperatureCoupledFvPatchScalarField.H deleted file mode 100644 index b7867ca8ce4a125415906382d43c43cedb916339..0000000000000000000000000000000000000000 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperatureCoupled/solidWallHeatFluxTemperatureCoupledFvPatchScalarField.H +++ /dev/null @@ -1,165 +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 - -Class - solidWallHeatFluxTemperatureCoupledFvPatchScalarField - -Description - Fixed heat-flux boundary condition for temperature, to be used by the - conjugate heat transfer solver. - - Example usage: - myInterfacePatchName - { - type solidWallHeatFluxTemperatureCoupled; - neighbourRegionName fluid; - neighbourPatchName fluidSolidInterface; - neighbourFieldName T; - K K; - value uniform 300; - } - -SourceFiles - solidWallHeatFluxTemperatureCoupledFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef solidWallHeatFluxTemperatureCoupledFvPatchScalarField_H -#define solidWallHeatFluxTemperatureCoupledFvPatchScalarField_H - -#include "fvPatchFields.H" -#include "fixedGradientFvPatchFields.H" -#include "coupleManager.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class solidWallHeatFluxTemperatureCoupledFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class solidWallHeatFluxTemperatureCoupledFvPatchScalarField -: - public fixedGradientFvPatchScalarField -{ - // Private data - - //- Couple manager object - coupleManager coupleManager_; - - //- Name of thermal conductivity field - word KName_; - - -public: - - //- Runtime type information - TypeName("solidWallHeatFluxTemperatureCoupled"); - - - // Constructors - - //- Construct from patch and internal field - solidWallHeatFluxTemperatureCoupledFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - solidWallHeatFluxTemperatureCoupledFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // solidWallHeatFluxTemperatureCoupledFvPatchScalarField - // onto a new patch - solidWallHeatFluxTemperatureCoupledFvPatchScalarField - ( - const solidWallHeatFluxTemperatureCoupledFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new solidWallHeatFluxTemperatureCoupledFvPatchScalarField - ( - *this - ) - ); - } - - //- Construct as copy setting internal field reference - solidWallHeatFluxTemperatureCoupledFvPatchScalarField - ( - const solidWallHeatFluxTemperatureCoupledFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new solidWallHeatFluxTemperatureCoupledFvPatchScalarField - ( - *this, - iF - ) - ); - } - - - // Member functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C index b6bcfffa3f63f947ec0a84734b12df7ff39893a4..5bec5673108e4cd0c0684e041b6443f769c0ff55 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C @@ -28,8 +28,62 @@ License #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volFields.H" +#include "directMappedPatchBase.H" #include "regionProperties.H" +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +bool Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::interfaceOwner +( + const polyMesh& nbrRegion +) const +{ + const fvMesh& myRegion = patch().boundaryMesh().mesh(); + + const regionProperties& props = + myRegion.objectRegistry::parent().lookupObject<regionProperties> + ( + "regionProperties" + ); + + label myIndex = findIndex(props.fluidRegionNames(), myRegion.name()); + if (myIndex == -1) + { + label i = findIndex(props.solidRegionNames(), myRegion.name()); + + if (i == -1) + { + FatalErrorIn + ( + "solidWallMixedTemperatureCoupledFvPatchScalarField" + "::interfaceOwner(const polyMesh&) const" + ) << "Cannot find region " << myRegion.name() + << " neither in fluids " << props.fluidRegionNames() + << " nor in solids " << props.solidRegionNames() + << exit(FatalError); + } + myIndex = props.fluidRegionNames().size() + i; + } + label nbrIndex = findIndex(props.fluidRegionNames(), nbrRegion.name()); + if (nbrIndex == -1) + { + label i = findIndex(props.solidRegionNames(), nbrRegion.name()); + + if (i == -1) + { + FatalErrorIn("coupleManager::interfaceOwner(const polyMesh&) const") + << "Cannot find region " << nbrRegion.name() + << " neither in fluids " << props.fluidRegionNames() + << " nor in solids " << props.solidRegionNames() + << exit(FatalError); + } + nbrIndex = props.fluidRegionNames().size() + i; + } + + return myIndex < nbrIndex; +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::solidWallMixedTemperatureCoupledFvPatchScalarField:: @@ -40,7 +94,7 @@ solidWallMixedTemperatureCoupledFvPatchScalarField ) : mixedFvPatchScalarField(p, iF), - coupleManager_(p), + neighbourFieldName_("undefined-neighbourFieldName"), KName_("undefined-K") { this->refValue() = 0.0; @@ -60,7 +114,7 @@ solidWallMixedTemperatureCoupledFvPatchScalarField ) : mixedFvPatchScalarField(ptf, p, iF, mapper), - coupleManager_(ptf.coupleManager_), + neighbourFieldName_(ptf.neighbourFieldName_), KName_(ptf.KName_), fixesValue_(ptf.fixesValue_) {} @@ -75,14 +129,46 @@ solidWallMixedTemperatureCoupledFvPatchScalarField ) : mixedFvPatchScalarField(p, iF), - coupleManager_(p, dict), + neighbourFieldName_(dict.lookup("neighbourFieldName")), KName_(dict.lookup("K")) { + if (!isA<directMappedPatchBase>(this->patch().patch())) + { + FatalErrorIn + ( + "solidWallMixedTemperatureCoupledFvPatchScalarField::" + "solidWallMixedTemperatureCoupledFvPatchScalarField\n" + "(\n" + " const fvPatch& p,\n" + " const DimensionedField<scalar, volMesh>& iF,\n" + " const dictionary& dict\n" + ")\n" + ) << "\n patch type '" << p.type() + << "' not type '" << directMappedPatchBase::typeName << "'" + << "\n for patch " << p.name() + << " of field " << dimensionedInternalField().name() + << " in file " << dimensionedInternalField().objectPath() + << exit(FatalError); + } + fvPatchScalarField::operator=(scalarField("value", dict, p.size())); - refValue() = static_cast<scalarField>(*this); - refGrad() = 0.0; - valueFraction() = 1.0; - fixesValue_ = true; + + if (dict.found("refValue")) + { + // Full restart + refValue() = scalarField("refValue", dict, p.size()); + refGrad() = scalarField("refGradient", dict, p.size()); + valueFraction() = scalarField("valueFraction", dict, p.size()); + fixesValue_ = readBool(dict.lookup("fixesValue")); + } + else + { + // Start from user entered data. Assume fixedValue. + refValue() = *this; + refGrad() = 0.0; + valueFraction() = 1.0; + fixesValue_ = true; + } } @@ -94,7 +180,7 @@ solidWallMixedTemperatureCoupledFvPatchScalarField ) : mixedFvPatchScalarField(wtcsf, iF), - coupleManager_(wtcsf.coupleManager_), + neighbourFieldName_(wtcsf.neighbourFieldName_), KName_(wtcsf.KName_), fixesValue_(wtcsf.fixesValue_) {} @@ -116,33 +202,111 @@ void Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::updateCoeffs() return; } + // Get the coupling information from the directMappedPatchBase + const directMappedPatchBase& mpp = refCast<const directMappedPatchBase> + ( + patch().patch() + ); + const polyMesh& nbrMesh = mpp.sampleMesh(); + tmp<scalarField> intFld = patchInternalField(); + if (interfaceOwner(nbrMesh)) + { + // Note: other side information could be cached - it only needs + // to be updated the first time round the iteration (i.e. when + // switching regions) but unfortunately we don't have this information. + + const mapDistribute& distMap = mpp.map(); + const fvPatch& nbrPatch = refCast<const fvMesh> + ( + nbrMesh + ).boundary()[mpp.samplePolyPatch().index()]; + + + // Calculate the temperature by harmonic averaging + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + const solidWallMixedTemperatureCoupledFvPatchScalarField& nbrField = + refCast<const solidWallMixedTemperatureCoupledFvPatchScalarField> + ( + nbrPatch.lookupPatchField<volScalarField, scalar> + ( + neighbourFieldName_ + ) + ); + + // Swap to obtain full local values of neighbour internal field + scalarField nbrIntFld = nbrField.patchInternalField(); + mapDistribute::distribute + ( + Pstream::defaultCommsType, + distMap.schedule(), + distMap.constructSize(), + distMap.subMap(), // what to send + distMap.constructMap(), // what to receive + nbrIntFld + ); + + // Swap to obtain full local values of neighbour K*delta + scalarField nbrKDelta = nbrField.K()*nbrPatch.deltaCoeffs(); + mapDistribute::distribute + ( + Pstream::defaultCommsType, + distMap.schedule(), + distMap.constructSize(), + distMap.subMap(), // what to send + distMap.constructMap(), // what to receive + nbrKDelta + ); + + + tmp<scalarField> myKDelta = K()*patch().deltaCoeffs(); + + // Calculate common wall temperature. Reuse *this to store common value. + scalarField Twall + ( + (myKDelta()*intFld() + nbrKDelta*nbrIntFld) + / (myKDelta() + nbrKDelta) + ); + // Assign to me + fvPatchScalarField::operator=(Twall); + // Distribute back and assign to neighbour + mapDistribute::distribute + ( + Pstream::defaultCommsType, + distMap.schedule(), + nbrField.size(), + distMap.constructMap(), // reverse : what to send + distMap.subMap(), + Twall + ); + const_cast<solidWallMixedTemperatureCoupledFvPatchScalarField&> + ( + nbrField + ).fvPatchScalarField::operator=(Twall); + } + + + // Switch between fixed value (of harmonic avg) or gradient + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + label nFixed = 0; // Like snGrad but bypass switching on refValue/refGrad. - tmp<scalarField> normalGradient = - (*this-intFld()) - * patch().deltaCoeffs(); + tmp<scalarField> normalGradient = (*this-intFld())*patch().deltaCoeffs(); if (debug) { + scalar Q = gSum(K()*patch().magSf()*normalGradient()); + Info<< "solidWallMixedTemperatureCoupledFvPatchScalarField::" << "updateCoeffs() :" << " patch:" << patch().name() + << " heatFlux:" << Q << " walltemperature " - << " min:" - << returnReduce - ( - (this->size() > 0 ? min(*this) : VGREAT), - minOp<scalar>() - ) - << " max:" - << returnReduce - ( - (this->size() > 0 ? max(*this) : -VGREAT), - maxOp<scalar>() - ) + << " min:" << gMin(*this) + << " max:" << gMax(*this) << " avg:" << gAverage(*this) << endl; } @@ -150,7 +314,7 @@ void Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::updateCoeffs() forAll(*this, i) { // if outgoing flux use fixed value. - if (intFld()[i] > operator[](i)) + if (normalGradient()[i] < 0.0) { this->refValue()[i] = operator[](i); this->refGrad()[i] = 0.0; // not used @@ -185,80 +349,16 @@ void Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::updateCoeffs() } -void Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::evaluate -( - const Pstream::commsTypes -) -{ - if (!this->updated()) - { - this->updateCoeffs(); - } - - if (!coupleManager_.regionOwner()) - { - // I am the last one to evaluate. - - tmp<scalarField> intFld = patchInternalField(); - - const fvPatch& nbrPatch = coupleManager_.neighbourPatch(); - - solidWallMixedTemperatureCoupledFvPatchScalarField& nbrField = - refCast<solidWallMixedTemperatureCoupledFvPatchScalarField> - ( - const_cast<fvPatchField<scalar>&> - ( - coupleManager_.neighbourPatchField<scalar>() - ) - ); - tmp<scalarField> nbrIntFld = nbrField.patchInternalField(); - tmp<scalarField> myKDelta = K()*patch().deltaCoeffs(); - tmp<scalarField> nbrKDelta = nbrField.K()*nbrPatch.deltaCoeffs(); - - // Calculate common wall temperature and assign to both sides - scalarField::operator= - ( - (myKDelta()*intFld + nbrKDelta()*nbrIntFld) - / (myKDelta() + nbrKDelta()) - ); - - nbrField.scalarField::operator=(*this); - - if (debug) - { - Info<< "solidWallMixedTemperatureCoupledFvPatchScalarField::" - << "updateCoeffs() :" - << " patch:" << patch().name() - << " setting master and slave to wall temperature " - << " min:" - << returnReduce - ( - (this->size() > 0 ? min(*this) : VGREAT), - minOp<scalar>() - ) - << " max:" - << returnReduce - ( - (this->size() > 0 ? max(*this) : -VGREAT), - maxOp<scalar>() - ) - << " avg:" << gAverage(*this) - << endl; - } - } - - fvPatchScalarField::evaluate(); -} - - void Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::write ( Ostream& os ) const { mixedFvPatchScalarField::write(os); - coupleManager_.writeEntries(os); + os.writeKeyword("neighbourFieldName")<< neighbourFieldName_ + << token::END_STATEMENT << nl; os.writeKeyword("K") << KName_ << token::END_STATEMENT << nl; + os.writeKeyword("fixesValue") << fixesValue_ << token::END_STATEMENT << nl; } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.H index 34c32b1abf4204864d1cc7268ecf3e5874a25d36..f4abacf648aad7283f04baa44b8ad29f856a54db 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.H @@ -37,13 +37,22 @@ Description myInterfacePatchName { type solidWallMixedTemperatureCoupled; - neighbourRegionName fluid; - neighbourPatchName fluidSolidInterface; neighbourFieldName T; K K; value uniform 300; } + Needs to be on underlying directMapped(Wall)FvPatch. + + Note: runs in parallel with arbitrary decomposition. Uses directMapped + functionality to calculate exchange. + + Note: lags interface data so both sides use same data. + - problem: schedule to calculate average would interfere + with standard processor swaps. + - so: updateCoeffs sets both to same Twall. Only need to do + this for last outer iteration but don't have access to this. + SourceFiles solidWallMixedTemperatureCoupledFvPatchScalarField.C @@ -54,7 +63,6 @@ SourceFiles #include "fvPatchFields.H" #include "mixedFvPatchFields.H" -#include "coupleManager.H" #include "fvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -72,14 +80,21 @@ class solidWallMixedTemperatureCoupledFvPatchScalarField { // Private data - //- Couple manager object - coupleManager coupleManager_; - + //- Name of field on the neighbour region + const word neighbourFieldName_; + //- Name of thermal conductivity field - word KName_; + const word KName_; bool fixesValue_; + + // Private Member Functions + + //- Am I or neighbour owner of interface + bool interfaceOwner(const polyMesh& nbrRegion) const; + + public: //- Runtime type information @@ -162,12 +177,6 @@ public: //- Update the coefficients associated with the patch field virtual void updateCoeffs(); - //- Evaluate the patch field - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::blocking - ); - //- Write virtual void write(Ostream&) const; }; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.C deleted file mode 100644 index 05bbdd1ba3fb75adce7642f1afd732f8c87d3c3d..0000000000000000000000000000000000000000 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.C +++ /dev/null @@ -1,156 +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 "solidWallTemperatureCoupledFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::solidWallTemperatureCoupledFvPatchScalarField:: -solidWallTemperatureCoupledFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchScalarField(p, iF), - coupleManager_(p), - KName_("undefined-K") -{} - - -Foam::solidWallTemperatureCoupledFvPatchScalarField:: -solidWallTemperatureCoupledFvPatchScalarField -( - const solidWallTemperatureCoupledFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchScalarField(ptf, p, iF, mapper), - coupleManager_(ptf.coupleManager_), - KName_(ptf.KName_) -{} - - -Foam::solidWallTemperatureCoupledFvPatchScalarField:: -solidWallTemperatureCoupledFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& dict -) -: - fixedValueFvPatchScalarField(p, iF), - coupleManager_(p, dict), - KName_(dict.lookup("K")) -{ - if (dict.found("value")) - { - fvPatchField<scalar>::operator= - ( - scalarField("value", dict, p.size()) - ); - } - else - { - evaluate(); - } -} - - -Foam::solidWallTemperatureCoupledFvPatchScalarField:: -solidWallTemperatureCoupledFvPatchScalarField -( - const solidWallTemperatureCoupledFvPatchScalarField& wtcsf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedValueFvPatchScalarField(wtcsf, iF), - coupleManager_(wtcsf.coupleManager_), - KName_(wtcsf.KName_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::solidWallTemperatureCoupledFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const fvPatchField<scalar>& neighbourField = - coupleManager_.neighbourPatchField<scalar>(); - - operator==(neighbourField); - - fixedValueFvPatchScalarField::updateCoeffs(); -} - - -void Foam::solidWallTemperatureCoupledFvPatchScalarField::write -( - Ostream& os -) const -{ - fvPatchScalarField::write(os); - coupleManager_.writeEntries(os); - os.writeKeyword("K") << KName_ << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -Foam::tmp<Foam::scalarField> -Foam::solidWallTemperatureCoupledFvPatchScalarField::flux() const -{ - const fvPatchScalarField& Kw = - patch().lookupPatchField<volScalarField, scalar>(KName_); - - const fvPatchScalarField& Tw = *this; - - return Tw.snGrad()*Kw; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -makePatchTypeField -( - fvPatchScalarField, - solidWallTemperatureCoupledFvPatchScalarField -); - -} // End namespace Foam - -// ************************************************************************* // diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.H deleted file mode 100644 index 22fd168175134eb812ac447caac3d397dee21df3..0000000000000000000000000000000000000000 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.H +++ /dev/null @@ -1,160 +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 - -Class - solidWallHeatFluxCoupledFvPatchScalarField - -Description - Fixed value boundary condition for temperature, to be used by the - conjugate heat transfer solver. - - Example usage: - myInterfacePatchName - { - type solidWallTemperatureCoupled; - neighbourRegionName fluid; - neighbourPatchName fluidSolidInterface; - neighbourFieldName T; - K K; - value uniform 300; - } - -SourceFiles - solidWallTemperatureCoupledFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef solidWallTemperatureCoupledFvPatchScalarField_H -#define solidWallTemperatureCoupledFvPatchScalarField_H - -#include "fvPatchFields.H" -#include "fixedValueFvPatchFields.H" -#include "coupleManager.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class solidWallTemperatureCoupledFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class solidWallTemperatureCoupledFvPatchScalarField -: - public fixedValueFvPatchScalarField -{ - // Private data - - //- Couple manager object - coupleManager coupleManager_; - - //- Name of thermal conductivity field - word KName_; - - -public: - - //- Runtime type information - TypeName("solidWallTemperatureCoupled"); - - - // Constructors - - //- Construct from patch and internal field - solidWallTemperatureCoupledFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - solidWallTemperatureCoupledFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given solidWallTemperatureCoupledFvPatchScalarField - // onto a new patch - solidWallTemperatureCoupledFvPatchScalarField - ( - const solidWallTemperatureCoupledFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new solidWallTemperatureCoupledFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - solidWallTemperatureCoupledFvPatchScalarField - ( - const solidWallTemperatureCoupledFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new solidWallTemperatureCoupledFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - //- (intensive) flux - tmp<scalarField> flux() const; - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H index e719d92433926797b7850dc356ade232228ba502..65467f80864609f9225e9d058b9568890c500988 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H @@ -14,12 +14,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/chtMultiRegionFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H index 1f6e50de0a3872b76c239e920f054d5e1cb54ea2..fd9624685f8fcc07cc4f82d014676fb469bbd064 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H @@ -6,43 +6,15 @@ PtrList<surfaceScalarField> phiFluid(fluidRegions.size()); PtrList<compressible::turbulenceModel> turbulence(fluidRegions.size()); PtrList<volScalarField> DpDtFluid(fluidRegions.size()); - PtrList<volScalarField> ghFluid(fluidRegions.size()); - PtrList<surfaceScalarField> ghfFluid(fluidRegions.size()); - PtrList<volScalarField> pdFluid(fluidRegions.size()); List<scalar> initialMassFluid(fluidRegions.size()); - dimensionedScalar pRef - ( - "pRef", - dimensionSet(1, -1, -2, 0, 0), - rp.lookup("pRef") - ); - // Populate fluid field pointer lists forAll(fluidRegions, i) { Info<< "*** Reading fluid mesh thermophysical properties for region " << fluidRegions[i].name() << nl << endl; - Info<< " Adding to pdFluid\n" << endl; - pdFluid.set - ( - i, - new volScalarField - ( - IOobject - ( - "pd", - runTime.timeName(), - fluidRegions[i], - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - fluidRegions[i] - ) - ); - Info<< " Adding to thermoFluid\n" << endl; thermoFluid.set ( @@ -145,6 +117,7 @@ i, new volScalarField ( + "DpDt", fvc::DDt ( surfaceScalarField @@ -157,36 +130,5 @@ ) ); - const dictionary& environmentalProperties = - fluidRegions[i].lookupObject<IOdictionary> - ("environmentalProperties"); - dimensionedVector g(environmentalProperties.lookup("g")); - - Info<< " Adding to ghFluid\n" << endl; - ghFluid.set - ( - i, - new volScalarField - ( - "gh", - g & fluidRegions[i].C() - ) - ); - ghfFluid.set - ( - i, - new surfaceScalarField - ( - "ghf", - g & fluidRegions[i].Cf() - ) - ); - - Info<< " Updating p from pd\n" << endl; - thermoFluid[i].p() == pdFluid[i] + rhoFluid[i]*ghFluid[i] + pRef; - thermoFluid[i].correct(); - initialMassFluid[i] = fvc::domainIntegrate(rhoFluid[i]).value(); } - - diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/hEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/hEqn.H index 7f2202d5937d4e17ab988aef292979339269aabb..e070537db2c701e27baafd6cf64ef015e3898100 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/hEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/hEqn.H @@ -1,5 +1,5 @@ { - tmp<fvScalarMatrix> hEqn + fvScalarMatrix hEqn ( fvm::ddt(rho, h) + fvm::div(phi, h) @@ -7,8 +7,16 @@ == DpDt ); - hEqn().relax(); - hEqn().solve(); + if (oCorr == nOuterCorr-1) + { + hEqn.relax(); + hEqn.solve(mesh.solver("hFinal")); + } + else + { + hEqn.relax(); + hEqn.solve(); + } thermo.correct(); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H index e297989809aaa930b9c0be00e3049842869e44aa..a264b68fe5eab2388d38ca1aaf75a3f416db2330 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H @@ -1,5 +1,5 @@ { - bool closedVolume = pd.needReference(); + bool closedVolume = p.needReference(); rho = thermo.rho(); @@ -17,31 +17,34 @@ ) ); - phi = phiU - ghf*fvc::snGrad(rho)*rhorUAf*mesh.magSf(); + phi = phiU + fvc::interpolate(rho)*(g & mesh.Sf())*rhorUAf; 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(rho*rUA, pd) + - fvm::laplacian(rhorUAf, p) ); - if (corr == nCorr-1 && nonOrth == nNonOrthCorr) + if + ( + oCorr == nOuterCorr-1 + && 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(); } } @@ -49,27 +52,24 @@ U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf); U.correctBoundaryConditions(); - // Update pressure field (including bc) - p == pd + rho*gh + pRef; + // Update pressure substantive derivative DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); // Solve continuity -# include "rhoEqn.H" + #include "rhoEqn.H" // Update continuity errors -# include "compressibleContinuityErrors.H" + #include "compressibleContinuityErrors.H" // For closed-volume cases adjust the pressure and density levels // to obey overall mass continuity if (closedVolume) { - p += (massIni - fvc::domainIntegrate(psi*p))/fvc::domainIntegrate(psi); + p += (massIni - fvc::domainIntegrate(psi*p)) + /fvc::domainIntegrate(psi); rho = thermo.rho(); } // Update thermal conductivity K = thermoFluid[i].Cp()*turb.alphaEff(); - - // Update pd (including bc) - pd == p - (rho*gh + pRef); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/readFluidMultiRegionPIMPLEControls.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/readFluidMultiRegionPIMPLEControls.H new file mode 100644 index 0000000000000000000000000000000000000000..413c0225f0a34a82b3af1751011d7e8af7b935ba --- /dev/null +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/readFluidMultiRegionPIMPLEControls.H @@ -0,0 +1,9 @@ + const dictionary& pimple = mesh.solutionDict().subDict("PIMPLE"); + + int nCorr(readInt(pimple.lookup("nCorrectors"))); + + int nNonOrthCorr = + pimple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0); + + bool momentumPredictor = + pimple.lookupOrDefault<Switch>("momentumPredictor", true); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/rhoEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/rhoEqn.H deleted file mode 100644 index a6b0ac9fe1c0c27d1f2479f27ab3715c87537cd9..0000000000000000000000000000000000000000 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/rhoEqn.H +++ /dev/null @@ -1 +0,0 @@ - solve(fvm::ddt(rho) + fvc::div(phi)); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H index 35a64418a8c6cbd1d488970f1d665420a2f752b6..72c9bbc4faf7e81c0fd759466c210a536929ff2c 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H @@ -7,12 +7,15 @@ surfaceScalarField& phi = phiFluid[i]; compressible::turbulenceModel& turb = turbulence[i]; volScalarField& DpDt = DpDtFluid[i]; - const volScalarField& gh = ghFluid[i]; - const surfaceScalarField& ghf = ghfFluid[i]; - volScalarField& pd = pdFluid[i]; volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); volScalarField& h = thermo.h(); const dimensionedScalar massIni("massIni", dimMass, initialMassFluid[i]); + + const dictionary& environmentalProperties = + fluidRegions[i].lookupObject<IOdictionary> + ("environmentalProperties"); + + const dimensionedVector g(environmentalProperties.lookup("g")); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/solveFluid.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/solveFluid.H index 19ec50cac253986322e9155df1c2bcc0d7632c4a..86dd4344c15310f219bfb9bda406b22f2ffe7585 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/solveFluid.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/solveFluid.H @@ -1,15 +1,18 @@ -# include "rhoEqn.H" - for (int ocorr=0; ocorr<nOuterCorr; ocorr++) - { - # include "UEqn.H" +if (oCorr == 0) +{ + #include "rhoEqn.H" +} - # include "hEqn.H" +#include "UEqn.H" - // --- PISO loop +#include "hEqn.H" - for (int corr=0; corr<nCorr; corr++) - { - # include "pEqn.H" - } - } - turb.correct(); +// --- PISO loop +for (int corr=0; corr<nCorr; corr++) +{ + #include "pEqn.H" +} + +turb.correct(); + +rho = thermo.rho(); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/storeOldFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/storeOldFluidFields.H new file mode 100644 index 0000000000000000000000000000000000000000..f63e85458e25253209094f92995e0c3c91858fc5 --- /dev/null +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/storeOldFluidFields.H @@ -0,0 +1,2 @@ + p.storePrevIter(); + rho.storePrevIter(); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/readPIMPLEControls.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/readPIMPLEControls.H new file mode 100644 index 0000000000000000000000000000000000000000..42793d9b9fdb82a890b5994673f07ade7745a659 --- /dev/null +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/readPIMPLEControls.H @@ -0,0 +1,7 @@ + // We do not have a top-level mesh. Construct the fvSolution for + // the runTime instead. + fvSolution solutionDict(runTime); + + const dictionary& pimple = solutionDict.subDict("PIMPLE"); + + int nOuterCorr(readInt(pimple.lookup("nOuterCorrectors"))); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/readSolidMultiRegionPIMPLEControls.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/readSolidMultiRegionPIMPLEControls.H new file mode 100644 index 0000000000000000000000000000000000000000..e23883c5fae11f298e0459feaacacc4c73af8dbe --- /dev/null +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/readSolidMultiRegionPIMPLEControls.H @@ -0,0 +1,4 @@ + const dictionary& pimple = mesh.solutionDict().subDict("PIMPLE"); + + int nNonOrthCorr = + pimple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/readSolidMultiRegionPISOControls.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/readSolidMultiRegionPISOControls.H index 6373e79d49c0869238a30a138aef81a7af905d05..ce6a1c5bb2626f82eb411bc20b4f57b64e3271ff 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/readSolidMultiRegionPISOControls.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/readSolidMultiRegionPISOControls.H @@ -1,4 +1,4 @@ - dictionary piso = solidRegions[i].solutionDict().subDict("PISO"); + const dictionary& piso = solidRegions[i].solutionDict().subDict("PISO"); int nNonOrthCorr = 0; if (piso.found("nNonOrthogonalCorrectors")) diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H index 04c90d2c4c108f479145e86e64c980f7d6296cba..f9e80e3d72385e7f6ae80107cc3b65921904c35f 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H @@ -1,4 +1,4 @@ -// fvMesh& mesh = solidRegions[i]; + fvMesh& mesh = solidRegions[i]; volScalarField& rho = rhos[i]; volScalarField& cp = cps[i]; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H index 5fa731824f375adfeb3e2175f280de55da5cd4b2..ce8b1d0f408d4ec033f88c37846a8c7ab80e61b0 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H @@ -1,10 +1,13 @@ { for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - solve + tmp<fvScalarMatrix> TEqn ( - fvm::ddt(rho*cp, T) - fvm::laplacian(K, T) + fvm::ddt(rho*cp, T) + - fvm::laplacian(K, T) ); + TEqn().relax(); + TEqn().solve(); } Info<< "Min/max T:" << min(T) << ' ' << max(T) << endl; 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 new file mode 100644 index 0000000000000000000000000000000000000000..7d9fba61432e98b3f2cf2b390e4dcc547d488f8a --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/Make/options @@ -0,0 +1,37 @@ +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)/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/reactingParcelFoam/UEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/UEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..3c4a927091a474e5b8d0d4e50b2794a26202cc8a --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/UEqn.H @@ -0,0 +1,16 @@ + fvVectorMatrix UEqn + ( + fvm::ddt(rho, U) + + fvm::div(phi, U) + + turbulence->divDevRhoReff(U) + == + rho.dimensionedInternalField()*g + + parcels.SU() + ); + + UEqn.relax(); + + if (momentumPredictor) + { + solve(UEqn == -fvc::grad(p)); + } diff --git a/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..c7ade57fbeaf33effb8d4fef4abd4bda4b0e0551 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H @@ -0,0 +1,43 @@ +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) + == + parcels.Srho(i) + + kappa*chemistry.RR(i)().dimensionedInternalField() + ); + + 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/reactingParcelFoam/additionalOutput.H b/applications/solvers/lagrangian/reactingParcelFoam/additionalOutput.H new file mode 100644 index 0000000000000000000000000000000000000000..9edd35eb7cab9acd294ba6a9e73b6ee8087b1c0d --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/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/reactingParcelFoam/chemistry.H b/applications/solvers/lagrangian/reactingParcelFoam/chemistry.H new file mode 100644 index 0000000000000000000000000000000000000000..07b1e9953b0db867186f6c668d27a9415a26c265 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/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/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 new file mode 100644 index 0000000000000000000000000000000000000000..8f0d59e77d4d2e88e6080b7b029dcb1facefa450 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H @@ -0,0 +1,90 @@ + Info<< "Reading thermophysical properties\n" << 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<< "\nReading field U\n" << 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\n" << endl; + autoPtr<compressible::turbulenceModel> turbulence + ( + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo() + ) + ); + + Info<< "Creating field DpDt\n" << endl; + volScalarField DpDt = + fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); + + Info << "Constructing chemical mechanism" << endl; + chemistryModel chemistry + ( + thermo(), + rho + ); + + multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields; + + forAll (Y, i) + { + fields.add(Y[i]); + } + fields.add(h); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/hEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/hEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..7909d8c67d2b3962b6da9a75da8637ccd4673ed0 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/hEqn.H @@ -0,0 +1,20 @@ +{ + fvScalarMatrix hEqn + ( + fvm::ddt(rho, h) + + fvm::div(phi, h) + - fvm::laplacian(turbulence->alphaEff(), h) + == + DpDt + + parcels.Sh() + + radiation->Sh(thermo()) + ); + + hEqn.relax(); + + hEqn.solve(); + + thermo->correct(); + + radiation->correct(); +} diff --git a/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..63370f0cd41ea582ddaa646e9861f7d362293f00 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/pEqn.H @@ -0,0 +1,72 @@ +rho = thermo->rho(); + +volScalarField rUA = 1.0/UEqn.A(); +U = rUA*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++) + { + fvScalarMatrix pEqn + ( + fvm::ddt(psi, p) + + fvm::div(phid, p) + - fvm::laplacian(rho*rUA, p) + == + parcels.Srho() + ); + + pEqn.solve(); + + if (nonOrth == nNonOrthCorr) + { + phi == pEqn.flux(); + } + } +} +else +{ + phi = + fvc::interpolate(rho)* + ( + (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rUA, rho, U, phi) + ); + + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvm::ddt(psi, p) + + fvc::div(phi) + - fvm::laplacian(rho*rUA, p) + == + parcels.Srho() + ); + + pEqn.solve(); + + if (nonOrth == nNonOrthCorr) + { + phi += pEqn.flux(); + } + } +} + +#include "rhoEqn.H" +#include "compressibleContinuityErrs.H" + +U -= rUA*fvc::grad(p); +U.correctBoundaryConditions(); + +DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C new file mode 100644 index 0000000000000000000000000000000000000000..3c2182d2bc36156e3b02a2e195e4d94be92ac425 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.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 + reactingParcelFoam + +Description + Transient PISO solver for compressible, laminar or turbulent flow with + reacting Lagrangian parcels. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "hCombustionThermo.H" +#include "turbulenceModel.H" +#include "BasicReactingCloud.H" +#include "chemistryModel.H" +#include "chemistrySolver.H" +#include "reactingThermoTypes.H" +#include "radiationModel.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 "createClouds.H" + #include "createRadiationModel.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; + + parcels.evolve(); + + parcels.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/reactingParcelFoam/readChemistryProperties.H b/applications/solvers/lagrangian/reactingParcelFoam/readChemistryProperties.H new file mode 100644 index 0000000000000000000000000000000000000000..1a60e6fb34645a004fd39321f7a54d3bd5b45381 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/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/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCFCStencilObject.C b/applications/solvers/lagrangian/reactingParcelFoam/rhoEqn.H similarity index 83% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCFCStencilObject.C rename to applications/solvers/lagrangian/reactingParcelFoam/rhoEqn.H index 81292b002ece8bb5f58d8bf69642305f4152a30a..1b2882a2b7b7e6bd09521babeb2cda56feb5f0aa 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCFCStencilObject.C +++ 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-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,17 +22,22 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -\*---------------------------------------------------------------------------*/ - -#include "upwindCFCStencilObject.H" +Global + rhoEqn +Description + Solve the continuity for density. -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // +\*---------------------------------------------------------------------------*/ -namespace Foam { - defineTypeNameAndDebug(upwindCFCStencilObject, 0); + solve + ( + fvm::ddt(rho) + + fvc::div(phi) + == + parcels.Srho() + ); } - // ************************************************************************* // 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 new file mode 100644 index 0000000000000000000000000000000000000000..387367f16917a0b06d8665f690daff7f4e4f93db --- /dev/null +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/files @@ -0,0 +1,3 @@ +uncoupledKinematicParcelFoam.C + +EXE = $(FOAM_APPBIN)/uncoupledKinematicParcelFoam diff --git a/applications/solvers/Lagrangian/kinematicParcelFoam/Make/options b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options similarity index 89% rename from applications/solvers/Lagrangian/kinematicParcelFoam/Make/options rename to applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options index c9727abd52c16029478cb71f8ab0d1754f17d9a8..818e3717788426a0b9fac4956d1fd343500bec1f 100644 --- a/applications/solvers/Lagrangian/kinematicParcelFoam/Make/options +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options @@ -6,7 +6,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ - -I$(LIB_SRC)/finiteVolume/lnInclude + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ EXE_LIBS = \ -llagrangian \ diff --git a/applications/solvers/Lagrangian/kinematicParcelFoam/createFields.H b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H similarity index 91% rename from applications/solvers/Lagrangian/kinematicParcelFoam/createFields.H rename to applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H index 3854911dd91f6c21bf28ea86c9da1b28de654b8c..c76a81ca4666d882442b8c8f09663be378a134d0 100644 --- a/applications/solvers/Lagrangian/kinematicParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H @@ -47,11 +47,7 @@ ); word kinematicCloudName("kinematicCloud"); - - if (args.options().found("cloudName")) - { - kinematicCloudName = args.options()["cloudName"]; - } + args.optionReadIfPresent("cloudName", kinematicCloudName); Info<< "Constructing kinematicCloud " << kinematicCloudName << endl; basicKinematicCloud kinematicCloud diff --git a/applications/solvers/Lagrangian/kinematicParcelFoam/kinematicParcelFoam.C b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C similarity index 97% rename from applications/solvers/Lagrangian/kinematicParcelFoam/kinematicParcelFoam.C rename to applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C index 786146219b622aa7a8b7ec6625080ec6f148f22c..e4c2b396652630423cc6ed925e55a61b0203ce03 100644 --- a/applications/solvers/Lagrangian/kinematicParcelFoam/kinematicParcelFoam.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/solvers/multiphase/compressibleInterDyMFoam/UEqn.H b/applications/solvers/multiphase/compressibleInterDyMFoam/UEqn.H index 1576f6ba787b037d97c84368836912f0c7d129dd..138e58fc7f72b23abdcba18deef3da53e3b6b951 100644 --- a/applications/solvers/multiphase/compressibleInterDyMFoam/UEqn.H +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/UEqn.H @@ -24,10 +24,10 @@ == fvc::reconstruct ( - ( + fvc::interpolate(rho)*(g & mesh.Sf()) + + ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - - ghf*fvc::snGrad(rho) - - fvc::snGrad(pd) + - fvc::snGrad(p) ) * mesh.magSf() ) ); diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/correctPhi.H b/applications/solvers/multiphase/compressibleInterDyMFoam/correctPhi.H index 4152105784639530f725c53b7b561841b798c624..d82a03edb59a2d419420700638404e6f90b197c8 100644 --- a/applications/solvers/multiphase/compressibleInterDyMFoam/correctPhi.H +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/correctPhi.H @@ -12,7 +12,7 @@ IOobject::NO_WRITE ), mesh, - dimensionedScalar("pcorr", pd.dimensions(), 0.0), + dimensionedScalar("pcorr", p.dimensions(), 0.0), pcorrTypes ); diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H b/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H index dc04fb454680bbeadec55c8946227270601651c7..6b8e67cc4920d3da95a06c22b81db6dee407bc84 100644 --- a/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H @@ -1,9 +1,9 @@ - Info<< "Reading field pd\n" << endl; - volScalarField pd + Info<< "Reading field p\n" << endl; + volScalarField p ( IOobject ( - "pd", + "p", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -88,24 +88,6 @@ dimensionedScalar pMin(twoPhaseProperties.lookup("pMin")); - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - max - ( - (pd + gh*(alpha1*rho10 + alpha2*rho20)) - /(1.0 - gh*(alpha1*psi1 + alpha2*psi2)), - pMin - ) - ); - volScalarField rho1 = rho10 + psi1*p; volScalarField rho2 = rho20 + psi2*p; @@ -152,11 +134,11 @@ ); - wordList pcorrTypes(pd.boundaryField().types()); + wordList pcorrTypes(p.boundaryField().types()); - for (label i=0; i<pd.boundaryField().size(); i++) + for (label i=0; i<p.boundaryField().size(); i++) { - if (pd.boundaryField()[i].fixesValue()) + if (p.boundaryField()[i].fixesValue()) { pcorrTypes[i] = fixedValueFvPatchScalarField::typeName; } diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterDyMFoam/pEqn.H index 7e4b37061fdede3fccc625875cc38c447657a198..e6004eb9de9f6d157dd5a42637540fa3d70c6ddb 100644 --- a/applications/solvers/multiphase/compressibleInterDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/pEqn.H @@ -2,17 +2,17 @@ volScalarField rUA = 1.0/UEqn.A(); surfaceScalarField rUAf = fvc::interpolate(rUA); - tmp<fvScalarMatrix> pdEqnComp; + tmp<fvScalarMatrix> pEqnComp; if (transonic) { - pdEqnComp = - (fvm::ddt(pd) + fvm::div(phi, pd) - fvm::Sp(fvc::div(phi), pd)); + pEqnComp = + (fvm::ddt(p) + fvm::div(phi, p) - fvm::Sp(fvc::div(phi), p)); } else { - pdEqnComp = - (fvm::ddt(pd) + fvc::div(phi, pd) - fvc::Sp(fvc::div(phi), pd)); + pEqnComp = + (fvm::ddt(p) + fvc::div(phi, p) - fvc::Sp(fvc::div(phi), p)); } @@ -26,16 +26,16 @@ phi = phiU + ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - - ghf*fvc::snGrad(rho) - )*rUAf*mesh.magSf(); + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf() + + fvc::interpolate(rho)*(g & mesh.Sf()) + )*rUAf; for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pdEqnIncomp + fvScalarMatrix pEqnIncomp ( fvc::div(phi) - - fvm::laplacian(rUAf, pd) + - fvm::laplacian(rUAf, p) ); if @@ -51,9 +51,9 @@ max(alpha1, scalar(0))*(psi1/rho1) + max(alpha2, scalar(0))*(psi2/rho2) ) - *pdEqnComp() - + pdEqnIncomp, - mesh.solver(pd.name() + "Final") + *pEqnComp() + + pEqnIncomp, + mesh.solver(p.name() + "Final") ); } else @@ -64,8 +64,8 @@ max(alpha1, scalar(0))*(psi1/rho1) + max(alpha2, scalar(0))*(psi2/rho2) ) - *pdEqnComp() - + pdEqnIncomp + *pEqnComp() + + pEqnIncomp ); } @@ -73,26 +73,21 @@ { dgdt = (pos(alpha2)*(psi2/rho2) - pos(alpha1)*(psi1/rho1)) - *(pdEqnComp & pd); - phi += pdEqnIncomp.flux(); + *(pEqnComp & p); + phi += pEqnIncomp.flux(); } } U += rUA*fvc::reconstruct((phi - phiU)/rUAf); U.correctBoundaryConditions(); - p = max - ( - (pd + gh*(alpha1*rho10 + alpha2*rho20)) - /(1.0 - gh*(alpha1*psi1 + alpha2*psi2)), - pMin - ); + p.max(pMin); rho1 = rho10 + psi1*p; rho2 = rho20 + psi2*p; Info<< "max(U) " << max(mag(U)).value() << endl; - Info<< "min(pd) " << min(pd).value() << endl; + Info<< "min(p) " << min(p).value() << endl; // Make the fluxes relative to the mesh motion fvc::makeRelative(phi, U); diff --git a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H index 528e0aaafd892c2995fa94848c0d59b66af41942..0b1a9ac029d776dbd57da20f91c14da8ee88f5a7 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H @@ -24,10 +24,10 @@ == fvc::reconstruct ( - ( + fvc::interpolate(rho)*(g & mesh.Sf()) + + ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - - ghf*fvc::snGrad(rho) - - fvc::snGrad(pd) + - fvc::snGrad(p) ) * mesh.magSf() ) ); diff --git a/applications/solvers/multiphase/compressibleInterFoam/createFields.H b/applications/solvers/multiphase/compressibleInterFoam/createFields.H index 1f579d245bdcac21f647ac2a90a516b5f612b3c9..3e6904d383e677c976ac8daacd110b31af414f75 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleInterFoam/createFields.H @@ -1,9 +1,9 @@ - Info<< "Reading field pd\n" << endl; - volScalarField pd + Info<< "Reading field p\n" << endl; + volScalarField p ( IOobject ( - "pd", + "p", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -46,11 +46,6 @@ #include "createPhi.H" - Info<< "Calculating field g.h\n" << endl; - volScalarField gh("gh", g & mesh.C()); - surfaceScalarField ghf("ghf", g & mesh.Cf()); - - Info<< "Reading transportProperties\n" << endl; twoPhaseMixture twoPhaseProperties(U, phi); @@ -88,24 +83,6 @@ dimensionedScalar pMin(twoPhaseProperties.lookup("pMin")); - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - max - ( - (pd + gh*(alpha1*rho10 + alpha2*rho20)) - /(1.0 - gh*(alpha1*psi1 + alpha2*psi2)), - pMin - ) - ); - volScalarField rho1 = rho10 + psi1*p; volScalarField rho2 = rho20 + psi2*p; diff --git a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H index ebf24498ade0bd1d1572d6055da8b5bccd369ffa..9d2dc23916babb9c6c94acd2b53125c8cfee1dad 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H @@ -2,17 +2,17 @@ volScalarField rUA = 1.0/UEqn.A(); surfaceScalarField rUAf = fvc::interpolate(rUA); - tmp<fvScalarMatrix> pdEqnComp; + tmp<fvScalarMatrix> pEqnComp; if (transonic) { - pdEqnComp = - (fvm::ddt(pd) + fvm::div(phi, pd) - fvm::Sp(fvc::div(phi), pd)); + pEqnComp = + (fvm::ddt(p) + fvm::div(phi, p) - fvm::Sp(fvc::div(phi), p)); } else { - pdEqnComp = - (fvm::ddt(pd) + fvc::div(phi, pd) - fvc::Sp(fvc::div(phi), pd)); + pEqnComp = + (fvm::ddt(p) + fvc::div(phi, p) - fvc::Sp(fvc::div(phi), p)); } @@ -26,16 +26,16 @@ phi = phiU + ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - - ghf*fvc::snGrad(rho) - )*rUAf*mesh.magSf(); + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf() + + fvc::interpolate(rho)*(g & mesh.Sf()) + )*rUAf; for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pdEqnIncomp + fvScalarMatrix pEqnIncomp ( fvc::div(phi) - - fvm::laplacian(rUAf, pd) + - fvm::laplacian(rUAf, p) ); solve @@ -44,31 +44,27 @@ max(alpha1, scalar(0))*(psi1/rho1) + max(alpha2, scalar(0))*(psi2/rho2) ) - *pdEqnComp() - + pdEqnIncomp + *pEqnComp() + + pEqnIncomp ); if (nonOrth == nNonOrthCorr) { dgdt = (pos(alpha2)*(psi2/rho2) - pos(alpha1)*(psi1/rho1)) - *(pdEqnComp & pd); - phi += pdEqnIncomp.flux(); + *(pEqnComp & p); + phi += pEqnIncomp.flux(); } } U += rUA*fvc::reconstruct((phi - phiU)/rUAf); U.correctBoundaryConditions(); - p = max - ( - (pd + gh*(alpha1*rho10 + alpha2*rho20))/(1.0 - gh*(alpha1*psi1 + alpha2*psi2)), - pMin - ); + p.max(pMin); rho1 = rho10 + psi1*p; rho2 = rho20 + psi2*p; Info<< "max(U) " << max(mag(U)).value() << endl; - Info<< "min(pd) " << min(pd).value() << endl; + Info<< "min(p) " << min(p).value() << endl; } diff --git a/applications/solvers/multiphase/interDyMFoam/correctPhi.H b/applications/solvers/multiphase/interDyMFoam/correctPhi.H index c975c9b37416e10a066bb578ac05b531a4217473..1f7845f347d25a2e9e45cdbd6539e1998022f5e4 100644 --- a/applications/solvers/multiphase/interDyMFoam/correctPhi.H +++ b/applications/solvers/multiphase/interDyMFoam/correctPhi.H @@ -12,7 +12,7 @@ IOobject::NO_WRITE ), mesh, - dimensionedScalar("pcorr", pd.dimensions(), 0.0), + dimensionedScalar("pcorr", p.dimensions(), 0.0), pcorrTypes ); @@ -27,7 +27,7 @@ fvm::laplacian(rAUf, pcorr) == fvc::div(phi) ); - pcorrEqn.setReference(pdRefCell, pdRefValue); + pcorrEqn.setReference(pRefCell, pRefValue); pcorrEqn.solve(); if (nonOrth == nNonOrthCorr) diff --git a/applications/solvers/multiphase/interDyMFoam/createFields.H b/applications/solvers/multiphase/interDyMFoam/createFields.H index bcceb9d748193843a3124b585b538497b61e9d22..26644e17f472fe4dd8605280c0ed8e5a1ee0a5dd 100644 --- a/applications/solvers/multiphase/interDyMFoam/createFields.H +++ b/applications/solvers/multiphase/interDyMFoam/createFields.H @@ -1,9 +1,9 @@ - Info<< "Reading field pd\n" << endl; - volScalarField pd + Info<< "Reading field p\n" << endl; + volScalarField p ( IOobject ( - "pd", + "p", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -92,47 +92,17 @@ incompressible::turbulenceModel::New(U, phi, twoPhaseProperties) ); - wordList pcorrTypes(pd.boundaryField().types()); + wordList pcorrTypes(p.boundaryField().types()); - for (label i=0; i<pd.boundaryField().size(); i++) + for (label i=0; i<p.boundaryField().size(); i++) { - if (pd.boundaryField()[i].fixesValue()) + if (p.boundaryField()[i].fixesValue()) { pcorrTypes[i] = fixedValueFvPatchScalarField::typeName; } } - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - pd + rho*(g & mesh.C()) - ); - - label pdRefCell = 0; - scalar pdRefValue = 0.0; - setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); - + label pRefCell = 0; scalar pRefValue = 0.0; - - if (pd.needReference()) - { - pRefValue = readScalar - ( - mesh.solutionDict().subDict("PISO").lookup("pRefValue") - ); - - p += dimensionedScalar - ( - "p", - p.dimensions(), - pRefValue - getRefCellValue(p, pdRefCell) - ); - } + setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); diff --git a/applications/solvers/multiphase/interDyMFoam/interDyMFoam.C b/applications/solvers/multiphase/interDyMFoam/interDyMFoam.C index 046503a8c459abc2f1c6caeb958c39a2ee985668..cf8ec8eb323bdc42352669aae04249baa07426f1 100644 --- a/applications/solvers/multiphase/interDyMFoam/interDyMFoam.C +++ b/applications/solvers/multiphase/interDyMFoam/interDyMFoam.C @@ -114,18 +114,6 @@ int main(int argc, char *argv[]) #include "pEqn.H" } - p = pd + rho*gh; - - if (pd.needReference()) - { - p += dimensionedScalar - ( - "p", - p.dimensions(), - pRefValue - getRefCellValue(p, pdRefCell) - ); - } - turbulence->correct(); runTime.write(); diff --git a/applications/solvers/multiphase/interDyMFoam/pEqn.H b/applications/solvers/multiphase/interDyMFoam/pEqn.H index f8ff18f60631c3cd66f02a8b9b4e8adc5ceb19e9..8825661c8307d70f2c8cb8bf6f18675579aaf6cb 100644 --- a/applications/solvers/multiphase/interDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/interDyMFoam/pEqn.H @@ -7,38 +7,38 @@ phi = phiU + ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - - ghf*fvc::snGrad(rho) - )*rAUf*mesh.magSf(); + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf() + + fvc::interpolate(rho)*(g & mesh.Sf()) + )*rAUf; - if (pd.needReference()) + if (p.needReference()) { fvc::makeRelative(phi, U); - adjustPhi(phi, U, pd); + adjustPhi(phi, U, p); fvc::makeAbsolute(phi, U); } for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pdEqn + fvScalarMatrix pEqn ( - fvm::laplacian(rAUf, pd) == fvc::div(phi) + fvm::laplacian(rAUf, p) == fvc::div(phi) ); - pdEqn.setReference(pdRefCell, pdRefValue); + pEqn.setReference(pRefCell, pRefValue); 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(); } } diff --git a/applications/solvers/multiphase/interFoam/UEqn.H b/applications/solvers/multiphase/interFoam/UEqn.H index 528e0aaafd892c2995fa94848c0d59b66af41942..0b1a9ac029d776dbd57da20f91c14da8ee88f5a7 100644 --- a/applications/solvers/multiphase/interFoam/UEqn.H +++ b/applications/solvers/multiphase/interFoam/UEqn.H @@ -24,10 +24,10 @@ == fvc::reconstruct ( - ( + fvc::interpolate(rho)*(g & mesh.Sf()) + + ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - - ghf*fvc::snGrad(rho) - - fvc::snGrad(pd) + - fvc::snGrad(p) ) * mesh.magSf() ) ); diff --git a/applications/solvers/multiphase/interFoam/correctPhi.H b/applications/solvers/multiphase/interFoam/correctPhi.H index 171e1670f47dbdf29d3904c47af7d196b706296e..642aa1c5d2a88c157d1d704f555c9b87ddefcc48 100644 --- a/applications/solvers/multiphase/interFoam/correctPhi.H +++ b/applications/solvers/multiphase/interFoam/correctPhi.H @@ -1,11 +1,11 @@ { # include "continuityErrs.H" - wordList pcorrTypes(pd.boundaryField().types()); + wordList pcorrTypes(p.boundaryField().types()); - for (label i=0; i<pd.boundaryField().size(); i++) + for (label i=0; i<p.boundaryField().size(); i++) { - if (pd.boundaryField()[i].fixesValue()) + if (p.boundaryField()[i].fixesValue()) { pcorrTypes[i] = fixedValueFvPatchScalarField::typeName; } @@ -22,7 +22,7 @@ IOobject::NO_WRITE ), mesh, - dimensionedScalar("pcorr", pd.dimensions(), 0.0), + dimensionedScalar("pcorr", p.dimensions(), 0.0), pcorrTypes ); @@ -37,7 +37,7 @@ fvm::laplacian(rUAf, pcorr) == fvc::div(phi) ); - pcorrEqn.setReference(pdRefCell, pdRefValue); + pcorrEqn.setReference(pRefCell, pRefValue); pcorrEqn.solve(); if (nonOrth == nNonOrthCorr) diff --git a/applications/solvers/multiphase/interFoam/createFields.H b/applications/solvers/multiphase/interFoam/createFields.H index 70637747528a9851a51dad21b021fead0adc3761..622d5d578c977d745f94419f993145222842d8a9 100644 --- a/applications/solvers/multiphase/interFoam/createFields.H +++ b/applications/solvers/multiphase/interFoam/createFields.H @@ -1,9 +1,9 @@ - Info<< "Reading field pd\n" << endl; - volScalarField pd + Info<< "Reading field p\n" << endl; + volScalarField p ( IOobject ( - "pd", + "p", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -83,45 +83,9 @@ ); - Info<< "Calculating field g.h\n" << endl; - volScalarField gh("gh", g & mesh.C()); - surfaceScalarField ghf("ghf", g & mesh.Cf()); - - - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - pd + rho*gh - ); - - - label pdRefCell = 0; - scalar pdRefValue = 0.0; - setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); - + label pRefCell = 0; scalar pRefValue = 0.0; - - if (pd.needReference()) - { - pRefValue = readScalar - ( - mesh.solutionDict().subDict("PISO").lookup("pRefValue") - ); - - p += dimensionedScalar - ( - "p", - p.dimensions(), - pRefValue - getRefCellValue(p, pdRefCell) - ); - } + setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); // Construct interface from alpha1 distribution diff --git a/applications/solvers/multiphase/interFoam/interFoam.C b/applications/solvers/multiphase/interFoam/interFoam.C index 4dd86bd8f72fafbdbcb9db63cea841d79b6d1d26..b111351c39dbaef4cbb3eaaa3ef08707221baf14 100644 --- a/applications/solvers/multiphase/interFoam/interFoam.C +++ b/applications/solvers/multiphase/interFoam/interFoam.C @@ -89,18 +89,6 @@ int main(int argc, char *argv[]) #include "continuityErrs.H" - p = pd + rho*gh; - - if (pd.needReference()) - { - p += dimensionedScalar - ( - "p", - p.dimensions(), - pRefValue - getRefCellValue(p, pdRefCell) - ); - } - turbulence->correct(); runTime.write(); diff --git a/applications/solvers/multiphase/interFoam/pEqn.H b/applications/solvers/multiphase/interFoam/pEqn.H index e5afbb8e4f24606318afe045faac8554960b04e5..25482fa9944a76a7de7ec2e94ced844068f420fa 100644 --- a/applications/solvers/multiphase/interFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/pEqn.H @@ -12,33 +12,33 @@ phi = phiU + ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - - ghf*fvc::snGrad(rho) - )*rUAf*mesh.magSf(); + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf() + + fvc::interpolate(rho)*(g & mesh.Sf()) + )*rUAf; - adjustPhi(phi, U, pd); + adjustPhi(phi, U, p); for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pdEqn + fvScalarMatrix pEqn ( - fvm::laplacian(rUAf, pd) == fvc::div(phi) + fvm::laplacian(rUAf, p) == fvc::div(phi) ); - pdEqn.setReference(pdRefCell, pdRefValue); + pEqn.setReference(pRefCell, pRefValue); 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(); } } diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H index c59137c7b87a9be3c799e03567dc8209341798f5..757e37a2cfdc7d9dbdacd0621120452219ac2a2c 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H @@ -25,10 +25,10 @@ == fvc::reconstruct ( - ( + fvc::interpolate(rho)*(g & mesh.Sf()) + + ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - - ghf*fvc::snGrad(rho) - - fvc::snGrad(pd) + - fvc::snGrad(p) ) * mesh.magSf() ) ); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/correctPhi.H b/applications/solvers/multiphase/interPhaseChangeFoam/correctPhi.H index 171e1670f47dbdf29d3904c47af7d196b706296e..642aa1c5d2a88c157d1d704f555c9b87ddefcc48 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/correctPhi.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/correctPhi.H @@ -1,11 +1,11 @@ { # include "continuityErrs.H" - wordList pcorrTypes(pd.boundaryField().types()); + wordList pcorrTypes(p.boundaryField().types()); - for (label i=0; i<pd.boundaryField().size(); i++) + for (label i=0; i<p.boundaryField().size(); i++) { - if (pd.boundaryField()[i].fixesValue()) + if (p.boundaryField()[i].fixesValue()) { pcorrTypes[i] = fixedValueFvPatchScalarField::typeName; } @@ -22,7 +22,7 @@ IOobject::NO_WRITE ), mesh, - dimensionedScalar("pcorr", pd.dimensions(), 0.0), + dimensionedScalar("pcorr", p.dimensions(), 0.0), pcorrTypes ); @@ -37,7 +37,7 @@ fvm::laplacian(rUAf, pcorr) == fvc::div(phi) ); - pcorrEqn.setReference(pdRefCell, pdRefValue); + pcorrEqn.setReference(pRefCell, pRefValue); pcorrEqn.solve(); if (nonOrth == nNonOrthCorr) diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H b/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H index 5e727dea3eca4828580cadaf9a10531a7719fd62..98d166214b2ca5d34fa2aa554dfab679e16df7ee 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H @@ -1,9 +1,9 @@ - Info<< "Reading field pd\n" << endl; - volScalarField pd + Info<< "Reading field p\n" << endl; + volScalarField p ( IOobject ( - "pd", + "p", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -66,26 +66,9 @@ rho.oldTime(); - label pdRefCell = 0; - scalar pdRefValue = 0.0; - setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); - - Info<< "Calculating field g.h" << endl; - volScalarField gh("gh", g & mesh.C()); - surfaceScalarField ghf("ghf", g & mesh.Cf()); - - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - pd + rho*gh - ); + label pRefCell = 0; + scalar pRefValue = 0.0; + setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); // Construct interface from alpha1 distribution diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H index 0037d71cf52ce5dd50dd298767b27987d4e03e38..4f290157f64bbf3de676acc26c9f5e708af91ba6 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H @@ -13,11 +13,11 @@ phi = phiU + ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - - ghf*fvc::snGrad(rho) - )*rUAf*mesh.magSf(); + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf() + + fvc::interpolate(rho)*(g & mesh.Sf()) + )*rUAf; - adjustPhi(phi, U, pd); + adjustPhi(phi, U, p); Pair<tmp<volScalarField> > vDotP = twoPhaseProperties->vDotP(); const volScalarField& vDotcP = vDotP[0](); @@ -25,31 +25,29 @@ for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pdEqn + fvScalarMatrix pEqn ( - fvc::div(phi) - fvm::laplacian(rUAf, pd) - + (vDotvP - vDotcP)*(rho*gh - pSat) + fvm::Sp(vDotvP - vDotcP, pd) + fvc::div(phi) - fvm::laplacian(rUAf, p) + - (vDotvP - vDotcP)*pSat + fvm::Sp(vDotvP - vDotcP, p) ); - pdEqn.setReference(pdRefCell, pdRefValue); + pEqn.setReference(pRefCell, pRefValue); 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(); } } - p = pd + rho*gh; - U += rUA*fvc::reconstruct((phi - phiU)/rUAf); U.correctBoundaryConditions(); } diff --git a/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H index 5ce0c0c08847df8fd9b99161e8feb3962b3006bf..17686b592c4750443414cec36260eaa98f1a3205 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H @@ -24,10 +24,10 @@ == fvc::reconstruct ( - ( + fvc::interpolate(rho)*(g & mesh.Sf()) + + ( mixture.surfaceTensionForce() - - ghf*fvc::snGrad(rho) - - fvc::snGrad(pd) + - fvc::snGrad(p) ) * mesh.magSf() ) ); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/createFields.H b/applications/solvers/multiphase/multiphaseInterFoam/createFields.H index 07650fd4ddaf26054f94c303fdb1259f525244a3..fb6449629402a36f340e711e6ef89d7b64da8d96 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/createFields.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/createFields.H @@ -1,9 +1,9 @@ - Info<< "Reading field pd\n" << endl; - volScalarField pd + Info<< "Reading field p\n" << endl; + volScalarField p ( IOobject ( - "pd", + "p", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -45,45 +45,9 @@ rho.oldTime(); - Info<< "Calculating field g.h\n" << endl; - volScalarField gh("gh", g & mesh.C()); - surfaceScalarField ghf("ghf", g & mesh.Cf()); - - - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - pd + rho*gh - ); - - - label pdRefCell = 0; - scalar pdRefValue = 0.0; - setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); - + label pRefCell = 0; scalar pRefValue = 0.0; - - if (pd.needReference()) - { - pRefValue = readScalar - ( - mesh.solutionDict().subDict("PISO").lookup("pRefValue") - ); - - p += dimensionedScalar - ( - "p", - p.dimensions(), - pRefValue - getRefCellValue(p, pdRefCell) - ); - } + setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); // Construct incompressible turbulence model diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C index c5fdb5f3c2e36d8ae693a7aead0ee0a71168d482..b6968ca1a11c4a8b664b2c1721c0d608a884dad4 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C @@ -81,18 +81,6 @@ int main(int argc, char *argv[]) #include "continuityErrs.H" - p = pd + rho*gh; - - if (pd.needReference()) - { - p += dimensionedScalar - ( - "p", - p.dimensions(), - pRefValue - getRefCellValue(p, pdRefCell) - ); - } - turbulence->correct(); runTime.write(); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H index 3fd1e3e60614032c75793b4b5767387e6ac9ab84..9d7e36dc95a0e695946f20a2e0fb4d9f80512b56 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H @@ -12,33 +12,33 @@ phi = phiU + ( - mixture.surfaceTensionForce() - - ghf*fvc::snGrad(rho) - )*rUAf*mesh.magSf(); + mixture.surfaceTensionForce()*mesh.magSf() + + fvc::interpolate(rho)*(g & mesh.Sf()) + )*rUAf; - adjustPhi(phi, U, pd); + adjustPhi(phi, U, p); for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pdEqn + fvScalarMatrix pEqn ( - fvm::laplacian(rUAf, pd) == fvc::div(phi) + fvm::laplacian(rUAf, p) == fvc::div(phi) ); - pdEqn.setReference(pdRefCell, pdRefValue); + pEqn.setReference(pRefCell, pRefValue); if (corr == nCorr-1) { - 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(); } } diff --git a/applications/solvers/multiphase/settlingFoam/UEqn.H b/applications/solvers/multiphase/settlingFoam/UEqn.H index ac4c18ab19dc4b70fe0770f23e0a24bc4af3eebd..04e9194363d9ee4edc6aaa65e032fcebcaeddfca 100644 --- a/applications/solvers/multiphase/settlingFoam/UEqn.H +++ b/applications/solvers/multiphase/settlingFoam/UEqn.H @@ -22,10 +22,8 @@ == fvc::reconstruct ( - ( - - ghf*fvc::snGrad(rho) - - fvc::snGrad(p) - )*mesh.magSf() + fvc::interpolate(rho)*(g & mesh.Sf()) + - fvc::snGrad(p)*mesh.magSf() ) ); } diff --git a/applications/solvers/multiphase/settlingFoam/createFields.H b/applications/solvers/multiphase/settlingFoam/createFields.H index b13649c3124ddaf5ba06c5e13e3b090b746798ec..7c8445a71d4465bae5514c86afbf83f6611ce057 100644 --- a/applications/solvers/multiphase/settlingFoam/createFields.H +++ b/applications/solvers/multiphase/settlingFoam/createFields.H @@ -337,6 +337,3 @@ ), mut + mul ); - - Info<< "Calculating field (g.h)f\n" << endl; - surfaceScalarField ghf = surfaceScalarField("ghf", g & mesh.Cf()); diff --git a/applications/solvers/multiphase/settlingFoam/pEqn.H b/applications/solvers/multiphase/settlingFoam/pEqn.H index 65b954c6da84e1fe6b98ee5a99f295f7a14ff324..b4fc05b32ab56f04646427310478e9cc92429b11 100644 --- a/applications/solvers/multiphase/settlingFoam/pEqn.H +++ b/applications/solvers/multiphase/settlingFoam/pEqn.H @@ -15,7 +15,7 @@ phi = ); surfaceScalarField phiU("phiU", phi); -phi -= ghf*fvc::snGrad(rho)*rUAf*mesh.magSf(); +phi += fvc::interpolate(rho)*(g & mesh.Sf())*rUAf; for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H index 5a945697caa2ffa30846b7fc1831c8b92dbde7fb..18b915b16bde8f4f8bda4b5a13daf8d99b3b74cb 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H @@ -14,7 +14,14 @@ //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) ); - UEqn.relax(); + if (oCorr == nOuterCorr-1) + { + UEqn.relax(1); + } + else + { + UEqn.relax(); + } if (momentumPredictor) { @@ -22,9 +29,11 @@ ( UEqn == - -fvc::reconstruct + fvc::reconstruct ( - mesh.magSf()*(fvc::snGrad(pd) + ghf*fvc::snGrad(rho)) - ) + fvc::interpolate(rho)*(g & mesh.Sf()) + - mesh.magSf()*fvc::snGrad(p) + ), + mesh.solver(oCorr == nOuterCorr-1 ? "UFinal" : "U") ); } diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqn.H index c12602536870ab39e1a63a81062b143d5d360c00..8194753c8fca0674fc224b189f88851e4cb24d34 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqn.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqn.H @@ -3,7 +3,12 @@ ( fvm::ddt(alpha1) + fvm::div(phi, alpha1) - - fvm::laplacian(Dab, alpha1) + //- fvm::Sp(fvc::div(phi), alpha1) + - fvm::laplacian + ( + Dab + alphatab*turbulence->nut(), alpha1, + "laplacian(Dab,alpha1)" + ) ); alpha1Eqn.solve(); diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H b/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H index a38135dc19a968cd10cf38beec6b3a35a4e4165b..b61566d924db04be243167e57d2250845b3c0b3c 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H @@ -1,9 +1,9 @@ - Info<< "Reading field pd\n" << endl; - volScalarField pd + Info<< "Reading field p\n" << endl; + volScalarField p ( IOobject ( - "pd", + "p", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -50,6 +50,9 @@ dimensionedScalar Dab(twoPhaseProperties.lookup("Dab")); + // Read the reciprocal of the turbulent Schmidt number + dimensionedScalar alphatab(twoPhaseProperties.lookup("alphatab")); + // Need to store rho for ddt(rho, U) volScalarField rho("rho", alpha1*rho1 + (scalar(1) - alpha1)*rho2); rho.oldTime(); @@ -72,45 +75,9 @@ ); - Info<< "Calculating field g.h\n" << endl; - volScalarField gh("gh", g & mesh.C()); - surfaceScalarField ghf("gh", g & mesh.Cf()); - - - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - pd + rho*gh - ); - - - label pdRefCell = 0; - scalar pdRefValue = 0.0; - setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); - + label pRefCell = 0; scalar pRefValue = 0.0; - - if (pd.needReference()) - { - pRefValue = readScalar - ( - mesh.solutionDict().subDict("PISO").lookup("pRefValue") - ); - - p += dimensionedScalar - ( - "p", - p.dimensions(), - pRefValue - getRefCellValue(p, pdRefCell) - ); - } + setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue); // Construct incompressible turbulence model diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H index eaa0cef6294ad14b8b4bfdc7b54201ae811ae26d..7ba3cdba8a6a2badce20af6292008e62487f23b7 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H @@ -7,26 +7,37 @@ surfaceScalarField phiU ( "phiU", - (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi) + (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rUA, rho, U, phi) ); - phi = phiU - ghf*fvc::snGrad(rho)*rUAf*mesh.magSf(); - - adjustPhi(phi, U, pd); + phi = phiU + fvc::interpolate(rho)*(g & mesh.Sf())*rUAf; for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pdEqn + fvScalarMatrix pEqn ( - fvm::laplacian(rUAf, pd) == fvc::div(phi) + fvm::laplacian(rUAf, p) == fvc::div(phi) ); - pdEqn.setReference(pdRefCell, pdRefValue); - pdEqn.solve(); + pEqn.setReference(pRefCell, pRefValue); + + if + ( + corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + { + pEqn.solve(mesh.solver(p.name() + "Final")); + } + else + { + pEqn.solve(mesh.solver(p.name())); + } if (nonOrth == nNonOrthCorr) { - phi -= pdEqn.flux(); + phi -= pEqn.flux(); } } diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C index 1caf455708079ff2f4f04733c388aa070393ba8a..63991f149e513901c1e15dda5effeeda7567ca28 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C @@ -40,53 +40,52 @@ Description int main(int argc, char *argv[]) { - -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readEnvironmentalProperties.H" -# include "initContinuityErrs.H" -# include "createFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readEnvironmentalProperties.H" + #include "readPIMPLEControls.H" + #include "initContinuityErrs.H" + #include "createFields.H" + #include "readTimeControls.H" + #include "CourantNo.H" + #include "setInitialDeltaT.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; - while (runTime.loop()) + while (runTime.run()) { - Info<< "Time = " << runTime.timeName() << nl << endl; + #include "readPIMPLEControls.H" + #include "readTimeControls.H" + #include "CourantNo.H" + #include "setDeltaT.H" -# include "readPISOControls.H" -# include "CourantNo.H" + runTime++; - twoPhaseProperties.correct(); + Info<< "Time = " << runTime.timeName() << nl << endl; -# include "alphaEqn.H" + // --- Pressure-velocity PIMPLE corrector loop + for (int oCorr=0; oCorr<nOuterCorr; oCorr++) + { + twoPhaseProperties.correct(); -# include "UEqn.H" + #include "alphaEqn.H" - // --- PISO loop - for (int corr=0; corr<nCorr; corr++) - { -# include "pEqn.H" - } + #include "UEqn.H" -# include "continuityErrs.H" + // --- PISO loop + for (int corr=0; corr<nCorr; corr++) + { + #include "pEqn.H" + } - p = pd + rho*gh; + #include "continuityErrs.H" - if (pd.needReference()) - { - p += dimensionedScalar - ( - "p", - p.dimensions(), - pRefValue - getRefCellValue(p, pdRefCell) - ); + turbulence->correct(); } - turbulence->correct(); - runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/test/List/ListTest.C b/applications/test/List/ListTest.C index d4834cb1db2b02bc79f4d6e8508e9f3b3361c695..0fee9a9e3b5bd907a611dbad46e91ccd8984a321 100644 --- a/applications/test/List/ListTest.C +++ b/applications/test/List/ListTest.C @@ -29,6 +29,8 @@ Description \*---------------------------------------------------------------------------*/ #include "OSspecific.H" +#include "argList.H" +#include "wordReList.H" #include "IOstreams.H" #include "IStringStream.H" @@ -38,11 +40,21 @@ Description using namespace Foam; + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Main program: int main(int argc, char *argv[]) { + argList::noParallel(); + argList::validOptions.insert("reList", "reList"); + argList::validOptions.insert("wordList", "wordList"); + argList::validOptions.insert("stringList", "stringList"); + argList::validOptions.insert("float", "xx"); + argList::validOptions.insert("flag", ""); + +# include "setRootCase.H" + List<vector> list1(IStringStream("1 ((0 1 2))")()); Info<< "list1: " << list1 << endl; @@ -69,6 +81,43 @@ int main(int argc, char *argv[]) Info<< "Elements " << map << " out of " << list3 << " => " << subList3 << endl; + wordReList reLst; + wordList wLst; + stringList sLst; + + + scalar xxx(-1); + + if (args.optionFound("flag")) + { + Info<<"-flag:" << args.option("flag") << endl; + } + + if (args.optionReadIfPresent<scalar>("float", xxx)) + { + Info<<"read float " << xxx << endl; + } + + if (args.optionFound("reList")) + { + reLst = args.optionReadList<wordRe>("reList"); + } + + if (args.optionFound("wordList")) + { + wLst = args.optionReadList<word>("wordList"); + } + + if (args.optionFound("stringList")) + { + sLst = args.optionReadList<string>("stringList"); + } + + Info<< nl + << "-reList: " << reLst << nl + << "-wordList: " << wLst << nl + << "-stringList: " << sLst << endl; + return 0; } diff --git a/applications/test/POSIX/Make/files b/applications/test/POSIX/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..f2f2540e6a8b248b8f80199a293419ec1afec79b --- /dev/null +++ b/applications/test/POSIX/Make/files @@ -0,0 +1,2 @@ +POSIXTest.C +EXE = $(FOAM_USER_APPBIN)/POSIXTest diff --git a/applications/test/Unix/Make/options b/applications/test/POSIX/Make/options similarity index 100% rename from applications/test/Unix/Make/options rename to applications/test/POSIX/Make/options diff --git a/applications/test/Unix/UnixTest.C b/applications/test/POSIX/POSIXTest.C similarity index 100% rename from applications/test/Unix/UnixTest.C rename to applications/test/POSIX/POSIXTest.C diff --git a/applications/test/Unix/Make/files b/applications/test/Unix/Make/files deleted file mode 100644 index 6554bfcbb0c4fa955e6b891b285230c2815df207..0000000000000000000000000000000000000000 --- a/applications/test/Unix/Make/files +++ /dev/null @@ -1,2 +0,0 @@ -UnixTest.C -EXE = $(FOAM_USER_APPBIN)/UnixTest diff --git a/applications/test/directMappedPatch/Make/files b/applications/test/directMappedPatch/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..65f39a47b8e09776cb7c8259d27f73a15663e335 --- /dev/null +++ b/applications/test/directMappedPatch/Make/files @@ -0,0 +1,4 @@ + +testDirectMappedPatch.C + +EXE = $(FOAM_USER_APPBIN)/testDirectMappedPatch diff --git a/applications/test/directMappedPatch/Make/options b/applications/test/directMappedPatch/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..d76bd10c8fa52345df9ce1be79cdeae2b41dde84 --- /dev/null +++ b/applications/test/directMappedPatch/Make/options @@ -0,0 +1,6 @@ +EXE_INC = \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +EXE_LIBS = \ + -lfiniteVolume diff --git a/applications/test/directMappedPatch/testDirectMappedPatch.C b/applications/test/directMappedPatch/testDirectMappedPatch.C new file mode 100644 index 0000000000000000000000000000000000000000..dd27ff6955d92b5adf9023913b2966b0ee38f748 --- /dev/null +++ b/applications/test/directMappedPatch/testDirectMappedPatch.C @@ -0,0 +1,127 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +Application + testDirectMappedPatch + +Description + Test direct mapped b.c. by mapping face centres (mesh.C().boundaryField()). + +\*---------------------------------------------------------------------------*/ + + +#include "argList.H" +#include "fvMesh.H" +#include "volFields.H" +#include "meshTools.H" +#include "Time.H" +#include "OFstream.H" +#include "volFields.H" +#include "directMappedFixedValueFvPatchFields.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +// Main program: + +int main(int argc, char *argv[]) +{ +# include "addTimeOptions.H" +# include "setRootCase.H" +# include "createTime.H" +# include "createMesh.H" + + wordList patchFieldTypes + ( + mesh.boundaryMesh().size(), + calculatedFvPatchVectorField::typeName + ); + + forAll(mesh.boundaryMesh(), patchI) + { + if (isA<directMappedPolyPatch>(mesh.boundaryMesh()[patchI])) + { + patchFieldTypes[patchI] = + directMappedFixedValueFvPatchVectorField::typeName; + } + } + + Pout<< "patchFieldTypes:" << patchFieldTypes << endl; + + volVectorField cc + ( + IOobject + ( + "cc", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedVector("zero", dimLength, vector::zero), + patchFieldTypes + ); + + cc.internalField() = mesh.C().internalField(); + cc.boundaryField().updateCoeffs(); + + forAll(cc.boundaryField(), patchI) + { + if + ( + isA<directMappedFixedValueFvPatchVectorField> + ( + cc.boundaryField()[patchI] + ) + ) + { + Pout<< "Detected a directMapped patch:" << patchI << endl; + + OFstream str(mesh.boundaryMesh()[patchI].name() + ".obj"); + Pout<< "Writing mapped values to " << str.name() << endl; + + label vertI = 0; + const fvPatchVectorField& fvp = cc.boundaryField()[patchI]; + + forAll(fvp, i) + { + meshTools::writeOBJ(str, fvp.patch().Cf()[i]); + vertI++; + meshTools::writeOBJ(str, fvp[i]); + vertI++; + str << "l " << vertI-1 << ' ' << vertI << nl; + } + } + } + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/test/extendedStencil/Make/files b/applications/test/extendedStencil/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..236668cde8f9c8da6ac1f75d1e0d9de0f36ad04f --- /dev/null +++ b/applications/test/extendedStencil/Make/files @@ -0,0 +1,4 @@ + +testExtendedStencil.C + +EXE = $(FOAM_USER_APPBIN)/testExtendedStencil diff --git a/applications/test/extendedStencil/Make/options b/applications/test/extendedStencil/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..b733f6ac04019776e5ae1378c65835fcd6209972 --- /dev/null +++ b/applications/test/extendedStencil/Make/options @@ -0,0 +1,6 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude + +EXE_LIBS = \ + -lfiniteVolume diff --git a/applications/test/extendedStencil/testExtendedStencil.C b/applications/test/extendedStencil/testExtendedStencil.C new file mode 100644 index 0000000000000000000000000000000000000000..b8db2b89bf993552dd8582ba0c77c2cef58b121a --- /dev/null +++ b/applications/test/extendedStencil/testExtendedStencil.C @@ -0,0 +1,499 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +Application + testExtendedStencil + +Description + Test app for determining extended stencil. + +\*---------------------------------------------------------------------------*/ + +#include "argList.H" +#include "fvMesh.H" +#include "volFields.H" +#include "Time.H" +#include "mapDistribute.H" +#include "OFstream.H" +#include "meshTools.H" +//#include "FECCellToFaceStencil.H" +//#include "CFCCellToFaceStencil.H" +//#include "CPCCellToFaceStencil.H" +//#include "CECCellToFaceStencil.H" +//#include "extendedCentredCellToFaceStencil.H" +//#include "extendedUpwindCellToFaceStencil.H" + +//#include "centredCFCCellToFaceStencilObject.H" +//#include "centredFECCellToFaceStencilObject.H" +//#include "centredCPCCellToFaceStencilObject.H" +//#include "centredCECCellToFaceStencilObject.H" + +//#include "upwindFECCellToFaceStencilObject.H" +//#include "upwindCPCCellToFaceStencilObject.H" +//#include "upwindCECCellToFaceStencilObject.H" + +//#include "upwindCFCCellToFaceStencilObject.H" +#include "centredCFCFaceToCellStencilObject.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +void writeStencilOBJ +( + const fileName& fName, + const point& fc, + const List<point>& stencilCc +) +{ + OFstream str(fName); + label vertI = 0; + + meshTools::writeOBJ(str, fc); + vertI++; + + forAll(stencilCc, i) + { + meshTools::writeOBJ(str, stencilCc[i]); + vertI++; + str << "l 1 " << vertI << nl; + } +} + + +// Stats +void writeStencilStats(const labelListList& stencil) +{ + label sumSize = 0; + label nSum = 0; + label minSize = labelMax; + label maxSize = labelMin; + + forAll(stencil, i) + { + const labelList& sCells = stencil[i]; + + if (sCells.size() > 0) + { + sumSize += sCells.size(); + nSum++; + minSize = min(minSize, sCells.size()); + maxSize = max(maxSize, sCells.size()); + } + } + reduce(sumSize, sumOp<label>()); + reduce(nSum, sumOp<label>()); + sumSize /= nSum; + + reduce(minSize, minOp<label>()); + reduce(maxSize, maxOp<label>()); + + Info<< "Stencil size :" << nl + << " average : " << sumSize << nl + << " min : " << minSize << nl + << " max : " << maxSize << nl + << endl; +} + + +// Main program: + +int main(int argc, char *argv[]) +{ +# include "addTimeOptions.H" +# include "setRootCase.H" +# include "createTime.H" + + // Get times list + instantList Times = runTime.times(); +# include "checkTimeOptions.H" + runTime.setTime(Times[startTime], startTime); +# include "createMesh.H" + + // Force calculation of extended edge addressing + const labelListList& edgeFaces = mesh.edgeFaces(); + const labelListList& edgeCells = mesh.edgeCells(); + const labelListList& pointCells = mesh.pointCells(); + Info<< "dummy:" << edgeFaces.size() + edgeCells.size() + pointCells.size() + << endl; + + + // Centred, semi-extended stencil (edge cells only) + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +// { +// //const FECCellToFaceStencil cfcStencil(mesh); +// //const extendedCentredCellToFaceStencil addressing +// //( +// // cfcStencil +// //); +// const extendedCentredStencil& addressing = +// centredFECCellToFaceStencilObject::New +// ( +// mesh +// ); +// +// Info<< "faceEdgeCell:" << endl; +// writeStencilStats(addressing.stencil()); +// +// // Collect stencil cell centres +// List<List<point> > stencilPoints(mesh.nFaces()); +// addressing.collectData +// ( +// mesh.C(), +// stencilPoints +// ); +// +// forAll(stencilPoints, faceI) +// { +// writeStencilOBJ +// ( +// runTime.path()/"faceEdgeCell" + Foam::name(faceI) + ".obj", +// mesh.faceCentres()[faceI], +// stencilPoints[faceI] +// ); +// } +// } + + + + +// // Centred, face stencil +// // ~~~~~~~~~~~~~~~~~~~~~ +// +// { +// const extendedCentredCellToFaceStencil& addressing = +// centredCFCCellToFaceStencilObject::New +// ( +// mesh +// ); +// +// Info<< "cellFaceCell:" << endl; +// writeStencilStats(addressing.stencil()); +// +// +// //// Do some interpolation. +// //{ +// // const labelListList& stencil = addressing.stencil(); +// // List<List<scalar> > stencilWeights(stencil.size()); +// // forAll(stencil, faceI) +// // { +// // const labelList& fStencil = stencil[faceI]; +// // +// // if (fStencil.size() > 0) +// // { +// // // Uniform weights +// // stencilWeights[faceI] = scalarList +// // ( +// // fStencil.size(), +// // 1.0/fStencil.size() +// // ); +// // } +// // } +// // +// // tmp<surfaceVectorField> tfc +// // ( +// // addressing.weightedSum(mesh.C(), stencilWeights) +// // ); +// //} +// +// +// // Collect stencil cell centres +// List<List<point> > stencilPoints(mesh.nFaces()); +// addressing.collectData +// ( +// mesh.C(), +// stencilPoints +// ); +// +// forAll(stencilPoints, faceI) +// { +// if (stencilPoints[faceI].size() >= 15) +// { +// writeStencilOBJ +// ( +// runTime.path()/"centredFace" + Foam::name(faceI) + ".obj", +// mesh.faceCentres()[faceI], +// stencilPoints[faceI] +// ); +// } +// } +// } + + +// // Centred, point stencil +// // ~~~~~~~~~~~~~~~~~~~~~~ +// +// { +// //const extendedCentredCellToFaceStencil& addressing = +// //centredCPCStencilObject::New +// //( +// // mesh +// //); +// // +// //Info<< "cellPointCell:" << endl; +// //writeStencilStats(addressing.stencil()); +// // +// // +// //// Collect stencil cell centres +// //List<List<point> > stencilPoints(mesh.nFaces()); +// //addressing.collectData +// //( +// // mesh.C(), +// // stencilPoints +// //); +// // +// //forAll(stencilPoints, faceI) +// //{ +// // writeStencilOBJ +// // ( +// // runTime.path()/"centredPoint" + Foam::name(faceI) + ".obj", +// // mesh.faceCentres()[faceI], +// // stencilPoints[faceI] +// // ); +// //} +// } + + + +// // Centred, edge stencil +// // ~~~~~~~~~~~~~~~~~~~~~~ +// +// { +// //const extendedCentredCellToFaceStencil& addressing = +// //centredCECStencilObject::New +// //( +// // mesh +// //); +// // +// //Info<< "cellEdgeCell:" << endl; +// //writeStencilStats(addressing.stencil()); +// // +// // +// //// Collect stencil cell centres +// //List<List<point> > stencilPoints(mesh.nFaces()); +// //addressing.collectData +// //( +// // mesh.C(), +// // stencilPoints +// //); +// // +// //forAll(stencilPoints, faceI) +// //{ +// // writeStencilOBJ +// // ( +// // runTime.path()/"centredEdge" + Foam::name(faceI) + ".obj", +// // mesh.faceCentres()[faceI], +// // stencilPoints[faceI] +// // ); +// //} +// } + + + + // Upwind, semi-extended stencil + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + //{ + // const extendedUpwindCellToFaceStencil& addressing = + // upwindFECCellToFaceStencilObject::New + // ( + // mesh, + // 0.5 + // ); + // + // Info<< "upwind-faceEdgeCell:" << endl; + // writeStencilStats(addressing.ownStencil()); + // + // { + // // Collect stencil cell centres + // List<List<point> > ownPoints(mesh.nFaces()); + // addressing.collectData + // ( + // addressing.ownMap(), + // addressing.ownStencil(), + // mesh.C(), + // ownPoints + // ); + // + // forAll(ownPoints, faceI) + // { + // writeStencilOBJ + // ( + // runTime.path()/"ownFEC" + Foam::name(faceI) + ".obj", + // mesh.faceCentres()[faceI], + // ownPoints[faceI] + // ); + // } + // } + // { + // // Collect stencil cell centres + // List<List<point> > neiPoints(mesh.nFaces()); + // addressing.collectData + // ( + // addressing.neiMap(), + // addressing.neiStencil(), + // mesh.C(), + // neiPoints + // ); + // + // forAll(neiPoints, faceI) + // { + // writeStencilOBJ + // ( + // runTime.path()/"neiFEC" + Foam::name(faceI) + ".obj", + // mesh.faceCentres()[faceI], + // neiPoints[faceI] + // ); + // } + // } + //} + + + + // Upwind, extended stencil + // ~~~~~~~~~~~~~~~~~~~~~~~~ + + //{ + // const extendedUpwindCellToFaceStencil& addressing = + // upwindCFCCellToFaceStencilObject::New + // ( + // mesh, + // 0.5 + // ); + // + // Info<< "upwind-cellFaceCell:" << endl; + // writeStencilStats(addressing.ownStencil()); + // + // { + // // Collect stencil cell centres + // List<List<point> > ownPoints(mesh.nFaces()); + // addressing.collectData + // ( + // addressing.ownMap(), + // addressing.ownStencil(), + // mesh.C(), + // ownPoints + // ); + // + // forAll(ownPoints, faceI) + // { + // writeStencilOBJ + // ( + // runTime.path()/"ownCFC" + Foam::name(faceI) + ".obj", + // mesh.faceCentres()[faceI], + // ownPoints[faceI] + // ); + // } + // } + // { + // // Collect stencil cell centres + // List<List<point> > neiPoints(mesh.nFaces()); + // addressing.collectData + // ( + // addressing.neiMap(), + // addressing.neiStencil(), + // mesh.C(), + // neiPoints + // ); + // + // forAll(neiPoints, faceI) + // { + // writeStencilOBJ + // ( + // runTime.path()/"neiCFC" + Foam::name(faceI) + ".obj", + // mesh.faceCentres()[faceI], + // neiPoints[faceI] + // ); + // } + // } + //} + + + + //---- CELL CENTRED STENCIL ----- + + // Centred, cell stencil + // ~~~~~~~~~~~~~~~~~~~~~ + + { + const extendedCentredFaceToCellStencil& addressing = + centredCFCFaceToCellStencilObject::New + ( + mesh + ); + + Info<< "cellFaceCell:" << endl; + writeStencilStats(addressing.stencil()); + + // Collect stencil face centres + List<List<point> > stencilPoints(mesh.nCells()); + addressing.collectData + ( + mesh.Cf(), + stencilPoints + ); + + forAll(stencilPoints, cellI) + { + writeStencilOBJ + ( + runTime.path()/"centredCell" + Foam::name(cellI) + ".obj", + mesh.cellCentres()[cellI], + stencilPoints[cellI] + ); + } + } + + +//XXXXXX +// // Evaluate +// List<List<scalar> > stencilData(faceStencils.size()); +// collectStencilData +// ( +// distMap, +// faceStencils, +// vf, +// stencilData +// ); +// for(label faci = 0; faci < mesh.nInternalFaces(); faci++) +// { +// const scalarList& stData = stencilData[faceI]; +// const scalarList& stWeight = fit[faceI]; +// +// forAll(stData, i) +// { +// sf[faceI] += stWeight[i]*stData[i]; +// } +// } +// See finiteVolume/lnInclude/leastSquaresGrad.C +//XXXXXX + + Pout<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C index e87078cc397294edf650a2fa371d7bb49bdd43ce..d4d6d11539cee0aaa35b20200a3471fb85e01f91 100644 --- a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C +++ b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C @@ -465,7 +465,7 @@ int main(int argc, char *argv[]) scalar minLen(readScalar(IStringStream(args.additionalArgs()[0])())); scalar angle(readScalar(IStringStream(args.additionalArgs()[1])())); - bool overwrite = args.options().found("overwrite"); + bool overwrite = args.optionFound("overwrite"); scalar maxCos = Foam::cos(angle*180/mathematicalConstant::pi); diff --git a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C index fa244430f6b474da5c561052f81b6e7ff0aaac93..60c94395614766a61d1e1ff49e6b039b5194846d 100644 --- a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C +++ b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C @@ -448,19 +448,12 @@ int main(int argc, char *argv[]) scalar minCos = Foam::cos(featureAngle*mathematicalConstant::pi/180.0); scalar concaveAngle = defaultConcaveAngle; - - if (args.options().found("concaveAngle")) - { - concaveAngle = readScalar - ( - IStringStream(args.options()["concaveAngle"])() - ); - } + args.optionReadIfPresent("concaveAngle", concaveAngle); scalar concaveSin = Foam::sin(concaveAngle*mathematicalConstant::pi/180.0); - bool snapMeshDict = args.options().found("snapMesh"); - bool overwrite = args.options().found("overwrite"); + bool snapMeshDict = args.optionFound("snapMesh"); + bool overwrite = args.optionFound("overwrite"); Info<< "Merging all faces of a cell" << nl << " - which are on the same patch" << nl diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C index 0011d750e5613785d69f54d2a8dff9944b596b23..a78ade8d6d42231a9514b922b821bec35cd75c19 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C +++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C @@ -336,7 +336,7 @@ int main(int argc, char *argv[]) # include "createPolyMesh.H" const word oldInstance = mesh.pointsInstance(); - bool overwrite = args.options().found("overwrite"); + bool overwrite = args.optionFound("overwrite"); Info<< "Reading modifyMeshDict\n" << endl; diff --git a/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C b/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C index c18e0af978a147ca1b9b2dc522f6d8773f85b947..77a09ff7b95cf233a65dda49db1d68b539409db5 100644 --- a/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C +++ b/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) pointMesh pMesh(mesh); word cellSetName(args.args()[1]); - bool overwrite = args.options().found("overwrite"); + bool overwrite = args.optionFound("overwrite"); Info<< "Reading cells to refine from cellSet " << cellSetName << nl << endl; diff --git a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C index 9c608366aae814d6e48c8c331ad76581b25a7ede..a78dade6fd77be41c6f95577118b7c236b75c239 100644 --- a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C +++ b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) word patchName(args.additionalArgs()[0]); scalar weight(readScalar(IStringStream(args.additionalArgs()[1])())); - bool overwrite = args.options().found("overwrite"); + bool overwrite = args.optionFound("overwrite"); label patchID = mesh.boundaryMesh().findPatchID(patchName); @@ -101,11 +101,11 @@ int main(int argc, char *argv[]) // List of cells to refine // - bool useSet = args.options().found("useSet"); + bool useSet = args.optionFound("useSet"); if (useSet) { - word setName(args.options()["useSet"]); + word setName(args.option("useSet")); Info<< "Subsetting cells to cut based on cellSet" << setName << endl << endl; diff --git a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C index 25b13eba8889f021551daa940dd17cbeb81ff48d..7732c985b8484a2c822c846c3a5b554da162aa80 100644 --- a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C +++ b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C @@ -110,7 +110,7 @@ int main(int argc, char *argv[]) << " to allow for some truncation error." << nl << endl; - bool readLevel = args.options().found("readLevel"); + bool readLevel = args.optionFound("readLevel"); const scalarField& vols = mesh.cellVolumes(); diff --git a/applications/utilities/mesh/advanced/removeFaces/removeFaces.C b/applications/utilities/mesh/advanced/removeFaces/removeFaces.C index 26ee404fe8d79809c9519d27d52b825d3e45fe28..c3fcc727d2087f05a8cc8e0beff782a063a0e30b 100644 --- a/applications/utilities/mesh/advanced/removeFaces/removeFaces.C +++ b/applications/utilities/mesh/advanced/removeFaces/removeFaces.C @@ -57,7 +57,7 @@ int main(int argc, char *argv[]) # include "createMesh.H" const word oldInstance = mesh.pointsInstance(); - bool overwrite = args.options().found("overwrite"); + bool overwrite = args.optionFound("overwrite"); word setName(args.additionalArgs()[0]); diff --git a/applications/utilities/mesh/advanced/splitCells/splitCells.C b/applications/utilities/mesh/advanced/splitCells/splitCells.C index 6424745e9ad8df6cbcbc1228edbcb2a21fda4f21..3aa649ee8be4314f01e6e10789b880f59fad5435 100644 --- a/applications/utilities/mesh/advanced/splitCells/splitCells.C +++ b/applications/utilities/mesh/advanced/splitCells/splitCells.C @@ -542,23 +542,19 @@ int main(int argc, char *argv[]) scalar minCos = Foam::cos(radAngle); scalar minSin = Foam::sin(radAngle); - bool readSet = args.options().found("set"); - bool geometry = args.options().found("geometry"); - bool overwrite = args.options().found("overwrite"); + bool readSet = args.optionFound("set"); + bool geometry = args.optionFound("geometry"); + bool overwrite = args.optionFound("overwrite"); scalar edgeTol = 0.2; - - if (args.options().found("tol")) - { - edgeTol = readScalar(IStringStream(args.options()["tol"])()); - } + args.optionReadIfPresent("tol", edgeTol); Info<< "Trying to split cells with internal angles > feature angle\n" << nl << "featureAngle : " << featureAngle << nl << "edge snapping tol : " << edgeTol << nl; if (readSet) { - Info<< "candidate cells : cellSet " << args.options()["set"] << nl; + Info<< "candidate cells : cellSet " << args.option("set") << nl; } else { @@ -586,7 +582,7 @@ int main(int argc, char *argv[]) if (readSet) { // Read cells to cut from cellSet - cellSet cells(mesh, args.options()["set"]); + cellSet cells(mesh, args.option("set")); cellsToCut = cells; } diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index 149d9af19b9650891a33b36b2585a97cd9060037..2fffcaa813f65749989388733813571eaa9bdcdf 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -1,4 +1,4 @@ -/*---------------------------------------------------------------------------*\ +/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | @@ -246,10 +246,7 @@ int main(int argc, char *argv[]) } scalar scaleFactor = 1.0; - if (args.options().found("scale")) - { - scaleFactor = atof(args.options()["scale"].c_str()); - } + args.optionReadIfPresent("scale", scaleFactor); # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C b/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C index df84d13a79cff7c21c9e16742a95f60b5130d492..d193a481330205b146f4c3afe20ec4fab7ea1a25 100644 --- a/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C +++ b/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C @@ -60,10 +60,7 @@ int main(int argc, char *argv[]) } scalar scaleFactor = 1.0; - if (args.options().found("scale")) - { - scaleFactor = atof(args.options()["scale"].c_str()); - } + args.optionReadIfPresent("scale", scaleFactor); # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L index a8606e0df962c51b1de0389facd8f764b3e36751..89477520816024a4934fab977c33523148eab2d9 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L @@ -1,4 +1,4 @@ -/*---------------------------------------------------------------------------*\ +/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | @@ -760,21 +760,18 @@ int main(int argc, char *argv[]) FatalError.exit(); } - if (args.options().found("scale")) - { - scaleFactor = atof(args.options()["scale"].c_str()); - } + args.optionReadIfPresent("scale", scaleFactor); HashSet<word> ignoreCellGroups; - if (args.options().found("ignoreCellGroups")) + if (args.optionFound("ignoreCellGroups")) { - IStringStream(args.options()["ignoreCellGroups"])() >> ignoreCellGroups; + args.optionLookup("ignoreCellGroups")() >> ignoreCellGroups; } HashSet<word> ignoreFaceGroups; - if (args.options().found("ignoreFaceGroups")) + if (args.optionFound("ignoreFaceGroups")) { - IStringStream(args.options()["ignoreFaceGroups"])() >> ignoreFaceGroups; + args.optionLookup("ignoreFaceGroups")() >> ignoreFaceGroups; } # include "createTime.H" @@ -819,6 +816,8 @@ int main(int argc, char *argv[]) // Pre-filtering: flip "owner" boundary or wrong oriented internal // faces and move to neighbour + + boolList fm(faces.size(), false); forAll (faces, facei) { if @@ -827,6 +826,7 @@ int main(int argc, char *argv[]) || (neighbour[facei] != -1 && owner[facei] > neighbour[facei]) ) { + fm[facei] = true; faces[facei] = faces[facei].reverseFace(); Swap(owner[facei], neighbour[facei]); } @@ -1178,7 +1178,7 @@ int main(int argc, char *argv[]) false, // flipFaceFlux -1, // patchID faceZonei, // zoneID - false // zoneFlip + fm[facei] // zoneFlip ); } diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L index 7b385bfe0615ab2cec06838f4ca6fe0992647c58..d1afc4523a5e0ba97cacaa6abd9a4eeecdeebfa7 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L @@ -879,13 +879,10 @@ int main(int argc, char *argv[]) } scalar scaleFactor = 1.0; - if (args.options().found("scale")) - { - scaleFactor = atof(args.options()["scale"].c_str()); - } + args.optionReadIfPresent("scale", scaleFactor); - bool writeSets = args.options().found("writeSets"); - bool writeZones = args.options().found("writeZones"); + bool writeSets = args.optionFound("writeSets"); + bool writeZones = args.optionFound("writeZones"); # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C b/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C index 5cdbcb77e89f0d4a47aefdc6e2a80b90fc217492..b36ec777694b35d4a640212171062ad026020254 100644 --- a/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C +++ b/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C @@ -87,7 +87,7 @@ int main(int argc, char *argv[]) instantList timeDirs = timeSelector::select0(runTime, args); bool surfaceOnly = false; - if (args.options().found("surface") or args.options().found("tri")) + if (args.optionFound("surface") || args.optionFound("tri")) { surfaceOnly = true; } @@ -98,16 +98,15 @@ int main(int argc, char *argv[]) exportName = meshWriter::defaultSurfaceName; } - if (args.options().found("case")) + if (args.optionFound("case")) { exportName += '-' + args.globalCaseName(); } // default: rescale from [m] to [mm] scalar scaleFactor = 1000; - if (args.options().found("scale")) + if (args.optionReadIfPresent("scale", scaleFactor)) { - scaleFactor = readScalar(IStringStream(args.options()["scale"])()); if (scaleFactor <= 0) { scaleFactor = 1; @@ -129,7 +128,7 @@ int main(int argc, char *argv[]) { meshWriters::STARCD writer(mesh, scaleFactor); - if (args.options().found("noBnd")) + if (args.optionFound("noBnd")) { writer.noBoundary(); } @@ -142,7 +141,7 @@ int main(int argc, char *argv[]) if (surfaceOnly) { - if (args.options().found("tri")) + if (args.optionFound("tri")) { writer.writeSurface(meshName, true); } diff --git a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L index 6c61a219f3996458a72bd57ae7c4b307a6a70b9e..f815e81b5327c2a86fc4407831a48603c995130b 100644 --- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L +++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L @@ -1,4 +1,4 @@ -/*---------------------------------------------------------------------------*\ +/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | @@ -646,10 +646,7 @@ int main(int argc, char *argv[]) } scalar scaleFactor = 1.0; - if (args.options().found("scale")) - { - scaleFactor = atof(args.options()["scale"].c_str()); - } + args.optionReadIfPresent("scale", scaleFactor); # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C index 62edc15af03dd7db103ff4fae7be2a5f184ca6eb..68eb9c46cfc2cb6b3d22b26e1d4c960382cee03e 100644 --- a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C +++ b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C @@ -689,7 +689,7 @@ int main(int argc, char *argv[]) fileName mshName(args.additionalArgs()[0]); - bool keepOrientation = args.options().found("keepOrientation"); + bool keepOrientation = args.optionFound("keepOrientation"); // Storage for points pointField points; diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C index 520be5b1463205fceef61a57facf1ea2c36a6c79..6a9d85ba301b115c2a4d02f1fa19895598e1a373 100644 --- a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C +++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C @@ -852,7 +852,7 @@ int main(int argc, char *argv[]) // For debugging: dump boundary faces as triSurface - if (args.options().found("dump")) + if (args.optionFound("dump")) { DynamicList<labelledTri> triangles(boundaryFaces.size()); diff --git a/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C b/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C index 235f8986c601e0f4f849c6fb9587017f18f8a8e6..1da7ba049e4202ae5e2065fe3f9be3fd0a5502a6 100644 --- a/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C +++ b/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C @@ -68,15 +68,15 @@ int main(int argc, char *argv[]) # include "createTime.H" fileName kivaFileName("otape17"); - if (args.options().found("file")) + if (args.optionFound("file")) { - kivaFileName = args.options()["file"]; + kivaFileName = args.option("file"); } kivaVersions kivaVersion = kiva3v; - if (args.options().found("version")) + if (args.optionFound("version")) { - word kivaVersionName = args.options()["version"]; + word kivaVersionName = args.option("version"); if (kivaVersionName == "kiva3") { @@ -99,10 +99,7 @@ int main(int argc, char *argv[]) } scalar zHeadMin = -GREAT; - if (args.options().found("zHeadMin")) - { - zHeadMin = atof(args.options()["zHeadMin"].c_str()); - } + args.optionReadIfPresent("zHeadMin", zHeadMin); # include "readKivaGrid.H" diff --git a/applications/utilities/mesh/conversion/mshToFoam/mshToFoam.C b/applications/utilities/mesh/conversion/mshToFoam/mshToFoam.C index 2a48971abd5740020e2b58b9910784ec6d33331a..df438b356651c8cdbb209eb9a521c2ade344369e 100644 --- a/applications/utilities/mesh/conversion/mshToFoam/mshToFoam.C +++ b/applications/utilities/mesh/conversion/mshToFoam/mshToFoam.C @@ -62,14 +62,12 @@ int main(int argc, char *argv[]) # include "setRootCase.H" # include "createTime.H" - bool readHex(args.options().found("hex")); + bool readHex = args.optionFound("hex"); fileName mshFile(args.additionalArgs()[0]); - IFstream mshStream(mshFile); label nCells; - mshStream >> nCells; if (readHex) diff --git a/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C b/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C index 644efa906c368e1efcd58f89f1c72427793cdcfb..b1ea5df43fb096dc70fcbf46c73643a42a494436 100644 --- a/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C +++ b/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C @@ -71,18 +71,14 @@ int main(int argc, char *argv[]) } scalar scaleFactor = 1.0; - if (args.options().found("scale")) - { - scaleFactor = atof(args.options()["scale"].c_str()); - } + args.optionReadIfPresent("scale", scaleFactor); - bool readBlank = !args.options().found("noBlank"); - bool singleBlock = args.options().found("singleBlock"); - scalar twoDThicknes = -1; - if (args.options().found("2D")) + bool readBlank = !args.optionFound("noBlank"); + bool singleBlock = args.optionFound("singleBlock"); + scalar twoDThickness = -1; + if (args.optionReadIfPresent("2D", twoDThickness)) { - twoDThicknes = readScalar(IStringStream(args.options()["2D"])()); - Info<< "Reading 2D case by extruding points by " << twoDThicknes + Info<< "Reading 2D case by extruding points by " << twoDThickness << " in z direction." << nl << endl; } @@ -114,7 +110,7 @@ int main(int argc, char *argv[]) forAll (blocks, blockI) { - if (twoDThicknes > 0) + if (twoDThickness > 0) { // Fake second set of points (done in readPoints below) plot3dFile >> nx >> ny; @@ -139,7 +135,7 @@ int main(int argc, char *argv[]) forAll (blocks, blockI) { Info<< "block " << blockI << ":" << nl; - blocks[blockI].readPoints(readBlank, twoDThicknes, plot3dFile); + blocks[blockI].readPoints(readBlank, twoDThickness, plot3dFile); sumPoints += blocks[blockI].nBlockPoints(); nMeshCells += blocks[blockI].nBlockCells(); Info<< nl; diff --git a/applications/utilities/mesh/conversion/polyDualMesh/meshDualiser.C b/applications/utilities/mesh/conversion/polyDualMesh/meshDualiser.C index ad7affddaeec4ed9d1ba8dbb4ea1a09fca6e0643..dfc1fbb20e651bb85c0ea2edee738d3e111234ae 100644 --- a/applications/utilities/mesh/conversion/polyDualMesh/meshDualiser.C +++ b/applications/utilities/mesh/conversion/polyDualMesh/meshDualiser.C @@ -1077,7 +1077,7 @@ void Foam::meshDualiser::setRefinement { label pointI = multiCellFeaturePoints[i]; - if (pointToDualCells_[pointI].size()) + if (pointToDualCells_[pointI].size() > 0) { FatalErrorIn ( diff --git a/applications/utilities/mesh/conversion/polyDualMesh/polyDualMeshApp.C b/applications/utilities/mesh/conversion/polyDualMesh/polyDualMeshApp.C index ffb2cb7daae965e8b624ce720860fd36a0304a02..a410c1d8922b14000fedc606a662eb82e5b07bb4 100644 --- a/applications/utilities/mesh/conversion/polyDualMesh/polyDualMeshApp.C +++ b/applications/utilities/mesh/conversion/polyDualMesh/polyDualMeshApp.C @@ -25,26 +25,39 @@ License Description Calculate the dual of a polyMesh. Adheres to all the feature&patch edges. - Feature angle: - convex features : point becomes single boundary cell with multiple - boundary faces. - concave features: point becomes multiple boundary cells. - -splitAllFaces: +Usage + + - polyDualMesh featureAngle + + Detects any boundary edge > angle and creates multiple boundary faces + for it. Normal behaviour is to have each point become a cell + (1.5 behaviour) + + @param -concaveMultiCells + Creates multiple cells for each point on a concave edge. Might limit + the amount of distortion on some meshes. + + @param -splitAllFaces Normally only constructs a single face between two cells. This single face might be too distorted. splitAllFaces will create a single face for every original cell the face passes through. The mesh will thus have multiple faces inbetween two cells! (so is not strictly upper-triangular anymore - checkMesh will complain) - -doNotPreserveFaceZones: + + @param -doNotPreserveFaceZones: By default all faceZones are preserved by marking all faces, edges and points on them as features. The -doNotPreserveFaceZones disables this behaviour. + Note: is just a driver for meshDualiser. Substitute your own + simpleMarkFeatures to have different behaviour. + \*---------------------------------------------------------------------------*/ #include "argList.H" #include "Time.H" +#include "timeSelector.H" #include "fvMesh.H" #include "mathematicalConstants.H" #include "polyTopoChange.H" @@ -69,6 +82,7 @@ void simpleMarkFeatures const polyMesh& mesh, const PackedBoolList& isBoundaryEdge, const scalar featureAngle, + const bool concaveMultiCells, const bool doNotPreserveFaceZones, labelList& featureFaces, @@ -181,7 +195,7 @@ void simpleMarkFeatures - allBoundary[f0].centre(allBoundary.points()) ); - if ((c1c0 & n0) > SMALL) + if (concaveMultiCells && (c1c0 & n0) > SMALL) { // Found concave edge. Make into multiCell features Info<< "Detected concave feature edge:" << edgeI @@ -229,7 +243,7 @@ void simpleMarkFeatures if (doNotPreserveFaceZones) { - if (faceZones.size()) + if (faceZones.size() > 0) { WarningIn("simpleMarkFeatures(..)") << "Detected " << faceZones.size() @@ -239,7 +253,7 @@ void simpleMarkFeatures } else { - if (faceZones.size()) + if (faceZones.size() > 0) { Info<< "Detected " << faceZones.size() << " faceZones. Preserving these by marking their" @@ -340,22 +354,21 @@ void dumpFeatures int main(int argc, char *argv[]) { argList::noParallel(); -# include "addTimeOptions.H" + timeSelector::addOptions(true, false); + argList::validArgs.append("feature angle[0-180]"); argList::validOptions.insert("splitAllFaces", ""); + argList::validOptions.insert("concaveMultiCells", ""); argList::validOptions.insert("doNotPreserveFaceZones", ""); argList::validOptions.insert("overwrite", ""); # include "setRootCase.H" # include "createTime.H" - // Get times list - instantList Times = runTime.times(); - -# include "checkTimeOptions.H" - runTime.setTime(Times[startTime], startTime); + instantList timeDirs = timeSelector::select0(runTime, args); # include "createMesh.H" + const word oldInstance = mesh.pointsInstance(); // Mark boundary edges and points. @@ -381,12 +394,26 @@ int main(int argc, char *argv[]) << endl; - const bool splitAllFaces = args.options().found("splitAllFaces"); - const bool overwrite = args.options().found("overwrite"); - const bool doNotPreserveFaceZones = args.options().found + const bool splitAllFaces = args.optionFound("splitAllFaces"); + if (splitAllFaces) + { + Info<< "Splitting all internal faces to create multiple faces" + << " between two cells." << nl + << endl; + } + + const bool overwrite = args.optionFound("overwrite"); + const bool doNotPreserveFaceZones = args.optionFound ( "doNotPreserveFaceZones" ); + const bool concaveMultiCells = args.optionFound("concaveMultiCells"); + if (concaveMultiCells) + { + Info<< "Generating multiple cells for points on concave feature edges." + << nl << endl; + } + // Face(centre)s that need inclusion in the dual mesh labelList featureFaces; @@ -394,7 +421,7 @@ int main(int argc, char *argv[]) labelList featureEdges; // Points (that become a single cell) that need inclusion in the dual mesh labelList singleCellFeaturePoints; - // Points (that become a mulitple cells) ,, + // Points (that become a multiple cells) ,, labelList multiCellFeaturePoints; // Sample implementation of feature detection. @@ -403,6 +430,7 @@ int main(int argc, char *argv[]) mesh, isBoundaryEdge, featureAngle, + concaveMultiCells, doNotPreserveFaceZones, featureFaces, diff --git a/applications/utilities/mesh/conversion/sammToFoam/sammToFoam.C b/applications/utilities/mesh/conversion/sammToFoam/sammToFoam.C index d676581a576f2d47c6fbce09de18a0d9dd96a8ab..8095529d3270eeb39c7bbe16771b388aa50b0ced 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/sammToFoam.C +++ b/applications/utilities/mesh/conversion/sammToFoam/sammToFoam.C @@ -51,10 +51,7 @@ int main(int argc, char *argv[]) } scalar scaleFactor = 1.0; - if (args.options().found("scale")) - { - scaleFactor = atof(args.options()["scale"].c_str()); - } + args.optionReadIfPresent("scale", scaleFactor); # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/star4ToFoam/star4ToFoam.C b/applications/utilities/mesh/conversion/star4ToFoam/star4ToFoam.C index c0d66dbb5872fc61686e8fa3a15ffa975de05232..c4f8d6efc6a72d4ab79e15442eaf2543d27b1caa 100644 --- a/applications/utilities/mesh/conversion/star4ToFoam/star4ToFoam.C +++ b/applications/utilities/mesh/conversion/star4ToFoam/star4ToFoam.C @@ -68,27 +68,26 @@ int main(int argc, char *argv[]) argList args(argc, argv); Time runTime(args.rootPath(), args.caseName()); - stringList const& params = args.additionalArgs(); + const stringList& params = args.additionalArgs(); // default rescale from [mm] to [m] scalar scaleFactor = 0.001; - if (args.options().found("scale")) + if (args.optionReadIfPresent("scale", scaleFactor)) { - scaleFactor = readScalar(IStringStream(args.options()["scale"])()); if (scaleFactor <= 0) { scaleFactor = 1; } } - - if (args.options().found("solids")) + + if (args.optionFound("solids")) { meshReaders::STARCD::keepSolids = true; } // default to binary output, unless otherwise specified IOstream::streamFormat format = IOstream::BINARY; - if (args.options().found("ascii")) + if (args.optionFound("ascii")) { format = IOstream::ASCII; } diff --git a/applications/utilities/mesh/conversion/starToFoam/starToFoam.C b/applications/utilities/mesh/conversion/starToFoam/starToFoam.C index 2f7d9c89803261af1b70735996c97db74aa0c0f0..2c2aeaa76b5ba2cc2a3350c6ebe7075e21ff3f23 100644 --- a/applications/utilities/mesh/conversion/starToFoam/starToFoam.C +++ b/applications/utilities/mesh/conversion/starToFoam/starToFoam.C @@ -51,10 +51,7 @@ int main(int argc, char *argv[]) } scalar scaleFactor = 1.0; - if (args.options().found("scale")) - { - scaleFactor = atof(args.options()["scale"].c_str()); - } + args.optionReadIfPresent("scale", scaleFactor); # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C b/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C index 486041c71457b39787121d453d06c3bc7fa52b98..9e9426d0852fe093410030730bee34659d2aaf79 100644 --- a/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C +++ b/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C @@ -103,7 +103,7 @@ int main(int argc, char *argv[]) # include "createTime.H" - bool readFaceFile = !args.options().found("noFaceFile"); + bool readFaceFile = !args.optionFound("noFaceFile"); fileName prefix(args.additionalArgs()[0]); diff --git a/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C b/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C index 9eaaf2c199ffb24ce064ab888d5739b8ec63160e..e1d571e0816f4f146decba57af55579348a03a2f 100644 --- a/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C +++ b/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C @@ -350,12 +350,12 @@ int main(int argc, char *argv[]) # include "createTime.H" runTime.functionObjects().off(); - bool patchFaces = args.options().found("patchFaces"); - bool doCell = args.options().found("cell"); - bool doPoint = args.options().found("point"); - bool doFace = args.options().found("face"); - bool doCellSet = args.options().found("cellSet"); - bool doFaceSet = args.options().found("faceSet"); + bool patchFaces = args.optionFound("patchFaces"); + bool doCell = args.optionFound("cell"); + bool doPoint = args.optionFound("point"); + bool doFace = args.optionFound("face"); + bool doCellSet = args.optionFound("cellSet"); + bool doFaceSet = args.optionFound("faceSet"); Info<< "Writing mesh objects as .obj files such that the object" @@ -383,22 +383,19 @@ int main(int argc, char *argv[]) } else if (doCell) { - label cellI = - readLabel(IStringStream(args.options()["cell"])()); + label cellI = args.optionRead<label>("cell"); writePoints(mesh, cellI, runTime.timeName()); } else if (doPoint) { - label pointI = - readLabel(IStringStream(args.options()["point"])()); + label pointI = args.optionRead<label>("point"); writePointCells(mesh, pointI, runTime.timeName()); } else if (doFace) { - label faceI = - readLabel(IStringStream(args.options()["face"])()); + label faceI = args.optionRead<label>("face"); fileName fName ( @@ -420,7 +417,7 @@ int main(int argc, char *argv[]) } else if (doCellSet) { - word setName(args.options()["cellSet"]); + word setName(args.option("cellSet")); cellSet cells(mesh, setName); @@ -432,7 +429,7 @@ int main(int argc, char *argv[]) } else if (doFaceSet) { - word setName(args.options()["faceSet"]); + word setName(args.option("faceSet")); faceSet faces(mesh, setName); diff --git a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C index 815f082ec7dd179b6a1aba308a0c8c1d4c6c6b1a..1bcee69984d1f8b32fed33fc9be7b434e78f2954 100644 --- a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C +++ b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C @@ -83,10 +83,10 @@ int main(int argc, char *argv[]) word regionName; fileName polyMeshDir; - if (args.options().found("region")) + if (args.optionFound("region")) { // constant/<region>/polyMesh/blockMeshDict - regionName = args.options()["region"]; + regionName = args.option("region"); polyMeshDir = regionName/polyMesh::meshSubDir; Info<< nl << "Generating mesh for region " << regionName << endl; @@ -100,9 +100,9 @@ int main(int argc, char *argv[]) autoPtr<IOobject> meshDictIoPtr; - if (args.options().found("dict")) + if (args.optionFound("dict")) { - fileName dictPath(args.options()["dict"]); + fileName dictPath(args.option("dict")); meshDictIoPtr.set ( @@ -110,7 +110,7 @@ int main(int argc, char *argv[]) ( ( isDir(dictPath) - ? dictPath/dictName + ? dictPath/dictName : dictPath ), runTime, @@ -153,7 +153,7 @@ int main(int argc, char *argv[]) blockMesh blocks(meshDict); - if (args.options().found("blockTopology")) + if (args.optionFound("blockTopology")) { // Write mesh as edges. { diff --git a/applications/utilities/mesh/generation/extrude2DMesh/doExtrude2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/doExtrude2DMesh.C index 2e0c16a5116843d70ddf5c3266900a09f4d13292..c71f91079c8cda68c77b86054a9d8cf01c2c4a27 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/doExtrude2DMesh.C +++ b/applications/utilities/mesh/generation/extrude2DMesh/doExtrude2DMesh.C @@ -66,7 +66,7 @@ int main(int argc, char *argv[]) const word oldInstance = mesh.pointsInstance(); scalar thickness(readScalar(IStringStream(args.additionalArgs()[0])())); - bool overwrite = args.options().found("overwrite"); + bool overwrite = args.optionFound("overwrite"); // Check that mesh is 2D diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C index 37860e27b25d217c4ddef3a765058fa6f7b1d8fb..74e505394d0572af18ab603d20e73f31b414b327 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C @@ -23,7 +23,8 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Description - Extrude mesh from existing patch or from patch read from file. + Extrude mesh from existing patch (flipped so has inwards pointing + normals) or from patch read from file. Note: Merges close points so be careful. Type of extrusion prescribed by run-time selectable model. @@ -52,43 +53,34 @@ using namespace Foam; int main(int argc, char *argv[]) { - #include "setRoots.H" + #include "setRootCase.H" #include "createTimeExtruded.H" - if (args.options().found("sourceCase") == args.options().found("surface")) - { - FatalErrorIn(args.executable()) - << "Specify either -sourceCase and -sourcePatch" - " or -surface options\n" - " to specify the source of the patch to extrude" - << exit(FatalError); - } - autoPtr<extrudedMesh> meshPtr(NULL); - autoPtr<extrudeModel> model + IOdictionary dict ( - extrudeModel::New + IOobject ( - IOdictionary - ( - IOobject - ( - "extrudeProperties", - runTimeExtruded.constant(), - runTimeExtruded, - IOobject::MUST_READ - ) - ) + "extrudeProperties", + runTimeExtruded.constant(), + runTimeExtruded, + IOobject::MUST_READ ) ); - if (args.options().found("sourceCase")) + autoPtr<extrudeModel> model(extrudeModel::New(dict)); + + const word sourceType(dict.lookup("constructFrom")); + + autoPtr<faceMesh> fMesh; + + if (sourceType == "patch") { - fileName sourceCasePath(args.options()["sourceCase"]); + fileName sourceCasePath(dict.lookup("sourceCase")); fileName sourceRootDir = sourceCasePath.path(); fileName sourceCaseDir = sourceCasePath.name(); - word patchName(args.options()["sourcePatch"]); + word patchName(dict.lookup("sourcePatch")); Info<< "Extruding patch " << patchName << " on mesh " << sourceCasePath << nl @@ -114,75 +106,69 @@ int main(int argc, char *argv[]) } const polyPatch& pp = mesh.boundaryMesh()[patchID]; + fMesh.reset(new faceMesh(pp.localFaces(), pp.localPoints())); + fMesh().flip(); { fileName surfName(patchName + ".sMesh"); - Info<< "Writing patch as surfaceMesh to " << surfName << nl << endl; - - faceMesh fMesh(pp.localFaces(), pp.localPoints()); + Info<< "Writing (flipped) patch as surfaceMesh to " + << surfName << nl << endl; OFstream os(surfName); - os << fMesh << nl; + os << fMesh() << nl; } - - meshPtr.reset - ( - new extrudedMesh - ( - IOobject - ( - extrudedMesh::defaultRegion, - runTimeExtruded.constant(), - runTimeExtruded - ), - pp, - model() - ) - ); } - else + else if (sourceType == "surface") { // Read from surface - fileName surfName(args.options()["surface"]); + fileName surfName(dict.lookup("surface")); Info<< "Extruding surfaceMesh read from file " << surfName << nl << endl; IFstream is(surfName); - faceMesh fMesh(is); + fMesh.reset(new faceMesh(is)); - Info<< "Read patch from file " << surfName << ':' << nl - << " points : " << fMesh.points().size() << nl - << " faces : " << fMesh.size() << nl + Info<< "Read patch from file " << surfName << nl << endl; + } + else + { + FatalErrorIn(args.executable()) + << "Illegal 'constructFrom' specification. Should either be " + << "patch or surface." << exit(FatalError); + } - meshPtr.reset + + Info<< "Extruding patch with :" << nl + << " points : " << fMesh().points().size() << nl + << " faces : " << fMesh().size() << nl + << " normals[0] : " << fMesh().faceNormals()[0] + << nl + << endl; + + extrudedMesh mesh + ( + IOobject ( - new extrudedMesh - ( - IOobject - ( - extrudedMesh::defaultRegion, - runTimeExtruded.constant(), - runTimeExtruded - ), - fMesh, - model() - ) - ); - } - extrudedMesh& mesh = meshPtr(); + extrudedMesh::defaultRegion, + runTimeExtruded.constant(), + runTimeExtruded + ), + fMesh(), + model() + ); const boundBox& bb = mesh.globalData().bb(); const vector span = bb.span(); const scalar mergeDim = 1E-4 * bb.minDim(); - Info<< "Mesh bounding box:" << bb << nl - << " with span:" << span << nl - << "Merge distance :" << mergeDim << nl + Info<< "Mesh bounding box : " << bb << nl + << " with span : " << span << nl + << "Merge distance : " << mergeDim << nl << endl; const polyBoundaryMesh& patches = mesh.boundaryMesh(); @@ -250,7 +236,8 @@ int main(int argc, char *argv[]) // Merging front and back patch faces // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - if (args.options().found("mergeFaces")) + Switch mergeFaces(dict.lookup("mergeFaces")); + if (mergeFaces) { Info<< "Assuming full 360 degree axisymmetric case;" << " stitching faces on patches " diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.C index 6da971a1bf0e2d048976c808abbaa0dea944908c..3d2c883ea1901edb740f8afdd7de3c9b634858a2 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.C @@ -88,7 +88,8 @@ point wedge::operator() } else { - sliceAngle = angle_*(layer + 1)/nLayers_; + //sliceAngle = angle_*(layer + 1)/nLayers_; + sliceAngle = angle_*layer/nLayers_; } // Find projection onto axis (or rather decompose surfacePoint diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeProperties b/applications/utilities/mesh/generation/extrudeMesh/extrudeProperties index ecbe160a150ab5f1b16ecad4e5fd423a64edc278..20de7b21524b083cf6cc37a684a971bcda890059 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeProperties +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeProperties @@ -14,23 +14,41 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -extrudeModel wedge; +// Where to get surface from: either from surface ('surface') or +// from (flipped) patch of existing case ('patch') +constructFrom patch; //surface; + +// If construct from (flipped) patch +sourceCase "../cavity"; +sourcePatch movingWall; + +// If construct from surface +surface "movingWall.sMesh"; + + +// Do front and back need to be merged? +mergeFaces false; + +//- Linear extrusion in point-normal direction //extrudeModel linearNormal; +//- Wedge extrusion. If nLayers is 1 assumes symmetry around plane. +extrudeModel wedge; +//- Extrudes into sphere around (0 0 0) //extrudeModel linearRadial; //extrudeModel sigmaRadial; -nLayers 1; +nLayers 6; wedgeCoeffs { - axisPt (0 0 0); - axis (0 -1 0); - angle 2.0; + axisPt (0 0.1 0); + axis (1 0 0); + angle 90.0; // For nLayers=1 assume symmetry so angle/2 on each side } linearNormalCoeffs { - thickness 0.1; + thickness 0.05; } linearRadialCoeffs @@ -47,3 +65,4 @@ sigmaRadialCoeffs // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudedMesh/extrudedMesh.C b/applications/utilities/mesh/generation/extrudeMesh/extrudedMesh/extrudedMesh.C index bcbcb3ddb78c20a6ee0ca35055a13d5488945310..b258c594451332958c13cdda37c9bbfeb28dd459 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudedMesh/extrudedMesh.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudedMesh/extrudedMesh.C @@ -117,7 +117,7 @@ Foam::Xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces quad[2] = surfaceEdges[i][0] + nextLayerOffset; quad[3] = surfaceEdges[i][1] + nextLayerOffset; - eFaces[facei++] = face(quad); + eFaces[facei++] = face(quad).reverseFace(); } // Faces between layer and layer+1 @@ -130,7 +130,7 @@ Foam::Xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces ( surfaceFaces[i].reverseFace() + nextLayerOffset - ); + ).reverseFace(); } } } @@ -152,7 +152,7 @@ Foam::Xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces label ownerFace = extrudePatch.edgeFaces()[i][0]; - if (!sameOrder(surfaceFaces[ownerFace], e)) + if (sameOrder(surfaceFaces[ownerFace], e)) { reverse(quad); } @@ -164,7 +164,7 @@ Foam::Xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces // Top faces forAll(surfaceFaces, i) { - eFaces[facei++] = face(surfaceFaces[i]); + eFaces[facei++] = face(surfaceFaces[i]).reverseFace(); } // Bottom faces @@ -175,7 +175,7 @@ Foam::Xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces ( surfaceFaces[i].reverseFace() + nLayers*surfacePoints.size() - ); + ).reverseFace(); } // return points for transferring diff --git a/applications/utilities/mesh/generation/extrudeMesh/faceMesh.H b/applications/utilities/mesh/generation/extrudeMesh/faceMesh.H index 818ce58f00e80a363432e08f19bc919e5e1042cf..c8e1075f52e5f31ceba4f8930ad6be4dbab9158e 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/faceMesh.H +++ b/applications/utilities/mesh/generation/extrudeMesh/faceMesh.H @@ -78,6 +78,18 @@ public: {} + // Member Functions + + void flip() + { + forAll(*this, i) + { + face& f = operator[](i); + f = f.reverseFace(); + } + clearOut(); + } + // IOstream Operators friend Ostream& operator<<(Ostream& os, const faceMesh& fm) @@ -85,7 +97,8 @@ public: return os << fm.points() << token::NL - << static_cast<PrimitivePatch<face, Foam::List, pointField> >(fm); + << static_cast<PrimitivePatch<face, Foam::List, pointField> > + (fm); } }; diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index 706866bd2a1df6def0525cd0b00366edeec313c7..6f086523dd2204170a516d19f0955cc6e68f5e1f 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -96,7 +96,7 @@ void writeMesh const fvMesh& mesh = meshRefiner.mesh(); meshRefiner.printMeshInfo(debug, msg); - Info<< "Writing mesh to time " << mesh.time().timeName() << endl; + Info<< "Writing mesh to time " << meshRefiner.timeName() << endl; meshRefiner.write(meshRefinement::MESH|meshRefinement::SCALARLEVELS, ""); if (debug & meshRefinement::OBJINTERSECTIONS) @@ -104,7 +104,7 @@ void writeMesh meshRefiner.write ( meshRefinement::OBJINTERSECTIONS, - mesh.time().path()/mesh.time().timeName() + mesh.time().path()/meshRefiner.timeName() ); } Info<< "Written mesh in = " @@ -115,6 +115,7 @@ void writeMesh int main(int argc, char *argv[]) { + argList::validOptions.insert("overwrite", ""); # include "setRootCase.H" # include "createTime.H" runTime.functionObjects().off(); @@ -123,6 +124,9 @@ int main(int argc, char *argv[]) Info<< "Read mesh in = " << runTime.cpuTimeIncrement() << " s" << endl; + const bool overwrite = args.optionFound("overwrite"); + + // Check patches and faceZones are synchronised mesh.boundaryMesh().checkParallelSync(true); meshRefinement::checkCoupledFaceZones(mesh); @@ -170,6 +174,13 @@ int main(int argc, char *argv[]) const dictionary& layerDict = meshDict.subDict("addLayersControls"); + const scalar mergeDist = getMergeDistance + ( + mesh, + readScalar(meshDict.lookup("mergeTolerance")) + ); + + // Debug // ~~~~~ @@ -192,8 +203,9 @@ int main(int argc, char *argv[]) IOobject ( "abc", // dummy name - mesh.time().constant(), // directory - "triSurface", // instance + //mesh.time().constant(), // instance + mesh.time().findInstance("triSurface", word::null),// instance + "triSurface", // local mesh.time(), // registry IOobject::MUST_READ, IOobject::NO_WRITE @@ -235,6 +247,34 @@ int main(int argc, char *argv[]) << mesh.time().cpuTimeIncrement() << " s" << nl << endl; + // Refinement engine + // ~~~~~~~~~~~~~~~~~ + + Info<< nl + << "Determining initial surface intersections" << nl + << "-----------------------------------------" << nl + << endl; + + // Main refinement engine + meshRefinement meshRefiner + ( + mesh, + mergeDist, // tolerance used in sorting coordinates + overwrite, // overwrite mesh files? + surfaces, // for surface intersection refinement + shells // for volume (inside/outside) refinement + ); + Info<< "Calculated surface intersections in = " + << mesh.time().cpuTimeIncrement() << " s" << nl << endl; + + // Some stats + meshRefiner.printMeshInfo(debug, "Initial mesh"); + + meshRefiner.write + ( + debug&meshRefinement::OBJINTERSECTIONS, + mesh.time().path()/meshRefiner.timeName() + ); // Add all the surface regions as patches @@ -265,9 +305,8 @@ int main(int argc, char *argv[]) forAll(regNames, i) { - label patchI = meshRefinement::addPatch + label patchI = meshRefiner.addMeshedPatch ( - mesh, regNames[i], wallPolyPatch::typeName ); @@ -308,45 +347,10 @@ int main(int argc, char *argv[]) << exit(FatalError); } - const scalar mergeDist = getMergeDistance - ( - mesh, - readScalar(meshDict.lookup("mergeTolerance")) - ); - - // Mesh distribution engine (uses tolerance to reconstruct meshes) fvMeshDistribute distributor(mesh, mergeDist); - // Refinement engine - // ~~~~~~~~~~~~~~~~~ - - Info<< nl - << "Determining initial surface intersections" << nl - << "-----------------------------------------" << nl - << endl; - - // Main refinement engine - meshRefinement meshRefiner - ( - mesh, - mergeDist, // tolerance used in sorting coordinates - surfaces, // for surface intersection refinement - shells // for volume (inside/outside) refinement - ); - Info<< "Calculated surface intersections in = " - << mesh.time().cpuTimeIncrement() << " s" << nl << endl; - - // Some stats - meshRefiner.printMeshInfo(debug, "Initial mesh"); - - meshRefiner.write - ( - debug&meshRefinement::OBJINTERSECTIONS, - mesh.time().path()/mesh.time().timeName() - ); - @@ -370,6 +374,11 @@ int main(int argc, char *argv[]) // Refinement parameters refinementParameters refineParams(refineDict); + if (!overwrite) + { + const_cast<Time&>(mesh.time())++; + } + refineDriver.doRefine(refineDict, refineParams, wantSnap, motionDict); writeMesh @@ -391,6 +400,11 @@ int main(int argc, char *argv[]) // Snap parameters snapParameters snapParams(snapDict); + if (!overwrite) + { + const_cast<Time&>(mesh.time())++; + } + snapDriver.doSnap(snapDict, motionDict, snapParams); writeMesh @@ -403,15 +417,16 @@ int main(int argc, char *argv[]) if (wantLayers) { - autoLayerDriver layerDriver - ( - meshRefiner, - globalToPatch - ); + autoLayerDriver layerDriver(meshRefiner); // Layer addition parameters layerParameters layerParams(layerDict, mesh.boundaryMesh()); + if (!overwrite) + { + const_cast<Time&>(mesh.time())++; + } + layerDriver.doLayers ( layerDict, @@ -435,7 +450,7 @@ int main(int argc, char *argv[]) Info<< "End\n" << endl; - return 0; + return(0); } diff --git a/applications/utilities/mesh/manipulation/attachMesh/attachMesh.C b/applications/utilities/mesh/manipulation/attachMesh/attachMesh.C index 52e0f2ae56ae8c0796890da6c7c17181c7500db6..341fc4eab67a8bb5b11134a72688d402aa9f9c00 100644 --- a/applications/utilities/mesh/manipulation/attachMesh/attachMesh.C +++ b/applications/utilities/mesh/manipulation/attachMesh/attachMesh.C @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) # include "createPolyMesh.H" const word oldInstance = mesh.pointsInstance(); - bool overwrite = args.options().found("overwrite"); + bool overwrite = args.optionFound("overwrite"); if (!overwrite) { diff --git a/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C b/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C index 96a7ee5197381c694c0a084aa8d5dc4c6aca2a0e..758592590c4f632b8a09a0a8aba39c8bd816fdde 100644 --- a/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C +++ b/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C @@ -91,7 +91,7 @@ int main(int argc, char *argv[]) boundaryMesh bMesh; scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])())); - bool overwrite = args.options().found("overwrite"); + bool overwrite = args.optionFound("overwrite"); scalar minCos = Foam::cos(featureAngle * mathematicalConstant::pi/180.0); diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C b/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C index d226008f5cd47b64772426b6ee2272c6a9e0a68c..2a589c1643dc95f63afc26e85223fa1283105a77 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C @@ -58,9 +58,9 @@ int main(int argc, char *argv[]) instantList timeDirs = timeSelector::select0(runTime, args); # include "createNamedPolyMesh.H" - const bool noTopology = args.options().found("noTopology"); - const bool allGeometry = args.options().found("allGeometry"); - const bool allTopology = args.options().found("allTopology"); + const bool noTopology = args.optionFound("noTopology"); + const bool allGeometry = args.optionFound("allGeometry"); + const bool allTopology = args.optionFound("allTopology"); forAll(timeDirs, timeI) { diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index ece5f4dde6206fdfdb3bbf8ba5d8e02110916ea7..1fb8cc64efe26da5a52ac4f31de7a293d6d7274f 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -93,11 +93,11 @@ int main(int argc, char *argv[]) // Additional patches - if (args.options().found("additionalPatches")) + if (args.optionFound("additionalPatches")) { const wordList patchNames ( - IStringStream(args.options()["additionalPatches"])() + args.optionLookup("additionalPatches")() ); newPatches.reserve(patchNames.size() + 1); @@ -120,7 +120,7 @@ int main(int argc, char *argv[]) } - bool overwrite = args.options().found("overwrite"); + bool overwrite = args.optionFound("overwrite"); diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index 7e0443a614666c63e1f13aa4766737cdc62757a8..3c799ca5a4b0a66d6017f956d53bdade480b7c0b 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -539,7 +539,7 @@ int main(int argc, char *argv[]) # include "createTime.H" runTime.functionObjects().off(); - const bool overwrite = args.options().found("overwrite"); + const bool overwrite = args.optionFound("overwrite"); Info<< "Reading createPatchDict." << nl << endl; diff --git a/applications/utilities/mesh/manipulation/deformedGeom/deformedGeom.C b/applications/utilities/mesh/manipulation/deformedGeom/deformedGeom.C index 7b64177da576620e81160feeed77606f5a2b0dc6..f438a1f9637537c09dffbed428cc84d341494fbd 100644 --- a/applications/utilities/mesh/manipulation/deformedGeom/deformedGeom.C +++ b/applications/utilities/mesh/manipulation/deformedGeom/deformedGeom.C @@ -59,11 +59,10 @@ int main(int argc, char *argv[]) pointField zeroPoints(mesh.points()); - runTime.setTime(Times[0], 0); - - for (int i = 1; i<Times.size(); i++) + // skip "constant" time + for (label timeI = 1; timeI < Times.size(); ++timeI) { - runTime.setTime(Times[i], i); + runTime.setTime(Times[timeI], timeI); Info<< "Time = " << runTime.timeName() << endl; diff --git a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C index f883c3138b31d87e6898a067d8375f9429b0a1b5..9d826194149f2f87639781d63780dd88a6ac9910 100644 --- a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C +++ b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C @@ -231,9 +231,9 @@ int main(int argc, char *argv[]) # include "createMesh.H" const word oldInstance = mesh.pointsInstance(); - bool split = args.options().found("split"); - bool overwrite = args.options().found("overwrite"); - bool detectOnly = args.options().found("detectOnly"); + bool split = args.optionFound("split"); + bool overwrite = args.optionFound("overwrite"); + bool detectOnly = args.optionFound("detectOnly"); // Collect all boundary faces labelList boundaryFaces(mesh.nFaces() - mesh.nInternalFaces()); diff --git a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C index 7636801b51ea74524ea301ca9fb2374f9ebc2e1b..5760d48aaf898a1a1b02381de9ee1674ac25f041 100644 --- a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C +++ b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C @@ -309,8 +309,8 @@ int main(int argc, char *argv[]) // Read/construct control dictionary // - bool readDict = args.options().found("dict"); - bool overwrite = args.options().found("overwrite"); + bool readDict = args.optionFound("dict"); + bool overwrite = args.optionFound("overwrite"); // List of cells to refine labelList refCells; diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index b066936f83a5122136cab69fe7f770498fd303ac..bdc60d724b4af233ec85b7048d659c6cbe4aaac0 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -386,8 +386,7 @@ int main(int argc, char *argv[]) # include "createMesh.H" const word oldInstance = mesh.pointsInstance(); - const bool blockOrder = args.options().found("blockOrder"); - + const bool blockOrder = args.optionFound("blockOrder"); if (blockOrder) { Info<< "Ordering cells into regions (using decomposition);" @@ -395,15 +394,14 @@ int main(int argc, char *argv[]) << endl; } - const bool orderPoints = args.options().found("orderPoints"); - + const bool orderPoints = args.optionFound("orderPoints"); if (orderPoints) { Info<< "Ordering points into internal and boundary points." << nl << endl; } - const bool writeMaps = args.options().found("writeMaps"); + const bool writeMaps = args.optionFound("writeMaps"); if (writeMaps) { @@ -411,7 +409,7 @@ int main(int argc, char *argv[]) << endl; } - bool overwrite = args.options().found("overwrite"); + bool overwrite = args.optionFound("overwrite"); label band = getBand(mesh.faceOwner(), mesh.faceNeighbour()); diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index ff6d576b0abb121cdc58bd7b4cd730e0431d9052..d79d516806e040de45f70483eec4cdd195bacd04 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -591,24 +591,10 @@ commandStatus parseType } else if (setType == "time") { - scalar time = readScalar(is); - + scalar requestedTime = readScalar(is); instantList Times = runTime.times(); - int nearestIndex = -1; - scalar nearestDiff = Foam::GREAT; - - forAll(Times, timeIndex) - { - if (Times[timeIndex].name() == "constant") continue; - - scalar diff = fabs(Times[timeIndex].value() - time); - if (diff < nearestDiff) - { - nearestDiff = diff; - nearestIndex = timeIndex; - } - } + label nearestIndex = Time::findClosestTimeIndex(Times, requestedTime); Pout<< "Changing time from " << runTime.timeName() << " to " << Times[nearestIndex].name() @@ -646,7 +632,8 @@ commandStatus parseType } default: { - FatalErrorIn("parseType") << "Illegal mesh update state " + FatalErrorIn("parseType") + << "Illegal mesh update state " << stat << abort(FatalError); break; } @@ -723,7 +710,7 @@ int main(int argc, char *argv[]) # include "setRootCase.H" # include "createTime.H" - bool writeVTK = !args.options().found("noVTK"); + bool writeVTK = !args.optionFound("noVTK"); // Get times list instantList Times = runTime.times(); @@ -740,13 +727,13 @@ int main(int argc, char *argv[]) std::ifstream* fileStreamPtr(NULL); - if (args.options().found("batch")) + if (args.optionFound("batch")) { - fileName batchFile(args.options()["batch"]); + fileName batchFile(args.option("batch")); Pout<< "Reading commands from file " << batchFile << endl; - // we also cannot handle .gz files + // we cannot handle .gz files if (!isFile(batchFile, false)) { FatalErrorIn(args.executable()) @@ -864,7 +851,7 @@ int main(int argc, char *argv[]) delete fileStreamPtr; } - Pout << nl << "End" << endl; + Pout<< "\nEnd" << endl; return 0; } diff --git a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C index ac32c1ccc9ad54a3bf20c043dc698d363080b643..dfd7262fd17ba65a287bd041289dbcc95475c7df 100644 --- a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C +++ b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C @@ -64,8 +64,7 @@ int main(int argc, char *argv[]) # include "setRootCase.H" # include "createTime.H" - - bool noFlipMap = args.options().found("noFlipMap"); + bool noFlipMap = args.optionFound("noFlipMap"); // Get times list instantList Times = runTime.times(); @@ -73,9 +72,8 @@ int main(int argc, char *argv[]) label startTime = Times.size()-1; label endTime = Times.size(); + // check -time and -latestTime options # include "checkTimeOption.H" -# include "checkLatestTimeOption.H" - runTime.setTime(Times[startTime], startTime); diff --git a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C index b865472dadf7c92bfc2a6d340d256914913c6494..65e4d33237df440e9b72236179b6d617645ca7db 100644 --- a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C +++ b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C @@ -126,7 +126,7 @@ int main(int argc, char *argv[]) word setName(args.additionalArgs()[0]); word masterPatch(args.additionalArgs()[1]); word slavePatch(args.additionalArgs()[2]); - bool overwrite = args.options().found("overwrite"); + bool overwrite = args.optionFound("overwrite"); // List of faces to split faceSet facesSet(mesh, setName); diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index e71a5f11c0b2ff259f3d3f6b0f997df0efd29f88..72c1fbd3500019a316f74a2be861bdcf0e2581c7 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -1239,20 +1239,20 @@ int main(int argc, char *argv[]) const word oldInstance = mesh.pointsInstance(); word blockedFacesName; - if (args.options().found("blockedFaces")) + if (args.optionFound("blockedFaces")) { - blockedFacesName = args.options()["blockedFaces"]; + blockedFacesName = args.option("blockedFaces"); Info<< "Reading blocked internal faces from faceSet " << blockedFacesName << nl << endl; } - bool makeCellZones = args.options().found("makeCellZones"); - bool largestOnly = args.options().found("largestOnly"); - bool insidePoint = args.options().found("insidePoint"); - bool useCellZones = args.options().found("cellZones"); - bool overwrite = args.options().found("overwrite"); - bool detectOnly = args.options().found("detectOnly"); - bool sloppyCellZones = args.options().found("sloppyCellZones"); + bool makeCellZones = args.optionFound("makeCellZones"); + bool largestOnly = args.optionFound("largestOnly"); + bool insidePoint = args.optionFound("insidePoint"); + bool useCellZones = args.optionFound("cellZones"); + bool overwrite = args.optionFound("overwrite"); + bool detectOnly = args.optionFound("detectOnly"); + bool sloppyCellZones = args.optionFound("sloppyCellZones"); if (insidePoint && largestOnly) { @@ -1771,7 +1771,7 @@ int main(int argc, char *argv[]) if (insidePoint) { - point insidePoint(IStringStream(args.options()["insidePoint"])()); + point insidePoint(args.optionLookup("insidePoint")()); label regionI = -1; diff --git a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C index 2a9784980ac2ab9b4d4f193b3e27f99f06519827..e3536a5ad05862bd0370cf9e000992673797d944 100644 --- a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C +++ b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C @@ -142,9 +142,9 @@ int main(int argc, char *argv[]) word masterPatchName(args.additionalArgs()[0]); word slavePatchName(args.additionalArgs()[1]); - bool partialCover = args.options().found("partial"); - bool perfectCover = args.options().found("perfect"); - bool overwrite = args.options().found("overwrite"); + bool partialCover = args.optionFound("partial"); + bool perfectCover = args.optionFound("perfect"); + bool overwrite = args.optionFound("overwrite"); if (partialCover && perfectCover) { diff --git a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C index 56b48a2dd2a9ce81259605e685c8c29f2f71d34b..338c8dbcb1c6ffd1da88073613122d3d85b1a39d 100644 --- a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C +++ b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C @@ -162,7 +162,7 @@ int main(int argc, char *argv[]) const word oldInstance = mesh.pointsInstance(); word setName(args.additionalArgs()[0]); - bool overwrite = args.options().found("overwrite"); + bool overwrite = args.optionFound("overwrite"); Info<< "Reading cell set from " << setName << endl << endl; @@ -172,9 +172,9 @@ int main(int argc, char *argv[]) label patchI = -1; - if (args.options().found("patch")) + if (args.optionFound("patch")) { - word patchName(args.options()["patch"]); + word patchName(args.option("patch")); patchI = mesh.boundaryMesh().findPatchID(patchName); diff --git a/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C b/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C index bc2b017a2cbf393ee677afdbf3a3054d89789923..630243e2ef2b465254108bb18354a59a65633281 100644 --- a/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C +++ b/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C @@ -144,7 +144,7 @@ int main(int argc, char *argv[]) argList::validOptions.insert("yawPitchRoll", "(yaw pitch roll)"); argList::validOptions.insert("rotateFields", ""); argList::validOptions.insert("scale", "vector"); - + # include "setRootCase.H" # include "createTime.H" @@ -171,18 +171,18 @@ int main(int argc, char *argv[]) << exit(FatalError); } - if (args.options().found("translate")) + if (args.optionFound("translate")) { - vector transVector(IStringStream(args.options()["translate"])()); + vector transVector(args.optionLookup("translate")()); Info<< "Translating points by " << transVector << endl; points += transVector; } - if (args.options().found("rotate")) + if (args.optionFound("rotate")) { - Pair<vector> n1n2(IStringStream(args.options()["rotate"])()); + Pair<vector> n1n2(args.optionLookup("rotate")()); n1n2[0] /= mag(n1n2[0]); n1n2[1] /= mag(n1n2[1]); tensor T = rotationTensor(n1n2[0], n1n2[1]); @@ -191,14 +191,14 @@ int main(int argc, char *argv[]) points = transform(T, points); - if (args.options().found("rotateFields")) + if (args.optionFound("rotateFields")) { rotateFields(runTime, T); } } - else if (args.options().found("rollPitchYaw")) + else if (args.optionFound("rollPitchYaw")) { - vector v(IStringStream(args.options()["rollPitchYaw"])()); + vector v(args.optionLookup("rollPitchYaw")()); Info<< "Rotating points by" << nl << " roll " << v.x() << nl @@ -214,14 +214,14 @@ int main(int argc, char *argv[]) Info<< "Rotating points by quaternion " << R << endl; points = transform(R, points); - if (args.options().found("rotateFields")) + if (args.optionFound("rotateFields")) { rotateFields(runTime, R.R()); } } - else if (args.options().found("yawPitchRoll")) + else if (args.optionFound("yawPitchRoll")) { - vector v(IStringStream(args.options()["yawPitchRoll"])()); + vector v(args.optionLookup("yawPitchRoll")()); Info<< "Rotating points by" << nl << " yaw " << v.x() << nl @@ -243,15 +243,15 @@ int main(int argc, char *argv[]) Info<< "Rotating points by quaternion " << R << endl; points = transform(R, points); - if (args.options().found("rotateFields")) + if (args.optionFound("rotateFields")) { rotateFields(runTime, R.R()); } } - if (args.options().found("scale")) + if (args.optionFound("scale")) { - vector scaleVector(IStringStream(args.options()["scale"])()); + vector scaleVector(args.optionLookup("scale")()); Info<< "Scaling points by " << scaleVector << endl; diff --git a/applications/utilities/miscellaneous/foamDebugSwitches/foamDebugSwitches.C b/applications/utilities/miscellaneous/foamDebugSwitches/foamDebugSwitches.C index 6854ba0b8d53a0d08bce360e3cc1c2928267d6f2..d4eb9c3b63af51002d3cf4c136a9416c8bf01a5c 100644 --- a/applications/utilities/miscellaneous/foamDebugSwitches/foamDebugSwitches.C +++ b/applications/utilities/miscellaneous/foamDebugSwitches/foamDebugSwitches.C @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) wordList currInfo(debug::infoSwitches().toc()); wordList currOpt(debug::optimisationSwitches().toc()); - if (args.options().found("old") || args.options().found("new")) + if (args.optionFound("old") || args.optionFound("new")) { dictionary controlDict(IFstream(findEtcFile("controlDict", true))()); @@ -80,7 +80,7 @@ int main(int argc, char *argv[]) // 1. run without any options (get complete list) // 2. comment out DebugSwitches, run again with -new to find new ones // and do a diff - if (args.options().found("old")) + if (args.optionFound("old")) { IOobject::writeDivider(Info); @@ -104,7 +104,7 @@ int main(int argc, char *argv[]) } // list new switches - if (args.options().found("new")) + if (args.optionFound("new")) { IOobject::writeDivider(Info); diff --git a/applications/utilities/miscellaneous/foamInfoExec/foamInfoExec.C b/applications/utilities/miscellaneous/foamInfoExec/foamInfoExec.C index 3de53a2f22659e51012e2d005fe529b50408e3bd..b55e5b97013886395b11e200bc4c7661490d71ce 100644 --- a/applications/utilities/miscellaneous/foamInfoExec/foamInfoExec.C +++ b/applications/utilities/miscellaneous/foamInfoExec/foamInfoExec.C @@ -49,9 +49,9 @@ int main(int argc, char *argv[]) Info<< endl; - if (args.options().found("times")) + if (args.optionFound("times")) { - instantList times + instantList times ( Foam::Time::findTimes(args.rootPath()/args.caseName()) ); @@ -62,11 +62,11 @@ int main(int argc, char *argv[]) } } - if (args.options().found("dictionary")) + if (args.optionFound("dictionary")) { fileName dictFileName ( - args.rootPath()/args.caseName()/args.options()["dictionary"] + args.rootPath()/args.caseName()/args.option("dictionary") ); IFstream dictFile(dictFileName); @@ -75,11 +75,7 @@ int main(int argc, char *argv[]) { dictionary dict(dictFile); - if - ( - args.options().found("keywords") - && !args.options().found("entry") - ) + if (args.optionFound("keywords") && !args.optionFound("entry")) { for ( @@ -91,11 +87,11 @@ int main(int argc, char *argv[]) Info<< iter().keyword() << endl; } } - else if (args.options().found("entry")) + else if (args.optionFound("entry")) { wordList entryNames ( - fileName(args.options()["entry"]).components(':') + fileName(args.option("entry")).components(':') ); if (dict.found(entryNames[0])) @@ -122,20 +118,20 @@ int main(int argc, char *argv[]) { FatalErrorIn(args.executable()) << "Cannot find sub-entry " << entryNames[i] - << " in entry " << args.options()["entry"] + << " in entry " << args.option("entry") << " in dictionary " << dictFileName; FatalError.exit(3); } } - - if (args.options().found("keywords")) + + if (args.optionFound("keywords")) { /* if (ent[1] != token::BEGIN_BLOCK) { FatalErrorIn(args.executable()) << "Cannot find entry " - << args.options()["entry"] + << args.option("entry") << " in dictionary " << dictFileName << " is not a sub-dictionary"; FatalError.exit(4); diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index fef8c71aa1111d471763a65e09ec273d49f4f723..a26179507a167b9ec254643ebcab8cadde3ed420 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -99,20 +99,20 @@ int main(int argc, char *argv[]) word regionName = fvMesh::defaultRegion; word regionDir = word::null; - if (args.options().found("region")) + if (args.optionFound("region")) { - regionName = args.options()["region"]; + regionName = args.option("region"); regionDir = regionName; Info<< "Decomposing mesh " << regionName << nl << endl; } - bool writeCellDist(args.options().found("cellDist")); - bool copyUniform(args.options().found("copyUniform")); - bool decomposeFieldsOnly(args.options().found("fields")); - bool filterPatches(args.options().found("filterPatches")); - bool forceOverwrite(args.options().found("force")); - bool ifRequiredDecomposition(args.options().found("ifRequired")); + bool writeCellDist = args.optionFound("cellDist"); + bool copyUniform = args.optionFound("copyUniform"); + bool decomposeFieldsOnly = args.optionFound("fields"); + bool filterPatches = args.optionFound("filterPatches"); + bool forceOverwrite = args.optionFound("force"); + bool ifRequiredDecomposition = args.optionFound("ifRequired"); # include "createTime.H" @@ -566,7 +566,7 @@ int main(int argc, char *argv[]) IOobject ( "cellProcAddressing", - "constant", + procMesh.facesInstance(), procMesh.meshSubDir, procMesh, IOobject::MUST_READ, @@ -579,7 +579,7 @@ int main(int argc, char *argv[]) IOobject ( "boundaryProcAddressing", - "constant", + procMesh.facesInstance(), procMesh.meshSubDir, procMesh, IOobject::MUST_READ, @@ -603,7 +603,7 @@ int main(int argc, char *argv[]) IOobject ( "faceProcAddressing", - "constant", + procMesh.facesInstance(), procMesh.meshSubDir, procMesh, IOobject::MUST_READ, @@ -645,7 +645,7 @@ int main(int argc, char *argv[]) IOobject ( "pointProcAddressing", - "constant", + procMesh.facesInstance(), procMesh.meshSubDir, procMesh, IOobject::MUST_READ, diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposeParDict b/applications/utilities/parallelProcessing/decomposePar/decomposeParDict index 0c566d50812ffcdbd856d09f12ebac9244177468..aad15ee459b6e01cdf6fabba08eb2fa5b8c2a4dd 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposeParDict +++ b/applications/utilities/parallelProcessing/decomposePar/decomposeParDict @@ -55,7 +55,17 @@ metisCoeffs } scotchCoeffs -{} +{ + //processorWeights + //( + // 1 + // 1 + // 1 + // 1 + //); + //writeGraph true; + //strategy "b"; +} manualCoeffs { diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C index 2940577d163722f8dcabbd761ef70215f252d77b..e310cc758f0809cc6ae1e49fe95add7c5614bae3 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C @@ -269,7 +269,7 @@ bool domainDecomposition::writeDecomposition() IOobject ( this->polyMesh::name(), // region name of undecomposed mesh - "constant", + pointsInstance(), processorDb ), xferMove(procPoints), @@ -620,7 +620,7 @@ bool domainDecomposition::writeDecomposition() IOobject ( "pointProcAddressing", - "constant", + procMesh.facesInstance(), procMesh.meshSubDir, procMesh, IOobject::NO_READ, @@ -635,7 +635,7 @@ bool domainDecomposition::writeDecomposition() IOobject ( "faceProcAddressing", - "constant", + procMesh.facesInstance(), procMesh.meshSubDir, procMesh, IOobject::NO_READ, @@ -650,7 +650,7 @@ bool domainDecomposition::writeDecomposition() IOobject ( "cellProcAddressing", - "constant", + procMesh.facesInstance(), procMesh.meshSubDir, procMesh, IOobject::NO_READ, @@ -665,7 +665,7 @@ bool domainDecomposition::writeDecomposition() IOobject ( "boundaryProcAddressing", - "constant", + procMesh.facesInstance(), procMesh.meshSubDir, procMesh, IOobject::NO_READ, diff --git a/applications/utilities/parallelProcessing/decomposePar/fvFieldDecomposer.C b/applications/utilities/parallelProcessing/decomposePar/fvFieldDecomposer.C index 15eb039bfd847dbeddb8dd6414c57711d72cad5b..f5a6451c1266b6a0e02c165c3501c037c7f85b64 100644 --- a/applications/utilities/parallelProcessing/decomposePar/fvFieldDecomposer.C +++ b/applications/utilities/parallelProcessing/decomposePar/fvFieldDecomposer.C @@ -56,13 +56,12 @@ processorVolPatchFieldDecomposer const unallocLabelList& addressingSlice ) : - addressing_(addressingSlice.size()), - weights_(addressingSlice.size()) + directAddressing_(addressingSlice.size()) { const labelList& own = mesh.faceOwner(); const labelList& neighb = mesh.faceNeighbour(); - forAll (addressing_, i) + forAll (directAddressing_, i) { // Subtract one to align addressing. label ai = mag(addressingSlice[i]) - 1; @@ -74,18 +73,14 @@ processorVolPatchFieldDecomposer // on the parallel boundary. // Give face the value of the neighbour. - addressing_[i].setSize(1); - weights_[i].setSize(1); - weights_[i][0] = 1.0; - if (addressingSlice[i] >= 0) { // I have the owner so use the neighbour value - addressing_[i][0] = neighb[ai]; + directAddressing_[i] = neighb[ai]; } else { - addressing_[i][0] = own[ai]; + directAddressing_[i] = own[ai]; } } else @@ -96,12 +91,7 @@ processorVolPatchFieldDecomposer // up the different (face) list of data), so I will // just grab the value from the owner cell - addressing_[i].setSize(1); - weights_[i].setSize(1); - - addressing_[i][0] = own[ai]; - - weights_[i][0] = 1.0; + directAddressing_[i] = own[ai]; } } } diff --git a/applications/utilities/parallelProcessing/decomposePar/fvFieldDecomposer.H b/applications/utilities/parallelProcessing/decomposePar/fvFieldDecomposer.H index 9641bf031b86af158c15d3c5b6078404be782c14..89b69a17813895772c74686a47c921fcff44b277 100644 --- a/applications/utilities/parallelProcessing/decomposePar/fvFieldDecomposer.H +++ b/applications/utilities/parallelProcessing/decomposePar/fvFieldDecomposer.H @@ -96,15 +96,16 @@ public: }; - //- Processor patch field decomposer class + //- Processor patch field decomposer class. Maps either owner or + // neighbour data (no interpolate anymore - processorFvPatchField + // holds neighbour data) class processorVolPatchFieldDecomposer : public fvPatchFieldMapper { // Private data - labelListList addressing_; - scalarListList weights_; + labelList directAddressing_; public: @@ -120,27 +121,23 @@ public: label size() const { - return addressing_.size(); + return directAddressing_.size(); } bool direct() const { - return false; - } - - const labelListList& addressing() const - { - return addressing_; + return true; } - const scalarListList& weights() const + const unallocLabelList& directAddressing() const { - return weights_; + return directAddressing_; } }; - //- Processor patch field decomposer class + //- Processor patch field decomposer class. Surface field is assumed + // to have direction (so manipulates sign when mapping) class processorSurfacePatchFieldDecomposer : public fvPatchFieldMapper diff --git a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C index 1e3ed2b9bfb779780f349a3e59d13eab0689aa04..dd014c299fa1b27cc0e2ab784b12eb8442a2cd3d 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C +++ b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C @@ -57,12 +57,12 @@ int main(int argc, char *argv[]) # include "createTime.H" HashSet<word> selectedFields; - if (args.options().found("fields")) + if (args.optionFound("fields")) { - IStringStream(args.options()["fields"])() >> selectedFields; + args.optionLookup("fields")() >> selectedFields; } - bool noLagrangian = args.options().found("noLagrangian"); + bool noLagrangian = args.optionFound("noLagrangian"); // determine the processor count directly label nProcs = 0; diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C index 627f2b15b48a26984c4ced5ec54ff1ece41a4b34..dc28db70971ab9aa66e93d398361971a6927dfe2 100644 --- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C +++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C @@ -306,18 +306,16 @@ int main(int argc, char *argv[]) word regionName = polyMesh::defaultRegion; fileName regionPrefix = ""; - if (args.options().found("region")) + if (args.optionFound("region")) { - regionName = args.options()["region"]; + regionName = args.option("region"); regionPrefix = regionName; Info<< "Operating on region " << regionName << nl << endl; } scalar mergeTol = defaultMergeTol; - if (args.options().found("mergeTol")) - { - mergeTol = readScalar(IStringStream(args.options()["mergeTol"])()); - } + args.optionReadIfPresent("mergeTol", mergeTol); + scalar writeTol = Foam::pow(10.0, -scalar(IOstream::defaultPrecision())); Info<< "Merge tolerance : " << mergeTol << nl @@ -337,7 +335,7 @@ int main(int argc, char *argv[]) } - const bool fullMatch = args.options().found("fullMatch"); + const bool fullMatch = args.optionFound("fullMatch"); if (fullMatch) { diff --git a/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C b/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C index c46a41b2738795d7335106179fdd9dd9c343b9e9..c0859573e0d706fc2c996f66ec00aad434a49d9b 100644 --- a/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C +++ b/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C @@ -240,10 +240,7 @@ scalar getMergeDistance ) { scalar mergeTol = defaultMergeTol; - if (args.options().found("mergeTol")) - { - mergeTol = readScalar(IStringStream(args.options()["mergeTol"])()); - } + args.optionReadIfPresent("mergeTol", mergeTol); scalar writeTol = Foam::pow(scalar(10.0), -scalar(IOstream::defaultPrecision())); diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkData.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkData.H index 59be3c5dc9ffda60e2ceaae872a7054b797b68f3..1144833a0136070251c67aec0d4f5ca2eec118f2 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkData.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkData.H @@ -1,18 +1,21 @@ -for (int n1=startTime; n1<endTime; n1++) +// ignore special fields or fields that we don't handle +// +bool variableGood = true; +for (label n1=startTime; n1<endTime && variableGood; ++n1) { + // ignore _0 fields if (fieldName.size() > 2 && fieldName(fieldName.size() - 2, 2) == "_0") { variableGood = false; - break; } - - IOobject fieldObjectHeader - ( - fieldName, - Times[n1].name(), - mesh, - IOobject::NO_READ - ); - - variableGood = variableGood && fieldObjectHeader.headerOk(); + else + { + variableGood = IOobject + ( + fieldName, + Times[n1].name(), + mesh, + IOobject::NO_READ + ).headerOk(); + } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkMeshMoving.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkMeshMoving.H index e6e46c8f868adf8e382f53d6c36228051f44fcf0..123036f63afe9d1a30c205fce0efc311125d6785 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkMeshMoving.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/checkMeshMoving.H @@ -1,19 +1,19 @@ -bool meshMoving = true; +// check for "points" in all of the result directories +bool meshMoving = true; if (Times.size() > 2) { - for(label n2=2; n2<Times.size(); n2++) - { - IOobject tmpPoints - ( - "points", - Times[n2].name(), - polyMesh::meshSubDir, - mesh, - IOobject::NO_READ - ); - meshMoving = meshMoving && tmpPoints.headerOk(); - } + for (label n1=2; n1<Times.size() && meshMoving; ++n1) + { + meshMoving = IOobject + ( + "points", + Times[n1].name(), + polyMesh::meshSubDir, + mesh, + IOobject::NO_READ + ).headerOk(); + } } else { diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightCaseHeader.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightCaseHeader.H deleted file mode 100644 index cc81cb465952ed52026b274d56375de627f45134..0000000000000000000000000000000000000000 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightCaseHeader.H +++ /dev/null @@ -1,5 +0,0 @@ -if (Pstream::master()) -{ - ensightCaseFile << "FORMAT" << nl; - ensightCaseFile << "type: ensight gold" << nl << nl; -} diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C index 980a3c61536eb12601d6b541c187409108722878..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 ( @@ -276,7 +275,7 @@ bool writePatchField ( const Foam::Field<Type>& pf, const Foam::label patchi, - const Foam::label ensightPatchi, + const Foam::label ensightPatchI, const Foam::faceSets& boundaryFaceSet, const Foam::ensightMesh::nFacePrimitives& nfp, const Foam::labelList& patchProcessors, @@ -289,7 +288,7 @@ bool writePatchField { ensightFile << "part" << nl - << setw(10) << ensightPatchi << nl; + << setw(10) << ensightPatchI << nl; } writeAllFaceData @@ -336,7 +335,7 @@ bool writePatchFieldBinary ( const Foam::Field<Type>& pf, const Foam::label patchi, - const Foam::label ensightPatchi, + const Foam::label ensightPatchI, const Foam::faceSets& boundaryFaceSet, const Foam::ensightMesh::nFacePrimitives& nfp, const Foam::labelList& patchProcessors, @@ -348,7 +347,7 @@ bool writePatchFieldBinary if (Pstream::master()) { writeEnsDataBinary("part",ensightFile); - writeEnsDataBinary(ensightPatchi,ensightFile); + writeEnsDataBinary(ensightPatchI,ensightFile); } writeAllFaceDataBinary @@ -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(); - label ensightPatchi = 2; + label patchi = -1; - for - ( - HashTable<labelList>::const_iterator iter = - allPatchNames.begin(); - iter != allPatchNames.end(); - ++iter - ) + forAll(allPatchNames, i) { - if (iter.key() == patchName) break; - ensightPatchi++; + if (allPatchNames[i] == patchName) + { + patchi = i; + break; + } + ensightPatchI++; } - const labelList& patchProcessors = allPatchNames.find(patchName)(); + const labelList& patchProcessors = allPatchProcs[patchi]; word pfName = patchName + '.' + fieldName; @@ -478,7 +470,7 @@ void writePatchField ( pf, patchi, - ensightPatchi, + ensightPatchI, boundaryFaceSets[patchi], nPatchPrims.find(patchName)(), patchProcessors, @@ -493,7 +485,7 @@ void writePatchField ( Field<Type>(), -1, - ensightPatchi, + ensightPatchI, nullFaceSets, nPatchPrims.find(patchName)(), patchProcessors, @@ -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(); @@ -621,31 +614,24 @@ void ensightFieldAscii writeAllData("nfaced", vf, polys, meshCellSets.nPolys, ensightFile); } - label ensightPatchi = 2; + 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, - ensightPatchi, + ensightPatchI, boundaryFaceSets[patchi], nPatchPrims.find(patchName)(), patchProcessors, @@ -653,7 +639,7 @@ void ensightFieldAscii ) ) { - ensightPatchi++; + ensightPatchI++; } } @@ -667,7 +653,7 @@ void ensightFieldAscii ( Field<Type>(), -1, - ensightPatchi, + ensightPatchI, nullFaceSet, nPatchPrims.find(patchName)(), patchProcessors, @@ -675,7 +661,7 @@ void ensightFieldAscii ) ) { - ensightPatchi++; + ensightPatchI++; } } } @@ -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,37 +777,61 @@ 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 = 2; + 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, - ensightPatchi, + ensightPatchI, boundaryFaceSets[patchi], nPatchPrims.find(patchName)(), patchProcessors, @@ -825,7 +839,7 @@ void ensightFieldBinary ) ) { - ensightPatchi++; + ensightPatchI++; } } @@ -839,7 +853,7 @@ void ensightFieldBinary ( Field<Type>(), -1, - ensightPatchi, + ensightPatchI, nullFaceSet, nPatchPrims.find(patchName)(), patchProcessors, @@ -847,7 +861,7 @@ void ensightFieldBinary ) ) { - ensightPatchi++; + ensightPatchI++; } } } @@ -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 b69a9264c124845c74669733762e95e45592660c..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()) + forAll(y, i) { - x.insert(iter.key(), iter()); - } - else - { - labelList& xPatches = xiter(); - const labelList& yPatches = iter(); + const labelList& yPatches = y[i]; - label offset = xPatches.size(); - xPatches.setSize(offset + yPatches.size()); - - 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 @@ -89,110 +84,111 @@ Foam::ensightMesh::ensightMesh const bool binary ) : - binary_(binary), mesh_(mesh), + binary_(binary), + patchPartOffset_(2), meshCellSets_(mesh_.nCells()), boundaryFaceSets_(mesh_.boundary().size()), allPatchNames_(0), - patchIndices_(0), + allPatchProcs_(0), patchNames_(0), nPatchPrims_(0) { - forAll (mesh_.boundaryMesh(), patchi) + const cellShapeList& cellShapes = mesh.cellShapes(); + + const cellModel& tet = *(cellModeller::lookup("tet")); + const cellModel& pyr = *(cellModeller::lookup("pyr")); + const cellModel& prism = *(cellModeller::lookup("prism")); + const cellModel& wedge = *(cellModeller::lookup("wedge")); + const cellModel& hex = *(cellModeller::lookup("hex")); + + if (!args.optionFound("noPatches")) { - if + allPatchNames_ = wordList::subList ( - typeid(mesh_.boundaryMesh()[patchi]) - != typeid(processorPolyPatch) - ) + mesh_.boundaryMesh().names(), mesh_.boundary().size() + - mesh_.globalData().processorPatches().size() + ); + + allPatchProcs_.setSize(allPatchNames_.size()); + + forAll (allPatchProcs_, patchi) { - if (!allPatchNames_.found(mesh_.boundaryMesh()[patchi].name())) + if (mesh_.boundary()[patchi].size()) { - 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()); - if (args.options().found("patches")) - { - wordList patchNameList(IStringStream(args.options()["patches"])()); + combineReduce(allPatchProcs_, concatPatchProcs()); - if (patchNameList.empty()) + if (args.optionFound("patches")) { - patchNameList = allPatchNames_.toc(); - } + wordList patchNameList(args.optionLookup("patches")()); - forAll (patchNameList, i) - { - patchNames_.insert(patchNameList[i]); + if (patchNameList.empty()) + { + patchNameList = allPatchNames_; + } + + forAll (patchNameList, i) + { + patchNames_.insert(patchNameList[i]); + } } } - const cellShapeList& cellShapes = mesh.cellShapes(); - - const cellModel& tet = *(cellModeller::lookup("tet")); - const cellModel& pyr = *(cellModeller::lookup("pyr")); - const cellModel& prism = *(cellModeller::lookup("prism")); - const cellModel& wedge = *(cellModeller::lookup("wedge")); - const cellModel& hex = *(cellModeller::lookup("hex")); - - labelList& tets = meshCellSets_.tets; - labelList& pyrs = meshCellSets_.pyrs; - labelList& prisms = meshCellSets_.prisms; - labelList& wedges = meshCellSets_.wedges; - labelList& hexes = meshCellSets_.hexes; - labelList& polys = meshCellSets_.polys; - - // Count the shapes - label nTets = 0; - label nPyrs = 0; - label nPrisms = 0; - label nWedges = 0; - label nHexes = 0; - label nPolys = 0; - - if (patchNames_.empty()) + if (patchNames_.size()) + { + // no internalMesh + patchPartOffset_ = 1; + } + else { - forAll(cellShapes, celli) + // Count the shapes + labelList& tets = meshCellSets_.tets; + labelList& pyrs = meshCellSets_.pyrs; + labelList& prisms = meshCellSets_.prisms; + labelList& wedges = meshCellSets_.wedges; + labelList& hexes = meshCellSets_.hexes; + labelList& polys = meshCellSets_.polys; + + label nTets = 0; + label nPyrs = 0; + label nPrisms = 0; + label nWedges = 0; + label nHexes = 0; + label nPolys = 0; + + forAll(cellShapes, cellI) { - const cellShape& cellShape = cellShapes[celli]; + const cellShape& cellShape = cellShapes[cellI]; const cellModel& cellModel = cellShape.model(); if (cellModel == tet) { - tets[nTets++] = celli; + tets[nTets++] = cellI; } else if (cellModel == pyr) { - pyrs[nPyrs++] = celli; + pyrs[nPyrs++] = cellI; } else if (cellModel == prism) { - prisms[nPrisms++] = celli; + prisms[nPrisms++] = cellI; } else if (cellModel == wedge) { - wedges[nWedges++] = celli; + wedges[nWedges++] = cellI; } else if (cellModel == hex) { - hexes[nHexes++] = celli; + hexes[nHexes++] = cellI; } else { - polys[nPolys++] = celli; + polys[nPolys++] = cellI; } } @@ -219,64 +215,65 @@ Foam::ensightMesh::ensightMesh reduce(meshCellSets_.nPolys, sumOp<label>()); } - - forAll (mesh.boundary(), patchi) + if (!args.optionFound("noPatches")) { - if (mesh.boundary()[patchi].size()) + forAll (mesh.boundary(), patchi) { - const polyPatch& p = mesh.boundaryMesh()[patchi]; + if (mesh.boundary()[patchi].size()) + { + 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()); - polys.setSize(p.size()); + tris.setSize(p.size()); + quads.setSize(p.size()); + polys.setSize(p.size()); - label nTris = 0; - label nQuads = 0; - label nPolys = 0; + label nTris = 0; + label nQuads = 0; + label nPolys = 0; - forAll(p, facei) - { - const face& f = p[facei]; - - if (f.size() == 3) + forAll(p, faceI) { - tris[nTris++] = facei; - } - else if (f.size() == 4) - { - quads[nQuads++] = facei; - } - else - { - polys[nPolys++] = facei; + const face& f = p[faceI]; + + if (f.size() == 3) + { + tris[nTris++] = faceI; + } + else if (f.size() == 4) + { + quads[nQuads++] = faceI; + } + else + { + polys[nPolys++] = faceI; + } } - } - tris.setSize(nTris); - quads.setSize(nQuads); - polys.setSize(nPolys); + tris.setSize(nTris); + quads.setSize(nQuads); + polys.setSize(nPolys); + } } } - 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.nTris = boundaryFaceSets_[patchi].tris.size(); + nfp.nQuads = boundaryFaceSets_[patchi].quads.size(); + nfp.nPolys = boundaryFaceSets_[patchi].polys.size(); } } @@ -304,9 +301,9 @@ void Foam::ensightMesh::writePoints OFstream& ensightGeometryFile ) const { - forAll(pointsComponent, pointi) + forAll(pointsComponent, pointI) { - ensightGeometryFile<< setw(12) << float(pointsComponent[pointi]) << nl; + ensightGeometryFile<< setw(12) << float(pointsComponent[pointI]) << nl; } } @@ -380,9 +377,9 @@ void Foam::ensightMesh::writePrims { const cellShape& cellPoints = cellShapes[i]; - forAll(cellPoints, pointi) + forAll(cellPoints, pointI) { - ensightGeometryFile<< setw(10) << cellPoints[pointi] + po; + ensightGeometryFile<< setw(10) << cellPoints[pointI] + po; } ensightGeometryFile << nl; } @@ -415,9 +412,9 @@ void Foam::ensightMesh::writePrimsBinary { const cellShape& cellPoints = cellShapes[i]; - forAll(cellPoints, pointi) + forAll(cellPoints, pointI) { - temp[n] = cellPoints[pointi] + po; + temp[n] = cellPoints[pointI] + po; n++; } } @@ -457,10 +454,10 @@ void Foam::ensightMesh::writePolys { const labelList& cf = cellFaces[polys[i]]; - forAll(cf, facei) + forAll(cf, faceI) { ensightGeometryFile - << setw(10) << faces[cf[facei]].size() << nl; + << setw(10) << faces[cf[faceI]].size() << nl; } } @@ -468,13 +465,13 @@ void Foam::ensightMesh::writePolys { const labelList& cf = cellFaces[polys[i]]; - forAll(cf, facei) + forAll(cf, faceI) { - const face& f = faces[cf[facei]]; + const face& f = faces[cf[faceI]]; - forAll(f, pointi) + forAll(f, pointI) { - ensightGeometryFile << setw(10) << f[pointi] + po; + ensightGeometryFile << setw(10) << f[pointI] + po; } ensightGeometryFile << nl; } @@ -513,11 +510,11 @@ void Foam::ensightMesh::writePolysBinary { const labelList& cf = cellFaces[polys[i]]; - forAll(cf, facei) + forAll(cf, faceI) { writeEnsDataBinary ( - faces[cf[facei]].size(), + faces[cf[faceI]].size(), ensightGeometryFile ); } @@ -527,13 +524,13 @@ void Foam::ensightMesh::writePolysBinary { const labelList& cf = cellFaces[polys[i]]; - forAll(cf, facei) + forAll(cf, faceI) { - const face& f = faces[cf[facei]]; + const face& f = faces[cf[faceI]]; - forAll(f, pointi) + forAll(f, pointI) { - writeEnsDataBinary(f[pointi] + po,ensightGeometryFile); + writeEnsDataBinary(f[pointI] + po,ensightGeometryFile); } } } @@ -648,9 +645,9 @@ void Foam::ensightMesh::writeFacePrims { const face& patchFace = patchFaces[i]; - forAll(patchFace, pointi) + forAll(patchFace, pointI) { - ensightGeometryFile << setw(10) << patchFace[pointi] + po; + ensightGeometryFile << setw(10) << patchFace[pointI] + po; } ensightGeometryFile << nl; } @@ -690,11 +687,11 @@ void Foam::ensightMesh::writeFacePrimsBinary { const face& patchFace = patchFaces[i]; - forAll(patchFace, pointi) + forAll(patchFace, pointI) { writeEnsDataBinary ( - patchFace[pointi] + po, + patchFace[pointI] + po, ensightGeometryFile ); } @@ -892,7 +889,7 @@ void Foam::ensightMesh::writeAscii postProcPath/ensightGeometryFileName, runTime.writeFormat(), runTime.writeVersion(), - runTime.writeCompression() + IOstream::UNCOMPRESSED ); } @@ -909,8 +906,8 @@ void Foam::ensightMesh::writeAscii ensightGeometryFile.precision(5); ensightGeometryFile - << "OpenFOAM Geometry File " << nl - << "OpenFOAM version " << Foam::FOAMversion << nl + << "EnSight Geometry File" << nl + << "written from OpenFOAM-" << Foam::FOAMversion << nl << "node id assign" << nl << "element id assign" << nl; } @@ -927,7 +924,7 @@ void Foam::ensightMesh::writeAscii ensightGeometryFile << "part" << nl << setw(10) << 1 << nl - << "FOAM cells" << nl + << "internalMesh" << nl << "coordinates" << nl << setw(10) << nPoints << endl; @@ -1038,35 +1035,34 @@ void Foam::ensightMesh::writeAscii } - label ensightPatchi = 2; + 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; + const labelList *trisPtr = NULL; const labelList *quadsPtr = NULL; const labelList *polysPtr = NULL; 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]; - trisPtr = &boundaryFaceSets_[patchi].tris; + trisPtr = &boundaryFaceSets_[patchi].tris; quadsPtr = &boundaryFaceSets_[patchi].quads; polysPtr = &boundaryFaceSets_[patchi].polys; patchPointsPtr = &(p.localPoints()); - patchFacesPtr = &(p.localFaces()); + patchFacesPtr = &(p.localFaces()); } const labelList& tris = *trisPtr; @@ -1083,7 +1079,7 @@ void Foam::ensightMesh::writeAscii { ensightGeometryFile << "part" << nl - << setw(10) << ensightPatchi++ << nl + << setw(10) << ensightPatchI++ << nl << patchName << nl << "coordinates" << nl << setw(10) << nfp.nPoints @@ -1235,11 +1231,11 @@ void Foam::ensightMesh::writeBinary if (Pstream::master()) { - writeEnsDataBinary("C binary",ensightGeometryFile); - writeEnsDataBinary("OpenFOAM Geometry File",ensightGeometryFile); - writeEnsDataBinary("Binary format",ensightGeometryFile); - writeEnsDataBinary("node id assign",ensightGeometryFile); - writeEnsDataBinary("element id assign",ensightGeometryFile); + writeEnsDataBinary("C binary", ensightGeometryFile); + writeEnsDataBinary("EnSight Geometry File", ensightGeometryFile); + writeEnsDataBinary("written from OpenFOAM", ensightGeometryFile); + writeEnsDataBinary("node id assign", ensightGeometryFile); + writeEnsDataBinary("element id assign", ensightGeometryFile); } labelList pointOffsets(Pstream::nProcs(), 0); @@ -1253,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); @@ -1364,18 +1360,17 @@ void Foam::ensightMesh::writeBinary } - label ensightPatchi = 2; - + 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; @@ -1385,9 +1380,8 @@ 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]; trisPtr = &boundaryFaceSets_[patchi].tris; @@ -1411,9 +1405,9 @@ void Foam::ensightMesh::writeBinary if (Pstream::master()) { writeEnsDataBinary("part",ensightGeometryFile); - writeEnsDataBinary(ensightPatchi++,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 fff8b797ab6fb4c139801ff59ec154f0c010b591..4ddb084d3d054c34961fb8e1d4c3a5a3bcb3db52 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.H @@ -78,19 +78,22 @@ class ensightMesh // Private data + //- Reference to the OpenFOAM mesh + const fvMesh& mesh_; + //- Set binary file output bool binary_; - //- Reference to the OpenFOAM mesh - const fvMesh& mesh_; + //- The ensight part id for the first patch + label patchPartOffset_; cellSets meshCellSets_; List<faceSets> boundaryFaceSets_; - HashTable<labelList> allPatchNames_; + wordList allPatchNames_; - HashTable<label> patchIndices_; + List<labelList> allPatchProcs_; wordHashSet patchNames_; @@ -266,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 @@ -286,6 +289,12 @@ public: return nPatchPrims_; } + //- The ensight part id for the first patch + label patchPartOffset() const + { + return patchPartOffset_; + } + // I-O diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C index 10d261bca5e508e59f19f4535f83eb2f2cb438de..881bb4b05a3ae7a5da76a3f6a500e68d7134bd3d 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C @@ -23,7 +23,9 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Description - Translates FOAM data to EnSight format + Translates FOAM data to EnSight format. + + An Ensight part is created for the internalMesh and for each patch. Usage - foamToEnsight [OPTION] \n @@ -32,12 +34,21 @@ Usage @param -ascii \n Write Ensight data in ASCII format instead of "C Binary" + @param -patches patchList \n + Specify particular patches to write. + Specifying an empty list suppresses writing the internalMesh. + + @param -noPatches \n + Suppress writing any patches. + Note Parallel support for cloud data is not supported + - writes to @a EnSight directory to avoid collisions with foamToEnsightParts \*---------------------------------------------------------------------------*/ #include "argList.H" +#include "timeSelector.H" #include "IOobjectList.H" #include "IOmanip.H" #include "OFstream.H" @@ -82,18 +93,15 @@ bool inFileNameList int main(int argc, char *argv[]) { - argList::validOptions.insert("patches", "patch list"); argList::validOptions.insert("ascii", "" ); -# include "addTimeOptions.H" + argList::validOptions.insert("patches", "patchList"); + argList::validOptions.insert("noPatches", ""); +# include "addTimeOptions.H" # include "setRootCase.H" // Check options - bool binary = true; - if (args.options().found("ascii")) - { - binary = false; - } + bool binary = !args.optionFound("ascii"); # include "createTime.H" @@ -114,29 +122,28 @@ int main(int argc, char *argv[]) regionPrefix = regionName; } - const label nTypes = 2; - const word fieldTypes[] = + const label nVolFieldTypes = 5; + const word volFieldTypes[] = { volScalarField::typeName, - volVectorField::typeName + volVectorField::typeName, + volSphericalTensorField::typeName, + volSymmTensorField::typeName, + volTensorField::typeName }; - // Create the output folder - const word postProcDir = "EnSight"; - // Path to EnSight folder at case level only // - For parallel cases, data only written from master -// fileName postProcPath = runTime.path()/postProcDir; - fileName postProcPath = args.rootPath()/args.globalCaseName()/postProcDir; + fileName ensightDir = args.rootPath()/args.globalCaseName()/"EnSight"; if (Pstream::master()) { - if (isDir(postProcPath)) + if (isDir(ensightDir)) { - rmDir(postProcPath); + rmDir(ensightDir); } - mkDir(postProcPath); + mkDir(ensightDir); } // Start of case file header output @@ -147,36 +154,23 @@ int main(int argc, char *argv[]) OFstream *ensightCaseFilePtr = NULL; if (Pstream::master()) { - fileName ensightCaseFileName = prepend + "case"; + fileName caseFileName = prepend + "case"; + Info<< nl << "write case: " << caseFileName.c_str() << endl; - if (!binary) - { - ensightCaseFilePtr = new OFstream - ( - postProcPath/ensightCaseFileName, - runTime.writeFormat(), - runTime.writeVersion(), - runTime.writeCompression() - ); - } - else - { - ensightCaseFilePtr = new OFstream - ( - postProcPath/ensightCaseFileName, - runTime.writeFormat(), - runTime.writeVersion(), - IOstream::UNCOMPRESSED - ); - } + // the case file is always ASCII + ensightCaseFilePtr = new OFstream + ( + ensightDir/caseFileName, + IOstream::ASCII + ); - Info<< nl << "Case file is " << ensightCaseFileName << endl; + *ensightCaseFilePtr + << "FORMAT" << nl + << "type: ensight gold" << nl << nl; } OFstream& ensightCaseFile = *ensightCaseFilePtr; -# include "ensightCaseHeader.H" - // Construct the EnSight mesh ensightMesh eMesh(mesh, args, binary); @@ -188,19 +182,20 @@ int main(int argc, char *argv[]) # include "checkMeshMoving.H" wordHashSet allCloudNames; - word geomCaseFileName = prepend + "000"; if (Pstream::master()) { + word geomFileName = prepend + "000"; + // test pre check variable if there is a moving mesh - if (meshMoving == true) + if (meshMoving) { - geomCaseFileName = prepend + "***"; + geomFileName = prepend + "***"; } ensightCaseFile << "GEOMETRY" << nl << "model: 1 " - << (geomCaseFileName + ".mesh").c_str() << nl; + << (geomFileName + ".mesh").c_str() << nl; } // Identify if lagrangian data exists at each time, and add clouds @@ -304,7 +299,7 @@ int main(int argc, char *argv[]) { eMesh.write ( - postProcPath, + ensightDir, prepend, timeIndex, ensightCaseFile @@ -324,94 +319,94 @@ int main(int argc, char *argv[]) // Cell field data output // ~~~~~~~~~~~~~~~~~~~~~~ - for (label i=0; i<nTypes; i++) + for (label i=0; i<nVolFieldTypes; i++) { - wordList fieldNames = objects.names(fieldTypes[i]); + wordList fieldNames = objects.names(volFieldTypes[i]); for (label j=0; j<fieldNames.size(); j++) { word fieldName = fieldNames[j]; - bool variableGood = true; - # include "checkData.H" - if (variableGood) + if (!variableGood) + { + continue; + } + + IOobject fieldObject + ( + fieldName, + mesh.time().timeName(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ); + + if (volFieldTypes[i] == volScalarField::typeName) { - IOobject fieldObject + ensightField<scalar> ( - fieldName, - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE + fieldObject, + eMesh, + ensightDir, + prepend, + timeIndex, + binary, + ensightCaseFile + ); + } + else if (volFieldTypes[i] == volVectorField::typeName) + { + ensightField<vector> + ( + fieldObject, + eMesh, + ensightDir, + prepend, + timeIndex, + binary, + ensightCaseFile + ); + } + else if (volFieldTypes[i] == volSphericalTensorField::typeName) + { + ensightField<sphericalTensor> + ( + fieldObject, + eMesh, + ensightDir, + prepend, + timeIndex, + binary, + ensightCaseFile + ); + } + else if (volFieldTypes[i] == volSymmTensorField::typeName) + { + ensightField<symmTensor> + ( + fieldObject, + eMesh, + ensightDir, + prepend, + timeIndex, + binary, + ensightCaseFile + ); + } + else if (volFieldTypes[i] == volTensorField::typeName) + { + ensightField<tensor> + ( + fieldObject, + eMesh, + ensightDir, + prepend, + timeIndex, + binary, + ensightCaseFile ); - - if (fieldTypes[i] == volScalarField::typeName) - { - ensightField<scalar> - ( - fieldObject, - eMesh, - postProcPath, - prepend, - timeIndex, - binary, - ensightCaseFile - ); - } - else if (fieldTypes[i] == volVectorField::typeName) - { - ensightField<vector> - ( - fieldObject, - eMesh, - postProcPath, - prepend, - timeIndex, - binary, - ensightCaseFile - ); - } - else if (fieldTypes[i] == volSphericalTensorField::typeName) - { - ensightField<sphericalTensor> - ( - fieldObject, - eMesh, - postProcPath, - prepend, - timeIndex, - binary, - ensightCaseFile - ); - } - else if (fieldTypes[i] == volSymmTensorField::typeName) - { - ensightField<symmTensor> - ( - fieldObject, - eMesh, - postProcPath, - prepend, - timeIndex, - binary, - ensightCaseFile - ); - } - else if (fieldTypes[i] == volTensorField::typeName) - { - ensightField<tensor> - ( - fieldObject, - eMesh, - postProcPath, - prepend, - timeIndex, - binary, - ensightCaseFile - ); - } } } } @@ -434,7 +429,7 @@ int main(int argc, char *argv[]) ensightParticlePositions ( mesh, - postProcPath, + ensightDir, timeFile, cloudName, cloudExists @@ -460,7 +455,7 @@ int main(int argc, char *argv[]) ensightCloudField<scalar> ( fieldObject, - postProcPath, + ensightDir, prepend, timeIndex, cloudName, @@ -473,7 +468,7 @@ int main(int argc, char *argv[]) ensightCloudField<vector> ( fieldObject, - postProcPath, + ensightDir, prepend, timeIndex, cloudName, diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/checkHasMovingMesh.H b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/checkHasMovingMesh.H index a9367daf8eb9870b055ecb1f5a2025eb39d3cee5..a5a2dd7d2d8d9e1b05c1c629fb4c6aa3935ed918 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/checkHasMovingMesh.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/checkHasMovingMesh.H @@ -6,15 +6,13 @@ if (timeDirs.size() > 1) hasMovingMesh = true; for (label i=0; i < timeDirs.size() && hasMovingMesh; ++i) { - IOobject io + hasMovingMesh = IOobject ( "points", timeDirs[i].name(), polyMesh::meshSubDir, mesh, IOobject::NO_READ - ); - - hasMovingMesh = io.headerOk(); + ).headerOk(); } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/findFields.H b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/findFields.H index edfbb5ae7d9b483fad7e7d7eb876ace2914750a2..63ef5eef21d7baee8c01bc8683fc29c16516cd4c 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/findFields.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/findFields.H @@ -1,40 +1,40 @@ -// check the final time directory for +// check the final time directory for the following: // 1. volume fields HashTable<word> volumeFields; // 2. the fields for each cloud: -HashTable<HashTable<word> > cloudFields; +HashTable< HashTable<word> > cloudFields; -if (timeDirs.size() > 1) +if (timeDirs.size()) { IOobjectList objs(mesh, timeDirs[timeDirs.size()-1].name()); forAllConstIter(IOobjectList, objs, fieldIter) { const IOobject& obj = *fieldIter(); + const word& fieldName = obj.name(); + const word& fieldType = obj.headerClassName(); - if - ( - obj.headerClassName() == volScalarField::typeName - || obj.headerClassName() == volVectorField::typeName - ) + if (fieldName.size() > 2 && fieldName(fieldName.size()-2, 2) == "_0") + { + // ignore _0 fields + } + else if (volFieldTypes.found(fieldType)) { - // Add field and field type - volumeFields.insert - ( - obj.name(), - obj.headerClassName() - ); + // simply ignore types that we don't handle + volumeFields.insert(fieldName, fieldType); } } - // now check for lagrangian/<cloudName> + // + // now check for lagrangian/<cloudName> + // fileNameList cloudDirs = readDir ( runTime.path() - / timeDirs[timeDirs.size() - 1].name() + / timeDirs[timeDirs.size()-1].name() / regionPrefix / cloud::prefix, fileName::DIRECTORY @@ -47,42 +47,59 @@ if (timeDirs.size() > 1) // Create a new hash table for each cloud cloudFields.insert(cloudName, HashTable<word>()); - // Identify the new cloud in the hash table + // Identify the new cloud within the hash table HashTable<HashTable<word> >::iterator cloudIter = cloudFields.find(cloudName); - IOobjectList cloudObjs + IOobjectList objs ( mesh, - timeDirs[timeDirs.size() - 1].name(), + timeDirs[timeDirs.size()-1].name(), cloud::prefix/cloudName ); bool hasPositions = false; - forAllConstIter(IOobjectList, cloudObjs, fieldIter) + forAllConstIter(IOobjectList, objs, fieldIter) { const IOobject obj = *fieldIter(); + const word& fieldName = obj.name(); + const word& fieldType = obj.headerClassName(); - if (obj.name() == "positions") + if (fieldName == "positions") { hasPositions = true; } - else + else if (cloudFieldTypes.found(fieldType)) { - // Add field and field type - cloudIter().insert - ( - obj.name(), - obj.headerClassName() - ); + // simply ignore types that we don't handle + cloudIter().insert(fieldName, fieldType); } } - // drop this cloud if it has no positions - if (!hasPositions) + // drop this cloud if it has no positions or is otherwise empty + if (!hasPositions || cloudIter().empty()) { + Info<< "removing cloud " << cloudName << endl; cloudFields.erase(cloudIter); } } + + // + // verify that the variable is present for all times + // + for (label i=0; volumeFields.size() && i < timeDirs.size(); ++i) + { + IOobjectList objs(mesh, timeDirs[i].name()); + + forAllIter(HashTable<word>, volumeFields, fieldIter) + { + const word& fieldName = fieldIter.key(); + + if (!objs.found(fieldName)) + { + volumeFields.erase(fieldIter); + } + } + } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C index af2dee175a9351de1d961dc4b37d5061cc2858be..5e38986331d2b7a1c4edd86a30a0fe534b36bec3 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C @@ -83,23 +83,19 @@ int main(int argc, char *argv[]) argList::validOptions.insert("index", "start"); argList::validOptions.insert("noMesh", ""); - const word volFieldTypes[] = - { - volScalarField::typeName, - volVectorField::typeName, - volSphericalTensorField::typeName, - volSymmTensorField::typeName, - volTensorField::typeName, - word::null - }; - - const word sprayFieldTypes[] = - { - scalarIOField::typeName, - vectorIOField::typeName, - tensorIOField::typeName, - word::null - }; + // the volume field types that we handle + wordHashSet volFieldTypes; + volFieldTypes.insert(volScalarField::typeName); + volFieldTypes.insert(volVectorField::typeName); + volFieldTypes.insert(volSphericalTensorField::typeName); + volFieldTypes.insert(volSymmTensorField::typeName); + volFieldTypes.insert(volTensorField::typeName); + + // the lagrangian field types that we handle + wordHashSet cloudFieldTypes; + cloudFieldTypes.insert(scalarIOField::typeName); + cloudFieldTypes.insert(vectorIOField::typeName); + cloudFieldTypes.insert(tensorIOField::typeName); const char* geometryName = "geometry"; @@ -111,7 +107,7 @@ int main(int argc, char *argv[]) // default to binary output, unless otherwise specified IOstream::streamFormat format = IOstream::BINARY; - if (args.options().found("ascii")) + if (args.optionFound("ascii")) { format = IOstream::ASCII; } @@ -119,14 +115,14 @@ int main(int argc, char *argv[]) // control for renumbering iterations bool optIndex = false; label indexingNumber = 0; - if (args.options().found("index")) + if (args.optionFound("index")) { optIndex = true; - indexingNumber = readLabel(IStringStream(args.options()["index"])()); + indexingNumber = args.optionRead<label>("index"); } // always write the geometry, unless the -noMesh option is specified - bool optNoMesh = args.options().found("noMesh"); + bool optNoMesh = args.optionFound("noMesh"); fileName ensightDir = args.rootPath()/args.globalCaseName()/"Ensight"; fileName dataDir = ensightDir/"data"; @@ -168,7 +164,6 @@ int main(int argc, char *argv[]) # include "checkHasMovingMesh.H" # include "findFields.H" -# include "validateFields.H" if (hasMovingMesh && optNoMesh) { diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/moveMesh.H b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/moveMesh.H index 546148c7cf2ed907b9ea3b1fcc11a50a9339ce17..284a0df35bba33901eda224f1dffe7eeb3954f96 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/moveMesh.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/moveMesh.H @@ -11,8 +11,6 @@ { // Read new points io.readOpt() = IOobject::MUST_READ; - pointIOField newPoints(io); - - mesh.movePoints(newPoints); + mesh.movePoints(pointIOField(io)); } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/validateFields.H b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/validateFields.H deleted file mode 100644 index 6c640b41fa57efee651b694891cf819d460caeac..0000000000000000000000000000000000000000 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/validateFields.H +++ /dev/null @@ -1,105 +0,0 @@ -// ignore special fields or fields that we don't handle -// -forAllIter(HashTable<word>, volumeFields, fieldIter) -{ - const word& fieldName = fieldIter.key(); - const word& fieldType = fieldIter(); - - // ignore _0 fields - if (fieldName.size() > 2 && fieldName(fieldName.size() - 2, 2) == "_0") - { - volumeFields.erase(fieldIter); - } - else - { - // remove types that we don't handle: - bool invalid = true; - for (label typeI=0; invalid && volFieldTypes[typeI].size(); ++typeI) - { - if (fieldType == volFieldTypes[typeI]) - { - invalid = false; - } - } - - if (invalid) - { - Info<< "ignoring " << fieldType << ": " << fieldName << endl; - volumeFields.erase(fieldIter); - } - } -} - -// verify that the variable is present for all times -// -for (label i=0; volumeFields.size() && i < timeDirs.size(); ++i) -{ - IOobjectList objs(mesh, timeDirs[i].name()); - - forAllIter(HashTable<word>, volumeFields, fieldIter) - { - const word& fieldName = fieldIter.key(); - - if (!objs.found(fieldName)) - { - volumeFields.erase(fieldIter); - } - } -} - - - -// ignore fields that we don't handle -// -forAllIter(HashTable<HashTable<word> >, cloudFields, cloudIter) -{ - const word& cloudName = cloudIter.key(); - - forAllIter(HashTable<word>, cloudIter(), fieldIter) - { - const word& fieldName = fieldIter.key(); - const word& fieldType = fieldIter(); - - // remove types that we don't handle: - bool invalid = true; - for (label typeI=0; invalid && sprayFieldTypes[typeI].size(); ++typeI) - { - if (fieldType == sprayFieldTypes[typeI]) - { - invalid = false; - } - } - - if (invalid) - { - Info<< "ignoring " << fieldType << ": " << fieldName << endl; - cloudIter().erase(fieldIter); - } - } - - if (cloudIter().empty()) - { - Info<< "removing cloud " << cloudName << endl; - cloudFields.erase(cloudIter); - } -} - -// DEBUGGING -// Info<<"final fields ("; -// forAllConstIter(HashTable<word>, volumeFields, fieldIter) -// { -// Info<< " " << fieldIter.key(); -// } -// -// Info<< " )\n"; -// -// forAllConstIter(HashTable<HashTable<word> >, cloudFields, cloudIter) -// { -// Info<<"final fields for lagrangian/" << cloudIter.key() << " ("; -// forAllConstIter(HashTable<word>, cloudIter(), fieldIter) -// { -// Info<< " " << fieldIter.key(); -// } -// Info<< " )\n"; -// } - diff --git a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/checkTimeOption.H b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/checkTimeOption.H deleted file mode 100644 index ad0aadf7c0f523a9790dacd005fe8ef989d9520a..0000000000000000000000000000000000000000 --- a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/checkTimeOption.H +++ /dev/null @@ -1,26 +0,0 @@ - if (args.options().found("time")) - { - scalar time(readScalar(IStringStream(args.options()["time"])())); - - int nearestIndex = -1; - scalar nearestDiff = Foam::GREAT; - - forAll(Times, timeIndex) - { - scalar diff = fabs(Times[timeIndex].value() - time); - if (diff < nearestDiff) - { - nearestDiff = diff; - nearestIndex = timeIndex; - } - } - - startTime = nearestIndex; - endTime = nearestIndex + 1; - } - else - { - startTime = 0; - endTime = Times.size(); - } - diff --git a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/foamToFieldview9.C b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/foamToFieldview9.C index 7fc54a8cf2f76293c0a0e528a3d9f21260771db2..87270649df41445b6b77676ab141dfc0e155b68f 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/foamToFieldview9.C +++ b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/foamToFieldview9.C @@ -23,7 +23,8 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Description - Write out the FOAM mesh in Version 3.0 Fieldview-UNS format (binary). + Write out the OpenFOAM mesh in Version 3.0 Fieldview-UNS format (binary). + See Fieldview Release 9 Reference Manual - Appendix D (Unstructured Data Format) Borrows various from uns/write_binary_uns.c from FieldView dist. @@ -31,6 +32,7 @@ Description \*---------------------------------------------------------------------------*/ #include "argList.H" +#include "timeSelector.H" #include "volFields.H" #include "surfaceFields.H" #include "pointFields.H" @@ -176,20 +178,15 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validOptions.insert("noWall", ""); + timeSelector::addOptions(true, false); -# include "addTimeOptions.H" # include "setRootCase.H" # include "createTime.H" - instantList Times = runTime.times(); - -# include "checkTimeOptions.H" - - runTime.setTime(Times[startTime], startTime); + instantList timeDirs = timeSelector::select0(runTime, args); # include "createMesh.H" - // Initialize name mapping table FieldviewNames.insert("alpha", "aalpha"); FieldviewNames.insert("Alpha", "AAlpha"); @@ -285,17 +282,16 @@ int main(int argc, char *argv[]) label fieldViewTime = 0; - for (label i=startTime; i<endTime; i++) + forAll(timeDirs, timeI) { - runTime.setTime(Times[i], i); - - Info<< "Time " << Times[i].name() << endl; + runTime.setTime(timeDirs[timeI], timeI); + Info<< "Time: " << runTime.timeName() << endl; fvMesh::readUpdateState state = mesh.readUpdate(); if ( - i == startTime + timeI == 0 || state == fvMesh::TOPO_CHANGE || state == fvMesh::TOPO_PATCH_CHANGE ) @@ -307,7 +303,7 @@ int main(int argc, char *argv[]) new fieldviewTopology ( mesh, - !args.options().found("noWall") + !args.optionFound("noWall") ) ); @@ -334,7 +330,7 @@ int main(int argc, char *argv[]) fileName fvFileName ( - fvPath/runTime.caseName() + "_" + Foam::name(i) + ".uns" + fvPath/runTime.caseName() + "_" + Foam::name(timeI) + ".uns" ); Info<< " file:" << fvFileName.c_str() << endl; @@ -364,7 +360,7 @@ int main(int argc, char *argv[]) // Output constants for time, fsmach, alpha and re. float fBuf[4]; - fBuf[0] = Times[i].value(); + fBuf[0] = runTime.value(); fBuf[1] = 0.0; fBuf[2] = 0.0; fBuf[3] = 1.0; @@ -892,7 +888,7 @@ int main(int argc, char *argv[]) writeInt(fvParticleFile, fieldViewTime + 1); // Time value - writeFloat(fvParticleFile, Times[i].value()); + writeFloat(fvParticleFile, runTime.value()); // Read particles Cloud<passiveParticle> parcels(mesh); diff --git a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/getFieldNames.H b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/getFieldNames.H index 129d788738403040a45b32a823cc7036311c9e29..ec540efe7df467f5ce5136303309ce71eb3b602e 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/getFieldNames.H +++ b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/getFieldNames.H @@ -5,9 +5,9 @@ HashSet<word> surfVectorHash; HashSet<word> sprayScalarHash; HashSet<word> sprayVectorHash; -forAll(Times, timeI) +forAll(timeDirs, timeI) { - runTime.setTime(Times[timeI], timeI); + runTime.setTime(timeDirs[timeI], timeI); // Add all fields to hashtable IOobjectList objects(mesh, runTime.timeName()); diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C index 2d5e7479906befdf04c420de5409f1db7c274328..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,15 +245,16 @@ 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" - bool doWriteInternal = !args.options().found("noInternal"); - bool doFaceZones = !args.options().found("noFaceZones"); - bool doLinks = !args.options().found("noLinks"); - - bool binary = !args.options().found("ascii"); + bool doWriteInternal = !args.optionFound("noInternal"); + 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)) { @@ -260,7 +264,7 @@ int main(int argc, char *argv[]) << exit(FatalError); } - bool nearCellValue = args.options().found("nearCellValue"); + bool nearCellValue = args.optionFound("nearCellValue"); if (nearCellValue) { @@ -269,7 +273,7 @@ int main(int argc, char *argv[]) << nl << endl; } - bool noPointValues = args.options().found("noPointValues"); + bool noPointValues = args.optionFound("noPointValues"); if (noPointValues) { @@ -277,12 +281,12 @@ int main(int argc, char *argv[]) << "Outputting cell values only" << nl << endl; } - bool allPatches = args.options().found("allPatches"); + bool allPatches = args.optionFound("allPatches"); HashSet<word> excludePatches; - if (args.options().found("excludePatches")) + if (args.optionFound("excludePatches")) { - IStringStream(args.options()["excludePatches"])() >> excludePatches; + args.optionLookup("excludePatches")() >> excludePatches; Info<< "Not including patches " << excludePatches << nl << endl; } @@ -290,9 +294,9 @@ int main(int argc, char *argv[]) word cellSetName; string vtkName; - if (args.options().found("cellSet")) + if (args.optionFound("cellSet")) { - cellSetName = args.options()["cellSet"]; + cellSetName = args.option("cellSet"); vtkName = cellSetName; } else if (Pstream::parRun()) @@ -332,8 +336,8 @@ int main(int argc, char *argv[]) { if ( - args.options().found("time") - || args.options().found("latestTime") + args.optionFound("time") + || args.optionFound("latestTime") || cellSetName.size() || regionName != polyMesh::defaultRegion ) @@ -360,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(); @@ -377,10 +391,10 @@ int main(int argc, char *argv[]) // If faceSet: write faceSet only (as polydata) - if (args.options().found("faceSet")) + if (args.optionFound("faceSet")) { // Load the faceSet - faceSet set(mesh, args.options()["faceSet"]); + faceSet set(mesh, args.option("faceSet")); // Filename as if patch with same name. mkDir(fvPath/set.name()); @@ -389,7 +403,7 @@ int main(int argc, char *argv[]) ( fvPath/set.name()/set.name() + "_" - + name(timeI) + + timeDesc + ".vtk" ); @@ -400,10 +414,10 @@ int main(int argc, char *argv[]) continue; } // If pointSet: write pointSet only (as polydata) - if (args.options().found("pointSet")) + if (args.optionFound("pointSet")) { // Load the pointSet - pointSet set(mesh, args.options()["pointSet"]); + pointSet set(mesh, args.option("pointSet")); // Filename as if patch with same name. mkDir(fvPath/set.name()); @@ -412,7 +426,7 @@ int main(int argc, char *argv[]) ( fvPath/set.name()/set.name() + "_" - + name(timeI) + + timeDesc + ".vtk" ); @@ -428,9 +442,9 @@ int main(int argc, char *argv[]) IOobjectList objects(mesh, runTime.timeName()); HashSet<word> selectedFields; - if (args.options().found("fields")) + if (args.optionFound("fields")) { - IStringStream(args.options()["fields"])() >> selectedFields; + args.optionLookup("fields")() >> selectedFields; } // Construct the vol fields (on the original mesh if subsetted) @@ -549,7 +563,7 @@ int main(int argc, char *argv[]) ( fvPath/vtkName + "_" - + name(timeI) + + timeDesc + ".vtk" ); @@ -608,7 +622,7 @@ int main(int argc, char *argv[]) // //--------------------------------------------------------------------- - if (args.options().found("surfaceFields")) + if (args.optionFound("surfaceFields")) { PtrList<surfaceScalarField> ssf; readFields @@ -655,8 +669,8 @@ int main(int argc, char *argv[]) fvPath /"surfaceFields" /"surfaceFields" - + "_" - + name(timeI) + + "_" + + timeDesc + ".vtk" ); @@ -690,7 +704,7 @@ int main(int argc, char *argv[]) patchFileName = fvPath/"allPatches"/cellSetName + "_" - + name(timeI) + + timeDesc + ".vtk"; } else @@ -698,7 +712,7 @@ int main(int argc, char *argv[]) patchFileName = fvPath/"allPatches"/"allPatches" + "_" - + name(timeI) + + timeDesc + ".vtk"; } @@ -768,7 +782,7 @@ int main(int argc, char *argv[]) patchFileName = fvPath/pp.name()/cellSetName + "_" - + name(timeI) + + timeDesc + ".vtk"; } else @@ -776,7 +790,7 @@ int main(int argc, char *argv[]) patchFileName = fvPath/pp.name()/pp.name() + "_" - + name(timeI) + + timeDesc + ".vtk"; } @@ -868,7 +882,7 @@ int main(int argc, char *argv[]) patchFileName = fvPath/pp.name()/cellSetName + "_" - + name(timeI) + + timeDesc + ".vtk"; } else @@ -876,7 +890,7 @@ int main(int argc, char *argv[]) patchFileName = fvPath/pp.name()/pp.name() + "_" - + name(timeI) + + timeDesc + ".vtk"; } @@ -932,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/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C index 118e99fc9101c2fd64a0cddae1c6a9e28c198008..04518db985c1db2a5245f464b364613a456ed84b 100644 --- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C +++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C @@ -113,11 +113,9 @@ int Foam::vtkPV3Foam::setTime(int nRequest, const double requestTimes[]) instantList Times = runTime.times(); int nearestIndex = timeIndex_; - for (int requestI = 0; requestI < nRequest; ++requestI) { int index = Time::findClosestTimeIndex(Times, requestTimes[requestI]); - if (index >= 0 && index != timeIndex_) { nearestIndex = index; @@ -125,7 +123,6 @@ int Foam::vtkPV3Foam::setTime(int nRequest, const double requestTimes[]) } } - if (nearestIndex < 0) { nearestIndex = 0; diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_maxsize_info.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_maxsize_info.H index e143dd359d5dedb6a3a0a5a9ef764f2709222182..7c4ef69a4fd06f91e26a2ce00cefdae159743af5 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_maxsize_info.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_maxsize_info.H @@ -8,7 +8,7 @@ int USERD_get_maxsize_info return Z_ERR; #ifdef ENSIGHTDEBUG - Info << "Entering: USERD_get_maxsize_info" << endl << flush; + Info << "Entering: USERD_get_maxsize_info" << endl; #endif label maxNPoints = 0; @@ -19,9 +19,9 @@ int USERD_get_maxsize_info label nPyr05Max = 0; label nTet04Max = 0; - Info << "Checking all time steps for EnSight memory allocation purpose. This can take some time." << endl; + Info<< "Checking all time steps for EnSight memory allocation purpose. This can take some time." << endl; - for (label t=1; t < TimeList.size(); t++) + for (label timeI=1; timeI < timeDirs.size(); ++timeI) { label nPen06 = 0; @@ -29,21 +29,21 @@ int USERD_get_maxsize_info label nPyr05 = 0; label nTet04 = 0; - runTimePtr->setTime(TimeList[t], t); + runTimePtr->setTime(timeDirs[timeI], timeI); - Info << "Checking time = " << TimeList[t].value() << endl << flush; + Info<< "Checking time = " << runTimePtr->timeName() << endl; const cellShapeList& cells = meshPtr->cellShapes(); - label nPoints = meshPtr->nPoints(); - label nCells = cells.size(); + const label nPoints = meshPtr->nPoints(); + const label nCells = cells.size(); maxNPoints = max(maxNPoints, nPoints); for (label n=0; n<nCells;n++) { label nFaces = cells[n].nFaces(); - labelList points = cells[n]; + const labelList& points = cells[n]; if ((nFaces == 6) && (points.size() == 8)) { @@ -70,7 +70,6 @@ int USERD_get_maxsize_info if (Numparts_available > 1) { - // Get the maximum number of spray parcels // and store it Cloud<passiveParticle> lagrangian(*meshPtr); @@ -79,9 +78,7 @@ int USERD_get_maxsize_info { nMaxParcels = lagrangian.size(); } - } - } max_number_of_nodes[0] = maxNPoints; @@ -97,7 +94,7 @@ int USERD_get_maxsize_info } #ifdef ENSIGHTDEBUG - Info << "Leaving: USERD_get_maxsize_info" << endl << flush; + Info<< "Leaving: USERD_get_maxsize_info" << endl; #endif return Z_OK; diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_sol_times.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_sol_times.H index 353b67def1551dd4838481a0fdfe339caa26d418..dcc64822897df9246929b025bf1e64e61167673d 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_sol_times.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_sol_times.H @@ -10,18 +10,18 @@ int USERD_get_sol_times ) { #ifdef ENSIGHTDEBUG - Info << "Entering: USERD_get_sol_times" << endl << flush; - Info << TimeList << endl; + Info<< "Entering: USERD_get_sol_times\n" << timeDirs << endl; #endif + for (label n=0; n<Num_time_steps;n++) { - solution_times[n] = TimeList[n+1].value(); + solution_times[n] = timeDirs[n+1].value(); } - if (TimeList[1].value() < 0) + if (timeDirs[1].value() < 0) { scalar addCAD = 360.0; - while (TimeList[1].value() + addCAD < 0.0) + while (timeDirs[1].value() + addCAD < 0.0) { addCAD += 360.0; } @@ -29,14 +29,14 @@ int USERD_get_sol_times { solution_times[n] += addCAD; - Info << "Time[" << n << "] = " << TimeList[n+1].value() + Info << "Time[" << n << "] = " << timeDirs[n+1].value() << " was corrected to " << solution_times[n] << endl; } } #ifdef ENSIGHTDEBUG - Info << "Leaving: USERD_get_sol_times" << endl << flush; + Info<< "Leaving: USERD_get_sol_times" << endl; #endif return Z_OK; diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_timeset_description.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_timeset_description.H index 6eebf9b345ced343d96cc57f4d59328b79f27290..e3c98ba240127ba9047968c11c5a162113632bc9 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_timeset_description.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_timeset_description.H @@ -4,13 +4,12 @@ int USERD_get_timeset_description char timeset_description[Z_BUFL] ) { - + #ifdef ENSIGHTDEBUG - Info << "Entering: USERD_get_timeset_description" << endl - << flush; + Info<< "Entering: USERD_get_timeset_description" << endl; #endif - if (TimeList[1].value() < 0) + if (timeDirs[1].value() < 0) { strncpy(timeset_description, "CAD", Z_BUFL); } @@ -20,8 +19,7 @@ int USERD_get_timeset_description } #ifdef ENSIGHTDEBUG - Info << "Leaving: USERD_get_timeset_description" << endl - << flush; + Info<< "Leaving: USERD_get_timeset_description" << endl; #endif return Z_OK; diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H index 83303fef717fdea9600e8e7331f3270d5cbce984..712ce53b869072019ca37fa40c749d35197b1b2f 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H @@ -79,18 +79,18 @@ int USERD_set_filenames ); // set the available number of time-steps - TimeList = (const instantList&)Foam::Time::findTimes(rootDir/caseDir); + timeDirs = Foam::Time::findTimes(rootDir/caseDir); - Num_time_steps = TimeList.size() - 1; + Num_time_steps = timeDirs.size() - 1; nPatches = meshPtr->boundaryMesh().size(); // set the number of fields and store their names // a valid field must exist for all time-steps - runTime.setTime(TimeList[TimeList.size()-1], TimeList.size()-1); + runTime.setTime(timeDirs[timeDirs.size()-1], timeDirs.size()-1); IOobjectList objects(*meshPtr, runTime.timeName()); - fieldNames = (const wordList&)objects.names(); + fieldNames = objects.names(); // because of the spray being a 'field' ... // get the availabe number of variables and @@ -149,7 +149,7 @@ int USERD_set_filenames label n = 0; while (!lagrangianNamesFound && n < Num_time_steps) { - runTime.setTime(TimeList[n+1], n+1); + runTime.setTime(timeDirs[n+1], n+1); Cloud<passiveParticle> lagrangian(*meshPtr); @@ -195,7 +195,7 @@ int USERD_set_filenames } Current_time_step = Num_time_steps; - runTime.setTime(TimeList[Current_time_step], Current_time_step); + runTime.setTime(timeDirs[Current_time_step], Current_time_step); Num_variables = nVar + nSprayVariables; Numparts_available = Num_unstructured_parts + Num_structured_parts + nPatches; diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_time_set_and_step.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_time_set_and_step.H index ef2f9a24531ed8f5b3a6371cb0ef247ed204c264..5e4c5815323af4948db69d381d5e37483bbb0185 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_time_set_and_step.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_time_set_and_step.H @@ -20,18 +20,30 @@ void USERD_set_time_set_and_step if (time_step == 0) { - runTime.setTime(TimeList[Current_time_step], Current_time_step); + runTime.setTime + ( + timeDirs[Current_time_step], + Current_time_step + ); } else { - runTime.setTime(TimeList[Current_time_step + 1], Current_time_step + 1); + runTime.setTime + ( + timeDirs[Current_time_step + 1], + Current_time_step + 1 + ); } meshPtr->readUpdate(); if (time_step == 0) { - runTime.setTime(TimeList[Current_time_step + 1], Current_time_step + 1); + runTime.setTime + ( + timeDirs[Current_time_step + 1], + Current_time_step + 1 + ); } if (Numparts_available > nPatches+1) diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianVector.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianVector.H index 80c71ba028062eebb8eeabb88e9607cf19e3d6b7..c6548c1408279dce2d0e92c827b814caab09d51c 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianVector.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianVector.H @@ -5,7 +5,6 @@ nVar -= Num_variables - nSprayVariables + lagrangianScalarNames.size(); if (nVar >= 0) { - word name = lagrangianVectorNames[nVar]; IOField<vector> v @@ -42,7 +41,7 @@ if (nVar >= 0) } else { - //Info << "getLagrangianVector: nVar = " << nVar << endl; + // Info<< "getLagrangianVector: nVar = " << nVar << endl; return Z_UNDEF; } diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/globalFoam.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/globalFoam.H index d68861b138e6cb79159d94767c0206769c2baa5c..7c7f2b16d822c6dfdf43ffeb78322234063529f9 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/globalFoam.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/globalFoam.H @@ -41,7 +41,7 @@ static word pointPrepend = "point_"; static fileName rootDir; static fileName caseDir; -static instantList TimeList; +static instantList timeDirs; static List<word> fieldNames; static List<word> lagrangianScalarNames; 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/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C b/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C index ee4fd2c50f28c66a602156710dfe90575174e5e3..15c1153db5b17dec5191b50311c85937d588e88b 100644 --- a/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C +++ b/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C @@ -82,7 +82,7 @@ namespace Foam void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) { - bool writeResults = !args.options().found("noWrite"); + bool writeResults = !args.optionFound("noWrite"); wordList extensiveVSFNames ( diff --git a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C index 45faede694f7a240f624fd4b6054da2207b49693..0843f3acf3b72ea161cfb5958493373792787fac 100644 --- a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C +++ b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C @@ -53,15 +53,13 @@ namespace Foam { void execFlowFunctionObjects(const argList& args, const Time& runTime) { - if (args.options().found("dict")) + if (args.optionFound("dict")) { - fileName dictName(args.options()["dict"]); - IOdictionary dict ( IOobject ( - dictName, + args.option("dict"), runTime.system(), runTime, IOobject::MUST_READ diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/calculateFields.H b/applications/utilities/postProcessing/miscellaneous/postChannel/calculateFields.H index e4f4f411e1a1e56e017b2a9bc5de4407d3437108..6c7cffcf0ad300c7d95042c0fa44c06de822c03c 100644 --- a/applications/utilities/postProcessing/miscellaneous/postChannel/calculateFields.H +++ b/applications/utilities/postProcessing/miscellaneous/postChannel/calculateFields.H @@ -12,7 +12,7 @@ IOobject ( "txx", - Times[i].name(), + runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE @@ -28,7 +28,7 @@ IOobject ( "tyy", - Times[i].name(), + runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE @@ -44,7 +44,7 @@ IOobject ( "tzz", - Times[i].name(), + runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE @@ -60,7 +60,7 @@ IOobject ( "txy", - Times[i].name(), + runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/postChannel.C b/applications/utilities/postProcessing/miscellaneous/postChannel/postChannel.C index 943bff5811f05f92a7291978bf95d371a1f7e1a4..559e769cf1c293e3de4ca34a1ce4751ad72de5c9 100644 --- a/applications/utilities/postProcessing/miscellaneous/postChannel/postChannel.C +++ b/applications/utilities/postProcessing/miscellaneous/postChannel/postChannel.C @@ -48,18 +48,13 @@ Description int main(int argc, char *argv[]) { argList::noParallel(); -# include "addTimeOptions.H" -# include "setRootCase.H" + timeSelector::addOptions(); +# include "setRootCase.H" # include "createTime.H" // Get times list - instantList Times = runTime.times(); - - // set startTime and endTime depending on -time and -latestTime options -# include "checkTimeOptions.H" - - runTime.setTime(Times[startTime], startTime); + instantList timeDirs = timeSelector::select0(runTime, args); # include "createMesh.H" # include "readTransportProperties.H" @@ -83,10 +78,9 @@ int main(int argc, char *argv[]) // For each time step read all fields - for (label i=startTime; i<endTime; i++) + forAll(timeDirs, timeI) { - runTime.setTime(Times[i], i); - + runTime.setTime(timeDirs[timeI], timeI); Info<< "Collapsing fields for time " << runTime.timeName() << endl; # include "readFields.H" @@ -96,7 +90,7 @@ int main(int argc, char *argv[]) # include "collapse.H" } - Info<< "end" << endl; + Info<< "\nEnd" << endl; return 0; } diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/readFields.H b/applications/utilities/postProcessing/miscellaneous/postChannel/readFields.H index d281b6335144fd968eb021f9573dcb3ce079718d..e0ce9b1f6da71c361a6a0b62dffca7111ede1f2a 100644 --- a/applications/utilities/postProcessing/miscellaneous/postChannel/readFields.H +++ b/applications/utilities/postProcessing/miscellaneous/postChannel/readFields.H @@ -1,7 +1,7 @@ IOobject UMeanHeader ( "UMean", - runTime.times()[i].name(), + runTime.timeName(), mesh, IOobject::MUST_READ ); @@ -23,7 +23,7 @@ IOobject ( "UPrime2Mean", - runTime.times()[i].name(), + runTime.timeName(), mesh, IOobject::MUST_READ ), @@ -39,7 +39,7 @@ IOobject ( "pPrime2Mean", - runTime.times()[i].name(), + runTime.timeName(), mesh, IOobject::MUST_READ ), @@ -52,7 +52,7 @@ IOobject ( "epsilonMean", - runTime.times()[i].name(), + runTime.timeName(), mesh, IOobject::MUST_READ ), @@ -64,7 +64,7 @@ IOobject ( "nuMean", - runTime.times()[i].name(), + runTime.timeName(), mesh, IOobject::MUST_READ ), @@ -76,7 +76,7 @@ IOobject ( "gammaDotMean", - runTime.times()[i].name(), + runTime.timeName(), mesh, IOobject::MUST_READ ), @@ -88,7 +88,7 @@ IOobject ( "nuPrime", - runTime.times()[i].name(), + runTime.timeName(), mesh, IOobject::MUST_READ ), @@ -102,7 +102,7 @@ IOobject ( "gammaDotPrime", - runTime.times()[i].name(), + runTime.timeName(), mesh, IOobject::MUST_READ ), diff --git a/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C b/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C index dc92aade57b699d0a6b4816c1825684b304b2575..54acae002582bfa1dcb5e09c5c20255be2c7bac4 100644 --- a/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C +++ b/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C @@ -78,7 +78,7 @@ int main(int argc, char *argv[]) // Give patch area if (isType<cyclicPolyPatch>(mesh.boundaryMesh()[patchi])) { - Info<< " Cyclic patch area: " << nl; + Info<< " Cyclic patch vector area: " << nl; label nFaces = mesh.boundaryMesh()[patchi].size(); vector sum1 = vector::zero; vector sum2 = vector::zero; @@ -92,12 +92,18 @@ int main(int argc, char *argv[]) Info<< " - half 1 = " << sum1 << ", " << mag(sum1) << nl << " - half 2 = " << sum2 << ", " << mag(sum2) << nl << " - total = " << (sum1 + sum2) << ", " - << mag(sum1 + sum2) << endl;; + << mag(sum1 + sum2) << endl; + Info<< " Cyclic patch area magnitude = " + << gSum(mesh.magSf().boundaryField()[patchi])/2.0 << endl; } else { - Info<< " Patch area = " + Info<< " Area vector of patch " + << patchName << '[' << patchi << ']' << " = " << gSum(mesh.Sf().boundaryField()[patchi]) << endl; + Info<< " Area magnitude of patch " + << patchName << '[' << patchi << ']' << " = " + << gSum(mesh.magSf().boundaryField()[patchi]) << endl; } // Read field and calc integral @@ -107,15 +113,26 @@ int main(int argc, char *argv[]) << fieldName << endl; volScalarField field(fieldHeader, mesh); - vector sumField = gSum - ( - mesh.Sf().boundaryField()[patchi] - *field.boundaryField()[patchi] - ); - Info<< " Integral of " << fieldName << " over patch " + Info<< " Integral of " << fieldName + << " over vector area of patch " << patchName << '[' << patchi << ']' << " = " - << sumField << nl; + << gSum + ( + mesh.Sf().boundaryField()[patchi] + *field.boundaryField()[patchi] + ) + << nl; + + Info<< " Integral of " << fieldName + << " over area magnitude of patch " + << patchName << '[' << patchi << ']' << " = " + << gSum + ( + mesh.magSf().boundaryField()[patchi] + *field.boundaryField()[patchi] + ) + << nl; } else if ( diff --git a/applications/utilities/postProcessing/velocityField/Co/Co.C b/applications/utilities/postProcessing/velocityField/Co/Co.C index 694172b72438b95227fcee8a7bd559b0dbdbe593..23d7b008a7d3dddd22b4f7f736975d71e7ec4c2a 100644 --- a/applications/utilities/postProcessing/velocityField/Co/Co.C +++ b/applications/utilities/postProcessing/velocityField/Co/Co.C @@ -86,7 +86,7 @@ namespace Foam void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) { - bool writeResults = !args.options().found("noWrite"); + bool writeResults = !args.optionFound("noWrite"); IOobject phiHeader ( diff --git a/applications/utilities/postProcessing/velocityField/Mach/Mach.C b/applications/utilities/postProcessing/velocityField/Mach/Mach.C index 02c69df34a07f8b44668dc2a69190ae62ad80101..daa4aa2ccf3d7aef33eef506761f46cb7c168a1c 100644 --- a/applications/utilities/postProcessing/velocityField/Mach/Mach.C +++ b/applications/utilities/postProcessing/velocityField/Mach/Mach.C @@ -38,7 +38,7 @@ Description // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) { - bool writeResults = !args.options().found("noWrite"); + bool writeResults = !args.optionFound("noWrite"); IOobject Uheader ( diff --git a/applications/utilities/postProcessing/velocityField/Pe/Pe.C b/applications/utilities/postProcessing/velocityField/Pe/Pe.C index 08c333481683ea08c9bf925db87300198f4bfe47..905074131d9f32b2d3d199dc8f12aae410343cb1 100644 --- a/applications/utilities/postProcessing/velocityField/Pe/Pe.C +++ b/applications/utilities/postProcessing/velocityField/Pe/Pe.C @@ -47,7 +47,7 @@ Description void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) { - bool writeResults = !args.options().found("noWrite"); + bool writeResults = !args.optionFound("noWrite"); IOobject phiHeader ( diff --git a/applications/utilities/postProcessing/velocityField/Q/Q.C b/applications/utilities/postProcessing/velocityField/Q/Q.C index e2338189546a1917c0bebb5a5b5679fd2c5746fd..34a09790d145896619e846f2e33d42bf379f9a00 100644 --- a/applications/utilities/postProcessing/velocityField/Q/Q.C +++ b/applications/utilities/postProcessing/velocityField/Q/Q.C @@ -39,7 +39,7 @@ Description void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) { - bool writeResults = !args.options().found("noWrite"); + bool writeResults = !args.optionFound("noWrite"); IOobject Uheader ( diff --git a/applications/utilities/postProcessing/velocityField/enstrophy/enstrophy.C b/applications/utilities/postProcessing/velocityField/enstrophy/enstrophy.C index 5d098240fdd72e50de54558a712b0f16564c7319..96ccb4b9079920f86d3b5b5304deb2aaff9af349 100644 --- a/applications/utilities/postProcessing/velocityField/enstrophy/enstrophy.C +++ b/applications/utilities/postProcessing/velocityField/enstrophy/enstrophy.C @@ -39,7 +39,7 @@ Description void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) { - bool writeResults = !args.options().found("noWrite"); + bool writeResults = !args.optionFound("noWrite"); IOobject Uheader ( diff --git a/applications/utilities/postProcessing/velocityField/uprime/uprime.C b/applications/utilities/postProcessing/velocityField/uprime/uprime.C index a546cab627bf7d2ba1d132961e1a3d4ef0ff3454..c1f7071f744d1cb2e8ba9260a257f50a5839e5e6 100644 --- a/applications/utilities/postProcessing/velocityField/uprime/uprime.C +++ b/applications/utilities/postProcessing/velocityField/uprime/uprime.C @@ -39,7 +39,7 @@ Description void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) { - bool writeResults = !args.options().found("noWrite"); + bool writeResults = !args.optionFound("noWrite"); IOobject kheader ( diff --git a/applications/utilities/postProcessing/velocityField/vorticity/vorticity.C b/applications/utilities/postProcessing/velocityField/vorticity/vorticity.C index e24a3b9e463b8e1e8afcaf6e63e8830796a7455a..3b4a85ca3e603927a8fed3b3257ce64b6d36ff07 100644 --- a/applications/utilities/postProcessing/velocityField/vorticity/vorticity.C +++ b/applications/utilities/postProcessing/velocityField/vorticity/vorticity.C @@ -39,7 +39,7 @@ Description void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) { - bool writeResults = !args.options().found("noWrite"); + bool writeResults = !args.optionFound("noWrite"); IOobject Uheader ( diff --git a/applications/utilities/postProcessing/wall/yPlusLES/Make/options b/applications/utilities/postProcessing/wall/yPlusLES/Make/options index 79fbbac91eff3fd29abdd775aa543a905a0c1162..f6131ce41c17a8d8d5b852fe0e1f07e1d62308f6 100644 --- a/applications/utilities/postProcessing/wall/yPlusLES/Make/options +++ b/applications/utilities/postProcessing/wall/yPlusLES/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/LES/LESModel \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ diff --git a/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C b/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C index 82ee27fa0ab6580cfcece3f9854718ded7abe196..67dc0df3f0e8c333fb2996255b047c34f8455f3c 100644 --- a/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C +++ b/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C @@ -34,6 +34,7 @@ Description #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" #include "LESModel.H" #include "nearWallDist.H" +#include "wallDist.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,7 +50,18 @@ int main(int argc, char *argv[]) { runTime.setTime(timeDirs[timeI], timeI); Info<< "Time = " << runTime.timeName() << endl; - mesh.readUpdate(); + fvMesh::readUpdateState state = mesh.readUpdate(); + + // Wall distance + if (timeI == 0 || state != fvMesh::UNCHANGED) + { + Info<< "Calculating wall distance\n" << endl; + wallDist y(mesh, true); + Info<< "Writing wall distance to field " + << y.name() << nl << endl; + y.write(); + } + volScalarField yPlus ( @@ -116,6 +128,9 @@ int main(int argc, char *argv[]) } } + Info<< "Writing yPlus to field " + << yPlus.name() << nl << endl; + yPlus.write(); } diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/Make/options b/applications/utilities/postProcessing/wall/yPlusRAS/Make/options index 89632547e0815e442b8f0082777fabb715fbc981..9ec5fca52baaa1f55b00483950ab4cf2ad1f9909 100644 --- a/applications/utilities/postProcessing/wall/yPlusRAS/Make/options +++ b/applications/utilities/postProcessing/wall/yPlusRAS/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C index 7d1e4796f2b5f75ae740b31169a522bbc9dfbd9d..a93712263e6aafbc375270c815609afc5aae904f 100644 --- a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C +++ b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C @@ -34,6 +34,7 @@ Description #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" #include "RASModel.H" #include "wallFvPatch.H" +#include "wallDist.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,7 +50,17 @@ int main(int argc, char *argv[]) { runTime.setTime(timeDirs[timeI], timeI); Info<< "Time = " << runTime.timeName() << endl; - mesh.readUpdate(); + fvMesh::readUpdateState state = mesh.readUpdate(); + + // Wall distance + if (timeI == 0 || state != fvMesh::UNCHANGED) + { + Info<< "Calculating wall distance\n" << endl; + wallDist y(mesh, true); + Info<< "Writing wall distance to field " + << y.name() << nl << endl; + y.write(); + } volScalarField yPlus ( @@ -106,6 +117,9 @@ int main(int argc, char *argv[]) } } + Info<< "Writing yPlus to field " + << yPlus.name() << nl << endl; + yPlus.write(); } diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C index dac7cd03934ada77c1c586b0320d5cdf4a301aaf..8aae7e124c965d5c0a0e249b6b1e70d0ba901bd4 100644 --- a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C +++ b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C @@ -76,16 +76,15 @@ int main(int argc, char *argv[]) // Set the mean boundary-layer thickness dimensionedScalar ybl("ybl", dimLength, 0); - if (args.options().found("ybl")) + if (args.optionFound("ybl")) { // If the boundary-layer thickness is provided use it - ybl.value() = readScalar(IStringStream(args.options()["ybl"])()); + ybl.value() = args.optionRead<scalar>("ybl"); } - else if (args.options().found("Cbl")) + else if (args.optionFound("Cbl")) { // Calculate boundary layer thickness as Cbl * mean distance to wall - ybl.value() = - gAverage(y)*readScalar(IStringStream(args.options()["Cbl"])()); + ybl.value() = gAverage(y) * args.optionRead<scalar>("Cbl"); } else { @@ -155,7 +154,7 @@ int main(int argc, char *argv[]) sqr(kappa*min(y, ybl))*::sqrt(2)*mag(dev(symm(fvc::grad(U)))) ); - if (args.options().found("writenut")) + if (args.optionFound("writenut")) { Info<< "Writing nut" << endl; nut.write(); diff --git a/applications/utilities/preProcessing/applyWallFunctionBounaryConditions/applyWallFunctionBounaryConditions.C b/applications/utilities/preProcessing/applyWallFunctionBounaryConditions/applyWallFunctionBounaryConditions.C index e571cc4373f42948202f6ff8fc42ea51895ce17a..1cdc3f28abe605beedac2880e0a5c9e2f5942b54 100644 --- a/applications/utilities/preProcessing/applyWallFunctionBounaryConditions/applyWallFunctionBounaryConditions.C +++ b/applications/utilities/preProcessing/applyWallFunctionBounaryConditions/applyWallFunctionBounaryConditions.C @@ -240,7 +240,7 @@ int main(int argc, char *argv[]) # include "createTime.H" # include "createMesh.H" - bool compressible = args.options().found("compressible"); + bool compressible = args.optionFound("compressible"); Info<< "Updating turbulence fields to operate using new run time " << "selectable" << nl << "wall functions" diff --git a/applications/utilities/preProcessing/foamUpgradeFvSolution/foamUpgradeFvSolution.C b/applications/utilities/preProcessing/foamUpgradeFvSolution/foamUpgradeFvSolution.C index 669d7186f2460f48ec7ef0812c84dfa5ff958a12..d2e7981c68394aec4edead2391aa80a4e21faa68 100644 --- a/applications/utilities/preProcessing/foamUpgradeFvSolution/foamUpgradeFvSolution.C +++ b/applications/utilities/preProcessing/foamUpgradeFvSolution/foamUpgradeFvSolution.C @@ -78,7 +78,7 @@ int main(int argc, char *argv[]) Info<< nChanged << " solver settings changed" << nl << endl; if (nChanged) { - if (args.options().found("test")) + if (args.optionFound("test")) { Info<< "-test option: no changes made" << nl << endl; } diff --git a/applications/utilities/preProcessing/mapFields/createTimes.H b/applications/utilities/preProcessing/mapFields/createTimes.H index b7c8a1fe3343ea9426217c41890bcdf7819f5f93..8367e595579842d813bbd2d15945ffc63d5c16d0 100644 --- a/applications/utilities/preProcessing/mapFields/createTimes.H +++ b/applications/utilities/preProcessing/mapFields/createTimes.H @@ -1,4 +1,4 @@ - Info<< nl << "Create databases as time" << endl; + Info << "\nCreate databases as time" << endl; Time runTimeSource ( diff --git a/applications/utilities/preProcessing/mapFields/mapFields.C b/applications/utilities/preProcessing/mapFields/mapFields.C index bd840ab267a26bf21e126bd3f130601f869d2e44..fde815d76faa06334770adb5c0a9857478ae4a0e 100644 --- a/applications/utilities/preProcessing/mapFields/mapFields.C +++ b/applications/utilities/preProcessing/mapFields/mapFields.C @@ -43,31 +43,6 @@ Description // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -int getTimeIndex -( - const instantList& times, - const scalar t -) -{ - int nearestIndex = -1; - scalar nearestDiff = Foam::GREAT; - - forAll(times, timeIndex) - { - if (times[timeIndex].name() == "constant") continue; - - scalar diff = fabs(times[timeIndex].value() - t); - if (diff < nearestDiff) - { - nearestDiff = diff; - nearestIndex = timeIndex; - } - } - - return nearestIndex; -} - - void mapConsistentMesh ( const fvMesh& meshSource, @@ -254,9 +229,7 @@ wordList addProcessorPatches int main(int argc, char *argv[]) { # include "setRoots.H" - # include "createTimes.H" - # include "setTimeIndex.H" runTimeSource.setTime(sourceTimes[sourceTimeIndex], sourceTimeIndex); @@ -357,7 +330,7 @@ int main(int argc, char *argv[]) } } } - else if(!parallelSource && parallelTarget) + else if (!parallelSource && parallelTarget) { IOdictionary decompositionDict ( @@ -426,7 +399,7 @@ int main(int argc, char *argv[]) } } } - else if(parallelSource && parallelTarget) + else if (parallelSource && parallelTarget) { IOdictionary decompositionDictSource ( diff --git a/applications/utilities/preProcessing/mapFields/setRoots.H b/applications/utilities/preProcessing/mapFields/setRoots.H index 5c4ca191700f9942eb6544ad1d6ac3e29db190be..6aceba234f46e8d0326a343feb91d04ea2765253 100644 --- a/applications/utilities/preProcessing/mapFields/setRoots.H +++ b/applications/utilities/preProcessing/mapFields/setRoots.H @@ -24,20 +24,7 @@ Info<< "Source: " << rootDirSource << " " << caseDirSource << nl << "Target: " << rootDirTarget << " " << caseDirTarget << endl; - bool parallelSource = false; - if (args.options().found("parallelSource")) - { - parallelSource = true; - } + bool parallelSource = args.optionFound("parallelSource"); + bool parallelTarget = args.optionFound("parallelTarget"); + bool consistent = args.optionFound("consistent"); - bool parallelTarget = false; - if (args.options().found("parallelTarget")) - { - parallelTarget = true; - } - - bool consistent = false; - if (args.options().found("consistent")) - { - consistent = true; - } diff --git a/applications/utilities/preProcessing/mapFields/setTimeIndex.H b/applications/utilities/preProcessing/mapFields/setTimeIndex.H index c5afed3e2fbc15c2ba54620b4325c95aa63dee6d..19efd9ff5b4bc80ebe49a0b941fe999daee6221d 100644 --- a/applications/utilities/preProcessing/mapFields/setTimeIndex.H +++ b/applications/utilities/preProcessing/mapFields/setTimeIndex.H @@ -1,20 +1,25 @@ instantList sourceTimes = runTimeSource.times(); label sourceTimeIndex = runTimeSource.timeIndex(); - if (args.options().found("sourceTime")) + if (args.optionFound("sourceTime")) { - if ((args.options()["sourceTime"]) == "latestTime") + if (args.option("sourceTime") == "latestTime") { sourceTimeIndex = sourceTimes.size() - 1; } else { - scalar sourceTime = - readScalar(IStringStream(args.options()["sourceTime"])()); - sourceTimeIndex = getTimeIndex(sourceTimes, sourceTime); + sourceTimeIndex = Time::findClosestTimeIndex + ( + sourceTimes, + args.optionRead<scalar>("sourceTime") + ); } } else { - scalar sourceTime = runTimeTarget.time().value(); - sourceTimeIndex = getTimeIndex(sourceTimes, sourceTime); + sourceTimeIndex = Time::findClosestTimeIndex + ( + sourceTimes, + runTimeTarget.time().value() + ); } diff --git a/applications/utilities/preProcessing/setFields/setFields.C b/applications/utilities/preProcessing/setFields/setFields.C index 085a1abe2d1ddec95a378b248add668a1fef410e..5ba3727b39bb794d2fdeff316abc67f30589bfeb 100644 --- a/applications/utilities/preProcessing/setFields/setFields.C +++ b/applications/utilities/preProcessing/setFields/setFields.C @@ -28,6 +28,7 @@ Description \*---------------------------------------------------------------------------*/ #include "argList.H" +#include "timeSelector.H" #include "Time.H" #include "fvMesh.H" #include "topoSetSource.H" @@ -174,19 +175,13 @@ public: int main(int argc, char *argv[]) { + timeSelector::addOptions(); -# include "addTimeOptions.H" # include "setRootCase.H" - # include "createTime.H" // Get times list - instantList Times = runTime.times(); - - // set startTime and endTime depending on -time and -latestTime options -# include "checkTimeOptions.H" - - runTime.setTime(Times[startTime], startTime); + instantList timeDirs = timeSelector::select0(runTime, args); # include "createMesh.H" @@ -220,11 +215,11 @@ int main(int argc, char *argv[]) PtrList<entry> regions(setFieldsDict.lookup("regions")); - forAll(regions, regioni) + forAll(regions, regionI) { - const entry& region = regions[regioni]; + const entry& region = regions[regionI]; - autoPtr<topoSetSource> cellSelector = + autoPtr<topoSetSource> cellSelector = topoSetSource::New(region.keyword(), mesh, region.dict()); cellSet selectedCellSet @@ -247,7 +242,7 @@ int main(int argc, char *argv[]) ); } - Info << nl << "End" << endl; + Info<< "\nEnd" << endl; return 0; } diff --git a/applications/utilities/surface/surfaceAdd/surfaceAdd.C b/applications/utilities/surface/surfaceAdd/surfaceAdd.C index bbff3715c7c8d3e64be96a0318097734dd3af075..6441486cd129b0339145acde979b4b7b9db07452 100644 --- a/applications/utilities/surface/surfaceAdd/surfaceAdd.C +++ b/applications/utilities/surface/surfaceAdd/surfaceAdd.C @@ -59,8 +59,8 @@ int main(int argc, char *argv[]) fileName inFileName2(args.additionalArgs()[1]); fileName outFileName(args.additionalArgs()[2]); - bool addPoint = args.options().found("points"); - bool mergeRegions = args.options().found("mergeRegions"); + bool addPoint = args.optionFound("points"); + bool mergeRegions = args.optionFound("mergeRegions"); if (addPoint) { @@ -69,7 +69,7 @@ int main(int argc, char *argv[]) << nl << endl; Info<< "Surface : " << inFileName1<< nl - << "Points : " << args.options()["points"] << nl + << "Points : " << args.option("points") << nl << "Writing : " << outFileName << nl << endl; } else @@ -111,8 +111,8 @@ int main(int argc, char *argv[]) if (addPoint) { - IFstream pointStr(args.options()["points"]); - pointField extraPoints(pointStr); + IFstream pointsFile(args.option("points")); + pointField extraPoints(pointsFile); Info<< "Additional Points:" << extraPoints.size() << endl; @@ -252,7 +252,7 @@ int main(int argc, char *argv[]) newPatches[newPatchI++] = surface2.patches()[ patchI]; } } - + Info<< "New patches:" << nl; forAll(newPatches, patchI) diff --git a/applications/utilities/surface/surfaceCheck/surfaceCheck.C b/applications/utilities/surface/surfaceCheck/surfaceCheck.C index d714c19ec36e5bc5be435b9ac3a02349274954f2..d283ec66afc37ba554e37ddcb6d84df7dc5ce105 100644 --- a/applications/utilities/surface/surfaceCheck/surfaceCheck.C +++ b/applications/utilities/surface/surfaceCheck/surfaceCheck.C @@ -176,8 +176,8 @@ int main(int argc, char *argv[]) argList::validOptions.insert("verbose", ""); argList args(argc, argv); - bool checkSelfIntersection = args.options().found("checkSelfIntersection"); - bool verbose = args.options().found("verbose"); + bool checkSelfIntersection = args.optionFound("checkSelfIntersection"); + bool verbose = args.optionFound("verbose"); fileName surfFileName(args.additionalArgs()[0]); Pout<< "Reading surface from " << surfFileName << " ..." << nl << endl; diff --git a/applications/utilities/surface/surfaceConvert/surfaceConvert.C b/applications/utilities/surface/surfaceConvert/surfaceConvert.C index fd7b223827334261083e944fb9d559be218c4106..f7df57d1e1844037d6fab413aeda49715c8395fe 100644 --- a/applications/utilities/surface/surfaceConvert/surfaceConvert.C +++ b/applications/utilities/surface/surfaceConvert/surfaceConvert.C @@ -70,12 +70,6 @@ int main(int argc, char *argv[]) argList args(argc, argv); const stringList& params = args.additionalArgs(); - scalar scaleFactor = 0; - if (args.options().found("scale")) - { - IStringStream(args.options()["scale"])() >> scaleFactor; - } - fileName importName(params[0]); fileName exportName(params[1]); @@ -93,7 +87,7 @@ int main(int argc, char *argv[]) surf.writeStats(Info); Info<< endl; - if (args.options().found("clean")) + if (args.optionFound("clean")) { Info<< "Cleaning up surface" << endl; surf.cleanup(true); @@ -103,7 +97,7 @@ int main(int argc, char *argv[]) Info<< endl; } - bool sortByRegion = args.options().found("group"); + bool sortByRegion = args.optionFound("group"); if (sortByRegion) { @@ -115,7 +109,9 @@ int main(int argc, char *argv[]) } Info<< "writing " << exportName; - if (scaleFactor > 0) + + scalar scaleFactor = 0; + if (args.optionReadIfPresent("scale", scaleFactor) && scaleFactor > 0) { Info<< " with scaling " << scaleFactor; surf.scalePoints(scaleFactor); diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C index 8907ac46dbef278d7f02caa80e22bc46dbed87a2..c3a7e5a26dd827dbc21484aefb1c6d7e42dff4e0 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C +++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C @@ -110,7 +110,7 @@ int main(int argc, char *argv[]) argList::validOptions.insert("deleteBox", "((x0 y0 z0)(x1 y1 z1))"); argList args(argc, argv); - Pout<< "Feature line extraction is only valid on closed manifold surfaces." + Pout<< "Feature line extraction is only valid on closed manifold surfaces." << endl; @@ -139,27 +139,24 @@ int main(int argc, char *argv[]) surfaceFeatures set(surf); - if (args.options().found("set")) + if (args.optionFound("set")) { - fileName setName(args.options()["set"]); + fileName setName(args.option("set")); Pout<< "Reading existing feature set from file " << setName << endl; set = surfaceFeatures(surf, setName); } - else if (args.options().found("includedAngle")) + else if (args.optionFound("includedAngle")) { - scalar includedAngle - ( - readScalar(IStringStream(args.options()["includedAngle"])()) - ); + scalar includedAngle = args.optionRead<scalar>("includedAngle"); Pout<< "Constructing feature set from included angle " << includedAngle << endl; set = surfaceFeatures(surf, includedAngle); - Pout<< endl << "Writing initial features" << endl; + Pout<< endl << "Writing initial features" << endl; set.write("initial.fSet"); set.writeObj("initial"); } @@ -190,16 +187,14 @@ int main(int argc, char *argv[]) // ~~~~~~~~ scalar minLen = -GREAT; - if (args.options().found("minLen")) + if (args.optionReadIfPresent("minLen", minLen)) { - minLen = readScalar(IStringStream(args.options()["minLen"])()); Pout<< "Removing features of length < " << minLen << endl; } - + label minElem = 0; - if (args.options().found("minElem")) + if (args.optionReadIfPresent("minElem", minElem)) { - minElem = readLabel(IStringStream(args.options()["minElem"])()); Pout<< "Removing features with number of edges < " << minElem << endl; } @@ -207,7 +202,7 @@ int main(int argc, char *argv[]) if (minLen > 0 || minLen > 0) { set.trimFeatures(minLen, minElem); - Pout<< endl << "Removed small features" << endl; + Pout<< endl << "Removed small features" << endl; } @@ -218,9 +213,9 @@ int main(int argc, char *argv[]) // Convert to marked edges, points List<surfaceFeatures::edgeStatus> edgeStat(set.toStatus()); - if (args.options().found("subsetBox")) + if (args.optionFound("subsetBox")) { - treeBoundBox bb(IStringStream(args.options()["subsetBox"])()); + treeBoundBox bb(args.optionLookup("subsetBox")()); Pout<< "Removing all edges outside bb " << bb << endl; dumpBox(bb, "subsetBox.obj"); @@ -233,9 +228,9 @@ int main(int argc, char *argv[]) edgeStat ); } - else if (args.options().found("deleteBox")) + else if (args.optionFound("deleteBox")) { - treeBoundBox bb(IStringStream(args.options()["deleteBox"])()); + treeBoundBox bb(args.optionLookup("deleteBox")()); Pout<< "Removing all edges inside bb " << bb << endl; dumpBox(bb, "deleteBox.obj"); @@ -254,7 +249,7 @@ int main(int argc, char *argv[]) Pout<< endl << "Writing trimmed features to " << outFileName << endl; newSet.write(outFileName); - + Pout<< endl << "Writing edge objs." << endl; newSet.writeObj("final"); diff --git a/applications/utilities/surface/surfaceFind/surfaceFind.C b/applications/utilities/surface/surfaceFind/surfaceFind.C index e162c179b69548021f5641a45ea0cbfb3c5de3a3..13d769fd1a7795b25c10fab05b888abc923b1e73 100644 --- a/applications/utilities/surface/surfaceFind/surfaceFind.C +++ b/applications/utilities/surface/surfaceFind/surfaceFind.C @@ -52,10 +52,12 @@ int main(int argc, char *argv[]) argList args(argc, argv); - scalar x(readScalar(IStringStream(args.options()["x"])())); - scalar y(readScalar(IStringStream(args.options()["y"])())); - scalar z(readScalar(IStringStream(args.options()["z"])())); - point samplePt(x, y, z); + point samplePt + ( + args.optionRead<scalar>("x"), + args.optionRead<scalar>("y"), + args.optionRead<scalar>("z") + ); Info<< "Looking for nearest face/vertex to " << samplePt << endl; diff --git a/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C b/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C index 4f607e89fb15b477ddc6238805068db482c5d80a..6e730cc60ab3ef201ca86de13f11c4400513f925 100644 --- a/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C +++ b/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C @@ -110,13 +110,13 @@ int main(int argc, char *argv[]) autoPtr<coordinateSystem> fromCsys; autoPtr<coordinateSystem> toCsys; - if (args.options().found("from") || args.options().found("to")) + if (args.optionFound("from") || args.optionFound("to")) { autoPtr<IOobject> csDictIoPtr; - if (args.options().found("dict")) + if (args.optionFound("dict")) { - fileName dictPath(args.options()["dict"]); + fileName dictPath(args.option("dict")); csDictIoPtr.set ( @@ -161,9 +161,9 @@ int main(int argc, char *argv[]) coordinateSystems csLst(csDictIoPtr()); - if (args.options().found("from")) + if (args.optionFound("from")) { - const word csName(args.options()["from"]); + const word csName(args.option("from")); label csId = csLst.find(csName); if (csId < 0) @@ -177,9 +177,9 @@ int main(int argc, char *argv[]) fromCsys.reset(new coordinateSystem(csLst[csId])); } - if (args.options().found("to")) + if (args.optionFound("to")) { - const word csName(args.options()["to"]); + const word csName(args.option("to")); label csId = csLst.find(csName); if (csId < 0) @@ -203,32 +203,23 @@ int main(int argc, char *argv[]) } } - scalar scaleIn = 0; - scalar scaleOut = 0; - if (args.options().found("scaleIn")) - { - IStringStream(args.options()["scaleIn"])() >> scaleIn; - } - if (args.options().found("scaleOut")) - { - IStringStream(args.options()["scaleOut"])() >> scaleOut; - } - { MeshedSurface<face> surf(importName); - if (args.options().found("clean")) + if (args.optionFound("clean")) { surf.cleanup(true); } - if (scaleIn > 0) + scalar scaleIn = 0; + if (args.optionReadIfPresent("scaleIn", scaleIn) && scaleIn > 0) { Info<< " -scaleIn " << scaleIn << endl; surf.scalePoints(scaleIn); } + if (fromCsys.valid()) { Info<< " -from " << fromCsys().name() << endl; @@ -243,7 +234,8 @@ int main(int argc, char *argv[]) surf.movePoints(tpf()); } - if (scaleOut > 0) + scalar scaleOut = 0; + if (args.optionReadIfPresent("scaleOut", scaleOut) && scaleOut > 0) { Info<< " -scaleOut " << scaleOut << endl; surf.scalePoints(scaleOut); diff --git a/applications/utilities/surface/surfaceMeshConvertTesting/surfaceMeshConvertTesting.C b/applications/utilities/surface/surfaceMeshConvertTesting/surfaceMeshConvertTesting.C index f245e4088bcb300b122f19e5ec5a6ddf2ceb97d9..e53a8616d824e3ad1d61a6542f8a35fcb7c940e1 100644 --- a/applications/utilities/surface/surfaceMeshConvertTesting/surfaceMeshConvertTesting.C +++ b/applications/utilities/surface/surfaceMeshConvertTesting/surfaceMeshConvertTesting.C @@ -86,10 +86,7 @@ int main(int argc, char *argv[]) const stringList& params = args.additionalArgs(); scalar scaleFactor = 0; - if (args.options().found("scale")) - { - IStringStream(args.options()["scale"])() >> scaleFactor; - } + args.optionReadIfPresent("scale", scaleFactor); fileName importName(params[0]); fileName exportName(params[1]); @@ -110,7 +107,7 @@ int main(int argc, char *argv[]) return 1; } - if (args.options().found("triSurface")) + if (args.optionFound("triSurface")) { triSurface surf(importName); @@ -118,14 +115,14 @@ int main(int argc, char *argv[]) surf.writeStats(Info); Info<< endl; - if (args.options().found("orient")) + if (args.optionFound("orient")) { Info<< "Checking surface orientation" << endl; PatchTools::checkOrientation(surf, true); Info<< endl; } - if (args.options().found("clean")) + if (args.optionFound("clean")) { Info<< "Cleaning up surface" << endl; surf.cleanup(true); @@ -149,7 +146,7 @@ int main(int argc, char *argv[]) // write sorted by region surf.write(exportName, true); } - else if (args.options().found("unsorted")) + else if (args.optionFound("unsorted")) { UnsortedMeshedSurface<face> surf(importName); @@ -157,14 +154,14 @@ int main(int argc, char *argv[]) surf.writeStats(Info); Info<< endl; - if (args.options().found("orient")) + if (args.optionFound("orient")) { Info<< "Checking surface orientation" << endl; PatchTools::checkOrientation(surf, true); Info<< endl; } - if (args.options().found("clean")) + if (args.optionFound("clean")) { Info<< "Cleaning up surface" << endl; surf.cleanup(true); @@ -187,7 +184,7 @@ int main(int argc, char *argv[]) surf.write(exportName); } #if 1 - else if (args.options().found("triFace")) + else if (args.optionFound("triFace")) { MeshedSurface<triFace> surf(importName); @@ -195,14 +192,14 @@ int main(int argc, char *argv[]) surf.writeStats(Info); Info<< endl; - if (args.options().found("orient")) + if (args.optionFound("orient")) { Info<< "Checking surface orientation" << endl; PatchTools::checkOrientation(surf, true); Info<< endl; } - if (args.options().found("clean")) + if (args.optionFound("clean")) { Info<< "Cleaning up surface" << endl; surf.cleanup(true); @@ -233,14 +230,14 @@ int main(int argc, char *argv[]) surf.writeStats(Info); Info<< endl; - if (args.options().found("orient")) + if (args.optionFound("orient")) { Info<< "Checking surface orientation" << endl; PatchTools::checkOrientation(surf, true); Info<< endl; } - if (args.options().found("clean")) + if (args.optionFound("clean")) { Info<< "Cleaning up surface" << endl; surf.cleanup(true); @@ -263,7 +260,7 @@ int main(int argc, char *argv[]) } surf.write(exportName); - if (args.options().found("surfMesh")) + if (args.optionFound("surfMesh")) { Foam::Time runTime ( diff --git a/applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C b/applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C index 34d93c93ebecb6e0f51f905366c33342b365fde4..b6538d0bc17900e50a8cf57635b7078aecd04b3a 100644 --- a/applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C +++ b/applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C @@ -89,6 +89,7 @@ int main(int argc, char *argv[]) fileName exportName(params[0]); word importName("default"); + args.optionReadIfPresent("name", importName); // check that writing is supported if (!MeshedSurface<face>::canWriteType(exportName.ext(), true)) @@ -96,23 +97,18 @@ int main(int argc, char *argv[]) return 1; } - if (args.options().found("name")) - { - importName = args.options()["name"]; - } - // get the coordinate transformations autoPtr<coordinateSystem> fromCsys; autoPtr<coordinateSystem> toCsys; - if (args.options().found("from") || args.options().found("to")) + if (args.optionFound("from") || args.optionFound("to")) { autoPtr<IOobject> ioPtr; - if (args.options().found("dict")) + if (args.optionFound("dict")) { - fileName dictPath(args.options()["dict"]); + fileName dictPath(args.option("dict")); ioPtr.set ( @@ -157,9 +153,9 @@ int main(int argc, char *argv[]) coordinateSystems csLst(ioPtr()); - if (args.options().found("from")) + if (args.optionFound("from")) { - const word csName(args.options()["from"]); + const word csName(args.option("from")); label csId = csLst.find(csName); if (csId < 0) @@ -173,9 +169,9 @@ int main(int argc, char *argv[]) fromCsys.reset(new coordinateSystem(csLst[csId])); } - if (args.options().found("to")) + if (args.optionFound("to")) { - const word csName(args.options()["to"]); + const word csName(args.option("to")); label csId = csLst.find(csName); if (csId < 0) @@ -219,24 +215,13 @@ int main(int argc, char *argv[]) MeshedSurface<face> surf(smesh); - if (args.options().found("clean")) + if (args.optionFound("clean")) { surf.cleanup(true); } scalar scaleIn = 0; - scalar scaleOut = 0; - if (args.options().found("scaleIn")) - { - IStringStream(args.options()["scaleIn"])() >> scaleIn; - } - if (args.options().found("scaleOut")) - { - IStringStream(args.options()["scaleOut"])() >> scaleOut; - } - - - if (scaleIn > 0) + if (args.optionReadIfPresent("scaleIn", scaleIn) && scaleIn > 0) { Info<< " -scaleIn " << scaleIn << endl; surf.scalePoints(scaleIn); @@ -256,7 +241,8 @@ int main(int argc, char *argv[]) surf.movePoints(tpf()); } - if (scaleOut > 0) + scalar scaleOut = 0; + if (args.optionReadIfPresent("scaleOut", scaleOut) && scaleOut > 0) { Info<< " -scaleOut " << scaleOut << endl; surf.scalePoints(scaleOut); diff --git a/applications/utilities/surface/surfaceMeshImport/surfaceMeshImport.C b/applications/utilities/surface/surfaceMeshImport/surfaceMeshImport.C index 0cb131e4ebefded7fb56483c137ed23f55b3fc86..808eefcd76c0104f5243fe99bc398cf4e2f7023d 100644 --- a/applications/utilities/surface/surfaceMeshImport/surfaceMeshImport.C +++ b/applications/utilities/surface/surfaceMeshImport/surfaceMeshImport.C @@ -103,6 +103,7 @@ int main(int argc, char *argv[]) fileName importName(params[0]); word exportName("default"); + args.optionReadIfPresent("name", exportName); // check that reading is supported if (!MeshedSurface<face>::canRead(importName, true)) @@ -110,23 +111,18 @@ int main(int argc, char *argv[]) return 1; } - if (args.options().found("name")) - { - exportName = args.options()["name"]; - } - // get the coordinate transformations autoPtr<coordinateSystem> fromCsys; autoPtr<coordinateSystem> toCsys; - if (args.options().found("from") || args.options().found("to")) + if (args.optionFound("from") || args.optionFound("to")) { autoPtr<IOobject> ioPtr; - if (args.options().found("dict")) + if (args.optionFound("dict")) { - fileName dictPath(args.options()["dict"]); + fileName dictPath(args.option("dict")); ioPtr.set ( @@ -171,9 +167,9 @@ int main(int argc, char *argv[]) coordinateSystems csLst(ioPtr()); - if (args.options().found("from")) + if (args.optionFound("from")) { - const word csName(args.options()["from"]); + const word csName(args.option("from")); label csId = csLst.find(csName); if (csId < 0) @@ -187,9 +183,9 @@ int main(int argc, char *argv[]) fromCsys.reset(new coordinateSystem(csLst[csId])); } - if (args.options().found("to")) + if (args.optionFound("to")) { - const word csName(args.options()["to"]); + const word csName(args.option("to")); label csId = csLst.find(csName); if (csId < 0) @@ -217,25 +213,14 @@ int main(int argc, char *argv[]) MeshedSurface<face> surf(importName); - if (args.options().found("clean")) + if (args.optionFound("clean")) { surf.cleanup(true); } scalar scaleIn = 0; - scalar scaleOut = 0; - if (args.options().found("scaleIn")) - { - IStringStream(args.options()["scaleIn"])() >> scaleIn; - } - if (args.options().found("scaleOut")) - { - IStringStream(args.options()["scaleOut"])() >> scaleOut; - } - - - if (scaleIn > 0) + if (args.optionReadIfPresent("scaleIn", scaleIn) && scaleIn > 0) { Info<< " -scaleIn " << scaleIn << endl; surf.scalePoints(scaleIn); @@ -255,7 +240,8 @@ int main(int argc, char *argv[]) surf.movePoints(tpf()); } - if (scaleOut > 0) + scalar scaleOut = 0; + if (args.optionReadIfPresent("scaleOut", scaleOut) && scaleOut > 0) { Info<< " -scaleOut " << scaleOut << endl; surf.scalePoints(scaleOut); diff --git a/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C b/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C index a57f7c9d48de064208d21658246fc6fd80c253f1..3ea9e07a82e02f278f2d70275014151d50796a1f 100644 --- a/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C +++ b/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C @@ -69,7 +69,7 @@ int main(int argc, char *argv[]) bool includeProcPatches = !( - args.options().found("excludeProcPatches") + args.optionFound("excludeProcPatches") || Pstream::parRun() ); @@ -78,15 +78,15 @@ int main(int argc, char *argv[]) // - all patches (default in sequential mode) // - all non-processor patches (default in parallel mode) // - all non-processor patches (sequential mode, -excludeProcPatches option) - + // Construct table of patches to include. const polyBoundaryMesh& bMesh = mesh.boundaryMesh(); labelHashSet includePatches(bMesh.size()); - if (args.options().found("patches")) + if (args.optionFound("patches")) { - wordList patchNames(IStringStream(args.options()["patches"])()); + wordList patchNames(args.optionLookup("patches")()); forAll(patchNames, patchNameI) { diff --git a/applications/utilities/surface/surfaceOrient/surfaceOrient.C b/applications/utilities/surface/surfaceOrient/surfaceOrient.C index 720b858a211fc3b17e574b679ed5ef296d686840..1b728711cdce6ff1c052009698d5a5c3e19cad83 100644 --- a/applications/utilities/surface/surfaceOrient/surfaceOrient.C +++ b/applications/utilities/surface/surfaceOrient/surfaceOrient.C @@ -54,7 +54,7 @@ int main(int argc, char *argv[]) point visiblePoint(IStringStream(args.additionalArgs()[1])()); Info<< "Visible point " << visiblePoint << endl; - bool orientInside = args.options().found("inside"); + bool orientInside = args.optionFound("inside"); if (orientInside) { diff --git a/applications/utilities/surface/surfaceRedistributePar/Make/files b/applications/utilities/surface/surfaceRedistributePar/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..4825ff735d6d625bfcb39fae4fb9c7a13bda5742 --- /dev/null +++ b/applications/utilities/surface/surfaceRedistributePar/Make/files @@ -0,0 +1,3 @@ +surfaceRedistributePar.C + +EXE = $(FOAM_APPBIN)/surfaceRedistributePar diff --git a/applications/utilities/surface/surfaceRedistributePar/Make/options b/applications/utilities/surface/surfaceRedistributePar/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..2db41f545a2fde53b3cf2d357bc790d25f6fbed5 --- /dev/null +++ b/applications/utilities/surface/surfaceRedistributePar/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/triSurface/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude + +EXE_LIBS = \ + -lmeshTools \ + -ltriSurface diff --git a/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C b/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C new file mode 100644 index 0000000000000000000000000000000000000000..cdb041ce350d19b6f79e893bd114d014f32e4e09 --- /dev/null +++ b/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C @@ -0,0 +1,295 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +Application + surfaceRedistributePar + +Description + (Re)distribution of triSurface. Either takes an undecomposed surface + or an already decomposed surface and redistribute it so each processor + has all triangles that overlap its mesh. + +Note + - best decomposition option is hierarchGeomDecomp since + guarantees square decompositions. + - triangles might be present on multiple processors. + - merging uses geometric tolerance so take care with writing precision. + +\*---------------------------------------------------------------------------*/ + +#include "treeBoundBox.H" +#include "FixedList.H" +#include "argList.H" +#include "Time.H" +#include "polyMesh.H" +#include "distributedTriSurfaceMesh.H" +#include "mapDistribute.H" +#include "triSurfaceFields.H" +#include "Pair.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Print on master all the per-processor surface stats. +void writeProcStats +( + const triSurface& s, + const List<List<treeBoundBox> >& meshBb +) +{ + // Determine surface bounding boxes, faces, points + List<treeBoundBox> surfBb(Pstream::nProcs()); + { + surfBb[Pstream::myProcNo()] = boundBox(s.points(), false); + Pstream::gatherList(surfBb); + Pstream::scatterList(surfBb); + } + + labelList nPoints(Pstream::nProcs()); + nPoints[Pstream::myProcNo()] = s.points().size(); + Pstream::gatherList(nPoints); + Pstream::scatterList(nPoints); + + labelList nFaces(Pstream::nProcs()); + nFaces[Pstream::myProcNo()] = s.size(); + Pstream::gatherList(nFaces); + Pstream::scatterList(nFaces); + + forAll(surfBb, procI) + { + const List<treeBoundBox>& bbs = meshBb[procI]; + + Info<< "processor" << procI << endl + << "\tMesh bounds : " << bbs[0] << nl; + for (label i = 1; i < bbs.size(); i++) + { + Info<< "\t " << bbs[i]<< nl; + } + Info<< "\tSurface bounding box : " << surfBb[procI] << nl + << "\tTriangles : " << nFaces[procI] << nl + << "\tVertices : " << nPoints[procI] + << endl; + } + Info<< endl; +} + + +// Main program: + +int main(int argc, char *argv[]) +{ + argList::validArgs.append("triSurfaceMesh"); + argList::validArgs.append("distributionType"); + + argList::validOptions.insert("keepNonMapped", ""); +# include "setRootCase.H" +# include "createTime.H" + runTime.functionObjects().off(); + + fileName surfFileName(args.additionalArgs()[0]); + Info<< "Reading surface from " << surfFileName << nl << endl; + + const word distType(args.additionalArgs()[1]); + + Info<< "Using distribution method " + << distributedTriSurfaceMesh::distributionTypeNames_[distType] + << " " << distType << nl << endl; + + bool keepNonMapped = args.options().found("keepNonMapped"); + + if (keepNonMapped) + { + Info<< "Preserving surface outside of mesh bounds." << nl << endl; + } + else + { + Info<< "Removing surface outside of mesh bounds." << nl << endl; + } + + + if (!Pstream::parRun()) + { + FatalErrorIn(args.executable()) + << "Please run this program on the decomposed case." + << " It will read surface " << surfFileName + << " and decompose it such that it overlaps the mesh bounding box." + << exit(FatalError); + } + + +# include "createPolyMesh.H" + + Random rndGen(653213); + + // Determine mesh bounding boxes: + List<List<treeBoundBox> > meshBb(Pstream::nProcs()); + { + meshBb[Pstream::myProcNo()] = List<treeBoundBox> + ( + 1, + treeBoundBox + ( + boundBox(mesh.points(), false) + ).extend(rndGen, 1E-3) + ); + Pstream::gatherList(meshBb); + Pstream::scatterList(meshBb); + } + + IOobject io + ( + surfFileName, // name + //runTime.findInstance("triSurface", surfFileName), // instance + runTime.constant(), // instance + "triSurface", // local + runTime, // registry + IOobject::MUST_READ, + IOobject::NO_WRITE + ); + + const fileName actualPath(io.filePath()); + fileName localPath(actualPath); + localPath.replace(runTime.rootPath() + '/', ""); + + if (actualPath == io.objectPath()) + { + Info<< "Loading local (decomposed) surface " << localPath << nl <<endl; + } + else + { + Info<< "Loading undecomposed surface " << localPath << nl << endl; + } + + + // Create dummy dictionary for bounding boxes if does not exist. + if (!isFile(actualPath / "Dict")) + { + dictionary dict; + dict.add("bounds", meshBb[Pstream::myProcNo()]); + dict.add("distributionType", distType); + dict.add("mergeDistance", SMALL); + + IOdictionary ioDict + ( + IOobject + ( + io.name() + "Dict", + io.instance(), + io.local(), + io.db(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + dict + ); + + Info<< "Writing dummy bounds dictionary to " << ioDict.name() + << nl << endl; + + ioDict.regIOobject::writeObject + ( + IOstream::ASCII, + IOstream::currentVersion, + ioDict.time().writeCompression() + ); + } + + + // Load surface + distributedTriSurfaceMesh surfMesh(io); + Info<< "Loaded surface" << nl << endl; + + + // Generate a test field + { + const triSurface& s = static_cast<const triSurface&>(surfMesh); + + autoPtr<triSurfaceVectorField> fcPtr + ( + new triSurfaceVectorField + ( + IOobject + ( + surfMesh.searchableSurface::name(), // name + surfMesh.searchableSurface::instance(), // instance + surfMesh.searchableSurface::local(), // local + surfMesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + surfMesh, + dimLength + ) + ); + triSurfaceVectorField& fc = fcPtr(); + + forAll(fc, triI) + { + fc[triI] = s[triI].centre(s.points()); + } + + // Steal pointer and store object on surfMesh + fcPtr.ptr()->store(); + } + + + // Write per-processor stats + Info<< "Before redistribution:" << endl; + writeProcStats(surfMesh, meshBb); + + + // Do redistribution + Info<< "Redistributing surface" << nl << endl; + autoPtr<mapDistribute> faceMap; + autoPtr<mapDistribute> pointMap; + surfMesh.distribute + ( + meshBb[Pstream::myProcNo()], + keepNonMapped, + faceMap, + pointMap + ); + faceMap.clear(); + pointMap.clear(); + + Info<< endl; + + + // Write per-processor stats + Info<< "After redistribution:" << endl; + writeProcStats(surfMesh, meshBb); + + + Info<< "Writing surface." << nl << endl; + surfMesh.searchableSurface::write(); + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C b/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C index b56c8e2cf0c8f0be83f9bbf079d967e5d07f7cf2..8608fe33af6a6c8291bf8fbf06264b809b3049be 100644 --- a/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C +++ b/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C @@ -692,7 +692,7 @@ int main(int argc, char *argv[]) fileName inSurfName(args.additionalArgs()[0]); fileName outSurfName(args.additionalArgs()[1]); - bool debug = args.options().found("debug"); + bool debug = args.optionFound("debug"); Info<< "Reading surface from " << inSurfName << endl; diff --git a/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C b/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C index baf64f35555ffd0d8d75e906e2d38bb10aca233f..87ce69ddf77b49e8b52ede588d7918f4f83fd07d 100644 --- a/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C +++ b/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C @@ -177,12 +177,12 @@ int main(int argc, char *argv[]) Info<< "Reading surface from " << surfName << " ..." << endl; - bool readSet = args.options().found("faceSet"); + bool readSet = args.optionFound("faceSet"); word setName; if (readSet) { - setName = args.options()["faceSet"]; + setName = args.option("faceSet"); Info<< "Repatching only the faces in faceSet " << setName << " according to nearest surface triangle ..." << endl; @@ -194,11 +194,7 @@ int main(int argc, char *argv[]) } scalar searchTol = 1E-3; - - if (args.options().found("tol")) - { - searchTol = readScalar(IStringStream(args.options()["tol"])()); - } + args.optionReadIfPresent("tol", searchTol); // Get search box. Anything not within this box will not be considered. const boundBox& meshBb = mesh.globalData().bb(); diff --git a/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C b/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C index 1d4597515d818d59f46eee4da17abee34d1ee34e..c3243b71ae82f02347fa25c4a98cae57b8626705 100644 --- a/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C +++ b/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C @@ -86,18 +86,18 @@ int main(int argc, char *argv[]) pointField points(surf1.points()); - if (args.options().found("translate")) + if (args.optionFound("translate")) { - vector transVector(IStringStream(args.options()["translate"])()); + vector transVector(args.optionLookup("translate")()); Info<< "Translating points by " << transVector << endl; points += transVector; } - if (args.options().found("rotate")) + if (args.optionFound("rotate")) { - Pair<vector> n1n2(IStringStream(args.options()["rotate"])()); + Pair<vector> n1n2(args.optionLookup("rotate")()); n1n2[0] /= mag(n1n2[0]); n1n2[1] /= mag(n1n2[1]); @@ -107,9 +107,9 @@ int main(int argc, char *argv[]) points = transform(T, points); } - else if (args.options().found("rollPitchYaw")) + else if (args.optionFound("rollPitchYaw")) { - vector v(IStringStream(args.options()["rollPitchYaw"])()); + vector v(args.optionLookup("rollPitchYaw")()); Info<< "Rotating points by" << nl << " roll " << v.x() << nl @@ -125,9 +125,9 @@ int main(int argc, char *argv[]) Info<< "Rotating points by quaternion " << R << endl; points = transform(R, points); } - else if (args.options().found("yawPitchRoll")) + else if (args.optionFound("yawPitchRoll")) { - vector v(IStringStream(args.options()["yawPitchRoll"])()); + vector v(args.optionLookup("yawPitchRoll")()); Info<< "Rotating points by" << nl << " yaw " << v.x() << nl @@ -150,9 +150,9 @@ int main(int argc, char *argv[]) points = transform(R, points); } - if (args.options().found("scale")) + if (args.optionFound("scale")) { - vector scaleVector(IStringStream(args.options()["scale"])()); + vector scaleVector(args.optionLookup("scale")()); Info<< "Scaling points by " << scaleVector << endl; diff --git a/bin/buildParaView3.5-cvs b/bin/buildParaView similarity index 69% rename from bin/buildParaView3.5-cvs rename to bin/buildParaView index f12a158973f9ac6c4191f515e333787a8cf64488..cceee964873f6d4b2f2ed29875bb861da9ea38ba 100755 --- a/bin/buildParaView3.5-cvs +++ b/bin/buildParaView @@ -24,38 +24,43 @@ # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # Script -# buildParaView3.5-cvs +# buildParaView # # Description -# Build and install ParaView -# - run from folder above ParaView source folder or place the -# ParaView source under $WM_THIRD_PARTY_DIR +# Build and install paraview +# - run from folder above paraview source folder or place the +# paraview source under $WM_THIRD_PARTY_DIR # #------------------------------------------------------------------------------ . $WM_PROJECT_DIR/bin/tools/buildParaViewFunctions -PARAVIEW_SRC=paraview-3.5-cvs -PARAVIEW_MAJOR_VERSION=3.5 - # User options: # ~~~~~~~~~~~~~ # MPI support: -WITH_MPI=OFF +withMPI=false MPI_MAX_PROCS=32 # Python support: # note: script will try to determine the appropriate python library. # If it fails, specify the path using the PYTHON_LIBRARY variable -WITH_PYTHON=OFF +withPYTHON=false PYTHON_LIBRARY="" -# PYTHON_LIBRARY="/usr/lib64/libpython2.5.so.1.0" +# PYTHON_LIBRARY="/usr/lib64/libpython2.6.so.1.0" # MESA graphics support: -WITH_MESA=OFF -MESA_INCLUDE_DIR="/usr/include/GL" +withMESA=false +MESA_INCLUDE="/usr/include/GL" MESA_LIBRARY="/usr/lib64/libOSMesa.so" +# extra QT gui support (useful for re-using the installation for engrid) +withQTSUPPORT=true + +# Set the path to the Qt-4.3.? qmake if the system Qt is other than this version +QMAKE_PATH="" +#QMAKE_PATH=/usr/local/Trolltech/Qt-4.3.5/bin/qmake +#QMAKE_PATH=$WM_THIRD_PARTY_DIR/qt-x11-opensource-src-4.3.5/platforms/linux64GccDPOpt/bin/qmake + # # No further editing below this line #------------------------------------------------------------------------------ @@ -65,13 +70,15 @@ usage() { while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<<USAGE -usage: ${0##*/} [OPTION] +usage: $Script [OPTION] options: - -fast for repeated builds (-make -install) *use with caution* - -mpi with mpi (if not already enabled) - -python with python (if not already enabled) - -mesa with mesa (if not already enabled) - -verbose verbose output in Makefiles + -rebuild for repeated builds (-make -install) *use with caution* + -mpi with mpi (if not already enabled) + -python with python (if not already enabled) + -mesa with mesa (if not already enabled) + -qt with extra Qt gui support (if not already enabled) + -verbose verbose output in Makefiles + -version VER specify an alternative version (default: $ParaView_VERSION) -help For finer control, the build stages can be also selected individually @@ -82,25 +89,34 @@ For finer control, the build stages can be also selected individually -install [-envpath] alter absolute paths in CMake files to use env variables -Build and install $PARAVIEW_SRC - - run from folder above the ParaView source folder or place the - ParaView source under \$WM_THIRD_PARTY_DIR +Build and install paraview-$ParaView_VERSION + - run from folder above the ParaView source folder or place the ParaView + source under \$WM_THIRD_PARTY_DIR ($WM_THIRD_PARTY_DIR) USAGE exit 1 } +#------------------------------------------------------------------------------ + +# # add options based on script name: -case "$Script" in *-mpi*) WITH_MPI=ON;; esac -case "$Script" in *-python*) WITH_PYTHON=ON;; esac -case "$Script" in *-mesa*) WITH_MESA=ON;; esac +# +case "$Script" in *-mpi*) withMPI=true;; esac +case "$Script" in *-python*) withPYTHON=true;; esac +case "$Script" in *-mesa*) withMESA=true;; esac +case "$Script" in *-qt*) withQTSUPPORT=true;; esac +# +# various building stages +# runCONFIG=true runMAKE=true runMAKEDOC=true runINSTALL=true runENVPATH=false + # parse options while [ "$#" -gt 0 ] do @@ -144,7 +160,7 @@ do runENVPATH=true shift ;; - -fast) # shortcut for rebuild + -rebuild) # shortcut for rebuilding runCONFIG=false runMAKE=true runMAKEDOC=false @@ -152,36 +168,48 @@ do shift ;; -mpi) - WITH_MPI=ON + withMPI=true shift ;; -python) - WITH_PYTHON=ON + withPYTHON=true shift ;; -mesa) - WITH_MESA=ON + withMESA=true + shift + ;; + -qt) + withQTSUPPORT=true shift ;; -verbose) - VERBOSE=ON + withVERBOSE=true shift ;; + -version) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + export ParaView_VERSION=$2 + shift 2 + ;; *) usage "unknown option/argument: '$*'" ;; esac done + # Set configure options #~~~~~~~~~~~~~~~~~~~~~~ addVerbosity # verbose makefiles addMpiSupport # set MPI-specific options addPythonSupport # set Python-specific options addMesaSupport # set MESA-specific options +addQtSupport # add extra Qt support getPaths # discover where things are or should be put + # Build and install # ~~~~~~~~~~~~~~~~~ [ $runCONFIG = true ] && configParaView diff --git a/bin/buildParaView-python b/bin/buildParaView-python new file mode 120000 index 0000000000000000000000000000000000000000..5c6464acd1fcec5a62526fe789df17e6d3ac8df6 --- /dev/null +++ b/bin/buildParaView-python @@ -0,0 +1 @@ +buildParaView \ No newline at end of file diff --git a/bin/buildParaView3.5-cvs-python b/bin/buildParaView3.5-cvs-python deleted file mode 120000 index d3ed3924a892abffc145149dd53de0b9819d6272..0000000000000000000000000000000000000000 --- a/bin/buildParaView3.5-cvs-python +++ /dev/null @@ -1 +0,0 @@ -buildParaView3.5-cvs \ No newline at end of file diff --git a/bin/engridFoam b/bin/engridFoam new file mode 100755 index 0000000000000000000000000000000000000000..37e61b05691b7709878d8c647bcb0634e17334a4 --- /dev/null +++ b/bin/engridFoam @@ -0,0 +1,66 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / 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 +# +# Script +# engridFoam +# +# Description +# start engrid using the paraview libraries from OpenFOAM +# +#------------------------------------------------------------------------------ +usage() { + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat<<USAGE + +usage: ${0##*/} [OPTION] +options: + -help + +* start engrid using the paraview-$ParaView_VERSION libraries + passes through engrid options unmodified + +USAGE + exit 1 +} + +# report usage +[ "$1" = "-h" -o "$1" = "-help" ] && usage + +# set the major version "<digits>.<digits>" +ParaView_MAJOR_VERSION=$(echo $ParaView_VERSION | \ + sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/') + + +bindir=$WM_THIRD_PARTY_DIR/engrid/platforms/$WM_ARCH +libdir="$ParaView_DIR/lib/paraview-$ParaView_MAJOR_VERSION" + +[ -x $bindir/engrid ] || usage "engrid executable not found in $bindir" +[ -d $libdir ] || usage "paraview libraries not found" + +export LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH +echo "starting $bindir/engrid $@" +eval "exec $bindir/engrid $@ &" + +#------------------------------------------------------------------------------ diff --git a/bin/foamClearPolyMesh b/bin/foamClearPolyMesh index dcc507b811d39dbdd4ac0d57a3fc7b7589cc4488..1af677459dfbe7808bead2d18e9c795f5e8dcb1c 100755 --- a/bin/foamClearPolyMesh +++ b/bin/foamClearPolyMesh @@ -109,7 +109,7 @@ fi # -# remove files and subdirectories +# remove files (mesh itself, modifiers, snappyHexMesh ones) and subdirectories # echo "Clearing ${caseDir:-.}/$meshDir" 1>&2 @@ -126,6 +126,10 @@ for i in \ meshModifiers \ parallelData \ sets \ + cellLevel \ + pointLevel \ + refinementHistory \ + surfaceIndex \ ; do rm -rf $meshDir/$i diff --git a/bin/foamTemplates/foamScript b/bin/foamTemplates/foamScript index 6dd5781ac1af9aef4c4d809bfa235f1547533d9b..e8a160860c298189fb416e8ccdd8cacdedadd5ca 100644 --- a/bin/foamTemplates/foamScript +++ b/bin/foamTemplates/foamScript @@ -3,7 +3,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/bin/foamTemplates/source/foamAppTemplate.C b/bin/foamTemplates/source/foamAppTemplate.C index 2c75d7e107e02b0ee790ca1c0c49a5724bb2536b..46c089c1a865c2884cd4f62323db9f5c67442dce 100644 --- a/bin/foamTemplates/source/foamAppTemplate.C +++ b/bin/foamTemplates/source/foamAppTemplate.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/bin/foamTemplates/source/foamTemplate.C b/bin/foamTemplates/source/foamTemplate.C index 97251605e82048d4607ab495094cdc129e7659a8..903fe66b5f50909b991291f4608f89491a96da35 100644 --- a/bin/foamTemplates/source/foamTemplate.C +++ b/bin/foamTemplates/source/foamTemplate.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/bin/foamTemplates/source/foamTemplate.H b/bin/foamTemplates/source/foamTemplate.H index 963fc74cdf486bc0e0f9baae13fd52b659086c36..e0b6cf21577a30947428b32ef1da7e8947d5900b 100644 --- a/bin/foamTemplates/source/foamTemplate.H +++ b/bin/foamTemplates/source/foamTemplate.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/bin/foamTemplates/source/foamTemplateI.H b/bin/foamTemplates/source/foamTemplateI.H index 42bc929311152d7464c792bf0b3378adda1da890..10e8e4fec8ff30bc0e113d06c5081a217cfb6944 100644 --- a/bin/foamTemplates/source/foamTemplateI.H +++ b/bin/foamTemplates/source/foamTemplateI.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/bin/foamTemplates/source/foamTemplateIO.C b/bin/foamTemplates/source/foamTemplateIO.C index 2d95dc47de4b741469a521ac8d96da5110843cd1..d9119ed354a4bce766750b5afd1a4c997245db29 100644 --- a/bin/foamTemplates/source/foamTemplateIO.C +++ b/bin/foamTemplates/source/foamTemplateIO.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/bin/foamTemplates/source/newSource b/bin/foamTemplates/source/newSource old mode 100755 new mode 100644 index a06d1bcc732219f35c4772a1d22622b24c87880e..927ad36b31d407b723573fc2eef6abcaf03990c5 --- a/bin/foamTemplates/source/newSource +++ b/bin/foamTemplates/source/newSource @@ -3,7 +3,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/bin/foamTemplates/sourceTemplate/foamTemplateTemplate.C b/bin/foamTemplates/sourceTemplate/foamTemplateTemplate.C index 674341d11c2243dcd463f75119270915273dd2f6..5acafb25e79133c97b4a9a7ee277d687e01ab14f 100644 --- a/bin/foamTemplates/sourceTemplate/foamTemplateTemplate.C +++ b/bin/foamTemplates/sourceTemplate/foamTemplateTemplate.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/bin/foamTemplates/sourceTemplate/foamTemplateTemplate.H b/bin/foamTemplates/sourceTemplate/foamTemplateTemplate.H index 79250a7019e8a81a4689ce6bf062315d49fde131..fa32697e0a82449b8b9c7642ac06a3d6100db9b5 100644 --- a/bin/foamTemplates/sourceTemplate/foamTemplateTemplate.H +++ b/bin/foamTemplates/sourceTemplate/foamTemplateTemplate.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/bin/foamTemplates/sourceTemplate/foamTemplateTemplateI.H b/bin/foamTemplates/sourceTemplate/foamTemplateTemplateI.H index 42bc929311152d7464c792bf0b3378adda1da890..10e8e4fec8ff30bc0e113d06c5081a217cfb6944 100644 --- a/bin/foamTemplates/sourceTemplate/foamTemplateTemplateI.H +++ b/bin/foamTemplates/sourceTemplate/foamTemplateTemplateI.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/bin/foamTemplates/sourceTemplate/foamTemplateTemplateIO.C b/bin/foamTemplates/sourceTemplate/foamTemplateTemplateIO.C index 41bd21f5c359b520241fbcf98f3d860ee96c83ae..1c805f6f6a39e5883e96d06d9f4b4531902c811b 100644 --- a/bin/foamTemplates/sourceTemplate/foamTemplateTemplateIO.C +++ b/bin/foamTemplates/sourceTemplate/foamTemplateTemplateIO.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/bin/foamTemplates/sourceTemplate/newSourceTemplate b/bin/foamTemplates/sourceTemplate/newSourceTemplate old mode 100755 new mode 100644 index 238c6f43316623b2772853197c30e9fb33aa359c..b62a7f4c0e9f45150c30218f83bf8b28c5574f07 --- a/bin/foamTemplates/sourceTemplate/newSourceTemplate +++ b/bin/foamTemplates/sourceTemplate/newSourceTemplate @@ -3,7 +3,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/bin/tools/buildParaView3.4 b/bin/tools/buildParaView3.4 deleted file mode 100755 index ebdaae111f771bdb9f774817dc04dd0af9fbf279..0000000000000000000000000000000000000000 --- a/bin/tools/buildParaView3.4 +++ /dev/null @@ -1,192 +0,0 @@ -#!/bin/sh -#------------------------------------------------------------------------------ -# ========= | -# \\ / 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 -# -# Script -# buildParaView3.3-cvs -# -# Description -# Build and install ParaView -# - run from folder above ParaView source folder or place the -# ParaView source under $WM_THIRD_PARTY_DIR -# -#------------------------------------------------------------------------------ -. $WM_PROJECT_DIR/bin/tools/buildParaViewFunctions - -PARAVIEW_SRC=paraview-3.4 -PARAVIEW_MAJOR_VERSION=3.4 - -# User options: -# ~~~~~~~~~~~~~ - -# MPI support: -WITH_MPI=OFF -MPI_MAX_PROCS=32 - -# Python support: -# note: script will try to determine the appropriate python library. -# If it fails, specify the path using the PYTHON_LIBRARY variable -WITH_PYTHON=OFF -PYTHON_LIBRARY="" -# PYTHON_LIBRARY="/usr/lib64/libpython2.5.so.1.0" - -# MESA graphics support: -WITH_MESA=OFF - -# -# No further editing below this line -#------------------------------------------------------------------------------ -Script=${0##*/} - -usage() { - while [ "$#" -ge 1 ]; do echo "$1"; shift; done - cat<<USAGE - -usage: ${0##*/} [OPTION] -options: - -fast for repeated builds (-make -install) *use with caution* - -mpi with mpi (if not already enabled) - -python with python (if not already enabled) - -mesa with mesa (if not already enabled) - -verbose verbose output in Makefiles - -help - -For finer control, the build stages can be also selected individually -(mutually exclusive) - -config - -make - -makedoc - -install - [-envpath] alter absolute paths in CMake files to use env variables - -Build and install $PARAVIEW_SRC - - run from folder above the ParaView source folder or place the - ParaView source under \$WM_THIRD_PARTY_DIR - -USAGE - exit 1 -} - -# add options based on script name: -case "$Script" in *-mpi*) WITH_MPI=ON;; esac -case "$Script" in *-python*) WITH_PYTHON=ON;; esac -case "$Script" in *-mesa*) WITH_MESA=ON;; esac - -runCONFIG=true -runMAKE=true -runMAKEDOC=true -runINSTALL=true -runENVPATH=false - -# parse options -while [ "$#" -gt 0 ] -do - case "$1" in - -h | -help) - usage - ;; - -config) # stage 1: config only - runCONFIG=true - runMAKE=false - runMAKEDOC=false - runINSTALL=false - shift - ;; - -make) # stage 2: make only - runCONFIG=false - runMAKE=true - runMAKEDOC=false - runINSTALL=false - shift - ;; - -makedoc) # stage 3: generate html documentation - runCONFIG=false - runMAKE=false - runMAKEDOC=true - runINSTALL=false - shift - ;; - -install) # stage 4: install only - runCONFIG=false - runMAKE=false - runMAKEDOC=false - runINSTALL=true - shift - ;; - -envpath) # optional: change cmake files to use env variables - runCONFIG=false - runMAKE=false - runMAKEDOC=false - runINSTALL=false - runENVPATH=true - shift - ;; - -fast) # shortcut for rebuild - runCONFIG=false - runMAKE=true - runMAKEDOC=false - runINSTALL=true - shift - ;; - -mpi) - WITH_MPI=ON - shift - ;; - -python) - WITH_PYTHON=ON - shift - ;; - -mesa) - WITH_MESA=ON - shift - ;; - -verbose) - VERBOSE=ON - shift - ;; - *) - usage "unknown option/argument: '$*'" - ;; - esac -done - -# Set configure options -#~~~~~~~~~~~~~~~~~~~~~~ -addVerbosity # verbose makefiles -addMpiSupport # set MPI-specific options -addPythonSupport # set Python-specific options -addMesaSupport # set MESA-specific options - -getPaths # discover where things are or should be put - -# Build and install -# ~~~~~~~~~~~~~~~~~ -[ $runCONFIG = true ] && configParaView -[ $runMAKE = true ] && makeParaView -[ $runENVPATH = true ] && fixCMakeFiles -[ $runMAKEDOC = true ] && makeDocs -[ $runINSTALL = true ] && installParaView - -echo "done" -#------------------------------------------------------------------------------ diff --git a/bin/tools/buildParaViewFunctions b/bin/tools/buildParaViewFunctions index f1da2c0e3e23f87cf17c380e056d71a90e07ae83..5b3ae1fec9c9e366100adfc8396688070c075ed8 100644 --- a/bin/tools/buildParaViewFunctions +++ b/bin/tools/buildParaViewFunctions @@ -53,7 +53,7 @@ addCMakeVariable() # addVerbosity() { - [ "$VERBOSE" = ON ] && addCMakeVariable CMAKE_VERBOSE_MAKEFILE=TRUE + [ "$withVERBOSE" = true ] && addCMakeVariable CMAKE_VERBOSE_MAKEFILE=TRUE } @@ -62,7 +62,7 @@ addVerbosity() # addMpiSupport() { - [ "$WITH_MPI" = ON ] || return + [ "${withMPI:=false}" = true ] || return OBJ_ADD="$OBJ_ADD-mpi" addCMakeVariable PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON @@ -78,7 +78,7 @@ addMpiSupport() # addPythonSupport() { - [ "$WITH_PYTHON" = ON ] || return + [ "${withPYTHON:=false}" = true ] || return OBJ_ADD="$OBJ_ADD-py" if pythonBin=$(which python 2>/dev/null) @@ -105,25 +105,18 @@ addPythonSupport() [ -e "$PYTHON_LIBRARY" ] || { echo " Please set the variable PYTHON_LIBRARY to the full" echo " path to (and including) libpython, or deactivate" - echo " python support by setting WITH_PYTHON=OFF" + echo " python support by setting withPYTHON=false" exit 1 } pythonMajor=$(echo $PYTHON_LIBRARY | sed 's/.*libpython\(.*\)\.so.*/\1/') pythonInclude=/usr/include/python$pythonMajor - [ -e "$PYTHON_LIBRARY" ] || { - echo " Please set the variable PYTHON_LIBRARY to the full" - echo " path to (and including) libpython, or deactivate" - echo " python support by setting WITH_PYTHON=OFF" - exit 1 - } - # note - we could also allow for a PYTHON_INCLUDE variable ... - [ -e "$pythonInclude" ] || { - echo " No python include headers found" + [ -d "$pythonInclude" ] || { + echo " No python headers found in $pythonInclude/" echo " Please install python headers or deactivate " - echo " python support by setting WITH_PYTHON=OFF" + echo " python support by setting withPYTHON=false" exit 1 } @@ -140,8 +133,8 @@ addPythonSupport() unset pythonBin pythonInclude pythonMajor else - echo "*** Error: python not installed" - echo "*** Deactivate python support by setting WITH_PYTHON=OFF" + echo "*** Error: python not found" + echo "*** Deactivate python support by setting withPYTHON=false" exit 1 fi } @@ -152,26 +145,38 @@ addPythonSupport() # addMesaSupport() { - [ "$WITH_MESA" = ON ] || return + [ "${withMESA:=false}" = true ] || return - if [ -d "$MESA_INCLUDE_DIR" -a -f "$MESA_LIBRARY" ] + if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ] then OBJ_ADD="$OBJ_ADD-mesa" addCMakeVariable VTK_OPENGL_HAS_OSMESA=ON - addCMakeVariable OSMESA_INCLUDE_DIR=$MESA_INCLUDE_DIR + addCMakeVariable OSMESA_INCLUDE_DIR=$MESA_INCLUDE addCMakeVariable OSMESA_LIBRARY=$MESA_LIBRARY else echo "*** Error: no MESA information found" - echo "*** Deactivate MESA support by setting WITH_MESA=OFF, or" - echo "*** correct paths given by:" - echo "*** - MESA_INCLUDE_DIR ($MESA_INCLUDE_DIR)" + echo "*** Deactivate MESA support by setting withMESA=false, or" + echo "*** correct the paths given by:" + echo "*** - MESA_INCLUDE ($MESA_INCLUDE)" echo "*** - MESA_LIBRARY ($MESA_LIBRARY)" exit 1 fi } +addQtSupport() +{ + [ "${withQTSUPPORT:=false}" = true ] || return + + addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON" + + if [ -n "$QMAKE_PATH" ] + then + addCMakeVariable QT_QMAKE_EXECUTABLE:FILEPATH=$QMAKE_PATH + fi +} + # # discover where things are or should be put @@ -181,24 +186,32 @@ getPaths() # set paraview environment for i in $PWD $WM_THIRD_PARTY_DIR do - ParaView_INST_DIR=$i/$PARAVIEW_SRC + ParaView_INST_DIR=$i/paraview-$ParaView_VERSION [ -d $ParaView_INST_DIR ] && break done if [ ! -d "$ParaView_INST_DIR" ] then # last chance: maybe already in the paraview directory - [ "${PWD##*/}" = $PARAVIEW_SRC ] && ParaView_INST_DIR=$PWD + if [ "${PWD##*/}" = "paraview-$ParaView_VERSION" ] + then + ParaView_INST_DIR=$PWD + fi [ -d "$ParaView_INST_DIR" ] || { - echo "did not find $PARAVIEW_SRC in these directories:" + echo "did not find paraview-$ParaView_VERSION in these directories:" echo " PWD=$PWD" echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR" + echo echo "abort build" exit 1 } fi + # set the major version "<digits>.<digits>" + ParaView_MAJOR_VERSION=$(echo $ParaView_VERSION | \ + sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/') + # ParaView_DIR=$ParaView_INST_DIR/platforms/$WM_ARCH$WM_COMPILER$OBJ_ADD ParaView_DIR=$ParaView_INST_DIR/platforms/$WM_ARCH$WM_COMPILER echo "ParaView_DIR=$ParaView_DIR" @@ -221,10 +234,11 @@ configParaView() cd $ParaView_DIR echo "----" - echo "Configuring $PARAVIEW_SRC" - echo " MPI support : $WITH_MPI" - echo " Python support : $WITH_PYTHON" - echo " MESA support : $WITH_MESA" + echo "Configuring paraview-$ParaView_VERSION (major version: $ParaView_MAJOR_VERSION)" + echo " MPI support : ${withMPI:-false}" + echo " Python support : ${withPYTHON:-false}" + echo " MESA support : ${withMESA:-false}" + echo " Qt dev support : ${withQTSUPPORT:-false}" echo " Source : $ParaView_INST_DIR" echo " Target : $ParaView_DIR" echo "----" @@ -266,10 +280,10 @@ makeParaView() fi echo " Done make" - echo " For quicker development, linking lib/paraview-$PARAVIEW_MAJOR_VERSION/ -> bin/" - rm -rf lib/paraview-$PARAVIEW_MAJOR_VERSION + echo " For quicker development, linking lib/paraview-$ParaView_MAJOR_VERSION/ -> bin/" + rm -rf lib/paraview-$ParaView_MAJOR_VERSION mkdir lib 2>/dev/null - ( cd lib && ln -s ../bin paraview-$PARAVIEW_MAJOR_VERSION ) + ( cd lib && ln -s ../bin paraview-$ParaView_MAJOR_VERSION ) } @@ -317,7 +331,7 @@ fixCMakeFiles() fixHardLinks ParaView_INST_DIR "$ParaView_INST_DIR" '*.cmake' # Replace path with env variable: MPI_ARCH_PATH - if [ "$WITH_MPI" = ON ] + if [ "${withMPI:=false}" = true ] then fixHardLinks MPI_ARCH_PATH "$MPI_ARCH_PATH" '*.cmake' fi @@ -359,10 +373,10 @@ installParaView() echo "disabled 'make install' for now, just use links" # about.txt may be missing - paraviewLibDir="$ParaView_DIR/lib/paraview-$PARAVIEW_MAJOR_VERSION" + paraviewLibDir="$ParaView_DIR/lib/paraview-$ParaView_MAJOR_VERSION" if [ -d "$paraviewLibDir" -a ! -e "$paraviewLibDir/about.txt" ] then - echo "paraview-$PARAVIEW_MAJOR_VERSION installed - $(date)" > $paraviewLibDir/about.txt + echo "paraview-$ParaView_MAJOR_VERSION installed - $(date)" > $paraviewLibDir/about.txt fi cat<< INFO @@ -380,9 +394,9 @@ INFO # clear all the variables used before using any of the functions -unset VERBOSE -unset WITH_MPI WITH_MESA -unset WITH_PYTHON PYTHON_LIBRARY +unset withMPI withQTSUPPORT withVERBOSE +unset withMESA MESA_INCLUDE MESA_LIBRARY +unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY unset CMAKE_VARIABLES unset OBJ_ADD diff --git a/etc/aliases.csh b/etc/aliases.csh index a86caa89ef7e7475f4ed1bc625e7b11e166dbf07..fd7f183a368a39d2d60c7ba5d758bbc1af03a0f5 100644 --- a/etc/aliases.csh +++ b/etc/aliases.csh @@ -56,5 +56,6 @@ alias app 'cd $FOAM_APP' alias util 'cd $FOAM_UTILITIES' alias sol 'cd $FOAM_SOLVERS' alias tut 'cd $FOAM_TUTORIALS' +alias foam3rdParty 'cd $WM_THIRD_PARTY_DIR' # ----------------------------------------------------------------------------- diff --git a/etc/aliases.sh b/etc/aliases.sh index a1d8685ba6ebc6b5e920086163c44e67ecbdfa07..b193802246982261a6a18ade4442d2ed3cd5f036 100644 --- a/etc/aliases.sh +++ b/etc/aliases.sh @@ -56,5 +56,6 @@ alias app='cd $FOAM_APP' alias util='cd $FOAM_UTILITIES' alias sol='cd $FOAM_SOLVERS' alias tut='cd $FOAM_TUTORIALS' +alias foam3rdParty='cd $WM_THIRD_PARTY_DIR' # ----------------------------------------------------------------------------- diff --git a/etc/apps/cint/bashrc b/etc/apps/cint/bashrc index 3ecfd85517b82d881e94f18266f47c1e09e09148..dbbd89631e2487e11803e1dea7cb95a720e0aafc 100644 --- a/etc/apps/cint/bashrc +++ b/etc/apps/cint/bashrc @@ -27,7 +27,7 @@ # # Description # Setup file for cint -# Sourced from OpenFOAM-?.?/etc/bashrc +# Sourced from OpenFOAM-*/etc/bashrc # #------------------------------------------------------------------------------ diff --git a/etc/apps/cint/cshrc b/etc/apps/cint/cshrc index 6807b32a3d61eb77fba6841792828aae245d0d9b..f2c38c481a3ebca703415c4e094137bb8efc43db 100644 --- a/etc/apps/cint/cshrc +++ b/etc/apps/cint/cshrc @@ -26,8 +26,8 @@ # cint/cshrc # # Description -# Startup File for cint -# Sourced from OpenFOAM-?.?/etc/cshrc +# Setup file for cint +# Sourced from OpenFOAM-*/etc/cshrc # #------------------------------------------------------------------------------ diff --git a/etc/apps/ensight/bashrc b/etc/apps/ensight/bashrc index ffd07ab71de68d35d3a75254b3e04bc31f0de2ee..100f65ae5db4efe53a673d032fddef3d74bc3241 100644 --- a/etc/apps/ensight/bashrc +++ b/etc/apps/ensight/bashrc @@ -23,11 +23,11 @@ # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # Script -# ensightFoam/bashrc +# ensight/bashrc # # Description # Setup file for Ensight 8.? -# Sourced from OpenFOAM-?.?/etc/bashrc +# Sourced from OpenFOAM-*/etc/bashrc # #------------------------------------------------------------------------------ diff --git a/etc/apps/ensight/cshrc b/etc/apps/ensight/cshrc index 52335c6b56de79f98b67cf91cf83c3badb90722b..ae7f3d6095763ddbbfd56fdae6023007d67115c2 100644 --- a/etc/apps/ensight/cshrc +++ b/etc/apps/ensight/cshrc @@ -23,11 +23,11 @@ # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # Script -# ensightFoam/cshrc +# ensight/cshrc # # Description -# Startup File for Ensight 8.?. -# Sourced from OpenFOAM-?.?/etc/cshrc +# Setup file for Ensight 8.? +# Sourced from OpenFOAM-*/etc/cshrc # #------------------------------------------------------------------------------ diff --git a/etc/apps/paraview/bashrc b/etc/apps/paraview/bashrc index f31ec9058a6780e8ff14eaa83dfcb25b051303f5..a6e2c08051a3db1fcb293cdfec30f56116d51909 100644 --- a/etc/apps/paraview/bashrc +++ b/etc/apps/paraview/bashrc @@ -26,22 +26,29 @@ # paraview/bashrc # # Description -# Setup file for Paraview. -# Sourced from OpenFOAM-?.?/etc/bashrc +# Setup file for paraview-2.x +# Sourced from OpenFOAM-*/etc/bashrc # #------------------------------------------------------------------------------ -export CMAKE_HOME=$WM_THIRD_PARTY_DIR/cmake-2.4.6/platforms/$WM_ARCH - -if [ -r $CMAKE_HOME ] -then - export PATH=$CMAKE_HOME/bin:$PATH -fi +# determine the cmake to be used +unset CMAKE_HOME +for cmake in cmake-2.6.4 cmake-2.6.2 cmake-2.4.6 +do + cmake=$WM_THIRD_PARTY_DIR/$cmake/platforms/$WM_ARCH + if [ -r $cmake ] + then + export CMAKE_HOME=$cmake + export PATH=$CMAKE_HOME/bin:$PATH + break + fi +done +paraviewMajor=paraview-2.4 export ParaView_VERSION=2.4.4 export ParaView_INST_DIR=$WM_THIRD_PARTY_DIR/ParaView$ParaView_VERSION -export ParaView_DIR=$ParaView_INST_DIR/lib/paraview-2.4 +export ParaView_DIR=$ParaView_INST_DIR/lib/$paraviewMajor if [ -r $ParaView_INST_DIR ] then @@ -56,4 +63,5 @@ then export VTK_DIR=$ParaView_DIR/VTK fi +unset cmake paraviewMajor # ----------------------------------------------------------------------------- diff --git a/etc/apps/paraview/cshrc b/etc/apps/paraview/cshrc index 130efc110285c88afafda273390f47d4d1441233..a1552a511686013ff9eef29b79d8153a07e9448d 100644 --- a/etc/apps/paraview/cshrc +++ b/etc/apps/paraview/cshrc @@ -26,21 +26,27 @@ # paraview/cshrc # # Description -# Startup File for Paraview. -# Sourced from OpenFOAM-?.?/etc/cshrc +# Setup file for paraview-2.x +# Sourced from OpenFOAM-*/etc/cshrc # #------------------------------------------------------------------------------ -setenv CMAKE_HOME $WM_THIRD_PARTY_DIR/cmake-2.4.6/platforms/$WM_ARCH - -if ( -r $CMAKE_HOME ) then - set path=($CMAKE_HOME/bin $path) -endif - +# determine the cmake to be used +unsetenv CMAKE_HOME +foreach cmake ( cmake-2.6.4 cmake-2.6.2 cmake-2.4.6 ) + set cmake=$WM_THIRD_PARTY_DIR/$cmake/platforms/$WM_ARCH + if ( -r $cmake ) then + setenv CMAKE_HOME $cmake + set path=($CMAKE_HOME/bin $path) + break + endif +end + +set paraviewMajor=paraview-2.4 setenv ParaView_VERSION 2.4.4 setenv ParaView_INST_DIR $WM_THIRD_PARTY_DIR/ParaView$ParaView_VERSION -setenv ParaView_DIR $ParaView_INST_DIR/lib/paraview-2.4 +setenv ParaView_DIR $ParaView_INST_DIR/lib/$paraviewMajor if ( -r $ParaView_INST_DIR ) then setenv PV_INTERFACE_PATH $FOAM_UTILITIES/postProcessing/graphics/PVFoamReader/PVFoamReader/Make @@ -53,4 +59,5 @@ if ( -r $ParaView_DIR ) then setenv VTK_DIR $ParaView_DIR/VTK endif +unset cmake paraviewMajor # ----------------------------------------------------------------------------- diff --git a/etc/apps/paraview3/bashrc b/etc/apps/paraview3/bashrc index 2120bf5d562175e2aee7035fd62ef05c1c0405e7..6536eb32ce6425f2efd66f0e0530b9ae3750dc1c 100644 --- a/etc/apps/paraview3/bashrc +++ b/etc/apps/paraview3/bashrc @@ -27,7 +27,7 @@ # # Description # Setup file for paraview-3.x -# Sourced from OpenFOAM-?.?/etc/bashrc +# Sourced from OpenFOAM-*/etc/bashrc # # Note # The env. variable 'ParaView_DIR' is required for building plugins @@ -35,7 +35,7 @@ # determine the cmake to be used unset CMAKE_HOME -for cmake in cmake-2.6.2 cmake-2.4.6 +for cmake in cmake-2.6.4 cmake-2.6.2 cmake-2.4.6 do cmake=$WM_THIRD_PARTY_DIR/$cmake/platforms/$WM_ARCH if [ -r $cmake ] @@ -46,8 +46,8 @@ do fi done -paraviewMajor=paraview-3.5 -export ParaView_VERSION=3.5-cvs +paraviewMajor=paraview-3.6 +export ParaView_VERSION=3.6 export ParaView_INST_DIR=$WM_THIRD_PARTY_DIR/paraview-$ParaView_VERSION export ParaView_DIR=$ParaView_INST_DIR/platforms/$WM_ARCH$WM_COMPILER diff --git a/etc/apps/paraview3/cshrc b/etc/apps/paraview3/cshrc index 5ad99a1030d0b7ab8c6506418c94ce9951504d5d..66c7e1a54f283c56121c74164e482b7b221d437d 100644 --- a/etc/apps/paraview3/cshrc +++ b/etc/apps/paraview3/cshrc @@ -26,8 +26,8 @@ # paraview3/cshrc # # Description -# Startup File for paraview-3.x -# Sourced from OpenFOAM-?.?/etc/cshrc +# Setup file for paraview-3.x +# Sourced from OpenFOAM-*/etc/cshrc # # Note # The env. variable 'ParaView_DIR' is required for building plugins @@ -35,7 +35,7 @@ # determine the cmake to be used unsetenv CMAKE_HOME -foreach cmake ( cmake-2.6.2 cmake-2.4.6 ) +foreach cmake ( cmake-2.6.4 cmake-2.6.2 cmake-2.4.6 ) set cmake=$WM_THIRD_PARTY_DIR/$cmake/platforms/$WM_ARCH if ( -r $cmake ) then setenv CMAKE_HOME $cmake @@ -44,8 +44,8 @@ foreach cmake ( cmake-2.6.2 cmake-2.4.6 ) endif end -set paraviewMajor=paraview-3.5 -setenv ParaView_VERSION 3.5-cvs +set paraviewMajor=paraview-3.6 +setenv ParaView_VERSION 3.6 setenv ParaView_INST_DIR $WM_THIRD_PARTY_DIR/paraview-$ParaView_VERSION setenv ParaView_DIR $ParaView_INST_DIR/platforms/$WM_ARCH$WM_COMPILER diff --git a/etc/bashrc b/etc/bashrc index 17b84d853dc46279ca47ed173396bddac19c22b6..edd0265b63d079bec3730a3be43a72878b692d6c 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -79,8 +79,8 @@ export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty # Operating System/Platform # ~~~~~~~~~~~~~~~~~~~~~~~~~ -# WM_OS = Unix | ???? -: ${WM_OS:=Unix}; export WM_OS +# WM_OSTYPE = POSIX | ???? +: ${WM_OSTYPE:=POSIX}; export WM_OSTYPE # Compiler: set to Gcc, Gcc43 or Icc (for Intel's icc) diff --git a/etc/controlDict b/etc/controlDict index 65058af1a6c6a324f826be3d8b22ec9425195b96..d7824f102ed9972cfb96cad9569659231d200daf 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -95,6 +95,7 @@ DebugSwitches Euler 0; EulerImplicit 0; EulerRotation 0; + extendedCellToFaceStencil 0; FDIC 0; FaceCellWave 0; GAMG 0; @@ -195,6 +196,7 @@ DebugSwitches PatchToPatchInterpolation 0; Phi 0; PointEdgeWave 0; + POSIX 0; Prandtl 0; PrimitivePatch 0; Pstream 0; @@ -249,7 +251,6 @@ DebugSwitches ThermoParcel<basicThermoParcel> 0; UMIST 0; UMISTV 0; - Unix 0; UpwindFitData<cubicUpwindFitPolynomial> 0; UpwindFitData<quadraticLinearUpwindFitPolynomial> 0; UpwindFitData<quadraticUpwindFitPolynomial> 0; diff --git a/etc/cshrc b/etc/cshrc index 0073521a339afff8ead4cd1286473aeb3002f6ad..17e75ba888df4e149d0d9bd52650d7e88a3bc482 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -73,8 +73,8 @@ setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty # Operating System/Platform # ~~~~~~~~~~~~~~~~~~~~~~~~~ -# WM_OS = Unix | ???? -if ( ! $?WM_OS ) setenv WM_OS Unix +# WM_OSTYPE = POSIX | ???? +if ( ! $?WM_OSTYPE ) setenv WM_OSTYPE POSIX # Compiler: set to Gcc, Gcc43 or Icc (for Intel's icc) diff --git a/src/Allwmake b/src/Allwmake index 3168208c49f2dd8e10c591071fabcb5753e2115a..e374ba62e87a9e7921391501d38eb55dd941c4da 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -6,10 +6,10 @@ set -x wmakePrintBuild -check || /bin/rm -f OpenFOAM/Make/$WM_OPTIONS/global.? 2>/dev/null wmakeLnInclude -f OpenFOAM -wmakeLnInclude -f OSspecific/$WM_OS +wmakeLnInclude -f OSspecific/$WM_OSTYPE Pstream/Allwmake -wmake libo OSspecific/$WM_OS +wmake libo OSspecific/$WM_OSTYPE wmake libso OpenFOAM wmake libso lagrangian/basic diff --git a/src/OSspecific/Unix/Make/files b/src/OSspecific/POSIX/Make/files similarity index 90% rename from src/OSspecific/Unix/Make/files rename to src/OSspecific/POSIX/Make/files index b6e32d80d6652a96636c71d9ae129d35dd89035f..f6e7c2d55eda6f5ffbcc1f0de59451051b45d424 100644 --- a/src/OSspecific/Unix/Make/files +++ b/src/OSspecific/POSIX/Make/files @@ -5,14 +5,14 @@ signals/sigQuit.C regExp.C timer.C fileStat.C -Unix.C +POSIX.C cpuTime/cpuTime.C clockTime/clockTime.C -#ifndef SunOS64 -printStack.C -#else +#ifdef SunOS64 dummyPrintStack.C +#else +printStack.C #endif LIB = $(FOAM_LIBBIN)/libOSspecific diff --git a/src/OSspecific/Unix/Make/options b/src/OSspecific/POSIX/Make/options similarity index 100% rename from src/OSspecific/Unix/Make/options rename to src/OSspecific/POSIX/Make/options diff --git a/src/OSspecific/Unix/Unix.C b/src/OSspecific/POSIX/POSIX.C similarity index 98% rename from src/OSspecific/Unix/Unix.C rename to src/OSspecific/POSIX/POSIX.C index 9378a21c7caacf345d715be1a1cdc20b6e33a9d1..09b3182b5208e5c55ea0731af06340cfa90853b4 100644 --- a/src/OSspecific/Unix/Unix.C +++ b/src/OSspecific/POSIX/POSIX.C @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Description - UNIX versions of the functions declared in OSspecific.H + POSIX versions of the functions declared in OSspecific.H \*---------------------------------------------------------------------------*/ @@ -32,7 +32,7 @@ Description #endif #include "OSspecific.H" -#include "Unix.H" +#include "POSIX.H" #include "foamVersion.H" #include "fileName.H" #include "fileStat.H" @@ -56,7 +56,7 @@ Description // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(Foam::Unix, 0); +defineTypeNameAndDebug(Foam::POSIX, 0); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -222,14 +222,14 @@ Foam::fileName Foam::findEtcFile(const fileName& name, bool mandatory) { // Check for user file in ~/.OpenFOAM/VERSION fileName fullName = searchDir/FOAMversion/name; - if (exists(fullName)) + if (isFile(fullName)) { return fullName; } // Check for version-independent user file in ~/.OpenFOAM fullName = searchDir/name; - if (exists(fullName)) + if (isFile(fullName)) { return fullName; } @@ -243,14 +243,14 @@ Foam::fileName Foam::findEtcFile(const fileName& name, bool mandatory) { // Check for site file in $WM_PROJECT_INST_DIR/site/VERSION fileName fullName = searchDir/"site"/FOAMversion/name; - if (exists(fullName)) + if (isFile(fullName)) { return fullName; } // Check for version-independent site file in $WM_PROJECT_INST_DIR/site fullName = searchDir/"site"/name; - if (exists(fullName)) + if (isFile(fullName)) { return fullName; } @@ -263,7 +263,7 @@ Foam::fileName Foam::findEtcFile(const fileName& name, bool mandatory) { // Check for shipped OpenFOAM file in $WM_PROJECT_DIR/etc fileName fullName = searchDir/"etc"/name; - if (exists(fullName)) + if (isFile(fullName)) { return fullName; } @@ -536,7 +536,7 @@ Foam::fileNameList Foam::readDir // also used as increment if initial size found to be insufficient static const int maxNnames = 100; - if (Unix::debug) + if (POSIX::debug) { Info<< "readDir(const fileName&, const fileType, const bool filtergz)" << " : reading directory " << directory << endl; @@ -557,7 +557,7 @@ Foam::fileNameList Foam::readDir { dirEntries.setSize(0); - if (Unix::debug) + if (POSIX::debug) { Info<< "readDir(const fileName&, const fileType, " "const bool filtergz) : cannot open directory " @@ -690,7 +690,7 @@ bool Foam::cp(const fileName& src, const fileName& dest) fileNameList contents = readDir(src, fileName::FILE, false); forAll(contents, i) { - if (Unix::debug) + if (POSIX::debug) { Info<< "Copying : " << src/contents[i] << " to " << destFile/contents[i] << endl; @@ -704,7 +704,7 @@ bool Foam::cp(const fileName& src, const fileName& dest) fileNameList subdirs = readDir(src, fileName::DIRECTORY); forAll(subdirs, i) { - if (Unix::debug) + if (POSIX::debug) { Info<< "Copying : " << src/subdirs[i] << " to " << destFile << endl; @@ -722,7 +722,7 @@ bool Foam::cp(const fileName& src, const fileName& dest) // Create a softlink. dst should not exist. Returns true if successful. bool Foam::ln(const fileName& src, const fileName& dst) { - if (Unix::debug) + if (POSIX::debug) { Info<< "Create softlink from : " << src << " to " << dst << endl; @@ -759,7 +759,7 @@ bool Foam::ln(const fileName& src, const fileName& dst) // Rename srcFile dstFile bool Foam::mv(const fileName& srcFile, const fileName& dstFile) { - if (Unix::debug) + if (POSIX::debug) { Info<< "Move : " << srcFile << " to " << dstFile << endl; } @@ -784,7 +784,7 @@ bool Foam::mv(const fileName& srcFile, const fileName& dstFile) // Remove a file returning true if successful otherwise false bool Foam::rm(const fileName& file) { - if (Unix::debug) + if (POSIX::debug) { Info<< "Removing : " << file << endl; } @@ -804,7 +804,7 @@ bool Foam::rm(const fileName& file) // Remove a dirctory and its contents bool Foam::rmDir(const fileName& directory) { - if (Unix::debug) + if (POSIX::debug) { Info<< "rmDir(const fileName&) : " << "removing directory " << directory << endl; diff --git a/src/OSspecific/Unix/Unix.H b/src/OSspecific/POSIX/POSIX.H similarity index 92% rename from src/OSspecific/Unix/Unix.H rename to src/OSspecific/POSIX/POSIX.H index 97e5d21de2f05d0396d47b7e13baa8202b567f29..fde323b5ffee8158f80292be1c5f67a00b3678ef 100644 --- a/src/OSspecific/Unix/Unix.H +++ b/src/OSspecific/POSIX/POSIX.H @@ -23,18 +23,18 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Namespace - Foam::Unix + Foam::POSIX Description - UNIX versions of OS-specific functions. + OS-specific functions implemented in POSIX. SourceFiles - Unix.C + POSIX.C \*---------------------------------------------------------------------------*/ -#ifndef Unix_H -#define Unix_H +#ifndef POSIX_H +#define POSIX_H #include "className.H" @@ -45,10 +45,10 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Unix +namespace POSIX { //- Declare name of the class and its debug switch - NamespaceName("Unix"); + NamespaceName("POSIX"); } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OSspecific/Unix/clockTime/clockTime.C b/src/OSspecific/POSIX/clockTime/clockTime.C similarity index 100% rename from src/OSspecific/Unix/clockTime/clockTime.C rename to src/OSspecific/POSIX/clockTime/clockTime.C diff --git a/src/OSspecific/Unix/clockTime/clockTime.H b/src/OSspecific/POSIX/clockTime/clockTime.H similarity index 100% rename from src/OSspecific/Unix/clockTime/clockTime.H rename to src/OSspecific/POSIX/clockTime/clockTime.H diff --git a/src/OSspecific/Unix/cpuTime/cpuTime.C b/src/OSspecific/POSIX/cpuTime/cpuTime.C similarity index 100% rename from src/OSspecific/Unix/cpuTime/cpuTime.C rename to src/OSspecific/POSIX/cpuTime/cpuTime.C diff --git a/src/OSspecific/Unix/cpuTime/cpuTime.H b/src/OSspecific/POSIX/cpuTime/cpuTime.H similarity index 100% rename from src/OSspecific/Unix/cpuTime/cpuTime.H rename to src/OSspecific/POSIX/cpuTime/cpuTime.H diff --git a/src/OSspecific/Unix/dummyPrintStack.C b/src/OSspecific/POSIX/dummyPrintStack.C similarity index 100% rename from src/OSspecific/Unix/dummyPrintStack.C rename to src/OSspecific/POSIX/dummyPrintStack.C diff --git a/src/OSspecific/Unix/fileStat.C b/src/OSspecific/POSIX/fileStat.C similarity index 100% rename from src/OSspecific/Unix/fileStat.C rename to src/OSspecific/POSIX/fileStat.C diff --git a/src/OSspecific/Unix/fileStat.H b/src/OSspecific/POSIX/fileStat.H similarity index 100% rename from src/OSspecific/Unix/fileStat.H rename to src/OSspecific/POSIX/fileStat.H diff --git a/src/OSspecific/Unix/printStack.C b/src/OSspecific/POSIX/printStack.C similarity index 100% rename from src/OSspecific/Unix/printStack.C rename to src/OSspecific/POSIX/printStack.C diff --git a/src/OSspecific/Unix/regExp.C b/src/OSspecific/POSIX/regExp.C similarity index 100% rename from src/OSspecific/Unix/regExp.C rename to src/OSspecific/POSIX/regExp.C diff --git a/src/OSspecific/Unix/regExp.H b/src/OSspecific/POSIX/regExp.H similarity index 100% rename from src/OSspecific/Unix/regExp.H rename to src/OSspecific/POSIX/regExp.H diff --git a/src/OSspecific/Unix/signals/sigFpe.C b/src/OSspecific/POSIX/signals/sigFpe.C similarity index 93% rename from src/OSspecific/Unix/signals/sigFpe.C rename to src/OSspecific/POSIX/signals/sigFpe.C index 813364d366779395a04efd49558e37cefd227ba0..bdcc1d08bdd99785ae0ca761a8671b6ad23244e9 100644 --- a/src/OSspecific/Unix/signals/sigFpe.C +++ b/src/OSspecific/POSIX/signals/sigFpe.C @@ -177,7 +177,7 @@ Foam::sigFpe::~sigFpe() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::sigFpe::set() +void Foam::sigFpe::set(const bool verbose) { if (oldAction_.sa_handler) { @@ -190,6 +190,12 @@ void Foam::sigFpe::set() if (env("FOAM_SIGFPE")) { + if (verbose) + { + Info<< "SigFpe : Enabling floating point exception trapping" + << " (FOAM_SIGFPE)." << endl; + } + # ifdef LINUX_GNUC feenableexcept @@ -240,6 +246,12 @@ void Foam::sigFpe::set() if (env("FOAM_SETNAN")) { + if (verbose) + { + Info<< "SetNaN : Initialising allocated memory to NaN" + << " (FOAM_SETNAN)." << endl; + } + # ifdef LINUX_GNUC // Set our malloc diff --git a/src/OSspecific/Unix/signals/sigFpe.H b/src/OSspecific/POSIX/signals/sigFpe.H similarity index 98% rename from src/OSspecific/Unix/signals/sigFpe.H rename to src/OSspecific/POSIX/signals/sigFpe.H index 6d9fe7623ccf7d6aa2520efe3938e3ebafb641d6..46755873de60d020e70ff50eea209addc167dcf7 100644 --- a/src/OSspecific/Unix/signals/sigFpe.H +++ b/src/OSspecific/POSIX/signals/sigFpe.H @@ -107,7 +107,7 @@ public: // Member functions - void set(); + void set(const bool verbose); }; diff --git a/src/OSspecific/Unix/signals/sigInt.C b/src/OSspecific/POSIX/signals/sigInt.C similarity index 98% rename from src/OSspecific/Unix/signals/sigInt.C rename to src/OSspecific/POSIX/signals/sigInt.C index 922374fa7347e81b812cf10fe2f25b3337a1b25e..1f3555ec8746d86f7fc06a09ed0823185c006969 100644 --- a/src/OSspecific/Unix/signals/sigInt.C +++ b/src/OSspecific/POSIX/signals/sigInt.C @@ -81,7 +81,7 @@ Foam::sigInt::~sigInt() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::sigInt::set() +void Foam::sigInt::set(const bool verbose) { if (oldAction_.sa_handler) { diff --git a/src/OSspecific/Unix/signals/sigInt.H b/src/OSspecific/POSIX/signals/sigInt.H similarity index 98% rename from src/OSspecific/Unix/signals/sigInt.H rename to src/OSspecific/POSIX/signals/sigInt.H index 49cf7ea41e354c8a6c89ad28b1dbe5c31272fefe..1f89c47f97ea6dcb28741af7922b3146570aa901 100644 --- a/src/OSspecific/Unix/signals/sigInt.H +++ b/src/OSspecific/POSIX/signals/sigInt.H @@ -78,7 +78,7 @@ public: // Member functions - void set(); + void set(const bool verbose); }; diff --git a/src/OSspecific/Unix/signals/sigQuit.C b/src/OSspecific/POSIX/signals/sigQuit.C similarity index 98% rename from src/OSspecific/Unix/signals/sigQuit.C rename to src/OSspecific/POSIX/signals/sigQuit.C index 890d4d3430e3ad9eafcf8a3c15a16b7f08ff2aa2..7c67c903bc98772df9726a8c7bda5b491781b27d 100644 --- a/src/OSspecific/Unix/signals/sigQuit.C +++ b/src/OSspecific/POSIX/signals/sigQuit.C @@ -83,7 +83,7 @@ Foam::sigQuit::~sigQuit() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::sigQuit::set() +void Foam::sigQuit::set(const bool verbose) { if (oldAction_.sa_handler) { diff --git a/src/OSspecific/Unix/signals/sigQuit.H b/src/OSspecific/POSIX/signals/sigQuit.H similarity index 98% rename from src/OSspecific/Unix/signals/sigQuit.H rename to src/OSspecific/POSIX/signals/sigQuit.H index c130416a687a76f477b88d8df708c7f7da512dc5..23890cc6dbae3d24f352a87b420118bd04c52cc5 100644 --- a/src/OSspecific/Unix/signals/sigQuit.H +++ b/src/OSspecific/POSIX/signals/sigQuit.H @@ -78,7 +78,7 @@ public: // Member functions - void set(); + void set(const bool verbose); }; diff --git a/src/OSspecific/Unix/signals/sigSegv.C b/src/OSspecific/POSIX/signals/sigSegv.C similarity index 98% rename from src/OSspecific/Unix/signals/sigSegv.C rename to src/OSspecific/POSIX/signals/sigSegv.C index 270a21461979d4232b3df8f5586f67ff094fb119..14ab77ffe326c878e7cf1507c3d0cebb3e8b328f 100644 --- a/src/OSspecific/Unix/signals/sigSegv.C +++ b/src/OSspecific/POSIX/signals/sigSegv.C @@ -83,7 +83,7 @@ Foam::sigSegv::~sigSegv() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::sigSegv::set() +void Foam::sigSegv::set(const bool verbose) { if (oldAction_.sa_handler) { diff --git a/src/OSspecific/Unix/signals/sigSegv.H b/src/OSspecific/POSIX/signals/sigSegv.H similarity index 98% rename from src/OSspecific/Unix/signals/sigSegv.H rename to src/OSspecific/POSIX/signals/sigSegv.H index 2c405c9565bd665c303c76c60957a6a39e18be6e..5aae61de7d3319b1f9f5dbc950d13cf290671fd6 100644 --- a/src/OSspecific/Unix/signals/sigSegv.H +++ b/src/OSspecific/POSIX/signals/sigSegv.H @@ -78,7 +78,7 @@ public: // Member functions - void set(); + void set(const bool verbose); }; diff --git a/src/OSspecific/Unix/timer.C b/src/OSspecific/POSIX/timer.C similarity index 100% rename from src/OSspecific/Unix/timer.C rename to src/OSspecific/POSIX/timer.C diff --git a/src/OSspecific/Unix/timer.H b/src/OSspecific/POSIX/timer.H similarity index 100% rename from src/OSspecific/Unix/timer.H rename to src/OSspecific/POSIX/timer.H 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/containers/HashTables/HashTable/HashTable.H b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H index 826bb95741ba387d2cc86572119d1b3780020306..0e13b7c9a1d82016ff51b5915f09db97b6a42a64 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H @@ -330,6 +330,9 @@ public: inline T& operator*(); inline T& operator()(); + inline const T& operator*() const; + inline const T& operator()() const; + inline iterator& operator++(); inline iterator operator++(int); @@ -389,8 +392,8 @@ public: inline bool operator==(const iterator&) const; inline bool operator!=(const iterator&) const; - inline const T& operator*(); - inline const T& operator()(); + inline const T& operator*() const; + inline const T& operator()() const; inline const_iterator& operator++(); inline const_iterator operator++(int); diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H b/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H index 005979df3f166a27ae3a91250cde1f81f5f55321..e2655da4334ea4878513b757d56d1133156b35b5 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H @@ -220,16 +220,34 @@ inline bool Foam::HashTable<T, Key, Hash>::iterator::operator!= template<class T, class Key, class Hash> -inline T& Foam::HashTable<T, Key, Hash>::iterator::operator*() +inline T& +Foam::HashTable<T, Key, Hash>::iterator::operator*() { return elmtPtr_->obj_; } template<class T, class Key, class Hash> -inline T& Foam::HashTable<T, Key, Hash>::iterator::operator()() +inline T& +Foam::HashTable<T, Key, Hash>::iterator::operator()() { - return operator*(); + return elmtPtr_->obj_; +} + + +template<class T, class Key, class Hash> +inline const T& +Foam::HashTable<T, Key, Hash>::iterator::operator*() const +{ + return elmtPtr_->obj_; +} + + +template<class T, class Key, class Hash> +inline const T& +Foam::HashTable<T, Key, Hash>::iterator::operator()() const +{ + return elmtPtr_->obj_; } @@ -410,16 +428,18 @@ inline bool Foam::HashTable<T, Key, Hash>::const_iterator::operator!= template<class T, class Key, class Hash> -inline const T& Foam::HashTable<T, Key, Hash>::const_iterator::operator*() +inline const T& +Foam::HashTable<T, Key, Hash>::const_iterator::operator*() const { return elmtPtr_->obj_; } #ifndef __CINT__ template<class T, class Key, class Hash> -inline const T& Foam::HashTable<T, Key, Hash>::const_iterator::operator()() +inline const T& +Foam::HashTable<T, Key, Hash>::const_iterator::operator()() const { - return operator*(); + return elmtPtr_->obj_; } #endif diff --git a/src/OpenFOAM/containers/Lists/List/List.H b/src/OpenFOAM/containers/Lists/List/List.H index 639db9bbd20f62d1b66c32affcb5f0d268ad3631..434320cf5b21b980bbbbf286a57df2186e4e98fe 100644 --- a/src/OpenFOAM/containers/Lists/List/List.H +++ b/src/OpenFOAM/containers/Lists/List/List.H @@ -241,17 +241,27 @@ public: }; +//- Read a bracket-delimited list, or handle a single value as list of size 1. +// For example, +// @code +// wList = readList<word>(IStringStream("(patch1 patch2 patch3)")()); +// wList = readList<word>(IStringStream("patch0")()); +// @endcode +// Mostly useful for handling command-line arguments. template<class T> -void sort(List<T>& a); +List<T> readList(Istream&); + +template<class T> +void sort(List<T>&); template<class T, class Cmp> -void sort(List<T>& a, const Cmp&); +void sort(List<T>&, const Cmp&); template<class T> -void stableSort(List<T>& a); +void stableSort(List<T>&); template<class T, class Cmp> -void stableSort(List<T>& a, const Cmp&); +void stableSort(List<T>&, const Cmp&); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/containers/Lists/List/ListIO.C b/src/OpenFOAM/containers/Lists/List/ListIO.C index d6238ae09108a455f29a28b070f05728d1adf098..2ba1d4f00e33205fd5fc3f891143cf79a0bdcc32 100644 --- a/src/OpenFOAM/containers/Lists/List/ListIO.C +++ b/src/OpenFOAM/containers/Lists/List/ListIO.C @@ -131,7 +131,7 @@ Foam::Istream& Foam::operator>>(Istream& is, List<T>& L) if (firstToken.pToken() != token::BEGIN_LIST) { FatalIOErrorIn("operator>>(Istream&, List<T>&)", is) - << "incorrect first token, expected '(' or '{', found " + << "incorrect first token, expected '(', found " << firstToken.info() << exit(FatalIOError); } @@ -156,4 +156,37 @@ Foam::Istream& Foam::operator>>(Istream& is, List<T>& L) return is; } + +template<class T> +Foam::List<T> Foam::readList(Istream& is) +{ + List<T> L; + token firstToken(is); + is.putBack(firstToken); + + if (firstToken.isPunctuation()) + { + if (firstToken.pToken() != token::BEGIN_LIST) + { + FatalIOErrorIn("readList<T>(Istream&)", is) + << "incorrect first token, expected '(', found " + << firstToken.info() + << exit(FatalIOError); + } + + // read via a singly-linked list + L = SLList<T>(is); + } + else + { + // create list with a single item + L.setSize(1); + + is >> L[0]; + } + + return L; +} + + // ************************************************************************* // 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/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index 0a3cbedc187b59c2dd02dacb156638662ea190d2..cc2c8e710da75ba158d1b8062a4ad508c50d57ee 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -109,20 +109,20 @@ void Foam::Time::setControls() else { // Search directory for valid time directories - instantList Times = findTimes(path()); + instantList timeDirs = findTimes(path()); if (startFrom == "firstTime") { - if (Times.size()) + if (timeDirs.size()) { - startTime_ = Times[0].value(); + startTime_ = timeDirs[0].value(); } } else if (startFrom == "latestTime") { - if (Times.size()) + if (timeDirs.size()) { - startTime_ = Times[Times.size()-1].value(); + startTime_ = timeDirs[timeDirs.size()-1].value(); } } else @@ -385,13 +385,13 @@ Foam::instantList Foam::Time::times() const Foam::word Foam::Time::findInstancePath(const instant& t) const { - instantList times = Time::findTimes(path()); + instantList timeDirs = findTimes(path()); - forAllReverse(times, i) + forAllReverse(timeDirs, timeI) { - if (times[i] == t) + if (timeDirs[timeI] == t) { - return times[i].name(); + return timeDirs[timeI].name(); } } @@ -401,37 +401,37 @@ Foam::word Foam::Time::findInstancePath(const instant& t) const Foam::instant Foam::Time::findClosestTime(const scalar t) const { - instantList times = Time::findTimes(path()); + instantList timeDirs = findTimes(path()); - // If there is only one time it is "constant" so return it - if (times.size() == 1) + // there is only one time (likely "constant") so return it + if (timeDirs.size() == 1) { - return times[0]; + return timeDirs[0]; } - if (t < times[1].value()) + if (t < timeDirs[1].value()) { - return times[1]; + return timeDirs[1]; } - else if (t > times[times.size() - 1].value()) + else if (t > timeDirs[timeDirs.size()-1].value()) { - return times[times.size() - 1]; + return timeDirs[timeDirs.size()-1]; } label nearestIndex = -1; scalar deltaT = GREAT; - for (label i=1; i < times.size(); i++) + for (label timeI=1; timeI < timeDirs.size(); ++timeI) { - scalar diff = mag(times[i].value() - t); + scalar diff = mag(timeDirs[timeI].value() - t); if (diff < deltaT) { deltaT = diff; - nearestIndex = i; + nearestIndex = timeI; } } - return times[nearestIndex]; + return timeDirs[nearestIndex]; } @@ -440,29 +440,29 @@ Foam::instant Foam::Time::findClosestTime(const scalar t) const // // Foam::instant Foam::Time::findClosestTime(const scalar t) const // { -// instantList times = Time::findTimes(path()); -// label timeIndex = min(findClosestTimeIndex(times, t), 0); -// return times[timeIndex]; +// instantList timeDirs = findTimes(path()); +// label timeIndex = min(findClosestTimeIndex(timeDirs, t), 0); +// return timeDirs[timeIndex]; // } Foam::label Foam::Time::findClosestTimeIndex ( - const instantList& times, + const instantList& timeDirs, const scalar t ) { label nearestIndex = -1; scalar deltaT = GREAT; - forAll (times, i) + forAll(timeDirs, timeI) { - if (times[i].name() == "constant") continue; + if (timeDirs[timeI].name() == "constant") continue; - scalar diff = fabs(times[i].value() - t); + scalar diff = mag(timeDirs[timeI].value() - t); if (diff < deltaT) { deltaT = diff; - nearestIndex = i; + nearestIndex = timeI; } } diff --git a/src/OpenFOAM/db/Time/timeSelector.C b/src/OpenFOAM/db/Time/timeSelector.C index 8cd7940ccff7884a15a245fabed7d3a0c0f14e15..caf8c4f3a0fc608c92bc92b16ea956eb4b9c96ec 100644 --- a/src/OpenFOAM/db/Time/timeSelector.C +++ b/src/OpenFOAM/db/Time/timeSelector.C @@ -170,7 +170,7 @@ Foam::List<Foam::instant> Foam::timeSelector::select // determine latestTime selection (if any) // this must appear before the -time option processing label latestIdx = -1; - if (args.options().found("latestTime")) + if (args.optionFound("latestTime")) { selectTimes = false; latestIdx = timeDirs.size() - 1; @@ -182,12 +182,12 @@ Foam::List<Foam::instant> Foam::timeSelector::select } } - if (args.options().found("time")) + if (args.optionFound("time")) { // can match 0/, but can never match constant/ selectTimes = timeSelector ( - IStringStream(args.options()["time"])() + args.optionLookup("time")() ).selected(timeDirs); } @@ -201,13 +201,13 @@ Foam::List<Foam::instant> Foam::timeSelector::select if (constantIdx >= 0) { // only add constant/ if specifically requested - selectTimes[constantIdx] = args.options().found("constant"); + selectTimes[constantIdx] = args.optionFound("constant"); } // special treatment for 0/ if (zeroIdx >= 0) { - if (args.options().found("noZero")) + if (args.optionFound("noZero")) { // exclude 0/ if specifically requested selectTimes[zeroIdx] = false; @@ -215,7 +215,7 @@ Foam::List<Foam::instant> Foam::timeSelector::select else if (argList::validOptions.found("zeroTime")) { // with -zeroTime enabled, drop 0/ unless specifically requested - selectTimes[zeroIdx] = args.options().found("zeroTime"); + selectTimes[zeroIdx] = args.optionFound("zeroTime"); } } diff --git a/src/OpenFOAM/db/Time/timeSelector.H b/src/OpenFOAM/db/Time/timeSelector.H index 1138f1b0e5013436dcdc9658d4dbe537b54c9611..ecdb92bb33297157ef58b7f5d073dda150fd9405 100644 --- a/src/OpenFOAM/db/Time/timeSelector.H +++ b/src/OpenFOAM/db/Time/timeSelector.H @@ -85,7 +85,7 @@ class argList; class Time; /*---------------------------------------------------------------------------*\ - Class timeSelector Declaration + Class timeSelector Declaration \*---------------------------------------------------------------------------*/ class timeSelector @@ -136,7 +136,7 @@ public: ); //- Return the set of times selected based on the argList options - static List<Foam::instant> select + static List<instant> select ( const List<instant>&, const argList& args @@ -144,7 +144,7 @@ public: //- Return the set of times selected based on the argList options // also set the runTime to the first instance - static List<Foam::instant> select0 + static List<instant> select0 ( Time& runTime, const argList& args diff --git a/src/OpenFOAM/db/regIOobject/regIOobject.C b/src/OpenFOAM/db/regIOobject/regIOobject.C index a5a5e8e1e3dfbe847b6d4b5667e8faaf8af5149a..0f27c101f1b9fdaee9182429abc7f30091129300 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobject.C +++ b/src/OpenFOAM/db/regIOobject/regIOobject.C @@ -140,7 +140,7 @@ bool Foam::regIOobject::checkIn() { WarningIn("regIOobject::checkIn()") << "failed to register object " << objectPath() - << " the name already exists in the objectRegistry" + << " the name already exists in the objectRegistry" << endl; } } diff --git a/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.C b/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.C new file mode 100644 index 0000000000000000000000000000000000000000..783581f5c5727429db49881491c64a4978a6ad15 --- /dev/null +++ b/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.C @@ -0,0 +1,112 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "DynamicField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Static Members * * * * * * * * * * * * * * // + +template<class Type> +const char* const DynamicField<Type>::typeName("DynamicField"); + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +DynamicField<Type>::DynamicField(Istream& is) +: + Field<Type>(is), + capacity_(Field<Type>::size()) +{} + + +template<class Type> +tmp<DynamicField<Type> > DynamicField<Type>::clone() const +{ + return tmp<DynamicField<Type> >(new DynamicField<Type>(*this)); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +void DynamicField<Type>::setSize(const label nElem) +{ + // allocate more capacity? + if (nElem > capacity_) + { + capacity_ = max(nElem, label(1 + capacity_*2)); + + Field<Type>::setSize(capacity_); + } + + // adjust addressed size + Field<Type>::size(nElem); +} + + +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + + +// * * * * * * * * * * * * * * * IOstream Operator * * * * * * * * * * * * * // + +template<class Type> +Ostream& operator<<(Ostream& os, const DynamicField<Type>& f) +{ + os << static_cast<const Field<Type>&>(f); + return os; +} + + +template<class Type> +Ostream& operator<<(Ostream& os, const tmp<DynamicField<Type> >& tf) +{ + os << tf(); + tf.clear(); + return os; +} + + +template<class Type> +Istream& operator>>(Istream& is, DynamicField<Type>& lst) +{ + is >> static_cast<Field<Type>&>(lst); + lst.capacity_ = lst.Field<Type>::size(); + + return is; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + + +// ************************************************************************* // diff --git a/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H b/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H new file mode 100644 index 0000000000000000000000000000000000000000..79c9cd4bae2f48d2273199ce81afc4a7aa2e06c2 --- /dev/null +++ b/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H @@ -0,0 +1,227 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::DynamicField + +Description + Dynamically sized Field. WIP. + +SourceFiles + DynamicField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef DynamicField_H +#define DynamicField_H + +#include "Field.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of friend functions and operators + +template<class Type> +class DynamicField; + +template<class Type> +Ostream& operator<<(Ostream&, const DynamicField<Type>&); + +template<class Type> +Ostream& operator<<(Ostream&, const tmp<DynamicField<Type> >&); + +template<class Type> +Istream& operator>>(Istream&, DynamicField<Type>&); + + +/*---------------------------------------------------------------------------*\ + Class DynamicField Declaration +\*---------------------------------------------------------------------------*/ + +#include "CintDefs.H" + +template<class Type> +class DynamicField +: + public Field<Type> //private Field<Type> +{ + + // Private data + + //- The capacity (allocated size) of the underlying field. + label capacity_; + + + //- Construct given size and initial value + DynamicField(const label, const Type&); + + //- Construct as copy of tmp<DynamicField> +# ifdef ConstructFromTmp + DynamicField(const tmp<DynamicField<Type> >&); +# endif + + //- Construct from a dictionary entry + DynamicField(const word&, const dictionary&, const label); + +public: + + // Static data members + + static const char* const typeName; + + + // Static Member Functions + + //- Return a null field + inline static const DynamicField<Type>& null() + { + return *reinterpret_cast< DynamicField<Type>* >(0); + } + + + // Constructors + + //- Construct null + // Used for temporary fields which are initialised after construction + DynamicField(); + + //- Construct given size + // Used for temporary fields which are initialised after construction + explicit inline DynamicField(const label); + + //- Construct as copy of a UList\<Type\> + explicit inline DynamicField(const UList<Type>&); + + //- Construct by transferring the List contents + explicit inline DynamicField(const Xfer<List<Type> >&); + + //- Construct by 1 to 1 mapping from the given field + inline DynamicField + ( + const UList<Type>& mapF, + const labelList& mapAddressing + ); + + //- Construct by interpolative mapping from the given field + inline DynamicField + ( + const UList<Type>& mapF, + const labelListList& mapAddressing, + const scalarListList& weights + ); + + //- Construct by mapping from the given field + inline DynamicField + ( + const UList<Type>& mapF, + const FieldMapper& map + ); + + //- Construct as copy + inline DynamicField(const DynamicField<Type>&); + + //- Construct as copy or re-use as specified. + inline DynamicField(DynamicField<Type>&, bool reUse); + + //- Construct by transferring the Field contents + inline DynamicField(const Xfer<DynamicField<Type> >&); + + //- Construct from Istream + inline DynamicField(Istream&); + + //- Clone + tmp<DynamicField<Type> > clone() const; + + + // Member Functions + + //- Size of the underlying storage. + inline label capacity() const; + + //- Append an element at the end of the list + inline void append(const Type&); + + //- Alter the addressed list size. + // New space will be allocated if required. + // Use this to resize the list prior to using the operator[] for + // setting values (as per List usage). + void setSize(const label nElem); + + // Member operators + + inline void operator=(const DynamicField<Type>&); + inline void operator=(const UList<Type>&); + inline void operator=(const tmp<DynamicField<Type> >&); + + //- Return element of Field. + inline Type& operator[](const label i); + + //- Return element of constant Field. + inline const Type& operator[](const label) const; + + // IOstream operators + + friend Ostream& operator<< + #ifndef __CINT__ + <Type> + #endif + (Ostream&, const DynamicField<Type>&); + + friend Ostream& operator<< + #ifndef __CINT__ + <Type> + #endif + (Ostream&, const tmp<DynamicField<Type> >&); + + friend Istream& operator>> + #ifndef __CINT__ + <Type> + #endif + (Istream&, DynamicField<Type>&); +}; + +#include "CintUndefs.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "DynamicFieldI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "DynamicField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/fields/Fields/DynamicField/DynamicFieldI.H b/src/OpenFOAM/fields/Fields/DynamicField/DynamicFieldI.H new file mode 100644 index 0000000000000000000000000000000000000000..8680fbff25a1a81c3562d44f3944cb3f429a95d0 --- /dev/null +++ b/src/OpenFOAM/fields/Fields/DynamicField/DynamicFieldI.H @@ -0,0 +1,221 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "DynamicField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +DynamicField<Type>::DynamicField() +: + Field<Type>(), + capacity_(0) +{} + + +template<class Type> +DynamicField<Type>::DynamicField(const label size) +: + Field<Type>(size), + capacity_(Field<Type>::size()) +{ + Field<Type>::size(0); +} + + +template<class Type> +inline Foam::DynamicField<Type>::DynamicField +( + const UList<Type>& lst +) +: + Field<Type>(lst), + capacity_(Field<Type>::size()) +{} + + +template<class Type> +inline Foam::DynamicField<Type>::DynamicField +( + const Xfer<List<Type> >& lst +) +: + Field<Type>(lst), + capacity_(Field<Type>::size()) +{} + + +template<class Type> +DynamicField<Type>::DynamicField +( + const UList<Type>& mapF, + const labelList& mapAddressing +) +: + Field<Type>(mapF, mapAddressing), + capacity_(Field<Type>::size()) +{} + + +template<class Type> +DynamicField<Type>::DynamicField +( + const UList<Type>& mapF, + const labelListList& mapAddressing, + const scalarListList& weights +) +: + Field<Type>(mapF, mapAddressing, weights), + capacity_(Field<Type>::size()) +{} + + +//- Construct by mapping from the given field +template<class Type> +DynamicField<Type>::DynamicField +( + const UList<Type>& mapF, + const FieldMapper& map +) +: + DynamicField<Type>(mapF, map), + capacity_(Field<Type>::size()) +{} + + +template<class Type> +DynamicField<Type>::DynamicField(const DynamicField<Type>& f) +: + Field<Type>(f), + capacity_(Field<Type>::size()) +{} + + +template<class Type> +DynamicField<Type>::DynamicField(DynamicField<Type>& f, bool reUse) +: + Field<Type>(f, reUse), + capacity_(Field<Type>::size()) +{} + + +template<class Type> +DynamicField<Type>::DynamicField(const Xfer<DynamicField<Type> >& f) +: + Field<Type>(f), + capacity_(Field<Type>::size()) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +Foam::label DynamicField<Type>::capacity() const +{ + return capacity_; +} + + +template<class Type> +void DynamicField<Type>::append(const Type& t) +{ + label elemI = Field<Type>::size(); + setSize(elemI + 1); + + this->operator[](elemI) = t; +} + + +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + +template<class Type> +void DynamicField<Type>::operator=(const DynamicField<Type>& rhs) +{ + if (this == &rhs) + { + FatalErrorIn("DynamicField<Type>::operator=(const DynamicField<Type>&)") + << "attempted assignment to self" + << abort(FatalError); + } + + Field<Type>::operator=(rhs); + capacity_ = Field<Type>::size(); +} + + +template<class Type> +void DynamicField<Type>::operator=(const UList<Type>& rhs) +{ + Field<Type>::operator=(rhs); + capacity_ = Field<Type>::size(); +} + + +template<class Type> +void DynamicField<Type>::operator=(const tmp<DynamicField>& rhs) +{ + if (this == &(rhs())) + { + FatalErrorIn("DynamicField<Type>::operator=(const tmp<DynamicField>&)") + << "attempted assignment to self" + << abort(FatalError); + } + + // This is dodgy stuff, don't try it at home. + DynamicField* fieldPtr = rhs.ptr(); + List<Type>::transfer(*fieldPtr); + delete fieldPtr; + capacity_ = Field<Type>::size(); +} + + +template<class Type> +Type& DynamicField<Type>::operator[](const label i) +{ + return Field<Type>::operator[](i); +} + + +template<class Type> +const Type& DynamicField<Type>::operator[](const label i) const +{ + return Field<Type>::operator[](i); +} + + +// * * * * * * * * * * * * * * * IOstream Operator * * * * * * * * * * * * * // + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C index 4a45b56f4516358e835530e8d81ae4c60ac22f6f..df698693940e49279bbc3078941af1090a0c232c 100644 --- a/src/OpenFOAM/global/argList/argList.C +++ b/src/OpenFOAM/global/argList/argList.C @@ -526,10 +526,10 @@ Foam::argList::argList // Switch on signal trapping. We have to wait until after Pstream::init // since this sets up its own ones. - sigFpe_.set(); - sigInt_.set(); - sigQuit_.set(); - sigSegv_.set(); + sigFpe_.set(bannerEnabled); + sigInt_.set(bannerEnabled); + sigQuit_.set(bannerEnabled); + sigSegv_.set(bannerEnabled); if (Pstream::master() && bannerEnabled) { diff --git a/src/OpenFOAM/global/argList/argList.H b/src/OpenFOAM/global/argList/argList.H index c5fcf5d53c7ab2aed02df2565430d8eb153d2a9b..9fdb0bb6d2224ceebdc76b53a66239849c5dd4e4 100644 --- a/src/OpenFOAM/global/argList/argList.H +++ b/src/OpenFOAM/global/argList/argList.H @@ -56,10 +56,10 @@ Description global case (same for serial and parallel jobs). Note - - Adjustment of the valid (mandatory) arguments by directly manipulating - the static member argList::validArgs. - - Adjustment of the valid options by directly manipulating - the static member argList::validOptions. + - Adjustment of the valid (mandatory) arguments + by directly manipulating the static member argList::validArgs. + - Adjustment of the valid options + by directly manipulating the static member argList::validOptions. SourceFiles argList.C @@ -76,6 +76,7 @@ SourceFiles #include "word.H" #include "fileName.H" #include "parRun.H" +#include "IStringStream.H" #include "sigFpe.H" #include "sigInt.H" @@ -165,6 +166,36 @@ public: // Access + //- Name of executable + const word& executable() const + { + return executable_; + } + + //- Return root path + const fileName& rootPath() const + { + return rootPath_; + } + + //- Return case name + const fileName& globalCaseName() const + { + return globalCase_; + } + + //- Return case name (parallel run) or global case (serial run) + const fileName& caseName() const + { + return case_; + } + + //- Return the path + fileName path() const + { + return rootPath()/caseName(); + } + //- Return arguments const stringList& args() const { @@ -181,34 +212,54 @@ public: return options_; } - //- Name of executable - const word& executable() const + //- Return the argument string associated with the named option + const string& option(const word& opt) const { - return executable_; + return options_.operator[](opt); } - //- Return root path - const fileName& rootPath() const + //- Return true if the named option is found + bool optionFound(const word& opt) const { - return rootPath_; + return options_.found(opt); } - //- Return case name - const fileName& globalCaseName() const + //- Return an IStringStream to the named option + IStringStream optionLookup(const word& opt) const { - return globalCase_; + return IStringStream(option(opt)); } - //- Return case name (parallel run) or global case (serial run) - const fileName& caseName() const + //- Read a value from the named option + template<class T> + T optionRead(const word& opt) const { - return case_; + T val; + optionLookup(opt)() >> val; + return val; } - //- Return the path - fileName path() const + //- Read a value from the named option if present. + // Return true if the named option was found. + template<class T> + bool optionReadIfPresent(const word& opt, T& val) const { - return rootPath()/caseName(); + if (optionFound(opt)) + { + optionLookup(opt)() >> val; + return true; + } + else + { + return false; + } + } + + //- Read a List of values from the named option + template<class T> + List<T> optionReadList(const word& opt) const + { + return readList<T>(optionLookup(opt)()); } diff --git a/src/OpenFOAM/include/CintDefs.H b/src/OpenFOAM/include/CintDefs.H index 7dcb75b6d47fab143d80ce84f04e27547288aa84..90e1f62a2f1a2cd098a4b8ecac448273cbae4635 100644 --- a/src/OpenFOAM/include/CintDefs.H +++ b/src/OpenFOAM/include/CintDefs.H @@ -1,6 +1,6 @@ #ifdef __CINT__ -#define tmp Foam::tmp -#define UList Foam::UList -#define List Foam::List -#define InfoProxy Foam::InfoProxy +# define tmp Foam::tmp +# define UList Foam::UList +# define List Foam::List +# define InfoProxy Foam::InfoProxy #endif diff --git a/src/OpenFOAM/include/CintUndefs.H b/src/OpenFOAM/include/CintUndefs.H index 20a47aea2aef9cf4967c63cc1e0485fd8db01130..6b0b69e99ceba4cca1744c51d733c6b685329344 100644 --- a/src/OpenFOAM/include/CintUndefs.H +++ b/src/OpenFOAM/include/CintUndefs.H @@ -1,6 +1,6 @@ #ifdef __CINT__ -#undef tmp -#undef UList -#undef List -#undef InfoProxy +# undef tmp +# undef UList +# undef List +# undef InfoProxy #endif diff --git a/src/OpenFOAM/include/OSspecific.H b/src/OpenFOAM/include/OSspecific.H index e4227879a6a55f17fc35c8464885cade7c554f69..d04243c23dbe9b38fa16d3395da0a5010ce7a1fb 100644 --- a/src/OpenFOAM/include/OSspecific.H +++ b/src/OpenFOAM/include/OSspecific.H @@ -26,11 +26,11 @@ InNamespace Foam Description - Functions used by OpenFOAM that are specific to the UNIX operating system - and need to be replaced or emulated on other systems. + Functions used by OpenFOAM that are specific to POSIX compliant + operating systems and need to be replaced or emulated on other systems. SourceFiles - Unix.C + POSIX.C \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/include/addConstantOption.H b/src/OpenFOAM/include/addConstantOption.H deleted file mode 100644 index 22ef88d33b07526849dc9a3f1a01509675db5501..0000000000000000000000000000000000000000 --- a/src/OpenFOAM/include/addConstantOption.H +++ /dev/null @@ -1 +0,0 @@ - argList::validOptions.insert("constant", ""); diff --git a/src/OpenFOAM/include/addLatestTimeOption.H b/src/OpenFOAM/include/addLatestTimeOption.H deleted file mode 100644 index d241032e9a1c6b1ce9e5b77ca54d3f1eca634ae9..0000000000000000000000000000000000000000 --- a/src/OpenFOAM/include/addLatestTimeOption.H +++ /dev/null @@ -1 +0,0 @@ - argList::validOptions.insert("latestTime", ""); diff --git a/src/OpenFOAM/include/addNoZeroOption.H b/src/OpenFOAM/include/addNoZeroOption.H deleted file mode 100644 index deb25ee153254ca6e6478417e40bd5fc1000c7a3..0000000000000000000000000000000000000000 --- a/src/OpenFOAM/include/addNoZeroOption.H +++ /dev/null @@ -1 +0,0 @@ - argList::validOptions.insert("noZero", ""); diff --git a/src/OpenFOAM/include/addRegionOption.H b/src/OpenFOAM/include/addRegionOption.H index 382836d3299051bca85c37a483628aa602a883de..4ece251a17240b9054d84f6b3da0d759222047e7 100644 --- a/src/OpenFOAM/include/addRegionOption.H +++ b/src/OpenFOAM/include/addRegionOption.H @@ -1 +1,5 @@ - argList::validOptions.insert("region", "name"); +// +// addRegionOption.H +// ~~~~~~~~~~~~~~~~~ + + Foam::argList::validOptions.insert("region", "name"); diff --git a/src/OpenFOAM/include/addTimeOption.H b/src/OpenFOAM/include/addTimeOption.H deleted file mode 100644 index 1151c51dfde6b8e1a0e4e36f23117b21b8c3ba0f..0000000000000000000000000000000000000000 --- a/src/OpenFOAM/include/addTimeOption.H +++ /dev/null @@ -1 +0,0 @@ - argList::validOptions.insert("time", "time"); diff --git a/src/OpenFOAM/include/addTimeOptions.H b/src/OpenFOAM/include/addTimeOptions.H index 016d9c3ea56e9a62e9a63df16fa0bed71d2a2b03..ec57beec07a6b153ed55ccf52b3600ea888c8ca4 100644 --- a/src/OpenFOAM/include/addTimeOptions.H +++ b/src/OpenFOAM/include/addTimeOptions.H @@ -1,4 +1,8 @@ -#include "addConstantOption.H" -#include "addTimeOption.H" -#include "addLatestTimeOption.H" -#include "addNoZeroOption.H" +// +// addTimeOptions.H +// ~~~~~~~~~~~~~~~~ + + Foam::argList::validOptions.insert("constant", ""); + Foam::argList::validOptions.insert("latestTime", ""); + Foam::argList::validOptions.insert("noZero", ""); + Foam::argList::validOptions.insert("time", "time"); diff --git a/src/OpenFOAM/include/addTimeOptionsNoConstant.H b/src/OpenFOAM/include/addTimeOptionsNoConstant.H deleted file mode 100644 index 91056f6a3a49f7735ffc137a0404095cc172c549..0000000000000000000000000000000000000000 --- a/src/OpenFOAM/include/addTimeOptionsNoConstant.H +++ /dev/null @@ -1,2 +0,0 @@ -#include "addTimeOption.H" -#include "addLatestTimeOption.H" diff --git a/src/OpenFOAM/include/checkConstantOption.H b/src/OpenFOAM/include/checkConstantOption.H index 4b5dbc4356bf1b5cdf0f9bfd4965db5bb023e816..9f39ac65413c0f6bbb1b510993f3e122fea3955f 100644 --- a/src/OpenFOAM/include/checkConstantOption.H +++ b/src/OpenFOAM/include/checkConstantOption.H @@ -1,8 +1,14 @@ +// +// checkConstantOption.H +// ~~~~~~~~~~~~~~~~~~~~~ +// unless -constant is present, skip startTime if it is "constant" + if ( - !args.options().found("constant") - && Times.size() > 1 + !args.optionFound("constant") + && (startTime < Times.size()-1) + && (Times[startTime].name() == "constant") ) - { - startTime = 1; + { + startTime++; } diff --git a/src/OpenFOAM/include/checkLatestTimeOption.H b/src/OpenFOAM/include/checkLatestTimeOption.H deleted file mode 100644 index 9256865d2fa40e932f4aa062a53a9621a1672a62..0000000000000000000000000000000000000000 --- a/src/OpenFOAM/include/checkLatestTimeOption.H +++ /dev/null @@ -1,4 +0,0 @@ - if (args.options().found("latestTime")) - { - startTime = Times.size() - 1; - } diff --git a/src/OpenFOAM/include/checkTimeOption.H b/src/OpenFOAM/include/checkTimeOption.H index 70759dd81ba12b91617ed714a2ef9be8040b236a..64ef62440f0b18dda6d70dd9395ef6d0f054031a 100644 --- a/src/OpenFOAM/include/checkTimeOption.H +++ b/src/OpenFOAM/include/checkTimeOption.H @@ -1,7 +1,17 @@ - if (args.options().found("time")) +// +// checkTimeOption.H +// ~~~~~~~~~~~~~~~~~ +// check -time and -latestTime options + + if (args.optionFound("time")) { - scalar timeValue(readScalar(IStringStream(args.options()["time"])())); + Foam::scalar timeValue = args.optionRead<scalar>("time"); - startTime = Time::findClosestTimeIndex(Times, timeValue); + startTime = Foam::Time::findClosestTimeIndex(Times, timeValue); endTime = startTime + 1; } + + if (args.optionFound("latestTime")) + { + startTime = Times.size() - 1; + } diff --git a/src/OpenFOAM/include/checkTimeOptions.H b/src/OpenFOAM/include/checkTimeOptions.H index 121b17797e5db58a0e181481c11c7c0a2a41b7d3..7b2b15b32955145cb08c801e89e1e15bc57c26a5 100644 --- a/src/OpenFOAM/include/checkTimeOptions.H +++ b/src/OpenFOAM/include/checkTimeOptions.H @@ -1,6 +1,12 @@ - label startTime = 0; - label endTime = Times.size(); +// +// checkTimeOptions.H +// ~~~~~~~~~~~~~~~~~~ + Foam::label startTime = 0; + Foam::label endTime = Times.size(); + +// unless -constant is present, skip startTime if it is "constant" # include "checkConstantOption.H" + +// check -time and -latestTime options # include "checkTimeOption.H" -# include "checkLatestTimeOption.H" diff --git a/src/OpenFOAM/include/checkTimeOptionsNoConstant.H b/src/OpenFOAM/include/checkTimeOptionsNoConstant.H index 4d5bfced69f7eebd1750b8155449bd4e6d94b6e6..407903ddc17ba8e5f0d2021f8bfe6dbb8b8f2f68 100644 --- a/src/OpenFOAM/include/checkTimeOptionsNoConstant.H +++ b/src/OpenFOAM/include/checkTimeOptionsNoConstant.H @@ -1,5 +1,9 @@ - label startTime = 0; - label endTime = Times.size(); +// +// checkTimeOptionsNoConstant.H +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Foam::label startTime = 0; + Foam::label endTime = Times.size(); + +// check -time and -latestTime options # include "checkTimeOption.H" -# include "checkLatestTimeOption.H" diff --git a/src/OpenFOAM/include/createMesh.H b/src/OpenFOAM/include/createMesh.H index a85c239f41f0abd121da986440ee2df5525b7722..630494649d5642631313e5226115de446a515e1d 100644 --- a/src/OpenFOAM/include/createMesh.H +++ b/src/OpenFOAM/include/createMesh.H @@ -1,4 +1,9 @@ - Foam::Info<< "Create mesh for time = " +// +// createMesh.H +// ~~~~~~~~~~~~ + + Foam::Info + << "Create mesh for time = " << runTime.timeName() << Foam::nl << Foam::endl; Foam::fvMesh mesh diff --git a/src/OpenFOAM/include/createMeshNoClear.H b/src/OpenFOAM/include/createMeshNoClear.H index d0e61ab7f8b606f66e85069648cbecd205f980aa..8526a37be6ec2c42d0d3d6581e265676ec229ec1 100644 --- a/src/OpenFOAM/include/createMeshNoClear.H +++ b/src/OpenFOAM/include/createMeshNoClear.H @@ -1,13 +1,19 @@ - Info<< "Create mesh, no clear-out for time = " - << runTime.timeName() << nl << endl; +// +// createMeshNoClear.H +// ~~~~~~~~~~~~~~~~~~~ +// currently identical to createMesh.H - fvMesh mesh + Foam::Info + << "Create mesh, no clear-out for time = " + << runTime.timeName() << Foam::nl << Foam::endl; + + Foam::fvMesh mesh ( - IOobject + Foam::IOobject ( - fvMesh::defaultRegion, + Foam::fvMesh::defaultRegion, runTime.timeName(), runTime, - IOobject::MUST_READ + Foam::IOobject::MUST_READ ) ); diff --git a/src/OpenFOAM/include/createNamedMesh.H b/src/OpenFOAM/include/createNamedMesh.H index 2caebe8583985b5d85543c15bfdb730dfb972b43..f61ec2bd6e8836d39d895b4a0604a69e26e2c4cb 100644 --- a/src/OpenFOAM/include/createNamedMesh.H +++ b/src/OpenFOAM/include/createNamedMesh.H @@ -1,27 +1,30 @@ - word regionName; +// +// createNamedMesh.H +// ~~~~~~~~~~~~~~~~~ - if (args.options().found("region")) - { - regionName = args.options()["region"]; + Foam::word regionName; - Info<< "Create mesh " << regionName << " for time = " - << runTime.timeName() << nl << endl; + if (args.optionReadIfPresent("region", regionName)) + { + Foam::Info + << "Create mesh " << regionName << " for time = " + << runTime.timeName() << Foam::nl << Foam::endl; } else { - regionName = fvMesh::defaultRegion; - - Info<< "Create mesh for time = " - << runTime.timeName() << nl << endl; + regionName = Foam::fvMesh::defaultRegion; + Foam::Info + << "Create mesh for time = " + << runTime.timeName() << Foam::nl << Foam::endl; } - fvMesh mesh + Foam::fvMesh mesh ( - IOobject + Foam::IOobject ( regionName, runTime.timeName(), runTime, - IOobject::MUST_READ + Foam::IOobject::MUST_READ ) ); diff --git a/src/OpenFOAM/include/createNamedPolyMesh.H b/src/OpenFOAM/include/createNamedPolyMesh.H index 4bb8d1d34a53ed5133b580e2ee77c33e50bad5c6..bee8601c743ee3547f154b9c800c9cb2f900e0e0 100644 --- a/src/OpenFOAM/include/createNamedPolyMesh.H +++ b/src/OpenFOAM/include/createNamedPolyMesh.H @@ -1,27 +1,30 @@ - word regionName; +// +// createNamedPolyMesh.H +// ~~~~~~~~~~~~~~~~~~~~~ - if (args.options().found("region")) - { - regionName = args.options()["region"]; + Foam::word regionName; - Info<< "Create polyMesh " << regionName << " for time = " - << runTime.timeName() << nl << endl; + if (args.optionReadIfPresent("region", regionName)) + { + Foam::Info + << "Create polyMesh " << regionName << " for time = " + << runTime.timeName() << Foam::nl << Foam::endl; } else { - regionName = polyMesh::defaultRegion; - - Info<< "Create polyMesh for time = " - << runTime.timeName() << nl << endl; + regionName = Foam::polyMesh::defaultRegion; + Foam::Info + << "Create polyMesh for time = " + << runTime.timeName() << Foam::nl << Foam::endl; } - polyMesh mesh + Foam::polyMesh mesh ( - IOobject + Foam::IOobject ( regionName, runTime.timeName(), runTime, - IOobject::MUST_READ + Foam::IOobject::MUST_READ ) ); diff --git a/src/OpenFOAM/include/createPolyMesh.H b/src/OpenFOAM/include/createPolyMesh.H index 3249a6c02aade2f70a342a25157f3fca2c8fdb1e..02e25d1c519ab1a92fb56aa7d1e71baaf71b36e9 100644 --- a/src/OpenFOAM/include/createPolyMesh.H +++ b/src/OpenFOAM/include/createPolyMesh.H @@ -1,13 +1,18 @@ - Info<< "Create polyMesh for time = " - << runTime.timeName() << nl << endl; +// +// createPolyMesh.H +// ~~~~~~~~~~~~~~~~ - polyMesh mesh + Foam::Info + << "Create polyMesh for time = " + << runTime.timeName() << Foam::nl << Foam::endl; + + Foam::polyMesh mesh ( - IOobject + Foam::IOobject ( - polyMesh::defaultRegion, + Foam::polyMesh::defaultRegion, runTime.timeName(), runTime, - IOobject::MUST_READ + Foam::IOobject::MUST_READ ) ); diff --git a/src/OpenFOAM/include/createTime.H b/src/OpenFOAM/include/createTime.H index 7c600100fe1b57e0079fb4ae61e1528267dd0c2b..057814a8708a767ecdd07470abaef6779136dffe 100644 --- a/src/OpenFOAM/include/createTime.H +++ b/src/OpenFOAM/include/createTime.H @@ -1,3 +1,7 @@ +// +// createTime.H +// ~~~~~~~~~~~~ + Foam::Info<< "Create time\n" << Foam::endl; Foam::Time runTime diff --git a/src/OpenFOAM/include/setRootCase.H b/src/OpenFOAM/include/setRootCase.H index 09d961ea8a2312c076a9dc0e09c37032ddaf5fc8..587374d067c059aefd4dd78ce680e2eb20bbfd8f 100644 --- a/src/OpenFOAM/include/setRootCase.H +++ b/src/OpenFOAM/include/setRootCase.H @@ -1,6 +1,9 @@ -Foam::argList args(argc, argv); +// +// setRootCase.H +// ~~~~~~~~~~~~~ -if (!args.checkRootCase()) -{ - Foam::FatalError.exit(); -} + Foam::argList args(argc, argv); + if (!args.checkRootCase()) + { + Foam::FatalError.exit(); + } diff --git a/src/OpenFOAM/meshes/MeshObject/MeshObject.C b/src/OpenFOAM/meshes/MeshObject/MeshObject.C index 68f05c2f82b58136ab9ac14c8865287369cec943..8b7947525a67d3bada4e8cc56aebbd97260ca900 100644 --- a/src/OpenFOAM/meshes/MeshObject/MeshObject.C +++ b/src/OpenFOAM/meshes/MeshObject/MeshObject.C @@ -137,7 +137,7 @@ const Type& Foam::MeshObject<Mesh, Type>::New { if (!mesh.thisDb().objectRegistry::foundObject<Type>(Type::typeName)) { - return store(new Type(mesh, d3, d4)); + return store(new Type(mesh, d1, d2, d3, d4)); } else { diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H index 5f7ed0a2b269f283af2a0c5f9f1d624c2bb83d97..c74d82b182d556b080368ee1e920579041f1871b 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H @@ -84,6 +84,9 @@ public: //- Start of procI+1 data inline const labelList& offsets() const; + //- my local size + inline label localSize() const; + //- Global sum of localSizes inline label size() const; diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexI.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexI.H index b01ed6e8ba8240ffd7903f721c4102663baeb5dc..65f5d2d9d06f4c50e49a0232184f0dd1aedeca92 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexI.H +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexI.H @@ -34,6 +34,17 @@ inline const Foam::labelList& Foam::globalIndex::offsets() const } +inline Foam::label Foam::globalIndex::localSize() const +{ + return + ( + Pstream::myProcNo() == 0 + ? offsets_[Pstream::myProcNo()] + : offsets_[Pstream::myProcNo()] - offsets_[Pstream::myProcNo()-1] + ); +} + + inline Foam::label Foam::globalIndex::size() const { return offsets_[Pstream::nProcs()-1]; diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C index 4bd093e6412905bda8b5402d828fbdd362777ab0..cc4278e22180486f75e545660af5b85ff5dd2ce8 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C @@ -273,6 +273,15 @@ Foam::mapDistribute::mapDistribute } +Foam::mapDistribute::mapDistribute(const mapDistribute& map) +: + constructSize_(map.constructSize_), + subMap_(map.subMap_), + constructMap_(map.constructMap_), + schedulePtr_() +{} + + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void Foam::mapDistribute::compact(const boolList& elemIsUsed) @@ -413,4 +422,24 @@ void Foam::mapDistribute::compact(const boolList& elemIsUsed) } +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + +void Foam::mapDistribute::operator=(const mapDistribute& rhs) +{ + // Check for assignment to self + if (this == &rhs) + { + FatalErrorIn + ( + "Foam::mapDistribute::operator=(const Foam::mapDistribute&)" + ) << "Attempted assignment to self" + << abort(FatalError); + } + constructSize_ = rhs.constructSize_; + subMap_ = rhs.subMap_; + constructMap_ = rhs.constructMap_; + schedulePtr_.clear(); +} + + // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H index 3ccf81047697164d8cb2e7ed2a004a9feb8157f5..d2cfe64ca53c0dde02c3d424d5236b415728151d 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H @@ -81,16 +81,6 @@ class mapDistribute mutable autoPtr<List<labelPair> > schedulePtr_; - // Private Member Functions - - //- Disallow default bitwise copy construct - mapDistribute(const mapDistribute&); - - //- Disallow default bitwise assignment - void operator=(const mapDistribute&); - - - public: // Constructors @@ -120,6 +110,9 @@ public: const labelList& recvProcs ); + //- Construct copy + mapDistribute(const mapDistribute&); + // Member Functions @@ -262,6 +255,11 @@ public: "mapDistribute::updateMesh(const mapPolyMesh&)" ); } + + // Member Operators + + void operator=(const mapDistribute&); + }; diff --git a/src/OpenFOAM/primitives/Lists/scalarIOList.C b/src/OpenFOAM/primitives/Lists/scalarIOList.C new file mode 100644 index 0000000000000000000000000000000000000000..2d30cd4c25eeb989d22db756fad9496b7424e0b7 --- /dev/null +++ b/src/OpenFOAM/primitives/Lists/scalarIOList.C @@ -0,0 +1,46 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +Description + Declaration of scalar IOList containers + +\*---------------------------------------------------------------------------*/ + +#include "scalarIOList.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + defineTemplateTypeNameAndDebugWithName(scalarIOList, "scalarList", 0); + defineTemplateTypeNameAndDebugWithName + ( + scalarListIOList, + "scalarListList", + 0 + ); +} + +// ************************************************************************* // diff --git a/src/thermophysicalModels/solids/Cs/Cs.C b/src/OpenFOAM/primitives/Lists/scalarIOList.H similarity index 84% rename from src/thermophysicalModels/solids/Cs/Cs.C rename to src/OpenFOAM/primitives/Lists/scalarIOList.H index 5b15f122744fdbbbbb3dbdf0cd246243d5b6ebf1..5c91ea000f60061cfc289c0bc62713fcb0e7800d 100644 --- a/src/thermophysicalModels/solids/Cs/Cs.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 "Cs.H" -#include "addToRunTimeSelectionTable.H" +#ifndef scalarIOList_H +#define scalarIOList_H + +#include "scalarList.H" +#include "IOList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(Cs, 0); -addToRunTimeSelectionTable(solid, Cs,); -addToRunTimeSelectionTable(solid, Cs, Istream); + typedef IOList<scalar> scalarIOList; + typedef IOList<scalarList> scalarListIOList; +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace Foam +#endif // ************************************************************************* // diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.C index 5bb4a0ee2d03b8b5a24ec8bbdfb59b2a5ed2c153..3c2221f8d04f9e2289ac5d1e3029cd6cf4d09355 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.C @@ -148,6 +148,7 @@ Foam::scalar Foam::autoHexMeshDriver::getMergeDistance(const scalar mergeTol) Foam::autoHexMeshDriver::autoHexMeshDriver ( fvMesh& mesh, + const bool overwrite, const dictionary& dict, const dictionary& decomposeDict ) @@ -292,6 +293,41 @@ Foam::autoHexMeshDriver::autoHexMeshDriver meshRefinement::checkCoupledFaceZones(mesh_); + // Refinement engine + // ~~~~~~~~~~~~~~~~~ + + { + Info<< nl + << "Determining initial surface intersections" << nl + << "-----------------------------------------" << nl + << endl; + + // Main refinement engine + meshRefinerPtr_.reset + ( + new meshRefinement + ( + mesh, + mergeDist_, // tolerance used in sorting coordinates + overwrite, + surfaces(), + shells() + ) + ); + Info<< "Calculated surface intersections in = " + << mesh_.time().cpuTimeIncrement() << " s" << endl; + + // Some stats + meshRefinerPtr_().printMeshInfo(debug_, "Initial mesh"); + + meshRefinerPtr_().write + ( + debug_&meshRefinement::OBJINTERSECTIONS, + mesh_.time().path()/meshRefinerPtr_().timeName() + ); + } + + // Add all the surface regions as patches // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -319,9 +355,8 @@ Foam::autoHexMeshDriver::autoHexMeshDriver forAll(regNames, i) { - label patchI = meshRefinement::addPatch + label patchI = meshRefinerPtr_().addMeshedPatch ( - mesh, regNames[i], wallPolyPatch::typeName ); @@ -404,40 +439,6 @@ Foam::autoHexMeshDriver::autoHexMeshDriver // Mesh distribution engine (uses tolerance to reconstruct meshes) distributorPtr_.reset(new fvMeshDistribute(mesh_, mergeDist_)); } - - - // Refinement engine - // ~~~~~~~~~~~~~~~~~ - - { - Info<< nl - << "Determining initial surface intersections" << nl - << "-----------------------------------------" << nl - << endl; - - // Main refinement engine - meshRefinerPtr_.reset - ( - new meshRefinement - ( - mesh, - mergeDist_, // tolerance used in sorting coordinates - surfaces(), - shells() - ) - ); - Info<< "Calculated surface intersections in = " - << mesh_.time().cpuTimeIncrement() << " s" << endl; - - // Some stats - meshRefinerPtr_().printMeshInfo(debug_, "Initial mesh"); - - meshRefinerPtr_().write - ( - debug_&meshRefinement::OBJINTERSECTIONS, - mesh_.time().path()/mesh_.time().timeName() - ); - } } @@ -448,7 +449,7 @@ void Foam::autoHexMeshDriver::writeMesh(const string& msg) const const meshRefinement& meshRefiner = meshRefinerPtr_(); meshRefiner.printMeshInfo(debug_, msg); - Info<< "Writing mesh to time " << mesh_.time().timeName() << endl; + Info<< "Writing mesh to time " << meshRefiner.timeName() << endl; meshRefiner.write(meshRefinement::MESH|meshRefinement::SCALARLEVELS, ""); if (debug_ & meshRefinement::OBJINTERSECTIONS) @@ -456,7 +457,7 @@ void Foam::autoHexMeshDriver::writeMesh(const string& msg) const meshRefiner.write ( meshRefinement::OBJINTERSECTIONS, - mesh_.time().path()/mesh_.time().timeName() + mesh_.time().path()/meshRefiner.timeName() ); } Info<< "Written mesh in = " @@ -522,11 +523,7 @@ void Foam::autoHexMeshDriver::doMesh() const dictionary& shrinkDict = dict_.subDict("shrinkDict"); PtrList<dictionary> surfaceDicts(dict_.lookup("surfaces")); - autoLayerDriver layerDriver - ( - meshRefinerPtr_(), - globalToPatch_ - ); + autoLayerDriver layerDriver(meshRefinerPtr_()); // Get all the layer specific params layerParameters layerParams diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.H b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.H index c0b7668d0ac6e68c56ab8a5a6546a61ce48b289d..02eba5afbe95025f2124860158b9f9f0196e68c7 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.H +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.H @@ -174,6 +174,7 @@ public: autoHexMeshDriver ( fvMesh& mesh, + const bool overwrite, const dictionary& meshDict, const dictionary& decomposeDict ); diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index 01ab952c165a5997df49085828e556fb41d6d209..fea25e35eb8a6e64bfd01564cda14d42299d1403 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -75,7 +75,7 @@ Foam::label Foam::autoLayerDriver::mergePatchFacesUndo labelHashSet boundaryCells(mesh.nFaces()-mesh.nInternalFaces()); { - labelList patchIDs(meshRefinement::addedPatches(globalToPatch_)); + labelList patchIDs(meshRefiner_.meshedPatches()); const polyBoundaryMesh& patches = mesh.boundaryMesh(); @@ -159,12 +159,16 @@ Foam::label Foam::autoLayerDriver::mergePatchFacesUndo mesh.clearOut(); } + if (meshRefiner_.overwrite()) + { + mesh.setInstance(meshRefiner_.oldInstance()); + } + faceCombiner.updateMesh(map); meshRefiner_.updateMesh(map, labelList(0)); - for (label iteration = 0; iteration < 100; iteration++) { Info<< nl @@ -313,6 +317,11 @@ Foam::label Foam::autoLayerDriver::mergePatchFacesUndo mesh.clearOut(); } + if (meshRefiner_.overwrite()) + { + mesh.setInstance(meshRefiner_.oldInstance()); + } + faceCombiner.updateMesh(map); // Renumber restore maps @@ -336,7 +345,7 @@ Foam::label Foam::autoLayerDriver::mergePatchFacesUndo if (debug) { Pout<< "Writing merged-faces mesh to time " - << mesh.time().timeName() << nl << endl; + << meshRefiner_.timeName() << nl << endl; mesh.write(); } } @@ -380,6 +389,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::autoLayerDriver::doRemovePoints mesh.clearOut(); } + if (meshRefiner_.overwrite()) + { + mesh.setInstance(meshRefiner_.oldInstance()); + } + pointRemover.updateMesh(map); meshRefiner_.updateMesh(map, labelList(0)); @@ -433,6 +447,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::autoLayerDriver::doRestorePoints mesh.clearOut(); } + if (meshRefiner_.overwrite()) + { + mesh.setInstance(meshRefiner_.oldInstance()); + } + pointRemover.updateMesh(map); meshRefiner_.updateMesh(map, labelList(0)); @@ -656,7 +675,7 @@ Foam::label Foam::autoLayerDriver::mergeEdgesUndo if (debug) { Pout<< "Writing merged-edges mesh to time " - << mesh.time().timeName() << nl << endl; + << meshRefiner_.timeName() << nl << endl; mesh.write(); } } @@ -2446,14 +2465,9 @@ void Foam::autoLayerDriver::getLayerCellsFaces // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::autoLayerDriver::autoLayerDriver -( - meshRefinement& meshRefiner, - const labelList& globalToPatch -) +Foam::autoLayerDriver::autoLayerDriver(meshRefinement& meshRefiner) : - meshRefiner_(meshRefiner), - globalToPatch_(globalToPatch) + meshRefiner_(meshRefiner) {} @@ -2729,7 +2743,7 @@ void Foam::autoLayerDriver::addLayers IOobject ( "pointMedialDist", - mesh.time().timeName(), + meshRefiner_.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE, @@ -2744,7 +2758,7 @@ void Foam::autoLayerDriver::addLayers IOobject ( "dispVec", - mesh.time().timeName(), + meshRefiner_.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE, @@ -2759,7 +2773,7 @@ void Foam::autoLayerDriver::addLayers IOobject ( "medialRatio", - mesh.time().timeName(), + meshRefiner_.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE, @@ -2911,7 +2925,7 @@ void Foam::autoLayerDriver::addLayers ); const_cast<Time&>(mesh.time())++; - Info<< "Writing shrunk mesh to " << mesh.time().timeName() << endl; + Info<< "Writing shrunk mesh to " << meshRefiner_.timeName() << endl; // See comment in autoSnapDriver why we should not remove meshPhi // using mesh.clearPout(). @@ -3012,6 +3026,11 @@ void Foam::autoLayerDriver::addLayers //?neccesary? Update fields newMesh.updateMesh(map); + if (meshRefiner_.overwrite()) + { + newMesh.setInstance(meshRefiner_.oldInstance()); + } + // Update numbering on addLayer: // - cell/point labels to be newMesh. // - patchFaces to remain in oldMesh order. @@ -3034,7 +3053,7 @@ void Foam::autoLayerDriver::addLayers if (debug) { - Info<< "Writing layer mesh to " << mesh.time().timeName() << endl; + Info<< "Writing layer mesh to " << meshRefiner_.timeName() << endl; newMesh.write(); cellSet addedCellSet ( @@ -3113,6 +3132,11 @@ void Foam::autoLayerDriver::addLayers mesh.clearOut(); } + if (meshRefiner_.overwrite()) + { + mesh.setInstance(meshRefiner_.oldInstance()); + } + meshRefiner_.updateMesh(map, labelList(0)); @@ -3181,8 +3205,6 @@ void Foam::autoLayerDriver::doLayers << "----------------------------------" << nl << endl; - const_cast<Time&>(mesh.time())++; - Info<< "Using mesh parameters " << motionDict << nl << endl; // Merge coplanar boundary faces diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.H b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.H index 164fd88ce04e5b06c33ef1c48d8745ea34a8dcc0..12569570069144b603074002ea3ad7af8c3bb91f 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.H +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.H @@ -101,9 +101,6 @@ class autoLayerDriver //- Mesh+surface meshRefinement& meshRefiner_; - //- From surface region to patch - const labelList globalToPatch_; - // Private Member Functions @@ -509,11 +506,7 @@ public: // Constructors //- Construct from components - autoLayerDriver - ( - meshRefinement& meshRefiner, - const labelList& globalToPatch - ); + autoLayerDriver(meshRefinement& meshRefiner); // Member Functions diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C index 9c4e0a17c521b8e06b4b2ecceb18ed80bb917d06..0ac24a5574aad7e415a2bf4dbc489bb310d4e728 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C @@ -344,8 +344,8 @@ void Foam::autoRefineDriver::removeInsideCells if (debug) { Pout<< "Writing subsetted mesh to time " - << mesh.time().timeName() << '.' << endl; - meshRefiner_.write(debug, mesh.time().path()/mesh.time().timeName()); + << meshRefiner_.timeName() << '.' << endl; + meshRefiner_.write(debug, mesh.time().path()/meshRefiner_.timeName()); Pout<< "Dumped mesh in = " << mesh.time().cpuTimeIncrement() << " s\n" << nl << endl; } @@ -561,11 +561,11 @@ void Foam::autoRefineDriver::zonify if (debug) { Pout<< "Writing zoned mesh to time " - << mesh.time().timeName() << '.' << endl; + << meshRefiner_.timeName() << '.' << endl; meshRefiner_.write ( debug, - mesh.time().path()/mesh.time().timeName() + mesh.time().path()/meshRefiner_.timeName() ); } @@ -653,8 +653,8 @@ void Foam::autoRefineDriver::splitAndMergeBaffles if (debug) { Pout<< "Writing handleProblemCells mesh to time " - << mesh.time().timeName() << '.' << endl; - meshRefiner_.write(debug, mesh.time().path()/mesh.time().timeName()); + << meshRefiner_.timeName() << '.' << endl; + meshRefiner_.write(debug, mesh.time().path()/meshRefiner_.timeName()); } } @@ -680,7 +680,7 @@ void Foam::autoRefineDriver::mergePatchFaces ( Foam::cos(45*mathematicalConstant::pi/180.0), Foam::cos(45*mathematicalConstant::pi/180.0), - meshRefinement::addedPatches(globalToPatch_) + meshRefiner_.meshedPatches() ); if (debug) @@ -712,9 +712,6 @@ void Foam::autoRefineDriver::doRefine const fvMesh& mesh = meshRefiner_.mesh(); - const_cast<Time&>(mesh.time())++; - - // Check that all the keep points are inside the mesh. refineParams.findCells(mesh); diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C index 011417c29ecd92107e34ff596c9ba506a60cb50a..41475a321af054c67f083d2ebc9fadfb8c0d5d22 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C @@ -557,7 +557,7 @@ Foam::tmp<Foam::scalarField> Foam::autoSnapDriver::edgePatchDist // IOobject // ( // "pointDist", - // mesh.DB().timeName(), + // meshRefiner_.timeName(), // mesh.DB(), // IOobject::NO_READ, // IOobject::AUTO_WRITE @@ -580,7 +580,7 @@ Foam::tmp<Foam::scalarField> Foam::autoSnapDriver::edgePatchDist // pointDist[pointI] /= mesh.pointEdges()[pointI].size(); // } // Info<< "Writing patch distance to " << pointDist.name() - // << " at time " << mesh.DB().timeName() << endl; + // << " at time " << meshRefiner_.timeName() << endl; // // pointDist.write(); //} @@ -750,7 +750,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::autoSnapDriver::createZoneBaffles { const_cast<Time&>(mesh.time())++; Pout<< "Writing baffled mesh to time " - << mesh.time().timeName() << endl; + << meshRefiner_.timeName() << endl; mesh.write(); } } @@ -830,35 +830,6 @@ Foam::scalarField Foam::autoSnapDriver::calcSnapDistance } -//// Invert globalToPatch_ to get the patches related to surfaces. -//Foam::labelList Foam::autoSnapDriver::getSurfacePatches() const -//{ -// // Set of patches originating from surface -// labelHashSet surfacePatchSet(globalToPatch_.size()); -// -// forAll(globalToPatch_, i) -// { -// if (globalToPatch_[i] != -1) -// { -// surfacePatchSet.insert(globalToPatch_[i]); -// } -// } -// -// const fvMesh& mesh = meshRefiner_.mesh(); -// -// DynamicList<label> surfacePatches(surfacePatchSet.size()); -// -// for (label patchI = 0; patchI < mesh.boundaryMesh().size(); patchI++) -// { -// if (surfacePatchSet.found(patchI)) -// { -// surfacePatches.append(patchI); -// } -// } -// return surfacePatches.shrink(); -//} - - void Foam::autoSnapDriver::preSmoothPatch ( const snapParameters& snapParams, @@ -928,7 +899,7 @@ void Foam::autoSnapDriver::preSmoothPatch if (debug) { const_cast<Time&>(mesh.time())++; - Pout<< "Writing patch smoothed mesh to time " << mesh.time().timeName() + Pout<< "Writing patch smoothed mesh to time " << meshRefiner_.timeName() << endl; mesh.write(); @@ -1222,7 +1193,7 @@ void Foam::autoSnapDriver::smoothDisplacement if (debug) { const_cast<Time&>(mesh.time())++; - Pout<< "Writing smoothed mesh to time " << mesh.time().timeName() + Pout<< "Writing smoothed mesh to time " << meshRefiner_.timeName() << endl; // Moving mesh creates meshPhi. Can be cleared out by a mesh.clearOut @@ -1284,7 +1255,7 @@ void Foam::autoSnapDriver::scaleMesh if (debug) { const_cast<Time&>(mesh.time())++; - Pout<< "Writing scaled mesh to time " << mesh.time().timeName() + Pout<< "Writing scaled mesh to time " << meshRefiner_.timeName() << endl; mesh.write(); @@ -1476,10 +1447,8 @@ void Foam::autoSnapDriver::doSnap << "--------------" << nl << endl; - const_cast<Time&>(mesh.time())++; - // Get the labels of added patches. - labelList adaptPatchIDs(meshRefinement::addedPatches(globalToPatch_)); + labelList adaptPatchIDs(meshRefiner_.meshedPatches()); // Create baffles (pairs of faces that share the same points) // Baffles stored as owner and neighbour face that have been created. diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.H b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.H index 5d9b2bc357d0e2dff037bcfccc9d27ae08613114..cdf8673d75d425d82c0633b0a93364c731e42429 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.H +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.H @@ -170,9 +170,6 @@ public: const indirectPrimitivePatch& ) const; - ////- Get patches generated for surfaces. - //labelList getSurfacePatches() const; - //- Smooth the mesh (patch and internal) to increase visibility // of surface points (on castellated mesh) w.r.t. surface. void preSmoothPatch diff --git a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C index 6a021f9e8a75d0628a811eefa3623f8c77c8b767..7e90beae6f6699b8231773e40e3c76f2f9a06f5d 100644 --- a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C +++ b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C @@ -84,12 +84,15 @@ void Foam::meshRefinement::calcNeighbourData const polyBoundaryMesh& patches = mesh_.boundaryMesh(); + labelHashSet addedPatchIDSet(meshedPatches()); + forAll(patches, patchI) { const polyPatch& pp = patches[patchI]; const unallocLabelList& faceCells = pp.faceCells(); const vectorField::subField faceCentres = pp.faceCentres(); + const vectorField::subField faceAreas = pp.faceAreas(); label bFaceI = pp.start()-mesh_.nInternalFaces(); @@ -102,6 +105,36 @@ void Foam::meshRefinement::calcNeighbourData bFaceI++; } } + else if (addedPatchIDSet.found(patchI)) + { + // Face was introduced from cell-cell intersection. Try to + // reconstruct other side cell(centre). Three possibilities: + // - cells same size. + // - preserved cell smaller. Not handled. + // - preserved cell larger. + forAll(faceCells, i) + { + // Extrapolate the face centre. + vector fn = faceAreas[i]; + fn /= mag(fn)+VSMALL; + + label own = faceCells[i]; + label ownLevel = cellLevel[own]; + label faceLevel = meshCutter_.getAnchorLevel(pp.start()+i); + + // Normal distance from face centre to cell centre + scalar d = ((faceCentres[i] - cellCentres[own]) & fn); + if (faceLevel > ownLevel) + { + // Other cell more refined. Adjust normal distance + d *= 0.5; + } + neiLevel[bFaceI] = cellLevel[ownLevel]; + // Calculate other cell centre by extrapolation + neiCc[bFaceI] = faceCentres[i] + d*fn; + bFaceI++; + } + } else { forAll(faceCells, i) @@ -432,6 +465,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::doRemoveCells mesh_.clearOut(); } + if (overwrite_) + { + mesh_.setInstance(oldInstance_); + } + // Update local mesh data cellRemover.updateMesh(map); @@ -784,12 +822,15 @@ Foam::meshRefinement::meshRefinement ( fvMesh& mesh, const scalar mergeDistance, + const bool overwrite, const refinementSurfaces& surfaces, const shellSurfaces& shells ) : mesh_(mesh), mergeDistance_(mergeDistance), + overwrite_(overwrite), + oldInstance_(mesh.pointsInstance()), surfaces_(surfaces), shells_(shells), meshCutter_ @@ -1166,8 +1207,6 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::meshRefinement::balance // Helper function to get intersected faces Foam::labelList Foam::meshRefinement::intersectedFaces() const { - // Mark all faces that will become baffles - label nBoundaryFaces = 0; forAll(surfaceIndex_, faceI) @@ -1193,10 +1232,7 @@ Foam::labelList Foam::meshRefinement::intersectedFaces() const // Helper function to get points used by faces -Foam::labelList Foam::meshRefinement::intersectedPoints -( -// const labelList& globalToPatch -) const +Foam::labelList Foam::meshRefinement::intersectedPoints() const { const faceList& faces = mesh_.faces(); @@ -1221,9 +1257,10 @@ Foam::labelList Foam::meshRefinement::intersectedPoints } //// Insert all meshed patches. - //forAll(globalToPatch, i) + //labelList adaptPatchIDs(meshedPatches()); + //forAll(adaptPatchIDs, i) //{ - // label patchI = globalToPatch[i]; + // label patchI = adaptPatchIDs[i]; // // if (patchI != -1) // { @@ -1262,27 +1299,6 @@ Foam::labelList Foam::meshRefinement::intersectedPoints } -Foam::labelList Foam::meshRefinement::addedPatches -( - const labelList& globalToPatch -) -{ - labelList patchIDs(globalToPatch.size()); - label addedI = 0; - - forAll(globalToPatch, i) - { - if (globalToPatch[i] != -1) - { - patchIDs[addedI++] = globalToPatch[i]; - } - } - patchIDs.setSize(addedI); - - return patchIDs; -} - - //- Create patch from set of patches Foam::autoPtr<Foam::indirectPrimitivePatch> Foam::meshRefinement::makePatch ( @@ -1372,7 +1388,7 @@ Foam::tmp<Foam::pointVectorField> Foam::meshRefinement::makeDisplacementField IOobject ( "pointDisplacement", - mesh.time().timeName(), + mesh.time().timeName(), //timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE @@ -1653,6 +1669,53 @@ Foam::label Foam::meshRefinement::addPatch } +Foam::label Foam::meshRefinement::addMeshedPatch +( + const word& name, + const word& type +) +{ + label meshedI = findIndex(meshedPatches_, name); + + if (meshedI != -1) + { + // Already there. Get corresponding polypatch + return mesh_.boundaryMesh().findPatchID(name); + } + else + { + // Add patch + label patchI = addPatch(mesh_, name, type); + + // Store + label sz = meshedPatches_.size(); + meshedPatches_.setSize(sz+1); + meshedPatches_[sz] = name; + + return patchI; + } +} + + +Foam::labelList Foam::meshRefinement::meshedPatches() const +{ + labelList patchIDs(meshedPatches_.size()); + forAll(meshedPatches_, i) + { + patchIDs[i] = mesh_.boundaryMesh().findPatchID(meshedPatches_[i]); + + if (patchIDs[i] == -1) + { + FatalErrorIn("meshRefinement::meshedPatches() const") + << "Problem : did not find patch " << meshedPatches_[i] + << abort(FatalError); + } + } + + return patchIDs; +} + + Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMeshRegions ( const point& keepPoint @@ -2000,6 +2063,20 @@ void Foam::meshRefinement::printMeshInfo(const bool debug, const string& msg) } +//- Return either time().constant() or oldInstance +Foam::word Foam::meshRefinement::timeName() const +{ + if (overwrite_ && mesh_.time().timeIndex() == 0) + { + return oldInstance_; + } + else + { + return mesh_.time().timeName(); + } +} + + void Foam::meshRefinement::dumpRefinementLevel() const { volScalarField volRefLevel @@ -2007,7 +2084,7 @@ void Foam::meshRefinement::dumpRefinementLevel() const IOobject ( "cellLevel", - mesh_.time().timeName(), + timeName(), mesh_, IOobject::NO_READ, IOobject::AUTO_WRITE, @@ -2034,7 +2111,7 @@ void Foam::meshRefinement::dumpRefinementLevel() const IOobject ( "pointLevel", - mesh_.time().timeName(), + timeName(), mesh_, IOobject::NO_READ, IOobject::NO_WRITE, diff --git a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinement.H b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinement.H index 06004c8a6e00bc12c093cb36afb2782638b4b2d3..93ce3ceeb8fb3043d0b8435ef22209d6ee073711 100644 --- a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinement.H +++ b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinement.H @@ -110,6 +110,12 @@ private: //- tolerance used for sorting coordinates (used in 'less' routine) const scalar mergeDistance_; + //- overwrite the mesh? + const bool overwrite_; + + //- Instance of mesh upon construction. Used when in overwrite_ mode. + const word oldInstance_; + //- All surface-intersection interaction const refinementSurfaces& surfaces_; @@ -125,6 +131,10 @@ private: //- user supplied face based data. List<Tuple2<mapType, labelList> > userFaceData_; + //- Meshed patches - are treated differently. Stored as wordList since + // order changes. + wordList meshedPatches_; + // Private Member Functions @@ -163,9 +173,6 @@ private: //- Find any intersection of surface. Store in surfaceIndex_. void updateIntersections(const labelList& changedFaces); - //- Set instance of all local IOobjects - void setInstance(const fileName&); - //- Remove cells. Put exposedFaces into exposedPatchIDs. autoPtr<mapPolyMesh> doRemoveCells ( @@ -400,12 +407,11 @@ private: const labelList& globalToPatch ) const; - //- Initial test of marking faces using geometric information. - labelList markFacesOnProblemCellsGeometric - ( - const dictionary& motionDict, - const labelList& globalToPatch - ) const; + ////- Initial test of marking faces using geometric information. + //labelList markFacesOnProblemCellsGeometric + //( + // const dictionary& motionDict + //) const; // Baffle merging @@ -475,6 +481,7 @@ public: ( fvMesh& mesh, const scalar mergeDistance, + const bool overwrite, const refinementSurfaces&, const shellSurfaces& ); @@ -499,6 +506,18 @@ public: return mergeDistance_; } + //- Overwrite the mesh? + bool overwrite() const + { + return overwrite_; + } + + //- (points)instance of mesh upon construction + const word& oldInstance() const + { + return oldInstance_; + } + //- reference to surface search engines const refinementSurfaces& surfaces() const { @@ -578,9 +597,6 @@ public: //- Get points on surfaces with intersection and boundary faces. labelList intersectedPoints() const; - //- Get added patches (inverse of globalToPatch) - static labelList addedPatches(const labelList& globalToPatch); - //- Create patch from set of patches static autoPtr<indirectPrimitivePatch> makePatch ( @@ -688,9 +704,16 @@ public: // Other topo changes - //- Helper function to add patch to mesh + //- Helper:add patch to mesh. Update all registered fields. + // Use addMeshedPatch to add patches originating from surfaces. static label addPatch(fvMesh&, const word& name, const word& type); + //- Add patch originating from meshing. Update meshedPatches_. + label addMeshedPatch(const word& name, const word& type); + + //- Get patchIDs for patches added in addMeshedPatch. + labelList meshedPatches() const; + //- Split mesh. Keep part containing point. autoPtr<mapPolyMesh> splitMeshRegions(const point& keepPoint); @@ -699,7 +722,11 @@ public: //- Update for external change to mesh. changedFaces are in new mesh // face labels. - void updateMesh(const mapPolyMesh&, const labelList& changedFaces); + void updateMesh + ( + const mapPolyMesh&, + const labelList& changedFaces + ); // Restoring : is where other processes delete and reinsert data. @@ -757,6 +784,13 @@ public: //- Print some mesh stats. void printMeshInfo(const bool, const string&) const; + //- Replacement for Time::timeName() : return oldInstance (if + // overwrite_) + word timeName() const; + + //- Set instance of all local IOobjects + void setInstance(const fileName&); + //- Write mesh and all data bool write() const; diff --git a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C index 3904f960737a3e9a84b8e4366ca71b49bfa31f4c..baa2e5d463b10845b076713ce6112b99634dd4e1 100644 --- a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C @@ -226,7 +226,13 @@ void Foam::meshRefinement::getBafflePatches label vertI = 0; if (debug&OBJINTERSECTIONS) { - str.reset(new OFstream(mesh_.time().timePath()/"intersections.obj")); + str.reset + ( + new OFstream + ( + mesh_.time().path()/timeName()/"intersections.obj" + ) + ); Pout<< "getBafflePatches : Writing surface intersections to file " << str().name() << nl << endl; @@ -461,6 +467,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles mesh_.clearOut(); } + if (overwrite()) + { + mesh_.setInstance(oldInstance()); + } + //- Redo the intersections on the newly create baffle faces. Note that // this changes also the cell centre positions. faceSet baffledFacesSet(mesh_, "baffledFacesSet", 2*nBaffles); @@ -820,6 +831,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::mergeBaffles mesh_.clearOut(); } + if (overwrite()) + { + mesh_.setInstance(oldInstance()); + } + // Update intersections. Recalculate intersections on merged faces since // this seems to give problems? Note: should not be nessecary since // baffles preserve intersections from when they were created. @@ -1482,7 +1498,7 @@ void Foam::meshRefinement::baffleAndSplitMesh if (debug) { - Pout<< "Writing baffled mesh to time " << mesh_.time().timeName() + Pout<< "Writing baffled mesh to time " << timeName() << endl; write(debug, runTime.path()/"baffles"); Pout<< "Dumped debug data in = " @@ -1511,11 +1527,7 @@ void Foam::meshRefinement::baffleAndSplitMesh perpendicularAngle, globalToPatch ) - //markFacesOnProblemCellsGeometric - //( - // motionDict, - // globalToPatch - //) + //markFacesOnProblemCellsGeometric(motionDict) ); Info<< "Analyzed problem cells in = " << runTime.cpuTimeIncrement() << " s\n" << nl << endl; @@ -1569,7 +1581,7 @@ void Foam::meshRefinement::baffleAndSplitMesh if (debug) { Pout<< "Writing extra baffled mesh to time " - << mesh_.time().timeName() << endl; + << timeName() << endl; write(debug, runTime.path()/"extraBaffles"); Pout<< "Dumped debug data in = " << runTime.cpuTimeIncrement() << " s\n" << nl << endl; @@ -1604,9 +1616,9 @@ void Foam::meshRefinement::baffleAndSplitMesh if (debug) { - Pout<< "Writing subsetted mesh to time " << mesh_.time().timeName() + Pout<< "Writing subsetted mesh to time " << timeName() << endl; - write(debug, runTime.timePath()); + write(debug, runTime.path()/timeName()); Pout<< "Dumped debug data in = " << runTime.cpuTimeIncrement() << " s\n" << nl << endl; } @@ -1665,7 +1677,7 @@ void Foam::meshRefinement::baffleAndSplitMesh // Split off (with optional buffer layers) unreachable areas of mesh. -Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh +Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh ( const label nBufferLayers, const labelList& globalToPatch, @@ -1998,6 +2010,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::dupNonManifoldPoints() mesh_.clearOut(); } + if (overwrite()) + { + mesh_.setInstance(oldInstance()); + } + // Update intersections. Is mapping only (no faces created, positions stay // same) so no need to recalculate intersections. updateMesh(map, labelList(0)); @@ -2429,6 +2446,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify mesh_.clearOut(); } + if (overwrite()) + { + mesh_.setInstance(oldInstance()); + } + // None of the faces has changed, only the zones. Still... updateMesh(map, labelList()); diff --git a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementMerge.C b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementMerge.C index 7ad77e83bf2bc300fdec8492065239fec6141d9f..b1461cea77c00c17589eeb11153ebf2d415499bd 100644 --- a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementMerge.C +++ b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementMerge.C @@ -29,10 +29,6 @@ License #include "polyTopoChange.H" #include "removePoints.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // Merge faces that are in-line. @@ -108,6 +104,11 @@ Foam::label Foam::meshRefinement::mergePatchFaces mesh_.clearOut(); } + if (overwrite()) + { + mesh_.setInstance(oldInstance()); + } + faceCombiner.updateMesh(map); // Get the kept faces that need to be recalculated. @@ -203,6 +204,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::mergeEdges mesh_.clearOut(); } + if (overwrite()) + { + mesh_.setInstance(oldInstance()); + } + pointRemover.updateMesh(map); // Get the kept faces that need to be recalculated. diff --git a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C index ea1e8a083cd24cac69c384129668cf6fecb1a7cf..fb0a7e2121f020576494e848ad8b6116f71fbcdd 100644 --- a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C +++ b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C @@ -136,15 +136,13 @@ Foam::Map<Foam::label> Foam::meshRefinement::findEdgeConnectedProblemCells const labelList& globalToPatch ) const { - labelList adaptPatchIDs(meshRefinement::addedPatches(globalToPatch)); - - // Construct addressing engine. + // Construct addressing engine from all patches added for meshing. autoPtr<indirectPrimitivePatch> ppPtr ( meshRefinement::makePatch ( mesh_, - adaptPatchIDs + meshedPatches() ) ); const indirectPrimitivePatch& pp = ppPtr(); @@ -386,11 +384,6 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells const labelList& pointLevel = meshCutter_.pointLevel(); const polyBoundaryMesh& patches = mesh_.boundaryMesh(); - // Swap neighbouring cell centres and cell level - labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces()); - pointField neiCc(mesh_.nFaces()-mesh_.nInternalFaces()); - calcNeighbourData(neiLevel, neiCc); - // Per internal face (boundary faces not used) the patch that the // baffle should get (or -1) labelList facePatch(mesh_.nFaces(), -1); @@ -403,7 +396,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells // Fill boundary data. All elements on meshed patches get marked. // Get the labels of added patches. - labelList adaptPatchIDs(meshRefinement::addedPatches(globalToPatch)); + labelList adaptPatchIDs(meshedPatches()); forAll(adaptPatchIDs, i) { @@ -427,6 +420,12 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells } } + // Swap neighbouring cell centres and cell level + labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces()); + pointField neiCc(mesh_.nFaces()-mesh_.nInternalFaces()); + calcNeighbourData(neiLevel, neiCc); + + // Count of faces marked for baffling label nBaffleFaces = 0; @@ -961,20 +960,16 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells //// test to find nearest surface and checks which faces would get squashed. //Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric //( -// const dictionary& motionDict, -// const labelList& globalToPatch +// const dictionary& motionDict //) const //{ -// // Get the labels of added patches. -// labelList adaptPatchIDs(meshRefinement::addedPatches(globalToPatch)); -// // // Construct addressing engine. // autoPtr<indirectPrimitivePatch> ppPtr // ( // meshRefinement::makePatch // ( // mesh_, -// adaptPatchIDs +// meshedPatches() // ) // ); // const indirectPrimitivePatch& pp = ppPtr(); diff --git a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C index 7aabbc6321cf9132e9e5c271d46e15abd7e00673..e35607a5980172c0d90377eae1f38efeeca6614f 100644 --- a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C +++ b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C @@ -1232,6 +1232,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::refine mesh_.clearOut(); } + if (overwrite()) + { + mesh_.setInstance(oldInstance()); + } + // Update intersection info updateMesh(map, getChangedFaces(map, cellsToRefine)); @@ -1256,12 +1261,12 @@ Foam::meshRefinement::refineAndBalance if (debug) { Pout<< "Writing refined but unbalanced " << msg - << " mesh to time " << mesh_.time().timeName() << endl; + << " mesh to time " << timeName() << endl; write ( debug, mesh_.time().path() - /mesh_.time().timeName() + /timeName() ); Pout<< "Dumped debug data in = " << mesh_.time().cpuTimeIncrement() << " s" << endl; @@ -1299,12 +1304,11 @@ Foam::meshRefinement::refineAndBalance if (debug) { Pout<< "Writing balanced " << msg - << " mesh to time " << mesh_.time().timeName() << endl; + << " mesh to time " << timeName() << endl; write ( debug, - mesh_.time().path() - /mesh_.time().timeName() + mesh_.time().path()/timeName() ); Pout<< "Dumped debug data in = " << mesh_.time().cpuTimeIncrement() << " s" << endl; 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/decompositionMethods/decompositionMethods/scotchDecomp/scotchDecomp.C b/src/decompositionMethods/decompositionMethods/scotchDecomp/scotchDecomp.C index a33e49b82889148fb6d3db92ff7d51dd3d2bc80e..994a82419285a24da2695f3e3850ee4580d1f8ac 100644 --- a/src/decompositionMethods/decompositionMethods/scotchDecomp/scotchDecomp.C +++ b/src/decompositionMethods/decompositionMethods/scotchDecomp/scotchDecomp.C @@ -75,6 +75,24 @@ extern "C" } +// Hack: scotch generates floating point errors so need to switch of error +// trapping! +#if defined(linux) || defined(linuxAMD64) || defined(linuxIA64) +# define LINUX +#endif + +#if defined(LINUX) && defined(__GNUC__) +# define LINUX_GNUC +#endif + +#ifdef LINUX_GNUC +# ifndef __USE_GNU +# define __USE_GNU +# endif +# include <fenv.h> +#endif + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -113,13 +131,30 @@ Foam::label Foam::scotchDecomp::decompose { // Strategy // ~~~~~~~~ + // Default. SCOTCH_Strat stradat; check(SCOTCH_stratInit(&stradat), "SCOTCH_stratInit"); - //SCOTCH_stratGraphMap(&stradat, &argv[i][2]); - //fprintf(stdout, "S\tStrat="); - //SCOTCH_stratSave(&stradat, stdout); - //fprintf(stdout, "\n"); + + if (decompositionDict_.found("scotchCoeffs")) + { + const dictionary& scotchCoeffs = + decompositionDict_.subDict("scotchCoeffs"); + + + string strategy; + if (scotchCoeffs.readIfPresent("strategy", strategy)) + { + if (debug) + { + Info<< "scotchDecomp : Using strategy " << strategy << endl; + } + SCOTCH_stratGraphMap(&stradat, strategy.c_str()); + //fprintf(stdout, "S\tStrat="); + //SCOTCH_stratSave(&stradat, stdout); + //fprintf(stdout, "\n"); + } + } // Graph @@ -153,37 +188,40 @@ Foam::label Foam::scotchDecomp::decompose const dictionary& scotchCoeffs = decompositionDict_.subDict("scotchCoeffs"); - Switch writeGraph(scotchCoeffs.lookup("writeGraph")); - - if (writeGraph) + if (scotchCoeffs.found("writeGraph")) { - OFstream str(mesh_.time().path() / mesh_.name() + ".grf"); - - Info<< "Dumping Scotch graph file to " << str.name() << endl - << "Use this in combination with gpart." << endl; - - label version = 0; - str << version << nl; - // Numer of vertices - str << xadj.size()-1 << ' ' << adjncy.size() << nl; - // Numbering starts from 0 - label baseval = 0; - // Has weights? - label hasEdgeWeights = 0; - label hasVertexWeights = 0; - label numericflag = 10*hasEdgeWeights+hasVertexWeights; - str << baseval << ' ' << numericflag << nl; - for (label cellI = 0; cellI < xadj.size()-1; cellI++) - { - label start = xadj[cellI]; - label end = xadj[cellI+1]; - str << end-start; + Switch writeGraph(scotchCoeffs.lookup("writeGraph")); - for (label i = start; i < end; i++) + if (writeGraph) + { + OFstream str(mesh_.time().path() / mesh_.name() + ".grf"); + + Info<< "Dumping Scotch graph file to " << str.name() << endl + << "Use this in combination with gpart." << endl; + + label version = 0; + str << version << nl; + // Numer of vertices + str << xadj.size()-1 << ' ' << adjncy.size() << nl; + // Numbering starts from 0 + label baseval = 0; + // Has weights? + label hasEdgeWeights = 0; + label hasVertexWeights = 0; + label numericflag = 10*hasEdgeWeights+hasVertexWeights; + str << baseval << ' ' << numericflag << nl; + for (label cellI = 0; cellI < xadj.size()-1; cellI++) { - str << ' ' << adjncy[i]; + label start = xadj[cellI]; + label end = xadj[cellI+1]; + str << end-start; + + for (label i = start; i < end; i++) + { + str << ' ' << adjncy[i]; + } + str << nl; } - str << nl; } } } @@ -195,12 +233,36 @@ Foam::label Foam::scotchDecomp::decompose SCOTCH_Arch archdat; check(SCOTCH_archInit(&archdat), "SCOTCH_archInit"); - check - ( - // SCOTCH_archCmpltw for weighted. - SCOTCH_archCmplt(&archdat, nProcessors_), - "SCOTCH_archCmplt" - ); + + List<label> processorWeights; + if (decompositionDict_.found("scotchCoeffs")) + { + const dictionary& scotchCoeffs = + decompositionDict_.subDict("scotchCoeffs"); + + scotchCoeffs.readIfPresent("processorWeights", processorWeights); + } + if (processorWeights.size()) + { + if (debug) + { + Info<< "scotchDecomp : Using procesor weights " << processorWeights + << endl; + } + check + ( + SCOTCH_archCmpltw(&archdat, nProcessors_, processorWeights.begin()), + "SCOTCH_archCmpltw" + ); + } + else + { + check + ( + SCOTCH_archCmplt(&archdat, nProcessors_), + "SCOTCH_archCmplt" + ); + } //SCOTCH_Mapping mapdat; @@ -209,6 +271,16 @@ Foam::label Foam::scotchDecomp::decompose //SCOTCH_graphMapExit(&grafdat, &mapdat); + // Hack:switch off fpu error trapping +# ifdef LINUX_GNUC + int oldExcepts = fedisableexcept + ( + FE_DIVBYZERO + | FE_INVALID + | FE_OVERFLOW + ); +# endif + finalDecomp.setSize(xadj.size()-1); finalDecomp = 0; check @@ -223,6 +295,11 @@ Foam::label Foam::scotchDecomp::decompose "SCOTCH_graphMap" ); +# ifdef LINUX_GNUC + feenableexcept(oldExcepts); +# endif + + //finalDecomp.setSize(xadj.size()-1); //check diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H index 71bfdbe92816ee196930ebe8505b4409ceda0608..d986946b578e18a92c3157af25bf131c34200e62 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H @@ -185,8 +185,6 @@ class hexRef8 const bool searchForward, const label wantedLevel ) const; - //- Gets level such that the face has four points <= level. - label getAnchorLevel(const label faceI) const; ////- Print levels of list of points. //void printLevels(Ostream&, const labelList&) const; @@ -370,6 +368,9 @@ public: // Refinement + //- Gets level such that the face has four points <= level. + label getAnchorLevel(const label faceI) const; + //- Given valid mesh and current cell level and proposed // cells to refine calculate any clashes (due to 2:1) and return // ok list of cells to refine. diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C index d2728f8b9d634d40aa563b009502d909d9c493fe..5e7a0b010bec6621e7340df8853e3f516f9add28 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C @@ -383,6 +383,35 @@ void Foam::polyTopoChange::checkFace << " own:" << own << " nei:" << nei << " patchI:" << patchI << abort(FatalError); } + if (faceI >= 0 && faceI < faces_.size() && faceRemoved(faceI)) + { + FatalErrorIn + ( + "polyTopoChange::checkFace(const face&, const label" + ", const label, const label, const label)" + ) << "Face already marked for removal" + << nl + << "f:" << f + << " faceI(-1 if added face):" << faceI + << " own:" << own << " nei:" << nei + << " patchI:" << patchI << abort(FatalError); + } + forAll(f, fp) + { + if (f[fp] < points_.size() && pointRemoved(f[fp])) + { + FatalErrorIn + ( + "polyTopoChange::checkFace(const face&, const label" + ", const label, const label, const label)" + ) << "Face uses removed vertices" + << nl + << "f:" << f + << " faceI(-1 if added face):" << faceI + << " own:" << own << " nei:" << nei + << " patchI:" << patchI << abort(FatalError); + } + } } diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 54afdb355197c66add7dfcee688bec1e63ad50fe..313110bd43ad9541a65a0d4199803aa3420141c3 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -39,26 +39,41 @@ fvMeshMapper = fvMesh/fvMeshMapper $(fvMeshMapper)/fvPatchMapper.C $(fvMeshMapper)/fvSurfaceMapper.C + extendedStencil = fvMesh/extendedStencil -$(extendedStencil)/extendedStencil.C -$(extendedStencil)/extendedUpwindStencil.C -$(extendedStencil)/extendedCentredStencil.C - -$(extendedStencil)/faceStencil/faceStencil.C -$(extendedStencil)/faceStencil/faceEdgeCellStencil.C -$(extendedStencil)/faceStencil/cellFaceCellStencil.C -$(extendedStencil)/faceStencil/cellPointCellStencil.C -$(extendedStencil)/faceStencil/cellEdgeCellStencil.C - -$(extendedStencil)/extendedStencilMeshObjects/centredCECStencilObject.C -$(extendedStencil)/extendedStencilMeshObjects/centredCFCStencilObject.C -$(extendedStencil)/extendedStencilMeshObjects/centredCPCStencilObject.C -$(extendedStencil)/extendedStencilMeshObjects/centredFECStencilObject.C - -$(extendedStencil)/extendedStencilMeshObjects/upwindCECStencilObject.C -$(extendedStencil)/extendedStencilMeshObjects/upwindCFCStencilObject.C -$(extendedStencil)/extendedStencilMeshObjects/upwindCPCStencilObject.C -$(extendedStencil)/extendedStencilMeshObjects/upwindFECStencilObject.C + +cellToCell = $(extendedStencil)/cellToCell +$(cellToCell)/fullStencils/cellToCellStencil.C +$(cellToCell)/fullStencils/CFCCellToCellStencil.C +$(cellToCell)/fullStencils/CPCCellToCellStencil.C +$(cellToCell)/fullStencils/CECCellToCellStencil.C + +cellToFace = $(extendedStencil)/cellToFace +$(cellToFace)/fullStencils/cellToFaceStencil.C +$(cellToFace)/fullStencils/CFCCellToFaceStencil.C +$(cellToFace)/fullStencils/CECCellToFaceStencil.C +$(cellToFace)/fullStencils/CPCCellToFaceStencil.C +$(cellToFace)/fullStencils/FECCellToFaceStencil.C +$(cellToFace)/extendedCellToFaceStencil.C +$(cellToFace)/extendedCentredCellToFaceStencil.C +$(cellToFace)/extendedUpwindCellToFaceStencil.C +$(cellToFace)/MeshObjects/centredCECCellToFaceStencilObject.C +$(cellToFace)/MeshObjects/centredCFCCellToFaceStencilObject.C +$(cellToFace)/MeshObjects/centredCPCCellToFaceStencilObject.C +$(cellToFace)/MeshObjects/centredFECCellToFaceStencilObject.C +$(cellToFace)/MeshObjects/upwindCECCellToFaceStencilObject.C +$(cellToFace)/MeshObjects/upwindCFCCellToFaceStencilObject.C +$(cellToFace)/MeshObjects/upwindCPCCellToFaceStencilObject.C +$(cellToFace)/MeshObjects/upwindFECCellToFaceStencilObject.C +$(cellToFace)/MeshObjects/pureUpwindCFCCellToFaceStencilObject.C + +faceToCell = $(extendedStencil)/faceToCell +$(faceToCell)/fullStencils/faceToCellStencil.C +$(faceToCell)/fullStencils/CFCFaceToCellStencil.C +$(faceToCell)/extendedFaceToCellStencil.C +$(faceToCell)/extendedCentredFaceToCellStencil.C +$(faceToCell)/MeshObjects/centredCFCFaceToCellStencilObject.C + fvPatchFields = fields/fvPatchFields $(fvPatchFields)/fvPatchField/fvPatchFields.C @@ -166,6 +181,8 @@ $(interpolation)/interpolationCell/makeInterpolationCell.C $(interpolation)/interpolationCellPoint/cellPointWeight/cellPointWeight.C $(interpolation)/interpolationCellPoint/makeInterpolationCellPoint.C $(interpolation)/interpolationCellPointFace/makeInterpolationCellPointFace.C +$(interpolation)/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C +$(interpolation)/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C volPointInterpolation = interpolation/volPointInterpolation $(volPointInterpolation)/pointPatchInterpolation/pointPatchInterpolation.C @@ -200,6 +217,10 @@ $(schemes)/quadraticFit/quadraticFit.C $(schemes)/quadraticLinearUpwindFit/quadraticLinearUpwindFit.C $(schemes)/quadraticUpwindFit/quadraticUpwindFit.C $(schemes)/cubicUpwindFit/cubicUpwindFit.C +/* +$(schemes)/quadraticLinearPureUpwindFit/quadraticLinearPureUpwindFit.C +*/ +$(schemes)/linearPureUpwindFit/linearPureUpwindFit.C limitedSchemes = $(surfaceInterpolation)/limitedSchemes $(limitedSchemes)/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationSchemes.C @@ -295,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/MRF/MRFZone.C b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C index ce32ad5b84c2ac57f520161ad93bd8ec1f8a14d5..3618d87ef5dfa6ea4ea03003cf5928d4d3c3c2e0 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C @@ -312,6 +312,31 @@ void Foam::MRFZone::addCoriolis(fvVectorMatrix& UEqn) const } +void Foam::MRFZone::addCoriolis +( + const volScalarField& rho, + fvVectorMatrix& UEqn +) const +{ + if (cellZoneID_ == -1) + { + return; + } + + const labelList& cells = mesh_.cellZones()[cellZoneID_]; + const scalarField& V = mesh_.V(); + vectorField& Usource = UEqn.source(); + const vectorField& U = UEqn.psi(); + const vector& Omega = Omega_.value(); + + forAll(cells, i) + { + label celli = cells[i]; + Usource[celli] -= V[celli]*rho[celli]*(Omega ^ U[celli]); + } +} + + void Foam::MRFZone::relativeVelocity(volVectorField& U) const { const volVectorField& C = mesh_.C(); diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZone.H b/src/finiteVolume/cfdTools/general/MRF/MRFZone.H index 9fa3085914151d22df5fe9c59b0fef097878749d..d5554a5b0810ea1fab45d5474df22397db3390d7 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZone.H +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZone.H @@ -154,6 +154,9 @@ public: //- Add the Coriolis force contribution to the momentum equation void addCoriolis(fvVectorMatrix& UEqn) const; + //- Add the Coriolis force contribution to the momentum equation + void addCoriolis(const volScalarField& rho, fvVectorMatrix& UEqn) const; + //- Make the given absolute velocity relative within the MRF region void relativeVelocity(volVectorField& U) const; diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZones.C b/src/finiteVolume/cfdTools/general/MRF/MRFZones.C index 3e6854e3de3de0e92d8ace6ae528d9febf31b5b5..5ef8b3ee83ffbac7bdb843f8873d842aedd5208d 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZones.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZones.C @@ -65,6 +65,19 @@ void Foam::MRFZones::addCoriolis(fvVectorMatrix& UEqn) const } +void Foam::MRFZones::addCoriolis +( + const volScalarField& rho, + fvVectorMatrix& UEqn +) const +{ + forAll(*this, i) + { + operator[](i).addCoriolis(rho, UEqn); + } +} + + void Foam::MRFZones::relativeVelocity(volVectorField& U) const { forAll(*this, i) diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZones.H b/src/finiteVolume/cfdTools/general/MRF/MRFZones.H index 8895963606eaa46f167d3e4213ba5195d9d9322c..6e979903a9b803fa4b897863876b3f23765517ff 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZones.H +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZones.H @@ -76,6 +76,9 @@ public: //- Add the Coriolis force contribution to the momentum equation void addCoriolis(fvVectorMatrix& UEqn) const; + //- Add the Coriolis force contribution to the momentum equation + void addCoriolis(const volScalarField& rho, fvVectorMatrix& UEqn) const; + //- Make the given absolute velocity relative within the MRF region void relativeVelocity(volVectorField& U) const; 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/findRefCell/findRefCell.C b/src/finiteVolume/cfdTools/general/findRefCell/findRefCell.C index ed450ea4883c6ff4652872a4a5f7eae633e2f129..370b13747d204dad917ba3da9b4bdc6af2176252 100644 --- a/src/finiteVolume/cfdTools/general/findRefCell/findRefCell.C +++ b/src/finiteVolume/cfdTools/general/findRefCell/findRefCell.C @@ -108,7 +108,7 @@ void Foam::setRefCell " bool\n" ")", dict - ) << "Unable to set reference cell for field" << field.name() + ) << "Unable to set reference cell for field " << field.name() << nl << " Please supply either " << refCellName << " or " << refPointName << nl << exit(FatalIOError); 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/fields/fvPatchFields/derived/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.C index c31f5acc5c3888b49479e7f11b791ae28d51c25c..b6f48ff6ada8e214e41f83c848bafabdb32de46e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.C @@ -113,7 +113,17 @@ void fixedFluxBuoyantPressureFvPatchScalarField::updateCoeffs() const fvPatchField<scalar>& rho = patch().lookupPatchField<volScalarField, scalar>("rho"); - gradient() = -rho.snGrad()*(g.value() & patch().Cf()); + // If the variable name is "pd" assume it is p - rho*g.h + // and set the gradient appropriately. + // Otherwise assume the variable is the static pressure. + if (dimensionedInternalField().name() == "pd") + { + gradient() = -rho.snGrad()*(g.value() & patch().Cf()); + } + else + { + gradient() = rho*(g.value() & patch().nf()); + } fixedGradientFvPatchScalarField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.H index 3ce584bf873cef5a8a88804dd0076b82145be4c5..8e433cb8f167f0304ec840bb270c4521c9230e5b 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.H @@ -26,7 +26,10 @@ Class Foam::fixedFluxBuoyantPressureFvPatchScalarField Description - Foam::fixedFluxBuoyantPressureFvPatchScalarField + Set the pressure gradient boundary condition appropriately for buoyant flow. + + If the variable name is "pd" assume it is p - rho*g.h and set the gradient + appropriately. Otherwise assume the variable is the static pressure. SourceFiles fixedFluxBuoyantPressureFvPatchScalarField.C 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/finiteVolume/finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGrad.H b/src/finiteVolume/finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGrad.H index bc170c14666a1f8a0d1533737a256d46d0d02d4e..035bb1d6dba485422291895e14000961dd692c54 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGrad.H +++ b/src/finiteVolume/finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGrad.H @@ -39,7 +39,7 @@ SourceFiles #include "snGradScheme.H" #include "quadraticFitSnGradData.H" -#include "extendedStencil.H" +#include "extendedCellToFaceStencil.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -133,7 +133,7 @@ public: centralWeight_ ); - const extendedStencil& stencil = qfd.stencil(); + const extendedCellToFaceStencil& stencil = qfd.stencil(); const List<scalarList>& f = qfd.fit(); tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > sft diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.H b/src/finiteVolume/finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.H index 12d5c90f5435544be324296bb441e8af30381148..bedb0570cca700cde959041c1b6bea8a5b4de147 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.H +++ b/src/finiteVolume/finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.H @@ -38,7 +38,7 @@ SourceFiles #include "MeshObject.H" #include "fvMesh.H" -#include "extendedStencil.H" +#include "extendedCellToFaceStencil.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -62,7 +62,7 @@ class quadraticFitSnGradData const label minSize_; //- Extended stencil addressing - extendedStencil stencil_; + extendedCellToFaceStencil stencil_; //- For each cell in the mesh store the values which multiply the // values of the stencil to obtain the gradient for each direction @@ -107,7 +107,7 @@ public: // Member functions //- Return reference to the stencil - const extendedStencil& stencil() const + const extendedCellToFaceStencil& stencil() const { return stencil_; } diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index 5ad5dca8cdd5a90e84948eb6aac18199a3130340..5eae3a9f80a1ce3f9401f07fd8759a5d67789a68 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -480,7 +480,7 @@ void Foam::fvMatrix<Type>::setReference const bool forceReference ) { - if (celli >= 0 && (psi_.needReference() || forceReference)) + if ((forceReference || psi_.needReference()) && celli >= 0) { source()[celli] += diag()[celli]*value; diag()[celli] += diag()[celli]; diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellEdgeCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CECCellToCellStencil.C similarity index 90% rename from src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellEdgeCellStencil.C rename to src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CECCellToCellStencil.C index 034106f13abdb06dc5d6e4db73d777aed2d57177..b6d2dfa91ef4656621c6bb48611414d45e52b7ea 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellEdgeCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CECCellToCellStencil.C @@ -24,16 +24,13 @@ License \*---------------------------------------------------------------------------*/ -#include "cellEdgeCellStencil.H" +#include "CECCellToCellStencil.H" #include "syncTools.H" -//#include "meshTools.H" -//#include "OFstream.H" -//#include "Time.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // Calculates per edge the neighbour data (= edgeCells) -void Foam::cellEdgeCellStencil::calcEdgeBoundaryData +void Foam::CECCellToCellStencil::calcEdgeBoundaryData ( const boolList& isValidBFace, const labelList& boundaryEdges, @@ -72,7 +69,7 @@ void Foam::cellEdgeCellStencil::calcEdgeBoundaryData // Calculates per cell the neighbour data (= cell or boundary in global // numbering). First element is always cell itself! -void Foam::cellEdgeCellStencil::calcCellStencil +void Foam::CECCellToCellStencil::calcCellStencil ( labelListList& globalCellCells ) const @@ -189,20 +186,12 @@ void Foam::cellEdgeCellStencil::calcCellStencil // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::cellEdgeCellStencil::cellEdgeCellStencil(const polyMesh& mesh) +Foam::CECCellToCellStencil::CECCellToCellStencil(const polyMesh& mesh) : - faceStencil(mesh) + cellToCellStencil(mesh) { // Calculate per cell the (edge) connected cells (in global numbering) - labelListList globalCellCells; - calcCellStencil(globalCellCells); - - // Add stencils of neighbouring cells to create faceStencil - labelListList faceStencil; - calcFaceStencil(globalCellCells, faceStencil); - - // Transfer to *this - transfer(faceStencil); + calcCellStencil(*this); } diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellEdgeCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CECCellToCellStencil.H similarity index 84% rename from src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellEdgeCellStencil.H rename to src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CECCellToCellStencil.H index 2cc8b21e33cc92d3632af49c47304bb213cde2e7..27303ffd9f448c984c28eda028cd7448beadc349 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellEdgeCellStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CECCellToCellStencil.H @@ -23,19 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::cellEdgeCellStencil + Foam::CECCellToCellStencil Description SourceFiles - cellEdgeCellStencil.C + CECCellToCellStencil.C \*---------------------------------------------------------------------------*/ -#ifndef cellEdgeCellStencil_H -#define cellEdgeCellStencil_H +#ifndef CECCellToCellStencil_H +#define CECCellToCellStencil_H -#include "faceStencil.H" +#include "cellToCellStencil.H" #include "boolList.H" #include "HashSet.H" #include "Map.H" @@ -47,12 +47,12 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class cellEdgeCellStencil Declaration + Class CECCellToCellStencil Declaration \*---------------------------------------------------------------------------*/ -class cellEdgeCellStencil +class CECCellToCellStencil : - public faceStencil + public cellToCellStencil { // Private Member Functions @@ -68,10 +68,10 @@ class cellEdgeCellStencil //- Disallow default bitwise copy construct - cellEdgeCellStencil(const cellEdgeCellStencil&); + CECCellToCellStencil(const CECCellToCellStencil&); //- Disallow default bitwise assignment - void operator=(const cellEdgeCellStencil&); + void operator=(const CECCellToCellStencil&); public: @@ -79,7 +79,7 @@ public: // Constructors //- Construct from all cells and boundary faces - explicit cellEdgeCellStencil(const polyMesh&); + explicit CECCellToCellStencil(const polyMesh&); }; diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellFaceCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CFCCellToCellStencil.C similarity index 89% rename from src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellFaceCellStencil.C rename to src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CFCCellToCellStencil.C index 263ebf0d041e85b9f2237c708d86b947b906c1db..7c718cacfd44256700210b1740abe0190da989b2 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellFaceCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CFCCellToCellStencil.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "cellFaceCellStencil.H" +#include "CFCCellToCellStencil.H" #include "syncTools.H" #include "SortableList.H" #include "emptyPolyPatch.H" @@ -32,7 +32,7 @@ License // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // Calculates per face the neighbour data (= cell or boundary face) -void Foam::cellFaceCellStencil::calcFaceBoundaryData +void Foam::CFCCellToCellStencil::calcFaceBoundaryData ( labelList& neiGlobal ) const @@ -85,7 +85,7 @@ void Foam::cellFaceCellStencil::calcFaceBoundaryData // Calculates per cell the neighbour data (= cell or boundary in global // numbering). First element is always cell itself! -void Foam::cellFaceCellStencil::calcCellStencil(labelListList& globalCellCells) +void Foam::CFCCellToCellStencil::calcCellStencil(labelListList& globalCellCells) const { const label nBnd = mesh().nFaces()-mesh().nInternalFaces(); @@ -147,20 +147,12 @@ void Foam::cellFaceCellStencil::calcCellStencil(labelListList& globalCellCells) // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::cellFaceCellStencil::cellFaceCellStencil(const polyMesh& mesh) +Foam::CFCCellToCellStencil::CFCCellToCellStencil(const polyMesh& mesh) : - faceStencil(mesh) + cellToCellStencil(mesh) { // Calculate per cell the (face) connected cells (in global numbering) - labelListList globalCellCells; - calcCellStencil(globalCellCells); - - // Add stencils of neighbouring cells to create faceStencil - labelListList faceStencil; - calcFaceStencil(globalCellCells, faceStencil); - - // Transfer to *this - transfer(faceStencil); + calcCellStencil(*this); } diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellFaceCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CFCCellToCellStencil.H similarity index 82% rename from src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellFaceCellStencil.H rename to src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CFCCellToCellStencil.H index 174c4b7feec5ecc5871cab0727ae972c093621f0..c524b8d3eac9e9fe8583bfa228d6ba942be5f06a 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellFaceCellStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CFCCellToCellStencil.H @@ -23,19 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::cellFaceCellStencil + Foam::CFCCellToCellStencil Description SourceFiles - cellFaceCellStencil.C + CFCCellToCellStencil.C \*---------------------------------------------------------------------------*/ -#ifndef cellFaceCellStencil_H -#define cellFaceCellStencil_H +#ifndef CFCCellToCellStencil_H +#define CFCCellToCellStencil_H -#include "faceStencil.H" +#include "cellToCellStencil.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -43,12 +43,12 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class cellFaceCellStencil Declaration + Class CFCCellToCellStencil Declaration \*---------------------------------------------------------------------------*/ -class cellFaceCellStencil +class CFCCellToCellStencil : - public faceStencil + public cellToCellStencil { // Private Member Functions @@ -57,17 +57,17 @@ class cellFaceCellStencil void calcCellStencil(labelListList& globalCellCells) const; //- Disallow default bitwise copy construct - cellFaceCellStencil(const cellFaceCellStencil&); + CFCCellToCellStencil(const CFCCellToCellStencil&); //- Disallow default bitwise assignment - void operator=(const cellFaceCellStencil&); + void operator=(const CFCCellToCellStencil&); public: // Constructors //- Construct from mesh - explicit cellFaceCellStencil(const polyMesh& mesh); + explicit CFCCellToCellStencil(const polyMesh& mesh); }; diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellPointCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CPCCellToCellStencil.C similarity index 90% rename from src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellPointCellStencil.C rename to src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CPCCellToCellStencil.C index 67b5be9a325baa700aaaaa3045798b3e0df2a1e2..af6de874b6edf459f7903b3c98c19b569c0cdc99 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellPointCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CPCCellToCellStencil.C @@ -24,13 +24,13 @@ License \*---------------------------------------------------------------------------*/ -#include "cellPointCellStencil.H" +#include "CPCCellToCellStencil.H" #include "syncTools.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // Calculates per point the neighbour data (= pointCells) -void Foam::cellPointCellStencil::calcPointBoundaryData +void Foam::CPCCellToCellStencil::calcPointBoundaryData ( const boolList& isValidBFace, const labelList& boundaryPoints, @@ -69,7 +69,7 @@ void Foam::cellPointCellStencil::calcPointBoundaryData // Calculates per cell the neighbour data (= cell or boundary in global // numbering). First element is always cell itself! -void Foam::cellPointCellStencil::calcCellStencil +void Foam::CPCCellToCellStencil::calcCellStencil ( labelListList& globalCellCells ) const @@ -154,20 +154,13 @@ void Foam::cellPointCellStencil::calcCellStencil // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::cellPointCellStencil::cellPointCellStencil(const polyMesh& mesh) +Foam::CPCCellToCellStencil::CPCCellToCellStencil(const polyMesh& mesh) : - faceStencil(mesh) + cellToCellStencil(mesh) { // Calculate per cell the (point) connected cells (in global numbering) labelListList globalCellCells; - calcCellStencil(globalCellCells); - - // Add stencils of neighbouring cells to create faceStencil - labelListList faceStencil; - calcFaceStencil(globalCellCells, faceStencil); - - // Transfer to *this - transfer(faceStencil); + calcCellStencil(*this); } diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellPointCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CPCCellToCellStencil.H similarity index 84% rename from src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellPointCellStencil.H rename to src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CPCCellToCellStencil.H index 6bd318338b4ada8c23927d4b20c8f9354da3f50a..848e9044ab1c1a2fd5bb9b51ab7597714e138186 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/cellPointCellStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/CPCCellToCellStencil.H @@ -23,19 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::cellPointCellStencil + Foam::CPCCellToCellStencil Description SourceFiles - cellPointCellStencil.C + CPCCellToCellStencil.C \*---------------------------------------------------------------------------*/ -#ifndef cellPointCellStencil_H -#define cellPointCellStencil_H +#ifndef CPCCellToCellStencil_H +#define CPCCellToCellStencil_H -#include "faceStencil.H" +#include "cellToCellStencil.H" #include "boolList.H" #include "HashSet.H" #include "Map.H" @@ -46,12 +46,12 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class cellPointCellStencil Declaration + Class CPCCellToCellStencil Declaration \*---------------------------------------------------------------------------*/ -class cellPointCellStencil +class CPCCellToCellStencil : - public faceStencil + public cellToCellStencil { // Private Member Functions @@ -67,10 +67,10 @@ class cellPointCellStencil //- Disallow default bitwise copy construct - cellPointCellStencil(const cellPointCellStencil&); + CPCCellToCellStencil(const CPCCellToCellStencil&); //- Disallow default bitwise assignment - void operator=(const cellPointCellStencil&); + void operator=(const CPCCellToCellStencil&); public: @@ -78,7 +78,7 @@ public: // Constructors //- Construct from all cells and boundary faces - explicit cellPointCellStencil(const polyMesh&); + explicit CPCCellToCellStencil(const polyMesh&); }; diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/cellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/cellToCellStencil.C new file mode 100644 index 0000000000000000000000000000000000000000..37af71f5e4884c97f6c11cc1aa4a3e6dfb6511a5 --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/cellToCellStencil.C @@ -0,0 +1,350 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "cellToCellStencil.H" +#include "syncTools.H" +#include "SortableList.H" +#include "emptyPolyPatch.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +// Merge two list and guarantee global0,global1 are first. +void Foam::cellToCellStencil::merge +( + const label global0, + const label global1, + const labelList& listA, + labelList& listB +) +{ + sort(listB); + + // See if global0, global1 already present in listB + label nGlobalInsert = 0; + + if (global0 != -1) + { + label index0 = findSortedIndex(listB, global0); + if (index0 == -1) + { + nGlobalInsert++; + } + } + + if (global1 != -1) + { + label index1 = findSortedIndex(listB, global1); + if (index1 == -1) + { + nGlobalInsert++; + } + } + + + // For all in listA see if they are present + label nInsert = 0; + + forAll(listA, i) + { + label elem = listA[i]; + + if (elem != global0 && elem != global1) + { + if (findSortedIndex(listB, elem) == -1) + { + nInsert++; + } + } + } + + // Extend B with nInsert and whether global0,global1 need to be inserted. + labelList result(listB.size() + nGlobalInsert + nInsert); + + label resultI = 0; + + // Insert global0,1 first + if (global0 != -1) + { + result[resultI++] = global0; + } + if (global1 != -1) + { + result[resultI++] = global1; + } + + + // Insert listB + forAll(listB, i) + { + label elem = listB[i]; + + if (elem != global0 && elem != global1) + { + result[resultI++] = elem; + } + } + + + // Insert listA + forAll(listA, i) + { + label elem = listA[i]; + + if (elem != global0 && elem != global1) + { + if (findSortedIndex(listB, elem) == -1) + { + result[resultI++] = elem; + } + } + } + + if (resultI != result.size()) + { + FatalErrorIn("cellToCellStencil::merge(..)") + << "problem" << abort(FatalError); + } + + listB.transfer(result); +} + + +// Merge two list and guarantee globalI is first. +void Foam::cellToCellStencil::merge +( + const label globalI, + const labelList& pGlobals, + labelList& cCells +) +{ + labelHashSet set; + forAll(cCells, i) + { + if (cCells[i] != globalI) + { + set.insert(cCells[i]); + } + } + + forAll(pGlobals, i) + { + if (pGlobals[i] != globalI) + { + set.insert(pGlobals[i]); + } + } + + cCells.setSize(set.size()+1); + label n = 0; + cCells[n++] = globalI; + + forAllConstIter(labelHashSet, set, iter) + { + cCells[n++] = iter.key(); + } +} + + +void Foam::cellToCellStencil::validBoundaryFaces(boolList& isValidBFace) const +{ + const polyBoundaryMesh& patches = mesh().boundaryMesh(); + + isValidBFace.setSize(mesh().nFaces()-mesh().nInternalFaces(), true); + + forAll(patches, patchI) + { + const polyPatch& pp = patches[patchI]; + + if (pp.coupled() || isA<emptyPolyPatch>(pp)) + { + label bFaceI = pp.start()-mesh().nInternalFaces(); + forAll(pp, i) + { + isValidBFace[bFaceI++] = false; + } + } + } +} + + +Foam::autoPtr<Foam::indirectPrimitivePatch> +Foam::cellToCellStencil::allCoupledFacesPatch() const +{ + const polyBoundaryMesh& patches = mesh().boundaryMesh(); + + label nCoupled = 0; + + forAll(patches, patchI) + { + const polyPatch& pp = patches[patchI]; + + if (pp.coupled()) + { + nCoupled += pp.size(); + } + } + labelList coupledFaces(nCoupled); + nCoupled = 0; + + forAll(patches, patchI) + { + const polyPatch& pp = patches[patchI]; + + if (pp.coupled()) + { + label faceI = pp.start(); + + forAll(pp, i) + { + coupledFaces[nCoupled++] = faceI++; + } + } + } + + return autoPtr<indirectPrimitivePatch> + ( + new indirectPrimitivePatch + ( + IndirectList<face> + ( + mesh().faces(), + coupledFaces + ), + mesh().points() + ) + ); +} + + +void Foam::cellToCellStencil::unionEqOp::operator() +( + labelList& x, + const labelList& y +) const +{ + if (y.size()) + { + if (x.empty()) + { + x = y; + } + else + { + labelHashSet set(x); + forAll(y, i) + { + set.insert(y[i]); + } + x = set.toc(); + } + } +} + + +void Foam::cellToCellStencil::insertFaceCells +( + const label exclude0, + const label exclude1, + const boolList& isValidBFace, + const labelList& faceLabels, + labelHashSet& globals +) const +{ + const labelList& own = mesh().faceOwner(); + const labelList& nei = mesh().faceNeighbour(); + + forAll(faceLabels, i) + { + label faceI = faceLabels[i]; + + label globalOwn = globalNumbering().toGlobal(own[faceI]); + if (globalOwn != exclude0 && globalOwn != exclude1) + { + globals.insert(globalOwn); + } + + if (mesh().isInternalFace(faceI)) + { + label globalNei = globalNumbering().toGlobal(nei[faceI]); + if (globalNei != exclude0 && globalNei != exclude1) + { + globals.insert(globalNei); + } + } + else + { + label bFaceI = faceI-mesh().nInternalFaces(); + + if (isValidBFace[bFaceI]) + { + label globalI = globalNumbering().toGlobal + ( + mesh().nCells() + + bFaceI + ); + + if (globalI != exclude0 && globalI != exclude1) + { + globals.insert(globalI); + } + } + } + } +} + + +Foam::labelList Foam::cellToCellStencil::calcFaceCells +( + const boolList& isValidBFace, + const labelList& faceLabels, + labelHashSet& globals +) const +{ + globals.clear(); + + insertFaceCells + ( + -1, + -1, + isValidBFace, + faceLabels, + globals + ); + + return globals.toc(); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::cellToCellStencil::cellToCellStencil(const polyMesh& mesh) +: + mesh_(mesh), + globalNumbering_(mesh_.nCells()+mesh_.nFaces()-mesh_.nInternalFaces()) +{} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/cellToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/cellToCellStencil.H new file mode 100644 index 0000000000000000000000000000000000000000..08b7b0fb2fd171d4f2ec29e36ae2f38557c6f92c --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/fullStencils/cellToCellStencil.H @@ -0,0 +1,152 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::cellToCellStencil + +Description + baseclass for extended cell centred addressing. Contains per cell a + list of neighbouring cells and/or boundaryfaces in global addressing. + +SourceFiles + cellToCellStencil.C + +\*---------------------------------------------------------------------------*/ + +#ifndef cellToCellStencil_H +#define cellToCellStencil_H + +#include "globalIndex.H" +#include "boolList.H" +#include "HashSet.H" +#include "indirectPrimitivePatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class polyMesh; + +/*---------------------------------------------------------------------------*\ + Class cellToCellStencil Declaration +\*---------------------------------------------------------------------------*/ + +class cellToCellStencil +: + public labelListList +{ + // Private data + + const polyMesh& mesh_; + + //- Global numbering for cells and boundary faces + const globalIndex globalNumbering_; + + + // Private Member Functions + + //- Disallow default bitwise assignment + void operator=(const cellToCellStencil&); + + +protected: + + //- Merge two lists. + static void merge + ( + const label, + const label, + const labelList&, + labelList& + ); + + //- Merge two lists. + static void merge(const label, const labelList&, labelList&); + + //- Valid boundary faces (not empty and not coupled) + void validBoundaryFaces(boolList& isValidBFace) const; + + //- Return patch of all coupled faces. + autoPtr<indirectPrimitivePatch> allCoupledFacesPatch() const; + + //- Combine operator for labelLists + class unionEqOp + { + public: + void operator()( labelList& x, const labelList& y ) const; + }; + + //- Collect cell neighbours of faces in global numbering + void insertFaceCells + ( + const label exclude0, + const label exclude1, + const boolList& nonEmptyFace, + const labelList& faceLabels, + labelHashSet& globals + ) const; + + //- Collect cell neighbours of faces in global numbering + labelList calcFaceCells + ( + const boolList& nonEmptyFace, + const labelList& faceLabels, + labelHashSet& globals + ) const; + + +public: + + // Constructors + + //- Construct from mesh + explicit cellToCellStencil(const polyMesh&); + + + // Member Functions + + const polyMesh& mesh() const + { + return mesh_; + } + + //- Global numbering for cells and boundary faces + const globalIndex& globalNumbering() const + { + return globalNumbering_; + } + +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCECCellToFaceStencilObject.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCECCellToFaceStencilObject.C new file mode 100644 index 0000000000000000000000000000000000000000..ddc33f39e2023dc12decceaabe838221a5f545d4 --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCECCellToFaceStencilObject.C @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "centredCECCellToFaceStencilObject.H" + + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(centredCECCellToFaceStencilObject, 0); +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCPCStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCECCellToFaceStencilObject.H similarity index 66% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCPCStencilObject.H rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCECCellToFaceStencilObject.H index 183c0808ccd69c8389a7f376f5126597746d0403..b639ee910aad8fbe5232af4bf325c15cd60eece1 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCPCStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCECCellToFaceStencilObject.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::centredCPCStencilObject + Foam::centredCECCellToFaceStencilObject Description @@ -31,11 +31,11 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef centredCPCStencilObject_H -#define centredCPCStencilObject_H +#ifndef centredCECCellToFaceStencilObject_H +#define centredCECCellToFaceStencilObject_H -#include "extendedCentredStencil.H" -#include "cellPointCellStencil.H" +#include "extendedCentredCellToFaceStencil.H" +#include "CECCellToFaceStencil.H" #include "MeshObject.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,35 +44,42 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class centredCPCStencilObject Declaration + Class centredCECCellToFaceStencilObject Declaration \*---------------------------------------------------------------------------*/ -class centredCPCStencilObject +class centredCECCellToFaceStencilObject : - public MeshObject<fvMesh, centredCPCStencilObject>, - public extendedCentredStencil + public MeshObject<fvMesh, centredCECCellToFaceStencilObject>, + public extendedCentredCellToFaceStencil { public: - TypeName("centredCFCStencil"); + TypeName("centredCECCellToFaceStencil"); // Constructors //- Construct from uncompacted face stencil - explicit centredCPCStencilObject + explicit centredCECCellToFaceStencilObject ( const fvMesh& mesh ) : - MeshObject<fvMesh, centredCPCStencilObject>(mesh), - extendedCentredStencil(cellPointCellStencil(mesh)) - {} + MeshObject<fvMesh, centredCECCellToFaceStencilObject>(mesh), + extendedCentredCellToFaceStencil(CECCellToFaceStencil(mesh)) + { + if (extendedCellToFaceStencil::debug) + { + Info<< "Generated centred stencil " << type() + << nl << endl; + writeStencilStats(Info, stencil(), map()); + } + } // Destructor - virtual ~centredCPCStencilObject() + virtual ~centredCECCellToFaceStencilObject() {} }; diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCFCCellToFaceStencilObject.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCFCCellToFaceStencilObject.C new file mode 100644 index 0000000000000000000000000000000000000000..675b9298700f200ff4c05aee4fbc25b8a79a864f --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCFCCellToFaceStencilObject.C @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "centredCFCCellToFaceStencilObject.H" + + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(centredCFCCellToFaceStencilObject, 0); +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCFCCellToFaceStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCFCCellToFaceStencilObject.H new file mode 100644 index 0000000000000000000000000000000000000000..d6961220b5f13f64e0beda7dd989105a50f5069a --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCFCCellToFaceStencilObject.H @@ -0,0 +1,94 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::centredCFCCellToFaceStencilObject + +Description + +SourceFiles + +\*---------------------------------------------------------------------------*/ + +#ifndef centredCFCCellToFaceStencilObject_H +#define centredCFCCellToFaceStencilObject_H + +#include "extendedCentredCellToFaceStencil.H" +#include "CFCCellToFaceStencil.H" +#include "MeshObject.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class centredCFCCellToFaceStencilObject Declaration +\*---------------------------------------------------------------------------*/ + +class centredCFCCellToFaceStencilObject +: + public MeshObject<fvMesh, centredCFCCellToFaceStencilObject>, + public extendedCentredCellToFaceStencil +{ + +public: + + TypeName("centredCFCCellToFaceStencil"); + + // Constructors + + //- Construct from uncompacted face stencil + explicit centredCFCCellToFaceStencilObject + ( + const fvMesh& mesh + ) + : + MeshObject<fvMesh, centredCFCCellToFaceStencilObject>(mesh), + extendedCentredCellToFaceStencil(CFCCellToFaceStencil(mesh)) + { + if (extendedCellToFaceStencil::debug) + { + Info<< "Generated centred stencil " << type() + << nl << endl; + writeStencilStats(Info, stencil(), map()); + } + } + + + //- Destructor + virtual ~centredCFCCellToFaceStencilObject() + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCPCCellToFaceStencilObject.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCPCCellToFaceStencilObject.C new file mode 100644 index 0000000000000000000000000000000000000000..cf0fc71cf4b9c0380f3dff34ad44aebb946e87bd --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCPCCellToFaceStencilObject.C @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "centredCPCCellToFaceStencilObject.H" + + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(centredCPCCellToFaceStencilObject, 0); +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCPCCellToFaceStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCPCCellToFaceStencilObject.H new file mode 100644 index 0000000000000000000000000000000000000000..68608f210bc9a5bea7e016ad8705d717b941201c --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredCPCCellToFaceStencilObject.H @@ -0,0 +1,95 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::centredCPCCellToFaceStencilObject + +Description + +SourceFiles + +\*---------------------------------------------------------------------------*/ + +#ifndef centredCPCCellToFaceStencilObject_H +#define centredCPCCellToFaceStencilObject_H + +#include "extendedCentredCellToFaceStencil.H" +#include "CPCCellToFaceStencil.H" +#include "MeshObject.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class centredCPCCellToFaceStencilObject Declaration +\*---------------------------------------------------------------------------*/ + +class centredCPCCellToFaceStencilObject +: + public MeshObject<fvMesh, centredCPCCellToFaceStencilObject>, + public extendedCentredCellToFaceStencil +{ + +public: + + TypeName("centredCFCCellToFaceStencil"); + + // Constructors + + //- Construct from uncompacted face stencil + explicit centredCPCCellToFaceStencilObject + ( + const fvMesh& mesh + ) + : + MeshObject<fvMesh, centredCPCCellToFaceStencilObject>(mesh), + extendedCentredCellToFaceStencil(CPCCellToFaceStencil(mesh)) + { + if (extendedCellToFaceStencil::debug) + { + Info<< "Generated centred stencil " << type() + << nl << endl; + writeStencilStats(Info, stencil(), map()); + } + } + + + // Destructor + + virtual ~centredCPCCellToFaceStencilObject() + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredFECCellToFaceStencilObject.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredFECCellToFaceStencilObject.C new file mode 100644 index 0000000000000000000000000000000000000000..b66c40ce059dd15edd673e75f7aba716cd2af296 --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredFECCellToFaceStencilObject.C @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "centredFECCellToFaceStencilObject.H" + + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(centredFECCellToFaceStencilObject, 0); +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredFECCellToFaceStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredFECCellToFaceStencilObject.H new file mode 100644 index 0000000000000000000000000000000000000000..3a802374f7af4de0b48af6c7d036f557e608bdcd --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/centredFECCellToFaceStencilObject.H @@ -0,0 +1,95 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::centredFECCellToFaceStencilObject + +Description + +SourceFiles + +\*---------------------------------------------------------------------------*/ + +#ifndef centredFECCellToFaceStencilObject_H +#define centredFECCellToFaceStencilObject_H + +#include "extendedCentredCellToFaceStencil.H" +#include "FECCellToFaceStencil.H" +#include "MeshObject.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class centredFECCellToFaceStencilObject Declaration +\*---------------------------------------------------------------------------*/ + +class centredFECCellToFaceStencilObject +: + public MeshObject<fvMesh, centredFECCellToFaceStencilObject>, + public extendedCentredCellToFaceStencil +{ + +public: + + TypeName("centredCFCCellToFaceStencil"); + + // Constructors + + //- Construct from uncompacted face stencil + explicit centredFECCellToFaceStencilObject + ( + const fvMesh& mesh + ) + : + MeshObject<fvMesh, centredFECCellToFaceStencilObject>(mesh), + extendedCentredCellToFaceStencil(FECCellToFaceStencil(mesh)) + { + if (extendedCellToFaceStencil::debug) + { + Info<< "Generated centred stencil " << type() + << nl << endl; + writeStencilStats(Info, stencil(), map()); + } + } + + + // Destructor + + virtual ~centredFECCellToFaceStencilObject() + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/pureUpwindCFCCellToFaceStencilObject.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/pureUpwindCFCCellToFaceStencilObject.C new file mode 100644 index 0000000000000000000000000000000000000000..541e7f40d0c32fd4112088232eabea1dc26da81c --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/pureUpwindCFCCellToFaceStencilObject.C @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "pureUpwindCFCCellToFaceStencilObject.H" + + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(pureUpwindCFCCellToFaceStencilObject, 0); +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/pureUpwindCFCCellToFaceStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/pureUpwindCFCCellToFaceStencilObject.H new file mode 100644 index 0000000000000000000000000000000000000000..c3be0efe7e02c399500f46c7bfd2bdd8f9d7e442 --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/pureUpwindCFCCellToFaceStencilObject.H @@ -0,0 +1,95 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::upwindCFCCellToFaceStencilObject + +Description + +SourceFiles + +\*---------------------------------------------------------------------------*/ + +#ifndef pureUpwindCFCCellToFaceStencilObject_H +#define pureUpwindCFCCellToFaceStencilObject_H + +#include "extendedUpwindCellToFaceStencil.H" +#include "CFCCellToFaceStencil.H" +#include "MeshObject.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class pureUpwindCFCCellToFaceStencilObject Declaration +\*---------------------------------------------------------------------------*/ + +class pureUpwindCFCCellToFaceStencilObject +: + public MeshObject<fvMesh, pureUpwindCFCCellToFaceStencilObject>, + public extendedUpwindCellToFaceStencil +{ + +public: + + TypeName("pureUpwindCFCCellToFaceStencil"); + + // Constructors + + //- Construct from uncompacted face stencil + explicit pureUpwindCFCCellToFaceStencilObject + ( + const fvMesh& mesh + ) + : + MeshObject<fvMesh, pureUpwindCFCCellToFaceStencilObject>(mesh), + extendedUpwindCellToFaceStencil(CFCCellToFaceStencil(mesh)) + { + if (extendedCellToFaceStencil::debug) + { + Info<< "Generated pure upwind stencil " << type() + << nl << endl; + writeStencilStats(Info, ownStencil(), ownMap()); + } + } + + + // Destructor + + virtual ~pureUpwindCFCCellToFaceStencilObject() + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCECStencilObject.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCECCellToFaceStencilObject.C similarity index 92% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCECStencilObject.C rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCECCellToFaceStencilObject.C index 6a1e250065db0ae32556e3c94172096078684183..1c5271b13248118e0ebcfd093c303b086037977a 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCECStencilObject.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCECCellToFaceStencilObject.C @@ -24,14 +24,14 @@ License \*---------------------------------------------------------------------------*/ -#include "centredCECStencilObject.H" +#include "upwindCECCellToFaceStencilObject.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(centredCECStencilObject, 0); + defineTypeNameAndDebug(upwindCECCellToFaceStencilObject, 0); } diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCFCStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCECCellToFaceStencilObject.H similarity index 64% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCFCStencilObject.H rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCECCellToFaceStencilObject.H index de8972c112e647f78712371df86a289a85816a74..d23cdacfef173d7174c306445e6415e7f50c6c0a 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCFCStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCECCellToFaceStencilObject.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::upwindCFCStencilObject + Foam::upwindCECCellToFaceStencilObject Description @@ -31,11 +31,11 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef upwindCFCStencilObject_H -#define upwindCFCStencilObject_H +#ifndef upwindCECCellToFaceStencilObject_H +#define upwindCECCellToFaceStencilObject_H -#include "extendedUpwindStencil.H" -#include "cellFaceCellStencil.H" +#include "extendedUpwindCellToFaceStencil.H" +#include "CECCellToFaceStencil.H" #include "MeshObject.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,36 +44,49 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class upwindCFCStencilObject Declaration + Class upwindCECCellToFaceStencilObject Declaration \*---------------------------------------------------------------------------*/ -class upwindCFCStencilObject +class upwindCECCellToFaceStencilObject : - public MeshObject<fvMesh, upwindCFCStencilObject>, - public extendedUpwindStencil + public MeshObject<fvMesh, upwindCECCellToFaceStencilObject>, + public extendedUpwindCellToFaceStencil { public: - TypeName("upwindCFCStencil"); + TypeName("upwindCFCCellToFaceStencil"); // Constructors //- Construct from uncompacted face stencil - explicit upwindCFCStencilObject + explicit upwindCECCellToFaceStencilObject ( const fvMesh& mesh, + const bool pureUpwind, const scalar minOpposedness ) : - MeshObject<fvMesh, upwindCFCStencilObject>(mesh), - extendedUpwindStencil(cellFaceCellStencil(mesh), minOpposedness) - {} + MeshObject<fvMesh, upwindCECCellToFaceStencilObject>(mesh), + extendedUpwindCellToFaceStencil + ( + CECCellToFaceStencil(mesh), + pureUpwind, + minOpposedness + ) + { + if (extendedCellToFaceStencil::debug) + { + Info<< "Generated off-centred stencil " << type() + << nl << endl; + writeStencilStats(Info, ownStencil(), ownMap()); + } + } // Destructor - virtual ~upwindCFCStencilObject() + virtual ~upwindCECCellToFaceStencilObject() {} }; diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCPCStencilObject.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCFCCellToFaceStencilObject.C similarity index 92% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCPCStencilObject.C rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCFCCellToFaceStencilObject.C index db5bf143ae170f945ff9c036233d0b59ab021c01..18ea2137222c8baa5fe90fe3289b051c1913cbc6 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCPCStencilObject.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCFCCellToFaceStencilObject.C @@ -24,14 +24,14 @@ License \*---------------------------------------------------------------------------*/ -#include "centredCPCStencilObject.H" +#include "upwindCFCCellToFaceStencilObject.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(centredCPCStencilObject, 0); + defineTypeNameAndDebug(upwindCFCCellToFaceStencilObject, 0); } diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCPCStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCFCCellToFaceStencilObject.H similarity index 64% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCPCStencilObject.H rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCFCCellToFaceStencilObject.H index b73d25820522007152aa50f32ea45028d6a93825..f543f6d8e63e426880bce2e4edda575ca3bb09dc 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCPCStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCFCCellToFaceStencilObject.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::upwindCPCStencilObject + Foam::upwindCFCCellToFaceStencilObject Description @@ -31,11 +31,11 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef upwindCPCStencilObject_H -#define upwindCPCStencilObject_H +#ifndef upwindCFCCellToFaceStencilObject_H +#define upwindCFCCellToFaceStencilObject_H -#include "extendedUpwindStencil.H" -#include "cellPointCellStencil.H" +#include "extendedUpwindCellToFaceStencil.H" +#include "CFCCellToFaceStencil.H" #include "MeshObject.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,36 +44,49 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class upwindCPCStencilObject Declaration + Class upwindCFCCellToFaceStencilObject Declaration \*---------------------------------------------------------------------------*/ -class upwindCPCStencilObject +class upwindCFCCellToFaceStencilObject : - public MeshObject<fvMesh, upwindCPCStencilObject>, - public extendedUpwindStencil + public MeshObject<fvMesh, upwindCFCCellToFaceStencilObject>, + public extendedUpwindCellToFaceStencil { public: - TypeName("upwindCFCStencil"); + TypeName("upwindCFCCellToFaceStencil"); // Constructors //- Construct from uncompacted face stencil - explicit upwindCPCStencilObject + explicit upwindCFCCellToFaceStencilObject ( const fvMesh& mesh, + const bool pureUpwind, const scalar minOpposedness ) : - MeshObject<fvMesh, upwindCPCStencilObject>(mesh), - extendedUpwindStencil(cellPointCellStencil(mesh), minOpposedness) - {} + MeshObject<fvMesh, upwindCFCCellToFaceStencilObject>(mesh), + extendedUpwindCellToFaceStencil + ( + CFCCellToFaceStencil(mesh), + pureUpwind, + minOpposedness + ) + { + if (extendedCellToFaceStencil::debug) + { + Info<< "Generated off-centred stencil " << type() + << nl << endl; + writeStencilStats(Info, ownStencil(), ownMap()); + } + } // Destructor - virtual ~upwindCPCStencilObject() + virtual ~upwindCFCCellToFaceStencilObject() {} }; diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredFECStencilObject.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCPCCellToFaceStencilObject.C similarity index 92% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredFECStencilObject.C rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCPCCellToFaceStencilObject.C index ba7351994a998a531616c9903e52753d25a7ac65..1f1e3448cafd81d77913baf8a580db2b57c1a388 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredFECStencilObject.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCPCCellToFaceStencilObject.C @@ -24,14 +24,14 @@ License \*---------------------------------------------------------------------------*/ -#include "centredFECStencilObject.H" +#include "upwindCPCCellToFaceStencilObject.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(centredFECStencilObject, 0); + defineTypeNameAndDebug(upwindCPCCellToFaceStencilObject, 0); } diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindFECStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCPCCellToFaceStencilObject.H similarity index 64% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindFECStencilObject.H rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCPCCellToFaceStencilObject.H index 478774013a0edc76f9e21f066f51c98c669bab74..b86e0b00b5bc724594945e535864a9a317a4a9ff 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindFECStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindCPCCellToFaceStencilObject.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::upwindFECStencilObject + Foam::upwindCPCCellToFaceStencilObject Description @@ -31,11 +31,11 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef upwindFECStencilObject_H -#define upwindFECStencilObject_H +#ifndef upwindCPCCellToFaceStencilObject_H +#define upwindCPCCellToFaceStencilObject_H -#include "extendedUpwindStencil.H" -#include "faceEdgeCellStencil.H" +#include "extendedUpwindCellToFaceStencil.H" +#include "CPCCellToFaceStencil.H" #include "MeshObject.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,36 +44,49 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class upwindFECStencilObject Declaration + Class upwindCPCCellToFaceStencilObject Declaration \*---------------------------------------------------------------------------*/ -class upwindFECStencilObject +class upwindCPCCellToFaceStencilObject : - public MeshObject<fvMesh, upwindFECStencilObject>, - public extendedUpwindStencil + public MeshObject<fvMesh, upwindCPCCellToFaceStencilObject>, + public extendedUpwindCellToFaceStencil { public: - TypeName("upwindCFCStencil"); + TypeName("upwindCFCCellToFaceStencil"); // Constructors //- Construct from uncompacted face stencil - explicit upwindFECStencilObject + explicit upwindCPCCellToFaceStencilObject ( const fvMesh& mesh, + const bool pureUpwind, const scalar minOpposedness ) : - MeshObject<fvMesh, upwindFECStencilObject>(mesh), - extendedUpwindStencil(faceEdgeCellStencil(mesh), minOpposedness) - {} + MeshObject<fvMesh, upwindCPCCellToFaceStencilObject>(mesh), + extendedUpwindCellToFaceStencil + ( + CPCCellToFaceStencil(mesh), + pureUpwind, + minOpposedness + ) + { + if (extendedCellToFaceStencil::debug) + { + Info<< "Generated off-centred stencil " << type() + << nl << endl; + writeStencilStats(Info, ownStencil(), ownMap()); + } + } // Destructor - virtual ~upwindFECStencilObject() + virtual ~upwindCPCCellToFaceStencilObject() {} }; diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCFCStencilObject.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindFECCellToFaceStencilObject.C similarity index 92% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCFCStencilObject.C rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindFECCellToFaceStencilObject.C index e7ebaa389bdfea701f66d8ef8876ad38d97897cc..d397daf01f8ed2c676ce7d16b5334d47ad25e59d 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCFCStencilObject.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindFECCellToFaceStencilObject.C @@ -24,14 +24,14 @@ License \*---------------------------------------------------------------------------*/ -#include "centredCFCStencilObject.H" +#include "upwindFECCellToFaceStencilObject.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(centredCFCStencilObject, 0); + defineTypeNameAndDebug(upwindFECCellToFaceStencilObject, 0); } diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCECStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindFECCellToFaceStencilObject.H similarity index 64% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCECStencilObject.H rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindFECCellToFaceStencilObject.H index dc4544e9b37e1f30da30435a1bda61ca54998007..9bd07a1607357d52784d2dc9f949aef71efee8f2 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCECStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/MeshObjects/upwindFECCellToFaceStencilObject.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::upwindCECStencilObject + Foam::upwindFECCellToFaceStencilObject Description @@ -31,11 +31,11 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef upwindCECStencilObject_H -#define upwindCECStencilObject_H +#ifndef upwindFECCellToFaceStencilObject_H +#define upwindFECCellToFaceStencilObject_H -#include "extendedUpwindStencil.H" -#include "cellEdgeCellStencil.H" +#include "extendedUpwindCellToFaceStencil.H" +#include "FECCellToFaceStencil.H" #include "MeshObject.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,36 +44,49 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class upwindCECStencilObject Declaration + Class upwindFECCellToFaceStencilObject Declaration \*---------------------------------------------------------------------------*/ -class upwindCECStencilObject +class upwindFECCellToFaceStencilObject : - public MeshObject<fvMesh, upwindCECStencilObject>, - public extendedUpwindStencil + public MeshObject<fvMesh, upwindFECCellToFaceStencilObject>, + public extendedUpwindCellToFaceStencil { public: - TypeName("upwindCFCStencil"); + TypeName("upwindCFCCellToFaceStencil"); // Constructors //- Construct from uncompacted face stencil - explicit upwindCECStencilObject + explicit upwindFECCellToFaceStencilObject ( const fvMesh& mesh, + const bool pureUpwind, const scalar minOpposedness ) : - MeshObject<fvMesh, upwindCECStencilObject>(mesh), - extendedUpwindStencil(cellEdgeCellStencil(mesh), minOpposedness) - {} + MeshObject<fvMesh, upwindFECCellToFaceStencilObject>(mesh), + extendedUpwindCellToFaceStencil + ( + FECCellToFaceStencil(mesh), + pureUpwind, + minOpposedness + ) + { + if (extendedCellToFaceStencil::debug) + { + Info<< "Generated off-centred stencil " << type() + << nl << endl; + writeStencilStats(Info, ownStencil(), ownMap()); + } + } // Destructor - virtual ~upwindCECStencilObject() + virtual ~upwindFECCellToFaceStencilObject() {} }; diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.C similarity index 57% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencil.C rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.C index 1ff00db7ba44c2350e44de2b2845f8b563d491e6..5b1cb12e342a15f38eaa1caa5f9b3da4787197c9 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.C @@ -24,184 +24,83 @@ License \*---------------------------------------------------------------------------*/ -#include "extendedStencil.H" +#include "extendedCellToFaceStencil.H" #include "globalIndex.H" #include "syncTools.H" #include "SortableList.H" +/* * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * */ + +defineTypeNameAndDebug(Foam::extendedCellToFaceStencil, 0); + + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -// Calculates per face a list of global cell/face indices. -void Foam::extendedStencil::calcFaceStencil +void Foam::extendedCellToFaceStencil::writeStencilStats ( - const labelListList& globalCellCells, - labelListList& faceStencil + Ostream& os, + const labelListList& stencil, + const mapDistribute& map ) { - const polyBoundaryMesh& patches = mesh_.boundaryMesh(); - const label nBnd = mesh_.nFaces()-mesh_.nInternalFaces(); - const labelList& own = mesh_.faceOwner(); - const labelList& nei = mesh_.faceNeighbour(); - + label sumSize = 0; + label nSum = 0; + label minSize = labelMax; + label maxSize = labelMin; - // Determine neighbouring global cell Cells - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - labelListList neiGlobalCellCells(nBnd); - forAll(patches, patchI) + forAll(stencil, i) { - const polyPatch& pp = patches[patchI]; + const labelList& sCells = stencil[i]; - if (pp.coupled()) + if (sCells.size() > 0) { - label faceI = pp.start(); - - forAll(pp, i) - { - neiGlobalCellCells[faceI-mesh_.nInternalFaces()] = - globalCellCells[own[faceI]]; - faceI++; - } + sumSize += sCells.size(); + nSum++; + minSize = min(minSize, sCells.size()); + maxSize = max(maxSize, sCells.size()); } } - syncTools::swapBoundaryFaceList(mesh_, neiGlobalCellCells, false); - - - - // Construct stencil in global numbering - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - faceStencil.setSize(mesh_.nFaces()); - - labelHashSet faceStencilSet; - - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + reduce(sumSize, sumOp<label>()); + reduce(nSum, sumOp<label>()); + + reduce(minSize, minOp<label>()); + reduce(maxSize, maxOp<label>()); + + os << "Stencil size :" << nl + << " average : " << scalar(sumSize)/nSum << nl + << " min : " << minSize << nl + << " max : " << maxSize << nl + << endl; + + // Sum all sent data + label nSent = 0; + label nLocal = 0; + forAll(map.subMap(), procI) { - faceStencilSet.clear(); - - const labelList& ownCCells = globalCellCells[own[faceI]]; - label globalOwn = ownCCells[0]; - // Insert cellCells - forAll(ownCCells, i) - { - faceStencilSet.insert(ownCCells[i]); - } - - const labelList& neiCCells = globalCellCells[nei[faceI]]; - label globalNei = neiCCells[0]; - // Insert cellCells - forAll(neiCCells, i) + if (procI != Pstream::myProcNo()) { - faceStencilSet.insert(neiCCells[i]); + nSent += map.subMap()[procI].size(); } - - // Guarantee owner first, neighbour second. - faceStencil[faceI].setSize(faceStencilSet.size()); - label n = 0; - faceStencil[faceI][n++] = globalOwn; - faceStencil[faceI][n++] = globalNei; - forAllConstIter(labelHashSet, faceStencilSet, iter) + else { - if (iter.key() != globalOwn && iter.key() != globalNei) - { - faceStencil[faceI][n++] = iter.key(); - } + nLocal += map.subMap()[procI].size(); } - //Pout<< "internalface:" << faceI << " toc:" << faceStencilSet.toc() - // << " faceStencil:" << faceStencil[faceI] << endl; } - forAll(patches, patchI) - { - const polyPatch& pp = patches[patchI]; - label faceI = pp.start(); - - if (pp.coupled()) - { - forAll(pp, i) - { - faceStencilSet.clear(); - - const labelList& ownCCells = globalCellCells[own[faceI]]; - label globalOwn = ownCCells[0]; - forAll(ownCCells, i) - { - faceStencilSet.insert(ownCCells[i]); - } - - // And the neighbours of the coupled cell - const labelList& neiCCells = - neiGlobalCellCells[faceI-mesh_.nInternalFaces()]; - label globalNei = neiCCells[0]; - forAll(neiCCells, i) - { - faceStencilSet.insert(neiCCells[i]); - } - // Guarantee owner first, neighbour second. - faceStencil[faceI].setSize(faceStencilSet.size()); - label n = 0; - faceStencil[faceI][n++] = globalOwn; - faceStencil[faceI][n++] = globalNei; - forAllConstIter(labelHashSet, faceStencilSet, iter) - { - if (iter.key() != globalOwn && iter.key() != globalNei) - { - faceStencil[faceI][n++] = iter.key(); - } - } - - //Pout<< "coupledface:" << faceI - // << " toc:" << faceStencilSet.toc() - // << " faceStencil:" << faceStencil[faceI] << endl; - - faceI++; - } - } - else if (!isA<emptyPolyPatch>(pp)) - { - forAll(pp, i) - { - faceStencilSet.clear(); - - const labelList& ownCCells = globalCellCells[own[faceI]]; - label globalOwn = ownCCells[0]; - forAll(ownCCells, i) - { - faceStencilSet.insert(ownCCells[i]); - } - - // Guarantee owner first, neighbour second. - faceStencil[faceI].setSize(faceStencilSet.size()); - label n = 0; - faceStencil[faceI][n++] = globalOwn; - forAllConstIter(labelHashSet, faceStencilSet, iter) - { - if (iter.key() != globalOwn) - { - faceStencil[faceI][n++] = iter.key(); - } - } - - //Pout<< "boundaryface:" << faceI - // << " toc:" << faceStencilSet.toc() - // << " faceStencil:" << faceStencil[faceI] << endl; - - faceI++; - } - } - } + os << "Local data size : " << returnReduce(nLocal, sumOp<label>()) << nl + << "Sent data size : " << returnReduce(nSent, sumOp<label>()) << nl + << endl; } -Foam::autoPtr<Foam::mapDistribute> Foam::extendedStencil::calcDistributeMap +Foam::autoPtr<Foam::mapDistribute> +Foam::extendedCellToFaceStencil::calcDistributeMap ( + const polyMesh& mesh, const globalIndex& globalNumbering, labelListList& faceStencil ) { - const label nBnd = mesh_.nFaces()-mesh_.nInternalFaces(); - - // Convert stencil to schedule // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -215,8 +114,8 @@ Foam::autoPtr<Foam::mapDistribute> Foam::extendedStencil::calcDistributeMap // these are always all needed. List<Map<label> > globalToProc(Pstream::nProcs()); { - const labelList& procPatchMap = mesh_.globalData().procPatchMap(); - const polyBoundaryMesh& patches = mesh_.boundaryMesh(); + const labelList& procPatchMap = mesh.globalData().procPatchMap(); + const polyBoundaryMesh& patches = mesh.boundaryMesh(); // Presize with (as estimate) size of patch to neighbour. forAll(procPatchMap, procI) @@ -280,12 +179,12 @@ Foam::autoPtr<Foam::mapDistribute> Foam::extendedStencil::calcDistributeMap // 2. The overall compact addressing is - // - myProcNo first + // - myProcNo data first (uncompacted) // - all other processors consecutively labelList compactStart(Pstream::nProcs()); compactStart[Pstream::myProcNo()] = 0; - label nCompact = mesh_.nCells()+nBnd; + label nCompact = globalNumbering.localSize(); forAll(compactStart, procI) { if (procI != Pstream::myProcNo()) @@ -321,7 +220,7 @@ Foam::autoPtr<Foam::mapDistribute> Foam::extendedStencil::calcDistributeMap { recvCompact[procI] = compactStart[procI] - + identity(mesh_.nCells()+nBnd); + + identity(globalNumbering.localSize()); } } labelListList sendCompact(Pstream::nProcs()); @@ -374,8 +273,9 @@ Foam::autoPtr<Foam::mapDistribute> Foam::extendedStencil::calcDistributeMap } } + // Constuct map for distribution of compact data. - return autoPtr<mapDistribute> + autoPtr<mapDistribute> mapPtr ( new mapDistribute ( @@ -385,15 +285,40 @@ Foam::autoPtr<Foam::mapDistribute> Foam::extendedStencil::calcDistributeMap true // reuse send/recv maps. ) ); + + return mapPtr; } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::extendedStencil::extendedStencil(const polyMesh& mesh) +Foam::extendedCellToFaceStencil::extendedCellToFaceStencil(const polyMesh& mesh) : mesh_(mesh) -{} +{ + // Check for transformation - not supported. + const polyBoundaryMesh& patches = mesh.boundaryMesh(); + + forAll(patches, patchI) + { + if (isA<coupledPolyPatch>(patches[patchI])) + { + const coupledPolyPatch& cpp = + refCast<const coupledPolyPatch>(patches[patchI]); + + if (!cpp.parallel() || cpp.separated()) + { + FatalErrorIn + ( + "extendedCellToFaceStencil::extendedCellToFaceStencil" + "(const polyMesh&)" + ) << "Coupled patches with transformations not supported." + << endl + << "Problematic patch " << cpp.name() << exit(FatalError); + } + } + } +} // ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.H similarity index 78% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencil.H rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.H index 6faff8f3a6c7219a69b594250d78c58476136637..bb0e92d11fc8d2dc6aa4e55758f8ff0c0c9b08f9 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.H @@ -23,10 +23,10 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::extendedStencil + Foam::extendedCellToFaceStencil Description - Calculates/constains the extended face stencil. + Calculates/constains the extended cell-to-face stencil. The stencil is a list of indices into either cells or boundary faces in a compact way. (element 0 is owner, 1 is neighbour). The index numbering @@ -41,13 +41,13 @@ Description - sum the weights*field. SourceFiles - extendedStencil.C - extendedStencilTemplates.C + extendedCellToFaceStencil.C + extendedCellToFaceStencilTemplates.C \*---------------------------------------------------------------------------*/ -#ifndef extendedStencil_H -#define extendedStencil_H +#ifndef extendedCellToFaceStencil_H +#define extendedCellToFaceStencil_H #include "mapDistribute.H" #include "volFields.H" @@ -61,10 +61,10 @@ namespace Foam class globalIndex; /*---------------------------------------------------------------------------*\ - Class extendedStencil Declaration + Class extendedCellToFaceStencil Declaration \*---------------------------------------------------------------------------*/ -class extendedStencil +class extendedCellToFaceStencil { protected: @@ -75,19 +75,6 @@ protected: // Protected Member Functions - //- Collect cell neighbours into extended stencil - void calcFaceStencil - ( - const labelListList& globalCellCells, - labelListList& faceStencil - ); - - //- Calculate distribute map - autoPtr<mapDistribute> calcDistributeMap - ( - const globalIndex& globalNumbering, - labelListList& faceStencil - ); private: @@ -95,22 +82,44 @@ private: // Private Member Functions //- Disallow default bitwise copy construct - extendedStencil(const extendedStencil&); + extendedCellToFaceStencil(const extendedCellToFaceStencil&); //- Disallow default bitwise assignment - void operator=(const extendedStencil&); + void operator=(const extendedCellToFaceStencil&); +protected: + + //- Write some statistics about stencil + static void writeStencilStats + ( + Ostream& os, + const labelListList& stencil, + const mapDistribute& map + ); + public: + // Declare name of the class and its debug switch + ClassName("extendedCellToFaceStencil"); + + // Constructors //- Construct from mesh - explicit extendedStencil(const polyMesh&); + explicit extendedCellToFaceStencil(const polyMesh&); // Member Functions + //- Calculate distribute map + static autoPtr<mapDistribute> calcDistributeMap + ( + const polyMesh& mesh, + const globalIndex& globalNumbering, + labelListList& faceStencil + ); + //- Use map to get the data into stencil order template<class T> static void collectData @@ -141,7 +150,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "extendedStencilTemplates.C" +# include "extendedCellToFaceStencilTemplates.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C similarity index 94% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencilTemplates.C rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C index 537b7520d867e0b434edbcc91e05f04f8f90b787..9ee125de9b52497fdf8068a1ebd0e73fa90c64fc 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C @@ -24,12 +24,12 @@ License \*---------------------------------------------------------------------------*/ -#include "extendedStencil.H" +#include "extendedCellToFaceStencil.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class Type> -void Foam::extendedStencil::collectData +void Foam::extendedCellToFaceStencil::collectData ( const mapDistribute& map, const labelListList& stencil, @@ -79,7 +79,7 @@ void Foam::extendedStencil::collectData template<class Type> Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> > -Foam::extendedStencil::weightedSum +Foam::extendedCellToFaceStencil::weightedSum ( const mapDistribute& map, const labelListList& stencil, @@ -101,7 +101,10 @@ Foam::extendedStencil::weightedSum ( fld.name(), mesh.time().timeName(), - mesh + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE, + false ), mesh, dimensioned<Type> diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedCentredStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.C similarity index 79% rename from src/finiteVolume/fvMesh/extendedStencil/extendedCentredStencil.C rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.C index 252357a5f2e7680b718215a318b5119fb8b3cc35..acca48566fabffc3e0b4cbce3be39283fa83e786 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedCentredStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.C @@ -25,26 +25,34 @@ License \*---------------------------------------------------------------------------*/ #include "mapDistribute.H" -#include "extendedCentredStencil.H" -#include "faceStencil.H" +#include "extendedCentredCellToFaceStencil.H" +#include "cellToFaceStencil.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::extendedCentredStencil::extendedCentredStencil(const faceStencil& stencil) +Foam::extendedCentredCellToFaceStencil::extendedCentredCellToFaceStencil +( + const cellToFaceStencil& stencil +) : - extendedStencil(stencil.mesh()) + extendedCellToFaceStencil(stencil.mesh()) { stencil_ = stencil; - // Calculate distribute map (also renumbers stencil) - mapPtr_ = calcDistributeMap(stencil.globalNumbering(), stencil_); + // Calculate distribute map (also renumbers elements in stencil) + mapPtr_ = calcDistributeMap + ( + stencil.mesh(), + stencil.globalNumbering(), + stencil_ + ); } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // Per face which elements of the stencil to keep. -void Foam::extendedCentredStencil::compact() +void Foam::extendedCentredCellToFaceStencil::compact() { boolList isInStencil(map().constructSize(), false); diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedCentredStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.H similarity index 79% rename from src/finiteVolume/fvMesh/extendedStencil/extendedCentredStencil.H rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.H index edbf5ea48585e5739e9e5bc5436e582f1adcc378..c58e81db922cc3407bfcaaba91245977b2cf53ed 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedCentredStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.H @@ -23,34 +23,34 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::extendedCentredStencil + Foam::extendedCentredCellToFaceStencil Description SourceFiles - extendedCentredStencil.C + extendedCentredCellToFaceStencil.C \*---------------------------------------------------------------------------*/ -#ifndef extendedCentredStencil_H -#define extendedCentredStencil_H +#ifndef extendedCentredCellToFaceStencil_H +#define extendedCentredCellToFaceStencil_H -#include "extendedStencil.H" +#include "extendedCellToFaceStencil.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -class faceStencil; +class cellToFaceStencil; /*---------------------------------------------------------------------------*\ - Class extendedCentredStencil Declaration + Class extendedCentredCellToFaceStencil Declaration \*---------------------------------------------------------------------------*/ -class extendedCentredStencil +class extendedCentredCellToFaceStencil : - public extendedStencil + public extendedCellToFaceStencil { // Private data @@ -64,10 +64,13 @@ class extendedCentredStencil // Private Member Functions //- Disallow default bitwise copy construct - extendedCentredStencil(const extendedCentredStencil&); + extendedCentredCellToFaceStencil + ( + const extendedCentredCellToFaceStencil& + ); //- Disallow default bitwise assignment - void operator=(const extendedCentredStencil&); + void operator=(const extendedCentredCellToFaceStencil&); public: @@ -75,7 +78,7 @@ public: // Constructors //- Construct from uncompacted face stencil - explicit extendedCentredStencil(const faceStencil&); + explicit extendedCentredCellToFaceStencil(const cellToFaceStencil&); // Member Functions @@ -103,7 +106,13 @@ public: List<List<T> >& stencilFld ) const { - extendedStencil::collectData(map(), stencil(), fld, stencilFld); + extendedCellToFaceStencil::collectData + ( + map(), + stencil(), + fld, + stencilFld + ); } //- Sum vol field contributions to create face values @@ -114,7 +123,7 @@ public: const List<List<scalar> >& stencilWeights ) const { - return extendedStencil::weightedSum + return extendedCellToFaceStencil::weightedSum ( map(), stencil(), diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedUpwindStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C similarity index 69% rename from src/finiteVolume/fvMesh/extendedStencil/extendedUpwindStencil.C rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C index b7fa870cf741bcfdadc683be7956f3fc4496c4f3..80e47855a8c8cd4966a80389fe7ac1ff4720238f 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedUpwindStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C @@ -24,14 +24,14 @@ License \*---------------------------------------------------------------------------*/ -#include "extendedUpwindStencil.H" -#include "faceStencil.H" +#include "extendedUpwindCellToFaceStencil.H" +#include "cellToFaceStencil.H" #include "syncTools.H" #include "SortableList.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::extendedUpwindStencil::selectOppositeFaces +void Foam::extendedUpwindCellToFaceStencil::selectOppositeFaces ( const boolList& nonEmptyFace, const scalar minOpposedness, @@ -103,7 +103,7 @@ void Foam::extendedUpwindStencil::selectOppositeFaces } -void Foam::extendedUpwindStencil::transportStencil +void Foam::extendedUpwindCellToFaceStencil::transportStencil ( const boolList& nonEmptyFace, const labelListList& faceStencil, @@ -168,8 +168,10 @@ void Foam::extendedUpwindStencil::transportStencil } if (n != transportedStencil.size()) { - FatalErrorIn("extendedUpwindStencil::transportStencil(..)") - << "problem:" << faceStencilSet + FatalErrorIn + ( + "extendedUpwindCellToFaceStencil::transportStencil(..)" + ) << "problem:" << faceStencilSet << abort(FatalError); } } @@ -188,15 +190,17 @@ void Foam::extendedUpwindStencil::transportStencil } if (n != transportedStencil.size()) { - FatalErrorIn("extendedUpwindStencil::transportStencil(..)") - << "problem:" << faceStencilSet + FatalErrorIn + ( + "extendedUpwindCellToFaceStencil::transportStencil(..)" + ) << "problem:" << faceStencilSet << abort(FatalError); } } } -void Foam::extendedUpwindStencil::transportStencils +void Foam::extendedUpwindCellToFaceStencil::transportStencils ( const labelListList& faceStencil, const scalar minOpposedness, @@ -240,6 +244,7 @@ void Foam::extendedUpwindStencil::transportStencils // Internal faces for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) { + // Get stencil as owner + neighbour + stencil from 'opposite' faces transportStencil ( nonEmptyFace, @@ -367,13 +372,15 @@ void Foam::extendedUpwindStencil::transportStencils // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::extendedUpwindStencil::extendedUpwindStencil +Foam::extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil ( - const faceStencil& stencil, + const cellToFaceStencil& stencil, + const bool pureUpwind, const scalar minOpposedness ) : - extendedStencil(stencil.mesh()) + extendedCellToFaceStencil(stencil.mesh()), + pureUpwind_(pureUpwind) { //forAll(stencil, faceI) //{ @@ -414,15 +421,145 @@ Foam::extendedUpwindStencil::extendedUpwindStencil ownMapPtr_ = calcDistributeMap ( + stencil.mesh(), stencil.globalNumbering(), ownStencil_ ); neiMapPtr_ = calcDistributeMap ( + stencil.mesh(), stencil.globalNumbering(), neiStencil_ ); + + // stencil now in compact form + if (pureUpwind_) + { + const fvMesh& mesh = dynamic_cast<const fvMesh&>(stencil.mesh()); + + List<List<point> > stencilPoints(ownStencil_.size()); + + // Owner stencil + // ~~~~~~~~~~~~~ + + collectData(ownMapPtr_(), ownStencil_, mesh.C(), stencilPoints); + + // Mask off all stencil points on wrong side of face + forAll(stencilPoints, faceI) + { + const point& fc = mesh.faceCentres()[faceI]; + const vector& fArea = mesh.faceAreas()[faceI]; + + const List<point>& points = stencilPoints[faceI]; + const labelList& stencil = ownStencil_[faceI]; + + DynamicList<label> newStencil(stencil.size()); + forAll(points, i) + { + if (((points[i]-fc) & fArea) < 0) + { + newStencil.append(stencil[i]); + } + } + if (newStencil.size() != stencil.size()) + { + ownStencil_[faceI].transfer(newStencil); + } + } + + + // Neighbour stencil + // ~~~~~~~~~~~~~~~~~ + + collectData(neiMapPtr_(), neiStencil_, mesh.C(), stencilPoints); + + // Mask off all stencil points on wrong side of face + forAll(stencilPoints, faceI) + { + const point& fc = mesh.faceCentres()[faceI]; + const vector& fArea = mesh.faceAreas()[faceI]; + + const List<point>& points = stencilPoints[faceI]; + const labelList& stencil = neiStencil_[faceI]; + + DynamicList<label> newStencil(stencil.size()); + forAll(points, i) + { + if (((points[i]-fc) & fArea) > 0) + { + newStencil.append(stencil[i]); + } + } + if (newStencil.size() != stencil.size()) + { + neiStencil_[faceI].transfer(newStencil); + } + } + + // Note: could compact schedule as well. for if cells are not needed + // across any boundary anymore. However relatively rare. + } +} + + +Foam::extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil +( + const cellToFaceStencil& stencil +) +: + extendedCellToFaceStencil(stencil.mesh()), + pureUpwind_(true) +{ + // Calculate stencil points with full stencil + + ownStencil_ = stencil; + + ownMapPtr_ = calcDistributeMap + ( + stencil.mesh(), + stencil.globalNumbering(), + ownStencil_ + ); + + const fvMesh& mesh = dynamic_cast<const fvMesh&>(stencil.mesh()); + + List<List<point> > stencilPoints(ownStencil_.size()); + collectData(ownMapPtr_(), ownStencil_, mesh.C(), stencilPoints); + + // Split stencil into owner and neighbour + neiStencil_.setSize(ownStencil_.size()); + + forAll(stencilPoints, faceI) + { + const point& fc = mesh.faceCentres()[faceI]; + const vector& fArea = mesh.faceAreas()[faceI]; + + const List<point>& points = stencilPoints[faceI]; + const labelList& stencil = ownStencil_[faceI]; + + DynamicList<label> newOwnStencil(stencil.size()); + DynamicList<label> newNeiStencil(stencil.size()); + forAll(points, i) + { + if (((points[i]-fc) & fArea) > 0) + { + newNeiStencil.append(stencil[i]); + } + else + { + newOwnStencil.append(stencil[i]); + } + } + if (newNeiStencil.size() > 0) + { + ownStencil_[faceI].transfer(newOwnStencil); + neiStencil_[faceI].transfer(newNeiStencil); + } + } + + // Should compact schedule. Or have both return the same schedule. + neiMapPtr_.reset(new mapDistribute(ownMapPtr_())); } diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedUpwindStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.H similarity index 70% rename from src/finiteVolume/fvMesh/extendedStencil/extendedUpwindStencil.H rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.H index 174eb27a9d8d7b388a99bc085153ac9766eb210e..408d28ad8912d597814b58f4bcff273d48c0f226 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedUpwindStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.H @@ -23,38 +23,50 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::extendedUpwindStencil + Foam::extendedUpwindCellToFaceStencil Description + Creates upwind stencil by shifting a centred stencil to upwind and downwind + faces and optionally removing all non-(up/down)wind faces ('pureUpwind'). + + Note: the minOpposedness parameter is to decide which upwind and + downwind faces to combine the stencils from. If myArea is the + local area and upwindArea + the area of the possible upwind candidate it will be included if + (upwindArea & myArea)/magSqr(myArea) > minOpposedness + so this includes both cosine and area. WIP. SourceFiles - extendedUpwindStencil.C - extendedUpwindStencilTemplates.C + extendedUpwindCellToFaceStencil.C + extendedUpwindCellToFaceStencilTemplates.C \*---------------------------------------------------------------------------*/ -#ifndef extendedUpwindStencil_H -#define extendedUpwindStencil_H +#ifndef extendedUpwindCellToFaceStencil_H +#define extendedUpwindCellToFaceStencil_H -#include "extendedStencil.H" +#include "extendedCellToFaceStencil.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -class faceStencil; +class cellToFaceStencil; /*---------------------------------------------------------------------------*\ - Class extendedUpwindStencil Declaration + Class extendedUpwindCellToFaceStencil Declaration \*---------------------------------------------------------------------------*/ -class extendedUpwindStencil +class extendedUpwindCellToFaceStencil : - public extendedStencil + public extendedCellToFaceStencil { // Private data + //- Does stencil contain upwind points only + const bool pureUpwind_; + //- Swap map for getting neigbouring data autoPtr<mapDistribute> ownMapPtr_; autoPtr<mapDistribute> neiMapPtr_; @@ -103,26 +115,41 @@ class extendedUpwindStencil //- Disallow default bitwise copy construct - extendedUpwindStencil(const extendedUpwindStencil&); + extendedUpwindCellToFaceStencil(const extendedUpwindCellToFaceStencil&); //- Disallow default bitwise assignment - void operator=(const extendedUpwindStencil&); + void operator=(const extendedUpwindCellToFaceStencil&); public: // Constructors - //- Construct from mesh and uncompacted face stencil - extendedUpwindStencil + //- Construct from mesh and uncompacted centred face stencil. + // Transports facestencil to create owner and neighbour versions. + // pureUpwind to remove any remaining downwind cells. + extendedUpwindCellToFaceStencil ( - const faceStencil&, + const cellToFaceStencil&, + const bool pureUpwind, const scalar minOpposedness ); + //- Construct from mesh and uncompacted centred face stencil. Splits + // stencil into owner and neighbour (so always pure upwind) + extendedUpwindCellToFaceStencil + ( + const cellToFaceStencil& + ); + // Member Functions + bool pureUpwind() const + { + return pureUpwind_; + } + //- Return reference to the parallel distribution map const mapDistribute& ownMap() const { @@ -167,7 +194,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "extendedUpwindStencilTemplates.C" +# include "extendedUpwindCellToFaceStencilTemplates.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedUpwindStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C similarity index 95% rename from src/finiteVolume/fvMesh/extendedStencil/extendedUpwindStencilTemplates.C rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C index 5482261df8ba59e1455f3a13dcbcc567cfbbfd36..ee545754fa2fa02c1fdb923a516a1c4aad76668c 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedUpwindStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C @@ -24,13 +24,13 @@ License \*---------------------------------------------------------------------------*/ -#include "extendedStencil.H" +#include "extendedCellToFaceStencil.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class Type> Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> > -Foam::extendedUpwindStencil::weightedSum +Foam::extendedUpwindCellToFaceStencil::weightedSum ( const surfaceScalarField& phi, const GeometricField<Type, fvPatchField, volMesh>& fld, @@ -54,7 +54,10 @@ Foam::extendedUpwindStencil::weightedSum ( fld.name(), mesh.time().timeName(), - mesh + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE, + false ), mesh, dimensioned<Type> diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CECCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CECCellToFaceStencil.C new file mode 100644 index 0000000000000000000000000000000000000000..d7d7797da8b6d59cfbfcd47ae15b840e5d71bd6b --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CECCellToFaceStencil.C @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "CECCellToFaceStencil.H" +#include "CECCellToCellStencil.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::CECCellToFaceStencil::CECCellToFaceStencil(const polyMesh& mesh) +: + cellToFaceStencil(mesh) +{ + // Calculate per cell the (edge) connected cells (in global numbering) + CECCellToCellStencil globalCellCells(mesh); + + // Add stencils of neighbouring cells to create faceStencil + labelListList faceStencil; + calcFaceStencil(globalCellCells, faceStencil); + + // Transfer to *this + transfer(faceStencil); +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CECCellToFaceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CECCellToFaceStencil.H new file mode 100644 index 0000000000000000000000000000000000000000..640c2aa4f4746aa0a63e0805870b6d7b67b6f00a --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CECCellToFaceStencil.H @@ -0,0 +1,81 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::CECCellToFaceStencil + +Description + Combined corresponding cellToCellStencil of owner and neighbour. + +SourceFiles + CECCellToFaceStencil.C + +\*---------------------------------------------------------------------------*/ + +#ifndef CECCellToFaceStencil_H +#define CECCellToFaceStencil_H + +#include "cellToFaceStencil.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class CECCellToFaceStencil Declaration +\*---------------------------------------------------------------------------*/ + +class CECCellToFaceStencil +: + public cellToFaceStencil +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + CECCellToFaceStencil(const CECCellToFaceStencil&); + + //- Disallow default bitwise assignment + void operator=(const CECCellToFaceStencil&); + + +public: + + // Constructors + + //- Construct from all cells and boundary faces + explicit CECCellToFaceStencil(const polyMesh&); + +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CFCCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CFCCellToFaceStencil.C new file mode 100644 index 0000000000000000000000000000000000000000..9f19c90053568ae686d4b0cf15a80ebe092f6f40 --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CFCCellToFaceStencil.C @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "CFCCellToFaceStencil.H" +#include "CFCCellToCellStencil.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::CFCCellToFaceStencil::CFCCellToFaceStencil(const polyMesh& mesh) +: + cellToFaceStencil(mesh) +{ + // Calculate per cell the (face) connected cells (in global numbering) + CFCCellToCellStencil globalCellCells(mesh); + + // Add stencils of neighbouring cells to create faceStencil + labelListList faceStencil; + calcFaceStencil(globalCellCells, faceStencil); + + // Transfer to *this + transfer(faceStencil); +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CFCCellToFaceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CFCCellToFaceStencil.H new file mode 100644 index 0000000000000000000000000000000000000000..a05b1b7aa6dfcaf2425d27c68bbfa57983239347 --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CFCCellToFaceStencil.H @@ -0,0 +1,79 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::CFCCellToFaceStencil + +Description + Combined corresponding cellToCellStencil of owner and neighbour. + +SourceFiles + CFCCellToFaceStencil.C + +\*---------------------------------------------------------------------------*/ + +#ifndef CFCCellToFaceStencil_H +#define CFCCellToFaceStencil_H + +#include "cellToFaceStencil.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class CFCCellToFaceStencil Declaration +\*---------------------------------------------------------------------------*/ + +class CFCCellToFaceStencil +: + public cellToFaceStencil +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + CFCCellToFaceStencil(const CFCCellToFaceStencil&); + + //- Disallow default bitwise assignment + void operator=(const CFCCellToFaceStencil&); + +public: + + // Constructors + + //- Construct from mesh + explicit CFCCellToFaceStencil(const polyMesh& mesh); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CPCCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CPCCellToFaceStencil.C new file mode 100644 index 0000000000000000000000000000000000000000..3414af9932b2cdfc9577aa24c461839562535d00 --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CPCCellToFaceStencil.C @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "CPCCellToFaceStencil.H" +#include "CPCCellToCellStencil.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::CPCCellToFaceStencil::CPCCellToFaceStencil(const polyMesh& mesh) +: + cellToFaceStencil(mesh) +{ + // Calculate per cell the (face) connected cells (in global numbering) + CPCCellToCellStencil globalCellCells(mesh); + + // Add stencils of neighbouring cells to create faceStencil + labelListList faceStencil; + calcFaceStencil(globalCellCells, faceStencil); + + // Transfer to *this + transfer(faceStencil); +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CPCCellToFaceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CPCCellToFaceStencil.H new file mode 100644 index 0000000000000000000000000000000000000000..a82886e11145aca2883ac6846d822dca268eb0bd --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CPCCellToFaceStencil.H @@ -0,0 +1,81 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::CPCCellToFaceStencil + +Description + Combined corresponding cellToCellStencil of owner and neighbour. + +SourceFiles + CPCCellToFaceStencil.C + +\*---------------------------------------------------------------------------*/ + +#ifndef CPCCellToFaceStencil_H +#define CPCCellToFaceStencil_H + +#include "cellToFaceStencil.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class CPCCellToFaceStencil Declaration +\*---------------------------------------------------------------------------*/ + +class CPCCellToFaceStencil +: + public cellToFaceStencil +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + CPCCellToFaceStencil(const CPCCellToFaceStencil&); + + //- Disallow default bitwise assignment + void operator=(const CPCCellToFaceStencil&); + + +public: + + // Constructors + + //- Construct from all cells and boundary faces + explicit CPCCellToFaceStencil(const polyMesh&); + +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceEdgeCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/FECCellToFaceStencil.C similarity index 92% rename from src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceEdgeCellStencil.C rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/FECCellToFaceStencil.C index 2d56b1b1942523b2c02acf5eb623f8f1084c6fec..2d79bd2048008b573200862d3bce53022c6f1b8d 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceEdgeCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/FECCellToFaceStencil.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "faceEdgeCellStencil.H" +#include "FECCellToFaceStencil.H" #include "syncTools.H" #include "emptyPolyPatch.H" //#include "meshTools.H" @@ -34,7 +34,7 @@ License // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // Calculates per edge the neighbour data (= edgeCells) -void Foam::faceEdgeCellStencil::calcEdgeBoundaryData +void Foam::FECCellToFaceStencil::calcEdgeBoundaryData ( const boolList& isValidBFace, const labelList& boundaryEdges, @@ -73,7 +73,7 @@ void Foam::faceEdgeCellStencil::calcEdgeBoundaryData // Calculates per face the edge connected data (= cell or boundary in global // numbering). -void Foam::faceEdgeCellStencil::calcFaceStencil +void Foam::FECCellToFaceStencil::calcFaceStencil ( labelListList& faceStencil ) const @@ -220,7 +220,7 @@ void Foam::faceEdgeCellStencil::calcFaceStencil { if (iter.key() == globalOwn || iter.key() == globalNei) { - FatalErrorIn("faceEdgeCellStencil::calcFaceStencil(..)") + FatalErrorIn("FECCellToFaceStencil::calcFaceStencil(..)") << "problem:" << faceStencilSet << abort(FatalError); } @@ -281,8 +281,10 @@ void Foam::faceEdgeCellStencil::calcFaceStencil { if (iter.key() == globalOwn || iter.key() == globalNei) { - FatalErrorIn("faceEdgeCellStencil::calcFaceStencil(..)") - << "problem:" << faceStencilSet + FatalErrorIn + ( + "FECCellToFaceStencil::calcFaceStencil(..)" + ) << "problem:" << faceStencilSet << abort(FatalError); } faceStencil[faceI][n++] = iter.key(); @@ -345,8 +347,10 @@ void Foam::faceEdgeCellStencil::calcFaceStencil { if (iter.key() == globalOwn) { - FatalErrorIn("faceEdgeCellStencil::calcFaceStencil(..)") - << "problem:" << faceStencilSet + FatalErrorIn + ( + "FECCellToFaceStencil::calcFaceStencil(..)" + ) << "problem:" << faceStencilSet << abort(FatalError); } faceStencil[faceI][n++] = iter.key(); @@ -363,7 +367,7 @@ void Foam::faceEdgeCellStencil::calcFaceStencil label globalOwn = globalNumbering().toGlobal(own[faceI]); if (faceStencil[faceI][0] != globalOwn) { - FatalErrorIn("faceEdgeCellStencil::calcFaceStencil(..)") + FatalErrorIn("FECCellToFaceStencil::calcFaceStencil(..)") << "problem:" << faceStencil[faceI] << " globalOwn:" << globalOwn << abort(FatalError); @@ -371,7 +375,7 @@ void Foam::faceEdgeCellStencil::calcFaceStencil label globalNei = globalNumbering().toGlobal(nei[faceI]); if (faceStencil[faceI][1] != globalNei) { - FatalErrorIn("faceEdgeCellStencil::calcFaceStencil(..)") + FatalErrorIn("FECCellToFaceStencil::calcFaceStencil(..)") << "problem:" << faceStencil[faceI] << " globalNei:" << globalNei << abort(FatalError); @@ -392,7 +396,7 @@ void Foam::faceEdgeCellStencil::calcFaceStencil label globalOwn = globalNumbering().toGlobal(own[faceI]); if (faceStencil[faceI][0] != globalOwn) { - FatalErrorIn("faceEdgeCellStencil::calcFaceStencil(..)") + FatalErrorIn("FECCellToFaceStencil::calcFaceStencil(..)") << "problem:" << faceStencil[faceI] << " globalOwn:" << globalOwn << abort(FatalError); @@ -400,7 +404,7 @@ void Foam::faceEdgeCellStencil::calcFaceStencil label globalNei = neiGlobalCell[faceI-mesh().nInternalFaces()]; if (faceStencil[faceI][1] != globalNei) { - FatalErrorIn("faceEdgeCellStencil::calcFaceStencil(..)") + FatalErrorIn("FECCellToFaceStencil::calcFaceStencil(..)") << "problem:" << faceStencil[faceI] << " globalNei:" << globalNei << abort(FatalError); @@ -416,7 +420,7 @@ void Foam::faceEdgeCellStencil::calcFaceStencil label globalOwn = globalNumbering().toGlobal(own[faceI]); if (faceStencil[faceI][0] != globalOwn) { - FatalErrorIn("faceEdgeCellStencil::calcFaceStencil(..)") + FatalErrorIn("FECCellToFaceStencil::calcFaceStencil(..)") << "problem:" << faceStencil[faceI] << " globalOwn:" << globalOwn << abort(FatalError); @@ -429,9 +433,9 @@ void Foam::faceEdgeCellStencil::calcFaceStencil // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::faceEdgeCellStencil::faceEdgeCellStencil(const polyMesh& mesh) +Foam::FECCellToFaceStencil::FECCellToFaceStencil(const polyMesh& mesh) : - faceStencil(mesh) + cellToFaceStencil(mesh) { // Calculate per face the (edge) connected cells (in global numbering) labelListList faceStencil; diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceEdgeCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/FECCellToFaceStencil.H similarity index 83% rename from src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceEdgeCellStencil.H rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/FECCellToFaceStencil.H index dfbb990fbce92858578e87db23071bebd1986758..6a00f702ea92cc9d19d655ad0ee19ff70e846510 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceEdgeCellStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/FECCellToFaceStencil.H @@ -23,23 +23,20 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::faceEdgeCellStencil + Foam::FECCellToFaceStencil Description All cells connected via edge to face. SourceFiles - faceEdgeCellStencil.C + FECCellToFaceStencil.C \*---------------------------------------------------------------------------*/ -#ifndef faceEdgeCellStencil_H -#define faceEdgeCellStencil_H +#ifndef FECCellToFaceStencil_H +#define FECCellToFaceStencil_H -#include "faceStencil.H" -#include "boolList.H" -#include "HashSet.H" -#include "Map.H" +#include "cellToFaceStencil.H" #include "EdgeMap.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,12 +45,12 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class faceEdgeCellStencil Declaration + Class FECCellToFaceStencil Declaration \*---------------------------------------------------------------------------*/ -class faceEdgeCellStencil +class FECCellToFaceStencil : - public faceStencil + public cellToFaceStencil { // Private Member Functions @@ -69,10 +66,10 @@ class faceEdgeCellStencil //- Disallow default bitwise copy construct - faceEdgeCellStencil(const faceEdgeCellStencil&); + FECCellToFaceStencil(const FECCellToFaceStencil&); //- Disallow default bitwise assignment - void operator=(const faceEdgeCellStencil&); + void operator=(const FECCellToFaceStencil&); public: @@ -80,7 +77,7 @@ public: // Constructors //- Construct from all cells and boundary faces - explicit faceEdgeCellStencil(const polyMesh&); + explicit FECCellToFaceStencil(const polyMesh&); }; diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/cellToFaceStencil.C similarity index 95% rename from src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceStencil.C rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/cellToFaceStencil.C index a0dac7b004f24c487911ac79cadf682b42269547..89a2cc5fecc389620dffce1f2030b53c6054cc1c 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/cellToFaceStencil.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "faceStencil.H" +#include "cellToFaceStencil.H" #include "syncTools.H" #include "SortableList.H" #include "emptyPolyPatch.H" @@ -32,7 +32,7 @@ License // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // Merge two list and guarantee global0,global1 are first. -void Foam::faceStencil::merge +void Foam::cellToFaceStencil::merge ( const label global0, const label global1, @@ -124,7 +124,7 @@ void Foam::faceStencil::merge if (resultI != result.size()) { - FatalErrorIn("faceStencil::merge(..)") + FatalErrorIn("cellToFaceStencil::merge(..)") << "problem" << abort(FatalError); } @@ -133,7 +133,7 @@ void Foam::faceStencil::merge // Merge two list and guarantee globalI is first. -void Foam::faceStencil::merge +void Foam::cellToFaceStencil::merge ( const label globalI, const labelList& pGlobals, @@ -168,7 +168,7 @@ void Foam::faceStencil::merge } -void Foam::faceStencil::validBoundaryFaces(boolList& isValidBFace) const +void Foam::cellToFaceStencil::validBoundaryFaces(boolList& isValidBFace) const { const polyBoundaryMesh& patches = mesh().boundaryMesh(); @@ -191,7 +191,7 @@ void Foam::faceStencil::validBoundaryFaces(boolList& isValidBFace) const Foam::autoPtr<Foam::indirectPrimitivePatch> -Foam::faceStencil::allCoupledFacesPatch() const +Foam::cellToFaceStencil::allCoupledFacesPatch() const { const polyBoundaryMesh& patches = mesh().boundaryMesh(); @@ -239,7 +239,7 @@ Foam::faceStencil::allCoupledFacesPatch() const } -void Foam::faceStencil::unionEqOp::operator() +void Foam::cellToFaceStencil::unionEqOp::operator() ( labelList& x, const labelList& y @@ -264,7 +264,7 @@ void Foam::faceStencil::unionEqOp::operator() } -void Foam::faceStencil::insertFaceCells +void Foam::cellToFaceStencil::insertFaceCells ( const label exclude0, const label exclude1, @@ -316,7 +316,7 @@ void Foam::faceStencil::insertFaceCells } -Foam::labelList Foam::faceStencil::calcFaceCells +Foam::labelList Foam::cellToFaceStencil::calcFaceCells ( const boolList& isValidBFace, const labelList& faceLabels, @@ -339,7 +339,7 @@ Foam::labelList Foam::faceStencil::calcFaceCells // Calculates per face a list of global cell/face indices. -void Foam::faceStencil::calcFaceStencil +void Foam::cellToFaceStencil::calcFaceStencil ( const labelListList& globalCellCells, labelListList& faceStencil @@ -502,7 +502,7 @@ void Foam::faceStencil::calcFaceStencil // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::faceStencil::faceStencil(const polyMesh& mesh) +Foam::cellToFaceStencil::cellToFaceStencil(const polyMesh& mesh) : mesh_(mesh), globalNumbering_(mesh_.nCells()+mesh_.nFaces()-mesh_.nInternalFaces()) diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/cellToFaceStencil.H similarity index 89% rename from src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceStencil.H rename to src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/cellToFaceStencil.H index a7e3105bc7d5177479d97f7f4adb5c7f4e05c92d..e577a857d51ee0371b6c86b8ff9fd6de3f1f41e7 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceStencil/faceStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/cellToFaceStencil.H @@ -23,18 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::faceStencil + Foam::cellToFaceStencil Description - baseclass for extended face-cell addressing. + baseclass for extended cell-to-facel stencils (face values from + neighbouring cells) SourceFiles faceStencil.C \*---------------------------------------------------------------------------*/ -#ifndef faceStencil_H -#define faceStencil_H +#ifndef cellToFaceStencil_H +#define cellToFaceStencil_H #include "globalIndex.H" #include "boolList.H" @@ -49,10 +50,10 @@ namespace Foam class polyMesh; /*---------------------------------------------------------------------------*\ - Class faceStencil Declaration + Class cellToFaceStencil Declaration \*---------------------------------------------------------------------------*/ -class faceStencil +class cellToFaceStencil : public labelListList { @@ -66,10 +67,12 @@ class faceStencil // Private Member Functions + //- Disallow default bitwise copy construct + cellToFaceStencil(const cellToFaceStencil&); + //- Disallow default bitwise assignment - void operator=(const faceStencil&); + void operator=(const cellToFaceStencil&); - protected: @@ -130,7 +133,7 @@ public: // Constructors //- Construct from mesh - explicit faceStencil(const polyMesh&); + explicit cellToFaceStencil(const polyMesh&); // Member Functions diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCPCStencilObject.C b/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCPCStencilObject.C deleted file mode 100644 index 36f0c19b34d715ca71e287ea4b094429524b346d..0000000000000000000000000000000000000000 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindCPCStencilObject.C +++ /dev/null @@ -1,38 +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 "upwindCPCStencilObject.H" - - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(upwindCPCStencilObject, 0); -} - - -// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindFECStencilObject.C b/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindFECStencilObject.C deleted file mode 100644 index d9202eaa6de0b967e424946aef97504ff2948f16..0000000000000000000000000000000000000000 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/upwindFECStencilObject.C +++ /dev/null @@ -1,38 +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 "upwindFECStencilObject.H" - - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(upwindFECStencilObject, 0); -} - - -// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/MeshObjects/centredCFCFaceToCellStencilObject.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/MeshObjects/centredCFCFaceToCellStencilObject.C new file mode 100644 index 0000000000000000000000000000000000000000..87d4a4a4889e1a94afb1d0c5267c822bdc9fdaa0 --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/MeshObjects/centredCFCFaceToCellStencilObject.C @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "centredCFCFaceToCellStencilObject.H" + + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(centredCFCFaceToCellStencilObject, 0); +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCFCStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/MeshObjects/centredCFCFaceToCellStencilObject.H similarity index 73% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCFCStencilObject.H rename to src/finiteVolume/fvMesh/extendedStencil/faceToCell/MeshObjects/centredCFCFaceToCellStencilObject.H index 43b87a31f0587201ab3ea8460ea8c874a402e22f..4877d63a5ad64530e7f28e33a07d7957cd5af7fa 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCFCStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/MeshObjects/centredCFCFaceToCellStencilObject.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::centredCFCStencilObject + Foam::centredCFCFaceToCellStencilObject Description @@ -31,11 +31,11 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef centredCFCStencilObject_H -#define centredCFCStencilObject_H +#ifndef centredCFCFaceToCellStencilObject_H +#define centredCFCFaceToCellStencilObject_H -#include "extendedCentredStencil.H" -#include "cellFaceCellStencil.H" +#include "extendedCentredFaceToCellStencil.H" +#include "CFCFaceToCellStencil.H" #include "MeshObject.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,34 +44,34 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class centredCFCStencilObject Declaration + Class centredCFCFaceToCellStencilObject Declaration \*---------------------------------------------------------------------------*/ -class centredCFCStencilObject +class centredCFCFaceToCellStencilObject : - public MeshObject<fvMesh, centredCFCStencilObject>, - public extendedCentredStencil + public MeshObject<fvMesh, centredCFCFaceToCellStencilObject>, + public extendedCentredFaceToCellStencil { public: - TypeName("centredCFCStencil"); + TypeName("centredCFCFaceToCellStencil"); // Constructors //- Construct from uncompacted face stencil - explicit centredCFCStencilObject + explicit centredCFCFaceToCellStencilObject ( const fvMesh& mesh ) : - MeshObject<fvMesh, centredCFCStencilObject>(mesh), - extendedCentredStencil(cellFaceCellStencil(mesh)) + MeshObject<fvMesh, centredCFCFaceToCellStencilObject>(mesh), + extendedCentredFaceToCellStencil(CFCFaceToCellStencil(mesh)) {} //- Destructor - virtual ~centredCFCStencilObject() + virtual ~centredCFCFaceToCellStencilObject() {} }; diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.C new file mode 100644 index 0000000000000000000000000000000000000000..d7dcc2a093d15d4f28985292d670213b16de4f71 --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.C @@ -0,0 +1,76 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "mapDistribute.H" +#include "extendedCentredFaceToCellStencil.H" +#include "faceToCellStencil.H" + +// Only for access to calcDistributeMap <- needs to be moved out +#include "extendedCellToFaceStencil.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::extendedCentredFaceToCellStencil::extendedCentredFaceToCellStencil +( + const faceToCellStencil& stencil +) +: + extendedFaceToCellStencil(stencil.mesh()) +{ + stencil_ = stencil; + + // Calculate distribute map (also renumbers elements in stencil) + mapPtr_ = extendedCellToFaceStencil::calcDistributeMap + ( + stencil.mesh(), + stencil.globalNumbering(), + stencil_ + ); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +// Per face which elements of the stencil to keep. +void Foam::extendedCentredFaceToCellStencil::compact() +{ + boolList isInStencil(map().constructSize(), false); + + forAll(stencil_, faceI) + { + const labelList& stencilCells = stencil_[faceI]; + + forAll(stencilCells, i) + { + isInStencil[stencilCells[i]] = true; + } + } + + mapPtr_().compact(isInStencil); +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.H new file mode 100644 index 0000000000000000000000000000000000000000..137679f22665966346b07d624c233534066f10f4 --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.H @@ -0,0 +1,146 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::extendedCentredFaceToCellStencil + +Description + +SourceFiles + extendedCentredFaceToCellStencil.C + +\*---------------------------------------------------------------------------*/ + +#ifndef extendedCentredFaceToCellStencil_H +#define extendedCentredFaceToCellStencil_H + +#include "extendedFaceToCellStencil.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class faceToCellStencil; + +/*---------------------------------------------------------------------------*\ + Class extendedCentredFaceToCellStencil Declaration +\*---------------------------------------------------------------------------*/ + +class extendedCentredFaceToCellStencil +: + public extendedFaceToCellStencil +{ + // Private data + + //- Swap map for getting neigbouring data + autoPtr<mapDistribute> mapPtr_; + + //- Per face the stencil. + labelListList stencil_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + extendedCentredFaceToCellStencil + ( + const extendedCentredFaceToCellStencil& + ); + + //- Disallow default bitwise assignment + void operator=(const extendedCentredFaceToCellStencil&); + + +public: + + // Constructors + + //- Construct from uncompacted face stencil + explicit extendedCentredFaceToCellStencil(const faceToCellStencil&); + + + // Member Functions + + //- Return reference to the parallel distribution map + const mapDistribute& map() const + { + return mapPtr_(); + } + + //- Return reference to the stencil + const labelListList& stencil() const + { + return stencil_; + } + + //- After removing elements from the stencil adapt the schedule (map). + void compact(); + + //- Use map to get the data into stencil order + template<class T> + void collectData + ( + const GeometricField<T, fvsPatchField, surfaceMesh>& fld, + List<List<T> >& stencilFld + ) const + { + extendedFaceToCellStencil::collectData + ( + map(), + stencil(), + fld, + stencilFld + ); + } + + //- Sum surface field contributions to create cell values + template<class Type> + tmp<GeometricField<Type, fvPatchField, volMesh> > weightedSum + ( + const GeometricField<Type, fvsPatchField, surfaceMesh>& fld, + const List<List<scalar> >& stencilWeights + ) const + { + return extendedFaceToCellStencil::weightedSum + ( + map(), + stencil(), + fld, + stencilWeights + ); + } + +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencil.C new file mode 100644 index 0000000000000000000000000000000000000000..4f0f5c41ad581b672bc9cd77e4a6a335d71afb27 --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencil.C @@ -0,0 +1,62 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "extendedFaceToCellStencil.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::extendedFaceToCellStencil::extendedFaceToCellStencil(const polyMesh& mesh) +: + mesh_(mesh) +{ + // Check for transformation - not supported. + const polyBoundaryMesh& patches = mesh.boundaryMesh(); + + forAll(patches, patchI) + { + if (isA<coupledPolyPatch>(patches[patchI])) + { + const coupledPolyPatch& cpp = + refCast<const coupledPolyPatch>(patches[patchI]); + + if (!cpp.parallel() || cpp.separated()) + { + FatalErrorIn + ( + "extendedFaceToCellStencil::extendedFaceToCellStencil" + "(const polyMesh&)" + ) << "Coupled patches with transformations not supported." + << endl + << "Problematic patch " << cpp.name() << exit(FatalError); + } + } + } +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencil.H new file mode 100644 index 0000000000000000000000000000000000000000..5c334786c6051427ac3927f4f13788890211dce7 --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencil.H @@ -0,0 +1,121 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::extendedFaceToCellStencil + +Description + Note: transformations on coupled patches not supported. Problem is the + positions of cells reachable through these patches. + +SourceFiles + extendedFaceToCellStencil.C + extendedFaceToCellStencilTemplates.C + +\*---------------------------------------------------------------------------*/ + +#ifndef extendedFaceToCellStencil_H +#define extendedFaceToCellStencil_H + +#include "mapDistribute.H" +#include "volFields.H" +#include "surfaceFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class globalIndex; + +/*---------------------------------------------------------------------------*\ + Class extendedFaceToCellStencil Declaration +\*---------------------------------------------------------------------------*/ + +class extendedFaceToCellStencil +{ +protected: + + // Protected data + + const polyMesh& mesh_; + +private: + + // Private Member Functions + + //- Disallow default bitwise copy construct + extendedFaceToCellStencil(const extendedFaceToCellStencil&); + + //- Disallow default bitwise assignment + void operator=(const extendedFaceToCellStencil&); + + +public: + + // Constructors + + //- Construct from mesh + explicit extendedFaceToCellStencil(const polyMesh&); + + + // Member Functions + + //- Use map to get the data into stencil order + template<class T> + static void collectData + ( + const mapDistribute& map, + const labelListList& stencil, + const GeometricField<T, fvsPatchField, surfaceMesh>& fld, + List<List<T> >& stencilFld + ); + + //- Sum surface field contributions to create cell values + template<class Type> + static tmp<GeometricField<Type, fvPatchField, volMesh> > weightedSum + ( + const mapDistribute& map, + const labelListList& stencil, + const GeometricField<Type, fvsPatchField, surfaceMesh>& fld, + const List<List<scalar> >& stencilWeights + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "extendedFaceToCellStencilTemplates.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C new file mode 100644 index 0000000000000000000000000000000000000000..17210c360c8de0417611c4aacb9a4a4c1d69271c --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C @@ -0,0 +1,135 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "extendedFaceToCellStencil.H" + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +void Foam::extendedFaceToCellStencil::collectData +( + const mapDistribute& map, + const labelListList& stencil, + const GeometricField<Type, fvsPatchField, surfaceMesh>& fld, + List<List<Type> >& stencilFld +) +{ + // 1. Construct face data in compact addressing + List<Type> compactFld(map.constructSize(), pTraits<Type>::zero); + + // Insert my internal values + forAll(fld, cellI) + { + compactFld[cellI] = fld[cellI]; + } + // Insert my boundary values + label nCompact = fld.size(); + forAll(fld.boundaryField(), patchI) + { + const fvsPatchField<Type>& pfld = fld.boundaryField()[patchI]; + + forAll(pfld, i) + { + compactFld[nCompact++] = pfld[i]; + } + } + + // Do all swapping + map.distribute(compactFld); + + // 2. Pull to stencil + stencilFld.setSize(stencil.size()); + + forAll(stencil, faceI) + { + const labelList& compactCells = stencil[faceI]; + + stencilFld[faceI].setSize(compactCells.size()); + + forAll(compactCells, i) + { + stencilFld[faceI][i] = compactFld[compactCells[i]]; + } + } +} + + +template<class Type> +Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > +Foam::extendedFaceToCellStencil::weightedSum +( + const mapDistribute& map, + const labelListList& stencil, + const GeometricField<Type, fvsPatchField, surfaceMesh>& fld, + const List<List<scalar> >& stencilWeights +) +{ + const fvMesh& mesh = fld.mesh(); + + // Collect internal and boundary values + List<List<Type> > stencilFld; + collectData(map, stencil, fld, stencilFld); + + tmp<GeometricField<Type, fvPatchField, volMesh> > tsfCorr + ( + new GeometricField<Type, fvPatchField, volMesh> + ( + IOobject + ( + fld.name(), + mesh.time().timeName(), + mesh + ), + mesh, + dimensioned<Type> + ( + fld.name(), + fld.dimensions(), + pTraits<Type>::zero + ) + ) + ); + GeometricField<Type, fvPatchField, volMesh>& sf = tsfCorr(); + + // cells + forAll(sf, cellI) + { + const List<Type>& stField = stencilFld[cellI]; + const List<scalar>& stWeight = stencilWeights[cellI]; + + forAll(stField, i) + { + sf[cellI] += stField[i]*stWeight[i]; + } + } + + // Boundaries values? + + return tsfCorr; +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/fullStencils/CFCFaceToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/fullStencils/CFCFaceToCellStencil.C new file mode 100644 index 0000000000000000000000000000000000000000..c0d2302f0b3d97443b9a296724125fb6b87452c9 --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/fullStencils/CFCFaceToCellStencil.C @@ -0,0 +1,231 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "CFCFaceToCellStencil.H" +#include "syncTools.H" +#include "emptyPolyPatch.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +// Calculates per face the neighbour data (= faces of cell). Leaves out the +// face itself since this is already in stencil. +void Foam::CFCFaceToCellStencil::calcFaceBoundaryData +( + labelListList& neiGlobal +) const +{ + const polyBoundaryMesh& patches = mesh().boundaryMesh(); + const label nBnd = mesh().nFaces()-mesh().nInternalFaces(); + const labelList& own = mesh().faceOwner(); + + neiGlobal.setSize(nBnd); + + forAll(patches, patchI) + { + const polyPatch& pp = patches[patchI]; + label faceI = pp.start(); + + if (pp.coupled()) + { + // For coupled faces get the faces of the cell on the other side + forAll(pp, i) + { + const labelList& cFaces = mesh().cells()[own[faceI]]; + + labelList& globFaces = neiGlobal[faceI-mesh().nInternalFaces()]; + globFaces.setSize(cFaces.size()-1); + label globI = 0; + + forAll(cFaces, j) + { + if (cFaces[j] != faceI) + { + globFaces[globI++] = globalNumbering().toGlobal + ( + cFaces[j] + ); + } + } + faceI++; + } + } + else if (isA<emptyPolyPatch>(pp)) + { + // Do nothing. + } + else + { + // Do nothing since face itself already in stencil + } + } + syncTools::swapBoundaryFaceList(mesh(), neiGlobal, false); +} + + +// Calculates per cell the neighbour data (= cell or boundary in global +// numbering). First element is always cell itself! +void Foam::CFCFaceToCellStencil::calcCellStencil(labelListList& globalCellFaces) + const +{ + const label nBnd = mesh().nFaces()-mesh().nInternalFaces(); + const labelList& own = mesh().faceOwner(); + const labelList& nei = mesh().faceNeighbour(); + + + // Calculate faces of coupled neighbour (in global numbering) + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + labelListList neiGlobal(nBnd); + calcFaceBoundaryData(neiGlobal); + + + + // Non-empty boundary faces + boolList validBFace(mesh().nFaces()-mesh().nInternalFaces(), true); + + const polyBoundaryMesh& patches = mesh().boundaryMesh(); + forAll(patches, patchI) + { + const polyPatch& pp = patches[patchI]; + + if (isA<emptyPolyPatch>(pp)) + { + label bFaceI = pp.start()-mesh().nInternalFaces(); + forAll(pp, i) + { + validBFace[bFaceI++] = false; + } + } + } + + + // Determine faces of cellCells in global numbering + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + DynamicList<label> allGlobalFaces(100); + + globalCellFaces.setSize(mesh().nCells()); + forAll(globalCellFaces, cellI) + { + const cell& cFaces = mesh().cells()[cellI]; + + allGlobalFaces.clear(); + + // My faces first + forAll(cFaces, i) + { + label faceI = cFaces[i]; + + if + ( + mesh().isInternalFace(faceI) + || validBFace[faceI-mesh().nInternalFaces()] + ) + { + allGlobalFaces.append(globalNumbering().toGlobal(faceI)); + } + } + + // faces of neighbouring cells second + forAll(cFaces, i) + { + label faceI = cFaces[i]; + + if (mesh().isInternalFace(faceI)) + { + label nbrCellI = own[faceI]; + if (nbrCellI == cellI) + { + nbrCellI = nei[faceI]; + } + const cell& nbrFaces = mesh().cells()[nbrCellI]; + + forAll(nbrFaces, j) + { + label nbrFaceI = nbrFaces[j]; + + if + ( + mesh().isInternalFace(nbrFaceI) + || validBFace[nbrFaceI-mesh().nInternalFaces()] + ) + { + label nbrGlobalI = globalNumbering().toGlobal(nbrFaceI); + + // Check if already there. Note:should use hashset? + if (findIndex(allGlobalFaces, nbrGlobalI) == -1) + { + allGlobalFaces.append(nbrGlobalI); + } + } + } + } + else + { + const labelList& nbrGlobalFaces = + neiGlobal[faceI-mesh().nInternalFaces()]; + + forAll(nbrGlobalFaces, j) + { + label nbrGlobalI = nbrGlobalFaces[j]; + + // Check if already there. Note:should use hashset? + if (findIndex(allGlobalFaces, nbrGlobalI) == -1) + { + allGlobalFaces.append(nbrGlobalI); + } + } + } + } + + globalCellFaces[cellI] = allGlobalFaces; + //Pout<< "** cell:" << cellI + // << " at:" << mesh().cellCentres()[cellI] + // << endl; + //const labelList& globalFaces = globalCellFaces[cellI]; + //forAll(globalFaces, i) + //{ + // label faceI = globalNumbering().toLocal(globalFaces[i]); + // Pout<< " face:" << faceI + // << " at:" << mesh().faceCentres()[faceI] + // << endl; + //} + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::CFCFaceToCellStencil::CFCFaceToCellStencil(const polyMesh& mesh) +: + faceToCellStencil(mesh) +{ + // Calculate per cell the (face) connected cells (in global numbering) + calcCellStencil(*this); +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredFECStencilObject.H b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/fullStencils/CFCFaceToCellStencil.H similarity index 70% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredFECStencilObject.H rename to src/finiteVolume/fvMesh/extendedStencil/faceToCell/fullStencils/CFCFaceToCellStencil.H index 8ce7efcacac1c0658d64907b9214dedb3ceecc10..2bbf9376f438047e47ece65c6e1a9c6f5a091173 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredFECStencilObject.H +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/fullStencils/CFCFaceToCellStencil.H @@ -23,20 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::centredFECStencilObject + Foam::CFCFaceToCellStencil Description SourceFiles + CFCFaceToCellStencil.C \*---------------------------------------------------------------------------*/ -#ifndef centredFECStencilObject_H -#define centredFECStencilObject_H +#ifndef CFCFaceToCellStencil_H +#define CFCFaceToCellStencil_H -#include "extendedCentredStencil.H" -#include "faceEdgeCellStencil.H" -#include "MeshObject.H" +#include "faceToCellStencil.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,36 +43,31 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class centredFECStencilObject Declaration + Class CFCFaceToCellStencil Declaration \*---------------------------------------------------------------------------*/ -class centredFECStencilObject +class CFCFaceToCellStencil : - public MeshObject<fvMesh, centredFECStencilObject>, - public extendedCentredStencil + public faceToCellStencil { + // Private Member Functions -public: + void calcFaceBoundaryData(labelListList& neiGlobal) const; - TypeName("centredCFCStencil"); + void calcCellStencil(labelListList& globalCellFaces) const; - // Constructors + //- Disallow default bitwise copy construct + CFCFaceToCellStencil(const CFCFaceToCellStencil&); - //- Construct from uncompacted face stencil - explicit centredFECStencilObject - ( - const fvMesh& mesh - ) - : - MeshObject<fvMesh, centredFECStencilObject>(mesh), - extendedCentredStencil(faceEdgeCellStencil(mesh)) - {} + //- Disallow default bitwise assignment + void operator=(const CFCFaceToCellStencil&); +public: - // Destructor + // Constructors - virtual ~centredFECStencilObject() - {} + //- Construct from mesh + explicit CFCFaceToCellStencil(const polyMesh& mesh); }; diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/fullStencils/faceToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/fullStencils/faceToCellStencil.C new file mode 100644 index 0000000000000000000000000000000000000000..7e871cc7fa282e3e1af3a53bbd479d375488940e --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/fullStencils/faceToCellStencil.C @@ -0,0 +1,41 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "faceToCellStencil.H" +#include "polyMesh.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::faceToCellStencil::faceToCellStencil(const polyMesh& mesh) +: + mesh_(mesh), + globalNumbering_(mesh_.nFaces()) +{} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/fullStencils/faceToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/fullStencils/faceToCellStencil.H new file mode 100644 index 0000000000000000000000000000000000000000..84df1ea789de5a6e54e47414d65fe4c0f588c5a0 --- /dev/null +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/fullStencils/faceToCellStencil.H @@ -0,0 +1,108 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::faceToCellStencil + +Description + baseclass for extended cell centred addressing. Contains per cell a + list of neighbouring faces in global addressing. + +SourceFiles + faceToCellStencil.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faceToCellStencil_H +#define faceToCellStencil_H + +#include "globalIndex.H" +#include "boolList.H" +#include "HashSet.H" +#include "indirectPrimitivePatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class polyMesh; + +/*---------------------------------------------------------------------------*\ + Class faceToCellStencil Declaration +\*---------------------------------------------------------------------------*/ + +class faceToCellStencil +: + public labelListList +{ + // Private data + + const polyMesh& mesh_; + + //- Global numbering for faces + const globalIndex globalNumbering_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + faceToCellStencil(const faceToCellStencil&); + + //- Disallow default bitwise assignment + void operator=(const faceToCellStencil&); + +public: + + // Constructors + + //- Construct from mesh + explicit faceToCellStencil(const polyMesh&); + + + // Member Functions + + const polyMesh& mesh() const + { + return mesh_; + } + + //- Global numbering for faces + const globalIndex& globalNumbering() const + { + return globalNumbering_; + } + +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index aebecfefe9e22cf44914f8ff7b5a196a6b8f8207..5dd07f3a921b2732973b88d6993c543b61ff6863 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -44,17 +44,22 @@ License #include "leastSquaresVectors.H" #include "CentredFitData.H" #include "linearFitPolynomial.H" +#include "quadraticFitPolynomial.H" #include "quadraticLinearFitPolynomial.H" +//#include "quadraticFitSnGradData.H" #include "skewCorrectionVectors.H" -#include "centredCECStencilObject.H" -#include "centredCFCStencilObject.H" -#include "centredCPCStencilObject.H" -#include "centredFECStencilObject.H" -#include "upwindCECStencilObject.H" -#include "upwindCFCStencilObject.H" -#include "upwindCPCStencilObject.H" -#include "upwindFECStencilObject.H" + +#include "centredCECCellToFaceStencilObject.H" +#include "centredCFCCellToFaceStencilObject.H" +#include "centredCPCCellToFaceStencilObject.H" +#include "centredFECCellToFaceStencilObject.H" +#include "upwindCECCellToFaceStencilObject.H" +#include "upwindCFCCellToFaceStencilObject.H" +#include "upwindCPCCellToFaceStencilObject.H" +#include "upwindFECCellToFaceStencilObject.H" + +#include "centredCFCFaceToCellStencilObject.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -89,11 +94,12 @@ void Foam::fvMesh::clearGeom() // Things geometry dependent that are not updated. volPointInterpolation::Delete(*this); extendedLeastSquaresVectors::Delete(*this); - extendedLeastSquaresVectors::Delete(*this); leastSquaresVectors::Delete(*this); CentredFitData<linearFitPolynomial>::Delete(*this); + CentredFitData<quadraticFitPolynomial>::Delete(*this); CentredFitData<quadraticLinearFitPolynomial>::Delete(*this); skewCorrectionVectors::Delete(*this); + //quadraticFitSnGradData::Delete(*this); } @@ -105,20 +111,24 @@ void Foam::fvMesh::clearAddressing() volPointInterpolation::Delete(*this); extendedLeastSquaresVectors::Delete(*this); - extendedLeastSquaresVectors::Delete(*this); leastSquaresVectors::Delete(*this); CentredFitData<linearFitPolynomial>::Delete(*this); + CentredFitData<quadraticFitPolynomial>::Delete(*this); CentredFitData<quadraticLinearFitPolynomial>::Delete(*this); skewCorrectionVectors::Delete(*this); - - centredCECStencilObject::Delete(*this); - centredCFCStencilObject::Delete(*this); - centredCPCStencilObject::Delete(*this); - centredFECStencilObject::Delete(*this); - upwindCECStencilObject::Delete(*this); - upwindCFCStencilObject::Delete(*this); - upwindCPCStencilObject::Delete(*this); - upwindFECStencilObject::Delete(*this); + //quadraticFitSnGradData::Delete(*this); + + centredCECCellToFaceStencilObject::Delete(*this); + centredCFCCellToFaceStencilObject::Delete(*this); + centredCPCCellToFaceStencilObject::Delete(*this); + centredFECCellToFaceStencilObject::Delete(*this); + // Is this geometry related - cells distorting to upwind direction? + upwindCECCellToFaceStencilObject::Delete(*this); + upwindCFCCellToFaceStencilObject::Delete(*this); + upwindCPCCellToFaceStencilObject::Delete(*this); + upwindFECCellToFaceStencilObject::Delete(*this); + + centredCFCFaceToCellStencilObject::Delete(*this); } @@ -592,8 +602,10 @@ Foam::tmp<Foam::scalarField> Foam::fvMesh::movePoints(const pointField& p) MeshObjectMovePoints<extendedLeastSquaresVectors>(*this); MeshObjectMovePoints<leastSquaresVectors>(*this); MeshObjectMovePoints<CentredFitData<linearFitPolynomial> >(*this); + MeshObjectMovePoints<CentredFitData<quadraticFitPolynomial> >(*this); MeshObjectMovePoints<CentredFitData<quadraticLinearFitPolynomial> >(*this); MeshObjectMovePoints<skewCorrectionVectors>(*this); + //MeshObjectMovePoints<quadraticFitSnGradData>(*this); return tsweptVols; } diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/cellPointWeight/cellPointWeight.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/cellPointWeight/cellPointWeight.C index 6666d347f0c43ae9efd5f832e9823807611c06bf..65ef6826fa8c097d8d88fa628f9810866cfdd448 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/cellPointWeight/cellPointWeight.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/cellPointWeight/cellPointWeight.C @@ -164,12 +164,12 @@ void Foam::cellPointWeight::findTetrahedron } } - WarningIn - ( - "cellPointWeight::findTetrahedron" - "(const polyMesh&, const vector&, const label, const label)" - ) << "Tetrahedron search failed; using closest tet values to point " - << nl << " cell: " << cellIndex << endl; + if (debug) + { + Pout<< "cellPointWeight::findTetrahedron" << nl + << " Tetrahedron search failed; using closest tet values to " + << "point " << nl << " cell: " << cellIndex << nl << endl; + } const labelList& facePointsClose = mesh.faces()[cellFaces[faceClose]]; faceVertices_[0] = facePointsClose[0]; @@ -284,13 +284,12 @@ void Foam::cellPointWeight::findTriangle pointI++; } - WarningIn - ( - "Foam::cellPointWeight::findTriangle" - "(const polyMesh&, const vector&, const label)" - ) << "Triangle search failed; using closest triangle to " - << "point" << nl - << " cell face: " << faceIndex << endl; + if (debug) + { + Pout<< "Foam::cellPointWeight::findTriangle" + << "Triangle search failed; using closest triangle to point" << nl + << " cell face: " << faceIndex << nl << endl; + } // Indices of the cell vertices making up the triangle faceVertices_[0] = facePoints[0]; diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/cellPointWeight/cellPointWeight.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/cellPointWeight/cellPointWeight.H index 767c90380932cf443ef50223649fcf251a86582f..937e277b61a3ceef0169e218bcbb18285281d979 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/cellPointWeight/cellPointWeight.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/cellPointWeight/cellPointWeight.H @@ -51,7 +51,9 @@ class polyMesh; class cellPointWeight { - // Private data +protected: + + // Protected data //- Cell index const label cellIndex_; @@ -63,7 +65,7 @@ class cellPointWeight FixedList<label, 3> faceVertices_; - // Private Member Functions + // Protected Member Functions void findTetrahedron ( diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/interpolationCellPoint.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/interpolationCellPoint.H index 9388a85fc889214c1cb5685b3d15de4c17eacf0e..bbe76871ba730bcf70c86c057c5394a3644dd773 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/interpolationCellPoint.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/interpolationCellPoint.H @@ -42,7 +42,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class interpolationCellPoint Declaration + Class interpolationCellPoint Declaration \*---------------------------------------------------------------------------*/ template<class Type> @@ -50,7 +50,9 @@ class interpolationCellPoint : public interpolation<Type> { - // Private data +protected: + + // Protected data //- Interpolated volfield const GeometricField<Type, pointPatchField, pointMesh> psip_; @@ -79,7 +81,7 @@ public: //- Interpolate field to the given point in the given cell inline Type interpolate ( - const vector& position, + const vector& position, const label nCell, const label facei = -1 ) const; diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C new file mode 100644 index 0000000000000000000000000000000000000000..f33af9e7e335104d78d03f9e1ed31b1f6a511b38 --- /dev/null +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.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 "cellPointWeightWallModified.H" +#include "wallPolyPatch.H" +#include "polyMesh.H" +#include "polyBoundaryMesh.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::cellPointWeightWallModified::cellPointWeightWallModified +( + const polyMesh& mesh, + const vector& position, + const label cellIndex, + const label faceIndex +) +: + cellPointWeight(mesh, position, cellIndex, faceIndex) +{ + if (faceIndex < 0) + { + findTetrahedron(mesh, position, cellIndex); + } + else + { + const polyBoundaryMesh& bm = mesh.boundaryMesh(); + label patchI = bm.whichPatch(faceIndex); + if (patchI != -1) + { + if (isA<wallPolyPatch>(bm[patchI])) + { + // Apply cell centre value wall faces + weights_[0] = 0.0; + weights_[1] = 0.0; + weights_[2] = 0.0; + weights_[3] = 1.0; + } + } + else + { + // Interpolate + findTriangle(mesh, position, faceIndex); + } + } +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCECStencilObject.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.H similarity index 70% rename from src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCECStencilObject.H rename to src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.H index 29ece11951ce7d41458b6a43bdc67dd4f4bb7482..e7903a7338b9e4cc1bfcb1ba2eeba55a632bd505 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/extendedStencilMeshObjects/centredCECStencilObject.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.H @@ -23,57 +23,48 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::centredCECStencilObject + Foam::cellPointWeightWallModified Description + Foam::cellPointWeightWallModified SourceFiles + cellPointWeightWallModified.C \*---------------------------------------------------------------------------*/ -#ifndef centredCECStencilObject_H -#define centredCECStencilObject_H +#ifndef cellPointWeightWallModified_H +#define cellPointWeightWallModified_H -#include "extendedCentredStencil.H" -#include "cellEdgeCellStencil.H" -#include "MeshObject.H" +#include "cellPointWeight.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { +class polyMesh; + /*---------------------------------------------------------------------------*\ - Class centredCECStencilObject Declaration + Class cellPointWeightWallModified Declaration \*---------------------------------------------------------------------------*/ -class centredCECStencilObject +class cellPointWeightWallModified : - public MeshObject<fvMesh, centredCECStencilObject>, - public extendedCentredStencil + public cellPointWeight { - public: - TypeName("centredCECStencil"); - // Constructors - //- Construct from uncompacted face stencil - explicit centredCECStencilObject + //- Construct from components + cellPointWeightWallModified ( - const fvMesh& mesh - ) - : - MeshObject<fvMesh, centredCECStencilObject>(mesh), - extendedCentredStencil(cellEdgeCellStencil(mesh)) - {} - - - // Destructor - - virtual ~centredCECStencilObject() - {} + const polyMesh& mesh, + const vector& position, + const label nCell, + const label facei = -1 + ); }; diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.C new file mode 100644 index 0000000000000000000000000000000000000000..762aeef1cbcb6ab247aa45c9b79dc0a162b5bd6c --- /dev/null +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.C @@ -0,0 +1,42 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "interpolationCellPointWallModified.H" + +// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * // + +template<class Type> +Foam::interpolationCellPointWallModified<Type>:: +interpolationCellPointWallModified +( + const GeometricField<Type, fvPatchField, volMesh>& psi +) +: + interpolationCellPoint<Type>(psi) +{} + + +// ************************************************************************* // diff --git a/src/lagrangian/basic/lagrangianField/LagrangianField.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H similarity index 58% rename from src/lagrangian/basic/lagrangianField/LagrangianField.H rename to src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H index a760413448ce35c35f4ef11cf78d3c2357476d55..a54fc8fb7a0fbbf2f360b6afa63973c59070cc36 100644 --- a/src/lagrangian/basic/lagrangianField/LagrangianField.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H @@ -23,21 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::LagrangianField + Foam::interpolationCellPoint Description - -SourceFiles - LagrangianFieldI.H - LagrangianField.C - LagrangianFieldIO.C + Same as interpolationCellPoint, but if interpolating a wall face, uses + cell centre value instead \*---------------------------------------------------------------------------*/ -#ifndef LagrangianField_H -#define LagrangianField_H +#ifndef interpolationCellPointWallModified_H +#define interpolationCellPointWallModified_H -#include "DimensionedField.H" +#include "interpolationCellPoint.H" +#include "cellPointWeightWallModified.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,83 +43,41 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class LagrangianField Declaration + Class interpolationCellPoint Declaration \*---------------------------------------------------------------------------*/ -template<class Type, class Cloud> -class LagrangianField +template<class Type> +class interpolationCellPointWallModified : - public DimensionedField<Type> + public interpolationCellPoint<Type> { - // Private data - - //- Reference to lagrangian cloud this field is part of - const Cloud& cloud_; - - public: //- Runtime type information - TypeName("LagrangianField"); + TypeName("cellPointWallModified"); // Constructors //- Construct from components - LagrangianField + interpolationCellPointWallModified ( - const IOobject& ioObject, - const Cloud& cloud, - const dimensions& dims, - const Field<Type> field + const GeometricField<Type, fvPatchField, volMesh>& psi ); - //- Construct from IOobject - LagrangianField - ( - const IOobject& ioObject, - const Cloud& cloud - ); - - //- Construct from Cloud data - LagrangianField(const Cloud& cloud, const int typeFieldIndex); - - //- Construct as copy - LagrangianField(const LagrangianField<Type>&); - - - // Destructor - - ~LagrangianField(); - // Member Functions - // Access - - //- Map field back into Cloud - void map(Cloud& cloud, const int typeFieldIndex); - - - // Check + //- Interpolate field for the given cellPointWeight + inline Type interpolate(const cellPointWeightWallModified& cpw) const; - // Edit - - // Write - - - // Member Operators - - void operator=(const LagrangianField&); - - - // Friend Functions - - // Friend Operators - - // IOstream Operators - - friend Ostream& operator<<(Ostream&, const LagrangianField&); + //- Interpolate field to the given point in the given cell + inline Type interpolate + ( + const vector& position, + const label nCell, + const label facei = -1 + ) const; }; @@ -131,7 +87,13 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "LagrangianFieldI.H" +#include "interpolationCellPointWallModifiedI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "interpolationCellPointWallModified.C" +#endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModifiedI.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModifiedI.H new file mode 100644 index 0000000000000000000000000000000000000000..4318ce899419eb46638114dab77a876f111de0cd --- /dev/null +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModifiedI.H @@ -0,0 +1,69 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +inline Type Foam::interpolationCellPointWallModified<Type>::interpolate +( + const cellPointWeightWallModified& cpw +) const +{ + const FixedList<scalar, 4>& weights = cpw.weights(); + const FixedList<label, 3>& faceVertices = cpw.faceVertices(); + + Type t = this->psip_[faceVertices[0]]*weights[0]; + t += this->psip_[faceVertices[1]]*weights[1]; + t += this->psip_[faceVertices[2]]*weights[2]; + t += this->psi_[cpw.cell()]*weights[3]; + + return t; +} + + +template<class Type> +inline Type Foam::interpolationCellPointWallModified<Type>::interpolate +( + const vector& position, + const label celli, + const label facei +) const +{ + return + interpolate + ( + cellPointWeightWallModified + ( + this->pMesh_, + position, + celli, + facei + ) + ); +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C new file mode 100644 index 0000000000000000000000000000000000000000..c2e691f545b49453d136313d3d43554f175e97bb --- /dev/null +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C @@ -0,0 +1,36 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "interpolationCellPointWallModified.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeInterpolation(interpolationCellPointWallModified); +} + +// ************************************************************************* // diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C index 2b7bf7be3c567a0b1523a0f7c927885111205210..fb9611e9c8aa06f8f70c56ccd847232b34b72ef5 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C @@ -29,7 +29,7 @@ License #include "volFields.H" #include "SVD.H" #include "syncTools.H" -#include "extendedCentredStencil.H" +#include "extendedCentredCellToFaceStencil.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -37,14 +37,19 @@ template<class Polynomial> Foam::CentredFitData<Polynomial>::CentredFitData ( const fvMesh& mesh, - const extendedCentredStencil& stencil, + const extendedCentredCellToFaceStencil& stencil, const scalar linearLimitFactor, const scalar centralWeight ) : - FitData<CentredFitData<Polynomial>, extendedCentredStencil, Polynomial> + FitData + < + CentredFitData<Polynomial>, + extendedCentredCellToFaceStencil, + Polynomial + > ( - mesh, stencil, linearLimitFactor, centralWeight + mesh, stencil, true, linearLimitFactor, centralWeight ), coeffs_(mesh.nFaces()) { @@ -83,8 +88,12 @@ void Foam::CentredFitData<Polynomial>::calcFit() for(label facei = 0; facei < mesh.nInternalFaces(); facei++) { - FitData<CentredFitData<Polynomial>, extendedCentredStencil, Polynomial>:: - calcFit(coeffs_[facei], stencilPoints[facei], w[facei], facei); + FitData + < + CentredFitData<Polynomial>, + extendedCentredCellToFaceStencil, + Polynomial + >::calcFit(coeffs_[facei], stencilPoints[facei], w[facei], facei); } const surfaceScalarField::GeometricBoundaryField& bw = w.boundaryField(); @@ -101,7 +110,9 @@ void Foam::CentredFitData<Polynomial>::calcFit() { FitData < - CentredFitData<Polynomial>, extendedCentredStencil, Polynomial + CentredFitData<Polynomial>, + extendedCentredCellToFaceStencil, + Polynomial >::calcFit(coeffs_[facei], stencilPoints[facei], pw[i], facei); facei++; } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.H index 3be61503c376ec25406836b73f9b611ab33cf42b..476d8aed1779fcfe23df729c122a83e216469c1d 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.H @@ -43,7 +43,7 @@ SourceFiles namespace Foam { -class extendedCentredStencil; +class extendedCentredCellToFaceStencil; /*---------------------------------------------------------------------------*\ Class CentredFitData Declaration @@ -52,7 +52,7 @@ class extendedCentredStencil; template<class Polynomial> class CentredFitData : - public FitData<CentredFitData<Polynomial>, extendedCentredStencil, Polynomial> + public FitData<CentredFitData<Polynomial>, extendedCentredCellToFaceStencil, Polynomial> { // Private data @@ -79,7 +79,7 @@ public: CentredFitData ( const fvMesh& mesh, - const extendedCentredStencil& stencil, + const extendedCentredCellToFaceStencil& stencil, const scalar linearLimitFactor, const scalar centralWeight ); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitScheme.H index 10cea46e3b37199c71dda657e95e396664c65081..7e981024c01013dd755d35c58dc165f6382ab463 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitScheme.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitScheme.H @@ -119,7 +119,7 @@ public: { const fvMesh& mesh = this->mesh(); - const extendedCentredStencil& stencil = Stencil::New + const extendedCentredCellToFaceStencil& stencil = Stencil::New ( mesh ); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C index 18585bc645d1db5b13784960fd315f3e8165d824..dcea0902668d1444f3d93af5c37550f45a8245bf 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C @@ -28,22 +28,22 @@ License #include "surfaceFields.H" #include "volFields.H" #include "SVD.H" -#include "syncTools.H" -#include "extendedStencil.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class Form, class extendedStencil, class Polynomial> -Foam::FitData<Form, extendedStencil, Polynomial>::FitData +template<class Form, class ExtendedStencil, class Polynomial> +Foam::FitData<Form, ExtendedStencil, Polynomial>::FitData ( const fvMesh& mesh, - const extendedStencil& stencil, + const ExtendedStencil& stencil, + const bool linearCorrection, const scalar linearLimitFactor, const scalar centralWeight ) : MeshObject<fvMesh, Form>(mesh), stencil_(stencil), + linearCorrection_(linearCorrection), linearLimitFactor_(linearLimitFactor), centralWeight_(centralWeight), # ifdef SPHERICAL_GEOMETRY @@ -145,7 +145,10 @@ void Foam::FitData<FitDataType, ExtendedStencil, Polynomial>::calcFit // Setup the point weights scalarList wts(C.size(), scalar(1)); wts[0] = centralWeight_; - wts[1] = centralWeight_; + if (linearCorrection_) + { + wts[1] = centralWeight_; + } // Reference point point p0 = this->mesh().faceCentres()[facei]; @@ -191,6 +194,13 @@ void Foam::FitData<FitDataType, ExtendedStencil, Polynomial>::calcFit ); } + // Additional weighting for constant and linear terms + for(label i = 0; i < B.n(); i++) + { + B[i][0] *= wts[0]; + B[i][1] *= wts[0]; + } + // Set the fit label stencilSize = C.size(); coeffsi.setSize(stencilSize); @@ -205,7 +215,7 @@ void Foam::FitData<FitDataType, ExtendedStencil, Polynomial>::calcFit for(label i=0; i<stencilSize; i++) { - coeffsi[i] = wts[i]*svd.VSinvUt()[0][i]; + coeffsi[i] = wts[0]*wts[i]*svd.VSinvUt()[0][i]; if (mag(coeffsi[i]) > maxCoeff) { maxCoeff = mag(coeffsi[i]); @@ -213,10 +223,20 @@ void Foam::FitData<FitDataType, ExtendedStencil, Polynomial>::calcFit } } - goodFit = - (mag(coeffsi[0] - wLin) < linearLimitFactor_*wLin) - && (mag(coeffsi[1] - (1 - wLin)) < linearLimitFactor_*(1 - wLin)) - && maxCoeffi <= 1; + if (linearCorrection_) + { + goodFit = + (mag(coeffsi[0] - wLin) < linearLimitFactor_*wLin) + && (mag(coeffsi[1] - (1 - wLin)) < linearLimitFactor_*(1 - wLin)) + && maxCoeffi <= 1; + } + else + { + // Upwind: weight on face is 1. + goodFit = + (mag(coeffsi[0] - 1.0) < linearLimitFactor_*1.0) + && maxCoeffi <= 1; + } // if (goodFit && iIt > 0) // { @@ -229,7 +249,8 @@ void Foam::FitData<FitDataType, ExtendedStencil, Polynomial>::calcFit // << " sing vals " << svd.S() << endl; // } - if (!goodFit) // (not good fit so increase weight in the centre) + if (!goodFit) // (not good fit so increase weight in the centre and weight + // for constant and linear terms) { // if (iIt == 7) // { @@ -237,26 +258,46 @@ void Foam::FitData<FitDataType, ExtendedStencil, Polynomial>::calcFit // ( // "FitData<Polynomial>::calcFit" // "(const List<point>& C, const label facei" - // ) << "Cannot fit face " << facei + // ) << "Cannot fit face " << facei << " iteration " << iIt + // << " with sum of weights " << sum(coeffsi) << nl + // << " Weights " << coeffsi << nl + // << " Linear weights " << wLin << " " << 1 - wLin << nl // << " sing vals " << svd.S() << endl; // } wts[0] *= 10; - wts[1] *= 10; + if (linearCorrection_) + { + wts[1] *= 10; + } for(label j = 0; j < B.m(); j++) { B[0][j] *= 10; B[1][j] *= 10; } + + for(label i = 0; i < B.n(); i++) + { + B[i][0] *= 10; + B[i][1] *= 10; + } } } if (goodFit) { - // Remove the uncorrected linear ocefficients - coeffsi[0] -= wLin; - coeffsi[1] -= 1 - wLin; + if (linearCorrection_) + { + // Remove the uncorrected linear coefficients + coeffsi[0] -= wLin; + coeffsi[1] -= 1 - wLin; + } + else + { + // Remove the uncorrected upwind coefficients + coeffsi[0] -= 1.0; + } } else { diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.H index b151a7520414268d270a2ad46f48b32fcdfcc76e..cb7bd9ceae5197bfc15cf7cbf7b6c49d03701755 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.H @@ -26,7 +26,11 @@ Class Foam::FitData Description - Data for the upwinded and centred polynomial fit interpolation schemes + Data for the upwinded and centred polynomial fit interpolation schemes. + The linearCorrection_ determines whether the fit is for a corrected + linear scheme (first two coefficients are corrections for owner and + neighbour) or a pure upwind scheme (first coefficient is correction for + owner ; weight on face taken as 1). SourceFiles FitData.C @@ -58,7 +62,11 @@ class FitData //- The stencil the fit is based on const ExtendedStencil& stencil_; - //- Factor the fit is allowed to deviate from linear. + //- Is scheme correction on linear (true) or on upwind (false) + const bool linearCorrection_; + + //- Factor the fit is allowed to deviate from the base scheme + // (linear or pure upwind) // This limits the amount of high-order correction and increases // stability on bad meshes const scalar linearLimitFactor_; @@ -84,11 +92,6 @@ class FitData const label faci ); - //- Calculate the fit for the all the mesh faces - // and set the coefficients - // virtual void calcFit(); - - public: //TypeName("FitData"); @@ -101,6 +104,7 @@ public: ( const fvMesh& mesh, const ExtendedStencil& stencil, + const bool linearCorrection, const scalar linearLimitFactor, const scalar centralWeight ); @@ -119,12 +123,18 @@ public: return stencil_; } + bool linearCorrection() const + { + return linearCorrection_; + } + //- Calculate the fit for the specified face and set the coefficients void calcFit ( scalarList& coeffsi, // coefficients to be set const List<point>&, // Stencil points - const scalar wLin, // Linear weight + const scalar wLin, // Weight for linear approximation (weights + // nearest neighbours) const label faci // Current face index ); @@ -132,7 +142,7 @@ public: virtual void calcFit() = 0; - //- Delete the data when the mesh moves not implemented + //- Recalculate weights (but not stencil) when the mesh moves bool movePoints(); }; diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/PureUpwindFitScheme/PureUpwindFitScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/PureUpwindFitScheme/PureUpwindFitScheme.H new file mode 100644 index 0000000000000000000000000000000000000000..6b0b792f9a2bd766d432b7bcbb8d788f2e073dfa --- /dev/null +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/PureUpwindFitScheme/PureUpwindFitScheme.H @@ -0,0 +1,186 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::PureUpwindFitScheme + +Description + Upwind biased fit surface interpolation scheme that applies an explicit + correction to upwind. + +\*---------------------------------------------------------------------------*/ + +#ifndef PureUpwindFitScheme_H +#define PureUpwindFitScheme_H + +#include "UpwindFitData.H" +#include "upwind.H" +#include "Switch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class PureUpwindFitScheme Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type, class Polynomial, class Stencil> +class PureUpwindFitScheme +: + public upwind<Type> +{ + // Private Data + + //- Factor the fit is allowed to deviate from linear. + // This limits the amount of high-order correction and increases + // stability on bad meshes + const scalar linearLimitFactor_; + + //- Weights for central stencil + const scalar centralWeight_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + PureUpwindFitScheme(const PureUpwindFitScheme&); + + //- Disallow default bitwise assignment + void operator=(const PureUpwindFitScheme&); + + +public: + + //- Runtime type information + TypeName("PureUpwindFitScheme"); + + + // Constructors + + //- Construct from mesh and Istream + // The name of the flux field is read from the Istream and looked-up + // from the mesh objectRegistry + PureUpwindFitScheme(const fvMesh& mesh, Istream& is) + : + upwind<Type> + ( + mesh, + mesh.lookupObject<surfaceScalarField>(word(is)) + ), + linearLimitFactor_(readScalar(is)), + centralWeight_(1000) + {} + + + //- Construct from mesh, faceFlux and Istream + PureUpwindFitScheme + ( + const fvMesh& mesh, + const surfaceScalarField& faceFlux, + Istream& is + ) + : + upwind<Type>(mesh, faceFlux), + linearLimitFactor_(readScalar(is)), + centralWeight_(1000) + {} + + + // Member Functions + + //- Return true if this scheme uses an explicit correction + virtual bool corrected() const + { + return true; + } + + //- Return the explicit correction to the face-interpolate + virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > + correction + ( + const GeometricField<Type, fvPatchField, volMesh>& vf + ) const + { + const fvMesh& mesh = this->mesh(); + + // Use the owner/neighbour splitting constructor + const extendedUpwindCellToFaceStencil& stencil = Stencil::New(mesh); + + const UpwindFitData<Polynomial>& ufd = + UpwindFitData<Polynomial>::New + ( + mesh, + stencil, + false, //offset to upwind + linearLimitFactor_, + centralWeight_ + ); + + const List<scalarList>& fo = ufd.owncoeffs(); + const List<scalarList>& fn = ufd.neicoeffs(); + + return stencil.weightedSum(this->faceFlux_, vf, fo, fn); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Add the patch constructor functions to the hash tables + +#define makePureUpwindFitSurfaceInterpolationTypeScheme(SS, POLYNOMIAL, STENCIL, TYPE) \ + \ +typedef PureUpwindFitScheme<TYPE, POLYNOMIAL, STENCIL> \ + PureUpwindFitScheme##TYPE##POLYNOMIAL##STENCIL##_; \ +defineTemplateTypeNameAndDebugWithName \ + (PureUpwindFitScheme##TYPE##POLYNOMIAL##STENCIL##_, #SS, 0); \ + \ +surfaceInterpolationScheme<TYPE>::addMeshConstructorToTable \ +<PureUpwindFitScheme<TYPE, POLYNOMIAL, STENCIL> > \ + add##SS##STENCIL##TYPE##MeshConstructorToTable_; \ + \ +surfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable \ +<PureUpwindFitScheme<TYPE, POLYNOMIAL, STENCIL> > \ + add##SS##STENCIL##TYPE##MeshFluxConstructorToTable_; + +#define makePureUpwindFitSurfaceInterpolationScheme(SS, POLYNOMIAL, STENCIL) \ + \ +makePureUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,scalar) \ +makePureUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,vector) \ +makePureUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,sphericalTensor) \ +makePureUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,symmTensor) \ +makePureUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,tensor) + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C index 6f0ea20e1b1063e70ccaf04568ca6b4181d3e5cf..cd7a206ba50048779468aaf50a9b350e0c4a910a 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C @@ -29,7 +29,7 @@ License #include "volFields.H" #include "SVD.H" #include "syncTools.H" -#include "extendedUpwindStencil.H" +#include "extendedUpwindCellToFaceStencil.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -37,14 +37,20 @@ template<class Polynomial> Foam::UpwindFitData<Polynomial>::UpwindFitData ( const fvMesh& mesh, - const extendedUpwindStencil& stencil, + const extendedUpwindCellToFaceStencil& stencil, + const bool linearCorrection, const scalar linearLimitFactor, const scalar centralWeight ) : - FitData<UpwindFitData<Polynomial>, extendedUpwindStencil, Polynomial> + FitData + < + UpwindFitData<Polynomial>, + extendedUpwindCellToFaceStencil, + Polynomial + > ( - mesh, stencil, linearLimitFactor, centralWeight + mesh, stencil, linearCorrection, linearLimitFactor, centralWeight ), owncoeffs_(mesh.nFaces()), neicoeffs_(mesh.nFaces()) @@ -72,40 +78,103 @@ void Foam::UpwindFitData<Polynomial>::calcFit() { const fvMesh& mesh = this->mesh(); + const surfaceScalarField& w = mesh.surfaceInterpolation::weights(); + const surfaceScalarField::GeometricBoundaryField& bw = w.boundaryField(); + + // Owner stencil weights + // ~~~~~~~~~~~~~~~~~~~~~ + // Get the cell/face centres in stencil order. - // Upwind face stencils no good for triangles or tets. - // Need bigger stencils - List<List<point> > ownStencilPoints(mesh.nFaces()); + List<List<point> > stencilPoints(mesh.nFaces()); this->stencil().collectData ( this->stencil().ownMap(), this->stencil().ownStencil(), mesh.C(), - ownStencilPoints + stencilPoints ); - List<List<point> > neiStencilPoints(mesh.nFaces()); + + // find the fit coefficients for every owner + + //Pout<< "-- Owner --" << endl; + for(label facei = 0; facei < mesh.nInternalFaces(); facei++) + { + FitData + < + UpwindFitData<Polynomial>, + extendedUpwindCellToFaceStencil, + Polynomial + >::calcFit(owncoeffs_[facei], stencilPoints[facei], w[facei], facei); + + //Pout<< " facei:" << facei + // << " at:" << mesh.faceCentres()[facei] << endl; + //forAll(owncoeffs_[facei], i) + //{ + // Pout<< " point:" << stencilPoints[facei][i] + // << "\tweight:" << owncoeffs_[facei][i] + // << endl; + //} + } + + forAll(bw, patchi) + { + const fvsPatchScalarField& pw = bw[patchi]; + + if (pw.coupled()) + { + label facei = pw.patch().patch().start(); + + forAll(pw, i) + { + FitData + < + UpwindFitData<Polynomial>, + extendedUpwindCellToFaceStencil, + Polynomial + >::calcFit + ( + owncoeffs_[facei], stencilPoints[facei], pw[i], facei + ); + facei++; + } + } + } + + + // Neighbour stencil weights + // ~~~~~~~~~~~~~~~~~~~~~~~~~ + + // Note:reuse stencilPoints since is major storage this->stencil().collectData ( this->stencil().neiMap(), this->stencil().neiStencil(), mesh.C(), - neiStencilPoints + stencilPoints ); - // find the fit coefficients for every owner and neighbour of ever face - - const surfaceScalarField& w = mesh.surfaceInterpolation::weights(); + // find the fit coefficients for every neighbour + //Pout<< "-- Neighbour --" << endl; for(label facei = 0; facei < mesh.nInternalFaces(); facei++) { - FitData<UpwindFitData<Polynomial>, extendedUpwindStencil, Polynomial>:: - calcFit(owncoeffs_[facei], ownStencilPoints[facei], w[facei], facei); - FitData<UpwindFitData<Polynomial>, extendedUpwindStencil, Polynomial>:: - calcFit(neicoeffs_[facei], neiStencilPoints[facei], w[facei], facei); + FitData + < + UpwindFitData<Polynomial>, + extendedUpwindCellToFaceStencil, + Polynomial + >::calcFit(neicoeffs_[facei], stencilPoints[facei], w[facei], facei); + + //Pout<< " facei:" << facei + // << " at:" << mesh.faceCentres()[facei] << endl; + //forAll(neicoeffs_[facei], i) + //{ + // Pout<< " point:" << stencilPoints[facei][i] + // << "\tweight:" << neicoeffs_[facei][i] + // << endl; + //} } - const surfaceScalarField::GeometricBoundaryField& bw = w.boundaryField(); - forAll(bw, patchi) { const fvsPatchScalarField& pw = bw[patchi]; @@ -118,17 +187,12 @@ void Foam::UpwindFitData<Polynomial>::calcFit() { FitData < - UpwindFitData<Polynomial>, extendedUpwindStencil, Polynomial - >::calcFit - ( - owncoeffs_[facei], ownStencilPoints[facei], pw[i], facei - ); - FitData - < - UpwindFitData<Polynomial>, extendedUpwindStencil, Polynomial + UpwindFitData<Polynomial>, + extendedUpwindCellToFaceStencil, + Polynomial >::calcFit ( - neicoeffs_[facei], neiStencilPoints[facei], pw[i], facei + neicoeffs_[facei], stencilPoints[facei], pw[i], facei ); facei++; } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.H index de0636c4d393a6f21e1bc3f39e18c890434bf951..a62a3002c3242d6d6bbccf67a61bf6caf89d71b8 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.H @@ -27,7 +27,9 @@ Class Description Data for the quadratic fit correction interpolation scheme to be used with - upwind biased stencil + upwind biased stencil. + - linearCorrection = true : fit calculated for corrected linear scheme + - linearCorrection = false : fit calculated for corrected upwind scheme SourceFiles UpwindFitData.C @@ -44,7 +46,7 @@ SourceFiles namespace Foam { -class extendedUpwindStencil; +class extendedUpwindCellToFaceStencil; /*---------------------------------------------------------------------------*\ Class UpwindFitData Declaration @@ -53,7 +55,12 @@ class extendedUpwindStencil; template<class Polynomial> class UpwindFitData : - public FitData<UpwindFitData<Polynomial>, extendedUpwindStencil, Polynomial> + public FitData + < + UpwindFitData<Polynomial>, + extendedUpwindCellToFaceStencil, + Polynomial + > { // Private data @@ -84,7 +91,8 @@ public: UpwindFitData ( const fvMesh& mesh, - const extendedUpwindStencil& stencil, + const extendedUpwindCellToFaceStencil& stencil, + const bool linearCorrection, const scalar linearLimitFactor, const scalar centralWeight ); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitScheme.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitScheme.H index 30444aafa4bb8e11ca10eb21e3911bab51457fb7..46fe3fe1ba08aa66c7fbd4c95ae2af94cbd9fe5c 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitScheme.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitScheme.H @@ -126,9 +126,10 @@ public: { const fvMesh& mesh = this->mesh(); - const extendedUpwindStencil& stencil = Stencil::New + const extendedUpwindCellToFaceStencil& stencil = Stencil::New ( mesh, + false, //pureUpwind scalar(0.5) ); @@ -137,6 +138,7 @@ public: ( mesh, stencil, + true, //calculate as offset to linear linearLimitFactor_, centralWeight_ ); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/biLinearFit/biLinearFit.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/biLinearFit/biLinearFit.C index 0ff394ff82a14c68ebba0a74bb271c76ae1d6cbb..b80d70f065b92a17fc2d44ded85177ded497efef 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/biLinearFit/biLinearFit.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/biLinearFit/biLinearFit.C @@ -26,7 +26,7 @@ License #include "CentredFitScheme.H" #include "biLinearFitPolynomial.H" -#include "centredCFCStencilObject.H" +#include "centredCFCCellToFaceStencilObject.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -42,7 +42,7 @@ namespace Foam ( biLinearFit, biLinearFitPolynomial, - centredCFCStencilObject + centredCFCCellToFaceStencilObject ); } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cubicUpwindFit/cubicUpwindFit.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cubicUpwindFit/cubicUpwindFit.C index 02b3a332f00659186a0172f2f326efb5e9f77832..7d588649ebaa8bef927ee3b86da860612ca4001c 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cubicUpwindFit/cubicUpwindFit.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cubicUpwindFit/cubicUpwindFit.C @@ -26,7 +26,7 @@ License #include "UpwindFitScheme.H" #include "cubicUpwindFitPolynomial.H" -#include "upwindCFCStencilObject.H" +#include "upwindCFCCellToFaceStencilObject.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -42,7 +42,7 @@ namespace Foam ( cubicUpwindFit, cubicUpwindFitPolynomial, - upwindCFCStencilObject + upwindCFCCellToFaceStencilObject ); } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearFit/linearFit.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearFit/linearFit.C index 6362a7b7ae0b83de0c43640f37a21332bc298675..71a64fd14061b7dd21c4ffad31fc1af501b511e3 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearFit/linearFit.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearFit/linearFit.C @@ -26,7 +26,7 @@ License #include "CentredFitScheme.H" #include "linearFitPolynomial.H" -#include "centredCFCStencilObject.H" +#include "centredCFCCellToFaceStencilObject.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -42,7 +42,7 @@ namespace Foam ( linearFit, linearFitPolynomial, - centredCFCStencilObject + centredCFCCellToFaceStencilObject ); } diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelHeatTransferModels.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearPureUpwindFit/linearPureUpwindFit.C similarity index 75% rename from src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelHeatTransferModels.C rename to src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearPureUpwindFit/linearPureUpwindFit.C index 73bf380c82cd1618bf3dbd9b19661018cdbf4f65..28aa8e7434b919bb8089e6d56431ee35b948a167 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelHeatTransferModels.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearPureUpwindFit/linearPureUpwindFit.C @@ -24,29 +24,26 @@ License \*---------------------------------------------------------------------------*/ -#include "basicReactingParcel.H" -#include "ThermoCloud.H" -#include "NoHeatTransfer.H" -#include "RanzMarshall.H" +#include "PureUpwindFitScheme.H" +#include "linearFitPolynomial.H" +#include "pureUpwindCFCCellToFaceStencilObject.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - makeHeatTransferModel(ThermoCloud<basicReactingParcel>); - - // Add instances of heat transfer model to the table - makeHeatTransferModelType + defineTemplateTypeNameAndDebug ( - NoHeatTransfer, - ThermoCloud, - basicReactingParcel + UpwindFitData<linearFitPolynomial>, + 0 ); - makeHeatTransferModelType + + makePureUpwindFitSurfaceInterpolationScheme ( - RanzMarshall, - ThermoCloud, - basicReactingParcel + linearPureUpwindFit, + linearFitPolynomial, + pureUpwindCFCCellToFaceStencilObject ); -}; - +} // ************************************************************************* // diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticFit/quadraticFit.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticFit/quadraticFit.C index 7d84fd4887d9d5724767645a43c6eb9c6ddd3869..296de91b76375027aa638c9d5d3132d5fcb1980e 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticFit/quadraticFit.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticFit/quadraticFit.C @@ -26,7 +26,7 @@ License #include "CentredFitScheme.H" #include "quadraticFitPolynomial.H" -#include "centredCFCStencilObject.H" +#include "centredCFCCellToFaceStencilObject.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -42,7 +42,7 @@ namespace Foam ( quadraticFit, quadraticFitPolynomial, - centredCFCStencilObject + centredCFCCellToFaceStencilObject ); } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearFit/quadraticLinearFit.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearFit/quadraticLinearFit.C index 8660cae93ad9df8dc05872a1f401d476b256a111..8c0911f4add5784b5991fcd9341794f6e8f842e5 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearFit/quadraticLinearFit.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearFit/quadraticLinearFit.C @@ -26,7 +26,7 @@ License #include "CentredFitScheme.H" #include "quadraticLinearFitPolynomial.H" -#include "centredCFCStencilObject.H" +#include "centredCFCCellToFaceStencilObject.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -42,7 +42,7 @@ namespace Foam ( quadraticLinearFit, quadraticLinearFitPolynomial, - centredCFCStencilObject + centredCFCCellToFaceStencilObject ); } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearPureUpwindFit/quadraticLinearPureUpwindFit.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearPureUpwindFit/quadraticLinearPureUpwindFit.C new file mode 100644 index 0000000000000000000000000000000000000000..513de347d75624f42be5b7ec6785d5e2246b4250 --- /dev/null +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearPureUpwindFit/quadraticLinearPureUpwindFit.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "PureUpwindFitScheme.H" +#include "quadraticLinearUpwindFitPolynomial.H" +#include "upwindCFCCellToFaceStencilObject.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + // Use stencil with three upwind cells: + // upwindCFCCellToFaceStencilObject + pureUpwind + makePureUpwindFitSurfaceInterpolationScheme + ( + quadraticLinearPureUpwindFit, + quadraticLinearUpwindFitPolynomial, + upwindCFCCellToFaceStencilObject + ); +} + +// ************************************************************************* // diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearUpwindFit/quadraticLinearUpwindFit.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearUpwindFit/quadraticLinearUpwindFit.C index ca0da7d9da0d322c13daec461006f8917e36c81d..d89107ab71e3fec4f73dbe8f0717cb4c65336e31 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearUpwindFit/quadraticLinearUpwindFit.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearUpwindFit/quadraticLinearUpwindFit.C @@ -26,7 +26,7 @@ License #include "UpwindFitScheme.H" #include "quadraticLinearUpwindFitPolynomial.H" -#include "upwindCFCStencilObject.H" +#include "upwindFECCellToFaceStencilObject.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -42,7 +42,7 @@ namespace Foam ( quadraticLinearUpwindFit, quadraticLinearUpwindFitPolynomial, - upwindCFCStencilObject + upwindFECCellToFaceStencilObject ); } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwindFit/quadraticUpwindFit.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwindFit/quadraticUpwindFit.C index e0e003906e603e2bc071679d5a68c0a1661a18a4..88ccc2971b887431b049c0261f95f8658a0a8a7b 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwindFit/quadraticUpwindFit.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwindFit/quadraticUpwindFit.C @@ -26,7 +26,7 @@ License #include "UpwindFitScheme.H" #include "quadraticUpwindFitPolynomial.H" -#include "upwindFECStencilObject.H" +#include "upwindFECCellToFaceStencilObject.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -42,7 +42,7 @@ namespace Foam ( quadraticUpwindFit, quadraticUpwindFitPolynomial, - upwindFECStencilObject + upwindFECCellToFaceStencilObject ); } diff --git a/src/lagrangian/Allwmake b/src/lagrangian/Allwmake index fea6fce12eba69648412f36c4a6130a52037f001..92993c516ff3740ae22dd506cb43316d2f77ef19 100755 --- a/src/lagrangian/Allwmake +++ b/src/lagrangian/Allwmake @@ -7,6 +7,7 @@ wmake libso solidParticle wmake libso intermediate wmake libso dieselSpray wmake libso dsmc +wmake libso coalCombustion molecularDynamics/Allwmake diff --git a/src/lagrangian/basic/Cloud/Cloud.C b/src/lagrangian/basic/Cloud/Cloud.C index e18e0e3b533e0722e82246da6b594b6955229892..72e1b1f81824bc0ec1e1774d9e50ad051bbc4e61 100644 --- a/src/lagrangian/basic/Cloud/Cloud.C +++ b/src/lagrangian/basic/Cloud/Cloud.C @@ -30,6 +30,7 @@ License #include "PstreamCombineReduceOps.H" #include "mapPolyMesh.H" #include "Time.H" +#include "OFstream.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -48,8 +49,7 @@ Foam::Cloud<ParticleType>::Cloud cellFaces_(pMesh.cells()), allFaceCentres_(pMesh.faceCentres()), owner_(pMesh.faceOwner()), - neighbour_(pMesh.faceNeighbour()), - meshInfo_(polyMesh_) + neighbour_(pMesh.faceNeighbour()) {} @@ -69,8 +69,7 @@ Foam::Cloud<ParticleType>::Cloud cellFaces_(pMesh.cells()), allFaceCentres_(pMesh.faceCentres()), owner_(pMesh.faceOwner()), - neighbour_(pMesh.faceNeighbour()), - meshInfo_(polyMesh_) + neighbour_(pMesh.faceNeighbour()) {} @@ -322,6 +321,25 @@ void Foam::Cloud<ParticleType>::autoMap(const mapPolyMesh& mapper) } +template<class ParticleType> +void Foam::Cloud<ParticleType>::writePositions() const +{ + OFstream pObj + ( + this->db().time().path()/this->name() + "_positions.obj" + ); + + forAllConstIter(typename Cloud<ParticleType>, *this, pIter) + { + const ParticleType& p = pIter(); + pObj<< "v " << p.position().x() << " " << p.position().y() << " " + << p.position().z() << nl; + } + + pObj.flush(); +} + + // * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * // #include "CloudIO.C" diff --git a/src/lagrangian/basic/Cloud/Cloud.H b/src/lagrangian/basic/Cloud/Cloud.H index 684ceb979e34419053fc8b3eb51b4f3eabf8f91a..f0ca222d91021d7e69846ed0cb9e05ff92bfa3af 100644 --- a/src/lagrangian/basic/Cloud/Cloud.H +++ b/src/lagrangian/basic/Cloud/Cloud.H @@ -39,14 +39,14 @@ SourceFiles #include "cloud.H" #include "IDLList.H" #include "IOField.H" - -#include "polyMeshInfo.H" +#include "polyMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { +// Forward declaration of functions template<class ParticleType> class Cloud; @@ -68,7 +68,6 @@ class Cloud public cloud, public IDLList<ParticleType> { - // Private data const polyMesh& polyMesh_; @@ -79,9 +78,6 @@ class Cloud const unallocLabelList& owner_; const unallocLabelList& neighbour_; - //- Mesh information object - const polyMeshInfo meshInfo_; - // Private member functions @@ -173,55 +169,52 @@ public: return polyMesh_.boundaryMesh()[patchi].whichFace(facei); } - //- Return reference to the mesh information object - const polyMeshInfo& meshInfo() const - { - return meshInfo_; - } - label size() const { return IDLList<ParticleType>::size(); }; - const const_iterator begin() const - { - return IDLList<ParticleType>::begin(); - }; - const const_iterator cbegin() const - { - return IDLList<ParticleType>::cbegin(); - }; + // Iterators - const const_iterator end() const - { - return IDLList<ParticleType>::end(); - }; + const const_iterator begin() const + { + return IDLList<ParticleType>::begin(); + }; - const const_iterator cend() const - { - return IDLList<ParticleType>::cend(); - }; + const const_iterator cbegin() const + { + return IDLList<ParticleType>::cbegin(); + }; - iterator begin() - { - return IDLList<ParticleType>::begin(); - }; + const const_iterator end() const + { + return IDLList<ParticleType>::end(); + }; + + const const_iterator cend() const + { + return IDLList<ParticleType>::cend(); + }; + + iterator begin() + { + return IDLList<ParticleType>::begin(); + }; + + iterator end() + { + return IDLList<ParticleType>::end(); + }; - iterator end() - { - return IDLList<ParticleType>::end(); - }; + + // Edit void clear() { return IDLList<ParticleType>::clear(); }; - - // Edit - //- Transfer particle to cloud void addParticle(ParticleType* pPtr); @@ -273,6 +266,9 @@ public: IOstream::compressionType cmp ) const; + //- Write positions to <cloudName>_positions.obj file + void writePositions() const; + // Ostream Operator diff --git a/src/lagrangian/basic/Cloud/CloudIO.C b/src/lagrangian/basic/Cloud/CloudIO.C index 9b58c12ea52a35cd01305547b74f69c4af502b3f..42c1a9317a2a8d2d46930fe3245f840f8bb051c1 100644 --- a/src/lagrangian/basic/Cloud/CloudIO.C +++ b/src/lagrangian/basic/Cloud/CloudIO.C @@ -72,8 +72,7 @@ Foam::Cloud<ParticleType>::Cloud cellFaces_(pMesh.cells()), allFaceCentres_(pMesh.faceCentres()), owner_(pMesh.faceOwner()), - neighbour_(pMesh.faceNeighbour()), - meshInfo_(polyMesh_) + neighbour_(pMesh.faceNeighbour()) { initCloud(checkClass); } @@ -94,8 +93,7 @@ Foam::Cloud<ParticleType>::Cloud cellFaces_(pMesh.cells()), allFaceCentres_(pMesh.faceCentres()), owner_(pMesh.faceOwner()), - neighbour_(pMesh.faceNeighbour()), - meshInfo_(polyMesh_) + neighbour_(pMesh.faceNeighbour()) { initCloud(checkClass); } diff --git a/src/lagrangian/basic/Make/files b/src/lagrangian/basic/Make/files index 629d47f47474d5fb80694d454f6936706ad6980a..969b966f1a12385a48c57405a7d8a5861a0759eb 100644 --- a/src/lagrangian/basic/Make/files +++ b/src/lagrangian/basic/Make/files @@ -6,6 +6,4 @@ indexedParticle = indexedParticle $(passiveParticle)/passiveParticleCloud.C $(indexedParticle)/indexedParticleCloud.C -polyMeshInfo/polyMeshInfo.C - LIB = $(FOAM_LIBBIN)/liblagrangian 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/basic/polyMeshInfo/polyMeshInfo.C b/src/lagrangian/basic/polyMeshInfo/polyMeshInfo.C deleted file mode 100644 index 16b347ccbe3b0415344c6d426cef63b2feb563df..0000000000000000000000000000000000000000 --- a/src/lagrangian/basic/polyMeshInfo/polyMeshInfo.C +++ /dev/null @@ -1,325 +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 "polyMeshInfo.H" -#include "wedgePolyPatch.H" -#include "symmetryPolyPatch.H" -#include "emptyPolyPatch.H" -#include "mathematicalConstants.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(polyMeshInfo, 0); -} - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void Foam::polyMeshInfo::setCentrePoint() -{ - boundBox bounds = mesh_.bounds(); - - centrePoint_ = 0.5*(bounds.max() + bounds.min()); -} - - -void Foam::polyMeshInfo::setEmptyComponent(const vector& dir) -{ - for (direction cmpt=0; cmpt<vector::nComponents; cmpt++) - { - if (dir[cmpt] > 1.0e-6) - { - emptyComponent_ = cmpt; - } - } -} - - -void Foam::polyMeshInfo::queryWedge() -{ - label patchId[4]; - - bool symmPlaneExists = false; - - forAll(mesh_.boundaryMesh(), patchi) - { - const polyPatch& patch = mesh_.boundaryMesh()[patchi]; - if (isA<wedgePolyPatch>(patch)) - { - if (patch.size()) - { - nWedge_++; - if (nWedge_ > 4) - { - break; - } - patchId[nWedge_-1] = patchi; - } - } - else if (isA<symmetryPolyPatch>(patch)) - { - symmPlaneExists = true; - } - } - - if (nWedge_ != 0 && nWedge_ != 2 && nWedge_ != 4) - { - FatalErrorIn("void polyMeshInfo::queryWedge() const") - << "Number of wedge patches " << nWedge_ << " is incorrect, " - "should be 0, 2 or 4" - << exit(FatalError); - } - else - { - if (symmPlaneExists) - { - wedgeAngle_ = mathematicalConstant::pi; - } - else - { - if (nWedge_) - { - if (nWedge_ > 2) - { - WarningIn("void polyMeshInfo::queryWedge() const") - << "Only configured for cases with 2 wedges. " - << "Lagrangian calculations may result in errors" - << endl; - } - // Get the vector normal to wedge patch1 - const wedgePolyPatch& patch1 = refCast<const wedgePolyPatch> - (mesh_.boundaryMesh()[patchId[0]]); - vector n1 = patch1.patchNormal(); - - // Get the vector normal to wedge patch2 - const wedgePolyPatch& patch2 = refCast<const wedgePolyPatch> - (mesh_.boundaryMesh()[patchId[1]]); - vector n2 = patch2.patchNormal(); - - // Calculate the angle swept between the patches - const scalar arcCos = (n1 & n2)/mag(n1); - wedgeAngle_ = mathematicalConstant::pi - acos(arcCos); - - // Get the centre normal - centreNormal_ = patch1.centreNormal(); - - // Get the wedge axis - wedgeAxis_ = patch1.axis(); - } - } - } -} - - -void Foam::polyMeshInfo::queryDirections() -{ - vector dirVec = vector::zero; - - forAll(mesh_.boundaryMesh(), patchi) - { - if (isA<emptyPolyPatch>(mesh_.boundaryMesh()[patchi])) - { - if (mesh_.boundaryMesh()[patchi].size()) - { - nEmpty_++; - dirVec += - sum(cmptMag(mesh_.boundaryMesh()[patchi].faceAreas())); - } - } - } - - - for (direction cmpt=0; cmpt<vector::nComponents; cmpt++) - { - directions_[cmpt] = 1; - } - - if (nEmpty_) - { - reduce(dirVec, sumOp<vector>()); - - dirVec /= mag(dirVec); - - for (direction cmpt=0; cmpt<vector::nComponents; cmpt++) - { - if (dirVec[cmpt] > 1.0e-6) - { - directions_[cmpt] = -1; - emptyComponent_ = cmpt; - } - else - { - directions_[cmpt] = 1; - } - } - - // Set the patch normal - centreNormal_ = dirVec; - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::polyMeshInfo::polyMeshInfo -( - const polyMesh& mesh -) -: - mesh_(mesh), - nGeometricD_(0), - nSolutionD_(0), - centreNormal_(vector::zero), - emptyComponent_(0), - centrePoint_(vector::zero), - nEmpty_(0), - nWedge_(0), - wedgeAxis_(vector::zero), - wedgeAngle_(0) -{ - setCentrePoint(); - - queryWedge(); - - queryDirections(); - - nSolutionD_ = cmptSum(directions_ + Vector<label>::one)/2; - - nGeometricD_ = nSolutionD_ - nWedge_/2; - - if (nGeometricD_ == 2) - { - setEmptyComponent(centreNormal_); - } -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::polyMeshInfo::~polyMeshInfo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -Foam::label Foam::polyMeshInfo::nGeometricD() const -{ - return nGeometricD_; -} - - -Foam::label Foam::polyMeshInfo::nSolutionD() const -{ - return nSolutionD_; -} - - -bool Foam::polyMeshInfo::caseIs2dWedge() const -{ - return (nWedge_ > 0); -} - - -bool Foam::polyMeshInfo::caseIs2dSlab() const -{ - return (nEmpty_ > 0); -} - - -bool Foam::polyMeshInfo::caseIs2d() const -{ - return (nGeometricD_ == 2); -} - - -bool Foam::polyMeshInfo::caseIs3d() const -{ - return (nGeometricD_ == 3); -} - - -Foam::vector Foam::polyMeshInfo::wedgeAxis() const -{ - if (nWedge_) - { - return wedgeAxis_; - } - else - { - WarningIn("Foam::polyMeshInfo::wedgeAxis()") - << "wedgeAxis() requested, but case is not of wedge type. " - << "Returning zero vector" << endl; - return vector::zero; - } -} - - -Foam::scalar Foam::polyMeshInfo::wedgeAngle() const -{ - if (nWedge_) - { - return wedgeAngle_; - } - else - { - WarningIn("Foam::polyMeshInfo::wedgeAngle()") - << "wedgeAngle() requested, but case is not of wedge type. " - << "Returning zero" << endl; - return 0.0; - } -} - - -Foam::vector Foam::polyMeshInfo::centreNormal() const -{ - if (nGeometricD_ == 2) - { - return centreNormal_; - } - else - { - WarningIn("Foam::polyMeshInfo::centreNormal()") - << "centreNormal() requested, but case is not 2-D. " - << "Returning zero vector" << endl; - return vector::zero; - } -} - - -Foam::label Foam::polyMeshInfo::emptyComponent() const -{ - return emptyComponent_; -} - - -Foam::vector Foam::polyMeshInfo::centrePoint() const -{ - return centrePoint_; -} - - -// ************************************************************************* // diff --git a/src/lagrangian/basic/polyMeshInfo/polyMeshInfo.H b/src/lagrangian/basic/polyMeshInfo/polyMeshInfo.H deleted file mode 100644 index c047afac1845c381d1c569981e511baf47be4d35..0000000000000000000000000000000000000000 --- a/src/lagrangian/basic/polyMeshInfo/polyMeshInfo.H +++ /dev/null @@ -1,176 +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 - -Class - Foam::polyMeshInfo - -Description - - -SourceFiles - polyMeshInfo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef polyMeshInfo_H -#define polyMeshInfo_H - -#include "polyMesh.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class polyMeshInfo Declaration -\*---------------------------------------------------------------------------*/ - -class polyMeshInfo -{ - - // Private data - - //- Reference to the mesh - const polyMesh& mesh_; - - //- Vector of valid directions in mesh - // defined according to the presence of empty patches - mutable Vector<label> directions_; - - //- Number of number of valid geoemtric dimensions in the mesh - label nGeometricD_; - - //- Number of number of valid solution dimensions in the mesh - // For wedge cases this includes the circumferential direction - // in case of swirl - label nSolutionD_; - - //- Plane normal to the wedge patches, or between empty patches - // for slab 2-D cases - vector centreNormal_; - - //- Empty/unused component for 2-D cases - label emptyComponent_; - - //- Geometric centre point - vector centrePoint_; - - //- Number of empty patches - label nEmpty_; - - //- Number of wedge patches - label nWedge_; - - //- Axis of wedge - vector wedgeAxis_; - - //- Angle of wedge - scalar wedgeAngle_; - - - // Private member functions - - //- Set the value of the mesh centre point - void setCentrePoint(); - - //- Determine wedge information - void queryWedge(); - - //- Determine mesh directions - void queryDirections(); - - -public: - - //- Runtime type information - TypeName("polyMeshInfo"); - - // Constructors - - //- Construct from components - polyMeshInfo - ( - const polyMesh& mesh - ); - - - // Destructors - - virtual ~polyMeshInfo(); - - - // Member functions - - //- Access - - //- Return the number of valid geoemtric dimensions in the mesh - label nGeometricD() const; - - //- Return the number of valid solution dimensions in the mesh - label nSolutionD() const; - - //- Flag to indicate whether case is a 2-D wedge - bool caseIs2dWedge() const; - - //- Flag to indicate whether case is a 2-D slab - bool caseIs2dSlab() const; - - //- Flag to indicate whether case is 2-D - bool caseIs2d() const; - - //- Flag to indicate whether case is 3-D - bool caseIs3d() const; - - //- Return axis of wedge - vector wedgeAxis() const; - - //- Return angle of wedge - scalar wedgeAngle() const; - - //- Return the centre normal - vector centreNormal() const; - - //- Return empty component - label emptyComponent() const; - - //- Return centre point - vector centrePoint() const; - - //- Set the empty component direction based on normal vector dir - void setEmptyComponent(const vector& dir); - -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // - diff --git a/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.C b/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.C new file mode 100644 index 0000000000000000000000000000000000000000..873b82d170ba37b1d33beb485a46533b3266a9f2 --- /dev/null +++ b/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.C @@ -0,0 +1,70 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +\*---------------------------------------------------------------------------*/ + +#include "CoalCloud.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class ThermoType> +Foam::CoalCloud<ThermoType>::CoalCloud +( + const word& cloudName, + const volScalarField& rho, + const volVectorField& U, + const dimensionedVector& g, + hCombustionThermo& thermo +) +: + ReactingMultiphaseCloud<CoalParcel<ThermoType> > + ( + cloudName, + rho, + U, + g, + thermo + ) +{ + CoalParcel<ThermoType>::readFields(*this); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class ThermoType> +Foam::CoalCloud<ThermoType>::~CoalCloud() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class ThermoType> +void Foam::CoalCloud<ThermoType>::writeFields() const +{ + CoalParcel<ThermoType>::writeFields(*this); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/basicReactingCloud/basicReactingCloud.H b/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.H similarity index 74% rename from src/lagrangian/intermediate/clouds/derived/basicReactingCloud/basicReactingCloud.H rename to src/lagrangian/coalCombustion/CoalCloud/CoalCloud.H index e95a8674326135f073f87c7c05969b35cb16827c..91a0289f0ffe3439d1f0900f7da70d073e2c96e1 100644 --- a/src/lagrangian/intermediate/clouds/derived/basicReactingCloud/basicReactingCloud.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-2009 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 - Foam::basicReactingCloud + CoalCloud Description SourceFiles - basicReactingCloud.C + CoalCloud.C \*---------------------------------------------------------------------------*/ -#ifndef basicReactingCloud_H -#define basicReactingCloud_H +#ifndef CoalCloud_H +#define CoalCloud_H -#include "ReactingCloud.H" -#include "basicReactingParcel.H" +#include "ReactingMultiphaseCloud.H" +#include "CoalParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,46 +44,44 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class basicReactingCloud Declaration + Class CoalCloud Declaration \*---------------------------------------------------------------------------*/ -class basicReactingCloud +template<class ThermoType> +class CoalCloud : - public ReactingCloud<basicReactingParcel> + public ReactingMultiphaseCloud<CoalParcel<ThermoType> > { - // Private Member Functions //- Disallow default bitwise copy construct - basicReactingCloud(const basicReactingCloud&); + CoalCloud(const CoalCloud&); //- Disallow default bitwise assignment - void operator=(const basicReactingCloud&); + void operator=(const CoalCloud&); public: - //- Runtime type information - TypeName("basicReactingCloud"); + //-Runtime type information + TypeName("CoalCloud"); // Constructors //- Construct given carrier gas fields - basicReactingCloud + CoalCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - hCombustionThermo& thermo, - PtrList<specieReactingProperties>& gases + hCombustionThermo& thermo ); //- Destructor - - ~basicReactingCloud(); + ~CoalCloud(); // Member Functions @@ -99,6 +97,12 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository + #include "CoalCloud.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/CoalCloud/defineCoalCloud.C b/src/lagrangian/coalCombustion/CoalCloud/defineCoalCloud.C new file mode 100644 index 0000000000000000000000000000000000000000..cc0fa34f49fd096cc4b831c19fdaaec8fab3abde --- /dev/null +++ b/src/lagrangian/coalCombustion/CoalCloud/defineCoalCloud.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 "CoalCloud.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + createReactingCloudType(CoalCloud); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.C b/src/lagrangian/coalCombustion/CoalParcel/CoalParcel.C similarity index 66% rename from src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.C rename to src/lagrangian/coalCombustion/CoalParcel/CoalParcel.C index 31176eb5a40b515424e6055772b1a09d7d4bf8ac..53a9f3ac63461372f31361e80c7c6a3bb0228c6a 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.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-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,68 +24,75 @@ License \*---------------------------------------------------------------------------*/ -#include "basicReactingParcel.H" +#include "CoalParcel.H" -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(basicReactingParcel, 0); - defineParticleTypeNameAndDebug(basicReactingParcel, 0); - defineParcelTypeNameAndDebug(basicReactingParcel, 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::basicReactingParcel::basicReactingParcel +template<class ThermoType> +Foam::CoalParcel<ThermoType>::CoalParcel ( - ReactingCloud<basicReactingParcel>& owner, - const label typeId, + ReactingMultiphaseCloud<CoalParcel<ThermoType> >& owner, const vector& position, - const label celli, + const label cellI, + const label typeId, + const scalar nParticle0, const scalar d0, const vector& U0, - const scalar nParticle0, + const scalarField& YMixture0, const scalarField& YGas0, const scalarField& YLiquid0, const scalarField& YSolid0, - const scalarField& YMixture0, - const constantProperties& constProps + const typename + ReactingMultiphaseParcel<CoalParcel<ThermoType> >:: + constantProperties& constProps ) : - ReactingParcel<basicReactingParcel> + ReactingMultiphaseParcel<CoalParcel<ThermoType> > ( owner, - typeId, position, - celli, + cellI, + typeId, + nParticle0, d0, U0, - nParticle0, + YMixture0, YGas0, YLiquid0, YSolid0, - YMixture0, constProps ) {} -Foam::basicReactingParcel::basicReactingParcel +template<class ThermoType> +Foam::CoalParcel<ThermoType>::CoalParcel ( - const Cloud<basicReactingParcel>& cloud, + const Cloud<CoalParcel<ThermoType> >& cloud, Istream& is, bool readFields ) : - ReactingParcel<basicReactingParcel>(cloud, is, readFields) + ReactingMultiphaseParcel<CoalParcel<ThermoType> >(cloud, is, readFields) {} // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // -Foam::basicReactingParcel::~basicReactingParcel() +template<class ThermoType> +Foam::CoalParcel<ThermoType>::~CoalParcel() {} diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H b/src/lagrangian/coalCombustion/CoalParcel/CoalParcel.H similarity index 61% rename from src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H rename to src/lagrangian/coalCombustion/CoalParcel/CoalParcel.H index d4e9b93437a1a3cf5f00a5f90137362a44b88d81..a23e96bb852fcc7b85c38f49f054db309b001f87 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.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-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,92 +23,107 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::basicReactingParcel + CoalParcel Description SourceFiles - basicReactingParcel.C - basicReactingParcelIO.C + CoalParcel.C + CoalParcelIO.C \*---------------------------------------------------------------------------*/ -#ifndef basicReactingParcel_H -#define basicReactingParcel_H +#ifndef CoalParcel_H +#define CoalParcel_H -#include "ReactingParcel.H" +#include "ReactingMultiphaseParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { +// Forward declaration of classes +template<class ThermoType> +class CoalParcel; + /*---------------------------------------------------------------------------*\ - Class basicReactingParcel Declaration + Class CoalParcel Declaration \*---------------------------------------------------------------------------*/ -class basicReactingParcel +template<class ThermoType> +class CoalParcel : - public ReactingParcel<basicReactingParcel> + public ReactingMultiphaseParcel<CoalParcel<ThermoType> > { - public: - //- Run-time type information - TypeName("basicReactingParcel"); + //- The type of thermodynamics this parcel was instantiated for + typedef ThermoType thermoType; + + // Run-time type information + 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 - basicReactingParcel + CoalParcel ( - ReactingCloud<basicReactingParcel>& owner, - const label typeId, + ReactingMultiphaseCloud<CoalParcel>& owner, const vector& position, - const label celli, + const label cellI, + const label typeId, + const scalar nParticle0, const scalar d0, const vector& U0, - const scalar nParticle0, + const scalarField& YMixture0, const scalarField& YGas0, const scalarField& YLiquid0, const scalarField& YSolid0, - const scalarField& YMixture0, - const constantProperties& constProps + const typename + ReactingMultiphaseParcel<CoalParcel>:: + constantProperties& constProps ); //- Construct from Istream - basicReactingParcel + CoalParcel ( - const Cloud<basicReactingParcel>& c, + const Cloud<CoalParcel>& c, Istream& is, bool readFields = true ); //- Construct and return a clone - autoPtr<basicReactingParcel> clone() const + autoPtr<CoalParcel> clone() const { - return autoPtr<basicReactingParcel> - (new basicReactingParcel(*this)); + return autoPtr<CoalParcel>(new CoalParcel(*this)); } - // Destructors - - virtual ~basicReactingParcel(); + //- Destructor + virtual ~CoalParcel(); }; -template<> -inline bool contiguous<basicReactingParcel>() -{ - 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/defineCoalParcel.C b/src/lagrangian/coalCombustion/CoalParcel/defineCoalParcel.C new file mode 100644 index 0000000000000000000000000000000000000000..f5071d60305ef366ef1ceebebf789281fbf9eae9 --- /dev/null +++ b/src/lagrangian/coalCombustion/CoalParcel/defineCoalParcel.C @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +\*---------------------------------------------------------------------------*/ + +#include "createCoalParcelTypes.H" +#include "CoalParcel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + createCoalParcelType(CoalParcel); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/CoalParcel/makeCoalParcelSubmodels.C b/src/lagrangian/coalCombustion/CoalParcel/makeCoalParcelSubmodels.C new file mode 100644 index 0000000000000000000000000000000000000000..1f6787228821a18226b28111b721621691bc6bb6 --- /dev/null +++ b/src/lagrangian/coalCombustion/CoalParcel/makeCoalParcelSubmodels.C @@ -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 + +\*---------------------------------------------------------------------------*/ + +#include "CoalParcel.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 +{ + // 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 new file mode 100755 index 0000000000000000000000000000000000000000..2c7aac61ab97d66fe76fab863c8186c643d3beba --- /dev/null +++ b/src/lagrangian/coalCombustion/Make/files @@ -0,0 +1,8 @@ +/* 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/Make/options b/src/lagrangian/coalCombustion/Make/options new file mode 100755 index 0000000000000000000000000000000000000000..21dc5327f121a8c8b4fb4f85df2feff75b232bce --- /dev/null +++ b/src/lagrangian/coalCombustion/Make/options @@ -0,0 +1,35 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/lagrangian/intermediate/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/combustion/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude + +LIB_LIBS = \ + -lfiniteVolume \ + -lmeshTools \ + -llagrangian \ + -llagrangianIntermediate \ + -lpdf \ + -lspecie \ + -lbasicThermophysicalModels \ + -lliquids \ + -lliquidMixture \ + -lsolids \ + -lsolidMixture \ + -lcombustionThermophysicalModels \ + -lcompressibleRASModels \ + -lcompressibleLESModels 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 new file mode 100644 index 0000000000000000000000000000000000000000..6c44dc9da86e5cbe7ad406dc5799cfa32b07e361 --- /dev/null +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C @@ -0,0 +1,151 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "COxidationDiffusionLimitedRate.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::COxidationDiffusionLimitedRate<CloudType>::COxidationDiffusionLimitedRate +( + const dictionary& dict, + CloudType& owner +) +: + SurfaceReactionModel<CloudType>(dict, owner, typeName), + Sb_(dimensionedScalar(this->coeffDict().lookup("Sb")).value()), + D_(dimensionedScalar(this->coeffDict().lookup("D")).value()), + CsLocalId_(-1), + O2GlobalId_(owner.composition().globalCarrierId("O2")), + CO2GlobalId_(owner.composition().globalCarrierId("CO2")), + WC_(0.0), + WO2_(0.0), + HcCO2_(0.0) +{ + // Determine Cs ids + label idSolid = owner.composition().idSolid(); + 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(); + + if (Sb_ < 0) + { + FatalErrorIn + ( + "COxidationDiffusionLimitedRate<CloudType>" + "(" + "const dictionary&, " + "CloudType&" + ")" + ) << "Stoichiometry of reaction, Sb, must be greater than zero" << nl + << exit(FatalError); + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::COxidationDiffusionLimitedRate<CloudType>:: +~COxidationDiffusionLimitedRate() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +bool Foam::COxidationDiffusionLimitedRate<CloudType>::active() const +{ + return true; +} + + +template<class CloudType> +Foam::scalar Foam::COxidationDiffusionLimitedRate<CloudType>::calculate +( + const scalar dt, + const label cellI, + const scalar d, + const scalar T, + const scalar Tc, + const scalar pc, + const scalar rhoc, + const scalar mass, + const scalarField& YGas, + const scalarField& YLiquid, + const scalarField& YSolid, + const scalarField& YMixture, + const scalarField& dMassVolatile, + scalarField& dMassGas, + scalarField& dMassLiquid, + scalarField& dMassSolid, + scalarField& dMassSRCarrier +) const +{ + // Fraction of remaining combustible material + const label idSolid = CloudType::parcelType::SLD; + const scalar fComb = YMixture[idSolid]*YSolid[CsLocalId_]; + + // Surface combustion active combustible fraction is consumed + if (fComb < SMALL) + { + return 0.0; + } + + // Local mass fraction of O2 in the carrier phase + const scalar YO2 = + this->owner().carrierThermo().composition().Y(O2GlobalId_)[cellI]; + + // Change in C mass [kg] + scalar dmC = + 4.0*mathematicalConstant::pi*d*D_*YO2*Tc*rhoc/(Sb_*(T + Tc))*dt; + + // Limit mass transfer by availability of C + dmC = min(mass*fComb, dmC); + + // Change in O2 mass [kg] + const scalar dmO2 = dmC/WC_*Sb_*WO2_; + + // Mass of newly created CO2 [kg] + const scalar dmCO2 = dmC + dmO2; + + // Update local particle C mass + dMassSolid[CsLocalId_] += dmC; + + // Update carrier O2 and CO2 mass + dMassSRCarrier[O2GlobalId_] -= dmO2; + dMassSRCarrier[CO2GlobalId_] += dmCO2; + + // Heat of reaction [J] + return -HcCO2_*dmCO2; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H new file mode 100644 index 0000000000000000000000000000000000000000..9ab6a5c0f940450b350f8100b6217c387ecc5afe --- /dev/null +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H @@ -0,0 +1,157 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + COxidationDiffusionLimitedRate + +Description + Diffusion limited rate surface reaction model for coal parcels. Limited to: + + C(s) + Sb*O2 -> CO2 + + where Sb is the stoichiometry of the reaction + +\*---------------------------------------------------------------------------*/ + +#ifndef COxidationDiffusionLimitedRate_H +#define COxidationDiffusionLimitedRate_H + +#include "SurfaceReactionModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Forward class declarations +template<class CloudType> +class COxidationDiffusionLimitedRate; + +namespace Foam +{ +/*---------------------------------------------------------------------------*\ + Class COxidationDiffusionLimitedRate Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class COxidationDiffusionLimitedRate +: + public SurfaceReactionModel<CloudType> +{ + // Private data + + // Model constants + + //- Stoichiometry of reaction + const scalar Sb_; + + //- Diffusion coefficient of oxidants [m2/s] + const scalar D_; + + + // Addressing + + //- Cs positions in global/local lists + label CsLocalId_; + + //- O2 position in global list + label O2GlobalId_; + + //- CO2 positions in global list + label CO2GlobalId_; + + + // Local copies of thermo properties + + //- Molecular weight of C [kg/kmol] + scalar WC_; + + //- Molecular weight of O2 [kg/kmol] + scalar WO2_; + + //- Chemical enthalpy of CO2 [J/kg] + scalar HcCO2_; + + +public: + + //- Runtime type information + TypeName("COxidationDiffusionLimitedRate"); + + + // Constructors + + //- Construct from dictionary + COxidationDiffusionLimitedRate + ( + const dictionary& dict, + CloudType& owner + ); + + + //- Destructor + virtual ~COxidationDiffusionLimitedRate(); + + + // Member Functions + + //- Flag to indicate whether model activates surface reaction model + virtual bool active() const; + + //- Update surface reactions + virtual scalar calculate + ( + const scalar dt, + const label cellI, + const scalar d, + const scalar T, + const scalar Tc, + const scalar pc, + const scalar rhoc, + const scalar mass, + const scalarField& YGas, + const scalarField& YLiquid, + const scalarField& YSolid, + const scalarField& YMixture, + const scalarField& dMassVolatile, + scalarField& dMassGas, + scalarField& dMassLiquid, + scalarField& dMassSolid, + scalarField& dMassSRCarrier + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#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 new file mode 100644 index 0000000000000000000000000000000000000000..d21efd77e8b0b612b8a4c0d8bb22d3ce41a894f9 --- /dev/null +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C @@ -0,0 +1,167 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "COxidationKineticDiffusionLimitedRate.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::COxidationKineticDiffusionLimitedRate<CloudType>:: +COxidationKineticDiffusionLimitedRate +( + const dictionary& dict, + CloudType& owner +) +: + SurfaceReactionModel<CloudType> + ( + dict, + owner, + typeName + ), + Sb_(dimensionedScalar(this->coeffDict().lookup("Sb")).value()), + C1_(dimensionedScalar(this->coeffDict().lookup("C1")).value()), + C2_(dimensionedScalar(this->coeffDict().lookup("C2")).value()), + E_(dimensionedScalar(this->coeffDict().lookup("E")).value()), + CsLocalId_(-1), + O2GlobalId_(owner.composition().globalCarrierId("O2")), + CO2GlobalId_(owner.composition().globalCarrierId("CO2")), + WC_(0.0), + WO2_(0.0), + HcCO2_(0.0) +{ + // Determine Cs ids + label idSolid = owner.composition().idSolid(); + 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(); + + if (Sb_ < 0) + { + FatalErrorIn + ( + "COxidationKineticDiffusionLimitedRate" + "(" + "const dictionary&, " + "CloudType&" + ")" + ) << "Stoichiometry of reaction, Sb, must be greater than zero" << nl + << exit(FatalError); + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::COxidationKineticDiffusionLimitedRate<CloudType>:: +~COxidationKineticDiffusionLimitedRate() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +bool Foam::COxidationKineticDiffusionLimitedRate<CloudType>::active() const +{ + return true; +} + + +template<class CloudType> +Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate +( + const scalar dt, + const label cellI, + const scalar d, + const scalar T, + const scalar Tc, + const scalar pc, + const scalar rhoc, + const scalar mass, + const scalarField& YGas, + const scalarField& YLiquid, + const scalarField& YSolid, + const scalarField& YMixture, + const scalarField& dMassVolatile, + scalarField& dMassGas, + scalarField& dMassLiquid, + scalarField& dMassSolid, + scalarField& dMassSRCarrier +) const +{ + // Fraction of remaining combustible material + const label idSolid = CloudType::parcelType::SLD; + const scalar fComb = YMixture[idSolid]*YSolid[CsLocalId_]; + + // Surface combustion active combustible fraction is consumed + if (fComb < SMALL) + { + return 0.0; + } + + // Local mass fraction of O2 in the carrier phase + const scalar YO2 = + this->owner().carrierThermo().composition().Y(O2GlobalId_)[cellI]; + + // Diffusion rate coefficient + const scalar D0 = C1_/d*pow(0.5*(T + Tc), 0.75); + + // Kinetic rate + const scalar Rk = C2_*exp(-E_/(specie::RR*Tc)); + + // Particle surface area + const scalar Ap = mathematicalConstant::pi*sqr(d); + + // Change in C mass [kg] + scalar dmC = Ap*rhoc*specie::RR*Tc*YO2/WO2_*D0*Rk/(D0 + Rk); + + // Limit mass transfer by availability of C + dmC = min(mass*fComb, dmC); + + // Change in O2 mass [kg] + const scalar dmO2 = dmC/WC_*Sb_*WO2_; + + // Mass of newly created CO2 [kg] + const scalar dmCO2 = dmC + dmO2; + + // Update local particle C mass + dMassSolid[CsLocalId_] += dmC; + + // Update carrier O2 and CO2 mass + dMassSRCarrier[O2GlobalId_] -= dmO2; + dMassSRCarrier[CO2GlobalId_] += dmCO2; + + // Heat of reaction [J] + return -HcCO2_*dmCO2; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H new file mode 100644 index 0000000000000000000000000000000000000000..6500b24c4ffd82f89501bbaf350e433ceb79ac1f --- /dev/null +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H @@ -0,0 +1,165 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + COxidationKineticDiffusionLimitedRate + +Description + Kinetic/diffusion limited rate surface reaction model for coal parcels. + Limited to: + + C(s) + Sb*O2 -> CO2 + + where Sb is the stoichiometry of the reaction + +\*---------------------------------------------------------------------------*/ + +#ifndef COxidationKineticDiffusionLimitedRate_H +#define COxidationKineticDiffusionLimitedRate_H + +#include "SurfaceReactionModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward class declarations +template<class CloudType> +class COxidationKineticDiffusionLimitedRate; + +/*---------------------------------------------------------------------------*\ + Class COxidationKineticDiffusionLimitedRate Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class COxidationKineticDiffusionLimitedRate +: + public SurfaceReactionModel<CloudType> +{ + // Private data + + // Model constants + + //- Stoichiometry of reaction + const scalar Sb_; + + //- Mass diffusion limited rate constant, C1 + const scalar C1_; + + //- Kinetics limited rate pre-exponential constant, C2 + const scalar C2_; + + //- Kinetics limited rate activation energy + const scalar E_; + + + // Addressing + + //- Cs positions in global/local lists + label CsLocalId_; + + //- O2 position in global list + label O2GlobalId_; + + //- CO2 positions in global list + label CO2GlobalId_; + + + // Local copies of thermo properties + + //- Molecular weight of C [kg/kmol] + scalar WC_; + + //- Molecular weight of O2 [kg/kmol] + scalar WO2_; + + //- Chemical enthalpy of CO2 [J/kg] + scalar HcCO2_; + + +public: + + //- Runtime type information + TypeName("COxidationKineticDiffusionLimitedRate"); + + + // Constructors + + //- Construct from dictionary + COxidationKineticDiffusionLimitedRate + ( + const dictionary& dict, + CloudType& owner + ); + + + //- Destructor + virtual ~COxidationKineticDiffusionLimitedRate(); + + + // Member Functions + + //- Flag to indicate whether model activates surface reaction model + virtual bool active() const; + + //- Update surface reactions + virtual scalar calculate + ( + const scalar dt, + const label cellI, + const scalar d, + const scalar T, + const scalar Tc, + const scalar pc, + const scalar rhoc, + const scalar mass, + const scalarField& YGas, + const scalarField& YLiquid, + const scalarField& YSolid, + const scalarField& YMixture, + const scalarField& dMassVolatile, + scalarField& dMassGas, + scalarField& dMassLiquid, + scalarField& dMassSolid, + scalarField& dMassSRCarrier + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#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 new file mode 100644 index 0000000000000000000000000000000000000000..c7c8dd795582d9ce079240f1b65bf2bc69740080 --- /dev/null +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C @@ -0,0 +1,223 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "COxidationMurphyShaddix.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template<class CloudType> +Foam::label Foam::COxidationMurphyShaddix<CloudType>::maxIters_ = 1000; + +template<class CloudType> +Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::tolerance_ = 1e-06; + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::COxidationMurphyShaddix<CloudType>::COxidationMurphyShaddix +( + const dictionary& dict, + CloudType& owner +) +: + SurfaceReactionModel<CloudType> + ( + dict, + owner, + typeName + ), + D0_(dimensionedScalar(this->coeffDict().lookup("D0")).value()), + rho0_(dimensionedScalar(this->coeffDict().lookup("rho0")).value()), + T0_(dimensionedScalar(this->coeffDict().lookup("T0")).value()), + Dn_(dimensionedScalar(this->coeffDict().lookup("Dn")).value()), + A_(dimensionedScalar(this->coeffDict().lookup("A")).value()), + E_(dimensionedScalar(this->coeffDict().lookup("E")).value()), + n_(dimensionedScalar(this->coeffDict().lookup("n")).value()), + WVol_(dimensionedScalar(this->coeffDict().lookup("WVol")).value()), + CsLocalId_(-1), + O2GlobalId_(owner.composition().globalCarrierId("O2")), + CO2GlobalId_(owner.composition().globalCarrierId("CO2")), + WC_(0.0), + WO2_(0.0) +{ + // Determine Cs ids + label idSolid = owner.composition().idSolid(); + 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_; +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::COxidationMurphyShaddix<CloudType>::~COxidationMurphyShaddix() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +bool Foam::COxidationMurphyShaddix<CloudType>::active() const +{ + return true; +} + + +template<class CloudType> +Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate +( + const scalar dt, + const label cellI, + const scalar d, + const scalar T, + const scalar Tc, + const scalar pc, + const scalar rhoc, + const scalar mass, + const scalarField& YGas, + const scalarField& YLiquid, + const scalarField& YSolid, + const scalarField& YMixture, + const scalarField& dMassVolatile, + scalarField& dMassGas, + scalarField& dMassLiquid, + scalarField& dMassSolid, + scalarField& dMassSRCarrier +) const +{ + // Fraction of remaining combustible material + const label idSolid = CloudType::parcelType::SLD; + const scalar fComb = YMixture[idSolid]*YSolid[CsLocalId_]; + + // Surface combustion until combustible fraction is consumed + if (fComb < SMALL) + { + return 0.0; + } + + // Cell carrier phase O2 species density [kg/m^3] + const scalar rhoO2 = + rhoc*this->owner().carrierThermo().composition().Y(O2GlobalId_)[cellI]; + + if (rhoO2 < SMALL) + { + return 0.0; + } + + // Particle surface area [m^2] + const scalar Ap = mathematicalConstant::pi*sqr(d); + + // Calculate diffision constant at continuous phase temperature + // and density [m^2/s] + const scalar D = D0_*(rho0_/rhoc)*pow(Tc/T0_, Dn_); + + // Far field partial pressure O2 [Pa] + const scalar ppO2 = rhoO2/WO2_*specie::RR*Tc; + + // Molar emission rate of volatiles per unit surface area + const scalar qVol = sum(dMassVolatile)/(WVol_*Ap); + + // Total molar concentration of the carrier phase [kmol/m^3] + const scalar C = pc/(specie::RR*Tc); + + if (debug) + { + Pout<< "mass = " << mass << nl + << "fComb = " << fComb << nl + << "Ap = " << Ap << nl + << "dt = " << dt << nl + << "C = " << C << nl + << endl; + } + + // Molar reaction rate per unit surface area [kmol/(m^2.s)] + scalar qCsOld = 0; + scalar qCs = 1; + + const scalar qCsLim = mass*fComb/(WC_*Ap*dt); + + if (debug) + { + Pout << "qCsLim = " << qCsLim << endl; + } + + label iter = 0; + while ((mag(qCs - qCsOld)/qCs > tolerance_) && (iter <= maxIters_)) + { + qCsOld = qCs; + const scalar PO2Surface = ppO2*exp(-(qCs + qVol)*d/(2*C*D)); + qCs = A_*exp(-E_/(specie::RR*T))*pow(PO2Surface, n_); + qCs = (100.0*qCs + iter*qCsOld)/(100.0 + iter); + qCs = min(qCs, qCsLim); + + if (debug) + { + Pout<< "iter = " << iter + << ", qCsOld = " << qCsOld + << ", qCs = " << qCs + << nl << endl; + } + + iter++; + } + + if (iter > maxIters_) + { + WarningIn + ( + "scalar Foam::COxidationMurphyShaddix<CloudType>::calculate(...)" + ) << "iter limit reached (" << maxIters_ << ")" << nl << endl; + } + + // Calculate the number of molar units reacted + scalar dOmega = qCs*Ap*dt; + + // Add to carrier phase mass transfer + dMassSRCarrier[O2GlobalId_] += -dOmega*WO2_; + dMassSRCarrier[CO2GlobalId_] += dOmega*(WC_ + WO2_); + + // 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 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 new file mode 100644 index 0000000000000000000000000000000000000000..7864fc63372bc1b34489e9bdedc49b6d402dd54a --- /dev/null +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H @@ -0,0 +1,178 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + COxidationMurphyShaddix + +Description + Limited to C(s) + O2 -> CO2 + +\*---------------------------------------------------------------------------*/ + +#ifndef COxidationMurphyShaddix_H +#define COxidationMurphyShaddix_H + +#include "SurfaceReactionModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward class declarations +template<class CloudType> +class COxidationMurphyShaddix; + +/*---------------------------------------------------------------------------*\ + Class COxidationMurphyShaddix Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class COxidationMurphyShaddix +: + public SurfaceReactionModel<CloudType> +{ + // Private data + + // Model constants + + //- Reference diffusion constant + const scalar D0_; + + //- Reference density for reference diffusion constant + const scalar rho0_; + + //- Reference temperature for reference diffusion constant + const scalar T0_; + + //- Exponent for diffusion equation + const scalar Dn_; + + //- Kinetic rate coefficient + const scalar A_; + + //- Kinetic rate activation energy + const scalar E_; + + //- Reaction order + const scalar n_; + + //- Effective molecular weight of gaseous volatiles + const scalar WVol_; + + + // Static constants + + //- Maximum number of iterations + static label maxIters_; + + //- Tolerance used in inner iterations + static scalar tolerance_; + + + // Addressing + + //- Cs positions in global/local lists + label CsLocalId_; + + //- O2 position in global list + label O2GlobalId_; + + //- CO2 positions in global list + label CO2GlobalId_; + + + // Local copies of thermo properties + + //- Molecular weight of C [kg/kmol] + scalar WC_; + + //- Molecular weight of O2 [kg/kmol] + scalar WO2_; + + +public: + + //- Runtime type information + TypeName("COxidationMurphyShaddix"); + + + // Constructors + + //- Construct from dictionary + COxidationMurphyShaddix + ( + const dictionary& dict, + CloudType& owner + ); + + + //- Destructor + virtual ~COxidationMurphyShaddix(); + + + // Member Functions + + //- Flag to indicate whether model activates surface reaction model + virtual bool active() const; + + //- Update surface reactions + virtual scalar calculate + ( + const scalar dt, + const label cellI, + const scalar d, + const scalar T, + const scalar Tc, + const scalar pc, + const scalar rhoc, + const scalar mass, + const scalarField& YGas, + const scalarField& YLiquid, + const scalarField& YSolid, + const scalarField& YMixture, + const scalarField& dMassVolatile, + scalarField& dMassGas, + scalarField& dMassLiquid, + scalarField& dMassSolid, + scalarField& dMassSRCarrier + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "COxidationMurphyShaddix.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/injector/swirlInjector/swirlInjector.C b/src/lagrangian/dieselSpray/injector/swirlInjector/swirlInjector.C index 7f7b7a6119d6846393c77009dd7946afa2f97f29..2d9fa9bf7c0bae992d97bb7d131d43c9bd712f54 100644 --- a/src/lagrangian/dieselSpray/injector/swirlInjector/swirlInjector.C +++ b/src/lagrangian/dieselSpray/injector/swirlInjector/swirlInjector.C @@ -30,24 +30,22 @@ License #include "mathematicalConstants.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + namespace Foam { - -defineTypeNameAndDebug(swirlInjector, 0); - -addToRunTimeSelectionTable -( - injectorType, - swirlInjector, - dictionary -); + defineTypeNameAndDebug(swirlInjector, 0); + + addToRunTimeSelectionTable + ( + injectorType, + swirlInjector, + dictionary + ); } -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::swirlInjector::swirlInjector ( const Foam::Time& t, @@ -66,40 +64,56 @@ Foam::swirlInjector::swirlInjector X_(propsDict_.lookup("X")), massFlowRateProfile_(propsDict_.lookup("massFlowRateProfile")), injectionPressureProfile_(propsDict_.lookup("injectionPressureProfile")), - velocityProfile_(injectionPressureProfile_), - CdProfile_(injectionPressureProfile_), - TProfile_(injectionPressureProfile_), + velocityProfile_(massFlowRateProfile_), + CdProfile_(massFlowRateProfile_), + TProfile_(massFlowRateProfile_), averageParcelMass_(mass_/nParcels_), pressureIndependentVelocity_(false) { // convert CA to real time forAll(massFlowRateProfile_, i) { - massFlowRateProfile_[i][0] = t.userTimeToTime(massFlowRateProfile_[i][0]); + massFlowRateProfile_[i][0] = + t.userTimeToTime(massFlowRateProfile_[i][0]); } forAll(injectionPressureProfile_, i) { - injectionPressureProfile_[i][0] = t.userTimeToTime(injectionPressureProfile_[i][0]); + injectionPressureProfile_[i][0] = + t.userTimeToTime(injectionPressureProfile_[i][0]); } // check if time entries match if (mag(massFlowRateProfile_[0][0]-injectionPressureProfile_[0][0]) > SMALL) { - FatalError << "swirlInjector::swirlInjector(const time& t, const dictionary dict) " << endl - << " start-times do not match for injectionPressureProfile and massFlowRateProfile." + FatalErrorIn + ( + "swirlInjector::swirlInjector(const time& t, const dictionary dict)" + ) << "Start-times do not match for " + "injectionPressureProfile and massFlowRateProfile." << abort(FatalError); } // check if time entries match - if (mag(massFlowRateProfile_[massFlowRateProfile_.size()-1][0]-injectionPressureProfile_[injectionPressureProfile_.size()-1][0]) > SMALL) + if + ( + mag + ( + massFlowRateProfile_[massFlowRateProfile_.size() - 1][0] + - injectionPressureProfile_[injectionPressureProfile_.size() - 1][0] + ) > SMALL + ) { - FatalError << "swirlInjector::swirlInjector(const time& t, const dictionary dict) " << endl - << " end-times do not match for injectionPressureProfile and massFlowRateProfile." + FatalErrorIn + ( + "swirlInjector::swirlInjector(const time& t, const dictionary dict)" + ) << "End-times do not match for " + "injectionPressureProfile and massFlowRateProfile." << abort(FatalError); } scalar integratedMFR = integrateTable(massFlowRateProfile_); - scalar integratedPressure = integrateTable(injectionPressureProfile_)/(teoi()-tsoi()); + scalar integratedPressure = + integrateTable(injectionPressureProfile_)/(teoi()-tsoi()); forAll(massFlowRateProfile_, i) { @@ -118,12 +132,13 @@ Foam::swirlInjector::swirlInjector forAll(injectionPressureProfile_, i) { // correct the pressureProfile to match the injection pressure - injectionPressureProfile_[i][1] *= injectionPressure_/integratedPressure; + injectionPressureProfile_[i][1] *= + injectionPressure_/integratedPressure; } // Normalize the direction vector direction_ /= mag(direction_); - + setTangentialVectors(); // check molar fractions @@ -135,17 +150,19 @@ Foam::swirlInjector::swirlInjector if (mag(Xsum - 1.0) > SMALL) { - Info << "Warning!!!\n swirlInjector::swirlInjector(const time& t, Istream& is)" - << "X does not add up to 1.0, correcting molar fractions." - << endl; + WarningIn + ( + "swirlInjector::swirlInjector(const time& t, const dictionary dict)" + ) << "X does not add up to 1.0, correcting molar fractions." << endl; + forAll(X_, i) { X_[i] /= Xsum; } } - } + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::swirlInjector::~swirlInjector() @@ -170,10 +187,8 @@ void Foam::swirlInjector::setTangentialVectors() tangentialInjectionVector1_ = tangent/magV; tangentialInjectionVector2_ = direction_ ^ tangentialInjectionVector1_; - } - Foam::label Foam::swirlInjector::nParcelsToInject ( const scalar time0, @@ -183,7 +198,7 @@ Foam::label Foam::swirlInjector::nParcelsToInject scalar mInj = mass_*(fractionOfInjection(time1)-fractionOfInjection(time0)); label nParcels = label(mInj/averageParcelMass_ + 0.49); - + return nParcels; } @@ -223,7 +238,7 @@ Foam::vector Foam::swirlInjector::position scalar iAngle = 2.0*mathematicalConstant::pi*rndGen.scalar01(); return - ( + ( position_ + iRadius * ( @@ -231,7 +246,7 @@ Foam::vector Foam::swirlInjector::position + tangentialInjectionVector2_*sin(iAngle) ) ); - + } return position_; @@ -266,7 +281,7 @@ Foam::scalar Foam::swirlInjector::mass { scalar mInj = mass_*(fractionOfInjection(time1)-fractionOfInjection(time0)); - // correct mass if calculation is 2D + // correct mass if calculation is 2D if (twoD) { mInj *= 0.5*angleOfWedge/mathematicalConstant::pi; @@ -280,7 +295,8 @@ Foam::scalar Foam::swirlInjector::mass() const return mass_; } -Foam::List<Foam::swirlInjector::pair> Foam::swirlInjector::massFlowRateProfile() const +Foam::List<Foam::swirlInjector::pair> +Foam::swirlInjector::massFlowRateProfile() const { return massFlowRateProfile_; } @@ -290,7 +306,8 @@ Foam::scalar Foam::swirlInjector::massFlowRate(const scalar time) const return getTableValue(massFlowRateProfile_, time); } -Foam::List<Foam::swirlInjector::pair> Foam::swirlInjector::injectionPressureProfile() const +Foam::List<Foam::swirlInjector::pair> +Foam::swirlInjector::injectionPressureProfile() const { return injectionPressureProfile_; } @@ -300,7 +317,8 @@ Foam::scalar Foam::swirlInjector::injectionPressure(const scalar time) const return getTableValue(injectionPressureProfile_, time); } -Foam::List<Foam::swirlInjector::pair> Foam::swirlInjector::velocityProfile() const +Foam::List<Foam::swirlInjector::pair> +Foam::swirlInjector::velocityProfile() const { return velocityProfile_; } @@ -309,7 +327,7 @@ Foam::scalar Foam::swirlInjector::velocity(const scalar time) const { return getTableValue(velocityProfile_, time); } - + Foam::List<Foam::swirlInjector::pair> Foam::swirlInjector::CdProfile() const { return CdProfile_; @@ -350,7 +368,6 @@ Foam::scalar Foam::swirlInjector::fractionOfInjection(const scalar time) const return integrateTable(massFlowRateProfile_, time)/mass_; } - Foam::scalar Foam::swirlInjector::injectedMass ( const scalar t @@ -372,7 +389,11 @@ void Foam::swirlInjector::correctProfiles forAll(velocityProfile_, i) { - scalar Pinj = getTableValue(injectionPressureProfile_, massFlowRateProfile_[i][0]); + scalar Pinj = getTableValue + ( + injectionPressureProfile_, + massFlowRateProfile_[i][0] + ); scalar mfr = massFlowRateProfile_[i][1]/(rho*A); scalar v = sqrt(2.0*(Pinj - referencePressure)/rho); velocityProfile_[i][1] = v; @@ -390,4 +411,5 @@ Foam::vector Foam::swirlInjector::tan2(const label n) const return tangentialInjectionVector2_; } + // ************************************************************************* // 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/IntegrationScheme/Analytical/Analytical.H b/src/lagrangian/intermediate/IntegrationScheme/Analytical/Analytical.H index 51c4aa5614cf70ccba558c2c5463f89ba4786963..aefef71c0bdf7f13809926b4f6ae595b6816372a 100644 --- a/src/lagrangian/intermediate/IntegrationScheme/Analytical/Analytical.H +++ b/src/lagrangian/intermediate/IntegrationScheme/Analytical/Analytical.H @@ -49,7 +49,6 @@ class Analytical : public IntegrationScheme<Type> { - public: //- Runtime type information @@ -59,16 +58,11 @@ public: // Constructors //- Construct from components - Analytical - ( - const word& phiName, - const dictionary& dict - ); + Analytical(const word& phiName, const dictionary& dict); //- Destructor - - virtual ~Analytical(); + virtual ~Analytical(); // Member Functions diff --git a/src/lagrangian/intermediate/IntegrationScheme/Euler/Euler.H b/src/lagrangian/intermediate/IntegrationScheme/Euler/Euler.H index 1062351c4c072c312fe30b8b891f28d58ab72267..279a80d8a79f23490a5b87744f093f2e84f35b6c 100644 --- a/src/lagrangian/intermediate/IntegrationScheme/Euler/Euler.H +++ b/src/lagrangian/intermediate/IntegrationScheme/Euler/Euler.H @@ -49,7 +49,6 @@ class Euler : public IntegrationScheme<Type> { - public: //- Runtime type information @@ -59,16 +58,11 @@ public: // Constructors //- Construct from components - Euler - ( - const word& phiName, - const dictionary& dict - ); + Euler(const word& phiName, const dictionary& dict); //- Destructor - - virtual ~Euler(); + virtual ~Euler(); // Member Functions diff --git a/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationScheme.H b/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationScheme.H index 1ecc8c593419b580bbf69b96a996b21c89bed68d..78b1dec715c074426e6363ad323c3597cee63bb8 100644 --- a/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationScheme.H +++ b/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationScheme.H @@ -110,6 +110,7 @@ public: private: + // Private data //- Name of the Integration variable @@ -152,11 +153,7 @@ public: // Constructors //- Construct from components - IntegrationScheme - ( - const word& phiName, - const dictionary& dict - ); + IntegrationScheme(const word& phiName, const dictionary& dict); // Selectors @@ -170,8 +167,7 @@ public: //- Destructor - - virtual ~IntegrationScheme(); + virtual ~IntegrationScheme(); // Member Functions diff --git a/src/lagrangian/intermediate/Make/files b/src/lagrangian/intermediate/Make/files index ab3933d123056df6031137fba97cb49f07253b93..de8bcd332129c0d94f42c8f818b3d6aa0359ea02 100644 --- a/src/lagrangian/intermediate/Make/files +++ b/src/lagrangian/intermediate/Make/files @@ -1,55 +1,85 @@ +PARCELS=parcels +BASEPARCELS=$(PARCELS)/baseClasses +DERIVEDPARCELS=$(PARCELS)/derived + +CLOUDS=clouds +BASECLOUDS=$(CLOUDS)/baseClasses +DERIVEDCLOUDS=$(CLOUDS)/derived + + /* Parcels */ -parcels/derived/basicKinematicParcel/basicKinematicParcel.C -parcels/derived/basicThermoParcel/basicThermoParcel.C -parcels/derived/basicReactingParcel/basicReactingParcel.C +$(BASEPARCELS)/reactingParcel/reactingParcel.C + /* Cloud base classes */ -clouds/baseClasses/kinematicCloud/kinematicCloud.C -clouds/baseClasses/thermoCloud/thermoCloud.C -clouds/baseClasses/reactingCloud/reactingCloud.C +$(BASECLOUDS)/kinematicCloud/kinematicCloud.C +$(BASECLOUDS)/thermoCloud/thermoCloud.C +$(BASECLOUDS)/reactingCloud/reactingCloud.C +$(BASECLOUDS)/reactingMultiphaseCloud/reactingMultiphaseCloud.C + + +/* Cloud container/injection mechanisms */ +$(DERIVEDCLOUDS)/basicKinematicCloud/basicKinematicCloud.C +$(DERIVEDCLOUDS)/basicThermoCloud/basicThermoCloud.C +$(DERIVEDCLOUDS)/BasicReactingCloud/defineBasicReactingCloud.C +$(DERIVEDCLOUDS)/BasicReactingMultiphaseCloud/defineBasicReactingMultiphaseCloud.C +$(DERIVEDCLOUDS)/BasicTrackedReactingCloud/defineBasicTrackedReactingCloud.C -/* Injection mechanisms */ -clouds/derived/basicKinematicCloud/basicKinematicCloud.C -clouds/derived/basicThermoCloud/basicThermoCloud.C -clouds/derived/basicReactingCloud/basicReactingCloud.C /* kinematic parcel sub-models */ -parcels/derived/basicKinematicParcel/defineBasicKinematicParcel.C -parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDispersionModels.C -parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDragModels.C -parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C -parcels/derived/basicKinematicParcel/makeBasicKinematicParcelHeatTransferModels.C -parcels/derived/basicKinematicParcel/makeBasicKinematicParcelWallInteractionModels.C +KINEMATICPARCEL=$(DERIVEDPARCELS)/basicKinematicParcel +$(KINEMATICPARCEL)/basicKinematicParcel.C +$(KINEMATICPARCEL)/defineBasicKinematicParcel.C +$(KINEMATICPARCEL)/makeBasicKinematicParcelSubmodels.C + /* thermo parcel sub-models */ -parcels/derived/basicThermoParcel/defineBasicThermoParcel.C -parcels/derived/basicThermoParcel/makeBasicThermoParcelDispersionModels.C -parcels/derived/basicThermoParcel/makeBasicThermoParcelDragModels.C -parcels/derived/basicThermoParcel/makeBasicThermoParcelInjectionModels.C -parcels/derived/basicThermoParcel/makeBasicThermoParcelHeatTransferModels.C -parcels/derived/basicThermoParcel/makeBasicThermoParcelWallInteractionModels.C +THERMOPARCEL=$(DERIVEDPARCELS)/basicThermoParcel +$(THERMOPARCEL)/basicThermoParcel.C +$(THERMOPARCEL)/defineBasicThermoParcel.C +$(THERMOPARCEL)/makeBasicThermoParcelSubmodels.C + /* reacting parcel sub-models */ -parcels/derived/basicReactingParcel/defineBasicReactingParcel.C -parcels/derived/basicReactingParcel/makeBasicReactingParcelCompositionModels.C -parcels/derived/basicReactingParcel/makeBasicReactingParcelDragModels.C -parcels/derived/basicReactingParcel/makeBasicReactingParcelDispersionModels.C -parcels/derived/basicReactingParcel/makeBasicReactingParcelInjectionModels.C -parcels/derived/basicReactingParcel/makeBasicReactingParcelHeatTransferModels.C -parcels/derived/basicReactingParcel/makeBasicReactingParcelMassTransferModels.C -parcels/derived/basicReactingParcel/makeBasicReactingParcelSurfaceReactionModels.C -parcels/derived/basicReactingParcel/makeBasicReactingParcelWallInteractionModels.C +REACTINGPARCEL=$(DERIVEDPARCELS)/BasicReactingParcel +$(REACTINGPARCEL)/defineBasicReactingParcel.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)/defineBasicReactingMultiphaseParcel.C +$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelSubmodels.C + /* bolt-on models */ submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C 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 -/* Data entries */ -submodels/IO/DataEntry/makeDataEntries.C +/* particle forces */ +particleForces/particleForces.C + + +/* phase properties */ +phaseProperties/phaseProperties/phaseProperties.C +phaseProperties/phaseProperties/phasePropertiesIO.C +phaseProperties/phasePropertiesList/phasePropertiesList.C LIB = $(FOAM_LIBBIN)/liblagrangianIntermediate diff --git a/src/lagrangian/intermediate/Make/options b/src/lagrangian/intermediate/Make/options index 4304ffde9f967b3b3faac828a98e9a891e623b8b..e9d4852aa052ed16afba328ec783401bef4bf61e 100644 --- a/src/lagrangian/intermediate/Make/options +++ b/src/lagrangian/intermediate/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/pdfs/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ @@ -17,6 +18,8 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude LIB_LIBS = \ + -lfiniteVolume \ + -lmeshTools \ -llagrangian \ -lpdf \ -lliquids \ @@ -27,5 +30,4 @@ LIB_LIBS = \ -lbasicThermophysicalModels \ -lcombustionThermophysicalModels \ -lcompressibleRASModels \ - -lcompressibleLESModels \ - -lfiniteVolume + -lcompressibleLESModels diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index 8a8723a5395610c4c3129b40538912abde99a244..2f96ae1418ee6d1365a2a87e2380cadefc398b70 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -25,67 +25,35 @@ License \*---------------------------------------------------------------------------*/ #include "KinematicCloud.H" -#include "DispersionModel.H" -#include "DragModel.H" -#include "InjectionModel.H" -#include "WallInteractionModel.H" #include "IntegrationScheme.H" #include "interpolation.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, - parcelTypeId_, - position, - cellId, - d, - U, - nParticles, - constProps_ - ); - - scalar continuousDt = this->db().time().deltaT().value(); - pPtr->stepFraction() = (continuousDt - lagrangianDt)/continuousDt; - - addParticle(pPtr); -} - +#include "DispersionModel.H" +#include "DragModel.H" +#include "InjectionModel.H" +#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, @@ -95,11 +63,16 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud constProps_(particleProperties_), parcelTypeId_(readLabel(particleProperties_.lookup("parcelTypeId"))), coupled_(particleProperties_.lookup("coupled")), + cellValueSourceCorrection_ + ( + particleProperties_.lookup("cellValueSourceCorrection") + ), rndGen_(label(0)), rho_(rho), U_(U), mu_(mu), g_(g), + forces_(mesh_, particleProperties_, g_.value()), interpolationSchemes_(particleProperties_.subDict("interpolationSchemes")), dispersionModel_ ( @@ -125,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 @@ -153,21 +134,7 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud false ), mesh_, - dimensionedVector("zero", dimensionSet(1, 1, -1, 0, 0), vector::zero) - ), - UCoeff_ - ( - IOobject - ( - this->name() + "UCoeff", - this->db().time().timeName(), - this->db(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh_, - dimensionedScalar("zero", dimensionSet(1, 0, -1, 0, 0), 0.0) + dimensionedVector("zero", dimMass*dimVelocity, vector::zero) ) {} @@ -181,11 +148,28 @@ 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() { UTrans_.field() = vector::zero; - UCoeff_.field() = 0.0; } @@ -227,7 +211,7 @@ void Foam::KinematicCloud<ParcelType>::evolve() if (debug) { - this->dumpParticlePositions(); + this->writePositions(); } if (coupled_) @@ -236,15 +220,17 @@ void Foam::KinematicCloud<ParcelType>::evolve() } Cloud<ParcelType>::move(td); + + this->postProcessing().post(); } template<class ParcelType> void Foam::KinematicCloud<ParcelType>::info() const { - Info<< "Cloud name: " << this->name() << nl + Info<< "Cloud: " << this->name() << nl << " Parcels added during this run = " - << returnReduce(this->injection().nParcelsAddedTotal(), sumOp<label>()) + << returnReduce(this->injection().parcelsAddedTotal(), sumOp<label>()) << nl << " Mass introduced during this run = " << returnReduce(this->injection().massInjected(), sumOp<scalar>()) @@ -252,29 +238,7 @@ void Foam::KinematicCloud<ParcelType>::info() const << " Current number of parcels = " << returnReduce(this->size(), sumOp<label>()) << nl << " Current mass in system = " - << returnReduce(massInSystem(), sumOp<scalar>()) << nl - << endl; -} - - -template<class ParcelType> -void Foam::KinematicCloud<ParcelType>::dumpParticlePositions() const -{ - OFstream pObj - ( - this->db().time().path()/"parcelPositions_" - + this->name() + "_" - + name(this->injection().nInjections()) + ".obj" - ); - - forAllConstIter(typename KinematicCloud<ParcelType>, *this, iter) - { - const ParcelType& p = iter(); - pObj<< "v " << p.position().x() << " " << p.position().y() << " " - << p.position().z() << nl; - } - - pObj.flush(); + << returnReduce(massInSystem(), sumOp<scalar>()) << nl; } diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H index d606b38c3dac1c1cea73a96f3e3a29d34cc85222..2dcd277a1db0e9d4ed53b68e1968c929d17ca130 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H @@ -51,7 +51,7 @@ SourceFiles #include "fvMesh.H" #include "volFields.H" #include "fvMatrices.H" -#include "fvm.H" +#include "particleForces.H" #include "IntegrationSchemesFwd.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,14 +87,18 @@ class KinematicCloud public Cloud<ParcelType>, public kinematicCloud { + // Private Member Functions -private: + //- Disallow default bitwise copy construct + KinematicCloud(const KinematicCloud&); - // Private data + //- Disallow default bitwise assignment + void operator=(const KinematicCloud&); + + +protected: - //- Cloud type - used to set the name of the parcel properties - // dictionary by appending "Properties" - const word cloudType_; + // Protected data //- References to the mesh and time databases const fvMesh& mesh_; @@ -108,7 +115,11 @@ private: //- Flag to indicate whether parcels are coupled to the carrier phase // i.e. whether or not to generate source terms for carrier phase - Switch coupled_; + const Switch coupled_; + + //- Flag to correct cell values with latest transfer information + // during the lagrangian timestep + const Switch cellValueSourceCorrection_; //- Random number generator - used by some injection routines Random rndGen_; @@ -132,6 +143,9 @@ private: const dimensionedVector& g_; + //- Optional particle forces + particleForces forces_; + //- Interpolation schemes dictionary dictionary interpolationSchemes_; @@ -149,9 +163,13 @@ private: 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 @@ -165,18 +183,6 @@ private: //- Momentum DimensionedField<vector, volMesh> UTrans_; - //- Coefficient for carrier phase U equation - DimensionedField<scalar, volMesh> UCoeff_; - - - // Private Member Functions - - //- Disallow default bitwise copy construct - KinematicCloud(const KinematicCloud&); - - //- Disallow default bitwise assignment - void operator=(const KinematicCloud&); - public: @@ -185,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, @@ -197,15 +203,16 @@ public: virtual ~KinematicCloud(); + //- Type of parcel the cloud was instantiated for + typedef ParcelType parcelType; + + // Member Functions // Access // References to the mesh and databases - //- Return the cloud type - inline const word& cloudType() const; - //- Return the parcel type id inline label parcelTypeId() const; @@ -215,9 +222,17 @@ public: //- Return particle properties dictionary inline const IOdictionary& particleProperties() const; + //- Return the constant properties + inline const typename ParcelType::constantProperties& + constProps() const; + + //- Return coupled flag inline const Switch coupled() const; + //- Return cell value correction flag + inline const Switch cellValueSourceCorrection() const; + //- Return refernce to the random object inline Random& rndGen(); @@ -240,35 +255,57 @@ public: inline const dimensionedVector& g() const; + //- Optional particle forces + inline const particleForces& forces() const; + + // Interpolations //- Return reference to the interpolation dictionary inline const dictionary& interpolationSchemes() const; + // Forces to include in particle motion evaluation + + //- Return reference to the gravity force flag + inline Switch forceGravity() const; + + //- Return reference to the virtual mass force flag + inline Switch forceVirtualMass() const; + + //- Return reference to the pressure gradient force flag + inline Switch forcePressureGradient() const; + + // 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 @@ -284,14 +321,8 @@ public: //- Return reference to momentum source inline DimensionedField<vector, volMesh>& UTrans(); - //- Coefficient for carrier phase U equation - inline DimensionedField<scalar, volMesh>& UCoeff(); - //- Return tmp momentum source term - fully explicit - inline tmp<DimensionedField<vector, volMesh> > SU1() const; - - //- Return tmp momentum source term - semi-implicit - inline tmp<fvVectorMatrix> SU2(volVectorField& U) const; + inline tmp<DimensionedField<vector, volMesh> > SU() const; // Check @@ -305,9 +336,6 @@ public: //- Print cloud information void info() const; - //- Dump particle positions to .obj file - void dumpParticlePositions() const; - // Fields @@ -319,18 +347,19 @@ public: // Note: for particles belonging to this cloud only inline const tmp<volScalarField> alpha() const; + //- Return the particle effective density field + // Note: for particles belonging to this cloud only + inline const tmp<volScalarField> rhoEff() const; + // 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 2b8cca12d1657de733eb7ebb1e99b50fe8a59e8c..1f48632d152a1952201bcd5479dab0f36f4421cf 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H @@ -24,14 +24,9 @@ License \*---------------------------------------------------------------------------*/ -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class ParcelType> -inline const Foam::word& Foam::KinematicCloud<ParcelType>::cloudType() const -{ - return cloudType_; -} +#include "fvmSup.H" +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class ParcelType> inline Foam::label Foam::KinematicCloud<ParcelType>::parcelTypeId() const @@ -55,6 +50,14 @@ Foam::KinematicCloud<ParcelType>::particleProperties() const } +template<class ParcelType> +inline const typename ParcelType::constantProperties& +Foam::KinematicCloud<ParcelType>::constProps() const +{ + return constProps_; +} + + template<class ParcelType> inline const Foam::Switch Foam::KinematicCloud<ParcelType>::coupled() const { @@ -62,6 +65,14 @@ inline const Foam::Switch Foam::KinematicCloud<ParcelType>::coupled() const } +template <class ParcelType> +inline const Foam::Switch +Foam::KinematicCloud<ParcelType>::cellValueSourceCorrection() const +{ + return cellValueSourceCorrection_; +} + + template<class ParcelType> inline const Foam::volScalarField& Foam::KinematicCloud<ParcelType>::rho() const @@ -91,6 +102,15 @@ Foam::KinematicCloud<ParcelType>::g() const return g_; } + +template<class ParcelType> +inline const Foam::particleForces& +Foam::KinematicCloud<ParcelType>::forces() const +{ + return forces_; +} + + template<class ParcelType> inline const Foam::dictionary& Foam::KinematicCloud<ParcelType>::interpolationSchemes() const @@ -131,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() @@ -140,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_(); } @@ -184,25 +212,17 @@ Foam::KinematicCloud<ParcelType>::UTrans() } -template<class ParcelType> -inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>& -Foam::KinematicCloud<ParcelType>::UCoeff() -{ - return UCoeff_; -} - - template<class ParcelType> inline Foam::tmp<Foam::DimensionedField<Foam::vector, Foam::volMesh> > -Foam::KinematicCloud<ParcelType>::SU1() const +Foam::KinematicCloud<ParcelType>::SU() const { - tmp<DimensionedField<vector, volMesh> > tSU1 + tmp<DimensionedField<vector, volMesh> > tSU ( new DimensionedField<vector, volMesh> ( IOobject ( - this->name() + "SU1", + this->name() + "SU", this->db().time().timeName(), this->mesh(), IOobject::NO_READ, @@ -212,34 +232,16 @@ Foam::KinematicCloud<ParcelType>::SU1() const dimensionedVector ( "zero", - dimensionSet(1, -2, -2, 0, 0), + dimDensity*dimVelocity/dimTime, vector::zero ) ) ); - vectorField& SU1 = tSU1().field(); - SU1 = UTrans_/(mesh_.V()*this->db().time().deltaT()); - - return tSU1; -} - + vectorField& SU = tSU().field(); + SU = UTrans_/(mesh_.V()*this->db().time().deltaT()); -template<class ParcelType> -inline Foam::tmp<Foam::fvVectorMatrix> -Foam::KinematicCloud<ParcelType>::SU2(volVectorField& U) const -{ - if (debug) - { - Info<< "UTrans min/max = " - << min(UTrans_) << ", " << max(UTrans_) << endl; - Info<< "UCoeff min/max = " - << min(UCoeff_) << ", " << max(UCoeff_) << endl; - } - - return UTrans_/(mesh_.V()*this->db().time().deltaT()) - - fvm::Sp(UCoeff_/mesh_.V(), U) - + UCoeff_/mesh_.V()*U; + return tSU; } @@ -261,7 +263,7 @@ Foam::KinematicCloud<ParcelType>::theta() const false ), mesh_, - dimensionedScalar("zero", dimensionSet(0, 0, 0, 0, 0), 0.0) + dimensionedScalar("zero", dimless, 0.0) ) ); @@ -274,7 +276,7 @@ Foam::KinematicCloud<ParcelType>::theta() const theta[cellI] += p.nParticle()*p.volume(); } - theta /= mesh().cellVolumes(); + theta /= mesh().V(); return ttheta; } @@ -298,7 +300,7 @@ Foam::KinematicCloud<ParcelType>::alpha() const false ), mesh_, - dimensionedScalar("zero", dimensionSet(0, 0, 0, 0, 0), 0.0) + dimensionedScalar("zero", dimless, 0.0) ) ); @@ -311,10 +313,47 @@ Foam::KinematicCloud<ParcelType>::alpha() const alpha[cellI] += p.nParticle()*p.mass(); } - alpha /= (mesh().cellVolumes()*rho_); + alpha /= (mesh().V()*rho_); return talpha; } +template<class ParcelType> +inline const Foam::tmp<Foam::volScalarField> +Foam::KinematicCloud<ParcelType>::rhoEff() const +{ + tmp<volScalarField> trhoEff + ( + new volScalarField + ( + IOobject + ( + this->name() + "RhoEff", + this->db().time().timeName(), + this->db(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh_, + dimensionedScalar("zero", dimDensity, 0.0) + ) + ); + + scalarField& rhoEff = trhoEff().internalField(); + forAllConstIter(typename KinematicCloud<ParcelType>, *this, iter) + { + const ParcelType& p = iter(); + const label cellI = p.cell(); + + rhoEff[cellI] += p.nParticle()*p.mass(); + } + + rhoEff /= mesh().V(); + + return trhoEff; +} + + // ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C index b574435cb83ac7714386f3ae9ff0da4377b19698..88d5e8a877222a2f938217a77aca595255e8d5b4 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C @@ -25,43 +25,37 @@ License \*---------------------------------------------------------------------------*/ #include "ReactingCloud.H" + #include "CompositionModel.H" -#include "MassTransferModel.H" -#include "SurfaceReactionModel.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, - this->parcelTypeId(), - position, - cellId, - d, - U, - nParticles, - composition().YGas0(), - composition().YLiquid0(), - composition().YSolid0(), - 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); + } } @@ -70,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>& gases + hCombustionThermo& thermo ) : - ThermoCloud<ParcelType>(cloudType, rho, U, g, thermo), + ThermoCloud<ParcelType>(cloudName, rho, U, g, thermo), reactingCloud(), constProps_(this->particleProperties()), carrierThermo_(thermo), - gases_(gases), + carrierSpecies_(thermo.composition().Y().size()), compositionModel_ ( CompositionModel<ReactingCloud<ParcelType> >::New @@ -91,24 +84,31 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud *this ) ), - massTransferModel_ - ( - MassTransferModel<ReactingCloud<ParcelType> >::New - ( - this->particleProperties(), - *this - ) - ), - surfaceReactionModel_ + phaseChangeModel_ ( - SurfaceReactionModel<ReactingCloud<ParcelType> >::New + PhaseChangeModel<ReactingCloud<ParcelType> >::New ( this->particleProperties(), *this ) ), - rhoTrans_(thermo.composition().Y().size()) + 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) { @@ -119,12 +119,14 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud ( IOobject ( - this->name() + "rhoTrans" + Foam::name(i), - this->db().time().timeName(), - this->db(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false + this->name() + + "rhoTrans_" + + thermo.composition().Y()[i].name(), + this->db().time().timeName(), + this->db(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false ), this->mesh(), dimensionedScalar("zero", dimMass, 0.0) @@ -143,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() { @@ -161,37 +197,37 @@ void Foam::ReactingCloud<ParcelType>::evolve() const volScalarField cp = carrierThermo_.Cp(); const volScalarField& p = carrierThermo_.p(); - autoPtr<interpolation<scalar> > rhoInterpolator = interpolation<scalar>::New + autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New ( this->interpolationSchemes(), this->rho() ); - autoPtr<interpolation<vector> > UInterpolator = interpolation<vector>::New + autoPtr<interpolation<vector> > UInterp = interpolation<vector>::New ( this->interpolationSchemes(), this->U() ); - autoPtr<interpolation<scalar> > muInterpolator = interpolation<scalar>::New + autoPtr<interpolation<scalar> > muInterp = interpolation<scalar>::New ( this->interpolationSchemes(), this->mu() ); - autoPtr<interpolation<scalar> > TInterpolator = interpolation<scalar>::New + autoPtr<interpolation<scalar> > TInterp = interpolation<scalar>::New ( this->interpolationSchemes(), T ); - autoPtr<interpolation<scalar> > cpInterpolator = interpolation<scalar>::New + autoPtr<interpolation<scalar> > cpInterp = interpolation<scalar>::New ( this->interpolationSchemes(), cp ); - autoPtr<interpolation<scalar> > pInterpolator = interpolation<scalar>::New + autoPtr<interpolation<scalar> > pInterp = interpolation<scalar>::New ( this->interpolationSchemes(), p @@ -201,12 +237,12 @@ void Foam::ReactingCloud<ParcelType>::evolve() ( *this, constProps_, - rhoInterpolator(), - UInterpolator(), - muInterpolator(), - TInterpolator(), - cpInterpolator(), - pInterpolator(), + rhoInterp(), + UInterp(), + muInterp(), + TInterp(), + cpInterp(), + pInterp(), this->g().value() ); @@ -214,7 +250,7 @@ void Foam::ReactingCloud<ParcelType>::evolve() if (debug) { - this->dumpParticlePositions(); + this->writePositions(); } if (this->coupled()) @@ -223,6 +259,25 @@ void Foam::ReactingCloud<ParcelType>::evolve() } Cloud<ParcelType>::move(td); + + this->postProcessing().post(); +} + + +template<class ParcelType> +void Foam::ReactingCloud<ParcelType>::info() const +{ + ThermoCloud<ParcelType>::info(); + + Info<< " Mass transfer phase change = " + << returnReduce(dMassPhaseChange_, sumOp<scalar>()) << nl; +} + + +template<class ParcelType> +void Foam::ReactingCloud<ParcelType>::addToMassPhaseChange(const scalar dMass) +{ + dMassPhaseChange_ += dMass; } diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H index 0e3f97320a882e0c2c0f19b6ce7eb33ef3edfcca..beeee65e6e80fe9a6040a6d7277180be4ec185d5 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H @@ -26,9 +26,11 @@ Class Foam::ReactingCloud Description - Templated base class for reactive cloud - - Adds to kinematic cloud - - Heat transfer + Templated base class for reacting cloud + + - Adds to thermodynamic cloud + - Variable composition (single phase) + - Phase change SourceFiles ReactingCloudI.H @@ -45,8 +47,6 @@ SourceFiles #include "ThermoCloud.H" #include "reactingCloud.H" -#include "ReactingCloudThermoTypes.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -58,13 +58,10 @@ template<class CloudType> class CompositionModel; template<class CloudType> -class MassTransferModel; - -template<class CloudType> -class SurfaceReactionModel; +class PhaseChangeModel; /*---------------------------------------------------------------------------*\ - Class ReactingCloud Declaration + Class ReactingCloud Declaration \*---------------------------------------------------------------------------*/ template<class ParcelType> @@ -73,8 +70,26 @@ class ReactingCloud public ThermoCloud<ParcelType>, public reactingCloud { +public: - // Private data + //- 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_; @@ -83,7 +98,8 @@ class ReactingCloud hCombustionThermo& carrierThermo_; //- Gas phase properties - PtrList<specieReactingProperties>& gases_; + PtrList<thermoType> carrierSpecies_; + // References to the cloud sub-models @@ -91,13 +107,10 @@ class ReactingCloud autoPtr<CompositionModel<ReactingCloud<ParcelType> > > compositionModel_; - //- Mass transfer model - autoPtr<MassTransferModel<ReactingCloud<ParcelType> > > - massTransferModel_; + //- Reacting phase change model + autoPtr<PhaseChangeModel<ReactingCloud<ParcelType> > > + phaseChangeModel_; - //- Surface reaction model - autoPtr<SurfaceReactionModel<ReactingCloud<ParcelType> > > - surfaceReactionModel_; // Sources @@ -105,44 +118,56 @@ class ReactingCloud PtrList<DimensionedField<scalar, volMesh> > rhoTrans_; - // Private Member Functions + // Check - //- Disallow default bitwise copy construct - ReactingCloud(const ReactingCloud&); + //- Total mass transferred to continuous phase via phase change + scalar dMassPhaseChange_; - //- Disallow default bitwise assignment - void operator=(const ReactingCloud&); + // Protected Member Functions -public: + // New parcel helper functions + + //- Check that size of a composition field is valid + void checkSuppliedComposition + ( + const scalarField& YSupplied, + const scalarField& Y, + const word& YName + ); - //- Runtime type information -// TypeName("ReactingCloud"); +public: // Constructors //- 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>& gases + hCombustionThermo& thermo ); - // Destructor + //- Destructor + virtual ~ReactingCloud(); + - virtual ~ReactingCloud(); + //- Type of parcel the cloud was instantiated for + typedef ParcelType parcelType; // Member Functions // Access + //- Return the constant properties + inline const typename ParcelType::constantProperties& + constProps() const; + //- Return const access to carrier phase thermo package inline const hCombustionThermo& carrierThermo() const; @@ -150,7 +175,7 @@ public: inline hCombustionThermo& carrierThermo(); //- Gas phase properties - inline const PtrList<specieReactingProperties>& gases() const; + inline const PtrList<thermoType>& carrierSpecies() const; // Sub-models @@ -159,13 +184,9 @@ public: inline const CompositionModel<ReactingCloud<ParcelType> >& composition() const; - //- Return reference to mass transfer model - inline const MassTransferModel<ReactingCloud<ParcelType> >& - massTransfer() const; - - //- Return reference to surface reaction model - inline const SurfaceReactionModel<ReactingCloud<ParcelType> >& - surfaceReaction() const; + //- Return reference to reacting phase change model + inline const PhaseChangeModel<ReactingCloud<ParcelType> >& + phaseChange() const; // Sources @@ -180,28 +201,32 @@ public: inline PtrList<DimensionedField<scalar, volMesh> >& rhoTrans(); - //- Return tmp mass source for field i - // Fully explicit + //- Return tmp mass source for field i - fully explicit inline tmp<DimensionedField<scalar, volMesh> > - Srho1(const label i) const; + Srho(const label i) const; //- Return tmp total mass source for carrier phase - // Fully explicit - inline tmp<DimensionedField<scalar, volMesh> > - Srho1() const; + // - fully explicit + inline tmp<DimensionedField<scalar, volMesh> > Srho() const; + + + // Check + + //- Print cloud information + void info() const; + + //- Add to cumulative phase change mass transfer + void addToMassPhaseChange(const scalar dMass); // 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 016d40d5c0d1f34064ff2e01f0240f6333f77b5e..8dbaf52bbcf81675641d903cc1be6b8e171bde5a 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H @@ -26,6 +26,14 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template<class ParcelType> +inline const typename ParcelType::constantProperties& +Foam::ReactingCloud<ParcelType>::constProps() const +{ + return constProps_; +} + + template<class ParcelType> inline const Foam::hCombustionThermo& Foam::ReactingCloud<ParcelType>::carrierThermo() const @@ -43,10 +51,10 @@ Foam::ReactingCloud<ParcelType>::carrierThermo() template<class ParcelType> -inline const Foam::PtrList<Foam::specieReactingProperties>& -Foam::ReactingCloud<ParcelType>::gases() const +inline const Foam::PtrList<typename ParcelType::thermoType>& +Foam::ReactingCloud<ParcelType>::carrierSpecies() const { - return gases_; + return carrierSpecies_; } @@ -59,18 +67,10 @@ Foam::ReactingCloud<ParcelType>::composition() const template<class ParcelType> -inline const Foam::MassTransferModel<Foam::ReactingCloud<ParcelType> >& -Foam::ReactingCloud<ParcelType>::massTransfer() const +inline const Foam::PhaseChangeModel<Foam::ReactingCloud<ParcelType> >& +Foam::ReactingCloud<ParcelType>::phaseChange() const { - return massTransferModel_; -} - - -template<class ParcelType> -inline const Foam::SurfaceReactionModel<Foam::ReactingCloud<ParcelType> >& -Foam::ReactingCloud<ParcelType>::surfaceReaction() const -{ - return surfaceReactionModel_; + return phaseChangeModel_; } @@ -92,7 +92,7 @@ Foam::ReactingCloud<ParcelType>::rhoTrans() template<class ParcelType> inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> > -Foam::ReactingCloud<ParcelType>::Srho1(const label i) const +Foam::ReactingCloud<ParcelType>::Srho(const label i) const { return rhoTrans_[i]/(this->db().time().deltaT()*this->mesh().V()); } @@ -100,7 +100,7 @@ Foam::ReactingCloud<ParcelType>::Srho1(const label i) const template<class ParcelType> inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> > -Foam::ReactingCloud<ParcelType>::Srho1() const +Foam::ReactingCloud<ParcelType>::Srho() const { tmp<DimensionedField<scalar, volMesh> > trhoTrans ( @@ -129,4 +129,5 @@ Foam::ReactingCloud<ParcelType>::Srho1() const return trhoTrans/(this->db().time().deltaT()*this->mesh().V()); } + // ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C new file mode 100644 index 0000000000000000000000000000000000000000..379f12f341d49efc5109b2298c022b6ce1e0eca7 --- /dev/null +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C @@ -0,0 +1,237 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "ReactingMultiphaseCloud.H" + +#include "DevolatilisationModel.H" +#include "SurfaceReactionModel.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class ParcelType> +Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud +( + const word& cloudName, + const volScalarField& rho, + const volVectorField& U, + const dimensionedVector& g, + hCombustionThermo& thermo +) +: + ReactingCloud<ParcelType>(cloudName, rho, U, g, thermo), + reactingMultiphaseCloud(), + constProps_(this->particleProperties()), + devolatilisationModel_ + ( + DevolatilisationModel<ReactingMultiphaseCloud<ParcelType> >::New + ( + this->particleProperties(), + *this + ) + ), + surfaceReactionModel_ + ( + SurfaceReactionModel<ReactingMultiphaseCloud<ParcelType> >::New + ( + this->particleProperties(), + *this + ) + ), + dMassDevolatilisation_(0.0) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class ParcelType> +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() +{ + ReactingCloud<ParcelType>::resetSourceTerms(); +} + + +template<class ParcelType> +void Foam::ReactingMultiphaseCloud<ParcelType>::evolve() +{ + const volScalarField& T = this->carrierThermo().T(); + const volScalarField cp = this->carrierThermo().Cp(); + const volScalarField& p = this->carrierThermo().p(); + + autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New + ( + this->interpolationSchemes(), + this->rho() + ); + + autoPtr<interpolation<vector> > UInterp = interpolation<vector>::New + ( + this->interpolationSchemes(), + this->U() + ); + + autoPtr<interpolation<scalar> > muInterp = interpolation<scalar>::New + ( + this->interpolationSchemes(), + this->mu() + ); + + autoPtr<interpolation<scalar> > TInterp = interpolation<scalar>::New + ( + this->interpolationSchemes(), + T + ); + + autoPtr<interpolation<scalar> > cpInterp = interpolation<scalar>::New + ( + this->interpolationSchemes(), + cp + ); + + autoPtr<interpolation<scalar> > pInterp = interpolation<scalar>::New + ( + this->interpolationSchemes(), + p + ); + + typename ParcelType::trackData td + ( + *this, + constProps_, + rhoInterp(), + UInterp(), + muInterp(), + TInterp(), + cpInterp(), + pInterp(), + this->g().value() + ); + + this->injection().inject(td); + + if (debug) + { + this->writePositions(); + } + + if (this->coupled()) + { + resetSourceTerms(); + } + + Cloud<ParcelType>::move(td); + + this->postProcessing().post(); +} + + +template<class ParcelType> +void Foam::ReactingMultiphaseCloud<ParcelType>::info() const +{ + ReactingCloud<ParcelType>::info(); + Info<< " Mass transfer devolatilisation = " + << returnReduce(dMassDevolatilisation_, sumOp<scalar>()) << nl; + Info<< " Mass transfer surface reaction = " + << returnReduce(dMassSurfaceReaction_, sumOp<scalar>()) << nl; +} + + +template<class ParcelType> +void Foam::ReactingMultiphaseCloud<ParcelType>::addToMassDevolatilisation +( + const scalar dMass +) +{ + dMassDevolatilisation_ += dMass; +} + + +template<class ParcelType> +void Foam::ReactingMultiphaseCloud<ParcelType>::addToMassSurfaceReaction +( + const scalar dMass +) +{ + dMassSurfaceReaction_ += dMass; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H new file mode 100644 index 0000000000000000000000000000000000000000..8a90d25ef75f17f08cf359581066866d77ea7672 --- /dev/null +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H @@ -0,0 +1,212 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::ReactingMultiphaseCloud + +Description + Templated base class for multiphase reacting cloud + + - Adds to reacting cloud + - multiphase composition + - devolatilisatsion + - surface reactions + +SourceFiles + ReactingMultiphaseCloudI.H + ReactingMultiphaseCloud.C + +\*---------------------------------------------------------------------------*/ + +#ifndef ReactingMultiphaseCloud_H +#define ReactingMultiphaseCloud_H + +#include "ReactingCloud.H" +#include "reactingMultiphaseCloud.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes + +template<class CloudType> +class DevolatilisationModel; + +template<class CloudType> +class SurfaceReactionModel; + +/*---------------------------------------------------------------------------*\ + Class ReactingMultiphaseCloud Declaration +\*---------------------------------------------------------------------------*/ + +template<class ParcelType> +class ReactingMultiphaseCloud +: + public ReactingCloud<ParcelType>, + public reactingMultiphaseCloud +{ + // 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_; + + + // References to the cloud sub-models + + //- Devolatilisation model + autoPtr + < + DevolatilisationModel<ReactingMultiphaseCloud<ParcelType> > + > + devolatilisationModel_; + + //- Surface reaction model + autoPtr + < + SurfaceReactionModel<ReactingMultiphaseCloud<ParcelType> > + > + surfaceReactionModel_; + + + // Check + + //- Total mass transferred to continuous phase via devolatilisation + scalar dMassDevolatilisation_; + + //- Total mass transferred to continuous phase via surface + // reactions + scalar dMassSurfaceReaction_; + + +public: + + // Constructors + + //- Construct given carrier gas fields + ReactingMultiphaseCloud + ( + const word& cloudName, + const volScalarField& rho, + const volVectorField& U, + const dimensionedVector& g, + hCombustionThermo& thermo + ); + + + //- Destructor + virtual ~ReactingMultiphaseCloud(); + + + //- Type of parcel the cloud was instantiated for + typedef ParcelType parcelType; + + + // Member Functions + + // Access + + //- Return the constant properties + inline const typename ParcelType::constantProperties& + constProps() const; + + + // Sub-models + + //- Return reference to devolatilisation model + inline const DevolatilisationModel + < + ReactingMultiphaseCloud<ParcelType> + >& + devolatilisation() const; + + //- Return reference to reacting surface reaction model + inline const SurfaceReactionModel + < + ReactingMultiphaseCloud<ParcelType> + >& + surfaceReaction() const; + + + // Check + + //- Print cloud information + void info() const; + + //- Add to cumulative volatilisation mass transfer + void addToMassDevolatilisation(const scalar dMass); + + //- Add to cumulative surface reaction transfer + void addToMassSurfaceReaction(const scalar dMass); + + + // Cloud evolution functions + + //- Check parcel properties + void checkParcelProperties + ( + ParcelType* pPtr, + const scalar lagrangianDt, + const bool fullyDescribed + ); + + //- Reset the spray source terms + void resetSourceTerms(); + + //- Evolve the spray (inject, move) + void evolve(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "ReactingMultiphaseCloudI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "ReactingMultiphaseCloud.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudI.H new file mode 100644 index 0000000000000000000000000000000000000000..ac0b0291501e909bcb086e6a3c835b30dee3643f --- /dev/null +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloudI.H @@ -0,0 +1,59 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class ParcelType> +inline const typename ParcelType::constantProperties& +Foam::ReactingMultiphaseCloud<ParcelType>::constProps() const +{ + return constProps_; +} + + +template<class ParcelType> +inline const Foam::DevolatilisationModel +< + Foam::ReactingMultiphaseCloud<ParcelType> +>& +Foam::ReactingMultiphaseCloud<ParcelType>::devolatilisation() const +{ + return devolatilisationModel_; +} + + +template<class ParcelType> +inline const Foam::SurfaceReactionModel +< + Foam::ReactingMultiphaseCloud<ParcelType> +>& +Foam::ReactingMultiphaseCloud<ParcelType>::surfaceReaction() const +{ + return surfaceReactionModel_; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C index 8a284024ff6ef97e8a25ea348066e40bd6b889ec..bdde1bbdfe49458f4da209d2c138fa0ee55eeec8 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C @@ -25,49 +25,17 @@ License \*---------------------------------------------------------------------------*/ #include "ThermoCloud.H" -#include "HeatTransferModel.H" - #include "interpolationCellPoint.H" #include "ThermoParcel.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, - this->parcelTypeId(), - position, - cellId, - d, - U, - nParticles, - constProps_ - ); - - scalar continuousDt = this->db().time().deltaT().value(); - pPtr->stepFraction() = (continuousDt - lagrangianDt)/continuousDt; - - addParticle(pPtr); -} - +#include "HeatTransferModel.H" // * * * * * * * * * * * * * * * * 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(), @@ -102,11 +70,11 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud ) ), radiation_(this->particleProperties().lookup("radiation")), - hTrans_ + hsTrans_ ( IOobject ( - this->name() + "hTrans", + this->name() + "hsTrans", this->db().time().timeName(), this->db(), IOobject::NO_READ, @@ -116,11 +84,11 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud this->mesh(), dimensionedScalar("zero", dimensionSet(1, 2, -2, 0, 0), 0.0) ), - hCoeff_ + hcTrans_ ( IOobject ( - this->name() + "hCoeff", + this->name() + "hcTrans", this->db().time().timeName(), this->db(), IOobject::NO_READ, @@ -128,7 +96,7 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud false ), this->mesh(), - dimensionedScalar("zero", dimensionSet(1, 2, -3, -1, 0), 0.0) + dimensionedScalar("zero", dimensionSet(1, 2, -2, 0, 0), 0.0) ) {} @@ -142,12 +110,35 @@ 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() { KinematicCloud<ParcelType>::resetSourceTerms(); - hTrans_.field() = 0.0; - hCoeff_.field() = 0.0; + hsTrans_.field() = 0.0; + hcTrans_.field() = 0.0; } @@ -157,31 +148,31 @@ void Foam::ThermoCloud<ParcelType>::evolve() const volScalarField& T = carrierThermo_.T(); const volScalarField cp = carrierThermo_.Cp(); - autoPtr<interpolation<scalar> > rhoInterpolator = interpolation<scalar>::New + autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New ( this->interpolationSchemes(), this->rho() ); - autoPtr<interpolation<vector> > UInterpolator = interpolation<vector>::New + autoPtr<interpolation<vector> > UInterp = interpolation<vector>::New ( this->interpolationSchemes(), this->U() ); - autoPtr<interpolation<scalar> > muInterpolator = interpolation<scalar>::New + autoPtr<interpolation<scalar> > muInterp = interpolation<scalar>::New ( this->interpolationSchemes(), this->mu() ); - autoPtr<interpolation<scalar> > TInterpolator = interpolation<scalar>::New + autoPtr<interpolation<scalar> > TInterp = interpolation<scalar>::New ( this->interpolationSchemes(), T ); - autoPtr<interpolation<scalar> > cpInterpolator = interpolation<scalar>::New + autoPtr<interpolation<scalar> > cpInterp = interpolation<scalar>::New ( this->interpolationSchemes(), cp @@ -191,11 +182,11 @@ void Foam::ThermoCloud<ParcelType>::evolve() ( *this, constProps_, - rhoInterpolator(), - UInterpolator(), - muInterpolator(), - TInterpolator(), - cpInterpolator(), + rhoInterp(), + UInterp(), + muInterp(), + TInterp(), + cpInterp(), this->g().value() ); @@ -203,7 +194,7 @@ void Foam::ThermoCloud<ParcelType>::evolve() if (debug) { - this->dumpParticlePositions(); + this->writePositions(); } if (this->coupled()) @@ -212,6 +203,15 @@ void Foam::ThermoCloud<ParcelType>::evolve() } Cloud<ParcelType>::move(td); + + this->postProcessing().post(); +} + + +template<class ParcelType> +void Foam::ThermoCloud<ParcelType>::info() const +{ + KinematicCloud<ParcelType>::info(); } diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H index 84603dd4ff257b173d330450dc99bcf9a5a348e7..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,8 +66,18 @@ class ThermoCloud public KinematicCloud<ParcelType>, public thermoCloud { + // Private Member Functions + + //- Disallow default bitwise copy construct + ThermoCloud(const ThermoCloud&); + + //- Disallow default bitwise assignment + void operator=(const ThermoCloud&); + + +protected: - // Private data + // Protected data //- Thermo parcel constant properties typename ParcelType::constantProperties constProps_; @@ -100,34 +110,24 @@ class ThermoCloud // Sources - //- Enthalpy transfer - DimensionedField<scalar, volMesh> hTrans_; - - //- Coefficient for carrier phase h equation - DimensionedField<scalar, volMesh> hCoeff_; - - - // Private Member Functions + //- Sensible enthalpy transfer + DimensionedField<scalar, volMesh> hsTrans_; - //- Disallow default bitwise copy construct - ThermoCloud(const ThermoCloud&); - - //- Disallow default bitwise assignment - void operator=(const ThermoCloud&); + //- Chemical enthalpy transfer + // - If solving for total enthalpy, the carrier phase enthalpy will + // receive the full enthalpy of reaction via creation of reaction + // products + DimensionedField<scalar, volMesh> hcTrans_; public: - //- Runtime type information -// TypeName("ThermoCloud"); - - // Constructors //- Construct given carrier gas fields ThermoCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, @@ -135,15 +135,22 @@ public: ); - // Destructor + //- Destructor + virtual ~ThermoCloud(); + - virtual ~ThermoCloud(); + //- Type of parcel the cloud was instantiated for + typedef ParcelType parcelType; // Member Functions // Access + //- Return the constant properties + inline const typename ParcelType::constantProperties& + constProps() const; + //- Return const access to thermo package inline const basicThermo& carrierThermo() const; @@ -174,17 +181,20 @@ public: // Enthalpy - //- Return reference to enthalpy source - inline DimensionedField<scalar, volMesh>& hTrans(); + //- Return reference to sensible enthalpy source + inline DimensionedField<scalar, volMesh>& hsTrans(); + + //- Return tmp total sensible enthalpy source term + inline tmp<DimensionedField<scalar, volMesh> > Shs() const; - //- Coefficient for carrier phase h equation - inline DimensionedField<scalar, volMesh>& hCoeff(); + //- Return reference to chemical enthalpy source + inline DimensionedField<scalar, volMesh>& hcTrans(); - //- return tmp enthalpy source term - fully explicit - inline tmp<DimensionedField<scalar, volMesh> > Sh1() const; + //- Return tmp chemical enthalpy source term + inline tmp<DimensionedField<scalar, volMesh> > Shc() const; - //- Return tmp enthalpy source term - semi-implicit - inline tmp<fvScalarMatrix> Sh2(volScalarField& h) const; + //- Return tmp total enthalpy source term + inline tmp<DimensionedField<scalar, volMesh> > Sh() const; // Radiation - overrides thermoCloud virtual abstract members @@ -199,17 +209,20 @@ public: inline tmp<volScalarField> sigmap() const; + // Check + + //- Print cloud information + void info() const; + + // 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/ThermoCloud/ThermoCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H index 94f12b85a2cb350d75b792a366b9b6077e4658ef..ee38bfd4533d18b89b1c5f7dac6188deb4fb01c7 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H @@ -28,6 +28,14 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template<class ParcelType> +inline const typename ParcelType::constantProperties& +Foam::ThermoCloud<ParcelType>::constProps() const +{ + return constProps_; +} + + template<class ParcelType> inline const Foam::basicThermo& Foam::ThermoCloud<ParcelType>::carrierThermo() const @@ -69,31 +77,65 @@ inline bool Foam::ThermoCloud<ParcelType>::radiation() const template<class ParcelType> inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>& -Foam::ThermoCloud<ParcelType>::hTrans() +Foam::ThermoCloud<ParcelType>::hsTrans() +{ + return hsTrans_; +} + + +template<class ParcelType> +inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> > +Foam::ThermoCloud<ParcelType>::Shs() const { - return hTrans_; + tmp<DimensionedField<scalar, volMesh> > tShs + ( + new DimensionedField<scalar, volMesh> + ( + IOobject + ( + this->name() + "Shs", + this->db().time().timeName(), + this->mesh(), + IOobject::NO_READ, + IOobject::AUTO_WRITE, + false + ), + this->mesh(), + dimensionedScalar + ( + "zero", + dimMass/dimLength/pow3(dimTime), + 0.0 + ) + ) + ); + + scalarField& Shs = tShs().field(); + Shs = hsTrans_/(this->mesh().V()*this->db().time().deltaT()); + + return tShs; } template<class ParcelType> inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>& -Foam::ThermoCloud<ParcelType>::hCoeff() +Foam::ThermoCloud<ParcelType>::hcTrans() { - return hCoeff_; + return hcTrans_; } template<class ParcelType> inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> > -Foam::ThermoCloud<ParcelType>::Sh1() const +Foam::ThermoCloud<ParcelType>::Shc() const { - tmp<DimensionedField<scalar, volMesh> > tSh1 + tmp<DimensionedField<scalar, volMesh> > tShc ( new DimensionedField<scalar, volMesh> ( IOobject ( - this->name() + "Sh1", + this->name() + "Shc", this->db().time().timeName(), this->mesh(), IOobject::NO_READ, @@ -110,30 +152,44 @@ Foam::ThermoCloud<ParcelType>::Sh1() const ) ); - scalarField& Sh1 = tSh1().field(); - Sh1 = hTrans_/(this->mesh().V()*this->db().time().deltaT()); + scalarField& Shc = tShc().field(); + Shc = hcTrans_/(this->mesh().V()*this->db().time().deltaT()); - return tSh1; + return tShc; } template<class ParcelType> -inline Foam::tmp<Foam::fvScalarMatrix> -Foam::ThermoCloud<ParcelType>::Sh2(volScalarField& h) const +inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> > +Foam::ThermoCloud<ParcelType>::Sh() const { - const volScalarField cp = carrierThermo_.Cp(); + tmp<DimensionedField<scalar, volMesh> > tSh + ( + new DimensionedField<scalar, volMesh> + ( + IOobject + ( + this->name() + "Sh", + this->db().time().timeName(), + this->mesh(), + IOobject::NO_READ, + IOobject::AUTO_WRITE, + false + ), + this->mesh(), + dimensionedScalar + ( + "zero", + dimMass/dimLength/pow3(dimTime), + 0.0 + ) + ) + ); - if (debug) - { - Info<< "hTrans min/max = " - << min(hTrans_) << ", " << max(hTrans_) << endl; - Info<< "hCoeff min/max = " - << min(hCoeff_) << ", " << max(hCoeff_) << endl; - } + scalarField& Sh = tSh().field(); + Sh = (hsTrans_ + hcTrans_)/(this->mesh().V()*this->db().time().deltaT()); - return hTrans_/(this->mesh().V()*this->db().time().deltaT()) - - fvm::Sp(hCoeff_/(cp*this->mesh().V()), h) - + hCoeff_/(cp*this->mesh().V())*h; + return tSh; } diff --git a/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H b/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H index 68f3a9dfdf275bdd4ce0bb8c8c81b54043e8fa09..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" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,7 +49,6 @@ namespace Foam class kinematicCloud { - // Private Member Functions //- Disallow default bitwise copy construct @@ -69,14 +69,8 @@ public: kinematicCloud(); - // Destructors - - virtual ~kinematicCloud(); - - - // Member Functions - - // Access + //- Destructor + virtual ~kinematicCloud(); }; diff --git a/src/lagrangian/intermediate/clouds/baseClasses/reactingCloud/reactingCloud.H b/src/lagrangian/intermediate/clouds/baseClasses/reactingCloud/reactingCloud.H index be585991ed6e147b70c76cbb11632400cf1eee1e..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" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,7 +49,6 @@ namespace Foam class reactingCloud { - // Private Member Functions //- Disallow default bitwise copy construct @@ -69,14 +69,8 @@ public: reactingCloud(); - // Destructors - - virtual ~reactingCloud(); - - - // Member Functions - - // Access + //- Destructor + virtual ~reactingCloud(); }; diff --git a/src/lagrangian/intermediate/clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.C new file mode 100644 index 0000000000000000000000000000000000000000..2fbe3815c949047e11488f75992d8fdf6b078289 --- /dev/null +++ b/src/lagrangian/intermediate/clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.C @@ -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 + +\*---------------------------------------------------------------------------*/ + +#include "reactingMultiphaseCloud.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(reactingMultiphaseCloud, 0); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::reactingMultiphaseCloud::reactingMultiphaseCloud() +{} + + +// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // + +Foam::reactingMultiphaseCloud::~reactingMultiphaseCloud() +{} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.H b/src/lagrangian/intermediate/clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.H new file mode 100644 index 0000000000000000000000000000000000000000..4cbe6f69177f1d826467a7629606e027d40b5db2 --- /dev/null +++ b/src/lagrangian/intermediate/clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.H @@ -0,0 +1,85 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::reactingMultiphaseCloud + +Description + Virtual abstract base class for templated reactingMultiphaseCloud + +SourceFiles + reactingMultiphaseCloud.C + +\*---------------------------------------------------------------------------*/ + +#ifndef reactingMultiphaseCloud_H +#define reactingMultiphaseCloud_H + +#include "typeInfo.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class reactingMultiphaseCloud Declaration +\*---------------------------------------------------------------------------*/ + +class reactingMultiphaseCloud +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + reactingMultiphaseCloud(const reactingMultiphaseCloud&); + + //- Disallow default bitwise assignment + void operator=(const reactingMultiphaseCloud&); + + +public: + + //- Runtime type information + TypeName("reactingMultiphaseCloud"); + + // Constructors + + //- Null constructor + reactingMultiphaseCloud(); + + + //- Destructor + virtual ~reactingMultiphaseCloud(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/baseClasses/thermoCloud/thermoCloud.H b/src/lagrangian/intermediate/clouds/baseClasses/thermoCloud/thermoCloud.H index bcab4df9fabd35b6d503456f73874e5e5ab2cd19..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 \*---------------------------------------------------------------------------*/ @@ -48,7 +49,6 @@ namespace Foam class thermoCloud { - // Private Member Functions //- Disallow default bitwise copy construct @@ -69,9 +69,8 @@ public: thermoCloud(); - // Destructors - - virtual ~thermoCloud(); + //- Destructor + virtual ~thermoCloud(); // Member Functions 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 6cd0e4d4fe453044c8d9e6366ba5410d681728f7..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>& gases + hCombustionThermo& thermo ) : - ReactingCloud<basicReactingParcel> + ReactingCloud<BasicReactingParcel<ThermoType> > ( - cloudType, + cloudName, rho, U, g, - thermo, - gases + 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 new file mode 100644 index 0000000000000000000000000000000000000000..aa3048e6663f3db16cbad66a4392a13f397ac2a6 --- /dev/null +++ b/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.H @@ -0,0 +1,113 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::BasicReactingCloud + +Description + Reacting cloud templated on the type of carrier phase thermodynamics + +SourceFiles + BasicReactingCloud.C + +\*---------------------------------------------------------------------------*/ + +#ifndef BasicReactingCloud_H +#define BasicReactingCloud_H + +#include "ReactingCloud.H" +#include "BasicReactingParcel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes +template<class ThermoType> +class BasicReactingCloud; + +/*---------------------------------------------------------------------------*\ + Class BasicReactingCloud Declaration +\*---------------------------------------------------------------------------*/ + +template<class ThermoType> +class BasicReactingCloud +: + public ReactingCloud<BasicReactingParcel<ThermoType> > +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + BasicReactingCloud(const BasicReactingCloud&); + + //- Disallow default bitwise assignment + void operator=(const BasicReactingCloud&); + + +public: + + //- Runtime type information + TypeName("BasicReactingCloud"); + + + // Constructors + + //- Construct given carrier gas fields + BasicReactingCloud + ( + const word& cloudName, + const volScalarField& rho, + const volVectorField& U, + const dimensionedVector& g, + hCombustionThermo& thermo + ); + + + //- Destructor + ~BasicReactingCloud(); + + + // Member Functions + + //- Write fields + void writeFields() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "BasicReactingCloud.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/defineBasicReactingCloud.C b/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/defineBasicReactingCloud.C new file mode 100644 index 0000000000000000000000000000000000000000..ca5b9e809062d6fac2137e44c146fe5c59beea21 --- /dev/null +++ b/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/defineBasicReactingCloud.C @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "createReactingCloudTypes.H" +#include "BasicReactingCloud.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + createReactingCloudType(BasicReactingCloud); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.C new file mode 100644 index 0000000000000000000000000000000000000000..07cb83587ecd620b23e26fb2d874afdbf7a66ee2 --- /dev/null +++ b/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.C @@ -0,0 +1,72 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "BasicReactingMultiphaseCloud.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class ThermoType> +Foam::BasicReactingMultiphaseCloud<ThermoType>::BasicReactingMultiphaseCloud +( + const word& cloudName, + const volScalarField& rho, + const volVectorField& U, + const dimensionedVector& g, + hCombustionThermo& thermo, + PtrList<ThermoType>& carrierSpecies +) +: + ReactingMultiphaseCloud<BasicReactingMultiphaseParcel<ThermoType> > + ( + cloudName, + rho, + U, + g, + thermo, + carrierSpecies + ) +{ + BasicReactingMultiphaseParcel<ThermoType>::readFields(*this); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class ThermoType> +Foam::BasicReactingMultiphaseCloud<ThermoType>::~BasicReactingMultiphaseCloud() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class ThermoType> +void Foam::BasicReactingMultiphaseCloud<ThermoType>::writeFields() const +{ + BasicReactingMultiphaseParcel<ThermoType>::writeFields(*this); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.H b/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.H new file mode 100644 index 0000000000000000000000000000000000000000..7b093c529c03d7e2c9c8871b493cc93ae46f3293 --- /dev/null +++ b/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.H @@ -0,0 +1,114 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::BasicReactingMultiphaseCloud + +Description + Reacting multiphase cloud templated on the type of carrier phase thermodynamics + +SourceFiles + BasicReactingMultiphaseCloud.C + +\*---------------------------------------------------------------------------*/ + +#ifndef BasicReactingMultiphaseCloud_H +#define BasicReactingMultiphaseCloud_H + +#include "ReactingMultiphaseCloud.H" +#include "BasicReactingMultiphaseParcel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes +template<class ThermoType> +class BasicReactingMultiphaseCloud; + +/*---------------------------------------------------------------------------*\ + Class BasicReactingMultiphaseCloud Declaration +\*---------------------------------------------------------------------------*/ + +template<class ThermoType> +class BasicReactingMultiphaseCloud +: + public ReactingMultiphaseCloud<BasicReactingMultiphaseParcel<ThermoType> > +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + BasicReactingMultiphaseCloud(const BasicReactingMultiphaseCloud&); + + //- Disallow default bitwise assignment + void operator=(const BasicReactingMultiphaseCloud&); + + +public: + + //- Runtime type information + TypeName("BasicReactingMultiphaseCloud"); + + + // Constructors + + //- Construct given carrier gas fields + BasicReactingMultiphaseCloud + ( + const word& cloudName, + const volScalarField& rho, + const volVectorField& U, + const dimensionedVector& g, + hCombustionThermo& thermo, + PtrList<ThermoType>& carrierSpecies + ); + + + //- Destructor + ~BasicReactingMultiphaseCloud(); + + + // Member Functions + + //- Write fields + void writeFields() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#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 d8a4ebc81c75eb317fa4d10a0e743711149a429a..91a8ae2e5bd3134782f46fa7aa41101d48806bc5 100644 --- a/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H @@ -52,7 +52,6 @@ class basicKinematicCloud : public KinematicCloud<basicKinematicParcel> { - // Private member functions //- Disallow default bitwise copy construct @@ -73,7 +72,7 @@ public: //- Construct from components basicKinematicCloud ( - const word& cloudType, + const word& cloudName, const volScalarField& rho, const volVectorField& U, const volScalarField& mu, @@ -82,8 +81,7 @@ public: //- Destructor - - ~basicKinematicCloud(); + ~basicKinematicCloud(); // Member functions 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 c3002c13546ccb4f7c83bb837570c712214da06b..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 @@ -51,7 +52,6 @@ class basicThermoCloud : public ThermoCloud<basicThermoParcel> { - // Private Member Functions //- Disallow default bitwise copy construct @@ -75,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, @@ -84,8 +84,7 @@ public: //- Destructor - - ~basicThermoCloud(); + ~basicThermoCloud(); // Member Functions diff --git a/src/lagrangian/intermediate/clouds/include/createReactingCloudTypes.H b/src/lagrangian/intermediate/clouds/include/createReactingCloudTypes.H new file mode 100644 index 0000000000000000000000000000000000000000..cc73ce3ec3aca7987ef438cd3a0956fd41dbc77f --- /dev/null +++ b/src/lagrangian/intermediate/clouds/include/createReactingCloudTypes.H @@ -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 + +\*---------------------------------------------------------------------------*/ + +#ifndef createReactingCloudTypes_H +#define createReactingCloudTypes_H + +#include "reactingThermoTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define createReactingCloudType(CloudType) \ + \ + createReactingCloudThermoType(CloudType, specieConstProperties); \ + createReactingCloudThermoType(CloudType, specieReactingProperties); + + +#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 3cbb291f575d4eff84b567600e805972c51bc6b9..d0962539e761760a9a693619c2bca2742288dbb8 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C @@ -31,22 +31,39 @@ License template<class ParcelType> template<class TrackData> -void Foam::KinematicParcel<ParcelType>::updateCellQuantities +void Foam::KinematicParcel<ParcelType>::setCellValues ( TrackData& td, const scalar dt, - const label celli + const label cellI ) { - rhoc_ = td.rhoInterp().interpolate(this->position(), celli); - Uc_ = td.UInterp().interpolate(this->position(), celli); - muc_ = td.muInterp().interpolate(this->position(), celli); + rhoc_ = td.rhoInterp().interpolate(this->position(), cellI); + if (rhoc_ < td.constProps().rhoMin()) + { + WarningIn + ( + "void Foam::KinematicParcel<ParcelType>::setCellValues" + "(" + "TrackData&, " + "const scalar, " + "const label" + ")" + ) << "Limiting density in cell " << cellI << " to " + << td.constProps().rhoMin() << nl << endl; + + rhoc_ = td.constProps().rhoMin(); + } + + Uc_ = td.UInterp().interpolate(this->position(), cellI); + + muc_ = td.muInterp().interpolate(this->position(), cellI); // Apply dispersion components to carrier phase velocity Uc_ = td.cloud().dispersion().update ( dt, - celli, + cellI, U_, Uc_, UTurb_, @@ -57,153 +74,145 @@ void Foam::KinematicParcel<ParcelType>::updateCellQuantities template<class ParcelType> template<class TrackData> -void Foam::KinematicParcel<ParcelType>::calcCoupled +void Foam::KinematicParcel<ParcelType>::cellValueSourceCorrection ( TrackData& td, const scalar dt, - const label celli + const label cellI ) { - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Define local properties at beginning of timestep - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// const scalar mass0 = mass(); -// const vector U0 = U_; - - - // ~~~~~~~~~~~~~~~~~~~~~~~~~ - // Initialise transfer terms - // ~~~~~~~~~~~~~~~~~~~~~~~~~ - - // Momentum transfer from the particle to the carrier phase - vector dUTrans = vector::zero; - - - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Calculate velocity - update U - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - scalar Cud = 0.0; - const vector U1 = calcVelocity(td, dt, Cud, dUTrans); - - - // ~~~~~~~~~~~~~~~~~~~~~~~ - // Accumulate source terms - // ~~~~~~~~~~~~~~~~~~~~~~~ - - // Update momentum transfer - td.cloud().UTrans()[celli] += nParticle_*dUTrans; - - // Accumulate coefficient to be applied in carrier phase momentum coupling - td.cloud().UCoeff()[celli] += nParticle_*mass()*Cud; - - - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Set new particle properties - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - this->U() = U1; + Uc_ += td.cloud().UTrans()[cellI]/massCell(cellI); } template<class ParcelType> template<class TrackData> -void Foam::KinematicParcel<ParcelType>::calcUncoupled +void Foam::KinematicParcel<ParcelType>::calc ( TrackData& td, const scalar dt, - const label + const label cellI ) { - // ~~~~~~~~~~~~~~~~~~~~~~~~~ - // Initialise transfer terms - // ~~~~~~~~~~~~~~~~~~~~~~~~~ + // Define local properties at beginning of time step + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + const scalar np0 = nParticle_; + const scalar d0 = d_; + const vector U0 = U_; + const scalar rho0 = rho_; + 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; - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Calculate velocity - update U - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - scalar Cud = 0.0; - this->U() = calcVelocity(td, dt, Cud, dUTrans); + // Motion + // ~~~~~~ + + // No additional forces + vector Fx = vector::zero; + + // Calculate new particle velocity + vector U1 = calcVelocity(td, dt, cellI, d0, U0, rho0, mass0, Su, dUTrans); + + + // Accumulate carrier phase source terms + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + if (td.cloud().coupled()) + { + // Update momentum transfer + td.cloud().UTrans()[cellI] += np0*dUTrans; + } + + + // Set new particle properties + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + U_ = U1; } template<class ParcelType> template<class TrackData> -Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity +const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity ( TrackData& td, const scalar dt, - scalar& Cud, + const label cellI, + const scalar d, + const vector& U, + const scalar rho, + const scalar mass, + const vector& Su, vector& dUTrans -) +) const { - // Correct carrier phase velocity for 2-D slab cases - const polyMeshInfo& meshInfo = td.cloud().meshInfo(); - if (meshInfo.caseIs2dSlab()) - { - Uc_.component(meshInfo.emptyComponent()) = 0.0; - } + const polyMesh& mesh = this->cloud().pMesh(); - // Return linearised term from drag model - 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; + // 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); - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Set new particle velocity - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Update velocity - treat as 3-D - const vector ap = Uc_ + (1 - rhoc_/rho_)/(Cud + VSMALL)*td.g(); - const scalar bp = Cud; + // New particle velocity + //~~~~~~~~~~~~~~~~~~~~~~ - vector Unew = td.cloud().UIntegrator().integrate(U_, dt, ap, bp).value(); + // Update velocity - treat as 3-D + const scalar As = this->areaS(d); + const vector ap = Uc_ + (PFCoupled + PFNonCoupled + Su)/(ptc*As); + const scalar bp = 6.0*ptc/(rho*d); -// Info<< "U_, Unew = " << U_ << ", " << Unew << endl; + IntegrationScheme<vector>::integrationResult Ures = + td.cloud().UIntegrator().integrate(U, dt, ap, bp); - // Calculate the momentum transfer to the continuous phase - // - do not include gravity impulse - dUTrans = -mass()*(Unew - U_ - dt*td.g()); + vector Unew = Ures.value(); - // Make corrections for 2-D cases - if (meshInfo.caseIs2d()) - { - if (meshInfo.caseIs2dSlab()) - { - // Remove the slab normal parcel velocity component - Unew.component(meshInfo.emptyComponent()) = 0.0; - dUTrans.component(meshInfo.emptyComponent()) = 0.0; + dUTrans += dt*(ptc*As*(Ures.average() - Uc_) - PFCoupled); - // Snap parcels to central plane - this->position().component(meshInfo.emptyComponent()) = - meshInfo.centrePoint().component(meshInfo.emptyComponent()); - } - else if (meshInfo.caseIs2dWedge()) - { - // Snap parcels to central plane - this->position().component(meshInfo.emptyComponent()) = 0.0; - } - else - { - FatalErrorIn("void Foam::KinematicParcel::calcVelocity") - << "Could not determine 2-D case geometry" << nl - << abort(FatalError); - } - } + // 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> template<class TrackData> -bool Foam::KinematicParcel<ParcelType>::move -( - TrackData& td -) +bool Foam::KinematicParcel<ParcelType>::move(TrackData& td) { ParcelType& p = static_cast<ParcelType&>(*this); @@ -219,46 +228,40 @@ bool Foam::KinematicParcel<ParcelType>::move while (td.keepParticle && !td.switchProcessor && tEnd > ROOTVSMALL) { + // Apply correction to position for reduced-D cases + meshTools::constrainToMeshCentre(mesh, p.position()); + // Set the Lagrangian time-step scalar dt = min(dtMax, tEnd); - // Remember which cell the Parcel is in - // since this will change if a face is hit - label celli = p.cell(); + // Remember which cell the Parcel is in since this will change if a + // face is hit + label cellI = p.cell(); dt *= p.trackToFace(p.position() + dt*U_, td); tEnd -= dt; p.stepFraction() = 1.0 - tEnd/deltaT; - // Update cell based properties - p.updateCellQuantities(td, dt, celli); - // Avoid problems with extremely small timesteps if (dt > ROOTVSMALL) { - if (td.cloud().coupled()) - { - p.calcCoupled(td, dt, celli); - } - else + // Update cell based properties + p.setCellValues(td, dt, cellI); + + if (td.cloud().cellValueSourceCorrection()) { - p.calcUncoupled(td, dt, celli); + p.cellValueSourceCorrection(td, dt, cellI); } + + p.calc(td, dt, cellI); } 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; } } } @@ -267,6 +270,34 @@ bool Foam::KinematicParcel<ParcelType>::move } +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 @@ -296,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 } @@ -322,19 +353,12 @@ void Foam::KinematicParcel<ParcelType>::hitPatch template<class ParcelType> -void Foam::KinematicParcel<ParcelType>::hitPatch -( - const polyPatch&, - int& -) +void Foam::KinematicParcel<ParcelType>::hitPatch(const polyPatch&, int&) {} template<class ParcelType> -void Foam::KinematicParcel<ParcelType>::transformProperties -( - const tensor& T -) +void Foam::KinematicParcel<ParcelType>::transformProperties(const tensor& T) { Particle<ParcelType>::transformProperties(T); U_ = transform(T, U_); @@ -351,7 +375,7 @@ void Foam::KinematicParcel<ParcelType>::transformProperties } -// * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * // +// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // #include "KinematicParcelIO.C" diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H index 34c66a89334f6231c81f00d7e0937ba05ac33bbc..049ab26bac5569c8f4bf98716ef9309ff10b5f9d 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H @@ -31,7 +31,7 @@ Description Sub-models include: - drag - - break-up + - turbulent dispersion - wall interactions SourceFiles @@ -79,15 +79,19 @@ class KinematicParcel : public Particle<ParcelType> { - public: //- Class to hold kinematic particle constant properties class constantProperties { - // Private data + //- Constant properties dictionary + const dictionary dict_; + + //- Minimum density [kg/m3] + const scalar rhoMin_; + //- Particle density [kg/m3] (constant) const scalar rho0_; @@ -98,10 +102,16 @@ public: public: //- Constructor - constantProperties(const dictionary& dict); + constantProperties(const dictionary& parentDict); // Member functions + //- Return const access to the constant properties dictionary + inline const dictionary& dict() const; + + //- Return const access to the minimum density + inline scalar rhoMin() const; + //- Return const access to the particle density inline scalar rho0() const; @@ -115,7 +125,6 @@ public: : public Particle<ParcelType>::trackData { - // Private data //- Reference to the cloud containing this particle @@ -183,22 +192,22 @@ public: protected: - // Protected member data + // Protected data // Parcel properties //- Parcel type id label typeId_; + //- Number of particles in Parcel + scalar nParticle_; + //- Diameter [m] scalar d_; //- Velocity of Parcel [m/s] vector U_; - //- Number of particles in Parcel - scalar nParticle_; - //- Density [kg/m3] scalar rho_; @@ -211,13 +220,13 @@ protected: // Cell-based quantities - // - Density [kg/m3] + //- Density [kg/m3] scalar rhoc_; - // - Velocity [m/s] + //- Velocity [m/s] vector Uc_; - // - Viscosity [Pa.s] + //- Viscosity [Pa.s] scalar muc_; @@ -225,35 +234,55 @@ protected: //- Calculate new particle velocity template<class TrackData> - vector calcVelocity + const vector calcVelocity ( TrackData& td, - const scalar dt, - scalar& Cud, - vector& dUTrans - ); + const scalar dt, // timestep + const label cellI, // owner cell + const scalar d, // diameter + const vector& U, // velocity + const scalar rho, // density + const scalar mass, // mass + 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 ( KinematicCloud<ParcelType>& owner, - const label typeId, const vector& position, - const label celli, + const label cellI, + const label typeId, + const scalar nParticle0, const scalar d0, const vector& U0, - const scalar nParticle0, const constantProperties& constProps ); @@ -265,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)); } @@ -276,21 +308,18 @@ public: // Access - //- Return type id + //- Return const access to type id inline label typeId() const; + //- Return const access to number of particles + inline scalar nParticle() const; + //- Return const access to diameter inline scalar d() const; //- Return const access to velocity inline const vector& U() const; - //- Return const access to relative velocity - inline const vector& Ur() const; - - //- Return const access to number of particles - inline scalar nParticle() const; - //- Return const access to density inline scalar rho() const; @@ -300,25 +329,21 @@ public: //- Return const access to turbulent velocity fluctuation inline const vector& UTurb() const; - //- The nearest distance to a wall that - // the particle can be in the n direction - inline scalar wallImpactDistance(const vector& n) const; - // Edit + //- Return access to type id + inline label typeId(); + + //- Return access to number of particles + inline scalar& nParticle(); + //- Return access to diameter inline scalar& d(); //- Return access to velocity inline vector& U(); - //- Return access to relative velocity - inline vector& Ur(); - - //- Return access to number of particles - inline scalar& nParticle(); - //- Return access to density inline scalar& rho(); @@ -331,50 +356,66 @@ public: // Helper functions + //- The nearest distance to a wall that + // the particle can be in the n direction + inline scalar wallImpactDistance(const vector& n) const; + //- Return the index of the face to be used in the interpolation // routine inline label faceInterpolation() const; - //- Particle volume - inline scalar volume() const; + //- Cell owner mass + inline scalar massCell(const label cellI) const; //- Particle mass inline scalar mass() const; + //- Particle volume + inline scalar volume() const; + + //- Particle volume for a given diameter + inline scalar volume(const scalar d) const; + //- Particle projected area inline scalar areaP() const; + //- Projected area for given diameter + inline scalar areaP(const scalar d) const; + //- Particle surface area inline scalar areaS() const; + //- Surface area for given diameter + inline scalar areaS(const scalar d) const; + // Main calculation loop - //- Update cell based quantities + //- Set cell values template<class TrackData> - void updateCellQuantities + void setCellValues ( TrackData& td, const scalar dt, - const label celli + const label cellI ); - //- Coupled calculation with the continuous phase + //- Correct cell values using latest transfer information template<class TrackData> - void calcCoupled + void cellValueSourceCorrection ( TrackData& td, const scalar dt, - const label celli + const label cellI ); - //- Uncoupled calculation with the continuous phase + //- Update parcel properties over the time interval template<class TrackData> - void calcUncoupled + void calc ( TrackData& td, const scalar dt, - const label + const label cellI ); @@ -387,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> @@ -447,8 +509,10 @@ public: // I-O + //- Read static void readFields(KinematicCloud<ParcelType>& c); + //- 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 4b4ec3cce77c1a9adafb941257312962c2a96301..e0d927153780af56e42ac11af2db03636bd583b0 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H @@ -29,11 +29,16 @@ License template <class ParcelType> inline Foam::KinematicParcel<ParcelType>::constantProperties::constantProperties ( - const dictionary& dict + const dictionary& parentDict ) : - rho0_(dimensionedScalar(dict.lookup("rho0")).value()), - minParticleMass_(dimensionedScalar(dict.lookup("minParticleMass")).value()) + dict_(parentDict.subDict("constantProperties")), + rhoMin_(dimensionedScalar(dict_.lookup("rhoMin")).value()), + rho0_(dimensionedScalar(dict_.lookup("rho0")).value()), + minParticleMass_ + ( + dimensionedScalar(dict_.lookup("minParticleMass")).value() + ) {} @@ -62,20 +67,42 @@ template <class ParcelType> inline Foam::KinematicParcel<ParcelType>::KinematicParcel ( KinematicCloud<ParcelType>& owner, - const label typeId, const vector& position, - const label celli, + 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 +( + KinematicCloud<ParcelType>& owner, + const vector& position, + const label cellI, + const label typeId, + const scalar nParticle0, const scalar d0, const vector& U0, - const scalar nParticle0, const constantProperties& constProps ) : - Particle<ParcelType>(owner, position, celli), + Particle<ParcelType>(owner, position, cellI), typeId_(typeId), + nParticle_(nParticle0), d_(d0), U_(U0), - nParticle_(nParticle0), rho_(constProps.rho0()), tTurb_(0.0), UTurb_(vector::zero), @@ -87,6 +114,22 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * // +template <class ParcelType> +inline const Foam::dictionary& +Foam::KinematicParcel<ParcelType>::constantProperties::dict() const +{ + return dict_; +} + + +template <class ParcelType> +inline Foam::scalar +Foam::KinematicParcel<ParcelType>::constantProperties::rhoMin() const +{ + return rhoMin_; +} + + template <class ParcelType> inline Foam::scalar Foam::KinematicParcel<ParcelType>::constantProperties::rho0() const @@ -163,62 +206,51 @@ inline Foam::label Foam::KinematicParcel<ParcelType>::typeId() const template <class ParcelType> -inline Foam::scalar Foam::KinematicParcel<ParcelType>::d() const +inline Foam::scalar Foam::KinematicParcel<ParcelType>::nParticle() const { - return d_; + return nParticle_; } template <class ParcelType> -inline Foam::scalar& Foam::KinematicParcel<ParcelType>::d() +inline Foam::scalar Foam::KinematicParcel<ParcelType>::d() const { return d_; } template <class ParcelType> -inline Foam::scalar Foam::KinematicParcel<ParcelType>::wallImpactDistance -( - const vector& -) const +inline const Foam::vector& Foam::KinematicParcel<ParcelType>::U() const { - return 0.5*d_; + return U_; } template <class ParcelType> -inline Foam::label Foam::KinematicParcel<ParcelType>::faceInterpolation() const +inline Foam::scalar Foam::KinematicParcel<ParcelType>::rho() const { - // Use volume-based interpolation if dealing with external faces - if (this->cloud().internalFace(this->face())) - { - return this->face(); - } - else - { - return -1; - } + return rho_; } template <class ParcelType> -inline const Foam::vector& Foam::KinematicParcel<ParcelType>::U() const +inline Foam::scalar Foam::KinematicParcel<ParcelType>::tTurb() const { - return U_; + return tTurb_; } template <class ParcelType> -inline Foam::vector& Foam::KinematicParcel<ParcelType>::U() +inline const Foam::vector& Foam::KinematicParcel<ParcelType>::UTurb() const { - return U_; + return UTurb_; } template <class ParcelType> -inline Foam::scalar Foam::KinematicParcel<ParcelType>::nParticle() const +inline Foam::label Foam::KinematicParcel<ParcelType>::typeId() { - return nParticle_; + return typeId_; } @@ -230,23 +262,23 @@ inline Foam::scalar& Foam::KinematicParcel<ParcelType>::nParticle() template <class ParcelType> -inline Foam::scalar Foam::KinematicParcel<ParcelType>::rho() const +inline Foam::scalar& Foam::KinematicParcel<ParcelType>::d() { - return rho_; + return d_; } template <class ParcelType> -inline Foam::scalar& Foam::KinematicParcel<ParcelType>::rho() +inline Foam::vector& Foam::KinematicParcel<ParcelType>::U() { - return rho_; + return U_; } template <class ParcelType> -inline Foam::scalar Foam::KinematicParcel<ParcelType>::tTurb() const +inline Foam::scalar& Foam::KinematicParcel<ParcelType>::rho() { - return tTurb_; + return rho_; } @@ -258,23 +290,44 @@ inline Foam::scalar& Foam::KinematicParcel<ParcelType>::tTurb() template <class ParcelType> -inline const Foam::vector& Foam::KinematicParcel<ParcelType>::UTurb() const +inline Foam::vector& Foam::KinematicParcel<ParcelType>::UTurb() { return UTurb_; } template <class ParcelType> -inline Foam::vector& Foam::KinematicParcel<ParcelType>::UTurb() +inline Foam::scalar Foam::KinematicParcel<ParcelType>::wallImpactDistance +( + const vector& +) const { - return UTurb_; + return 0.5*d_; } template <class ParcelType> -inline Foam::scalar Foam::KinematicParcel<ParcelType>::volume() const +inline Foam::label Foam::KinematicParcel<ParcelType>::faceInterpolation() const { - return mathematicalConstant::pi/6.0*pow3(d_); + // Use volume-based interpolation if dealing with external faces + if (this->cloud().internalFace(this->face())) + { + return this->face(); + } + else + { + return -1; + } +} + + +template <class ParcelType> +inline Foam::scalar Foam::KinematicParcel<ParcelType>::massCell +( + const label cellI +) const +{ + return rhoc_*this->cloud().pMesh().cellVolumes()[cellI]; } @@ -285,17 +338,48 @@ inline Foam::scalar Foam::KinematicParcel<ParcelType>::mass() const } +template <class ParcelType> +inline Foam::scalar Foam::KinematicParcel<ParcelType>::volume() const +{ + return volume(d_); +} + + +template <class ParcelType> +inline Foam::scalar +Foam::KinematicParcel<ParcelType>::volume(const scalar d) const +{ + return mathematicalConstant::pi/6.0*pow3(d); +} + + template <class ParcelType> inline Foam::scalar Foam::KinematicParcel<ParcelType>::areaP() const { - return 0.25*areaS(); + return areaP(d_); +} + + +template <class ParcelType> +inline Foam::scalar +Foam::KinematicParcel<ParcelType>::areaP(const scalar d) const +{ + return 0.25*areaS(d); } template <class ParcelType> inline Foam::scalar Foam::KinematicParcel<ParcelType>::areaS() const { - return mathematicalConstant::pi*d_*d_; + return areaS(d_); +} + + +template <class ParcelType> +inline Foam::scalar +Foam::KinematicParcel<ParcelType>::areaS(const scalar d) const +{ + return mathematicalConstant::pi*d*d; } diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C index 36535ab6a09a5621656db29f1be3cc68a8626873..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> @@ -41,9 +55,9 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel : Particle<ParcelType>(cloud, is, readFields), typeId_(0), + nParticle_(0.0), d_(0.0), U_(vector::zero), - nParticle_(0.0), rho_(0.0), tTurb_(0.0), UTurb_(vector::zero), @@ -56,9 +70,9 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel if (is.format() == IOstream::ASCII) { typeId_ = readLabel(is); + nParticle_ = readScalar(is); d_ = readScalar(is); is >> U_; - nParticle_ = readScalar(is); rho_ = readScalar(is); tTurb_ = readScalar(is); is >> UTurb_; @@ -69,9 +83,9 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel ( reinterpret_cast<char*>(&typeId_), sizeof(typeId_) + + sizeof(nParticle_) + sizeof(d_) + sizeof(U_) - + sizeof(nParticle_) + sizeof(rho_) + sizeof(tTurb_) + sizeof(UTurb_) @@ -102,15 +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); @@ -126,9 +141,9 @@ void Foam::KinematicParcel<ParcelType>::readFields ParcelType& p = iter(); p.typeId_ = typeId[i]; + p.nParticle_ = nParticle[i]; p.d_ = d[i]; p.U_ = U[i]; - p.nParticle_ = nParticle[i]; p.rho_ = rho[i]; p.tTurb_ = tTurb[i]; p.UTurb_ = UTurb[i]; @@ -148,13 +163,13 @@ void Foam::KinematicParcel<ParcelType>::writeFields label np = c.size(); IOField<label> typeId(c.fieldIOobject("typeId", IOobject::NO_READ), np); - IOField<scalar> d(c.fieldIOobject("d", IOobject::NO_READ), np); - IOField<vector> U(c.fieldIOobject("U", IOobject::NO_READ), np); IOField<scalar> nParticle ( c.fieldIOobject("nParticle", IOobject::NO_READ), np ); + IOField<scalar> d(c.fieldIOobject("d", IOobject::NO_READ), np); + IOField<vector> U(c.fieldIOobject("U", IOobject::NO_READ), np); IOField<scalar> rho(c.fieldIOobject("rho", IOobject::NO_READ), np); IOField<scalar> tTurb(c.fieldIOobject("tTurb", IOobject::NO_READ), np); IOField<vector> UTurb(c.fieldIOobject("UTurb", IOobject::NO_READ), np); @@ -165,9 +180,9 @@ void Foam::KinematicParcel<ParcelType>::writeFields const KinematicParcel<ParcelType>& p = iter(); typeId[i] = p.typeId(); + nParticle[i] = p.nParticle(); d[i] = p.d(); U[i] = p.U(); - nParticle[i] = p.nParticle(); rho[i] = p.rho(); tTurb[i] = p.tTurb(); UTurb[i] = p.UTurb(); @@ -175,9 +190,9 @@ void Foam::KinematicParcel<ParcelType>::writeFields } typeId.write(); + nParticle.write(); d.write(); U.write(); - nParticle.write(); rho.write(); tTurb.write(); UTurb.write(); @@ -195,25 +210,25 @@ Foam::Ostream& Foam::operator<< { if (os.format() == IOstream::ASCII) { - os << static_cast<const Particle<ParcelType>& >(p) + os << static_cast<const Particle<ParcelType>&>(p) << token::SPACE << p.typeId() + << token::SPACE << p.nParticle() << token::SPACE << p.d() << token::SPACE << p.U() - << token::SPACE << p.nParticle() << token::SPACE << p.rho() << token::SPACE << p.tTurb() << token::SPACE << p.UTurb(); } else { - os << static_cast<const Particle<ParcelType>& >(p); + os << static_cast<const Particle<ParcelType>&>(p); os.write ( reinterpret_cast<const char*>(&p.typeId_), sizeof(p.typeId()) + + sizeof(p.nParticle()) + sizeof(p.d()) + sizeof(p.U()) - + sizeof(p.nParticle()) + sizeof(p.rho()) + sizeof(p.tTurb()) + sizeof(p.UTurb()) diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C new file mode 100644 index 0000000000000000000000000000000000000000..695ff95a8ef96e42020adfe63d7da93834d4ac93 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C @@ -0,0 +1,582 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "ReactingMultiphaseParcel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template<class ParcelType> +const Foam::label Foam::ReactingMultiphaseParcel<ParcelType>::GAS(0); + +template<class ParcelType> +const Foam::label Foam::ReactingMultiphaseParcel<ParcelType>::LIQ(1); + +template<class ParcelType> +const Foam::label Foam::ReactingMultiphaseParcel<ParcelType>::SLD(2); + + +// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // + +template<class ParcelType> +template<class TrackData> +Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::cpEff +( + TrackData& td, + const scalar p, + const scalar T, + const label idG, + const label idL, + const label idS +) const +{ + return + this->Y_[GAS]*td.cloud().composition().cp(idG, YGas_, p, T) + + this->Y_[LIQ]*td.cloud().composition().cp(idL, YLiquid_, p, T) + + this->Y_[SLD]*td.cloud().composition().cp(idS, YSolid_, p, T); +} + + +template<class ParcelType> +template<class TrackData> +Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::HEff +( + TrackData& td, + const scalar p, + const scalar T, + const label idG, + const label idL, + const label idS +) const +{ + return + this->Y_[GAS]*td.cloud().composition().H(idG, YGas_, p, T) + + this->Y_[LIQ]*td.cloud().composition().H(idL, YLiquid_, p, T) + + this->Y_[SLD]*td.cloud().composition().H(idS, YSolid_, p, T); +} + + +template<class ParcelType> +template<class TrackData> +Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::LEff +( + TrackData& td, + const scalar p, + const scalar T, + const label idG, + const label idL, + const label idS +) const +{ + return + this->Y_[GAS]*td.cloud().composition().L(idG, YGas_, p, T) + + this->Y_[LIQ]*td.cloud().composition().L(idL, YLiquid_, p, T) + + this->Y_[SLD]*td.cloud().composition().L(idS, YSolid_, p, T); +} + + +template<class ParcelType> +Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::updateMassFractions +( + const scalar mass0, + const scalarField& dMassGas, + const scalarField& dMassLiquid, + const scalarField& dMassSolid +) +{ + scalarField& YMix = this->Y_; + + scalar massGas = + this->updateMassFraction(mass0*YMix[GAS], dMassGas, YGas_); + scalar massLiquid = + this->updateMassFraction(mass0*YMix[LIQ], dMassLiquid, YLiquid_); + scalar massSolid = + this->updateMassFraction(mass0*YMix[SLD], dMassSolid, YSolid_); + + scalar massNew = max(massGas + massLiquid + massSolid, ROOTVSMALL); + + YMix[GAS] = massGas/massNew; + YMix[LIQ] = massLiquid/massNew; + YMix[SLD] = 1.0 - YMix[GAS] - YMix[LIQ]; + + return massNew; +} + + +// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // + +template<class ParcelType> +template<class TrackData> +void Foam::ReactingMultiphaseParcel<ParcelType>::setCellValues +( + TrackData& td, + const scalar dt, + const label cellI +) +{ + ReactingParcel<ParcelType>::setCellValues(td, dt, cellI); +} + + +template<class ParcelType> +template<class TrackData> +void Foam::ReactingMultiphaseParcel<ParcelType>::cellValueSourceCorrection +( + TrackData& td, + const scalar dt, + const label cellI +) +{ + scalar massCell = this->massCell(cellI); + + scalar addedMass = 0.0; + forAll(td.cloud().rhoTrans(), i) + { + addedMass += td.cloud().rhoTrans(i)[cellI]; + } + + this->rhoc_ += addedMass/td.cloud().pMesh().cellVolumes()[cellI]; + + scalar massCellNew = massCell + addedMass; + this->Uc_ += td.cloud().UTrans()[cellI]/massCellNew; + + scalar cpEff = 0; + if (addedMass > ROOTVSMALL) + { + forAll(td.cloud().rhoTrans(), i) + { + scalar Y = td.cloud().rhoTrans(i)[cellI]/addedMass; + cpEff += Y*td.cloud().carrierSpecies()[i].Cp(this->Tc_); + } + } + const scalar cpc = td.cpInterp().psi()[cellI]; + this->cpc_ = (massCell*cpc + addedMass*cpEff)/massCellNew; + + this->Tc_ += td.cloud().hsTrans()[cellI]/(this->cpc_*massCellNew); +} + + +template<class ParcelType> +template<class TrackData> +void Foam::ReactingMultiphaseParcel<ParcelType>::calc +( + TrackData& td, + const scalar dt, + const label cellI +) +{ + // Define local properties at beginning of timestep + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + const scalar np0 = this->nParticle_; + const scalar d0 = this->d_; + const vector& U0 = this->U_; + const scalar rho0 = this->rho_; + const scalar T0 = this->T_; + const scalar cp0 = this->cp_; + const scalar mass0 = this->mass(); + + const scalar pc = this->pc_; + + const scalarField& YMix = this->Y_; + const label idG = td.cloud().composition().idGas(); + const label idL = td.cloud().composition().idLiquid(); + const label idS = td.cloud().composition().idSolid(); + + // 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; + + + // Devolatilisation + // ~~~~~~~~~~~~~~~~ + + // Mass transfer due to devolatilisation + scalarField dMassDV(YGas_.size(), 0.0); + + // 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 + // ~~~~~~~~~~~~~~~~~ + + // Change in carrier phase composition due to surface reactions + scalarField dMassSRGas(YGas_.size(), 0.0); + scalarField dMassSRLiquid(YLiquid_.size(), 0.0); + scalarField dMassSRSolid(YSolid_.size(), 0.0); + scalarField dMassSRCarrier(td.cloud().carrierSpecies().size(), 0.0); + + // 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 + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + scalarField dMassGas = dMassDV + dMassSRGas; + scalarField dMassLiquid = dMassPC + dMassSRLiquid; + scalarField dMassSolid = dMassSRSolid; + + scalar mass1 = + updateMassFractions(mass0, dMassGas, dMassLiquid, dMassSolid); + + + // Heat transfer + // ~~~~~~~~~~~~~ + + // Calculate new particle temperature + scalar T1 = + calcHeatTransfer(td, dt, cellI, d0, U0, rho0, T0, cp0, Sh, dhsTrans); + + + // Motion + // ~~~~~~ + + // Calculate new particle velocity + vector U1 = calcVelocity(td, dt, cellI, d0, U0, rho0, mass0, Su, dUTrans); + + dUTrans += 0.5*(mass0 - mass1)*(U0 + U1); + + + // Accumulate carrier phase source terms + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + if (td.cloud().coupled()) + { + // Transfer mass lost from particle to carrier mass source + forAll(YGas_, 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 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 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*dUTrans; + + // Update sensible enthalpy transfer + td.cloud().hsTrans()[cellI] += np0*dhsTrans; + } + + + // Remove the particle when mass falls below minimum threshold + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + if (mass1 < td.constProps().minParticleMass()) + { + td.keepParticle = false; + + if (td.cloud().coupled()) + { + // Absorb parcel into carrier phase + forAll(YGas_, i) + { + label gid = + td.cloud().composition().localToGlobalCarrierId(GAS, i); + td.cloud().rhoTrans(gid)[cellI] += np0*mass1*YMix[GAS]*YGas_[i]; + } + forAll(YLiquid_, i) + { + label gid = + td.cloud().composition().localToGlobalCarrierId(LIQ, i); + td.cloud().rhoTrans(gid)[cellI] += + np0*mass1*YMix[LIQ]*YLiquid_[i]; + } +/* + // No mapping between solid components and carrier phase + forAll(YSolid_, i) + { + label gid = + td.cloud().composition().localToGlobalCarrierId(SLD, i); + td.cloud().rhoTrans(gid)[cellI] += + np0*mass1*YMix[SLD]*YSolid_[i]; + } +*/ + td.cloud().UTrans()[cellI] += np0*mass1*U1; + td.cloud().hsTrans()[cellI] += + np0*mass1*HEff(td, pc, T1, idG, idL, idS); + } + } + + + // Set new particle properties + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + else + { + this->cp_ = cpEff(td, pc, T1, idG, idL, idS); + this->T_ = T1; + this->U_ = U1; + + // Update particle density or diameter + if (td.constProps().constantVolume()) + { + this->rho_ = mass1/this->volume(); + } + else + { + this->d_ = cbrt(mass1/this->rho_*6.0/mathematicalConstant::pi); + } + } +} + + +template<class ParcelType> +template<class TrackData> +void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation +( + TrackData& td, + const scalar dt, + const scalar T, + const scalar mass, + const scalar mass0, + const label idVolatile, + const scalar YVolatileTot, + const scalarField& YVolatile, + bool& canCombust, + scalarField& dMassDV, + scalar& Sh, + scalar& dhsTrans +) const +{ + // Check that model is active, and that the parcel temperature is + // within necessary limits for devolatilisation to occur + if + ( + !td.cloud().devolatilisation().active() + || T < td.constProps().Tvap() + ) + { + return; + } + + // Total mass of volatiles evolved + const scalar dMassTot = td.cloud().devolatilisation().calculate + ( + dt, + mass0, + mass, + T, + td.cloud().composition().YMixture0()[idVolatile], + YVolatileTot, + canCombust + ); + + // Volatile mass transfer - equal components of each volatile specie + dMassDV = YVolatile*dMassTot; + + td.cloud().addToMassDevolatilisation(this->nParticle_*dMassTot); + + Sh -= dMassTot*td.constProps().LDevol()/dt; +} + + +template<class ParcelType> +template<class TrackData> +void Foam::ReactingMultiphaseParcel<ParcelType>::calcSurfaceReactions +( + TrackData& td, + const scalar dt, + const label cellI, + const scalar d, + const scalar T, + const scalar mass, + const bool canCombust, + const scalarField& dMassVolatile, + const scalarField& YMix, + const scalarField& YGas, + const scalarField& YLiquid, + const scalarField& YSolid, + scalarField& dMassSRGas, + scalarField& dMassSRLiquid, + scalarField& dMassSRSolid, + scalarField& dMassSRCarrier, + scalar& Sh, + scalar& dhsTrans +) const +{ + // Check that model is active + if (!td.cloud().surfaceReaction().active() || !canCombust) + { + return; + } + + // Update surface reactions + const scalar hReaction = td.cloud().surfaceReaction().calculate + ( + dt, + cellI, + d, + T, + this->Tc_, + this->pc_, + this->rhoc_, + mass, + YGas, + YLiquid, + YSolid, + YMix, + dMassVolatile, + dMassSRGas, + dMassSRLiquid, + dMassSRSolid, + dMassSRCarrier + ); + + td.cloud().addToMassSurfaceReaction + ( + this->nParticle_ + *(sum(dMassSRGas) + sum(dMassSRLiquid) + sum(dMassSRSolid)) + ); + + 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 new file mode 100644 index 0000000000000000000000000000000000000000..e4e311ed90c37ac860a52be6c7a3332ef5c11913 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H @@ -0,0 +1,434 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::ReactingMultiphaseParcel + +Description + Multiphase variant of the reacting parcel class with one/two-way coupling + with the continuous phase. + +SourceFiles + ReactingMultiphaseParcelI.H + ReactingMultiphaseParcel.C + ReactingMultiphaseParcelIO.C + +\*---------------------------------------------------------------------------*/ + +#ifndef ReactingMultiphaseParcel_H +#define ReactingMultiphaseParcel_H + +#include "ReactingParcel.H" +#include "ReactingMultiphaseCloud.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template<class ParcelType> +class ReactingMultiphaseParcel; + +template<class ParcelType> +Ostream& operator<< +( + Ostream&, + const ReactingMultiphaseParcel<ParcelType>& +); + +/*---------------------------------------------------------------------------*\ + Class ReactingMultiphaseParcel Declaration +\*---------------------------------------------------------------------------*/ + +template<class ParcelType> +class ReactingMultiphaseParcel +: + public ReactingParcel<ParcelType> +{ +public: + + // IDs of phases in ReacingParcel phase list (Y) + + static const label GAS; + static const label LIQ; + static const label SLD; + + + //- Class to hold reacting multiphase particle constant properties + class constantProperties + : + public ReactingParcel<ParcelType>::constantProperties + { + // Private data + + //- Latent heat of devolatilisation [J/kg] + const scalar LDevol_; + + //- Fraction of enthalpy retained by parcel due to surface + // reactions + scalar hRetentionCoeff_; + + + public: + + //- Constructor + constantProperties(const dictionary& parentDict); + + // Access + + //- Return const access to the latent heat of devolatilisation + inline scalar LDevol() const; + + //- Return const access to the fraction of enthalpy retained by + // parcel due to surface reactions + inline scalar hRetentionCoeff() const; + }; + + + //- Class used to pass reacting tracking data to the trackToFace function + class trackData + : + public ReactingParcel<ParcelType>::trackData + { + // Private data + + //- Reference to the cloud containing this particle + ReactingMultiphaseCloud<ParcelType>& cloud_; + + //- Particle constant properties + const constantProperties& constProps_; + + + public: + + // Constructors + + //- Construct from components + inline trackData + ( + ReactingMultiphaseCloud<ParcelType>& cloud, + const constantProperties& constProps, + const interpolation<scalar>& rhoInterp, + const interpolation<vector>& UInterp, + const interpolation<scalar>& muInterp, + const interpolation<scalar>& TInterp, + const interpolation<scalar>& CpInterp, + const interpolation<scalar>& pInterp, + const vector& g + ); + + + // Member functions + + //- Return access to the owner cloud + inline ReactingMultiphaseCloud<ParcelType>& cloud(); + + //- Return const access to the constant properties + inline const constantProperties& constProps() const; + }; + + +private: + + // Private member functions + + //- Return the mixture effective specific heat capacity + template<class TrackData> + scalar cpEff + ( + TrackData& td, + const scalar p, + const scalar T, + const label idG, + const label idL, + const label idS + ) const; + + //- Return the mixture effective enthalpy + template<class TrackData> + scalar HEff + ( + TrackData& td, + const scalar p, + const scalar T, + const label idG, + const label idL, + const label idS + ) const; + + //- Return the mixture effective latent heat + template<class TrackData> + scalar LEff + ( + TrackData& td, + const scalar p, + const scalar T, + const label idG, + const label idL, + const label idS + ) const; + + //- Update the mass fractions (Y, YGas, YLiquid, YSolid) + scalar updateMassFractions + ( + const scalar mass0, + const scalarField& dMassGas, + const scalarField& dMassLiquid, + const scalarField& dMassSolid + ); + + +protected: + + // Protected data + + // Parcel properties + + //- Mass fractions of gases [] + scalarField YGas_; + + //- Mass fractions of liquids [] + scalarField YLiquid_; + + //- Mass fractions of solids [] + scalarField YSolid_; + + //- Flag to say that the particle is allowed to combust + // Only true after volatile content falls below threshold value + bool canCombust_; + + + // Protected member functions + + //- Calculate Devolatilisation + template<class TrackData> + void calcDevolatilisation + ( + TrackData& td, + const scalar dt, // timestep + const scalar T, // temperature + const scalar mass, // mass + const scalar mass0, // mass (initial on injection) + const label idVolatile, // id of volatile phase + 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 + scalar& Sh, // explicit particle enthalpy source + scalar& dhsTrans // sensible enthalpy transfer to carrier + ) const; + + //- Calculate surface reactions + template<class TrackData> + void calcSurfaceReactions + ( + TrackData& td, + const scalar dt, // timestep + const label cellI, // owner cell + const scalar d, // diameter + const scalar T, // temperature + const scalar mass, // mass + const bool canCombust, // 'can combust' flag + const scalarField& dMassVolatile, // mass transfer of volatiles + const scalarField& YMix, // mixture mass fractions + const scalarField& YGas, // gas-phase mass fractions + const scalarField& YLiquid,// liquid-phase mass fractions + const scalarField& YSolid, // solid-phase mass fractions + 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 + scalar& Sh, // explicit particle enthalpy source + scalar& dhsTrans // sensible enthalpy transfer to carrier + ) const; + + +public: + + // 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 + ( + ReactingMultiphaseCloud<ParcelType>& owner, + const vector& position, + const label cellI, + const label typeId, + const scalar nParticle0, + const scalar d0, + const vector& U0, + const scalarField& Y0, + const scalarField& YGas0, + const scalarField& YLiquid0, + const scalarField& YSolid0, + const constantProperties& constProps + ); + + //- Construct from Istream + ReactingMultiphaseParcel + ( + const Cloud<ParcelType>& c, + Istream& is, + bool readFields = true + ); + + //- Construct as a copy + ReactingMultiphaseParcel(const ReactingMultiphaseParcel& p); + + //- Construct and return a clone + autoPtr<ReactingMultiphaseParcel> clone() const + { + return + autoPtr<ReactingMultiphaseParcel> + ( + new ReactingMultiphaseParcel(*this) + ); + } + + + // Member Functions + + // Access + + //- Return const access to mass fractions of gases + inline const scalarField& YGas() const; + + //- Return const access to mass fractions of liquids + inline const scalarField& YLiquid() const; + + //- 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 + + //- Return access to mass fractions of gases + inline scalarField& YGas(); + + //- Return access to mass fractions of liquids + inline scalarField& YLiquid(); + + //- Return access to mass fractions of solids + inline scalarField& YSolid(); + + //- Return access to the canCombust flag + inline bool& canCombust(); + + + // Main calculation loop + + //- Set cell values + template<class TrackData> + void setCellValues + ( + TrackData& td, + const scalar dt, + const label cellI + ); + + //- Correct cell values using latest transfer information + template<class TrackData> + void cellValueSourceCorrection + ( + TrackData& td, + const scalar dt, + const label cellI + ); + + //- Update parcel properties over the time interval + template<class TrackData> + void calc + ( + TrackData& td, + const scalar dt, + const label cellI + ); + + + // I-O + + //- Read + static void readFields(ReactingMultiphaseCloud<ParcelType>& c); + + //- Write + static void writeFields + ( + const ReactingMultiphaseCloud<ParcelType>& c + ); + + + // Ostream Operator + + friend Ostream& operator<< <ParcelType> + ( + Ostream&, + const ReactingMultiphaseParcel<ParcelType>& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "ReactingMultiphaseParcelI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "ReactingMultiphaseParcel.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H new file mode 100644 index 0000000000000000000000000000000000000000..c512c5572847966c507b83edbf13a14d2502efb0 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H @@ -0,0 +1,238 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class ParcelType> +inline Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties:: +constantProperties +( + const dictionary& parentDict +) +: + ReactingParcel<ParcelType>::constantProperties(parentDict), + LDevol_(dimensionedScalar(this->dict().lookup("LDevol")).value()), + hRetentionCoeff_ + ( + dimensionedScalar(this->dict().lookup("hRetentionCoeff")).value() + ) +{ + if ((hRetentionCoeff_ < 0) || (hRetentionCoeff_ > 1)) + { + FatalErrorIn + ( + "ReactingMultiphaseParcel<ParcelType>::constantProperties::" + "constantProperties" + ) << "hRetentionCoeff must be in the range 0 to 1" << nl + << exit(FatalError) << endl; + } + + hRetentionCoeff_ = max(1e-06, hRetentionCoeff_); +} + + +template<class ParcelType> +inline Foam::ReactingMultiphaseParcel<ParcelType>::trackData::trackData +( + ReactingMultiphaseCloud<ParcelType>& cloud, + const constantProperties& constProps, + const interpolation<scalar>& rhoInterp, + const interpolation<vector>& UInterp, + const interpolation<scalar>& muInterp, + const interpolation<scalar>& TInterp, + const interpolation<scalar>& CpInterp, + const interpolation<scalar>& pInterp, + const vector& g +) +: + ReactingParcel<ParcelType>::trackData + ( + cloud, + constProps, + rhoInterp, + UInterp, + muInterp, + TInterp, + CpInterp, + pInterp, + g + ), + cloud_(cloud), + constProps_(constProps) +{} + + +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 +( + ReactingMultiphaseCloud<ParcelType>& owner, + const vector& position, + const label cellI, + const label typeId, + const scalar nParticle0, + const scalar d0, + const vector& U0, + const scalarField& Y0, + const scalarField& YGas0, + const scalarField& YLiquid0, + const scalarField& YSolid0, + const constantProperties& constProps +) +: + ReactingParcel<ParcelType> + ( + owner, + position, + cellI, + typeId, + nParticle0, + d0, + U0, + Y0, + constProps + ), + YGas_(YGas0), + YLiquid_(YLiquid0), + YSolid_(YSolid0), + canCombust_(false) +{} + + +// * * * * * * * * * constantProperties Member Functions * * * * * * * * * * // + +template<class ParcelType> +inline Foam::scalar +Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::LDevol() const +{ + return LDevol_; +} + + +template<class ParcelType> +inline Foam::scalar +Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties:: +hRetentionCoeff() const +{ + return hRetentionCoeff_; +} + + +// * * * * * * * * * * * trackData Member Functions * * * * * * * * * * * * // + +template<class ParcelType> +inline Foam::ReactingMultiphaseCloud<ParcelType>& +Foam::ReactingMultiphaseParcel<ParcelType>::trackData::cloud() +{ + return cloud_; +} + + +template<class ParcelType> +inline const typename Foam::ReactingMultiphaseParcel<ParcelType>:: +constantProperties& +Foam::ReactingMultiphaseParcel<ParcelType>::trackData::constProps() const +{ + return constProps_; +} + + +// * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * // + +template<class ParcelType> +inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>:: +YGas() const +{ + return YGas_; +} + + +template<class ParcelType> +inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>:: +YLiquid() const +{ + return YLiquid_; +} + + +template<class ParcelType> +inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>:: +YSolid() const +{ + return YSolid_; +} + + +template<class ParcelType> +inline bool Foam::ReactingMultiphaseParcel<ParcelType>::canCombust() const +{ + return canCombust_; +} + + +template<class ParcelType> +inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YGas() +{ + return YGas_; +} + + +template<class ParcelType> +inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YLiquid() +{ + return YLiquid_; +} + + +template<class ParcelType> +inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YSolid() +{ + return 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 new file mode 100644 index 0000000000000000000000000000000000000000..512f21e9530950563d4d71e0cfb89e1f54215000 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C @@ -0,0 +1,314 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "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> +Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel +( + const Cloud<ParcelType>& cloud, + Istream& is, + bool readFields +) +: + ReactingParcel<ParcelType>(cloud, is, readFields), + YGas_(0), + YLiquid_(0), + YSolid_(0), + canCombust_(false) +{ + if (readFields) + { + const ReactingMultiphaseCloud<ParcelType>& cR = + dynamic_cast<const ReactingMultiphaseCloud<ParcelType>&>(cloud); + + const label idGas = cR.composition().idGas(); + const label nGas = cR.composition().componentNames(idGas).size(); + const label idLiquid = cR.composition().idLiquid(); + const label nLiquid = cR.composition().componentNames(idLiquid).size(); + const label idSolid = cR.composition().idGas(); + const label nSolid = cR.composition().componentNames(idSolid).size(); + + YGas_.setSize(nGas); + YLiquid_.setSize(nLiquid); + YSolid_.setSize(nSolid); + + is >> YGas_ >> YLiquid_ >> YSolid_; + + // scale the mass fractions + const scalarField& YMix = this->Y_; + YGas_ /= YMix[GAS] + ROOTVSMALL; + YLiquid_ /= YMix[LIQ] + ROOTVSMALL; + YSolid_ /= YMix[SLD] + ROOTVSMALL; + } + + // Check state of Istream + is.check + ( + "ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel" + "(" + "const Cloud<ParcelType>&, " + "Istream&, " + "bool" + ")" + ); +} + + +template<class ParcelType> +void Foam::ReactingMultiphaseParcel<ParcelType>::readFields +( + ReactingMultiphaseCloud<ParcelType>& c +) +{ + if (!c.size()) + { + return; + } + + ReactingParcel<ParcelType>::readFields(c); + + // Get names and sizes for each Y... + const label idGas = c.composition().idGas(); + const wordList& gasNames = c.composition().componentNames(idGas); + const label idLiquid = c.composition().idLiquid(); + const wordList& liquidNames = c.composition().componentNames(idLiquid); + const label idSolid = c.composition().idSolid(); + const wordList& solidNames = c.composition().componentNames(idSolid); + const wordList& stateLabels = c.composition().stateLabels(); + + // Set storage for each Y... for each parcel + forAllIter(typename Cloud<ParcelType>, c, iter) + { + ReactingMultiphaseParcel<ParcelType>& p = iter(); + p.YGas_.setSize(gasNames.size(), 0.0); + p.YLiquid_.setSize(liquidNames.size(), 0.0); + p.YSolid_.setSize(solidNames.size(), 0.0); + } + + // Populate YGas for each parcel + forAll(gasNames, j) + { + IOField<scalar> YGas + ( + c.fieldIOobject + ( + "Y" + gasNames[j] + stateLabels[idGas], + IOobject::MUST_READ + ) + ); + + label i = 0; + forAllIter(typename Cloud<ParcelType>, c, iter) + { + ReactingMultiphaseParcel<ParcelType>& p = iter(); + p.YGas_[j] = YGas[i++]/(p.Y()[GAS] + ROOTVSMALL); + } + } + // Populate YLiquid for each parcel + forAll(liquidNames, j) + { + IOField<scalar> YLiquid + ( + c.fieldIOobject + ( + "Y" + liquidNames[j] + stateLabels[idLiquid], + IOobject::MUST_READ + ) + ); + + label i = 0; + forAllIter(typename Cloud<ParcelType>, c, iter) + { + ReactingMultiphaseParcel<ParcelType>& p = iter(); + p.YLiquid_[j] = YLiquid[i++]/(p.Y()[LIQ] + ROOTVSMALL); + } + } + // Populate YSolid for each parcel + forAll(solidNames, j) + { + IOField<scalar> YSolid + ( + c.fieldIOobject + ( + "Y" + solidNames[j] + stateLabels[idSolid], + IOobject::MUST_READ + ) + ); + + label i = 0; + forAllIter(typename Cloud<ParcelType>, c, iter) + { + ReactingMultiphaseParcel<ParcelType>& p = iter(); + p.YSolid_[j] = YSolid[i++]/(p.Y()[SLD] + ROOTVSMALL); + } + } +} + + +template<class ParcelType> +void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields +( + const ReactingMultiphaseCloud<ParcelType>& c +) +{ + ReactingParcel<ParcelType>::writeFields(c); + + label np = c.size(); + + // Write the composition fractions + if (np > 0) + { + const wordList& stateLabels = c.composition().stateLabels(); + + const label idGas = c.composition().idGas(); + const wordList& gasNames = c.composition().componentNames(idGas); + forAll(gasNames, j) + { + IOField<scalar> YGas + ( + c.fieldIOobject + ( + "Y" + gasNames[j] + stateLabels[idGas], + IOobject::NO_READ + ), + np + ); + + label i = 0; + forAllConstIter(typename Cloud<ParcelType>, c, iter) + { + const ReactingMultiphaseParcel<ParcelType>& p0 = iter(); + YGas[i++] = p0.YGas()[j]*p0.Y()[GAS]; + } + + YGas.write(); + } + + const label idLiquid = c.composition().idLiquid(); + const wordList& liquidNames = c.composition().componentNames(idLiquid); + forAll(liquidNames, j) + { + IOField<scalar> YLiquid + ( + c.fieldIOobject + ( + "Y" + liquidNames[j] + stateLabels[idLiquid], + IOobject::NO_READ + ), + np + ); + + label i = 0; + forAllConstIter(typename Cloud<ParcelType>, c, iter) + { + const ReactingMultiphaseParcel<ParcelType>& p0 = iter(); + YLiquid[i++] = p0.YLiquid()[j]*p0.Y()[LIQ]; + } + + YLiquid.write(); + } + + const label idSolid = c.composition().idSolid(); + const wordList& solidNames = c.composition().componentNames(idSolid); + forAll(solidNames, j) + { + IOField<scalar> YSolid + ( + c.fieldIOobject + ( + "Y" + solidNames[j] + stateLabels[idSolid], + IOobject::NO_READ + ), + np + ); + + label i = 0; + forAllConstIter(typename Cloud<ParcelType>, c, iter) + { + const ReactingMultiphaseParcel<ParcelType>& p0 = iter(); + YSolid[i++] = p0.YSolid()[j]*p0.Y()[SLD]; + } + + YSolid.write(); + } + } +} + + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +template<class ParcelType> +Foam::Ostream& Foam::operator<< +( + Ostream& os, + const ReactingMultiphaseParcel<ParcelType>& p +) +{ + scalarField YGasLoc = p.YGas()*p.Y()[0]; + scalarField YLiquidLoc = p.YLiquid()*p.Y()[1]; + scalarField YSolidLoc = p.YSolid()*p.Y()[2]; + if (os.format() == IOstream::ASCII) + { + os << static_cast<const ReactingParcel<ParcelType>&>(p) + << token::SPACE << YGasLoc + << token::SPACE << YLiquidLoc + << token::SPACE << YSolidLoc; + } + else + { + os << static_cast<const ReactingParcel<ParcelType>&>(p); + os << YGasLoc << YLiquidLoc << YSolidLoc; + } + + // Check state of Ostream + os.check + ( + "Ostream& operator<<" + "(" + "Ostream&, " + "const ReactingMultiphaseParcel<ParcelType>&" + ")" + ); + + return os; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C index 394b3ce38e017ef3d2cc6487708f17760d2b9493..b52bfeef29f4c81dc18d8f038fc42a6198b197c3 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C @@ -30,271 +30,227 @@ License template<class ParcelType> template<class TrackData> -void Foam::ReactingParcel<ParcelType>::updateCellQuantities +void Foam::ReactingParcel<ParcelType>::setCellValues ( TrackData& td, const scalar dt, - const label celli + const label cellI ) { - ThermoParcel<ParcelType>::updateCellQuantities(td, dt, celli); + ThermoParcel<ParcelType>::setCellValues(td, dt, cellI); - pc_ = td.pInterp().interpolate(this->position(), celli); + pc_ = td.pInterp().interpolate(this->position(), cellI); + if (pc_ < td.constProps().pMin()) + { + WarningIn + ( + "void Foam::ReactingParcel<ParcelType>::setCellValues" + "(" + "TrackData&, " + "const scalar, " + "const label" + ")" + ) << "Limiting pressure in cell " << cellI << " to " + << td.constProps().pMin() << nl << endl; + + pc_ = td.constProps().pMin(); + } } template<class ParcelType> template<class TrackData> -void Foam::ReactingParcel<ParcelType>::calcCoupled +void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection ( TrackData& td, const scalar dt, - const label celli + const label cellI ) { - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Define local properties at beginning of timestep - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - const vector U0 = this->U_; - const scalar mass0 = this->mass(); - const scalar cp0 = this->cp_; - const scalar np0 = this->nParticle_; - const scalar T0 = this->T_; - - // ~~~~~~~~~~~~~~~~~~~~~~~~~ - // Initialise transfer terms - // ~~~~~~~~~~~~~~~~~~~~~~~~~ - - // Momentum transfer from the particle to the carrier phase - vector dUTrans = vector::zero; - - // Enthalpy transfer from the particle to the carrier phase - scalar dhTrans = 0.0; - - // Mass transfer from particle to carrier phase - // - components exist in particle already - scalarList dMassMT(td.cloud().gases().size(), 0.0); - - // Mass transfer due to surface reactions from particle to carrier phase - // - components do not necessarily exist in particle already - scalarList dMassSR(td.cloud().gases().size(), 0.0); - - - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Calculate velocity - update U - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - scalar Cud = 0.0; - const vector U1 = calcVelocity(td, dt, Cud, dUTrans); - - - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Calculate heat transfer - update T - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - scalar htc = 0.0; - scalar T1 = calcHeatTransfer(td, dt, celli, htc, dhTrans); - - - // ~~~~~~~~~~~~~~~~~~~~~~~ - // Calculate mass transfer - // ~~~~~~~~~~~~~~~~~~~~~~~ - calcMassTransfer(td, dt, T0, T1, dMassMT); - - - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Calculate surface reactions - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - // Initialise enthalpy retention to zero - scalar dhRet = 0.0; - - calcSurfaceReactions(td, dt, celli, T0, T1, dMassMT, dMassSR, dhRet); - - // New total mass - const scalar mass1 = mass0 - sum(dMassMT) - sum(dMassSR); - - // Correct particle temperature to account for latent heat of - // devolatilisation - T1 -= - td.constProps().Ldevol() - *sum(dMassMT) - /(0.5*(mass0 + mass1)*cp0); - - // Add retained enthalpy from surface reaction to particle and remove - // from gas - T1 += dhRet/(0.5*(mass0 + mass1)*cp0); - dhTrans -= dhRet; - - // Correct dhTrans to account for enthalpy of evolved volatiles - dhTrans += - sum(dMassMT) - *td.cloud().composition().HGas(YGas_, 0.5*(T0 + T1)); + scalar massCell = this->massCell(cellI); - // Correct dhTrans to account for enthalpy of consumed solids - dhTrans += - sum(dMassSR) - *td.cloud().composition().HSolid(YSolid_, 0.5*(T0 + T1)); + scalar addedMass = 0.0; + forAll(td.cloud().rhoTrans(), i) + { + addedMass += td.cloud().rhoTrans(i)[cellI]; + } + this->rhoc_ += addedMass/td.cloud().pMesh().cellVolumes()[cellI]; - // ~~~~~~~~~~~~~~~~~~~~~~~ - // Accumulate source terms - // ~~~~~~~~~~~~~~~~~~~~~~~ + scalar massCellNew = massCell + addedMass; + this->Uc_ += td.cloud().UTrans()[cellI]/massCellNew; - // Transfer mass lost from particle to carrier mass source - forAll(dMassMT, i) + scalar cpEff = 0; + if (addedMass > ROOTVSMALL) { - td.cloud().rhoTrans(i)[celli] += np0*(dMassMT[i] + dMassSR[i]); + forAll(td.cloud().rhoTrans(), i) + { + scalar Y = td.cloud().rhoTrans(i)[cellI]/addedMass; + cpEff += Y*td.cloud().carrierSpecies()[i].Cp(this->Tc_); + } } + const scalar cpc = td.cpInterp().psi()[cellI]; + this->cpc_ = (massCell*cpc + addedMass*cpEff)/massCellNew; - // Update momentum transfer - td.cloud().UTrans()[celli] += np0*dUTrans; - - // Accumulate coefficient to be applied in carrier phase momentum coupling - td.cloud().UCoeff()[celli] += np0*mass0*Cud; - - // Update enthalpy transfer - // - enthalpy of lost solids already accounted for - td.cloud().hTrans()[celli] += np0*dhTrans; + this->Tc_ += td.cloud().hsTrans()[cellI]/(this->cpc_*massCellNew); +} - // Accumulate coefficient to be applied in carrier phase enthalpy coupling - td.cloud().hCoeff()[celli] += np0*htc*this->areaS(); +template<class ParcelType> +Foam::scalar Foam::ReactingParcel<ParcelType>::updateMassFraction +( + const scalar mass0, + const scalarField& dMass, + scalarField& Y +) const +{ + scalar mass1 = mass0 - sum(dMass); - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Remove the particle when mass falls below minimum threshold - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - if (mass1 < td.constProps().minParticleMass()) + // only update the mass fractions if the new particle mass is finite + if (mass1 > ROOTVSMALL) { - td.keepParticle = false; - - // Absorb particle(s) into carrier phase - forAll(dMassMT, i) + forAll(Y, i) { - td.cloud().rhoTrans(i)[celli] += np0*dMassMT[i]; + Y[i] = (Y[i]*mass0 - dMass[i])/mass1; } - td.cloud().hTrans()[celli] += - np0*mass1 - *( - YMixture_[0]*td.cloud().composition().HGas(YGas_, T1) - + YMixture_[2]*td.cloud().composition().HSolid(YSolid_, T1) - ); - td.cloud().UTrans()[celli] += np0*mass1*U1; } - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Set new particle properties - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - else - { - this->U_ = U1; - this->T_ = T1; - this->cp_ = - YMixture_[0]*td.cloud().composition().cpGas(YGas_, T1) - + YMixture_[1]*td.cloud().composition().cpLiquid(YLiquid_, pc_, T1) - + YMixture_[2]*td.cloud().composition().cpSolid(YSolid_); - // Update particle density or diameter - if (td.constProps().constantVolume()) - { - this->rho_ = mass1/this->volume(); - } - else - { - this->d_ = cbrt(mass1/this->rho_*6.0/mathematicalConstant::pi); - } - } + return mass1; } template<class ParcelType> template<class TrackData> -void Foam::ReactingParcel<ParcelType>::calcUncoupled +void Foam::ReactingParcel<ParcelType>::calc ( TrackData& td, const scalar dt, - const label celli + const label cellI ) { - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Define local properties at beginning of timestep - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // Define local properties at beginning of time step + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + const scalar np0 = this->nParticle_; + const scalar d0 = this->d_; + const vector& U0 = this->U_; + const scalar rho0 = this->rho_; const scalar T0 = this->T_; - const scalar mass0 = this->mass(); const scalar cp0 = this->cp_; + const scalar mass0 = this->mass(); - // ~~~~~~~~~~~~~~~~~~~~~~~~~ - // Initialise transfer terms - // ~~~~~~~~~~~~~~~~~~~~~~~~~ + // Explicit momentum source for particle + vector Su = vector::zero; // Momentum transfer from the particle to the carrier phase vector dUTrans = vector::zero; - // Enthalpy transfer from the particle to the carrier phase - scalar dhTrans = 0.0; + // Explicit enthalpy source for particle + scalar Sh = 0.0; - // Mass transfer from particle to carrier phase - // - components exist in particle already - scalarList dMassMT(td.cloud().gases().size(), 0.0); + // Sensible enthalpy transfer from the particle to the carrier phase + scalar dhsTrans = 0.0; - // Mass transfer due to surface reactions from particle to carrier phase - // - components do not necessarily exist in particle already - scalarList dMassSR(td.cloud().gases().size(), 0.0); + // Phase change + // ~~~~~~~~~~~~ - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Calculate velocity - update U - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - scalar Cud = 0.0; - const vector U1 = calcVelocity(td, dt, Cud, dUTrans); + // Mass transfer due to phase change + scalarField dMassPC(Y_.size(), 0.0); + // Calc mass and enthalpy transfer due to phase change + calcPhaseChange + ( + td, + dt, + cellI, + d0, + T0, + U0, + mass0, + 0, + 1.0, + Y_, + dMassPC, + Sh, + dhsTrans + ); - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Calculate heat transfer - update T - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - scalar htc = 0.0; - scalar T1 = calcHeatTransfer(td, dt, celli, htc, dhTrans); + // Update particle component mass and mass fractions + scalar mass1 = updateMassFraction(mass0, dMassPC, Y_); - // ~~~~~~~~~~~~~~~~~~~~~~~ - // Calculate mass transfer - // ~~~~~~~~~~~~~~~~~~~~~~~ - calcMassTransfer(td, dt, T0, T1, dMassMT); + // Heat transfer + // ~~~~~~~~~~~~~ + // Calculate new particle temperature + scalar T1 = + calcHeatTransfer(td, dt, cellI, d0, U0, rho0, T0, cp0, Sh, dhsTrans); - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Calculate surface reactions - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Initialise enthalpy retention to zero - scalar dhRet = 0.0; + // Motion + // ~~~~~~ - calcSurfaceReactions(td, dt, celli, T0, T1, dMassMT, dMassSR, dhRet); + // No additional forces + vector Fx = vector::zero; - // New total mass - const scalar mass1 = mass0 - sum(dMassMT) - sum(dMassSR); + // Calculate new particle velocity + vector U1 = calcVelocity(td, dt, cellI, d0, U0, rho0, mass0, Su, dUTrans); - // New specific heat capacity - const scalar cp1 = - YMixture_[0]*td.cloud().composition().cpGas(YGas_, T1) - + YMixture_[1]*td.cloud().composition().cpLiquid(YLiquid_, pc_, T1) - + YMixture_[2]*td.cloud().composition().cpSolid(YSolid_); + dUTrans += 0.5*(mass0 - mass1)*(U0 + U1); + + // Accumulate carrier phase source terms + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + if (td.cloud().coupled()) + { + // Transfer mass lost from particle to carrier mass source + forAll(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*dUTrans; + + // Update sensible enthalpy transfer + td.cloud().hsTrans()[cellI] += np0*dhsTrans; + } - // Add retained enthalpy to particle - T1 += dhRet/(mass0*0.5*(cp0 + cp1)); - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Remove the particle when mass falls below minimum threshold // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (mass1 < td.constProps().minParticleMass()) { td.keepParticle = false; + + if (td.cloud().coupled()) + { + // Absorb parcel into carrier phase + forAll(Y_, i) + { + label gid = + td.cloud().composition().localToGlobalCarrierId(0, i); + td.cloud().rhoTrans(gid)[cellI] += np0*mass1*Y_[i]; + } + td.cloud().UTrans()[cellI] += np0*mass1*U1; + td.cloud().hcTrans()[cellI] += + np0*mass1*td.cloud().composition().H(0, Y_, pc_, T1); + } } - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + // Set new particle properties // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + else { - this->U_ = U1; + this->cp_ = td.cloud().composition().cp(0, Y_, pc_, T1); this->T_ = T1; - this->cp_ = cp1; + this->U_ = U1; // Update particle density or diameter if (td.constProps().constantVolume()) @@ -311,112 +267,88 @@ void Foam::ReactingParcel<ParcelType>::calcUncoupled template<class ParcelType> template<class TrackData> -void Foam::ReactingParcel<ParcelType>::calcMassTransfer +void Foam::ReactingParcel<ParcelType>::calcPhaseChange ( TrackData& td, const scalar dt, - const scalar T0, - const scalar T1, - scalarList& dMassMT + const label cellI, + const scalar d, + const scalar T, + const vector& U, + const scalar mass, + const label idPhase, + const scalar YPhase, + const scalarField& YComponents, + scalarField& dMassPC, + scalar& Sh, + scalar& dhsTrans ) { - if (td.cloud().composition().YMixture0()[1]>SMALL) - { - notImplemented - ( - "void Foam::ReactingParcel<ParcelType>::" - "calcMassTransfer(...): no treatment currently " - "available for particles containing liquid species" - ) - } - - // Check that model is active, and that the parcel temperature is - // within necessary limits for mass transfer to occur if ( - !td.cloud().massTransfer().active() - || this->T_<td.constProps().Tvap() - || this->T_<td.constProps().Tbp() + !td.cloud().phaseChange().active() + || T < td.constProps().Tvap() + || YPhase < SMALL ) { return; } - // Determine mass to add to carrier phase - const scalar mass = this->mass(); - const scalar dMassTot = td.cloud().massTransfer().calculate + // Calculate mass transfer due to phase change + td.cloud().phaseChange().calculate ( dt, - mass0_, - mass, - td.cloud().composition().YMixture0(), - YMixture_, - T0, - canCombust_ + cellI, + d, + T, + pc_, + this->Tc_, + this->muc_/(this->rhoc_ + ROOTVSMALL), + U - this->Uc_, + dMassPC ); - // Update (total) mass fractions - YMixture_[0] = (YMixture_[0]*mass - dMassTot)/(mass - dMassTot); - YMixture_[1] = YMixture_[1]*mass/(mass - dMassTot); - YMixture_[2] = 1.0 - YMixture_[0] - YMixture_[1]; + // Limit phase change mass by availability of each specie + dMassPC = min(mass*YPhase*YComponents, dMassPC); - // Add to cummulative mass transfer - forAll (YGas_, i) + scalar dMassTot = sum(dMassPC); + + // Add to cumulative phase change mass + td.cloud().addToMassPhaseChange(this->nParticle_*dMassTot); + + // Enthalphy transfer to carrier phase + forAll(YComponents, i) { - label id = td.cloud().composition().gasGlobalIds()[i]; + label gid; + + gid = td.cloud().composition().localToGlobalCarrierId(idPhase, i); + const scalar hv = td.cloud().composition().carrierSpecies()[gid].H(T); + + gid = td.cloud().composition().globalIds(idPhase)[i]; + const scalar hl = + td.cloud().composition().liquids().properties()[gid].h(pc_, T); - // Mass transfer - scalar volatileMass = YGas_[i]*dMassTot; - dMassMT[id] += volatileMass; + Sh += dMassPC[i]*(hl - hv)/dt; } } -template<class ParcelType> -template<class TrackData> -void Foam::ReactingParcel<ParcelType>::calcSurfaceReactions +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template <class ParcelType> +Foam::ReactingParcel<ParcelType>::ReactingParcel ( - TrackData& td, - const scalar dt, - const label celli, - const scalar T0, - const scalar T1, - const scalarList& dMassMT, - scalarList& dMassSR, - scalar& dhRet + const ReactingParcel<ParcelType>& p ) -{ - // Check that model is active - if (!td.cloud().surfaceReaction().active() || !canCombust_) - { - return; - } - - // Update mass transfer(s) - // - Also updates Y()'s - td.cloud().surfaceReaction().calculate - ( - dt, - celli, - this->d_, - T0, - T1, - this->Tc_, - pc_, - this->rhoc_, - this->mass(), - dMassMT, - YGas_, - YLiquid_, - YSolid_, - YMixture_, - dMassSR, - dhRet - ); -} +: + ThermoParcel<ParcelType>(p), + mass0_(p.mass0_), + Y_(p.Y_), + pc_(p.pc_) +{} -// * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * // +// * * * * * * * * * * * * * * 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 2a29e35ac53c9c87646c88e4bb1ea5d8998efe35..8e351f96f098362f9532da369751e16ced11bcbe 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H @@ -26,9 +26,8 @@ Class Foam::ReactingParcel Description - Reactinf parcel class with one/two-way coupling with the continuous - phase. Includes thermo parcel sub-models, plus: - - combustion + Reacting parcel class with one/two-way coupling with the continuous + phase. SourceFiles ReactingParcelI.H @@ -47,6 +46,7 @@ SourceFiles #include "ThermoParcel.H" #include "ReactingCloud.H" +#include "reactingParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -70,9 +70,9 @@ Ostream& operator<< template<class ParcelType> class ReactingParcel : + public reactingParcel, public ThermoParcel<ParcelType> { - public: //- Class to hold reacting particle constant properties @@ -80,40 +80,33 @@ public: : public ThermoParcel<ParcelType>::constantProperties { - // Private data - //- Vapourisation temperature [K] - const scalar Tvap_; - - //- Boiling point [K] - const scalar Tbp_; - - //- Latent heat of devolatilisation [J/kg] - const scalar Ldevol_; + //- Minimum pressure [Pa] + const scalar pMin_; //- Constant volume flag - e.g. during mass transfer Switch constantVolume_; + //- Vaporisation temperature [K] + const scalar Tvap_; + public: //- Constructor - constantProperties(const dictionary& dict); + constantProperties(const dictionary& parentDict); // Access - //- Return const access to the vapourisation temperature - inline scalar Tvap() const; - - //- Return const access to the boiling point - inline scalar Tbp() const; - - //- Return const access to the latent heat of devolatilisation - inline scalar Ldevol() const; + //- Return const access to the minimum pressure + inline scalar pMin() const; //- Return const access to the constant volume flag inline Switch constantVolume() const; + + //- Return const access to the vaporisation temperature + inline scalar Tvap() const; }; @@ -162,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; }; @@ -178,20 +171,7 @@ protected: scalar mass0_; //- Mass fractions of mixture [] - scalarField YMixture_; - - //- Mass fractions of gases [] - scalarField YGas_; - - //- Mass fractions of liquids [] - scalarField YLiquid_; - - //- Mass fractions of solids [] - scalarField YSolid_; - - //- Flag to say that the particle is allowed to combust - // Only true after volatile content falls below threshold value - bool canCombust_; + scalarField Y_; // Cell-based quantities @@ -202,56 +182,70 @@ protected: // Protected member functions - //- Calculate mass transfer + //- Calculate Phase change template<class TrackData> - void calcMassTransfer + void calcPhaseChange ( TrackData& td, - const scalar dt, - const scalar T0, - const scalar T1, - scalarList& dMassMT + const scalar dt, // timestep + const label cellI, // owner cell + const scalar d, // diameter + const scalar T, // temperature + const vector& U, // velocity + const scalar mass, // mass + 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 + scalar& Sh, // explicit particle enthalpy source + scalar& dhsTrans // sensible enthalpy transfer to carrier ); - //- Calculate surface reactions - template<class TrackData> - void calcSurfaceReactions + //- Update mass fraction + scalar updateMassFraction ( - TrackData& td, - const scalar dt, - const label celli, - const scalar T0, - const scalar T1, - const scalarList& dMassMT, - scalarList& dMassSR, - scalar& dhRet - ); + const scalar mass0, + const scalarField& dMass, + scalarField& Y + ) const; 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 ( ReactingCloud<ParcelType>& owner, - const label typeId, const vector& position, - const label celli, + const label cellI, + const label typeId, + const scalar nParticle0, const scalar d0, const vector& U0, - const scalar nParticle0, - const scalarField& YGas0, - const scalarField& YLiquid0, - const scalarField& YSolid0, - const scalarField& YMixture0, + const scalarField& Y0, const constantProperties& constProps ); @@ -263,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)); } @@ -274,74 +271,61 @@ public: // Access - //- Return const access to mass fractions of gases - inline const scalarField& YGas() const; - - //- Return const access to mass fractions of liquids - inline const scalarField& YLiquid() const; - - //- Return const access to mass fractions of solids - inline const scalarField& YSolid() const; - - //- Return const access to mass fractions of mixture - inline const scalarField& YMixture() const; - //- Return const access to initial mass inline scalar mass0() const; + //- Return const access to mass fractions of mixture + inline const scalarField& Y() const; - // Edit - - //- Return access to mass fractions of gases - inline scalarField& YGas(); - - //- Return access to mass fractions of liquids - inline scalarField& YLiquid(); + //- Return the owner cell pressure + inline scalar pc() const; - //- Return access to mass fractions of solids - inline scalarField& YSolid(); - //- Return access to mass fractions of mixture - inline scalarField& YMixture(); + // Edit //- Return access to initial mass inline scalar& mass0(); + //- Return access to mass fractions of mixture + inline scalarField& Y(); + // Main calculation loop - //- Update cell based quantities + //- Set cell values template<class TrackData> - void updateCellQuantities + void setCellValues ( TrackData& td, const scalar dt, - const label celli + const label cellI ); - //- Coupled calculation with the continuous phase + //- Correct cell values using latest transfer information template<class TrackData> - void calcCoupled + void cellValueSourceCorrection ( TrackData& td, const scalar dt, - const label celli + const label cellI ); - //- Uncoupled calculation with the continuous phase + //- Update parcel properties over the time interval template<class TrackData> - void calcUncoupled + void calc ( TrackData& td, const scalar dt, - const label + const label cellI ); // I-O + //- Read static void readFields(ReactingCloud<ParcelType>& c); + //- Write static void writeFields(const ReactingCloud<ParcelType>& c); @@ -374,4 +358,3 @@ public: #endif // ************************************************************************* // - diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H index d4db4722d673bdcc400ea9b36784a2d277288c0d..5c2b3c7b2d4b0fb885052120a4eec448831e01d7 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H @@ -29,14 +29,13 @@ License template<class ParcelType> inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties ( - const dictionary& dict + const dictionary& parentDict ) : - ThermoParcel<ParcelType>::constantProperties(dict), - Tvap_(dimensionedScalar(dict.lookup("Tvap")).value()), - Tbp_(dimensionedScalar(dict.lookup("Tbp")).value()), - Ldevol_(dimensionedScalar(dict.lookup("Ldevol")).value()), - constantVolume_(dict.lookup("constantVolume")) + ThermoParcel<ParcelType>::constantProperties(parentDict), + pMin_(dimensionedScalar(this->dict().lookup("pMin")).value()), + constantVolume_(this->dict().lookup("constantVolume")), + Tvap_(dimensionedScalar(this->dict().lookup("Tvap")).value()) {} @@ -75,35 +74,44 @@ template<class ParcelType> inline Foam::ReactingParcel<ParcelType>::ReactingParcel ( ReactingCloud<ParcelType>& owner, - const label typeId, const vector& position, - const label celli, + const label cellI +) +: + ThermoParcel<ParcelType>(owner, position, cellI), + mass0_(0.0), + Y_(0), + pc_(0.0) +{} + + +template<class ParcelType> +inline Foam::ReactingParcel<ParcelType>::ReactingParcel +( + ReactingCloud<ParcelType>& owner, + const vector& position, + const label cellI, + const label typeId, + const scalar nParticle0, const scalar d0, const vector& U0, - const scalar nParticle0, - const scalarField& YGas0, - const scalarField& YLiquid0, - const scalarField& YSolid0, - const scalarField& YMixture0, + const scalarField& Y0, const constantProperties& constProps ) : ThermoParcel<ParcelType> ( owner, - typeId, position, - celli, + cellI, + typeId, + nParticle0, d0, U0, - nParticle0, constProps ), mass0_(0.0), - YMixture_(YMixture0), - YGas_(YGas0), - YLiquid_(YLiquid0), - YSolid_(YSolid0), + Y_(Y0), pc_(0.0) { // Set initial parcel mass @@ -115,33 +123,25 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel template<class ParcelType> inline Foam::scalar -Foam::ReactingParcel<ParcelType>::constantProperties::Tvap() const +Foam::ReactingParcel<ParcelType>::constantProperties::pMin() const { - return Tvap_; + return pMin_; } template<class ParcelType> -inline Foam::scalar -Foam::ReactingParcel<ParcelType>::constantProperties::Tbp() const +inline Foam::Switch +Foam::ReactingParcel<ParcelType>::constantProperties::constantVolume() const { - return Tbp_; + return constantVolume_; } template<class ParcelType> inline Foam::scalar -Foam::ReactingParcel<ParcelType>::constantProperties::Ldevol() const -{ - return Ldevol_; -} - - -template<class ParcelType> -inline Foam::Switch -Foam::ReactingParcel<ParcelType>::constantProperties::constantVolume() const +Foam::ReactingParcel<ParcelType>::constantProperties::Tvap() const { - return constantVolume_; + return Tvap_; } @@ -174,72 +174,37 @@ Foam::ReactingParcel<ParcelType>::trackData::pInterp() const // * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * // template<class ParcelType> -inline const Foam::scalarField& Foam::ReactingParcel<ParcelType>::YGas() const -{ - return YGas_; -} - - -template<class ParcelType> -inline Foam::scalarField& Foam::ReactingParcel<ParcelType>::YGas() -{ - return YGas_; -} - - -template<class ParcelType> -inline const Foam::scalarField& Foam::ReactingParcel<ParcelType>::YLiquid() const -{ - return YLiquid_; -} - - -template<class ParcelType> -inline Foam::scalarField& Foam::ReactingParcel<ParcelType>::YLiquid() -{ - return YLiquid_; -} - - -template<class ParcelType> -inline const Foam::scalarField& Foam::ReactingParcel<ParcelType>::YSolid() const -{ - return YSolid_; -} - - -template<class ParcelType> -inline Foam::scalarField& Foam::ReactingParcel<ParcelType>::YSolid() +inline Foam::scalar Foam::ReactingParcel<ParcelType>::mass0() const { - return YSolid_; + return mass0_; } template<class ParcelType> -inline const Foam::scalarField& Foam::ReactingParcel<ParcelType>::YMixture() const +inline const Foam::scalarField& Foam::ReactingParcel<ParcelType>::Y() const { - return YMixture_; + return Y_; } template<class ParcelType> -inline Foam::scalarField& Foam::ReactingParcel<ParcelType>::YMixture() +inline Foam::scalar Foam::ReactingParcel<ParcelType>::pc() const { - return YMixture_; + return pc_; } template<class ParcelType> -inline Foam::scalar Foam::ReactingParcel<ParcelType>::mass0() const +inline Foam::scalar& Foam::ReactingParcel<ParcelType>::mass0() { return mass0_; } template<class ParcelType> -inline Foam::scalar& Foam::ReactingParcel<ParcelType>::mass0() +inline Foam::scalarField& Foam::ReactingParcel<ParcelType>::Y() { - return mass0_; + return Y_; } diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C index fb9a9142736a0870a43cb5ac661f893b4432e18d..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> @@ -39,33 +48,20 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel : ThermoParcel<ParcelType>(cloud, is, readFields), mass0_(0.0), - YMixture_(0), - YGas_(0), - YLiquid_(0), - YSolid_(0), + Y_(0), pc_(0.0) { if (readFields) { const ReactingCloud<ParcelType>& cR = - dynamic_cast<const ReactingCloud<ParcelType>& >(cloud); + dynamic_cast<const ReactingCloud<ParcelType>&>(cloud); - const label nMixture = cR.composition().compositionNames().size(); - const label nGas = cR.composition().gasNames().size(); - const label nLiquid = cR.composition().liquidNames().size(); - const label nSolid = cR.composition().solidNames().size(); - - YMixture_.setSize(nMixture); - YGas_.setSize(nGas); - YLiquid_.setSize(nLiquid); - YSolid_.setSize(nSolid); + const label nMixture = cR.composition().phaseTypes().size(); + Y_.setSize(nMixture); if (is.format() == IOstream::ASCII) { - is >> mass0_ >> YMixture_ >> YGas_ >> YLiquid_ >> YSolid_; - YGas_ /= YMixture_[0] + VSMALL; - YLiquid_ /= YMixture_[1] + VSMALL; - YSolid_ /= YMixture_[2] + VSMALL; + is >> mass0_ >> Y_; } else { @@ -74,10 +70,7 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel reinterpret_cast<char*>(&mass0_), + sizeof(mass0_) ); - is >> YMixture_ >> YGas_ >> YLiquid_ >> YSolid_; - YGas_ /= YMixture_[0] + VSMALL; - YLiquid_ /= YMixture_[1] + VSMALL; - YSolid_ /= YMixture_[2] + VSMALL; + is >> Y_; } } @@ -85,7 +78,11 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel is.check ( "ReactingParcel<ParcelType>::ReactingParcel" - "(const Cloud<ParcelType>&, Istream&, bool)" + "(" + "const Cloud<ParcelType>&, " + "Istream&, " + "bool" + ")" ); } @@ -114,83 +111,39 @@ void Foam::ReactingParcel<ParcelType>::readFields } // Get names and sizes for each Y... - const wordList compositionNames = c.composition().compositionNames(); - const wordList gasNames = c.composition().gasNames(); - const wordList liquidNames = c.composition().liquidNames(); - const wordList solidNames = c.composition().solidNames(); - const label nComposition = compositionNames.size(); - const label nGas = gasNames.size(); - const label nLiquid = liquidNames.size(); - const label nSolid = solidNames.size(); - - // Set storage for each Y... for each parcel - forAllIter(typename Cloud<ParcelType>, c, iter) + const wordList& phaseTypes = c.composition().phaseTypes(); + const label nPhases = phaseTypes.size(); + wordList stateLabels(nPhases, ""); + if (c.composition().nPhase() == 1) { - ReactingParcel<ParcelType>& p = iter(); - p.YMixture_.setSize(nComposition, 0.0); - p.YGas_.setSize(nGas, 0.0); - p.YLiquid_.setSize(nLiquid, 0.0); - p.YSolid_.setSize(nSolid, 0.0); + stateLabels = c.composition().stateLabels(); } - // Populate YMixture for each parcel - forAll(compositionNames, j) - { - IOField<scalar> YMixture - ( - c.fieldIOobject("Y" + compositionNames[j], IOobject::MUST_READ) - ); - label i = 0; - forAllIter(typename Cloud<ParcelType>, c, iter) - { - ReactingParcel<ParcelType>& p = iter(); - p.YMixture_[j] = YMixture[i++]; - } - } - // Populate YGas for each parcel - forAll(gasNames, j) + // Set storage for each Y... for each parcel + forAllIter(typename Cloud<ParcelType>, c, iter) { - IOField<scalar> YGas - ( - c.fieldIOobject("Y" + gasNames[j], IOobject::MUST_READ) - ); - - label i = 0; - forAllIter(typename Cloud<ParcelType>, c, iter) - { - ReactingParcel<ParcelType>& p = iter(); - p.YGas_[j] = YGas[i++]/p.YMixture_[0]; - } + ReactingParcel<ParcelType>& p = iter(); + p.Y_.setSize(nPhases, 0.0); } - // Populate YLiquid for each parcel - forAll(liquidNames, j) - { - IOField<scalar> YLiquid - ( - c.fieldIOobject("Y" + liquidNames[j], IOobject::MUST_READ) - ); - label i = 0; - forAllIter(typename Cloud<ParcelType>, c, iter) - { - ReactingParcel<ParcelType>& p = iter(); - p.YLiquid_[j] = YLiquid[i++]/p.YMixture_[1]; - } - } - // Populate YSolid for each parcel - forAll(solidNames, j) + // Populate Y for each parcel + forAll(phaseTypes, j) { - IOField<scalar> YSolid + IOField<scalar> Y ( - c.fieldIOobject("Y" + solidNames[j], IOobject::MUST_READ) + c.fieldIOobject + ( + "Y" + phaseTypes[j] + stateLabels[j], + IOobject::MUST_READ + ) ); label i = 0; forAllIter(typename Cloud<ParcelType>, c, iter) { ReactingParcel<ParcelType>& p = iter(); - p.YSolid_[j] = YSolid[i++]/p.YMixture_[2]; + p.Y_[j] = Y[i++]; } } } @@ -204,82 +157,37 @@ void Foam::ReactingParcel<ParcelType>::writeFields { ThermoParcel<ParcelType>::writeFields(c); - label np = c.size(); - - IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::NO_READ), np); + const label np = c.size(); - label i = 0; - forAllConstIter(typename Cloud<ParcelType>, c, iter) - { - const ReactingParcel<ParcelType>& p = iter(); - mass0[i++] = p.mass0_; - } - - mass0.write(); - - // Write the composition fractions if (np > 0) { - const wordList compositionNames = c.composition().compositionNames(); - forAll(compositionNames, j) - { - IOField<scalar> YMixture - ( - c.fieldIOobject("Y" + compositionNames[j], IOobject::NO_READ), - np - ); - - label i = 0; - forAllConstIter(typename Cloud<ParcelType>, c, iter) - { - const ReactingParcel<ParcelType>& p0 = iter(); - YMixture[i++] = p0.YMixture()[j]; - } + IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::NO_READ), np); - YMixture.write(); - } - const wordList& gasNames = c.composition().gasNames(); - forAll(gasNames, j) + label i = 0; + forAllConstIter(typename Cloud<ParcelType>, c, iter) { - IOField<scalar> YGas - ( - c.fieldIOobject("Y" + gasNames[j], IOobject::NO_READ), - np - ); - - label i = 0; - forAllConstIter(typename Cloud<ParcelType>, c, iter) - { - const ReactingParcel<ParcelType>& p0 = iter(); - YGas[i++] = p0.YGas()[j]*p0.YMixture()[0]; - } - - YGas.write(); + const ReactingParcel<ParcelType>& p = iter(); + mass0[i++] = p.mass0_; } - const wordList& liquidNames = c.composition().liquidNames(); - forAll(liquidNames, j) - { - IOField<scalar> YLiquid - ( - c.fieldIOobject("Y" + liquidNames[j], IOobject::NO_READ), - np - ); + mass0.write(); - label i = 0; - forAllConstIter(typename Cloud<ParcelType>, c, iter) - { - const ReactingParcel<ParcelType>& p0 = iter(); - YLiquid[i++] = p0.YLiquid()[j]*p0.YMixture()[1]; - } - - YLiquid.write(); + // Write the composition fractions + const wordList& phaseTypes = c.composition().phaseTypes(); + wordList stateLabels(phaseTypes.size(), ""); + if (c.composition().nPhase() == 1) + { + stateLabels = c.composition().stateLabels(); } - const wordList& solidNames = c.composition().solidNames(); - forAll(solidNames, j) + + forAll(phaseTypes, j) { - IOField<scalar> YSolid + IOField<scalar> Y ( - c.fieldIOobject("Y" + solidNames[j], IOobject::NO_READ), + c.fieldIOobject + ( + "Y" + phaseTypes[j] + stateLabels[j], + IOobject::NO_READ + ), np ); @@ -287,10 +195,10 @@ void Foam::ReactingParcel<ParcelType>::writeFields forAllConstIter(typename Cloud<ParcelType>, c, iter) { const ReactingParcel<ParcelType>& p0 = iter(); - YSolid[i++] = p0.YSolid()[j]*p0.YMixture()[2]; + Y[i++] = p0.Y()[j]; } - YSolid.write(); + Y.write(); } } } @@ -305,27 +213,21 @@ Foam::Ostream& Foam::operator<< const ReactingParcel<ParcelType>& p ) { - scalarField YGasLoc = p.YGas()*p.YMixture()[0]; - scalarField YLiquidLoc = p.YLiquid()*p.YMixture()[1]; - scalarField YSolidLoc = p.YSolid()*p.YMixture()[2]; if (os.format() == IOstream::ASCII) { - os << static_cast<const ThermoParcel<ParcelType>& >(p) + os << static_cast<const ThermoParcel<ParcelType>&>(p) << token::SPACE << p.mass0() - << token::SPACE << p.YMixture() - << token::SPACE << YGasLoc - << token::SPACE << YLiquidLoc - << token::SPACE << YSolidLoc; + << token::SPACE << p.Y(); } else { - os << static_cast<const ThermoParcel<ParcelType>& >(p); + os << static_cast<const ThermoParcel<ParcelType>&>(p); os.write ( reinterpret_cast<const char*>(&p.mass0_), sizeof(p.mass0()) ); - os << p.YMixture() << YGasLoc << YLiquidLoc << YSolidLoc; + 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 16854519d04f47a6eba987ed11d12cf6162006fc..4596a471259111fbd0092bbbea56b88c676f3c55 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C @@ -30,121 +30,114 @@ License template<class ParcelType> template<class TrackData> -void Foam::ThermoParcel<ParcelType>::updateCellQuantities +void Foam::ThermoParcel<ParcelType>::setCellValues ( TrackData& td, const scalar dt, - const label celli + const label cellI ) { - KinematicParcel<ParcelType>::updateCellQuantities(td, dt, celli); + KinematicParcel<ParcelType>::setCellValues(td, dt, cellI); - Tc_ = td.TInterp().interpolate(this->position(), celli); - cpc_ = td.cpInterp().interpolate(this->position(), celli); + cpc_ = td.cpInterp().interpolate(this->position(), cellI); + + Tc_ = td.TInterp().interpolate(this->position(), cellI); + + if (Tc_ < td.constProps().TMin()) + { + WarningIn + ( + "void Foam::ThermoParcel<ParcelType>::setCellValues" + "(" + "TrackData&, " + "const scalar, " + "const label" + ")" + ) << "Limiting temperature in cell " << cellI << " to " + << td.constProps().TMin() << nl << endl; + + Tc_ = td.constProps().TMin(); + } } template<class ParcelType> template<class TrackData> -void Foam::ThermoParcel<ParcelType>::calcCoupled +void Foam::ThermoParcel<ParcelType>::cellValueSourceCorrection ( TrackData& td, const scalar dt, - const label celli + const label cellI ) { - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Define local properties at beginning of timestep - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - const vector U0 = this->U_; - const scalar mass0 = this->mass(); - const scalar np0 = this->nParticle_; -// const scalar T0 = T_; -// const scalar cp0 = cp_; - - - // ~~~~~~~~~~~~~~~~~~~~~~~~~ - // Initialise transfer terms - // ~~~~~~~~~~~~~~~~~~~~~~~~~ - - // Momentum transfer from the particle to the carrier phase - vector dUTrans = vector::zero; - - // Enthalpy transfer from the particle to the carrier phase - scalar dhTrans = 0.0; - + this->Uc_ += td.cloud().UTrans()[cellI]/this->massCell(cellI); - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Calculate velocity - update U - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - scalar Cud = 0.0; - const vector U1 = calcVelocity(td, dt, Cud, dUTrans); - - - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Calculate heat transfer - update T - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - scalar htc = 0.0; - const scalar T1 = calcHeatTransfer(td, dt, celli, htc, dhTrans); - - - // ~~~~~~~~~~~~~~~~~~~~~~~ - // Accumulate source terms - // ~~~~~~~~~~~~~~~~~~~~~~~ - - // Update momentum transfer - td.cloud().UTrans()[celli] += np0*dUTrans; - - // Accumulate coefficient to be applied in carrier phase momentum coupling - td.cloud().UCoeff()[celli] += np0*mass0*Cud; - - // Update enthalpy transfer - td.cloud().hTrans()[celli] += np0*dhTrans; - - // Accumulate coefficient to be applied in carrier phase enthalpy coupling - td.cloud().hCoeff()[celli] += np0*htc*this->areaS(); - - - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Set new particle properties - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - this->U() = U1; - this->T() = T1; + scalar cpMean = td.cpInterp().psi()[cellI]; + Tc_ += td.cloud().hsTrans()[cellI]/(cpMean*this->massCell(cellI)); } template<class ParcelType> template<class TrackData> -void Foam::ThermoParcel<ParcelType>::calcUncoupled +void Foam::ThermoParcel<ParcelType>::calc ( TrackData& td, const scalar dt, - const label celli + const label cellI ) { - // ~~~~~~~~~~~~~~~~~~~~~~~~~ - // Initialise transfer terms - // ~~~~~~~~~~~~~~~~~~~~~~~~~ + // Define local properties at beginning of time step + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + const scalar np0 = this->nParticle_; + const scalar d0 = this->d_; + const vector U0 = this->U_; + const scalar rho0 = this->rho_; + const scalar T0 = this->T_; + const scalar cp0 = this->cp_; + const scalar mass0 = this->mass(); + + // Explicit momentum source for particle + vector Su = vector::zero; // Momentum transfer from the particle to the carrier phase vector dUTrans = vector::zero; - // Enthalpy transfer from the particle to the carrier phase - scalar dhTrans = 0.0; + // 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 + // ~~~~~~~~~~~~~ + + // Calculate new particle velocity + scalar T1 = + calcHeatTransfer(td, dt, cellI, d0, U0, rho0, T0, cp0, Sh, dhsTrans); + + // Motion + // ~~~~~~ - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Calculate velocity - update U - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - scalar Cud = 0.0; - this->U_ = calcVelocity(td, dt, Cud, dUTrans); + // Calculate new particle velocity + vector U1 = calcVelocity(td, dt, cellI, d0, U0, rho0, mass0, Su, dUTrans); - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Calculate heat transfer - update T - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - scalar htc = 0.0; - T_ = calcHeatTransfer(td, dt, celli, htc, dhTrans); + // Accumulate carrier phase source terms + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + if (td.cloud().coupled()) + { + // Update momentum transfer + td.cloud().UTrans()[cellI] += np0*dUTrans; + + // Update sensible enthalpy transfer + td.cloud().hsTrans()[cellI] += np0*dhsTrans; + } + + // Set new particle properties + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + this->U_ = U1; + T_ = T1; } @@ -154,69 +147,93 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer ( TrackData& td, const scalar dt, - const label celli, - scalar& htc, - scalar& dhTrans + const label cellI, + const scalar d, + const vector& U, + const scalar rho, + const scalar T, + const scalar cp, + const scalar Sh, + scalar& dhsTrans ) { if (!td.cloud().heatTransfer().active()) { - htc = 0.0; - dhTrans = 0.0; - return T_; + return T; } // Calc heat transfer coefficient - htc = td.cloud().heatTransfer().h + scalar htc = td.cloud().heatTransfer().h ( - this->d_, - this->U_ - this->Uc_, + d, + U - this->Uc_, this->rhoc_, - this->rho_, + rho, cpc_, - cp_, + cp, this->muc_ ); - // Determine ap and bp coefficients - scalar ap = Tc_; - scalar bp = htc; - if (td.cloud().radiation()) + const scalar As = this->areaS(d); + + 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); + } + + scalar ap; + scalar bp; - // Helper variables + 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 epsilonSigmaT3 = epsilon*sigma*pow3(T_); - ap = (htc*Tc_ + 0.25*epsilon*G[celli])/(htc + epsilonSigmaT3); - bp += epsilonSigmaT3; - } - bp *= 6.0/(this->rho_*this->d_*cp_); + ap = + (Sh/As + htc*Tc_ + epsilon*G[cellI]/4.0) + /(htc + epsilon*sigma*pow3(T)); - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Set new particle temperature - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 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); + td.cloud().TIntegrator().integrate(T, dt, ap, bp); - // Using average parcel temperature for enthalpy transfer calculation - dhTrans = dt*this->areaS()*htc*(Tres.average() - Tc_); + dhsTrans += dt*htc*As*(Tres.average() - Tc_); return Tres.value(); } -// * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * 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 9d54beba256a5a8318db89ecb291b41384f75b0a..c11fecd11dc9166cfe5f1753686cf6bcd6030132 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H @@ -72,7 +72,6 @@ class ThermoParcel : public KinematicParcel<ParcelType> { - public: //- Class to hold thermo particle constant properties @@ -86,6 +85,9 @@ public: //- Particle initial temperature [K] const scalar T0_; + //- Minimum temperature [K] + const scalar TMin_; + //- Particle specific heat capacity [J/(kg.K)] const scalar cp0_; @@ -99,24 +101,28 @@ public: public: // Constructors - constantProperties(const dictionary& dict); + constantProperties(const dictionary& parentDict); // Member functions // Access - //- Return const access to particle initial temperature [K] + //- Return const access to the particle initial temperature [K] inline scalar T0() const; - //- Return const access to particle specific heat capacity + //- Return const access to minimum temperature [K] + inline scalar TMin() const; + + //- Return const access to the particle specific heat capacity // [J/(kg.K)] inline scalar cp0() const; - //- Return const access to Particle emissivity [] (radiation) + //- Return const access to the particle emissivity [] + // Active for radiation only inline scalar epsilon0() const; - //- Return const access to Particle scattering factor [] - // (radiation) + //- Return const access to the particle scattering factor [] + // Active for radiation only inline scalar f0() const; }; @@ -140,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_; @@ -170,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; }; @@ -209,33 +215,53 @@ protected: scalar calcHeatTransfer ( TrackData& td, - const scalar dt, - const label celli, - scalar& htc, - scalar& dhTrans + const scalar dt, // timestep + const label cellI, // owner cell + const scalar d, // diameter + const vector& U, // velocity + const scalar rho, // density + const scalar T, // temperature + const scalar cp, // specific heat capacity + 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 ( ThermoCloud<ParcelType>& owner, - const label typeId, const vector& position, - const label celli, + const label cellI, + const label typeId, + const scalar nParticle0, const scalar d0, const vector& U0, - const scalar nParticle0, const constantProperties& constProps ); @@ -247,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)); } @@ -276,38 +305,40 @@ public: // Main calculation loop - //- Update cell based quantities + //- Set cell values template<class TrackData> - void updateCellQuantities + void setCellValues ( TrackData& td, const scalar dt, - const label celli + const label cellI ); - //- Coupled calculation with the continuous phase + //- Correct cell values using latest transfer information template<class TrackData> - void calcCoupled + void cellValueSourceCorrection ( TrackData& td, const scalar dt, - const label celli + const label cellI ); - //- Uncoupled calculation with the continuous phase + //- Update parcel properties over the time interval template<class TrackData> - void calcUncoupled + void calc ( TrackData& td, const scalar dt, - const label + const label cellI ); // I-O + //- Read static void readFields(ThermoCloud<ParcelType>& c); + //- Write static void writeFields(const ThermoCloud<ParcelType>& c); @@ -340,4 +371,3 @@ public: #endif // ************************************************************************* // - diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H index f1f6e1d8fdec3dcc61cc2fd734e7ab3d17235df7..8ce0cb56915196a30a7348af7582c64161d17523 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H @@ -29,14 +29,15 @@ License template<class ParcelType> inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties ( - const dictionary& dict + const dictionary& parentDict ) : - KinematicParcel<ParcelType>::constantProperties(dict), - T0_(dimensionedScalar(dict.lookup("T0")).value()), - cp0_(dimensionedScalar(dict.lookup("cp0")).value()), - epsilon0_(dimensionedScalar(dict.lookup("epsilon0")).value()), - f0_(dimensionedScalar(dict.lookup("f0")).value()) + KinematicParcel<ParcelType>::constantProperties(parentDict), + T0_(dimensionedScalar(this->dict().lookup("T0")).value()), + TMin_(dimensionedScalar(this->dict().lookup("TMin")).value()), + cp0_(dimensionedScalar(this->dict().lookup("cp0")).value()), + epsilon0_(dimensionedScalar(this->dict().lookup("epsilon0")).value()), + f0_(dimensionedScalar(this->dict().lookup("f0")).value()) {} @@ -73,24 +74,40 @@ template<class ParcelType> inline Foam::ThermoParcel<ParcelType>::ThermoParcel ( ThermoCloud<ParcelType>& owner, - const label typeId, const vector& position, - const label celli, + 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 +( + ThermoCloud<ParcelType>& owner, + const vector& position, + const label cellI, + const label typeId, + const scalar nParticle0, const scalar d0, const vector& U0, - const scalar nParticle0, const constantProperties& constProps ) : KinematicParcel<ParcelType> ( owner, - typeId, position, - celli, + cellI, + typeId, + nParticle0, d0, U0, - nParticle0, constProps ), T_(constProps.T0()), @@ -110,6 +127,14 @@ Foam::ThermoParcel<ParcelType>::constantProperties::T0() const } +template <class ParcelType> +inline Foam::scalar +Foam::ThermoParcel<ParcelType>::constantProperties::TMin() const +{ + return TMin_; +} + + template <class ParcelType> inline Foam::scalar Foam::ThermoParcel<ParcelType>::constantProperties::cp0() const @@ -178,16 +203,16 @@ inline Foam::scalar Foam::ThermoParcel<ParcelType>::T() const template<class ParcelType> -inline Foam::scalar& Foam::ThermoParcel<ParcelType>::T() +inline Foam::scalar Foam::ThermoParcel<ParcelType>::cp() const { - return T_; + return cp_; } template<class ParcelType> -inline Foam::scalar Foam::ThermoParcel<ParcelType>::cp() const +inline Foam::scalar& Foam::ThermoParcel<ParcelType>::T() { - return cp_; + return T_; } diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelIO.C index 08433679bb205ef7c9044d9e75c7a9aa5a2825cc..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> @@ -140,13 +149,13 @@ Foam::Ostream& Foam::operator<< { if (os.format() == IOstream::ASCII) { - os << static_cast<const KinematicParcel<ParcelType>& >(p) + os << static_cast<const KinematicParcel<ParcelType>&>(p) << token::SPACE << p.T() << token::SPACE << p.cp(); } else { - os << static_cast<const KinematicParcel<ParcelType>& >(p); + os << static_cast<const KinematicParcel<ParcelType>&>(p); os.write ( reinterpret_cast<const char*>(&p.T_), diff --git a/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcel.C b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcel.C new file mode 100644 index 0000000000000000000000000000000000000000..b41cb31df9454bcd2e03ccb799cf146b26fd5a32 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcel.C @@ -0,0 +1,47 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 TrackedReactingParcel<ParcelType>& p +) +: + ReactingParcel<ParcelType>(p), + ParticleTrackingData<ParcelType>(p) +{} + + +// * * * * * * * * * * * * * * 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/Templates/TrackedReactingParcel/TrackedReactingParcelI.H b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcelI.H new file mode 100644 index 0000000000000000000000000000000000000000..a3bf01eb35772d6f5fdd64feafc21de6449b8a61 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcelI.H @@ -0,0 +1,72 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * * 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) +{} + + +template <class ParcelType> +inline Foam::TrackedReactingParcel<ParcelType>::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 +) +: + ReactingParcel<ParcelType> + ( + owner, + position, + cellI, + typeId, + nParticle0, + d0, + U0, + Y0, + constProps + ), + 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 new file mode 100644 index 0000000000000000000000000000000000000000..f216f8f54780b9b87ac2d928dd9ab4e2f9fbf4c9 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/BasicReactingMultiphaseParcel.H @@ -0,0 +1,141 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::BasicReactingMultiphaseParcel + +Description + + +SourceFiles + BasicReactingMultiphaseParcel.C + BasicReactingMultiphaseParcelIO.C + +\*---------------------------------------------------------------------------*/ + +#ifndef BasicReactingMultiphaseParcel_H +#define BasicReactingMultiphaseParcel_H + +#include "ReactingMultiphaseParcel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +namespace Foam +{ + +// Forward declaration of classes +template<class ThermoType> +class BasicReactingMultiphaseParcel; + +/*---------------------------------------------------------------------------*\ + Class BasicReactingMultiphaseParcel Declaration +\*---------------------------------------------------------------------------*/ + +template<class ThermoType> +class BasicReactingMultiphaseParcel +: + public ReactingMultiphaseParcel<BasicReactingMultiphaseParcel<ThermoType> > +{ + +public: + + //- The type of thermodynamics this parcel was instantiated for + typedef ThermoType thermoType; + + //- Run-time type information + 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 + ( + ReactingMultiphaseCloud<BasicReactingMultiphaseParcel>& 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 + ); + + //- Construct from Istream + BasicReactingMultiphaseParcel + ( + 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 + { + return + autoPtr<BasicReactingMultiphaseParcel> + ( + new BasicReactingMultiphaseParcel(*this) + ); + } + + + //- Destructor + virtual ~BasicReactingMultiphaseParcel(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "BasicReactingMultiphaseParcel.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#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/BasicReactingParcel/BasicReactingParcel.C b/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/BasicReactingParcel.C new file mode 100644 index 0000000000000000000000000000000000000000..d2b00fdf73f3b6aef58d7d53fbe37a79f4f16f51 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/BasicReactingParcel.C @@ -0,0 +1,102 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class ThermoType> +Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel +( + ReactingCloud<BasicReactingParcel<ThermoType> >& owner, + const vector& position, + const label cellI +) +: + ReactingParcel<BasicReactingParcel<ThermoType> >(owner, position, cellI) +{} + + +template<class ThermoType> +Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel +( + ReactingCloud<BasicReactingParcel<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 ReactingParcel<BasicReactingParcel<ThermoType> >:: + constantProperties& constProps +) +: + ReactingParcel<BasicReactingParcel<ThermoType> > + ( + owner, + position, + cellI, + typeId, + nParticle0, + d0, + U0, + Y0, + constProps + ) +{} + + +template<class ThermoType> +Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel +( + const Cloud<BasicReactingParcel<ThermoType> >& cloud, + Istream& is, + bool readFields +) +: + ReactingParcel<BasicReactingParcel<ThermoType> >(cloud, is, readFields) +{} + + +template<class ThermoType> +Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel +( + const BasicReactingParcel<ThermoType>& p +) +: + ReactingParcel<BasicReactingParcel>(p) +{} + + +// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // + +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 new file mode 100644 index 0000000000000000000000000000000000000000..b8b44eb237e4e2973a1abdbabab0fd943a61fbf7 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/BasicReactingParcel.H @@ -0,0 +1,136 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::BasicReactingParcel + +Description + + +SourceFiles + BasicReactingParcel.C + BasicReactingParcelIO.C + +\*---------------------------------------------------------------------------*/ + +#ifndef BasicReactingParcel_H +#define BasicReactingParcel_H + +#include "ReactingParcel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes +template<class ThermoType> +class BasicReactingParcel; + +/*---------------------------------------------------------------------------*\ + Class BasicReactingParcel Declaration +\*---------------------------------------------------------------------------*/ + +template<class ThermoType> +class BasicReactingParcel +: + public ReactingParcel<BasicReactingParcel<ThermoType> > +{ + +public: + + //- The type of thermodynamics this parcel was instantiated for + typedef ThermoType thermoType; + + //- Run-time type information + 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 + ( + ReactingCloud<BasicReactingParcel>& owner, + const vector& position, + const label cellI, + const label typeId, + const scalar nParticle0, + const scalar d0, + const vector& U0, + const scalarField& Y0, + const typename ReactingParcel<BasicReactingParcel>:: + constantProperties& constProps + ); + + //- Construct from Istream + BasicReactingParcel + ( + 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 + { + return + autoPtr<BasicReactingParcel> + ( + new BasicReactingParcel(*this) + ); + } + + + //- Destructor + virtual ~BasicReactingParcel(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "BasicReactingParcel.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/defineBasicReactingParcel.C b/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/defineBasicReactingParcel.C new file mode 100644 index 0000000000000000000000000000000000000000..2c2e78630d691b2d398b09cbb32587da5e617e3d --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/defineBasicReactingParcel.C @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "createReactingParcelTypes.H" +#include "BasicReactingParcel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + createReactingParcelType(BasicReactingParcel); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/makeBasicReactingParcelSubmodels.C b/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/makeBasicReactingParcelSubmodels.C new file mode 100644 index 0000000000000000000000000000000000000000..a05fd96a37ccedb7d6d77d03705ab66ec50fa611 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/makeBasicReactingParcelSubmodels.C @@ -0,0 +1,63 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "BasicReactingParcel.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 +{ + // 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/intermediate/parcels/derived/BasicTrackedReactingParcel/makeBasicTrackedReactingParcelSubmodels.C b/src/lagrangian/intermediate/parcels/derived/BasicTrackedReactingParcel/makeBasicTrackedReactingParcelSubmodels.C new file mode 100644 index 0000000000000000000000000000000000000000..7d94a79bea88df99a17c5c945bacc614518895b4 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/BasicTrackedReactingParcel/makeBasicTrackedReactingParcelSubmodels.C @@ -0,0 +1,63 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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" + +// 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 +{ + // 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 244f49ad9078c278a8497ce893490c988dde43f7..e7f883dcfdacd0c275f2bb7b7f8c942c1957e980 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/basicKinematicParcel.C +++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/basicKinematicParcel.C @@ -41,24 +41,35 @@ namespace Foam Foam::basicKinematicParcel::basicKinematicParcel ( KinematicCloud<basicKinematicParcel>& owner, - const label typeId, const vector& position, - const label celli, + const label cellI +) +: + KinematicParcel<basicKinematicParcel>(owner, position, cellI) +{} + + +Foam::basicKinematicParcel::basicKinematicParcel +( + KinematicCloud<basicKinematicParcel>& owner, + const vector& position, + const label cellI, + const label typeId, + const scalar nParticle0, const scalar d0, const vector& U0, - const scalar nParticle0, const constantProperties& constProps ) : KinematicParcel<basicKinematicParcel> ( owner, - typeId, position, - celli, + cellI, + typeId, + nParticle0, d0, U0, - nParticle0, constProps ) {} @@ -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 decc0b57e83b1d66ab9bf4074a6c718e5b74dc7a..18b43cbbadc5baa621870b145d8c22b32b8f050e 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/basicKinematicParcel.H +++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/basicKinematicParcel.H @@ -44,7 +44,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class basicKinematicParcel Declaration + Class basicKinematicParcel Declaration \*---------------------------------------------------------------------------*/ class basicKinematicParcel @@ -60,16 +60,25 @@ 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 ( KinematicCloud<basicKinematicParcel>& owner, - const label typeId, const vector& position, - const label celli, + const label cellI, + const label typeId, + const scalar nParticle0, const scalar d0, const vector& U0, - const scalar nParticle0, const constantProperties& constProps ); @@ -81,17 +90,22 @@ 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) + ); } //- Destructor - - virtual ~basicKinematicParcel(); + virtual ~basicKinematicParcel(); }; 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/makeBasicKinematicParcelDispersionModels.C b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDispersionModels.C deleted file mode 100644 index 07a256da8bbc42e672f342a4335f8231de3489e4..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDispersionModels.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 "basicKinematicParcel.H" -#include "KinematicCloud.H" -#include "NoDispersion.H" -#include "GradientDispersionRAS.H" -#include "StochasticDispersionRAS.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 - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDragModels.C b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDragModels.C deleted file mode 100644 index b21de1c4489572d4faca52563464af57d31be0b5..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDragModels.C +++ /dev/null @@ -1,42 +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 "NoDrag.H" -#include "SphereDrag.H" - -namespace Foam -{ - makeDragModel(KinematicCloud<basicKinematicParcel>); - - // Add instances of drag model to the table - makeDragModelType(NoDrag, KinematicCloud, basicKinematicParcel); - makeDragModelType(SphereDrag, KinematicCloud, basicKinematicParcel); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C deleted file mode 100644 index 4d3668bbe4fa3b64652c18f5ff00c53e669b8c3b..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C +++ /dev/null @@ -1,59 +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 "NoInjection.H" -#include "ManualInjection.H" -#include "ConeInjection.H" - -namespace Foam -{ - makeInjectionModel(KinematicCloud<basicKinematicParcel>); - - // Add instances of injection model to the table - makeInjectionModelType - ( - NoInjection, - KinematicCloud, - basicKinematicParcel - ); - makeInjectionModelType - ( - ManualInjection, - KinematicCloud, - basicKinematicParcel - ); - makeInjectionModelType - ( - ConeInjection, - KinematicCloud, - basicKinematicParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelHeatTransferModels.C b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelSubmodels.C similarity index 66% rename from src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelHeatTransferModels.C rename to src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelSubmodels.C index 1ae2a21d5fe6be7e469867785c88c4c16378a352..6aaa63f9c0614e9b462fba14bb5a96923051ce39 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelHeatTransferModels.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,20 +25,24 @@ License \*---------------------------------------------------------------------------*/ #include "basicKinematicParcel.H" -#include "KinematicCloud.H" -#include "NoHeatTransfer.H" + +// Kinematic +#include "makeParcelDispersionModels.H" +#include "makeParcelDragModels.H" +#include "makeParcelInjectionModels.H" +#include "makeParcelPatchInteractionModels.H" +#include "makeParcelPostProcessingModels.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - makeHeatTransferModel(KinematicCloud<basicKinematicParcel>); - - // Add instances of heat transfer model to the table - makeHeatTransferModelType - ( - NoHeatTransfer, - KinematicCloud, - basicKinematicParcel - ); + // Kinematic sub-models + makeParcelDispersionModels(basicKinematicParcel); + makeParcelDragModels(basicKinematicParcel); + makeParcelInjectionModels(basicKinematicParcel); + makeParcelPatchInteractionModels(basicKinematicParcel); + makeParcelPostProcessingModels(basicKinematicParcel); }; diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelWallInteractionModels.C b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelWallInteractionModels.C deleted file mode 100644 index 3ec099a4cfc72865838630b384a0cca6ab5c00ef..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelWallInteractionModels.C +++ /dev/null @@ -1,52 +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 "Rebound.H" -#include "StandardWallInteraction.H" - -namespace Foam -{ - makeWallInteractionModel(KinematicCloud<basicKinematicParcel>); - - // Add instances of wall interaction model to the table - makeWallInteractionModelType - ( - Rebound, - KinematicCloud, - basicKinematicParcel - ); - makeWallInteractionModelType - ( - StandardWallInteraction, - KinematicCloud, - basicKinematicParcel - ); -}; - - -// ************************************************************************* // 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/makeBasicReactingParcelCompositionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelCompositionModels.C deleted file mode 100644 index f5cdead7272e68d6ca0d4405a44dbda704c46583..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelCompositionModels.C +++ /dev/null @@ -1,45 +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 "SingleMixtureFraction.H" - -namespace Foam -{ - makeCompositionModel(ReactingCloud<basicReactingParcel>); - - // Add instances of composition model to the table - makeCompositionModelType - ( - SingleMixtureFraction, - ReactingCloud, - basicReactingParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelDispersionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelDispersionModels.C deleted file mode 100644 index 79e2149a6a9d8f72e3b117977aff6c198bff5db8..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelDispersionModels.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 "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/makeBasicReactingParcelInjectionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelInjectionModels.C deleted file mode 100644 index ed9f2bd6bed545df27462044b009421ae45bf126..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelInjectionModels.C +++ /dev/null @@ -1,59 +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 "NoInjection.H" -#include "ManualInjection.H" -#include "ConeInjection.H" - -namespace Foam -{ - makeInjectionModel(KinematicCloud<basicReactingParcel>); - - // Add instances of injection model to the table - makeInjectionModelType - ( - NoInjection, - KinematicCloud, - basicReactingParcel - ); - makeInjectionModelType - ( - ManualInjection, - KinematicCloud, - basicReactingParcel - ); - makeInjectionModelType - ( - ConeInjection, - KinematicCloud, - basicReactingParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelMassTransferModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelMassTransferModels.C deleted file mode 100644 index 28cc3039980c3cdc498312f85505b7837998dcc8..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelMassTransferModels.C +++ /dev/null @@ -1,59 +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 "NoMassTransfer.H" -#include "ConstantRateDevolatilisation.H" -#include "SingleKineticRateDevolatilisation.H" - -namespace Foam -{ - makeMassTransferModel(ReactingCloud<basicReactingParcel>); - - // Add instances of mass transfer model to the table - makeMassTransferModelType - ( - NoMassTransfer, - ReactingCloud, - basicReactingParcel - ); - makeMassTransferModelType - ( - ConstantRateDevolatilisation, - ReactingCloud, - basicReactingParcel - ); - makeMassTransferModelType - ( - SingleKineticRateDevolatilisation, - ReactingCloud, - basicReactingParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelSurfaceReactionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelSurfaceReactionModels.C deleted file mode 100644 index e242d7e2fa89f35351dbaacc40655871247f2421..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelSurfaceReactionModels.C +++ /dev/null @@ -1,45 +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 "NoSurfaceReaction.H" - -namespace Foam -{ - makeSurfaceReactionModel(ReactingCloud<basicReactingParcel>); - - // Add instances of surface reaction model to the table - makeSurfaceReactionModelType - ( - NoSurfaceReaction, - ReactingCloud, - basicReactingParcel - ); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelWallInteractionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelWallInteractionModels.C deleted file mode 100644 index 6cc346e8d98ac4d55f8ad0f743e8c36832ebb6c3..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelWallInteractionModels.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 "KinematicCloud.H" -#include "Rebound.H" -#include "StandardWallInteraction.H" - -namespace Foam -{ - makeWallInteractionModel(KinematicCloud<basicReactingParcel>); -// makeWallInteractionModel(ReactingCloud<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 edbeef83b38b4b005527b2a0d99dbab9be1f1c36..7f2524cbd282cfb8d9543c069d22b07db8add93b 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.C +++ b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.C @@ -41,24 +41,35 @@ namespace Foam Foam::basicThermoParcel::basicThermoParcel ( ThermoCloud<basicThermoParcel>& owner, - const label typeId, const vector position, - const label celli, + const label cellI +) +: + ThermoParcel<basicThermoParcel>(owner, position, cellI) +{} + + +Foam::basicThermoParcel::basicThermoParcel +( + ThermoCloud<basicThermoParcel>& owner, + const vector position, + const label cellI, + const label typeId, + const scalar nParticle0, const scalar d0, const vector U0, - const scalar nParticle0, const constantProperties& constProps ) : ThermoParcel<basicThermoParcel> ( owner, - typeId, position, - celli, + cellI, + typeId, + nParticle0, d0, U0, - nParticle0, constProps ) {} @@ -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 0eb00002df4dccecfd3292642d1fa69f2b08955e..974c36e23a96f51bb57d3009fea0a1951fbf331e 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.H +++ b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/basicThermoParcel.H @@ -44,7 +44,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class basicThermoParcel Declaration + Class basicThermoParcel Declaration \*---------------------------------------------------------------------------*/ class basicThermoParcel @@ -59,16 +59,25 @@ 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 ( ThermoCloud<basicThermoParcel>& owner, - const label typeId, const vector position, - const label celli, + const label cellI, + const label typeId, + const scalar nParticle0, const scalar d0, const vector U0, - const scalar nParticle0, const constantProperties& constProps ); @@ -80,16 +89,22 @@ 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) + ); } - // Destructors - - virtual ~basicThermoParcel(); + //- Destructor + virtual ~basicThermoParcel(); }; 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/makeBasicThermoParcelDispersionModels.C b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelDispersionModels.C deleted file mode 100644 index f1ab424f9bab6113a373e34b735d8f3a13ebbaa8..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelDispersionModels.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 "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/makeBasicThermoParcelDragModels.C b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelDragModels.C deleted file mode 100644 index b477000cf52757a84ae0a148128eaf60800e4bff..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelDragModels.C +++ /dev/null @@ -1,42 +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 "NoDrag.H" -#include "SphereDrag.H" - -namespace Foam -{ - makeDragModel(KinematicCloud<basicThermoParcel>); - - // Add instances of drag model to the table - makeDragModelType(NoDrag, KinematicCloud, basicThermoParcel); - makeDragModelType(SphereDrag, KinematicCloud, basicThermoParcel); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelHeatTransferModels.C b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelHeatTransferModels.C deleted file mode 100644 index d8a3c67c97560553618be1ecb21cef4c8636fa22..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelHeatTransferModels.C +++ /dev/null @@ -1,42 +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/derived/basicThermoParcel/makeBasicThermoParcelInjectionModels.C b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelSubmodels.C similarity index 62% rename from src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelInjectionModels.C rename to src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelSubmodels.C index cb51b8685257ca1a7860fd0d30e7e421d21fd5e8..044d8db68ed797c97f9b181bdec78326a1ee9656 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelInjectionModels.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,21 +25,30 @@ License \*---------------------------------------------------------------------------*/ #include "basicThermoParcel.H" -#include "ThermoCloud.H" -#include "NoInjection.H" -#include "ManualInjection.H" -#include "ConeInjection.H" -namespace Foam -{ - makeInjectionModel(KinematicCloud<basicThermoParcel>); +// Kinematic +#include "makeParcelDispersionModels.H" +#include "makeParcelDragModels.H" +#include "makeParcelInjectionModels.H" +#include "makeParcelPatchInteractionModels.H" +#include "makeParcelPostProcessingModels.H" - // Add instances of injection model to the table - makeInjectionModelType(NoInjection, KinematicCloud, basicThermoParcel); +// Thermodynamic +#include "makeParcelHeatTransferModels.H" - makeInjectionModelType(ManualInjection, KinematicCloud, basicThermoParcel); +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - makeInjectionModelType(ConeInjection, KinematicCloud, basicThermoParcel); +namespace Foam +{ + // 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/makeBasicThermoParcelWallInteractionModels.C b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelWallInteractionModels.C deleted file mode 100644 index 03402510f6925d545dbbded33781f55c63d2bf14..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelWallInteractionModels.C +++ /dev/null @@ -1,52 +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 "Rebound.H" -#include "StandardWallInteraction.H" - -namespace Foam -{ - makeWallInteractionModel(KinematicCloud<basicThermoParcel>); - - // Add instances of wall interaction model to the table - makeWallInteractionModelType - ( - Rebound, - KinematicCloud, - basicThermoParcel - ); - makeWallInteractionModelType - ( - StandardWallInteraction, - KinematicCloud, - 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/basicReactingParcel/makeBasicReactingParcelDragModels.C b/src/lagrangian/intermediate/parcels/include/makeParcelDragModels.H similarity index 61% rename from src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelDragModels.C rename to src/lagrangian/intermediate/parcels/include/makeParcelDragModels.H index 69943e76c37d818ce11dd2bfca308f4022e39215..0d47aaf2393bd880b63e3cdbeafb4fdfa12e952a 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelDragModels.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,19 +24,28 @@ License \*---------------------------------------------------------------------------*/ -#include "basicReactingParcel.H" +#ifndef makeParcelDragModels_H +#define makeParcelDragModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #include "KinematicCloud.H" + #include "NoDrag.H" #include "SphereDrag.H" -namespace Foam -{ - makeDragModel(KinematicCloud<basicReactingParcel>); +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#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, basicReactingParcel); - makeDragModelType(SphereDrag, KinematicCloud, basicReactingParcel); -}; +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#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 new file mode 100644 index 0000000000000000000000000000000000000000..d81ebadefcbdc5cf8cf0b4285540e7038baa6dd7 --- /dev/null +++ b/src/lagrangian/intermediate/particleForces/particleForces.C @@ -0,0 +1,172 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "particleForces.H" +#include "fvMesh.H" +#include "volFields.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::particleForces::particleForces +( + const fvMesh& mesh, + const dictionary& dict, + const vector& g +) +: + mesh_(mesh), + dict_(dict.subDict("particleForces")), + g_(g), + gravity_(dict_.lookup("gravity")), + virtualMass_(dict_.lookup("virtualMass")), + Cvm_(0.0), + pressureGradient_(dict_.lookup("pressureGradient")), + gradUName_("unknown_gradUName") +{ + if (gravity_) + { + dict_.lookup("Cvm") >> Cvm_; + } + + if (pressureGradient_) + { + dict_.lookup("gradU") >> gradUName_; + } +} + + +Foam::particleForces::particleForces(const particleForces& f) +: + mesh_(f.mesh_), + dict_(f.dict_), + g_(f.g_), + gravity_(f.gravity_), + virtualMass_(f.virtualMass_), + Cvm_(f.Cvm_), + pressureGradient_(f.pressureGradient_), + gradUName_(f.gradUName_) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::particleForces::~particleForces() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +const Foam::dictionary& Foam::particleForces::dict() const +{ + return dict_; +} + + +const Foam::vector& Foam::particleForces::g() const +{ + return g_; +} + + +Foam::Switch Foam::particleForces::gravity() const +{ + return gravity_; +} + + +Foam::Switch Foam::particleForces::virtualMass() const +{ + return virtualMass_; +} + + +Foam::Switch Foam::particleForces::pressureGradient() const +{ + return pressureGradient_; +} + + +const Foam::word& Foam::particleForces::gradUName() const +{ + return gradUName_; +} + + +Foam::vector Foam::particleForces::calcCoupled +( + const label cellI, + const scalar dt, + const scalar rhoc, + const scalar rho, + const vector& Uc, + const vector& U +) const +{ + vector Ftot = vector::zero; + + // Virtual mass force + if (virtualMass_) + { + notImplemented("Foam::particleForces::calc(...) - virtualMass force"); +// Ftot += Cvm_*rhoc/rho*d(Uc - U)/dt; + } + + // Pressure gradient force + if (pressureGradient_) + { + const volSymmTensorField& gradU = + mesh_.lookupObject<volSymmTensorField>(gradUName_); + Ftot += rhoc/rho*(U & gradU[cellI]); + } + + return Ftot; +} + + +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 new file mode 100644 index 0000000000000000000000000000000000000000..aab27da4653faa4fa950f2c4463f69e6896271b8 --- /dev/null +++ b/src/lagrangian/intermediate/particleForces/particleForces.H @@ -0,0 +1,167 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::particleForces + +Description + Particle forces + +SourceFiles + particleForces.C + +\*---------------------------------------------------------------------------*/ + +#ifndef particleForces_H +#define particleForces_H + +#include "dictionary.H" +#include "Switch.H" +#include "vector.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward class declarations +class fvMesh; + +/*---------------------------------------------------------------------------*\ + Class particleForces Declaration +\*---------------------------------------------------------------------------*/ + +class particleForces +{ + // Private data + + //- Reference to the mesh database + const fvMesh& mesh_; + + //- The particleForces dictionary + const dictionary& dict_; + + //- Gravity + const vector g_; + + + // Forces to include in particle motion evaluation + + //- Gravity + Switch gravity_; + + //- Virtual mass + Switch virtualMass_; + + //- Virtual mass force coefficient + scalar Cvm_; + + //- Pressure gradient + Switch pressureGradient_; + + //- Name of velocity gradient field for pressure gradient force + word gradUName_; + + +public: + + // Constructors + + //- Construct from mesh, dictionary and gravity + particleForces + ( + const fvMesh& mesh, + const dictionary& dict, + const vector& g + ); + + //- Construct copy + particleForces(const particleForces& f); + + + //- Destructor + ~particleForces(); + + + // Member Functions + + // Access + + //- Return the particleForces dictionary + const dictionary& dict() const; + + //- Return the gravity vector + const vector& g() const; + + //- Return gravity force activate switch + Switch gravity() const; + + //- Return virtual mass force activate switch + Switch virtualMass() const; + + //- Return virtual mass force coefficient + Switch Cvm() const; + + //- Return pressure gradient force activate switch + Switch pressureGradient() const; + + //- Return the name of the velocity gradient field + const word& gradUName() const; + + + // Evaluation + + //- 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, + const scalar rhoc, + const scalar rho, + const vector& Uc, + const vector& U + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C new file mode 100644 index 0000000000000000000000000000000000000000..5f04d57d30689b22b5ea80684aed369fc1c1d12b --- /dev/null +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C @@ -0,0 +1,360 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "phaseProperties.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template<> +const char* Foam::NamedEnum<Foam::phaseProperties::phaseType, 4>::names[] = +{ + "gas", + "liquid", + "solid", + "unknown" +}; + + +const Foam::NamedEnum<Foam::phaseProperties::phaseType, 4> + Foam::phaseProperties::phaseTypeNames_; + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::phaseProperties::setGlobalIds(const wordList& globalNames) +{ + forAll(names_, i) + { + forAll(globalNames, j) + { + if (globalNames[j] == names_[i]) + { + globalIds_[i] = j; + break; + } + } + if (globalIds_[i] == -1) + { + FatalErrorIn + ( + "void Foam::phaseProperties::setGlobalIds(const wordList&)" + ) << "Could not find specie " << names_[i] + << " in species list" << nl + << "Available species are: " << nl << globalNames << nl + << exit(FatalError); + } + } +} + + +void Foam::phaseProperties::setGlobalCarrierIds +( + const wordList& carrierNames +) +{ + globalCarrierIds_ = -1; + + forAll(names_, i) + { + forAll (carrierNames, j) + { + if (carrierNames[j] == names_[i]) + { + globalCarrierIds_[i] = j; + break; + } + } + if (globalCarrierIds_[i] == -1) + { + FatalErrorIn + ( + "void Foam::phaseProperties::setGlobalCarrierIds" + "(" + "const wordList&" + ")" + ) << "Could not find carrier specie " << names_[i] + << " in species list" << nl + << "Available species are: " << nl << carrierNames << nl + << exit(FatalError); + } + } +} + + +void Foam::phaseProperties::checkTotalMassFraction() const +{ + scalar total = 0.0; + forAll(Y_, cmptI) + { + total += Y_[cmptI]; + } + + if (Y_.size() != 0 && mag(total - 1.0) > SMALL) + { + FatalErrorIn + ( + "void Foam::phaseProperties::checkTotalMassFraction() const" + ) << "Component fractions must total to unity for phase " + << phaseTypeNames_[phase_] << nl + << "Components: " << nl << names_ << nl << exit(FatalError); + } +} + + +Foam::word Foam::phaseProperties::phaseToStateLabel(const phaseType pt) const +{ + word state = "(unknown)"; + switch (pt) + { + case GAS: + { + state = "(g)"; + break; + } + case LIQUID: + { + state = "(l)"; + break; + } + case SOLID: + { + state = "(s)"; + break; + } + default: + { + FatalErrorIn + ( + "Foam::phaseProperties::phaseToStateLabel(phaseType pt)" + ) << "Invalid phase: " << phaseTypeNames_[pt] << nl + << " phase must be gas, liquid or solid" << nl + << exit(FatalError); + } + } + + return state; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::phaseProperties::phaseProperties() +: + phase_(UNKNOWN), + stateLabel_("(unknown)"), + names_(0), + Y_(0), + globalIds_(0), + globalCarrierIds_(0) +{} + + +Foam::phaseProperties::phaseProperties(const phaseProperties& pp) +: + phase_(pp.phase_), + stateLabel_(pp.stateLabel_), + names_(pp.names_), + Y_(pp.Y_), + globalIds_(pp.globalIds_), + globalCarrierIds_(pp.globalCarrierIds_) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::phaseProperties::~phaseProperties() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::phaseProperties::initialiseGlobalIds +( + const wordList& gasNames, + const wordList& liquidNames, + const wordList& solidNames +) +{ + // determine the addressing to map between components listed in the phase + // with those given in the (main) thermo properties + switch (phase_) + { + case GAS: + { + setGlobalIds(gasNames); + forAll(globalCarrierIds_, i) + { + globalCarrierIds_[i] = globalIds_[i]; + } + break; + } + case LIQUID: + { + setGlobalIds(liquidNames); + setGlobalCarrierIds(gasNames); + break; + } + case SOLID: + { + setGlobalIds(solidNames); + WarningIn + ( + "phaseProperties::initialiseGlobalIds(...)" + ) << "Assuming no mapping between solid and carrier species" + << endl; +// setGlobalCarrierIds(gasNames); + break; + } + default: + { + FatalErrorIn + ( + "Foam::phaseProperties::setGlobalIds" + "(" + "const PtrList<volScalarField>&, " + "const wordList&, " + "const wordList&" + ")" + ) << "Invalid phase: " << phaseTypeNames_[phase_] << nl + << " phase must be gas, liquid or solid" << nl + << exit(FatalError); + } + } +} + + +Foam::phaseProperties::phaseType Foam::phaseProperties::phase() const +{ + return phase_; +} + + +const Foam::word& Foam::phaseProperties::stateLabel() const +{ + return stateLabel_; +} + + +Foam::word Foam::phaseProperties::phaseTypeName() const +{ + return phaseTypeNames_[phase_]; +} + + +const Foam::List<Foam::word>& Foam::phaseProperties::names() const +{ + return names_; +} + + +const Foam::word& Foam::phaseProperties::name(const label cmptI) const +{ + if (cmptI >= names_.size()) + { + FatalErrorIn + ( + "const Foam::word& Foam::phaseProperties::name" + "(" + "const label" + ") const" + ) << "Requested component " << cmptI << "out of range" << nl + << "Available phase components:" << nl << names_ << nl + << exit(FatalError); + } + + return names_[cmptI]; +} + + +const Foam::scalarField& Foam::phaseProperties::Y() const +{ + return Y_; +} + + +Foam::scalar& Foam::phaseProperties::Y(const label cmptI) +{ + if (cmptI >= Y_.size()) + { + FatalErrorIn + ( + "const Foam::scalar& Foam::phaseProperties::Y" + "(" + "const label" + ") const" + ) << "Requested component " << cmptI << "out of range" << nl + << "Available phase components:" << nl << names_ << nl + << exit(FatalError); + } + + return Y_[cmptI]; +} + + +Foam::label Foam::phaseProperties::globalId(const word& cmptName) const +{ + label id = this->id(cmptName); + + if (id < 0) + { + return id; + } + else + { + return globalIds_[id]; + } + +} + + +const Foam::labelList& Foam::phaseProperties::globalIds() const +{ + return globalIds_; +} + + +const Foam::labelList& Foam::phaseProperties::globalCarrierIds() const +{ + return globalCarrierIds_; +} + + +Foam::label Foam::phaseProperties::id(const word& cmptName) const +{ + forAll(names_, cmptI) + { + if (names_[cmptI] == cmptName) + { + return cmptI; + } + } + + return -1; +} + + +// ************************************************************************* // + diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H new file mode 100644 index 0000000000000000000000000000000000000000..eaa44b6afb59d4c0b90d2fd84c62738f739d1b16 --- /dev/null +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.H @@ -0,0 +1,194 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::phaseProperties + +Description + Helper class to manage multi-component phase properties + +SourceFiles + phaseProperties.C + phasePropertiesIO.C + +\*---------------------------------------------------------------------------*/ + +#ifndef phaseProperties_H +#define phaseProperties_H + +#include "NamedEnum.H" +#include "Tuple2.H" +#include "PtrList.H" +#include "volFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class phaseProperties Declaration +\*---------------------------------------------------------------------------*/ + +class phaseProperties +{ +public: + + // Public data + + //- Phase type enumeration + enum phaseType + { + GAS, + LIQUID, + SOLID, + UNKNOWN + }; + + //- Corresponding word representations for phase type enumerations + static const NamedEnum<phaseType, 4> phaseTypeNames_; + + +private: + + // Private data + + //- Phase type + phaseType phase_; + + //- State label (s), (l), (g) etc. + word stateLabel_; + + //- List of component names + List<word> names_; + + //- List of component mass fractions + scalarField Y_; + + //- Global ids + labelList globalIds_; + + //- Map to carrier global id + labelList globalCarrierIds_; + + + // Private member functions + + //- Set global ids + void setGlobalIds(const wordList& globalNames); + + //- Set global carrier ids - attempts to map component names to global + // carrier species + void setGlobalCarrierIds(const wordList& carrierNames); + + //- Check the total mass fraction + void checkTotalMassFraction() const; + + //- Set the state label + word phaseToStateLabel(const phaseType pt) const; + + +public: + + // Constructors + + //- Null constructor + phaseProperties(); + + //- Construct from Istream + phaseProperties(Istream&); + + //- Construct as copy + phaseProperties(const phaseProperties&); + + + //- Destructor + ~phaseProperties(); + + + // Public member functions + + //- Initialise the global ids + void initialiseGlobalIds + ( + const wordList& gasNames, + const wordList& liquidNames, + const wordList& solidNames + ); + + + // Access + + //- Return const access to the phase type + phaseType phase() const; + + //- Return const access to the phase state label + const word& stateLabel() const; + + //- Return word representation of the phase type + word phaseTypeName() const; + + //- Return the list of component names + const List<word>& names() const; + + //- Return const access to a component name + const word& name(const label cmptI) const; + + //- Return const access to all component mass fractions + const scalarField& Y() const; + + //- Return non-const access to a component mass fraction + scalar& Y(const label cmptI); + + //- Return const access to the global ids + const labelList& globalIds() const; + + //- 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 + // Returns -1 if not found + label globalId(const word& cmptName) const; + + //- Return the id of a component in the local list by name + // Returns -1 if not found + label id(const word& cmptName) const; + + + // IOstream Operators + + friend Istream& operator>>(Istream&, phaseProperties&); + friend Ostream& operator<<(Ostream&, const phaseProperties&); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C new file mode 100644 index 0000000000000000000000000000000000000000..f738cf2683683f5a8aaded5500f7b511772db846 --- /dev/null +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phasePropertiesIO.C @@ -0,0 +1,134 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "phaseProperties.H" +#include "dictionaryEntry.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::phaseProperties::phaseProperties(Istream& is) +: + phase_(UNKNOWN), + stateLabel_("(unknown)"), + names_(0), + Y_(0), + globalIds_(0), + globalCarrierIds_(0) +{ + is.check("Foam::phaseProperties::phaseProperties(Istream& is)"); + + dictionaryEntry phaseInfo(dictionary::null, is); + + phase_ = phaseTypeNames_[phaseInfo.keyword()]; + stateLabel_ = phaseToStateLabel(phase_); + + if (phaseInfo.size() > 0) + { + label nComponents = phaseInfo.size(); + names_.setSize(nComponents, "unknownSpecie"); + Y_.setSize(nComponents, 0.0); + globalIds_.setSize(nComponents, -1); + globalCarrierIds_.setSize(nComponents, -1); + + label cmptI = 0; + forAllConstIter(IDLList<entry>, phaseInfo, iter) + { + names_[cmptI] = iter().keyword(); + Y_[cmptI] = readScalar(phaseInfo.lookup(names_[cmptI])); + cmptI++; + } + + checkTotalMassFraction(); + } +} + + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +Foam::Istream& Foam::operator>>(Istream& is, phaseProperties& pp) +{ + is.check + ( + "Foam::Istream& Foam::operator>>(Istream&, phaseProperties&)" + ); + + dictionaryEntry phaseInfo(dictionary::null, is); + + pp.phase_ = pp.phaseTypeNames_[phaseInfo.keyword()]; + pp.stateLabel_ = pp.phaseToStateLabel(pp.phase_); + + if (phaseInfo.size() > 0) + { + label nComponents = phaseInfo.size(); + + pp.names_.setSize(nComponents, "unknownSpecie"); + pp.Y_.setSize(nComponents, 0.0); + pp.globalIds_.setSize(nComponents, -1); + pp.globalCarrierIds_.setSize(nComponents, -1); + + label cmptI = 0; + forAllConstIter(IDLList<entry>, phaseInfo, iter) + { + pp.names_[cmptI] = iter().keyword(); + pp.Y_[cmptI] = readScalar(phaseInfo.lookup(pp.names_[cmptI])); + cmptI++; + } + + pp.checkTotalMassFraction(); + } + + return is; +} + + +Foam::Ostream& Foam::operator<<(Ostream& os, const phaseProperties& pp) +{ + os.check + ( + "Foam::Ostream& Foam::operator<<(Ostream&, const phaseProperties&)" + ); + + os << pp.phaseTypeNames_[pp.phase_] << nl << token::BEGIN_BLOCK << nl + << incrIndent; + + forAll(pp.names_, cmptI) + { + os.writeKeyword(pp.names_[cmptI]) << pp.Y_[cmptI] + << token::END_STATEMENT << nl; + } + + os << decrIndent << token::END_BLOCK << nl; + + os.check + ( + "Foam::Ostream& Foam::operator<<(Ostream&, const phaseProperties&)" + ); + + return os; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/phaseProperties/phasePropertiesList/phasePropertiesList.C b/src/lagrangian/intermediate/phaseProperties/phasePropertiesList/phasePropertiesList.C new file mode 100644 index 0000000000000000000000000000000000000000..2d3f7ce7add1aec039013e7006d4b2618e2bd82c --- /dev/null +++ b/src/lagrangian/intermediate/phaseProperties/phasePropertiesList/phasePropertiesList.C @@ -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 + +\*---------------------------------------------------------------------------*/ + +#include "phasePropertiesList.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::phasePropertiesList::phasePropertiesList +( + Istream& is, + const wordList& gasNames, + const wordList& liquidNames, + const wordList& solidNames +) +: + props_(is), + phaseTypeNames_(), + stateLabels_() +{ + forAll(props_, i) + { + props_[i].initialiseGlobalIds(gasNames, liquidNames, solidNames); + } + + phaseTypeNames_.setSize(props_.size()); + stateLabels_.setSize(props_.size()); + forAll(props_, i) + { + phaseTypeNames_[i] = props_[i].phaseTypeName(); + stateLabels_[i] = props_[i].stateLabel(); + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::phasePropertiesList::~phasePropertiesList() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +const Foam::List<Foam::phaseProperties>& +Foam::phasePropertiesList::props() const +{ + return props_; +} + + +const Foam::wordList& Foam::phasePropertiesList::phaseTypes() const +{ + return phaseTypeNames_; +} + + +const Foam::wordList& Foam::phasePropertiesList::stateLabels() const +{ + return stateLabels_; +} + + +Foam::label Foam::phasePropertiesList::size() const +{ + return props_.size(); +} + + +const Foam::phaseProperties& +Foam::phasePropertiesList::operator[](const label phaseI) const +{ + return props_[phaseI]; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/phaseProperties/phasePropertiesList/phasePropertiesList.H b/src/lagrangian/intermediate/phaseProperties/phasePropertiesList/phasePropertiesList.H new file mode 100644 index 0000000000000000000000000000000000000000..50f6c62ebd65cc2a3d99b6b8333aec61da49f1ac --- /dev/null +++ b/src/lagrangian/intermediate/phaseProperties/phasePropertiesList/phasePropertiesList.H @@ -0,0 +1,110 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::phasePropertiesList + +Description + Simple container for a list of phase properties + +SourceFiles + phasePropertiesList.C + +\*---------------------------------------------------------------------------*/ + +#ifndef phasePropertiesList_H +#define phasePropertiesList_H + +#include "Istream.H" +#include "volFields.H" +#include "wordList.H" +#include "phaseProperties.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class phasePropertiesList Declaration +\*---------------------------------------------------------------------------*/ + +class phasePropertiesList +{ + // Private data + + //- List of phase properties + List<phaseProperties> props_; + + //- List of word representation of phase types + wordList phaseTypeNames_; + + //- List of state labels + wordList stateLabels_; + + +public: + + //- Constructor + phasePropertiesList + ( + Istream& is, + const wordList& gasNames, + const wordList& liquidNames, + const wordList& solidNames + ); + + //- Destructor + ~phasePropertiesList(); + + + // Public member functions + + //- Return the list of phase properties + const List<phaseProperties>& props() const; + + //- Return the list of word representation of phase types + const wordList& phaseTypes() const; + + //- Return the list of state labels + const wordList& stateLabels() const; + + //- Return the size (number of phases) + label size() const; + + + // Member operators + + const phaseProperties& operator[](const label) const; +}; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/Constant.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/Constant.C index a2df7792aa1191751936b7fcd9a747bc0f9bdb12..658fca8e7eead3ee241151f170693cbca06d1559 100644 --- a/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/Constant.C +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/Constant.C @@ -29,38 +29,34 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class Type> -Foam::Constant<Type>::Constant -( - const word& entryName, - const dictionary& dict -) +Foam::Constant<Type>::Constant(const word& entryName, Istream& is) : - DataEntry<Type>(typeName, entryName, dict), - value_(this->dict_.lookup("value")) + DataEntry<Type>(entryName), + value_(is) +{} + + +template<class Type> +Foam::Constant<Type>::Constant(const Constant<Type>& cnst) +: + DataEntry<Type>(cnst), + value_(cnst.value_) {} template<> -Foam::Constant<Foam::label>::Constant -( - const word& entryName, - const dictionary& dict -) +Foam::Constant<Foam::label>::Constant(const word& entryName, Istream& is) : - DataEntry<label>(typeName, entryName, dict), - value_(readLabel(this->dict_.lookup("value"))) + DataEntry<label>(entryName), + value_(readLabel(is)) {} template<> -Foam::Constant<Foam::scalar>::Constant -( - const word& entryName, - const dictionary& dict -) +Foam::Constant<Foam::scalar>::Constant(const word& entryName, Istream& is) : - DataEntry<scalar>(typeName, entryName, dict), - value_(readScalar(this->dict_.lookup("value"))) + DataEntry<scalar>(entryName), + value_(readScalar(is)) {} @@ -87,4 +83,9 @@ Type Foam::Constant<Type>::integrate(const scalar x1, const scalar x2) const } +// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // + +#include "ConstantIO.C" + + // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/Constant.H b/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/Constant.H index add02c11991b00c502c0b24a55d846cdd60d97ad..ff82343c1ed6f2371bee3f0494d4158c8ab65844 100644 --- a/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/Constant.H +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/Constant.H @@ -28,12 +28,9 @@ Class Description Templated basic entry that holds a constant value. + Usage - for entry <entryName> having the value <value>: @verbatim - entry Constant - entryCoeffs - { - value 100.0; // Constant value - } + <entryName> constant <value> @endverbatim SourceFiles @@ -51,6 +48,16 @@ SourceFiles namespace Foam { +template<class Type> +class Constant; + +template<class Type> +Ostream& operator<< +( + Ostream&, + const Constant<Type>& +); + /*---------------------------------------------------------------------------*\ Class Constant Declaration \*---------------------------------------------------------------------------*/ @@ -62,14 +69,12 @@ class Constant { // Private data + //- Constant value Type value_; // Private Member Functions - //- Disallow default bitwise copy construct - Constant(const Constant<Type>&); - //- Disallow default bitwise assignment void operator=(const Constant<Type>&); @@ -77,22 +82,20 @@ class Constant public: // Runtime type information - TypeName("Constant"); + TypeName("constant"); // Constructors - //- Construct from dictionary - Constant - ( - const word& entryName, - const dictionary& dict - ); + //- Construct from entry name and Istream + Constant(const word& entryName, Istream& is); + //- Copy constructor + Constant(const Constant<Type>& cnst); - //- Destructor - ~Constant(); + //- Destructor + virtual ~Constant(); // Member Functions @@ -102,16 +105,24 @@ public: //- Integrate between two values Type integrate(const scalar x1, const scalar x2) const; + + + //- Ostream Operator + friend Ostream& operator<< <Type> + ( + Ostream&, + const Constant<Type>& + ); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template<> -Constant<label>::Constant(const word& entryName, const dictionary& dict); +Constant<label>::Constant(const word& entryName, Istream& is); template<> -Constant<scalar>::Constant(const word& entryName, const dictionary& dict); +Constant<scalar>::Constant(const word& entryName, Istream& is); } // End namespace Foam diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/ConstantIO.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/ConstantIO.C new file mode 100644 index 0000000000000000000000000000000000000000..93e92a25880691cff4e488623c170a8374786270 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/ConstantIO.C @@ -0,0 +1,63 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "DataEntry.H" + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +template<class Type> +Foam::Ostream& Foam::operator<< +( + Ostream& os, + const Constant<Type>& cnst +) +{ + if (os.format() == IOstream::ASCII) + { + os << static_cast<const DataEntry<Type>& >(cnst) + << token::SPACE << cnst.value_; + } + else + { + os << static_cast<const DataEntry<Type>& >(cnst); + os.write + ( + reinterpret_cast<const char*>(&cnst.value_), + sizeof(cnst.value_) + ); + } + + // Check state of Ostream + os.check + ( + "Ostream& operator<<(Ostream&, const Constant<Type>&)" + ); + + return os; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.C index f6a99c2758aa144bfa4678769fc78905457d9b49..b107a35010cd38888518dd66f2040ebeb88f02c3 100644 --- a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.C +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.C @@ -29,15 +29,16 @@ License // * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * // template<class Type> -Foam::DataEntry<Type>::DataEntry -( - const word& typeName, - const word& entryName, - const dictionary& dict -) +Foam::DataEntry<Type>::DataEntry(const word& entryName) : - dict_(dict.subDict(entryName + "Coeffs")), - entry_(entryName) + name_(entryName) +{} + + +template<class Type> +Foam::DataEntry<Type>::DataEntry(const DataEntry<Type>& de) +: + name_(de.name_) {} @@ -51,10 +52,15 @@ Foam::DataEntry<Type>::~DataEntry() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class Type> -const Foam::dictionary& Foam::DataEntry<Type>::dict() const +const Foam::word& Foam::DataEntry<Type>::name() const { - return dict_; + return name_; } +// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // + +#include "DataEntryIO.C" + + // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.H b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.H index 2aeb5b0c7e1ce81fde2415ffed5599483e0eb2f9..b3a670433d98ea05c809781ab9c13b4b4507d640 100644 --- a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.H +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.H @@ -26,6 +26,10 @@ Class Foam::DataEntry Description + Top level data entry class for use in dictionaries. Provides a mechanism + to specify a variable as a certain type, e.g. constant or table, and + provide functions to return the (interpolated) value, and integral between + limits. SourceFiles DataEntry.C @@ -43,8 +47,18 @@ SourceFiles namespace Foam { +template<class Type> +class DataEntry; + +template<class Type> +Ostream& operator<< +( + Ostream&, + const DataEntry<Type>& +); + /*---------------------------------------------------------------------------*\ - Class DataEntry Declaration + Class DataEntry Declaration \*---------------------------------------------------------------------------*/ template<class Type> @@ -52,9 +66,6 @@ class DataEntry { // Private Member Functions - //- Disallow default bitwise copy construct - DataEntry(const DataEntry<Type>&); - //- Disallow default bitwise assignment void operator=(const DataEntry<Type>&); @@ -63,11 +74,8 @@ protected: // Protected data - //- Coefficients dictionary - const dictionary dict_; - //- Name of entry - const word entry_; + const word name_; public: @@ -83,42 +91,39 @@ public: dictionary, ( const word& entryName, - const dictionary& dict + Istream& is ), - (entryName, dict) + (entryName, is) ); // Constructor - //- Construct from type name and dictionary - DataEntry - ( - const word& TypeName, - const word& entryName, - const dictionary& dict - ); + //- Construct from entry name + DataEntry(const word& entryName); + + //- Copy constructor + DataEntry(const DataEntry<Type>& de); //- Selector - static autoPtr<DataEntry<Type> > New - ( - const word& entryName, - const dictionary& dict - ); + static autoPtr<DataEntry<Type> > New + ( + const word& entryName, + const dictionary& dict + ); //- Destructor - - virtual ~DataEntry(); + virtual ~DataEntry(); // Member Functions // Access - //- Return the dictionary - const dictionary& dict() const; + //- Return the name of the entry + const word& name() const; // Evaluation @@ -128,6 +133,14 @@ public: //- Integrate between two (scalar) values virtual Type integrate(const scalar x1, const scalar x2) const = 0; + + + //- Ostream Operator + friend Ostream& operator<< <Type> + ( + Ostream&, + const DataEntry<Type>& + ); }; diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryIO.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryIO.C new file mode 100644 index 0000000000000000000000000000000000000000..7afa2ef2015d03bbc769771940119e54871ebe8c --- /dev/null +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryIO.C @@ -0,0 +1,48 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "DataEntry.H" + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +template<class Type> +Foam::Ostream& Foam::operator<< +( + Ostream& os, + const DataEntry<Type>& +) +{ + // Check state of Ostream + os.check + ( + "Ostream& operator<<(Ostream&, const DataEntry<Type>&)" + ); + + return os; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/NewDataEntry.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/NewDataEntry.C index ac8f7c68609981128f4308e0744b47ea4626c643..3bed47c540e80671de9a0062f47fae0438ea362e 100644 --- a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/NewDataEntry.C +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/NewDataEntry.C @@ -35,27 +35,24 @@ Foam::autoPtr<Foam::DataEntry<Type> > Foam::DataEntry<Type>::New const dictionary& dict ) { - word DataEntryType(dict.lookup(entryName)); + Istream& is(dict.lookup(entryName)); - // Info<< "Selecting DataEntry " << DataEntryType << endl; + word DataEntryType(is); typename dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(DataEntryType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn - ( - "DataEntry<Type>::New(const dictionary&" - ) << "Unknown DataEntry type " - << DataEntryType << " for " << entryName - << ", constructor not in hash table" << nl << nl - << " Valid DataEntry types are :" << nl + FatalErrorIn("DataEntry<Type>::New(Istream&)") + << "Unknown DataEntry type " << DataEntryType << " for DataEntry " + << entryName << ". Constructor not in hash table" << nl << nl + << " Valid DataEntry types are:" << nl << dictionaryConstructorTablePtr_->toc() << nl << exit(FatalError); } - return autoPtr<DataEntry<Type> >(cstrIter()(entryName, dict)); + return autoPtr<DataEntry<Type> >(cstrIter()(entryName, is)); } diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.C index f7d5dff6ca2ba2cbfcf2624081a247d75a457212..98abaf6e67e533db1dfe4d19b0656ba548d9d333 100644 --- a/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.C +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.C @@ -29,30 +29,28 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class Type> -Foam::Table<Type>::Table -( - const word& entryName, - const dictionary& dict -) +Foam::Table<Type>::Table(const word& entryName, Istream& is) : - DataEntry<Type>(typeName, entryName, dict), - table_(this->dict_.lookup("table")) + DataEntry<Type>(entryName), + table_(is) { if (!table_.size()) { - FatalErrorIn - ( - "Foam::Table<Type>::Table" - "(" - "const word& entryName," - "const dictionary& dict" - ")" - ) << "Table is invalid (empty)" << nl - << exit(FatalError); + FatalErrorIn("Foam::Table<Type>::Table(const Istream&)") + << "Table for entry " << this->name_ << " is invalid (empty)" + << nl << exit(FatalError); } } +template<class Type> +Foam::Table<Type>::Table(const Table<Type>& tbl) +: + DataEntry<Type>(tbl), + table_(tbl.table_) +{} + + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template<class Type> @@ -142,4 +140,9 @@ Type Foam::Table<Type>::integrate(const scalar x1, const scalar x2) const } +// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // + +#include "TableIO.C" + + // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.H b/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.H index c336840567fd43e4c1777266205304f375c83e22..2bd1152bf4ce27ff37630c54c4083d4bb3a38953 100644 --- a/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.H +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.H @@ -28,18 +28,14 @@ Class Description Templated table container data entry. Items are stored in a list of Tuple2's. First column is always stored as scalar entries. Data is read - in the form, e.g. for (scalar, vector): + in the form, e.g. for an entry <entryName> that is (scalar, vector): @verbatim - entry Table - entryCoeffs - { - table - ( - 0.0 (1 2 3) - 1.0 (4 5 6) - ) - } + <entryName> table + ( + 0.0 (1 2 3) + 1.0 (4 5 6) + ); @endverbatim SourceFiles @@ -58,6 +54,16 @@ SourceFiles namespace Foam { +template<class Type> +class Table; + +template<class Type> +Ostream& operator<< +( + Ostream&, + const Table<Type>& +); + /*---------------------------------------------------------------------------*\ Class Table Declaration \*---------------------------------------------------------------------------*/ @@ -69,38 +75,33 @@ class Table { // Private data - //- Table data - List<Tuple2<scalar, Type> > table_; + //- Table data + List<Tuple2<scalar, Type> > table_; // Private Member Functions - //- Disallow default bitwise copy construct - Table(const Table<Type>&); - //- Disallow default bitwise assignment void operator=(const Table<Type>&); public: - // Runtime type information - TypeName("Table"); + //- Runtime type information + TypeName("table"); // Constructors - //- Construct from dictionary - Table - ( - const word& entryName, - const dictionary& dict - ); + //- Construct from entry name and Istream + Table(const word& entryName, Istream& is); + //- Copy constructor + Table(const Table<Type>& tbl); - //- Destructor - ~Table(); + //- Destructor + virtual ~Table(); // Member Functions @@ -110,6 +111,14 @@ public: //- Integrate between two (scalar) values Type integrate(const scalar x1, const scalar x2) const; + + + //- Ostream Operator + friend Ostream& operator<< <Type> + ( + Ostream&, + const Constant<Type>& + ); }; diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/TableIO.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/TableIO.C new file mode 100644 index 0000000000000000000000000000000000000000..dda24c362aa97abe5f4bb38ec0f72747711a6758 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/TableIO.C @@ -0,0 +1,63 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "DataEntry.H" + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +template<class Type> +Foam::Ostream& Foam::operator<< +( + Ostream& os, + const Table<Type>& tbl +) +{ + if (os.format() == IOstream::ASCII) + { + os << static_cast<const DataEntry<Type>& >(tbl) + << token::SPACE << tbl.table_; + } + else + { + os << static_cast<const DataEntry<Type>& >(tbl); + os.write + ( + reinterpret_cast<const char*>(&tbl.table_), + sizeof(tbl.table_) + ); + } + + // Check state of Ostream + os.check + ( + "Ostream& operator<<(Ostream&, const Table<Type>&)" + ); + + return os; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/polynomial/polynomial.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/polynomial/polynomial.C new file mode 100644 index 0000000000000000000000000000000000000000..276d54146be209caa8c656b964e388547940330e --- /dev/null +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/polynomial/polynomial.C @@ -0,0 +1,97 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "polynomial.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(polynomial, 0); +} + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::polynomial::polynomial(const word& entryName, Istream& is) +: + DataEntry<scalar>(entryName), + coeffs_(is) +{ + if (!coeffs_.size()) + { + FatalErrorIn("Foam::polynomial::polynomial(const word&, Istream&)") + << "polynomial coefficients for entry " << this->name_ + << " is invalid (empty)" << nl << exit(FatalError); + } +} + + +Foam::polynomial::polynomial(const polynomial& poly) +: + DataEntry<scalar>(poly), + coeffs_(poly.coeffs_) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::polynomial::~polynomial() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::scalar Foam::polynomial::value(const scalar x) const +{ + scalar y = 0.0; + forAll(coeffs_, i) + { + y += coeffs_[i].first()*pow(x, coeffs_[i].second()); + } + + return y; +} + + +Foam::scalar Foam::polynomial::integrate(const scalar x1, const scalar x2) const +{ + scalar intx = 0.0; + + forAll(coeffs_, i) + { + intx += + coeffs_[i].first()/(coeffs_[i].second() + 1) + *( + pow(x2, coeffs_[i].second() + 1) + - pow(x1, coeffs_[i].second() + 1) + ); + } + + return intx; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/polynomial/polynomial.H b/src/lagrangian/intermediate/submodels/IO/DataEntry/polynomial/polynomial.H new file mode 100644 index 0000000000000000000000000000000000000000..6d3cd51f65fddea75f11082b43297873f6113c27 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/polynomial/polynomial.H @@ -0,0 +1,132 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::polynomial + +Description + Polynomial container data entry for scalars. Items are stored in a list of + Tuple2's. Data is input in the form, e.g. for an entry <entryName> that + describes y = x^2 + 2x^3 + + @verbatim + <entryName> polynomial + ( + (1 2) + (2 3) + ); + @endverbatim + +SourceFiles + polynomial.C + +\*---------------------------------------------------------------------------*/ + +#ifndef polynomial_H +#define polynomial_H + +#include "DataEntry.H" +#include "Tuple2.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes +class polynomial; + +// Forward declaration of friend functions +Ostream& operator<< +( + Ostream&, + const polynomial& +); + +/*---------------------------------------------------------------------------*\ + Class polynomial Declaration +\*---------------------------------------------------------------------------*/ + +class polynomial +: + public DataEntry<scalar> +{ + // Private data + + //- Polynomial coefficients - list of prefactor, exponent + List<Tuple2<scalar, scalar> > coeffs_; + + + // Private Member Functions + + //- Disallow default bitwise assignment + void operator=(const polynomial&); + + +public: + + //- Runtime type information + TypeName("polynomial"); + + + // Constructors + + //- Construct from entry name and Istream + polynomial(const word& entryName, Istream& is); + + //- Copy constructor + polynomial(const polynomial& poly); + + + //- Destructor + virtual ~polynomial(); + + + // Member Functions + + //- Return polynomial value + scalar value(const scalar x) const; + + //- Integrate between two (scalar) values + scalar integrate(const scalar x1, const scalar x2) const; + + + //- Ostream Operator + friend Ostream& operator<< + ( + Ostream&, + const polynomial& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/polynomial/polynomialIO.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/polynomial/polynomialIO.C new file mode 100644 index 0000000000000000000000000000000000000000..05c34b645fc696abd1a6ed7c82e27683a9175508 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/polynomial/polynomialIO.C @@ -0,0 +1,62 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "polynomial.H" + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +Foam::Ostream& Foam::operator<< +( + Ostream& os, + const polynomial& poly +) +{ + if (os.format() == IOstream::ASCII) + { + os << static_cast<const DataEntry<scalar>& >(poly) + << token::SPACE << poly.coeffs_; + } + else + { + os << static_cast<const DataEntry<scalar>& >(poly); + os.write + ( + reinterpret_cast<const char*>(&poly.coeffs_), + sizeof(poly.coeffs_) + ); + } + + // Check state of Ostream + os.check + ( + "Ostream& operator<<(Ostream&, const polynomial&)" + ); + + return os; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/IOList/makeParcelIOList.H b/src/lagrangian/intermediate/submodels/IO/IOList/makeParcelIOList.H new file mode 100644 index 0000000000000000000000000000000000000000..fb463a8289e69b43508b45e5c9e4d9a35e9d3729 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/IO/IOList/makeParcelIOList.H @@ -0,0 +1,53 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +Description + Macros for defining parcel IOLists + +\*---------------------------------------------------------------------------*/ + +#ifndef makeParcelIOList_H +#define makeParcelIOList_H + +#include "IOPtrList.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#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 d583a551c1729a89c0864e66f562ad8b16d32b51..dc89a44b9d7752fc1eff83570c90185e40b2e995 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.C @@ -22,14 +22,20 @@ 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" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +template<class CloudType> +Foam::DispersionModel<CloudType>::DispersionModel(CloudType& owner) +: + dict_(dictionary::null), + owner_(owner) +{} + + template<class CloudType> Foam::DispersionModel<CloudType>::DispersionModel ( diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H index d2c4da4c302cece2958fc1114b86c2a93dbdc4ca..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_; @@ -81,6 +81,9 @@ public: // Constructors + //- Construct null from owner + DispersionModel(CloudType& owner); + //- Construct from components DispersionModel ( @@ -89,18 +92,16 @@ public: ); - // Destructor - - virtual ~DispersionModel(); + //- Destructor + virtual ~DispersionModel(); - // Selector - - static autoPtr<DispersionModel<CloudType> > New - ( - const dictionary& dict, - CloudType& owner - ); + //- Selector + static autoPtr<DispersionModel<CloudType> > New + ( + const dictionary& dict, + CloudType& owner + ); // Access @@ -159,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/DispersionModel/NewDispersionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/NewDispersionModel.C index 4db4d79194320d0f7d3788f2fc96c9a8c5309e6e..09717b8e86401a504900962c0863d57d82521d8b 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/NewDispersionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/NewDispersionModel.C @@ -38,10 +38,7 @@ Foam::DispersionModel<CloudType>::New CloudType& owner ) { - word DispersionModelType - ( - dict.lookup("DispersionModel") - ); + word DispersionModelType(dict.lookup("DispersionModel")); Info<< "Selecting DispersionModel " << DispersionModelType << endl; @@ -53,11 +50,14 @@ Foam::DispersionModel<CloudType>::New FatalErrorIn ( "DispersionModel<CloudType>::New" - "(const dictionary&, CloudType&)" + "(" + "const dictionary&, " + "CloudType&" + ")" ) << "Unknown DispersionModelType type " << DispersionModelType << ", constructor not in hash table" << nl << nl - << " Valid DispersionModel types are :" << nl + << " Valid DispersionModel types are:" << nl << dictionaryConstructorTablePtr_->toc() << exit(FatalError); } 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/DispersionRASModel/DispersionRASModel.H b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.H index 1628f23c9b1846b296d668eed3416e8823f492a1..ecda55be49f4a0135752b3e0eb741192ff12ea62 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.H @@ -50,7 +50,6 @@ class DispersionRASModel : public DispersionModel<CloudType> { - // Private data //- Reference to the compressible turbulence model @@ -73,9 +72,8 @@ public: ); - // Destructor - - virtual ~DispersionRASModel(); + //- Destructor + virtual ~DispersionRASModel(); // Member Functions diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C index e15ee595e06b5503fa4fc16cf58b7fb2d91a8902..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" @@ -111,7 +109,7 @@ Foam::vector Foam::GradientDispersionRAS<CloudType>::update // away from the axis of symmetry // This creates a 'hole' in the spray and to // prevent this we let x1 be both negative/positive - if (this->owner().meshInfo().caseIs2d()) + if (this->owner().mesh().nSolutionD() == 2) { fac *= x1; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.H b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.H index 150bbeb1272fb2477982d438476ceb13686155ce..9cf99ecc20256ad2005899279b59b4aad12ec719 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.H @@ -51,7 +51,6 @@ class GradientDispersionRAS : public DispersionRASModel<CloudType> { - public: //- Runtime type information @@ -68,9 +67,8 @@ public: ); - // Destructor - - ~GradientDispersionRAS(); + //- Destructor + virtual ~GradientDispersionRAS(); // Member Functions diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.C index c239a281ba9162442a7987a88cfb90956661634a..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" @@ -33,11 +31,11 @@ Description template<class CloudType> Foam::NoDispersion<CloudType>::NoDispersion ( - const dictionary& dict, + const dictionary&, CloudType& owner ) : - DispersionModel<CloudType>(dict, owner) + DispersionModel<CloudType>(owner) {} @@ -60,12 +58,12 @@ bool Foam::NoDispersion<CloudType>::active() const template<class CloudType> Foam::vector Foam::NoDispersion<CloudType>::update ( - const scalar dt, - const label celli, - const vector& U, + const scalar, + const label, + const vector&, const vector& Uc, - vector& UTurb, - scalar& tTurb + vector&, + scalar& ) { // Do nothing diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.H b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.H index 52632c3a835dde0074da8d310474c04ee6d57f82..48e938cc03e767e2e1ad4966457074f849f5ca60 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.H @@ -26,7 +26,7 @@ Class Foam::NoDispersion Description - No turbulent dispersion of the parcels + Place holder for 'none' option \*---------------------------------------------------------------------------*/ @@ -41,7 +41,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class NoDispersion Declaration + Class NoDispersion Declaration \*---------------------------------------------------------------------------*/ template<class CloudType> @@ -49,11 +49,10 @@ class NoDispersion : public DispersionModel<CloudType> { - public: //- Runtime type information - TypeName("NoDispersion"); + TypeName("none"); // Constructors @@ -66,9 +65,8 @@ public: ); - // Destructor - - ~NoDispersion(); + //- Destructor + virtual ~NoDispersion(); // Member Functions diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.C index 6887244a98a82f13c19222c4af5371402a6fa620..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" @@ -95,7 +93,8 @@ Foam::vector Foam::StochasticDispersionRAS<CloudType>::update dir /= mag(dir) + SMALL; // Numerical Recipes... Ch. 7. Random Numbers... - scalar x1, x2; + scalar x1 = 0.0; + scalar x2 = 0.0; scalar rsq = 10.0; while ((rsq > 1.0) || (rsq == 0.0)) { diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.H b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.H index 596fa1d1eb60afe12040290b40ff8156e08da762..46059d4e83c5af162c1f11acf8b8b5ad297636b3 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.H @@ -51,7 +51,6 @@ class StochasticDispersionRAS : public DispersionRASModel<CloudType> { - public: //- Runtime type information @@ -68,9 +67,8 @@ public: ); - // Destructor - - ~StochasticDispersionRAS(); + //- Destructor + virtual ~StochasticDispersionRAS(); // Member Functions diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.C b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.C index 7494f397e693d2efc0dfd29aa4ee0c51bee2da5b..1eb7f86b48effaee07d38f4ec60cacafd0e0ce09 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.C @@ -34,7 +34,8 @@ Foam::DragModel<CloudType>::DragModel const dictionary& dict, CloudType& owner ) -: dict_(dict), +: + dict_(dict), owner_(owner) {} @@ -63,22 +64,21 @@ 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 { const scalar magUr = mag(Ur); - const scalar Re = rhoc*magUr*d/(mu + SMALL); + const scalar Re = rhoc*magUr*d/(mu + ROOTVSMALL); - const scalar cd = Cd(Re); + 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 31b4ac56f0e770d968f3a44dc46b953efae2439e..69130b168ca54d846a1c5d2d1b671183335f1361 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H @@ -25,7 +25,6 @@ License Class Foam::DragModel - Description Templated drag model class @@ -54,13 +53,12 @@ namespace Foam template<class CloudType> class DragModel { - // Private data //- The cloud dictionary const dictionary& dict_; - // reference to the owner cloud class + //- Reference to the owner cloud class CloudType& owner_; @@ -93,18 +91,16 @@ public: ); - // Destructor - - virtual ~DragModel(); - + //- Destructor + virtual ~DragModel(); - // Selector - static autoPtr<DragModel<CloudType> > New - ( - const dictionary& dict, - CloudType& cloud - ); + //- Selector + static autoPtr<DragModel<CloudType> > New + ( + const dictionary& dict, + CloudType& cloud + ); // Access @@ -124,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; }; @@ -159,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/DragModel/DragModel/NewDragModel.C b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/NewDragModel.C index 3cee2ec548d9992e5b31de7ef6b458e2c59c33b8..6e1e80d3cda7a76abc961b277ca09e87f3d09664 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/NewDragModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/NewDragModel.C @@ -35,10 +35,7 @@ Foam::autoPtr<Foam::DragModel<CloudType> > Foam::DragModel<CloudType>::New CloudType& owner ) { - word DragModelType - ( - dict.lookup("DragModel") - ); + word DragModelType(dict.lookup("DragModel")); Info<< "Selecting DragModel " << DragModelType << endl; @@ -50,12 +47,14 @@ Foam::autoPtr<Foam::DragModel<CloudType> > Foam::DragModel<CloudType>::New FatalErrorIn ( "DragModel<CloudType>::New" - "(const dictionary&, CloudType&)" - ) - << "Unknown DragModelType type " + "(" + "const dictionary&," + "CloudType&" + ")" + ) << "Unknown DragModelType type " << DragModelType << ", constructor not in hash table" << nl << nl - << " Valid DragModel types are :" << nl + << " Valid DragModel types are:" << nl << dictionaryConstructorTablePtr_->toc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/NoDrag/NoDrag.C b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/NoDrag/NoDrag.C index 31ce20689c9bd17195b71eeeeef1d6e8b8c28c0b..2d1586c9cbf058eedbeddc9bb9cd928342c063a6 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/NoDrag/NoDrag.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/NoDrag/NoDrag.C @@ -29,11 +29,7 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template <class CloudType> -Foam::NoDrag<CloudType>::NoDrag -( - const dictionary& dict, - CloudType& owner -) +Foam::NoDrag<CloudType>::NoDrag(const dictionary& dict, CloudType& owner) : DragModel<CloudType>(dict, owner) {} @@ -56,10 +52,7 @@ bool Foam::NoDrag<CloudType>::active() const template<class CloudType> -Foam::scalar Foam::NoDrag<CloudType>::Cd -( - const scalar -) const +Foam::scalar Foam::NoDrag<CloudType>::Cd(const scalar) const { return 0.0; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/NoDrag/NoDrag.H b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/NoDrag/NoDrag.H index c6033677c7c2d68286f22283d980ec14c8eee393..b017f50270ad14935a7fb070d2439dd57f2c4bd1 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/NoDrag/NoDrag.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/NoDrag/NoDrag.H @@ -26,7 +26,7 @@ Class Foam::NoDrag Description - Dummy drag model for 'no drag' + Dummy drag model for 'none' \*---------------------------------------------------------------------------*/ @@ -48,11 +48,10 @@ class NoDrag : public DragModel<CloudType> { - public: //- Runtime type information - TypeName("NoDrag"); + TypeName("none"); // Constructors @@ -60,14 +59,13 @@ public: //- Construct from dictionary NoDrag ( - const dictionary& dict, - CloudType& owner + const dictionary&, + CloudType& ); - // Destructor - - ~NoDrag(); + //- Destructor + virtual ~NoDrag(); // Member Functions diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/SphereDrag/SphereDrag.C b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/SphereDrag/SphereDrag.C index c53541038362cc54c68e78406a1c6955180ec97a..e5c76c54169d262176373d1a42d778c709b630e5 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/SphereDrag/SphereDrag.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/SphereDrag/SphereDrag.C @@ -56,10 +56,7 @@ bool Foam::SphereDrag<CloudType>::active() const template <class CloudType> -Foam::scalar Foam::SphereDrag<CloudType>::Cd -( - const scalar Re -) const +Foam::scalar Foam::SphereDrag<CloudType>::Cd(const scalar Re) const { scalar Cd; if (Re < SMALL) diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/SphereDrag/SphereDrag.H b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/SphereDrag/SphereDrag.H index 31e8ae1d725354b23afbcca947971f504f1bc9f8..8e3afaf8aeb86a8acc18954f96f427fa4570d677 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/SphereDrag/SphereDrag.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/SphereDrag/SphereDrag.H @@ -48,7 +48,6 @@ class SphereDrag : public DragModel<CloudType> { - public: //- Runtime type information @@ -65,9 +64,8 @@ public: ); - // Destructor - - ~SphereDrag(); + //- Destructor + virtual ~SphereDrag(); // Member Functions diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C index a1cc13f345d8d36b4238e539b93c16902553a2bc..b7dd300b45857b920c986b79e63726db8020f478 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C @@ -30,7 +30,7 @@ License // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // template<class CloudType> -Foam::label Foam::ConeInjection<CloudType>::nParcelsToInject +Foam::label Foam::ConeInjection<CloudType>::parcelsToInject ( const scalar time0, const scalar time1 @@ -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_); } @@ -172,47 +176,30 @@ Foam::scalar Foam::ConeInjection<CloudType>::timeEnd() const template<class CloudType> -Foam::vector Foam::ConeInjection<CloudType>::position +void Foam::ConeInjection<CloudType>::setPositionAndCell ( + const label, const label, const scalar, - const polyMeshInfo& meshInfo + vector& position, + label& cellOwner ) { - vector pos = position_; - if (meshInfo.caseIs2d()) - { - if (meshInfo.caseIs2dWedge()) - { - pos.component(meshInfo.emptyComponent()) = 0.0; - } - else if (meshInfo.caseIs2dSlab()) - { - pos.component(meshInfo.emptyComponent()) = - meshInfo.centrePoint().component(meshInfo.emptyComponent()); - } - else - { - FatalErrorIn - ( - "Foam::vector Foam::ConeInjection<CloudType>::position" - ) << "Could not determine 2-D case geometry" << nl - << abort(FatalError); - } - } - - return pos; + position = 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 polyMeshInfo& meshInfo + typename CloudType::parcelType& parcel ) { + // set particle velocity const scalar deg2Rad = mathematicalConstant::pi/180.0; scalar t = time - this->SOI_; @@ -229,27 +216,26 @@ Foam::vector Foam::ConeInjection<CloudType>::velocity vector normal = alpha*(tanVec1_*cos(beta) + tanVec2_*sin(beta)); vector dirVec = dcorr*direction_; dirVec += normal; + dirVec /= mag(dirVec); - // Remove empty component of velocity for slab cases - if (meshInfo.caseIs2dSlab()) - { - dirVec.component(meshInfo.emptyComponent()) = 0.0; - } + parcel.U() = Umag_().value(t)*dirVec; + + // set particle diameter + parcel.d() = parcelPDF_().sample(); +} - dirVec /= mag(dirVec); - return Umag_().value(t)*dirVec; +template<class CloudType> +bool Foam::ConeInjection<CloudType>::fullyDescribed() const +{ + return false; } template<class CloudType> -Foam::scalar Foam::ConeInjection<CloudType>::d0 -( - const label, - const scalar -) const +bool Foam::ConeInjection<CloudType>::validInjection(const label) { - return parcelPDF_().sample(); + 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 d4f01a4b68eaca241b9b371ca66979807fb27bdf..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; @@ -65,17 +67,16 @@ class ConeInjection : public InjectionModel<CloudType> { - // 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_; @@ -112,14 +113,14 @@ protected: // Protected member functions - //- Number of parcels to introduce over the time step - label nParcelsToInject + //- 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, @@ -143,9 +144,8 @@ public: ); - // Destructor - - ~ConeInjection(); + //- Destructor + virtual ~ConeInjection(); // Member Functions @@ -159,28 +159,31 @@ public: // Injection geometry - //- Return the injection position - vector position + //- Set the injection position and owner cell + virtual void setPositionAndCell ( - const label iParcel, + const label parcelI, + const label nParcels, const scalar time, - const polyMeshInfo& meshInfo + 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, + const label parcelI, + const label nParcels, const scalar time, - const polyMeshInfo& meshInfo + typename CloudType::parcelType& parcel ); - //- Return the diameter of the parcel to introduce at a time - scalar d0 - ( - const label, - const scalar - ) 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 + 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 new file mode 100644 index 0000000000000000000000000000000000000000..8429ca7ca6543c88b80066ec1bfde05d61063e82 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C @@ -0,0 +1,230 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "FieldActivatedInjection.H" +#include "volFields.H" + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +template<class CloudType> +Foam::label Foam::FieldActivatedInjection<CloudType>::parcelsToInject +( + const scalar time0, + const scalar time1 +) const +{ + if (sum(nParcelsInjected_) < nParcelsPerInjector_*positions_.size()) + { + return positions_.size(); + } + else + { + return 0; + } +} + + +template<class CloudType> +Foam::scalar Foam::FieldActivatedInjection<CloudType>::volumeToInject +( + const scalar time0, + const scalar time1 +) const +{ + if (sum(nParcelsInjected_) < nParcelsPerInjector_*positions_.size()) + { + return this->volumeTotal_/nParcelsPerInjector_; + } + else + { + return 0; + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::FieldActivatedInjection<CloudType>::FieldActivatedInjection +( + const dictionary& dict, + CloudType& owner +) +: + InjectionModel<CloudType>(dict, owner, typeName), + factor_(readScalar(this->coeffDict().lookup("factor"))), + referenceField_ + ( + owner.db().objectRegistry::lookupObject<volScalarField> + ( + this->coeffDict().lookup("referenceField") + ) + ), + thresholdField_ + ( + owner.db().objectRegistry::lookupObject<volScalarField> + ( + this->coeffDict().lookup("thresholdField") + ) + ), + positionsFile_(this->coeffDict().lookup("positionsFile")), + positions_ + ( + IOobject + ( + positionsFile_, + owner.db().time().constant(), + owner.mesh(), + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ), + injectorCells_(positions_.size()), + nParcelsPerInjector_ + ( + readLabel(this->coeffDict().lookup("parcelsPerInjector")) + ), + nParcelsInjected_(positions_.size(), 0), + U0_(this->coeffDict().lookup("U0")), + diameters_(positions_.size()), + parcelPDF_ + ( + pdf::New + ( + this->coeffDict().subDict("parcelPDF"), + owner.rndGen() + ) + ) +{ + // Construct parcel diameters - one per injector cell + forAll(diameters_, i) + { + diameters_[i] = parcelPDF_->sample(); + } + + // Determine total volume of particles to inject + this->volumeTotal_ = + nParcelsPerInjector_ + *sum(pow3(diameters_)) + *mathematicalConstant::pi/6.0; + + // Set/cache the injector cells + forAll(positions_, i) + { + this->findCellAtPosition + ( + injectorCells_[i], + positions_[i] + ); + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::FieldActivatedInjection<CloudType>::~FieldActivatedInjection() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +bool Foam::FieldActivatedInjection<CloudType>::active() const +{ + return true; +} + + +template<class CloudType> +Foam::scalar Foam::FieldActivatedInjection<CloudType>::timeEnd() const +{ + return GREAT; +} + + +template<class CloudType> +void Foam::FieldActivatedInjection<CloudType>::setPositionAndCell +( + const label parcelI, + const label, + const scalar, + vector& position, + label& cellOwner +) +{ + position = positions_[parcelI]; + cellOwner = injectorCells_[parcelI]; +} + + +template<class CloudType> +void Foam::FieldActivatedInjection<CloudType>::setProperties +( + const label parcelI, + const label, + const scalar, + typename CloudType::parcelType& parcel +) +{ + // set particle velocity + parcel.U() = U0_; + + // set particle diameter + parcel.d() = diameters_[parcelI]; +} + + +template<class CloudType> +bool Foam::FieldActivatedInjection<CloudType>::fullyDescribed() const +{ + return false; +} + + +template<class CloudType> +bool Foam::FieldActivatedInjection<CloudType>::validInjection +( + const label parcelI +) +{ + const label cellI = injectorCells_[parcelI]; + + if + ( + nParcelsInjected_[parcelI] < nParcelsPerInjector_ + && factor_*referenceField_[cellI] > thresholdField_[cellI] + ) + { + nParcelsInjected_[parcelI]++; + return true; + } + + return false; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H new file mode 100644 index 0000000000000000000000000000000000000000..aa7c6e16f631cbcfd7fdf38b5ba5c7ec90da0872 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.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::FieldActivatedInjection + +Description + Injection at specified positions, with the conditions: + + - for injection to be allowed + + factor*referenceField[cellI] >= thresholdField[cellI] + + where: + - referenceField is the field used to supply the look-up values + - thresholdField supplies the values beyond which the injection is + permitted + + - limited to a user-supllied number of injections per injector location + +SourceFiles + FieldActivatedInjection.C + +\*---------------------------------------------------------------------------*/ + +#ifndef FieldActivatedInjection_H +#define FieldActivatedInjection_H + +#include "InjectionModel.H" +#include "pdf.H" +#include "volFieldsFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class FieldActivatedInjection Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class FieldActivatedInjection +: + public InjectionModel<CloudType> +{ + // Private data + + // Model parameters + + //- Factor to apply to reference field + const scalar factor_; + + //- Reference field + const volScalarField& referenceField_; + + //- Threshold field + const volScalarField& thresholdField_; + + + // Injector properties + + //- Name of file containing positions data + const word positionsFile_; + + //- Field of injector (x,y,z) positions + vectorIOField positions_; + + //- 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 + labelList nParcelsInjected_; + + + // Parcel properties + + //- Initial parcel velocity + const vector U0_; + + //- Field of parcel diameters + scalarList diameters_; + + //- Parcel size PDF model + const autoPtr<pdf> parcelPDF_; + + +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("FieldActivatedInjection"); + + + // Constructors + + //- Construct from dictionary + FieldActivatedInjection + ( + const dictionary& dict, + CloudType& owner + ); + + + // Destructor + virtual ~FieldActivatedInjection(); + + + // 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 "FieldActivatedInjection.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index 3ef7e2a8734745b170547b09e7096139c0f3bfc0..abbba2698d004ea46afbc4b8048ce1abe52fa34a 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -26,54 +26,109 @@ License #include "InjectionModel.H" #include "mathematicalConstants.H" +#include "meshTools.H" // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // +template<class CloudType> +void Foam::InjectionModel<CloudType>::readProps() +{ + IOobject propsDictHeader + ( + "injectionProperties", + owner_.db().time().timeName(), + "uniform/Lagrangian"/owner_.name(), + owner_.db(), + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ); + + if (propsDictHeader.headerOk()) + { + const IOdictionary propsDict(propsDictHeader); + + propsDict.readIfPresent("massInjected", massInjected_); + propsDict.readIfPresent("nInjections", nInjections_); + propsDict.readIfPresent("parcelsAddedTotal", parcelsAddedTotal_); + propsDict.readIfPresent("timeStep0", timeStep0_); + } +} + + +template<class CloudType> +void Foam::InjectionModel<CloudType>::writeProps() +{ + if (owner_.db().time().outputTime()) + { + IOdictionary propsDict + ( + IOobject + ( + "injectionProperties", + owner_.db().time().timeName(), + "uniform/Lagrangian"/owner_.name(), + owner_.db(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ) + ); + + propsDict.add("massInjected", massInjected_); + propsDict.add("nInjections", nInjections_); + propsDict.add("parcelsAddedTotal", parcelsAddedTotal_); + propsDict.add("timeStep0", timeStep0_); + + propsDict.regIOobject::write(); + } +} + + template<class CloudType> void Foam::InjectionModel<CloudType>::prepareForNextTimeStep ( - const scalar time0, - const scalar time1, - label& nParcels, - scalar& volume + const scalar time, + label& newParcels, + scalar& newVolume ) { // Initialise values - nParcels = 0; - volume = 0.0; + newParcels = 0; + 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 - nParcels = nParcelsToInject(t0, t1); + newParcels = parcelsToInject(t0, t1); // Volume of parcels to inject - volume = volumeToInject(t0, t1); + newVolume = volumeToInject(t0, t1); // Hold previous time if no parcels, but non-zero volume fraction - if ((nParcels == 0) && (volume > 0.0)) + if ((newParcels == 0) && (newVolume > 0.0)) { // hold value of timeStep0_ } else { // advance value of timeStep0_ - timeStep0_ = time1; + timeStep0_ = time; } } template<class CloudType> -void Foam::InjectionModel<CloudType>::findInjectorCellAndPosition +void Foam::InjectionModel<CloudType>::findCellAtPosition ( label& cellI, vector& position @@ -88,7 +143,7 @@ void Foam::InjectionModel<CloudType>::findInjectorCellAndPosition if (cellI >= 0) { const vector& C = owner_.mesh().C()[cellI]; - position += 1.0e-6*(C - position); + position += SMALL*(C - position); foundCell = owner_.mesh().pointInCell(position, cellI); } @@ -103,7 +158,7 @@ void Foam::InjectionModel<CloudType>::findInjectorCellAndPosition if (cellI >= 0) { const vector& C = owner_.mesh().C()[cellI]; - position += 1.0e-6*(C - position); + position += SMALL*(C - position); foundCell = owner_.mesh().pointInCell(position, cellI); } @@ -114,8 +169,11 @@ void Foam::InjectionModel<CloudType>::findInjectorCellAndPosition { FatalErrorIn ( - "InjectionModel<CloudType>::setInjectorCellAndPosition" - "(label&, vector&)" + "Foam::InjectionModel<CloudType>::findCellAtPosition" + "(" + "label&, " + "vector&" + ")" )<< "Cannot find parcel injection cell. " << "Parcel position = " << p0 << nl << abort(FatalError); @@ -126,11 +184,11 @@ void Foam::InjectionModel<CloudType>::findInjectorCellAndPosition template<class CloudType> Foam::scalar Foam::InjectionModel<CloudType>::setNumberOfParticles ( - const label nParcels, - const scalar diameter, + const label parcels, + const scalar volume, const scalar volumeFraction, - const scalar rho, - const scalar volume + const scalar diameter, + const scalar rho ) { scalar nP = 0.0; @@ -138,7 +196,7 @@ Foam::scalar Foam::InjectionModel<CloudType>::setNumberOfParticles { case pbMass: { - nP = volumeFraction*massTotal_/nParcels + nP = volumeFraction*massTotal_/parcels /(rho*mathematicalConstant::pi/6.0*pow3(diameter)); break; } @@ -152,9 +210,15 @@ Foam::scalar Foam::InjectionModel<CloudType>::setNumberOfParticles nP = 0.0; FatalErrorIn ( - "void Foam::InjectionModel<CloudType>::setNumberOfParticles" - "(const label, const scalar, const scalar, const scalar, " - "const scalar)" + "Foam::scalar " + "Foam::InjectionModel<CloudType>::setNumberOfParticles" + "(" + " const label, " + " const scalar, " + " const scalar, " + " const scalar, " + " const scalar" + ")" )<< "Unknown parcelBasis type" << nl << exit(FatalError); } @@ -165,31 +229,51 @@ Foam::scalar Foam::InjectionModel<CloudType>::setNumberOfParticles template<class CloudType> -void Foam::InjectionModel<CloudType>::postInjectCheck() +void Foam::InjectionModel<CloudType>::postInjectCheck(const label parcelsAdded) { - if (nParcelsAdded_ > 0) + if (parcelsAdded > 0) { Pout<< "\n--> Cloud: " << owner_.name() << nl - << " Added " << nParcelsAdded_ - << " new parcels" << nl << endl; + << " Added " << parcelsAdded + << " new parcels" << nl << endl; } // Increment total number of parcels added - nParcelsAddedTotal_ += nParcelsAdded_; - - // Reset parcel counters - nParcelsAdded_ = 0; + parcelsAddedTotal_ += parcelsAdded; // Update time for start of next injection time0_ = owner_.db().time().value(); // Increment number of injections nInjections_++; + + // Write current state to properties file + writeProps(); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +template<class CloudType> +Foam::InjectionModel<CloudType>::InjectionModel(CloudType& owner) +: + dict_(dictionary::null), + owner_(owner), + coeffDict_(dictionary::null), + SOI_(0.0), + volumeTotal_(0.0), + massTotal_(0.0), + massInjected_(0.0), + nInjections_(0), + parcelsAddedTotal_(0), + parcelBasis_(pbNumber), + time0_(0.0), + timeStep0_(0.0) +{ + readProps(); +} + + template<class CloudType> Foam::InjectionModel<CloudType>::InjectionModel ( @@ -197,7 +281,8 @@ Foam::InjectionModel<CloudType>::InjectionModel CloudType& owner, const word& type ) -: dict_(dict), +: + dict_(dict), owner_(owner), coeffDict_(dict.subDict(type + "Coeffs")), SOI_(readScalar(coeffDict_.lookup("SOI"))), @@ -205,18 +290,23 @@ Foam::InjectionModel<CloudType>::InjectionModel massTotal_(dimensionedScalar(coeffDict_.lookup("massTotal")).value()), massInjected_(0.0), nInjections_(0), - nParcelsAdded_(0), - nParcelsAddedTotal_(0), - parcelBasisType_(coeffDict_.lookup("parcelBasisType")), + parcelsAddedTotal_(0), parcelBasis_(pbNumber), time0_(owner.db().time().value()), timeStep0_(0.0) { - if (parcelBasisType_ == "mass") + // Provide some info + // - also serves to initialise mesh dimensions - needed for parallel runs + // due to lazy evaluation of valid mesh dimensions + Info<< " Constructing " << owner.mesh().nGeometricD() << "-D injection" + << endl; + + word parcelBasisType = coeffDict_.lookup("parcelBasisType"); + if (parcelBasisType == "mass") { parcelBasis_ = pbMass; } - else if (parcelBasisType_ == "number") + else if (parcelBasisType == "number") { parcelBasis_ = pbNumber; } @@ -225,10 +315,16 @@ Foam::InjectionModel<CloudType>::InjectionModel FatalErrorIn ( "Foam::InjectionModel<CloudType>::InjectionModel" - "(const dictionary&, CloudType&, const word&)" + "(" + "const dictionary&, " + "CloudType&, " + "const word&" + ")" )<< "parcelBasisType must be either 'number' or 'mass'" << nl << exit(FatalError); } + + readProps(); } @@ -245,78 +341,97 @@ template<class CloudType> template<class TrackData> void Foam::InjectionModel<CloudType>::inject(TrackData& td) { + if (!active()) + { + return; + } + 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 - nParcelsAdded_ = 0; - label nParcels = 0; - scalar volume = 0.0; - prepareForNextTimeStep(time0_, time, nParcels, volume); + label newParcels = 0; + scalar newVolume = 0.0; + prepareForNextTimeStep(time, newParcels, newVolume); // Return if no parcels are required - if (nParcels == 0) + if (newParcels == 0) { - postInjectCheck(); + postInjectCheck(0); return; } - // Particle density given by constant properties - const scalar rho = td.constProps().rho0(); - // Volume fraction to introduce during this timestep - const scalar volFraction = volumeFraction(volume); + 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_); - // Introduce new parcels linearly with time - for (label iParcel=0; iParcel<nParcels; iParcel++) + // Introduce new parcels linearly across carrier phase timestep + label parcelsAdded = 0; + for (label parcelI=0; parcelI<newParcels; parcelI++) { - // Calculate the pseudo time of injection for parcel 'iParcel' - scalar timeInj = time0_ + padTime + deltaT*iParcel/nParcels; - - // Determine injected parcel properties - vector pos = position(iParcel, timeInj, owner_.meshInfo()); - - // Diameter of parcels - scalar d = d0(iParcel, timeInj); - - // Number of particles per parcel - scalar nP = setNumberOfParticles - ( - nParcels, - d, - volFraction, - rho, - volume - ); - - // Velocity of parcels - vector U = velocity(iParcel, timeInj, owner_.meshInfo()); - - // Determine the injection cell - label cellI = -1; - findInjectorCellAndPosition(cellI, pos); - - if (cellI >= 0) + if (validInjection(parcelI)) { - scalar dt = time - timeInj; - td.cloud().addNewParcel(pos, cellI, d, U, nP, dt); - - massInjected_ += nP*rho*mathematicalConstant::pi*pow3(d)/6.0; - nParcelsAdded_++; + // 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, newParcels, timeInj, pos, cellI); + + if (cellI > -1) + { + // Lagrangian timestep + scalar dt = time - timeInj; + + // Apply corrections to position for 2-D cases + meshTools::constrainToMeshCentre(mesh, pos); + + // 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().addParticle(pPtr); + + massInjected_ += pPtr->nParticle()*pPtr->mass(); + parcelsAdded++; + } } } - postInjectCheck(); + postInjectCheck(parcelsAdded); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H index 791631fb9934586d9116d3efb54e16aead841fc2..d90624ebcd3715a1bcfdd74c6b4029b2b6af09ef 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H @@ -25,9 +25,20 @@ License 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 @@ -54,7 +65,6 @@ namespace Foam template<class CloudType> class InjectionModel { - public: // Enumerations @@ -75,17 +85,29 @@ private: //- The cloud dictionary const dictionary& dict_; - // Reference to the owner cloud class + //- Reference to the owner cloud class CloudType& owner_; //- The coefficients dictionary const dictionary coeffDict_; + // Private member functions + + //- Read injector properties from previous run (if applicable) + void readProps(); + + //- Write injector properties + void writeProps(); + + protected: // Protected data + //- Convenience typedef for parcel type + typedef typename CloudType::parcelType parcelType; + // Global injection properties //- Start of injection [s] @@ -107,22 +129,14 @@ protected: //- Number of injections counter label nInjections_; - //- Running counter of parcels added during each injection - label nParcelsAdded_; - //- Running counter of total number of parcels added - label nParcelsAddedTotal_; + label parcelsAddedTotal_; // Injection properties per Lagrangian time step - // Parcel basis - - //- Parcel basis name - const word parcelBasisType_; - - //- Parcel basis enumeration - parcelBasis parcelBasis_; + //- Parcel basis enumeration + parcelBasis parcelBasis_; //- Continuous phase time at start of injection time step [s] scalar time0_; @@ -133,50 +147,49 @@ protected: // Protected member functions - //- Number of parcels to introduce over the time step - virtual label nParcelsToInject + //- 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, const scalar time1 ) const = 0; + //- Additional flag to identify whether or not injection in cellI is + // permitted + virtual bool validInjection(const label parcelI) = 0; //- Determine properties for next time step/injection interval - void prepareForNextTimeStep + virtual void prepareForNextTimeStep ( - const scalar time0, - const scalar time1, - label& nParcels, - scalar& volume + const scalar time, + label& newParcels, + scalar& newVolume ); - //- Find the cell that contains the injector position - // Will modify position slightly towards the owner cell centroid - virtual void findInjectorCellAndPosition - ( - label& cellI, - vector& position - ); + //- Find the cell that contains the supplied position + // Will modify position slightly towards the owner cell centroid to + // ensure that it lies in a cell and not edge/face + virtual void findCellAtPosition(label& cellI, vector& position); //- Set number of particles to inject given parcel properties - scalar setNumberOfParticles + virtual scalar setNumberOfParticles ( - const label nParcels, - const scalar diameter, + const label parcels, + const scalar volume, const scalar volumeFraction, - const scalar rho, - const scalar volume + const scalar diameter, + const scalar rho ); //- Post injection checks - void postInjectCheck(); + virtual void postInjectCheck(const label parcelsAdded); public: @@ -200,6 +213,9 @@ public: // Constructors + //- Construct null from owner + InjectionModel(CloudType& owner); + //- Construct from dictionary InjectionModel ( @@ -253,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 @@ -265,7 +281,7 @@ public: inline label nInjections() const; //- Return the total number parcels added - inline label nParcelsAddedTotal() const; + inline label parcelsAddedTotal() const; // Per-injection event functions @@ -280,35 +296,30 @@ public: // Injection geometry - //- Return the injection position - virtual vector position + //- Set the injection position and owner cell + virtual void setPositionAndCell ( - const label iParcel, + const label parcelI, + const label nParcels, const scalar time, - const polyMeshInfo& meshInfo + 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 iParcel, + const label parcelI, + const label nParcels, const scalar time, - const polyMeshInfo& meshInfo + typename CloudType::parcelType& parcel ) = 0; - //- Return the diameter of the parcel to introduce at a time - virtual scalar d0 - ( - const label iParcel, - 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 @@ -331,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/InjectionModel/InjectionModelI.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelI.H index f02d05b902c664a032856b0b29b67ec48d7a0f09..80a142816c826fa03984fee7c502c063280a84c5 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelI.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelI.H @@ -90,9 +90,9 @@ Foam::label Foam::InjectionModel<CloudType>::nInjections() const template<class CloudType> -Foam::label Foam::InjectionModel<CloudType>::nParcelsAddedTotal() const +Foam::label Foam::InjectionModel<CloudType>::parcelsAddedTotal() const { - return nParcelsAddedTotal_; + return parcelsAddedTotal_; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/NewInjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/NewInjectionModel.C index 3501e367aadbe48867cae7724d53b5abf1ac8b1c..c0926272c622c105007d025ecb4e025c8f906c39 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/NewInjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/NewInjectionModel.C @@ -36,10 +36,7 @@ Foam::InjectionModel<CloudType>::New CloudType& owner ) { - word InjectionModelType - ( - dict.lookup("InjectionModel") - ); + word InjectionModelType(dict.lookup("InjectionModel")); Info<< "Selecting InjectionModel " << InjectionModelType << endl; @@ -51,11 +48,14 @@ Foam::InjectionModel<CloudType>::New FatalErrorIn ( "InjectionModel<CloudType>::New" - "(const dictionary&, CloudType&)" + "(" + "const dictionary&, " + "CloudType&" + ")" ) << "Unknown InjectionModelType type " << InjectionModelType << ", constructor not in hash table" << nl << nl - << " Valid InjectionModel types are :" << nl + << " Valid InjectionModel types are:" << nl << dictionaryConstructorTablePtr_->toc() << exit(FatalError); } 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 c201b5fc4f39d4b95f55169e38bc304fa6257015..afcd15f30308226ed2f1d48d3a2f11b78639fc39 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C @@ -29,7 +29,7 @@ License // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // template<class CloudType> -Foam::label Foam::ManualInjection<CloudType>::nParcelsToInject +Foam::label Foam::ManualInjection<CloudType>::parcelsToInject ( const scalar time0, const scalar time1 @@ -130,71 +130,53 @@ template<class CloudType> Foam::scalar Foam::ManualInjection<CloudType>::timeEnd() const { // Not used - return 0.0; + return this->SOI_; } template<class CloudType> -Foam::vector Foam::ManualInjection<CloudType>::position +void Foam::ManualInjection<CloudType>::setPositionAndCell ( - const label iParcel, + const label parcelI, + const label, const scalar time, - const polyMeshInfo& meshInfo + vector& position, + label& cellOwner ) { - vector pos = positions_[iParcel]; - if (meshInfo.caseIs2d()) - { - if (meshInfo.caseIs2dWedge()) - { - pos.component(meshInfo.emptyComponent()) = 0.0; - } - else if (meshInfo.caseIs2dSlab()) - { - pos.component(meshInfo.emptyComponent()) = - meshInfo.centrePoint().component(meshInfo.emptyComponent()); - } - else - { - FatalErrorIn - ( - "Foam::vector Foam::ManualInjection<CloudType>::position" - ) << "Could not determine 2-D case geometry" << nl - << abort(FatalError); - } - } - - return pos; + position = positions_[parcelI]; + this->findCellAtPosition(cellOwner, position); } template<class CloudType> -Foam::vector Foam::ManualInjection<CloudType>::velocity +void Foam::ManualInjection<CloudType>::setProperties ( + const label parcelI, const label, const scalar, - const polyMeshInfo& meshInfo + typename CloudType::parcelType& parcel ) { - vector vel = U0_; - if (meshInfo.caseIs2dSlab()) - { - vel.component(meshInfo.emptyComponent()) = - meshInfo.centrePoint().component(meshInfo.emptyComponent()); - } + // set particle velocity + parcel.U() = U0_; - return vel; + // set particle diameter + parcel.d() = diameters_[parcelI]; } template<class CloudType> -Foam::scalar Foam::ManualInjection<CloudType>::d0 -( - const label iParcel, - const scalar -) const +bool Foam::ManualInjection<CloudType>::fullyDescribed() const { - return diameters_[iParcel]; + return false; +} + + +template<class CloudType> +bool Foam::ManualInjection<CloudType>::validInjection(const label) +{ + return true; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H index 6393924177576713d559c8388d0ab79a3446d339..e3ab4853c57948ff88d12775b48086260fc5c287 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H @@ -33,19 +33,15 @@ Description - Parcel positions in file @c positionsFile - Initial parcel velocity - Parcel diameters obtained by PDF model - - All parcels introduced at the start of the calculation - -Note - Not suitable for 2-D slab/wedge simulations unless the @c positionsFile - describes 2-D data. + - All parcels introduced at SOI SourceFiles ManualInjection.C \*---------------------------------------------------------------------------*/ -#ifndef manualInjection_H -#define manualInjection_H +#ifndef ManualInjection_H +#define ManualInjection_H #include "InjectionModel.H" #include "pdf.H" @@ -64,12 +60,8 @@ class ManualInjection : public InjectionModel<CloudType> { - // Private data - //- Coefficients dictionary - dictionary coeffDict_; - //- Name of file containing positions data const word positionsFile_; @@ -77,7 +69,7 @@ class ManualInjection vectorIOField positions_; //- Field of parcel diameters - scalarField diameters_; + scalarList diameters_; //- Initial parcel velocity const vector U0_; @@ -93,14 +85,14 @@ protected: // Protected member functions - //- Number of parcels to introduce over the time step - label nParcelsToInject + //- 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, @@ -124,9 +116,8 @@ public: ); - // Destructor - - ~ManualInjection(); + //- Destructor + virtual ~ManualInjection(); // Member Functions @@ -140,28 +131,31 @@ public: // Injection geometry - //- Return the injection position - vector position + //- Set the injection position and owner cell + virtual void setPositionAndCell ( - const label iParcel, + const label parcelI, + const label nParcels, const scalar time, - const polyMeshInfo& meshInfo + 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, + const label parcelI, + const label nParcels, const scalar time, - const polyMeshInfo& meshInfo + typename CloudType::parcelType& parcel ); - //- Return the diameter of the parcel to introduce at a time - scalar d0 - ( - const label, - const scalar - ) 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 + 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 d5530ba71d0307393ff8c40fc054790a001b19b4..9e8019e5373a21f031105bb8a98b598a8df80cbe 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.C @@ -30,7 +30,7 @@ License // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // template<class CloudType> -Foam::label Foam::NoInjection<CloudType>::nParcelsToInject +Foam::label Foam::NoInjection<CloudType>::parcelsToInject ( const scalar, const scalar @@ -56,11 +56,11 @@ Foam::scalar Foam::NoInjection<CloudType>::volumeToInject template<class CloudType> Foam::NoInjection<CloudType>::NoInjection ( - const dictionary& dict, + const dictionary&, CloudType& owner ) : - InjectionModel<CloudType>(dict, owner, typeName) + InjectionModel<CloudType>(owner) {} @@ -88,37 +88,45 @@ Foam::scalar Foam::NoInjection<CloudType>::timeEnd() const template<class CloudType> -Foam::vector Foam::NoInjection<CloudType>::position +void Foam::NoInjection<CloudType>::setPositionAndCell ( + const label, const label, const scalar, - const polyMeshInfo& + vector&, + label& ) -{ - return vector::zero; -} +{} template<class CloudType> -Foam::vector Foam::NoInjection<CloudType>::velocity +void Foam::NoInjection<CloudType>::setProperties ( + const label, const label, const scalar, - const polyMeshInfo& + 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; +} + + +template<class CloudType> +bool Foam::NoInjection<CloudType>::validInjection(const label) +{ + 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 99f37cea4a4b5e89a7758a1b776c16c82b4387ee..6f2950b17cdf16df1090e8f1ba136543f1b5f981 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H @@ -26,15 +26,15 @@ Class Foam::NoInjection Description - Place holder for 'no injection' option + Place holder for 'none' option SourceFiles NoInjection.C \*---------------------------------------------------------------------------*/ -#ifndef noInjection_H -#define noInjection_H +#ifndef NoInjection_H +#define NoInjection_H #include "InjectionModel.H" @@ -44,7 +44,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class NoInjection Declaration + Class NoInjection Declaration \*---------------------------------------------------------------------------*/ template<class CloudType> @@ -52,19 +52,18 @@ class NoInjection : public InjectionModel<CloudType> { - protected: // Protected member functions - //- Number of parcels to introduce over the time step - label nParcelsToInject + //- 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, @@ -75,7 +74,7 @@ protected: public: //- Runtime type information - TypeName("NoInjection"); + TypeName("none"); // Constructors @@ -83,14 +82,13 @@ public: //- Construct from components NoInjection ( - const dictionary& dict, - CloudType& owner + const dictionary&, + CloudType& ); - // Destructor - - ~NoInjection(); + //- Destructor + virtual ~NoInjection(); // Member Functions @@ -104,28 +102,30 @@ public: // Injection geometry - //- Return the injection position - vector position + //- Set the injection position and owner cell + virtual void setPositionAndCell ( - const label iParcel, + const label parcelI, + const label nParcels, const scalar time, - const polyMeshInfo& meshInfo + vector& position, + label& cellOwner ); - //- Return the velocity of the parcel to introduce at a time - vector velocity + virtual void setProperties ( - const label, + const label parcelI, + const label nParcels, const scalar time, - const polyMeshInfo& meshInfo + typename CloudType::parcelType& parcel ); - //- Return the diameter of the parcel to introduce at a time - scalar d0 - ( - const label, - const scalar - ) 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 + 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/PatchInteractionModel/PatchInteractionModel/NewPatchInteractionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/NewPatchInteractionModel.C new file mode 100644 index 0000000000000000000000000000000000000000..83740bb684d1e0dea8fdf4a8acc637fc5854170a --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/NewPatchInteractionModel.C @@ -0,0 +1,67 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "PatchInteractionModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::autoPtr<Foam::PatchInteractionModel<CloudType> > +Foam::PatchInteractionModel<CloudType>::New +( + const dictionary& dict, + CloudType& owner +) +{ + word PatchInteractionModelType(dict.lookup("PatchInteractionModel")); + + Info<< "Selecting PatchInteractionModel " << PatchInteractionModelType + << endl; + + typename dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(PatchInteractionModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "PatchInteractionModel<CloudType>::New" + "(" + "const dictionary&, " + "CloudType&" + ")" + ) << "Unknown PatchInteractionModelType type " + << PatchInteractionModelType + << ", constructor not in hash table" << nl << nl + << " Valid PatchInteractionModel types are:" << nl + << dictionaryConstructorTablePtr_->toc() << exit(FatalError); + } + + 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 80% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.C rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C index a99831988fd391c2fefbf679451469818a31d0a2..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,18 +24,19 @@ License \*---------------------------------------------------------------------------*/ -#include "WallInteractionModel.H" +#include "PatchInteractionModel.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class CloudType> -Foam::WallInteractionModel<CloudType>::WallInteractionModel +Foam::PatchInteractionModel<CloudType>::PatchInteractionModel ( const dictionary& dict, CloudType& owner, const word& type ) -: dict_(dict), +: + dict_(dict), owner_(owner), coeffDict_(dict.subDict(type + "Coeffs")) {} @@ -44,7 +45,7 @@ Foam::WallInteractionModel<CloudType>::WallInteractionModel // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template<class CloudType> -Foam::WallInteractionModel<CloudType>::~WallInteractionModel() +Foam::PatchInteractionModel<CloudType>::~PatchInteractionModel() {} @@ -52,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_; } @@ -67,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_; } @@ -75,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 63% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.H rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H index d99034245c511f867e9380a78f13ca3e38e4d332..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,19 +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 @@ -70,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, @@ -89,7 +87,7 @@ public: // Constructors //- Construct from components - WallInteractionModel + PatchInteractionModel ( const dictionary& dict, CloudType& owner, @@ -97,18 +95,16 @@ public: ); - // Destructor - - virtual ~WallInteractionModel(); - + //- Destructor + virtual ~PatchInteractionModel(); - // Selector - static autoPtr<WallInteractionModel<CloudType> > New - ( - const dictionary& dict, - CloudType& owner - ); + //- Selector + static autoPtr<PatchInteractionModel<CloudType> > New + ( + const dictionary& dict, + CloudType& owner + ); // Access @@ -125,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; @@ -144,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 7210f71e8af6c4d751d10db50f49e8cbd808cbf9..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; @@ -77,6 +77,7 @@ 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 80% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.H rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.H index 6181840a97a332579c7390176540832a1ac80184..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,27 +64,23 @@ public: // Constructors //- Construct from dictionary - Rebound - ( - const dictionary& dict, - CloudType& cloud - ); - + Rebound(const dictionary& dict, CloudType& cloud); - // Destructor - ~Rebound(); + //- Destructor + virtual ~Rebound(); // 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 81% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.H rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.H index 30e99d2f3e447ee30fee34eb01b91595730ca105..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,15 +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_; @@ -67,27 +66,23 @@ public: // Constructors //- Construct from dictionary - StandardWallInteraction - ( - const dictionary& dict, - CloudType& cloud - ); - + StandardWallInteraction(const dictionary& dict, CloudType& cloud); - // Destructor - ~StandardWallInteraction(); + //- Destructor + virtual ~StandardWallInteraction(); // 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/WallInteractionModel/WallInteractionModel/NewWallInteractionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/NewPostProcessingModel.C similarity index 68% rename from src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/NewWallInteractionModel.C rename to src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/NewPostProcessingModel.C index ee1fd8a169e08e7c932aeaf0beaf55d53659b838..29c096b67769cefbb1626097d6f6c16b38f6ff22 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/NewWallInteractionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/NewPostProcessingModel.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,42 @@ License \*---------------------------------------------------------------------------*/ -#include "WallInteractionModel.H" +#include "PostProcessingModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template<class CloudType> -Foam::autoPtr<Foam::WallInteractionModel<CloudType> > -Foam::WallInteractionModel<CloudType>::New +Foam::autoPtr<Foam::PostProcessingModel<CloudType> > +Foam::PostProcessingModel<CloudType>::New ( const dictionary& dict, CloudType& owner ) { - word WallInteractionModelType - ( - dict.lookup("WallInteractionModel") - ); + word PostProcessingModelType(dict.lookup("PostProcessingModel")); - Info<< "Selecting WallInteractionModel " << WallInteractionModelType - << endl; + Info<< "Selecting PostProcessingModel " << PostProcessingModelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(WallInteractionModelType); + dictionaryConstructorTablePtr_->find(PostProcessingModelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn ( - "WallInteractionModel<CloudType>::New" - "(const dictionary&, CloudType&)" - ) - << "Unknown WallInteractionModelType type " - << WallInteractionModelType + "PostProcessingModel<CloudType>::New" + "(" + "const dictionary&, " + "CloudType&" + ")" + ) << "Unknown PostProcessingModelType type " + << PostProcessingModelType << ", constructor not in hash table" << nl << nl - << " Valid WallInteractionModel types are :" << nl + << " Valid PostProcessingModel types are:" << nl << dictionaryConstructorTablePtr_->toc() << exit(FatalError); } - return autoPtr<WallInteractionModel<CloudType> >(cstrIter()(dict, owner)); + 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 651b04153839ef57ad3f5fe66d1ce4ad4e47c13d..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 @@ -35,18 +35,19 @@ Foam::CompositionModel<CloudType>::CompositionModel CloudType& owner, const word& type ) -: dict_(dict), +: + dict_(dict), owner_(owner), coeffDict_(dict.subDict(type + "Coeffs")), carrierThermo_(owner.carrierThermo()), - gases_(owner.gases()), + carrierSpecies_(owner.carrierSpecies()), liquids_ ( liquidMixture::New ( owner.mesh().objectRegistry::lookupObject<dictionary> ( - "thermophysicalProperties" + carrierThermo_.name() ) ) ), @@ -56,9 +57,16 @@ Foam::CompositionModel<CloudType>::CompositionModel ( owner.mesh().objectRegistry::lookupObject<dictionary> ( - "thermophysicalProperties" + carrierThermo_.name() ) ) + ), + phaseProps_ + ( + coeffDict_.lookup("phases"), + carrierThermo_.composition().species(), + liquids_().components(), + solids_().components() ) {} @@ -102,10 +110,10 @@ Foam::CompositionModel<CloudType>::carrierThermo() const template<class CloudType> -const Foam::PtrList<Foam::specieReactingProperties>& -Foam::CompositionModel<CloudType>::gases() const +const Foam::PtrList<typename CloudType::thermoType>& +Foam::CompositionModel<CloudType>::carrierSpecies() const { - return gases_; + return carrierSpecies_; } @@ -123,6 +131,429 @@ const Foam::solidMixture& Foam::CompositionModel<CloudType>::solids() const } +template<class CloudType> +const Foam::phasePropertiesList& +Foam::CompositionModel<CloudType>::phaseProps() const +{ + return phaseProps_; +} + + +template<class CloudType> +Foam::label Foam::CompositionModel<CloudType>::nPhase() const +{ + return phaseProps_.size(); +} + + +template<class CloudType> +const Foam::wordList& +Foam::CompositionModel<CloudType>::phaseTypes() const +{ + // if only 1 phase, return the constituent component names + if (phaseProps_.size() == 1) + { + return phaseProps_[0].names(); + } + else + { + return phaseProps_.phaseTypes(); + } +} + + +template<class CloudType> +const Foam::wordList& +Foam::CompositionModel<CloudType>::stateLabels() const +{ + return phaseProps_.stateLabels(); +} + + +template<class CloudType> +const Foam::wordList& +Foam::CompositionModel<CloudType>::componentNames(const label phaseI) const +{ + return phaseProps_[phaseI].names(); +} + + +template<class CloudType> +Foam::label Foam::CompositionModel<CloudType>::globalCarrierId +( + const word& cmptName +) const +{ + forAll(carrierThermo_.composition().species(), i) + { + word carrierSpecieName = carrierThermo_.composition().species()[i]; + if (cmptName == carrierSpecieName) + { + return i; + } + } + + FatalErrorIn + ( + "Foam::label Foam::CompositionModel<CloudType>::globalCarrierId" + "(" + "const word&" + ") const" + ) << "Unable to determine global id for requested component " + << cmptName << nl << abort(FatalError); + + return -1; +} + + +template<class CloudType> +Foam::label Foam::CompositionModel<CloudType>::globalId +( + const label phaseI, + const word& cmptName +) const +{ + label id = phaseProps_[phaseI].globalId(cmptName); + + if (id < 0) + { + FatalErrorIn + ( + "Foam::label Foam::CompositionModel<CloudType>::globalId" + "(" + "const label, " + "const word&" + ") const" + ) << "Unable to determine global id for requested component " + << cmptName << nl << abort(FatalError); + } + + return id; +} + + +template<class CloudType> +const Foam::labelList& Foam::CompositionModel<CloudType>::globalIds +( + const label phaseI +) const +{ + return phaseProps_[phaseI].globalIds(); +} + + +template<class CloudType> +Foam::label Foam::CompositionModel<CloudType>::localId +( + const label phaseI, + const word& cmptName +) const +{ + label id = phaseProps_[phaseI].id(cmptName); + + if (id < 0) + { + FatalErrorIn + ( + "Foam::label Foam::CompositionModel<CloudType>::localId" + "(" + "const label, " + "const word&" + ") const" + ) << "Unable to determine local id for component " << cmptName + << nl << abort(FatalError); + } + + return id; +} + + +template<class CloudType> +Foam::label Foam::CompositionModel<CloudType>::localToGlobalCarrierId +( + const label phaseI, + const label id +) const +{ + label gid = phaseProps_[phaseI].globalCarrierIds()[id]; + + if (gid < 0) + { + FatalErrorIn + ( + "Foam::label " + "Foam::CompositionModel<CloudType>::localToGlobalCarrierId" + "(" + "const label, " + "const label" + ") const" + ) << "Unable to determine global carrier id for phase " + << phaseI << " with local id " << id + << nl << abort(FatalError); + } + + return gid; +} + + +template<class CloudType> +const Foam::scalarField& Foam::CompositionModel<CloudType>::Y0 +( + const label phaseI +) const +{ + return phaseProps_[phaseI].Y(); +} + + +template<class CloudType> +Foam::scalarField Foam::CompositionModel<CloudType>::X +( + const label phaseI, + const scalarField& Y +) const +{ + const phaseProperties& props = phaseProps_[phaseI]; + scalarField X(Y.size(), 0.0); + scalar WInv = 0.0; + switch (props.phase()) + { + case phaseProperties::GAS: + { + forAll(Y, i) + { + label gid = props.globalIds()[i]; + WInv += Y[i]/this->carrierSpecies()[gid].W(); + X[i] = Y[i]/this->carrierSpecies()[gid].W(); + } + break; + } + case phaseProperties::LIQUID: + { + forAll(Y, i) + { + label gid = props.globalIds()[i]; + WInv += Y[i]/this->liquids().properties()[gid].W(); + X[i] += Y[i]/this->liquids().properties()[gid].W(); + } + break; + } + default: + { + FatalErrorIn + ( + "Foam::scalarField Foam::CompositionModel<CloudType>::X" + "(" + "const label, " + "const scalarField&" + ") const" + ) << "Only possible to convert gas and liquid mass fractions" + << nl << abort(FatalError); + } + } + + return X/WInv; +} + + +template<class CloudType> +Foam::scalar Foam::CompositionModel<CloudType>::H +( + const label phaseI, + const scalarField& Y, + const scalar p, + const scalar T +) const +{ + const phaseProperties& props = phaseProps_[phaseI]; + scalar HMixture = 0.0; + switch (props.phase()) + { + case phaseProperties::GAS: + { + forAll(Y, i) + { + label gid = props.globalIds()[i]; + HMixture += Y[i]*this->carrierSpecies()[gid].H(T); + } + break; + } + case phaseProperties::LIQUID: + { + forAll(Y, i) + { + label gid = props.globalIds()[i]; + HMixture += Y[i]*this->liquids().properties()[gid].h(p, T); + } + break; + } + case phaseProperties::SOLID: + { + forAll(Y, i) + { + label gid = props.globalIds()[i]; + HMixture += + Y[i] + *( + this->solids().properties()[gid].Hf() + + this->solids().properties()[gid].cp()*T + ); + } + break; + } + default: + { + FatalErrorIn + ( + "Foam::scalar Foam::CompositionModel<CloudType>::H" + "(" + " const label, " + " const scalarField&, " + " const scalar, " + " const scalar" + ") const" + ) << "Unknown phase enumeration" << nl << abort(FatalError); + } + } + + return HMixture; +} + + +template<class CloudType> +Foam::scalar Foam::CompositionModel<CloudType>::cp +( + const label phaseI, + const scalarField& Y, + const scalar p, + const scalar T +) const +{ + const phaseProperties& props = phaseProps_[phaseI]; + scalar cpMixture = 0.0; + switch (props.phase()) + { + case phaseProperties::GAS: + { + forAll(Y, i) + { + label gid = props.globalIds()[i]; + cpMixture += Y[i]*this->carrierSpecies()[gid].Cp(T); + } + break; + } + case phaseProperties::LIQUID: + { + forAll(Y, i) + { + label gid = props.globalIds()[i]; + cpMixture += Y[i]*this->liquids().properties()[gid].cp(p, T); + } + break; + } + case phaseProperties::SOLID: + { + forAll(Y, i) + { + label gid = props.globalIds()[i]; + cpMixture += Y[i]*this->solids().properties()[gid].cp(); + } + break; + } + default: + { + FatalErrorIn + ( + "Foam::scalar Foam::CompositionModel<CloudType>::cp" + "(" + "const label, " + "const scalarField&, " + "const scalar, " + "const scalar" + ") const" + ) << "Unknown phase enumeration" << nl << abort(FatalError); + } + } + + return cpMixture; +} + + +template<class CloudType> +Foam::scalar Foam::CompositionModel<CloudType>::L +( + const label phaseI, + const scalarField& Y, + const scalar p, + const scalar T +) const +{ + const phaseProperties& props = phaseProps_[phaseI]; + scalar LMixture = 0.0; + switch (props.phase()) + { + case phaseProperties::GAS: + { + if (debug) + { + WarningIn + ( + "Foam::scalar Foam::CompositionModel<CloudType>::L" + "(" + "const label, " + "const scalarField&, " + "const scalar, " + "const scalar" + ") const\n" + ) << "No support for gaseous components" << endl; + } + break; + } + case phaseProperties::LIQUID: + { + forAll(Y, i) + { + label gid = props.globalIds()[i]; + LMixture += Y[i]*this->liquids().properties()[gid].hl(p, T); + } + break; + } + case phaseProperties::SOLID: + { + if (debug) + { + WarningIn + ( + "Foam::scalar Foam::CompositionModel<CloudType>::L" + "(" + "const label, " + "const scalarField&, " + "const scalar, " + "const scalar" + ") const\n" + ) << "No support for solid components" << endl; + } + break; + } + default: + { + FatalErrorIn + ( + "Foam::scalar Foam::CompositionModel<CloudType>::L" + "(" + "const label, " + "const scalarField&, " + "const scalar, " + "const scalar" + ") const" + ) << "Unknown phase enumeration" << nl << abort(FatalError); + } + } + + return LMixture; +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "NewCompositionModel.C" diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H index eecd432a9610a3e2648029c589719654ac9b6fca..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 @@ -25,10 +25,10 @@ License Class Foam::CompositionModel - Description Templated reacting parcel composition model class - Consists of gases (via thermo package), liquids and solids + Consists of carrier species (via thermo package), and additional liquids + and solids SourceFiles CompositionModel.C @@ -49,6 +49,8 @@ SourceFiles #include "liquidMixture.H" #include "solidMixture.H" +#include "phasePropertiesList.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -61,7 +63,6 @@ namespace Foam template<class CloudType> class CompositionModel { - // Private data //- The cloud dictionary @@ -77,14 +78,17 @@ class CompositionModel hCombustionThermo& carrierThermo_; //- Reference to the carrier phase species - const PtrList<specieReactingProperties>& gases_; + const PtrList<typename CloudType::thermoType>& carrierSpecies_; - //- Global liquid properties data + //- Global (additional) liquid properties data autoPtr<liquidMixture> liquids_; - //- Global solid properties data + //- Global (additional) solid properties data autoPtr<solidMixture> solids_; + //- List of phase properties + phasePropertiesList phaseProps_; + public: @@ -116,18 +120,16 @@ public: ); - // Destructor + //- Destructor + virtual ~CompositionModel(); - virtual ~CompositionModel(); - - // Selector - - static autoPtr<CompositionModel<CloudType> > New - ( - const dictionary& dict, - CloudType& owner - ); + //- Selector + static autoPtr<CompositionModel<CloudType> > New + ( + const dictionary& dict, + CloudType& owner + ); // Member Functions @@ -146,103 +148,116 @@ public: //- Return the carrier phase thermo package const hCombustionThermo& carrierThermo() const; - //- Return the gases - const PtrList<specieReactingProperties>& gases() const; - //- Return the global liquids - const liquidMixture& liquids() const; + // Composition lists - //- Return the global solids - const solidMixture& solids() const; + //- Return the carrier species + const PtrList<typename CloudType::thermoType>& + carrierSpecies() const; - //- Return the list of composition names - virtual const wordList compositionNames() const = 0; + //- Return the global (additional) liquids + const liquidMixture& liquids() const; - //- Return the list of gas names - virtual const wordList& gasNames() const = 0; + //- Return the global (additional) solids + const solidMixture& solids() const; - //- Return local id of gas based on gasName - virtual label gasLocalId(const word& gasName) const = 0; + //- Return the list of phase properties + const phasePropertiesList& phaseProps() const; - //- Return global id of gas based on gasName - virtual label gasGlobalId(const word& gasName) const = 0; + //- Return the number of phases + label nPhase() const; - //- Return the list indices of gases in global thermo list - virtual const labelList& gasGlobalIds() const = 0; - //- Return the list of gas mass fractions - virtual const scalarField& YGas0() const = 0; + // Phase properties - //- Return the list of liquid names - virtual const wordList& liquidNames() const = 0; + //- Return the list of phase type names + // If only 1 phase, return the component names of that phase + const wordList& phaseTypes() const; - //- Return local id of liquid based on liquidName - virtual label liquidLocalId(const word& liquidName) const = 0; + //- Return the list of state labels (s), (l), (g) etc. + const wordList& stateLabels() const; - //- Return global id of liquid based on liquidName - virtual label liquidGlobalId(const word& liquidName) const = 0; + //- Return the list of component names for phaseI + const wordList& componentNames(const label phaseI) const; - //- Return the list indices of liquid in global thermo list - virtual const labelList& liquidGlobalIds() const = 0; + //- Return global id of component cmptName in carrier thermo + label globalCarrierId(const word& cmptName) const; - //- Return the list of liquid mass fractions - virtual const scalarField& YLiquid0() const = 0; + //- Return global id of component cmptName in phase phaseI + label globalId(const label phaseI, const word& cmptName) const; - //- Return the list of solid names - virtual const wordList& solidNames() const = 0; + //- Return global ids of for phase phaseI + const labelList& globalIds(const label phaseI) const; - //- Return local id of solid based on solidName - virtual label solidLocalId(const word& solidName) const = 0; + //- Return local id of component cmptName in phase phaseI + label localId(const label phaseI, const word& cmptName) const; - //- Return global id of solid based on solidName - virtual label solidGlobalId(const word& solidName) const = 0; + //- Return global carrier id of component given local id + label localToGlobalCarrierId + ( + const label phaseI, + const label id + ) const; - //- Return the list indices of solids in global thermo list - virtual const labelList& solidGlobalIds() const = 0; + //- Return the list of phase phaseI mass fractions + const scalarField& Y0(const label phaseI) const; - //- Return the list of solid mass fractions - virtual const scalarField& YSolid0() const = 0; + //- Return the list of phase phaseI volume fractions fractions + // based on supplied mass fractions Y + scalarField X + ( + const label phaseI, + const scalarField& Y + ) const; - //- Return the list of mixture mass fractions - virtual const scalarField& YMixture0() const = 0; - //- Return the gas constant for the gas mixture - virtual scalar RGas(const scalarField& YGas) const = 0; + // Mixture properties - //- Return enthalpy for the gas mixture [energy per unit mass] - virtual scalar HGas - ( - const scalarField& YGas, - const scalar T - ) const = 0; + //- Return the list of mixture mass fractions + // If only 1 phase, return component fractions of that phase + virtual const scalarField& YMixture0() const = 0; - //- Return enthalpy for the solid mixture [energy per unit mass] - virtual scalar HSolid - ( - const scalarField& YSolid, - const scalar T - ) const = 0; + // Indices of gas, liquid and solid phases in phase properties + // list - returns -1 if not applicable + + //- Gas id + virtual label idGas() const = 0; + + //- Liquid id + virtual label idLiquid() const = 0; + + //- Solid id + virtual label idSolid() const = 0; - //- Return specific heat caparcity for the gas mixture - virtual scalar cpGas + + // Evaluation + + //- Return enthalpy for the phase phaseI + virtual scalar H ( - const scalarField& YGas, - const scalar T - ) const = 0; + const label phaseI, + const scalarField& Y, + const scalar p, + const scalar T + ) const; - //- Return specific heat caparcity for the liquid mixture - virtual scalar cpLiquid + //- Return specific heat caoacity for the phase phaseI + virtual scalar cp ( - const scalarField& YLiquid, + const label phaseI, + const scalarField& Y, const scalar p, const scalar T - ) const = 0; + ) const; - //- Return specific heat caparcity for the solid mixture - virtual scalar cpSolid + //- Return latent heat for the phase phaseI + virtual scalar L ( - const scalarField& YSolid - ) const = 0; + const label phaseI, + const scalarField& Y, + const scalar p, + const scalar T + ) const; }; @@ -267,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 7fd051cd73a8f697f75071ba816828198a2316e8..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 @@ -36,34 +36,31 @@ Foam::CompositionModel<CloudType>::New CloudType& owner ) { - word ReactingCompositionModelType - ( - dict.lookup("CompositionModel") - ); + word CompositionModelType(dict.lookup("CompositionModel")); - Info<< "Selecting CompositionModel " - << ReactingCompositionModelType << endl; + Info<< "Selecting CompositionModel " << CompositionModelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(ReactingCompositionModelType); + dictionaryConstructorTablePtr_->find(CompositionModelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn ( "CompositionModel<CloudType>::New" - "(const dictionary&, CloudType&)" - ) - << "Unknown ReactingCompositionModelType type " - << ReactingCompositionModelType + "(" + "const dictionary&, " + "CloudType&" + ")" + ) << "Unknown CompositionModelType type " + << CompositionModelType << ", constructor not in hash table" << nl << nl - << " Valid CompositionModel types are :" << nl - << dictionaryConstructorTablePtr_->toc() + << " Valid CompositionModel types are:" << nl + << dictionaryConstructorTablePtr_->toc() << nl << exit(FatalError); } - return autoPtr<CompositionModel<CloudType> > - (cstrIter()(dict, owner)); + return autoPtr<CompositionModel<CloudType> >(cstrIter()(dict, owner)); } diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.C index afbaef739575eb837c5bba9912c5d37ec6e2df8d..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 @@ -26,356 +26,130 @@ License #include "SingleMixtureFraction.H" -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // template<class CloudType> -Foam::SingleMixtureFraction<CloudType>::SingleMixtureFraction -( - const dictionary& dict, - CloudType& owner -) -: - CompositionModel<CloudType>(dict, owner, typeName), - - gasNames_(this->coeffDict().lookup("gasNames")), - gasGlobalIds_(gasNames_.size(), -1), - YGas0_(this->coeffDict().lookup("YGas0")), - YGasTot0_(readScalar(this->coeffDict().lookup("YGasTot0"))), - - liquidNames_(this->coeffDict().lookup("liquidNames")), - liquidGlobalIds_(liquidNames_.size(), -1), - YLiquid0_(this->coeffDict().lookup("YLiquid0")), - YLiquidTot0_(readScalar(this->coeffDict().lookup("YLiquidTot0"))), - - solidNames_(this->coeffDict().lookup("solidNames")), - solidGlobalIds_(solidNames_.size(), -1), - YSolid0_(this->coeffDict().lookup("YSolid0")), - YSolidTot0_(readScalar(this->coeffDict().lookup("YSolidTot0"))), - - YMixture0_(3) +void Foam::SingleMixtureFraction<CloudType>::constructIds() { - // Construct gasGlobalIds_ list - forAll(gasNames_, i) + forAll(this->phaseProps(), phaseI) { - forAll (this->carrierThermo().composition().Y(), j) + switch (this->phaseProps()[phaseI].phase()) { - word specieName(this->carrierThermo().composition().Y()[j].name()); - - if (specieName == gasNames_[i]) + case phaseProperties::GAS: { - gasGlobalIds_[i] = j; + idGas_ = phaseI; break; } - } - if (gasGlobalIds_[i] == -1) - { - Info<< "\nThermo package species composition comprises:" << endl; - forAll (this->carrierThermo().composition().Y(), k) - { - Info<< this->carrierThermo().composition().Y()[k].name() - << endl; - } - - FatalErrorIn - ( - "Foam::SingleMixtureFraction<CloudType>::SingleMixtureFraction" - "(const dictionary&, CloudType&)" - ) << "Could not find gas species " << gasNames_[i] - << " in species list" << exit(FatalError); - } - } - - // Construct liquidGlobalIds_ list - forAll(liquidNames_, i) - { - forAll (this->liquids().components(), j) - { - word specieName(this->liquids().components()[j]); - - if (specieName == liquidNames_[i]) + case phaseProperties::LIQUID: { - liquidGlobalIds_[i] = j; + idLiquid_ = phaseI; break; } - } - if (liquidGlobalIds_[i] == -1) - { - Info<< "\nLiquid mixture species composition comprises:" << endl; - forAll (this->liquids().components(), k) - { - Info<< this->liquids().components()[k] << endl; - } - - FatalErrorIn - ( - "Foam::SingleMixtureFraction<CloudType>::SingleMixtureFraction" - "(const dictionary&, CloudType&)" - ) << "Could not find liquid species " << liquidNames_[i] - << " in species list" << exit(FatalError); - } - } - - // Construct solidGlobalIds_ list - forAll(solidNames_, i) - { - forAll (this->solids().components(), j) - { - word specieName(this->solids().components()[j]); - - if (specieName == solidNames_[i]) + case phaseProperties::SOLID: { - solidGlobalIds_[i] = j; + idSolid_ = phaseI; break; } - } - if (solidGlobalIds_[i] == -1) - { - Info<< "\nSolid mixture species composition comprises:" << endl; - forAll (this->solids().components(), k) + default: { - Info<< this->solids().components()[k] << endl; + FatalErrorIn + ( + "void Foam::SingleMixtureFraction<CloudType>::" + "constructIds()" + ) << "Unknown phase enumeration" << nl << abort(FatalError); } - - FatalErrorIn - ( - "Foam::SingleMixtureFraction<CloudType>::SingleMixtureFraction" - "(const dictionary&, CloudType&)" - ) << "Could not find solid species " << solidNames_[i] - << " in species list" << exit(FatalError); } } - // Set mixture fractions - YMixture0_[0] = YGasTot0_; - YMixture0_[1] = YLiquidTot0_; - YMixture0_[2] = YSolidTot0_; - - // Check that total mass fractions = 1 - - if (YGas0_.size()) + if (idGas_ < 0) { - if (mag(sum(YGas0_) - 1) > SMALL) - { - FatalErrorIn - ( - "Foam::SingleMixtureFraction<CloudType>::SingleMixtureFraction" - "(const dictionary&, CloudType&)" - )<< "Mass fractions of YGas0 must sum to unity" - << exit(FatalError); - } + FatalErrorIn("Foam::SingleMixtureFraction<CloudType>::constructIds()") + << "No gas phase found in phase list:" << nl + << this->phaseTypes() << nl << endl; } - else + if (idLiquid_ < 0) { - YMixture0_[0] = 0.0; + FatalErrorIn("Foam::SingleMixtureFraction<CloudType>::constructIds()") + << "No liquid phase found in phase list:" << nl + << this->phaseTypes() << nl << endl; } - - if (YLiquid0_.size()) + if (idSolid_ < 0) { - if (mag(sum(YLiquid0_) - 1) > SMALL) - { - FatalErrorIn - ( - "Foam::SingleMixtureFraction<CloudType>::SingleMixtureFraction" - "(const dictionary&, CloudType&)" - )<< "Mass fractions of YLiquid0 must sum to unity" - << exit(FatalError); - } - } - else - { - YMixture0_[1] = 0.0; - } - - if (YSolid0_.size()) - { - if (mag(sum(YSolid0_) - 1) > SMALL) - { - FatalErrorIn - ( - "Foam::SingleMixtureFraction<CloudType>::SingleMixtureFraction" - "(const dictionary&, CloudType&)" - )<< "Mass fractions of YSolid0 must sum to unity" - << exit(FatalError); - } - } - else - { - YMixture0_[2] = 0.0; - } - - // Check total mixture fraction sums to 1 - if (mag(sum(YMixture0_) - 1) > SMALL) - { - FatalErrorIn - ( - "Foam::SingleMixtureFraction<CloudType>::SingleMixtureFraction" - "(const dictionary&, CloudType&)" - ) << "Mass fractions YGasTot0 + YSolidTot0 + YSolidTot0 must sum " - << "to unity" << exit(FatalError); + FatalErrorIn("Foam::SingleMixtureFraction<CloudType>::constructIds()") + << "No solid phase found in phase list:" << nl + << this->phaseTypes() << nl << endl; } } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class CloudType> -Foam::SingleMixtureFraction<CloudType>::~SingleMixtureFraction() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +Foam::SingleMixtureFraction<CloudType>::SingleMixtureFraction +( + const dictionary& dict, + CloudType& owner +) +: + CompositionModel<CloudType>(dict, owner, typeName), -template<class CloudType> -const Foam::wordList -Foam::SingleMixtureFraction<CloudType>::compositionNames() const -{ - wordList names(3); - names[0] = "Gas"; - names[1] = "Liquid"; - names[2] = "Solid"; - return names; -} + idGas_(-1), + idLiquid_(-1), + idSolid_(-1), -template<class CloudType> -const Foam::wordList& -Foam::SingleMixtureFraction<CloudType>::gasNames() const + YMixture0_(3) { - return gasNames_; -} + constructIds(); - -template<class CloudType> -Foam::label -Foam::SingleMixtureFraction<CloudType>::gasLocalId(const word& gasName) const -{ - forAll(gasNames_, i) + if (this->phaseProps().size() != 3) { - if (gasName == gasNames_[i]) - { - return i; - } + FatalErrorIn + ( + "Foam::SingleMixtureFraction<CloudType>::" + "SingleMixtureFraction" + "(" + "const dictionary&, " + "CloudType&" + ")" + ) << "Incorrect numebr of phases: " << nl + << " Please specify 1 gas, 1 liquid and 1 solid" << nl + << exit(FatalError); } - WarningIn - ( - "Foam::label SingleMixtureFraction<CloudType>::" - "gasLocalId(const word& gasName) const" - )<< "Gas name " << gasName << " not found in gasNames_" - << endl; + this->coeffDict().lookup("YGasTot0") >> YMixture0_[idGas_]; + this->coeffDict().lookup("YLiquidTot0") >> YMixture0_[idLiquid_]; + this->coeffDict().lookup("YSolidTot0") >> YMixture0_[idSolid_]; - return -1; -} - - -template<class CloudType> -Foam::label -Foam::SingleMixtureFraction<CloudType>::gasGlobalId(const word& gasName) const -{ - forAll(gasNames_, i) + if (mag(sum(YMixture0_) - 1.0) > SMALL) { - if (gasName == gasNames_[i]) - { - return gasGlobalIds_[i]; - } + FatalErrorIn + ( + "Foam::SingleMixtureFraction<CloudType>::" + "SingleMixtureFraction" + "(" + "const dictionary&, " + "CloudType&" + ")" + ) << "Sum of phases should be 1. Phase fractions:" << nl + << YMixture0_ << nl << exit(FatalError); } - - WarningIn - ( - "Foam::label SingleMixtureFraction<CloudType>::" - "gasGlobalId(const word& gasName) const" - )<< "Gas name " << gasName << " not found in gasNames_" - << endl; - - return -1; -} - - -template<class CloudType> -const Foam::labelList& -Foam::SingleMixtureFraction<CloudType>::gasGlobalIds() const -{ - return gasGlobalIds_; -} - - -template<class CloudType> -const Foam::scalarField& -Foam::SingleMixtureFraction<CloudType>::YGas0() const -{ - return YGas0_; -} - - -template<class CloudType> -Foam::scalar Foam::SingleMixtureFraction<CloudType>::YGasTot0() const -{ - return YGasTot0_; } -template<class CloudType> -const Foam::wordList& -Foam::SingleMixtureFraction<CloudType>::liquidNames() const -{ - return liquidNames_; -} - - -template<class CloudType> -Foam::label Foam::SingleMixtureFraction<CloudType>::liquidLocalId -( - const word& liquidName -) const -{ - forAll(liquidNames_, i) - { - if (liquidName == liquidNames_[i]) - { - return i; - } - } - - WarningIn - ( - "Foam::label SingleMixtureFraction<CloudType>::" - "liquidLocalId(const word& liquidName) const" - )<< "Liquid name " << liquidName << " not found in liquidNames_" - << endl; - - return -1; -} - +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template<class CloudType> -Foam::label Foam::SingleMixtureFraction<CloudType>::liquidGlobalId -( - const word& liquidName -) const -{ - forAll(liquidNames_, i) - { - if (liquidName == liquidNames_[i]) - { - return liquidGlobalIds_[i]; - } - } +Foam::SingleMixtureFraction<CloudType>::~SingleMixtureFraction() +{} - WarningIn - ( - "Foam::label SingleMixtureFraction<CloudType>::" - "liquidGlobalId(const word& liquidName) const" - )<< "Liquid name " << liquidName << " not found in liquidNames_" - << endl; - - return -1; -} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class CloudType> -const Foam::labelList& -Foam::SingleMixtureFraction<CloudType>::liquidGlobalIds() const +const Foam::scalarField& +Foam::SingleMixtureFraction<CloudType>::YGas0() const { - return liquidGlobalIds_; + return this->phaseProps()[idGas_].Y(); } @@ -383,81 +157,7 @@ template<class CloudType> const Foam::scalarField& Foam::SingleMixtureFraction<CloudType>::YLiquid0() const { - return YLiquid0_; -} - - -template<class CloudType> -Foam::scalar Foam::SingleMixtureFraction<CloudType>::YLiquidTot0() const -{ - return YLiquidTot0_; -} - - -template<class CloudType> -const Foam::wordList& -Foam::SingleMixtureFraction<CloudType>::solidNames() const -{ - return solidNames_; -} - - -template<class CloudType> -Foam::label Foam::SingleMixtureFraction<CloudType>::solidLocalId -( - const word& solidName -) const -{ - forAll(solidNames_, i) - { - if (solidName == solidNames_[i]) - { - return i; - } - } - - WarningIn - ( - "Foam::label SingleMixtureFraction<CloudType>::" - "SolididLocalId(const word& solidName) const" - )<< "Solid name " << solidName << " not found in solidNames_" - << endl; - - return -1; -} - - -template<class CloudType> -Foam::label -Foam::SingleMixtureFraction<CloudType>::solidGlobalId -( - const word& solidName -) const -{ - forAll(solidNames_, i) - { - if (solidName == solidNames_[i]) - { - return solidGlobalIds_[i]; - } - } - - WarningIn - ( - "Foam::label SingleMixtureFraction<CloudType>::" - "solidGlobalId(const word& solidName) const" - )<< "Solid name " << solidName << " not found in solidNames_" - << endl; - - return -1; -} - - -template<class CloudType> -const Foam::labelList& -Foam::SingleMixtureFraction<CloudType>::solidGlobalIds() const -{ - return solidGlobalIds_; + return this->phaseProps()[idLiquid_].Y(); } @@ -465,15 +165,7 @@ template<class CloudType> const Foam::scalarField& Foam::SingleMixtureFraction<CloudType>::YSolid0() const { - return YSolid0_; -} - - -template<class CloudType> -Foam::scalar -Foam::SingleMixtureFraction<CloudType>::YSolidTot0() const -{ - return YSolidTot0_; + return this->phaseProps()[idSolid_].Y(); } @@ -486,115 +178,23 @@ Foam::SingleMixtureFraction<CloudType>::YMixture0() const template<class CloudType> -Foam::scalar Foam::SingleMixtureFraction<CloudType>::RGas -( - const scalarField& YGas -) const +Foam::label Foam::SingleMixtureFraction<CloudType>::idGas() const { - scalar RGasMixture = 0.0; - forAll(YGas, i) - { - label id = gasGlobalIds_[i]; - RGasMixture += YGas[i]*this->gases()[id].R(); - } - return RGasMixture; + return idGas_; } template<class CloudType> -Foam::scalar Foam::SingleMixtureFraction<CloudType>::HGas -( - const scalarField& YGas, - const scalar T -) -const +Foam::label Foam::SingleMixtureFraction<CloudType>::idLiquid() const { - scalar HMixture = 0.0; - forAll(YGas, i) - { - label id = gasGlobalIds_[i]; - HMixture += YGas[i]*this->gases()[id].H(T); - } - return HMixture; + return idLiquid_; } template<class CloudType> -Foam::scalar Foam::SingleMixtureFraction<CloudType>::HSolid -( - const scalarField& YSolid, - const scalar T -) -const +Foam::label Foam::SingleMixtureFraction<CloudType>::idSolid() const { - scalar HMixture = 0.0; - forAll(YSolid, i) - { - label id = solidGlobalIds_[i]; - HMixture += - YSolid[i] - *( - this->solids().properties()[id].Hf() - + this->solids().properties()[id].cp()*T - ); - } - return HMixture; -} - - -template<class CloudType> -Foam::scalar Foam::SingleMixtureFraction<CloudType>::cpGas -( - const scalarField& YGas, - const scalar T -) -const -{ - scalar cpMixture = 0.0; - forAll(YGas, i) - { - label id = gasGlobalIds_[i]; - cpMixture += YGas[i]*this->gases()[id].Cp(T); - } - return cpMixture; -} - - -template<class CloudType> -Foam::scalar Foam::SingleMixtureFraction<CloudType>::cpLiquid -( - const scalarField& YLiquid, - const scalar p, - const scalar T -) -const -{ - scalar cpMixture = 0.0; - forAll(YLiquid, i) - { - label id = liquidGlobalIds_[i]; - cpMixture += YLiquid[i]*this->liquids().properties()[id].cp(p, T); - } - - return cpMixture; -} - - -template<class CloudType> -Foam::scalar Foam::SingleMixtureFraction<CloudType>::cpSolid -( - const scalarField& YSolid -) -const -{ - scalar cpMixture = 0.0; - forAll(YSolid, i) - { - label id = solidGlobalIds_[i]; - cpMixture += YSolid[i]*this->solids().properties()[id].cp(); - } - - return cpMixture; + return idSolid_; } diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.H b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.H index 6808b3503b0e2a07886e8e140ffb723e9142bb15..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 @@ -25,10 +25,8 @@ License Class Foam::SingleMixtureFraction - Description - Templated parcel single mixture fraction class - - Each phase sums to a mass fraction of 1 + Templated parcel multi-phase, multi-component class SourceFiles SingleMixtureFraction.C @@ -54,68 +52,31 @@ class SingleMixtureFraction : public CompositionModel<CloudType> { - // Private data - //- Parcel properties - - //- List of gas names - const wordList gasNames_; - - //- Return local id of gas based on gasName - label gasLocalId(const word& gasName) const; - - //- Return global id of gas based on gasName - label gasGlobalId(const word& gasName) const; - - //- List of IDs of gases in global list - labelList gasGlobalIds_; - - //- Initial mass fractions of gases - const scalarField YGas0_; - - //- Initial total mass fractions of gases - const scalar YGasTot0_; - - //- List of liquid names - const wordList liquidNames_; + // Indices of the phases - //- Return local id of liquid based on liquidName - label liquidLocalId(const word& liquidName) const; + //- Gas + label idGas_; - //- Return global id of liquid based on liquidName - label liquidGlobalId(const word& liquidName) const; + //- Liquid + label idLiquid_; - //- List of IDs of liquids in global list - labelList liquidGlobalIds_; + //- Solid + label idSolid_; - //- Initial mass fractions of liquids - const scalarField YLiquid0_; - //- Initial total mass fractions of liquids - const scalar YLiquidTot0_; + // Mixture properties - //- List of solids species - const wordList solidNames_; - - //- Return local id of solid based on solidName - label solidLocalId(const word& solidName) const; - - //- Return global id of solid based on solidName - label solidGlobalId(const word& solidName) const; - - //- List of IDs of solids in global list - labelList solidGlobalIds_; + //- Phase component total fractions + scalarField YMixture0_; - //- Initial mass fractions of solids - const scalarField YSolid0_; - //- Initial total mass fractions of solids - const scalar YSolidTot0_; + // Private member functions - //- Initial total mass fractions of the mixture - // Index 0 = gas, 1 = liquid, 2 = solid - scalarField YMixture0_; + //- Construct the indices and check correct specification of + // 1 gas, 1 liquid and 1 solid + void constructIds(); public: @@ -127,86 +88,60 @@ public: // Constructors //- Construct from dictionary - SingleMixtureFraction - ( - const dictionary& dict, - CloudType& owner - ); - + SingleMixtureFraction(const dictionary& dict, CloudType& owner); - // Destructor - virtual ~SingleMixtureFraction(); + //- Destructor + virtual ~SingleMixtureFraction(); // Member Functions // Access - //- Return the list of composition names - const wordList compositionNames() const; - - //- Return the list of gas names - const wordList& gasNames() const; - - //- Return the list indices of gases in global thermo list - const labelList& gasGlobalIds() const; + // Gas properties - //- Return the list of gas mass fractions - const scalarField& YGas0() const; + //- Return the list of gas mass fractions + const scalarField& YGas0() const; - //- Return the total gas mass fraction - scalar YGasTot0() const; + //- Return the total gas mass fraction + scalar YGasTot0() const; - //- Return the list of liquid names - const wordList& liquidNames() const; - //- Return the list indices of liquid in global thermo list - const labelList& liquidGlobalIds() const; + // Liquid properties - //- Return the list of liquid mass fractions - const scalarField& YLiquid0() const; + //- Return the list of liquid mass fractions + const scalarField& YLiquid0() const; - //- Return the total liquid mass fraction - scalar YLiquidTot0() const; + //- Return the total liquid mass fraction + scalar YLiquidTot0() const; - //- Return the list of solid names - const wordList& solidNames() const; - //- Return the list indices of solids in global thermo list - const labelList& solidGlobalIds() const; + // Solid properties - //- Return the list of solid mass fractions - const scalarField& YSolid0() const; + //- Return the list of solid mass fractions + const scalarField& YSolid0() const; - //- Return the total solid mass fraction - scalar YSolidTot0() const; + //- Return the total solid mass fraction + scalar YSolidTot0() const; - //- Return the list of mixture mass fractions - const scalarField& YMixture0() const; - //- Return the gas constant for the gas mixture - scalar RGas(const scalarField& YGas) const; + // Mixture properties - //- Return enthalpy for the gas mixture [energy per unit mass] - scalar HGas(const scalarField& YGas, const scalar T) const; + //- Return the list of mixture mass fractions + virtual const scalarField& YMixture0() const; - //- Return enthalpy for the solid mixture [energy per unit mass] - scalar HSolid(const scalarField& YSolid, const scalar T) const; + // Indices of gas, liquid and solid phases in phase properties + // list - //- Return specific heat caparcity for the gas mixture - scalar cpGas(const scalarField& YGas, const scalar T) const; + //- Gas id + virtual label idGas() const; - //- Return specific heat caparcity for the liquid mixture - scalar cpLiquid - ( - const scalarField& YLiquid, - const scalar p, - const scalar T - ) const; + //- Liquid id + virtual label idLiquid() const; - //- Return specific heat caparcity for the solid mixture - scalar cpSolid(const scalarField& YSolid) const; + //- Solid id + virtual label idSolid() const; }; diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.C new file mode 100644 index 0000000000000000000000000000000000000000..5be1ce0a495cb03f09176330c3f3ae4b03ef0466 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.C @@ -0,0 +1,173 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "SinglePhaseMixture.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template<class CloudType> +void Foam::SinglePhaseMixture<CloudType>::constructIds() +{ + if (this->phaseProps().size() == 0) + { + FatalErrorIn + ( + "void Foam::SinglePhaseMixture<CloudType>::constructIds()" + ) << "Phase list is empty" << nl << exit(FatalError); + } + else if (this->phaseProps().size() > 1) + { + FatalErrorIn + ( + "void Foam::SinglePhaseMixture<CloudType>::constructIds()" + ) << "Only one phase permitted" << nl << exit(FatalError); + } + + switch (this->phaseProps()[0].phase()) + { + case phaseProperties::GAS: + { + idGas_ = 0; + break; + } + case phaseProperties::LIQUID: + { + idLiquid_ = 0; + break; + } + case phaseProperties::SOLID: + { + idSolid_ = 0; + break; + } + default: + { + FatalErrorIn + ( + "void Foam::SinglePhaseMixture<CloudType>::constructIds()" + ) << "Unknown phase enumeration" << nl << abort(FatalError); + } + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::SinglePhaseMixture<CloudType>::SinglePhaseMixture +( + const dictionary& dict, + CloudType& owner +) +: + CompositionModel<CloudType>(dict, owner, typeName), + idGas_(-1), + idLiquid_(-1), + idSolid_(-1) +{ + constructIds(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::SinglePhaseMixture<CloudType>::~SinglePhaseMixture() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +const Foam::scalarField& +Foam::SinglePhaseMixture<CloudType>::YGas0() const +{ + notImplemented + ( + "const Foam::scalarField& " + "Foam::SinglePhaseMixture<CloudType>::YGas0() const" + ); + return this->phaseProps()[0].Y(); +} + + +template<class CloudType> +const Foam::scalarField& +Foam::SinglePhaseMixture<CloudType>::YLiquid0() const +{ + notImplemented + ( + "const Foam::scalarField& " + "Foam::SinglePhaseMixture<CloudType>::YLiquid0() const" + ); + return this->phaseProps()[0].Y(); +} + + +template<class CloudType> +const Foam::scalarField& +Foam::SinglePhaseMixture<CloudType>::YSolid0() const +{ + notImplemented + ( + "const Foam::scalarField& " + "Foam::SinglePhaseMixture<CloudType>::YSolid0() const" + ); + return this->phaseProps()[0].Y(); +} + + +template<class CloudType> +const Foam::scalarField& +Foam::SinglePhaseMixture<CloudType>::YMixture0() const +{ + return this->phaseProps()[0].Y(); +} + + +template<class CloudType> +Foam::label Foam::SinglePhaseMixture<CloudType>::idGas() const +{ + return idGas_; +} + + +template<class CloudType> +Foam::label Foam::SinglePhaseMixture<CloudType>::idLiquid() const +{ + return idLiquid_; +} + + +template<class CloudType> +Foam::label Foam::SinglePhaseMixture<CloudType>::idSolid() const +{ + return idSolid_; +} + + +// ************************************************************************* // + diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.H b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.H new file mode 100644 index 0000000000000000000000000000000000000000..f7fda36a90829efd6e821d9b5638f28c7add25b4 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.H @@ -0,0 +1,156 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::SinglePhaseMixture + +Description + Templated parcel single phase, multi-component class + +SourceFiles + SinglePhaseMixture.C + +\*---------------------------------------------------------------------------*/ + +#ifndef SinglePhaseMixture_H +#define SinglePhaseMixture_H + +#include "CompositionModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class SinglePhaseMixture Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class SinglePhaseMixture +: + public CompositionModel<CloudType> +{ + // Private data + + // Indices of the phases - only 1 will be set + + //- Gas + label idGas_; + + //- Liquid + label idLiquid_; + + //- Solid + label idSolid_; + + + // Private member functions + + //- Construct the indices and check correct specification of + // 1 gas or 1 liquid or 1 solid + void constructIds(); + + +public: + + //- Runtime type information + TypeName("SinglePhaseMixture"); + + + // Constructors + + //- Construct from dictionary + SinglePhaseMixture(const dictionary& dict, CloudType& owner); + + + //- Destructor + virtual ~SinglePhaseMixture(); + + + // Member Functions + + // Access + + // Gas properties + + //- Return the list of gas mass fractions + const scalarField& YGas0() const; + + //- Return the total gas mass fraction + scalar YGasTot0() const; + + + // Liquid properties + + //- Return the list of liquid mass fractions + const scalarField& YLiquid0() const; + + //- Return the total liquid mass fraction + scalar YLiquidTot0() const; + + + // Solid properties + + //- Return the list of solid mass fractions + const scalarField& YSolid0() const; + + //- Return the total solid mass fraction + scalar YSolidTot0() const; + + + // Mixture properties + + //- Return the list of mixture mass fractions + virtual const scalarField& YMixture0() const; + + // Indices of gas, liquid and solid phases in phase properties + // list + + //- Gas id + virtual label idGas() const; + + //- Liquid id + virtual label idLiquid() const; + + //- Solid id + virtual label idSolid() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "SinglePhaseMixture.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#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 new file mode 100644 index 0000000000000000000000000000000000000000..b7caef3652d1f71f8b2406c6f4100adb5bd1f905 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C @@ -0,0 +1,197 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "LiquidEvaporation.H" +#include "specie.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template<class CloudType> +Foam::scalarField Foam::LiquidEvaporation<CloudType>::calcXc +( + const label cellI +) const +{ + scalarField Xc(this->owner().carrierThermo().composition().Y().size()); + + scalar Winv = 0.0; + forAll(Xc, i) + { + scalar Y = this->owner().carrierThermo().composition().Y()[i][cellI]; + Winv += Y/this->owner().carrierSpecies()[i].W(); + Xc[i] = Y/this->owner().carrierSpecies()[i].W(); + } + + return Xc/Winv; +} + + +template <class CloudType> +Foam::scalar Foam::LiquidEvaporation<CloudType>::Sh +( + const scalar Re, + const scalar Sc +) const +{ + return 2.0 + 0.6*Foam::sqrt(Re)*pow(Sc, 0.333); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template <class CloudType> +Foam::LiquidEvaporation<CloudType>::LiquidEvaporation +( + const dictionary& dict, + CloudType& owner +) +: + PhaseChangeModel<CloudType>(dict, owner, typeName), + liquids_ + ( + liquidMixture::New + ( + owner.mesh().objectRegistry::lookupObject<dictionary> + ( + owner.carrierThermo().name() + ) + ) + ), + activeLiquids_(this->coeffDict().lookup("activeLiquids")), + liqToCarrierMap_(activeLiquids_.size(), -1), + liqToLiqMap_(activeLiquids_.size(), -1) +{ + if (activeLiquids_.size() == 0) + { + WarningIn + ( + "Foam::LiquidEvaporation<CloudType>::LiquidEvaporation" + "(" + "const dictionary& dict, " + "CloudType& owner" + ")" + ) << "Evaporation model selected, but no active liquids defined" + << nl << endl; + } + + // Determine mapping between liquid and carrier phase species + forAll(activeLiquids_, i) + { + liqToCarrierMap_[i] = + owner.composition().globalCarrierId(activeLiquids_[i]); + } + + // Determine mapping between local and global liquids + label idLiquid = owner.composition().idLiquid(); + forAll(activeLiquids_, i) + { + liqToLiqMap_[i] = + owner.composition().localId(idLiquid, activeLiquids_[i]); + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template <class CloudType> +Foam::LiquidEvaporation<CloudType>::~LiquidEvaporation() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +bool Foam::LiquidEvaporation<CloudType>::active() const +{ + return true; +} + + +template<class CloudType> +void Foam::LiquidEvaporation<CloudType>::calculate +( + const scalar dt, + const label cellI, + const scalar d, + const scalar T, + const scalar pc, + const scalar Tc, + const scalar nuc, + const vector& Ur, + scalarField& dMassPC +) const +{ + // construct carrier phase species volume fractions for cell, cellI + scalarField Xc = calcXc(cellI); + + // droplet surface area + scalar A = mathematicalConstant::pi*sqr(d); + + // Reynolds number + scalar Re = mag(Ur)*d/(nuc + ROOTVSMALL); + + // film temperature evaluated using the particle temperature + scalar Tf = T; + + // calculate mass transfer of each specie in liquid + forAll(activeLiquids_, i) + { + label gid = liqToCarrierMap_[i]; + label lid = liqToLiqMap_[i]; + + // vapour diffusivity [m2/s] + scalar Dab = liquids_->properties()[lid].D(pc, Tf); + + // saturation pressure for species i [pa] + // - carrier phase pressure assumed equal to the liquid vapour pressure + // close to the surface + scalar pSat = min(liquids_->properties()[lid].pv(pc, Tf), pc); + + // Schmidt number + scalar Sc = nuc/(Dab + ROOTVSMALL); + + // Sherwood number + scalar Sh = this->Sh(Re, Sc); + + // mass transfer coefficient [m/s] + scalar kc = Sh*Dab/(d + ROOTVSMALL); + + // vapour concentration at droplet surface [kmol/m3] + scalar Cs = pSat/(specie::RR*Tf); + + // vapour concentration in bulk gas [kmol/m3] + scalar Cinf = Xc[gid]*pc/(specie::RR*Tc); + + // molar flux of vapour [kmol/m2/s] + scalar Ni = max(kc*(Cs - Cinf), 0.0); + + // mass transfer [kg] + dMassPC[lid] += Ni*A*liquids_->properties()[lid].W()*dt; + } +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H new file mode 100644 index 0000000000000000000000000000000000000000..7e569736cab10d9dbb4dac3f464f9a5abbf2a22d --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H @@ -0,0 +1,134 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::LiquidEvaporation + +Description + Liquid evaporation model + - uses ideal gas assumption + +\*---------------------------------------------------------------------------*/ + +#ifndef LiquidEvaporation_H +#define LiquidEvaporation_H + +#include "PhaseChangeModel.H" +#include "liquidMixture.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +/*---------------------------------------------------------------------------*\ + Class LiquidEvaporation Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class LiquidEvaporation +: + public PhaseChangeModel<CloudType> +{ +protected: + + // Protected data + + //- Global liquid properties data + autoPtr<liquidMixture> liquids_; + + //- List of active liquid names + List<word> activeLiquids_; + + //- Mapping between liquid and carrier species + List<label> liqToCarrierMap_; + + //- Mapping between local and global liquid species + List<label> liqToLiqMap_; + + + // Protected member functions + + //- Sherwood number as a function of Reynolds and Schmidt numbers + scalar Sh(const scalar Re, const scalar Sc) const; + + //- Calculate the carrier phase component volume fractions at cellI + scalarField calcXc(const label cellI) const; + + +public: + + //- Runtime type information + TypeName("LiquidEvaporation"); + + + // Constructors + + //- Construct from dictionary + LiquidEvaporation + ( + const dictionary& dict, + CloudType& cloud + ); + + + //- Destructor + virtual ~LiquidEvaporation(); + + + // Member Functions + + //- Flag to indicate whether model activates phase change model + virtual bool active() const; + + //- Update model + virtual void calculate + ( + const scalar dt, + const label cellI, + const scalar d, + const scalar T, + const scalar pc, + const scalar Tc, + const scalar nuc, + const vector& Ur, + scalarField& dMassPC + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "LiquidEvaporation.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.C new file mode 100644 index 0000000000000000000000000000000000000000..ee3779b22ec64d22ad28d3cdf935a7fe641aece1 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.C @@ -0,0 +1,76 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "NoPhaseChange.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template <class CloudType> +Foam::NoPhaseChange<CloudType>::NoPhaseChange +( + const dictionary&, + CloudType& owner +) +: + PhaseChangeModel<CloudType>(owner) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template <class CloudType> +Foam::NoPhaseChange<CloudType>::~NoPhaseChange() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +bool Foam::NoPhaseChange<CloudType>::active() const +{ + return false; +} + + +template<class CloudType> +void Foam::NoPhaseChange<CloudType>::calculate +( + const scalar, + const label, + const scalar, + const scalar, + const scalar, + const scalar, + const scalar, + const vector&, + scalarField& +) const +{ + // Nothing to do... +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H new file mode 100644 index 0000000000000000000000000000000000000000..007fa73344ff48732e4dd396c97b8bb131c8e53c --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H @@ -0,0 +1,102 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::NoPhaseChange + +Description + Dummy phase change model for 'none' + +\*---------------------------------------------------------------------------*/ + +#ifndef NoPhaseChange_H +#define NoPhaseChange_H + +#include "PhaseChangeModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +/*---------------------------------------------------------------------------*\ + Class NoPhaseChange Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class NoPhaseChange +: + public PhaseChangeModel<CloudType> +{ +public: + + //- Runtime type information + TypeName("none"); + + + // Constructors + + //- Construct from dictionary + NoPhaseChange(const dictionary&, CloudType&); + + + //- Destructor + virtual ~NoPhaseChange(); + + + // Member Functions + + //- Flag to indicate whether model activates phase change model + virtual bool active() const; + + //- Update model + virtual void calculate + ( + const scalar dt, + const label cellI, + const scalar d, + const scalar T, + const scalar pc, + const scalar Tc, + const scalar nuc, + const vector& Ur, + scalarField& dMassPC + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "NoPhaseChange.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/NewMassTransferModel.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/NewPhaseChangeModel.C similarity index 71% rename from src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/NewMassTransferModel.C rename to src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/NewPhaseChangeModel.C index 416dd02ad93dc68af4d00de19382e855a54c627e..efb611522a8ce744d28f0033029d58f309e5bbfa 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/NewMassTransferModel.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/NewPhaseChangeModel.C @@ -24,43 +24,42 @@ License \*---------------------------------------------------------------------------*/ -#include "MassTransferModel.H" +#include "PhaseChangeModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template<class CloudType> -Foam::autoPtr<Foam::MassTransferModel<CloudType> > -Foam::MassTransferModel<CloudType>::New +Foam::autoPtr<Foam::PhaseChangeModel<CloudType> > +Foam::PhaseChangeModel<CloudType>::New ( const dictionary& dict, CloudType& owner ) { - word MassTransferModelType - ( - dict.lookup("MassTransferModel") - ); + word PhaseChangeModelType(dict.lookup("PhaseChangeModel")); - Info<< "Selecting MassTransferModel " << MassTransferModelType << endl; + Info<< "Selecting PhaseChangeModel " << PhaseChangeModelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(MassTransferModelType); + dictionaryConstructorTablePtr_->find(PhaseChangeModelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn ( - "MassTransferModel<CloudType>::New" - "(const dictionary&, CloudType&)" - ) - << "Unknown MassTransferModelType type " - << MassTransferModelType + "PhaseChangeModel<CloudType>::New" + "(" + "const dictionary&, " + "CloudType&" + ")" + ) << "Unknown PhaseChangeModelType type " + << PhaseChangeModelType << ", constructor not in hash table" << nl << nl - << " Valid MassTransferModel types are :" << nl + << " Valid PhaseChangeModel types are:" << nl << dictionaryConstructorTablePtr_->toc() << exit(FatalError); } - return autoPtr<MassTransferModel<CloudType> >(cstrIter()(dict, owner)); + return autoPtr<PhaseChangeModel<CloudType> >(cstrIter()(dict, owner)); } diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/MassTransferModel.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C similarity index 76% rename from src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/MassTransferModel.C rename to src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C index fc05b32540f3d783dc2bd295caa4c802e400bc31..b9fbdb2011463904670d4e98a912c75fe273d08c 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/MassTransferModel.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C @@ -24,18 +24,31 @@ License \*---------------------------------------------------------------------------*/ -#include "MassTransferModel.H" +#include "PhaseChangeModel.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class CloudType> -Foam::MassTransferModel<CloudType>::MassTransferModel +Foam::PhaseChangeModel<CloudType>::PhaseChangeModel +( + CloudType& owner +) +: + dict_(dictionary::null), + owner_(owner), + coeffDict_(dictionary::null) +{} + + +template<class CloudType> +Foam::PhaseChangeModel<CloudType>::PhaseChangeModel ( const dictionary& dict, CloudType& owner, const word& type ) -: dict_(dict), +: + dict_(dict), owner_(owner), coeffDict_(dict.subDict(type + "Coeffs")) {} @@ -44,27 +57,27 @@ Foam::MassTransferModel<CloudType>::MassTransferModel // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template<class CloudType> -Foam::MassTransferModel<CloudType>::~MassTransferModel() +Foam::PhaseChangeModel<CloudType>::~PhaseChangeModel() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class CloudType> -const CloudType& Foam::MassTransferModel<CloudType>::owner() const +const CloudType& Foam::PhaseChangeModel<CloudType>::owner() const { return owner_; } template<class CloudType> -const Foam::dictionary& Foam::MassTransferModel<CloudType>::dict() const +const Foam::dictionary& Foam::PhaseChangeModel<CloudType>::dict() const { return dict_; } template<class CloudType> -const Foam::dictionary& Foam::MassTransferModel<CloudType>::coeffDict() const +const Foam::dictionary& Foam::PhaseChangeModel<CloudType>::coeffDict() const { return coeffDict_; } @@ -72,7 +85,7 @@ const Foam::dictionary& Foam::MassTransferModel<CloudType>::coeffDict() const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewMassTransferModel.C" +#include "NewPhaseChangeModel.C" // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H new file mode 100644 index 0000000000000000000000000000000000000000..2e0f03a3f52510fb46a661246636c0cad340bbc8 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H @@ -0,0 +1,195 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::PhaseChangeModel + +Description + Templated phase change model class + +SourceFiles + PhaseChangeModel.C + NewPhaseChangeModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef PhaseChangeModel_H +#define PhaseChangeModel_H + +#include "IOdictionary.H" +#include "autoPtr.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class PhaseChangeModel Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class PhaseChangeModel +{ +protected: + + // Protected data + + //- The cloud dictionary + const dictionary& dict_; + + //- Reference to the owner cloud class + CloudType& owner_; + + //- The coefficient dictionary + const dictionary coeffDict_; + + + // Protected member functions + + //- Sherwood number + scalar Sh() const; + + +public: + + //- Runtime type information + TypeName("PhaseChangeModel"); + + //- Declare runtime constructor selection table + declareRunTimeSelectionTable + ( + autoPtr, + PhaseChangeModel, + dictionary, + ( + const dictionary& dict, + CloudType& owner + ), + (dict, owner) + ); + + + // Constructors + + //- Construct null from owner + PhaseChangeModel(CloudType& owner); + + //- Construct from dictionary + PhaseChangeModel + ( + const dictionary& dict, + CloudType& owner, + const word& type + ); + + + //- Destructor + virtual ~PhaseChangeModel(); + + + //- Selector + static autoPtr<PhaseChangeModel<CloudType> > New + ( + const dictionary& dict, + CloudType& owner + ); + + + // Access + + //- Return the owner cloud object + const CloudType& owner() const; + + //- Return the cloud dictionary + const dictionary& dict() const; + + //- Return the coefficient dictionary + const dictionary& coeffDict() const; + + + // Member Functions + + //- Flag to indicate whether model activates phase change model + virtual bool active() const = 0; + + //- Update model + virtual void calculate + ( + const scalar dt, + const label cellI, + const scalar d, + const scalar T, + const scalar pc, + const scalar Tc, + const scalar nuc, + const vector& Ur, + scalarField& dMassPC + ) const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makePhaseChangeModel(CloudType) \ + \ + defineNamedTemplateTypeNameAndDebug(PhaseChangeModel<CloudType>, 0); \ + \ + defineTemplateRunTimeSelectionTable \ + ( \ + PhaseChangeModel<CloudType>, \ + dictionary \ + ); + + +#define makePhaseChangeModelThermoType(SS, CloudType, ParcelType, ThermoType) \ + \ + defineNamedTemplateTypeNameAndDebug \ + ( \ + SS<CloudType<ParcelType<ThermoType> > >, \ + 0 \ + ); \ + \ + PhaseChangeModel<CloudType<ParcelType<ThermoType> > >:: \ + adddictionaryConstructorToTable \ + <SS<CloudType<ParcelType<ThermoType> > > > \ + add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "PhaseChangeModel.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.C similarity index 87% rename from src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.C rename to src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.C index 913fa89fc56a5ed5af668e6d3de84ec63e53b028..d8d522ff90b4909cbab192757e19ae553637d187 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/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 @@ -35,7 +35,7 @@ Foam::ConstantRateDevolatilisation<CloudType>::ConstantRateDevolatilisation CloudType& owner ) : - MassTransferModel<CloudType>(dict, owner, typeName), + DevolatilisationModel<CloudType>(dict, owner, typeName), A0_(dimensionedScalar(this->coeffDict().lookup("A0")).value()), volatileResidualCoeff_ ( @@ -66,21 +66,21 @@ Foam::scalar Foam::ConstantRateDevolatilisation<CloudType>::calculate const scalar dt, const scalar mass0, const scalar mass, - const scalarField& YMixture0, - const scalarField& YMixture, const scalar T, + const scalar YVolatile0, + const scalar YVolatile, bool& canCombust ) const { - const scalar massVolatile0 = YMixture0[0]*mass0; - const scalar massVolatile = YMixture[0]*mass; + const scalar massVolatile0 = YVolatile0*mass0; + const scalar massVolatile = YVolatile*mass; if (massVolatile <= volatileResidualCoeff_*massVolatile0) { canCombust = true; } - // Volatile mass transfer from particle to carrier gas phase + // Volatile devolatilisation from particle to carrier gas phase const scalar dMass = min(dt*A0_*massVolatile0, massVolatile); return dMass; diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.H similarity index 87% rename from src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.H rename to src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.H index 093a05b327d9a05b67abc73be9bf81717f8e7b87..b787a9b28254a4c8c09972040a276ace88e47975 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/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 @@ -34,7 +34,7 @@ Description #ifndef ConstantRateDevolatilisation_H #define ConstantRateDevolatilisation_H -#include "MassTransferModel.H" +#include "DevolatilisationModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -47,9 +47,8 @@ namespace Foam template<class CloudType> class ConstantRateDevolatilisation : - public MassTransferModel<CloudType> + public DevolatilisationModel<CloudType> { - // Private data // Model constants @@ -79,25 +78,24 @@ public: ); - // Destructor - - ~ConstantRateDevolatilisation(); + //- Destructor + virtual ~ConstantRateDevolatilisation(); // Member Functions - //- Flag to indicate whether model activates mass transfer model - bool active() const; + //- Flag to indicate whether model activates devolatilisation model + virtual bool active() const; //- Update model - scalar calculate + virtual scalar calculate ( const scalar dt, const scalar mass0, const scalar mass, - const scalarField& YMixture0, - const scalarField& YMixture, const scalar T, + const scalar YVolatile0, + const scalar YVolatile, bool& canCombust ) const; }; diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.C new file mode 100644 index 0000000000000000000000000000000000000000..4239eb19958f8c70326f6aba9a7eea4fe23181ae --- /dev/null +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.C @@ -0,0 +1,91 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "DevolatilisationModel.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::DevolatilisationModel<CloudType>::DevolatilisationModel +( + CloudType& owner +) +: + dict_(dictionary::null), + owner_(owner), + coeffDict_(dictionary::null) +{} + + +template<class CloudType> +Foam::DevolatilisationModel<CloudType>::DevolatilisationModel +( + const dictionary& dict, + CloudType& owner, + const word& type +) +: + dict_(dict), + owner_(owner), + coeffDict_(dict.subDict(type + "Coeffs")) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::DevolatilisationModel<CloudType>::~DevolatilisationModel() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template<class CloudType> +const CloudType& Foam::DevolatilisationModel<CloudType>::owner() const +{ + return owner_; +} + + +template<class CloudType> +const Foam::dictionary& Foam::DevolatilisationModel<CloudType>::dict() const +{ + return dict_; +} + + +template<class CloudType> +const Foam::dictionary& Foam::DevolatilisationModel<CloudType>::coeffDict() const +{ + return coeffDict_; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "NewDevolatilisationModel.C" + +// ************************************************************************* // + diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/MassTransferModel.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H similarity index 67% rename from src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/MassTransferModel.H rename to src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H index 25d476e340a4c5f6396f24cedf4951f804105ec3..b7edc60275d7b403049c66a4a1157c3c01f71167 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/MassTransferModel.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 @@ -23,20 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::MassTransferModel - + Foam::DevolatilisationModel Description - Templated mass transfer model class + Templated devolatilisation model class SourceFiles - MassTransferModel.C - NewMassTransferModel.C + DevolatilisationModel.C + NewDevolatilisationModel.C \*---------------------------------------------------------------------------*/ -#ifndef MassTransferModel_H -#define MassTransferModel_H +#ifndef DevolatilisationModel_H +#define DevolatilisationModel_H #include "IOdictionary.H" #include "autoPtr.H" @@ -48,13 +47,12 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class MassTransferModel Declaration + Class DevolatilisationModel Declaration \*---------------------------------------------------------------------------*/ template<class CloudType> -class MassTransferModel +class DevolatilisationModel { - protected: // Protected data @@ -72,13 +70,13 @@ protected: public: //- Runtime type information - TypeName("MassTransferModel"); + TypeName("DevolatilisationModel"); //- Declare runtime constructor selection table declareRunTimeSelectionTable ( autoPtr, - MassTransferModel, + DevolatilisationModel, dictionary, ( const dictionary& dict, @@ -90,8 +88,11 @@ public: // Constructors + //- Construct null from owner + DevolatilisationModel(CloudType& owner); + //- Construct from dictionary - MassTransferModel + DevolatilisationModel ( const dictionary& dict, CloudType& owner, @@ -99,18 +100,16 @@ public: ); - // Destructor + //- Destructor + virtual ~DevolatilisationModel(); - virtual ~MassTransferModel(); - - // Selector - - static autoPtr<MassTransferModel<CloudType> > New - ( - const dictionary& dict, - CloudType& owner - ); + //- Selector + static autoPtr<DevolatilisationModel<CloudType> > New + ( + const dictionary& dict, + CloudType& owner + ); // Access @@ -127,7 +126,7 @@ public: // Member Functions - //- Flag to indicate whether model activates mass transfer model + //- Flag to indicate whether model activates devolatilisation model virtual bool active() const = 0; //- Update model @@ -136,9 +135,9 @@ public: const scalar dt, const scalar mass0, const scalar mass, - const scalarField& YMixture0, - const scalarField& YMixture, const scalar T, + const scalar YVolatile0, + const scalar YVolatile, bool& canCombust ) const = 0; }; @@ -150,30 +149,35 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeMassTransferModel(CloudType) \ +#define makeDevolatilisationModel(CloudType) \ \ - defineNamedTemplateTypeNameAndDebug(MassTransferModel<CloudType>, 0); \ + defineNamedTemplateTypeNameAndDebug(DevolatilisationModel<CloudType>, 0); \ \ defineTemplateRunTimeSelectionTable \ ( \ - MassTransferModel<CloudType>, \ + DevolatilisationModel<CloudType>, \ dictionary \ ); -#define makeMassTransferModelType(SS, CloudType, ParcelType) \ +#define makeDevolatilisationModelThermoType(SS, CloudType, ParcelType, ThermoType)\ \ - defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \ + defineNamedTemplateTypeNameAndDebug \ + ( \ + SS<CloudType<ParcelType<ThermoType> > >, \ + 0 \ + ); \ \ - MassTransferModel<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_; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "MassTransferModel.C" +# include "DevolatilisationModel.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/NewDevolatilisationModel.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/NewDevolatilisationModel.C new file mode 100644 index 0000000000000000000000000000000000000000..cac0375b2816f94748edd2a0f12944a38483a51e --- /dev/null +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/NewDevolatilisationModel.C @@ -0,0 +1,67 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "DevolatilisationModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::autoPtr<Foam::DevolatilisationModel<CloudType> > +Foam::DevolatilisationModel<CloudType>::New +( + const dictionary& dict, + CloudType& owner +) +{ + word DevolatilisationModelType(dict.lookup("DevolatilisationModel")); + + Info<< "Selecting DevolatilisationModel " << DevolatilisationModelType + << endl; + + typename dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(DevolatilisationModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "DevolatilisationModel<CloudType>::New" + "(" + "const dictionary&, " + "CloudType&" + ")" + ) << "Unknown DevolatilisationModelType type " + << DevolatilisationModelType + << ", constructor not in hash table" << nl << nl + << " Valid DevolatilisationModel types are:" << nl + << dictionaryConstructorTablePtr_->toc() << exit(FatalError); + } + + return autoPtr<DevolatilisationModel<CloudType> >(cstrIter()(dict, owner)); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/NoMassTransfer/NoMassTransfer.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/NoDevolatilisation/NoDevolatilisation.C similarity index 80% rename from src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/NoMassTransfer/NoMassTransfer.C rename to src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/NoDevolatilisation/NoDevolatilisation.C index f619c510e8298914b3cb8974ca32765ba6f6c7b5..0961826a23c089aea4dd03fe2d22f652f851cf35 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/NoMassTransfer/NoMassTransfer.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 @@ -24,45 +24,45 @@ License \*---------------------------------------------------------------------------*/ -#include "NoMassTransfer.H" +#include "NoDevolatilisation.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template <class CloudType> -Foam::NoMassTransfer<CloudType>::NoMassTransfer +Foam::NoDevolatilisation<CloudType>::NoDevolatilisation ( - const dictionary& dict, - CloudType& cloud + const dictionary&, + CloudType& owner ) : - MassTransferModel<CloudType>(dict, cloud, typeName) + DevolatilisationModel<CloudType>(owner) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template <class CloudType> -Foam::NoMassTransfer<CloudType>::~NoMassTransfer() +Foam::NoDevolatilisation<CloudType>::~NoDevolatilisation() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class CloudType> -bool Foam::NoMassTransfer<CloudType>::active() const +bool Foam::NoDevolatilisation<CloudType>::active() const { return false; } template<class CloudType> -Foam::scalar Foam::NoMassTransfer<CloudType>::calculate +Foam::scalar Foam::NoDevolatilisation<CloudType>::calculate ( const scalar, const scalar, const scalar, - const scalarField&, - const scalarField&, + const scalar, + const scalar, const scalar, bool& canCombust ) const diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/NoMassTransfer/NoMassTransfer.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/NoDevolatilisation/NoDevolatilisation.H similarity index 74% rename from src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/NoMassTransfer/NoMassTransfer.H rename to src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/NoDevolatilisation/NoDevolatilisation.H index 54f671c1201273be7792d54c8de55e15a15f9c65..687978a0a2a20af61a28e4b94fce803d669ad6f6 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/NoMassTransfer/NoMassTransfer.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 @@ -23,66 +23,61 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::NoMassTransfer + Foam::NoDevolatilisation Description - Dummy mass transfer model for 'no mass transfer' + Dummy devolatilisation model for 'none' \*---------------------------------------------------------------------------*/ -#ifndef NoMassTransfer_H -#define NoMassTransfer_H +#ifndef NoDevolatilisation_H +#define NoDevolatilisation_H -#include "MassTransferModel.H" +#include "DevolatilisationModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { /*---------------------------------------------------------------------------*\ - Class NoMassTransfer Declaration + Class NoDevolatilisation Declaration \*---------------------------------------------------------------------------*/ template<class CloudType> -class NoMassTransfer +class NoDevolatilisation : - public MassTransferModel<CloudType> + public DevolatilisationModel<CloudType> { public: //- Runtime type information - TypeName("NoMassTransfer"); + TypeName("none"); // Constructors //- Construct from dictionary - NoMassTransfer - ( - const dictionary& dict, - CloudType& cloud - ); - + NoDevolatilisation(const dictionary&, CloudType& owner); - // Destructor - ~NoMassTransfer(); + //- Destructor + virtual ~NoDevolatilisation(); // Member Functions - //- Flag to indicate whether model activates mass transfer model - bool active() const; + //- Flag to indicate whether model activates devolatilisation model + virtual bool active() const; //- Update model - scalar calculate + virtual scalar calculate ( const scalar, const scalar, const scalar, - const scalarField&, - const scalarField&, + const scalar, + const scalar, const scalar, bool& ) const; @@ -96,7 +91,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "NoMassTransfer.C" +# include "NoDevolatilisation.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C similarity index 85% rename from src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C rename to src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C index 7b92768b25e96dc93e9d91ae6e1e6e7c667d8591..6f95dd54f9482924d3d355771a0ab00172f55c9c 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/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 @@ -29,13 +29,14 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template <class CloudType> -Foam::SingleKineticRateDevolatilisation<CloudType>::SingleKineticRateDevolatilisation +Foam::SingleKineticRateDevolatilisation<CloudType>:: +SingleKineticRateDevolatilisation ( const dictionary& dict, CloudType& owner ) : - MassTransferModel<CloudType>(dict, owner, typeName), + DevolatilisationModel<CloudType>(dict, owner, typeName), A1_(dimensionedScalar(this->coeffDict().lookup("A1")).value()), E_(dimensionedScalar(this->coeffDict().lookup("E")).value()), volatileResidualCoeff_ @@ -68,14 +69,14 @@ Foam::scalar Foam::SingleKineticRateDevolatilisation<CloudType>::calculate const scalar dt, const scalar mass0, const scalar mass, - const scalarField& YMixture0, - const scalarField& YMixture, const scalar T, + const scalar YVolatile0, + const scalar YVolatile, bool& canCombust ) const { - const scalar massVolatile0 = YMixture0[0]*mass; - const scalar massVolatile = YMixture[0]*mass; + const scalar massVolatile0 = YVolatile0*mass; + const scalar massVolatile = YVolatile*mass; if (massVolatile <= volatileResidualCoeff_*massVolatile0) { @@ -85,7 +86,7 @@ Foam::scalar Foam::SingleKineticRateDevolatilisation<CloudType>::calculate // Kinetic rate const scalar kappa = A1_*exp(-E_/(specie::RR*T)); - // Volatile mass transfer from particle to carrier gas phase + // Volatile devolatilisation from particle to carrier gas phase const scalar dMass = min(dt*kappa*massVolatile, massVolatile); return dMass; diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H similarity index 87% rename from src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H rename to src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H index 6db27bffce94cd39972be3549826af5b8ba18652..48fec17b833019497d909c42bfebdc0e2e7f5838 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/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 @@ -33,7 +33,7 @@ Description #ifndef SingleKineticRateDevolatilisation_H #define SingleKineticRateDevolatilisation_H -#include "MassTransferModel.H" +#include "DevolatilisationModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,9 +46,8 @@ namespace Foam template<class CloudType> class SingleKineticRateDevolatilisation : - public MassTransferModel<CloudType> + public DevolatilisationModel<CloudType> { - // Private data // Model constants @@ -81,25 +80,24 @@ public: ); - // Destructor - - ~SingleKineticRateDevolatilisation(); + //- Destructor + virtual ~SingleKineticRateDevolatilisation(); // Member Functions - //- Flag to indicate whether model activates mass transfer model - bool active() const; + //- Flag to indicate whether model activates devolatilisation model + virtual bool active() const; //- Update model - scalar calculate + virtual scalar calculate ( const scalar dt, const scalar mass0, const scalar mass, - const scalarField& YMixture0, - const scalarField& YMixture, const scalar T, + const scalar YVolatile0, + const scalar YVolatile, bool& canCombust ) const; }; diff --git a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.C similarity index 79% rename from src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.C rename to src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.C index 3923455a9219d32f099112d19936c705724f5f3b..53eecf01f92c3452f6abd714291d02f765c644bf 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.C @@ -31,11 +31,11 @@ License template <class CloudType> Foam::NoSurfaceReaction<CloudType>::NoSurfaceReaction ( - const dictionary& dict, + const dictionary&, CloudType& owner ) : - SurfaceReactionModel<CloudType>(dict, owner, typeName) + SurfaceReactionModel<CloudType>(owner) {} @@ -56,27 +56,29 @@ bool Foam::NoSurfaceReaction<CloudType>::active() const template<class CloudType> -void Foam::NoSurfaceReaction<CloudType>::calculate +Foam::scalar Foam::NoSurfaceReaction<CloudType>::calculate ( - const scalar dt, - const label celli, - const scalar dp, - const scalar T0, - const scalar T1, - const scalar Tc, - const scalar pc, - const scalar rhoc, - const scalar massp, - const scalarList& dMassMT, - scalarField& YGas, - scalarField& YLiquid, - scalarField& YSolid, - scalarField& YMixture, - scalarList& dMassSR, - scalar& dhRet + const scalar, + const label, + const scalar, + const scalar, + const scalar, + const scalar, + const scalar, + const scalar, + const scalarField&, + const scalarField&, + const scalarField&, + const scalarField&, + const scalarField&, + scalarField&, + scalarField&, + scalarField&, + scalarField& ) const { // do nothing + return 0.0; } diff --git a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H similarity index 78% rename from src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H rename to src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H index 18aaeb8179527b05349b0bfa15f0f48fa892d5ce..d3c99ebd5dad8546cda80b8469a8a0bdab536ee3 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H @@ -26,7 +26,7 @@ Class Foam::NoSurfaceReaction Description - Dummy Devolatisation model for 'no devolatisation' + Dummy surface reaction model for 'none' \*---------------------------------------------------------------------------*/ @@ -40,7 +40,7 @@ Description namespace Foam { /*---------------------------------------------------------------------------*\ - Class NoSurfaceReaction Declaration + Class NoSurfaceReaction Declaration \*---------------------------------------------------------------------------*/ template<class CloudType> @@ -48,11 +48,10 @@ class NoSurfaceReaction : public SurfaceReactionModel<CloudType> { - public: //- Runtime type information - TypeName("NoSurfaceReaction"); + TypeName("none"); // Constructors @@ -65,35 +64,35 @@ public: ); - // Destructor - - ~NoSurfaceReaction(); + //- Destructor + virtual ~NoSurfaceReaction(); // Member Functions //- Flag to indicate whether model activates devolatisation model - bool active() const; + virtual bool active() const; //- Update surface reactions - void calculate + virtual scalar calculate ( const scalar dt, - const label celli, - const scalar dp, - const scalar T0, - const scalar T1, + const label cellI, + const scalar d, + const scalar T, const scalar Tc, const scalar pc, const scalar rhoc, - const scalar massp, - const scalarList& dMassMT, - scalarField& YGas, - scalarField& YLiquid, - scalarField& YSolid, - scalarField& YMixture, - scalarList& dMassSR, - scalar& dhRet + const scalar mass, + const scalarField& YGas, + const scalarField& YLiquid, + const scalarField& YSolid, + const scalarField& YMixture, + const scalarField& dMassVolatile, + scalarField& dMassGas, + scalarField& dMassLiquid, + scalarField& dMassSolid, + scalarField& dMassSRCarrier ) const; }; diff --git a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/NewSurfaceReactionModel.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/NewSurfaceReactionModel.C similarity index 88% rename from src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/NewSurfaceReactionModel.C rename to src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/NewSurfaceReactionModel.C index 2303e58f21c0e81702bff59ba360f925d533e5bc..348bfa8a8c7dac79636131ac7489b0b27baefd27 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/NewSurfaceReactionModel.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/NewSurfaceReactionModel.C @@ -36,10 +36,7 @@ Foam::SurfaceReactionModel<CloudType>::New CloudType& owner ) { - word SurfaceReactionModelType - ( - dict.lookup("SurfaceReactionModel") - ); + word SurfaceReactionModelType(dict.lookup("SurfaceReactionModel")); Info<< "Selecting SurfaceReactionModel " << SurfaceReactionModelType << endl; @@ -52,12 +49,14 @@ Foam::SurfaceReactionModel<CloudType>::New FatalErrorIn ( "SurfaceReactionModel<CloudType>::New" - "(const dictionary&, CloudType&)" - ) - << "Unknown SurfaceReactionModelType type " + "(" + "const dictionary&, " + "CloudType&" + ")" + ) << "Unknown SurfaceReactionModelType type " << SurfaceReactionModelType << ", constructor not in hash table" << nl << nl - << " Valid SurfaceReactionModel types are :" << nl + << " Valid SurfaceReactionModel types are:" << nl << dictionaryConstructorTablePtr_->toc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.C similarity index 91% rename from src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.C rename to src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.C index 1173ea1c59d17e30077a49cacf61a6194957a55d..79e953e873263b6259b5f7dd5a22a75e8cf4b988 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.C @@ -28,6 +28,18 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +template<class CloudType> +Foam::SurfaceReactionModel<CloudType>::SurfaceReactionModel +( + CloudType& owner +) +: + dict_(dictionary::null), + owner_(owner), + coeffDict_(dictionary::null) +{} + + template<class CloudType> Foam::SurfaceReactionModel<CloudType>::SurfaceReactionModel ( @@ -35,7 +47,8 @@ Foam::SurfaceReactionModel<CloudType>::SurfaceReactionModel CloudType& owner, const word& type ) -: dict_(dict), +: + dict_(dict), owner_(owner), coeffDict_(dict.subDict(type + "Coeffs")) {} @@ -49,6 +62,7 @@ Foam::SurfaceReactionModel<CloudType>::~SurfaceReactionModel() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + template<class CloudType> const CloudType& Foam::SurfaceReactionModel<CloudType>::owner() const { diff --git a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H similarity index 73% rename from src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H rename to src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H index d89bf0cbf643084170edf3e4d564200721b38b96..f876563fec613eadc020828d1ab89e9cea0bcaf9 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H @@ -25,7 +25,6 @@ License Class Foam::SurfaceReactionModel - Description Templated surface reaction model class @@ -43,7 +42,6 @@ SourceFiles #include "runTimeSelectionTables.H" #include "scalarField.H" -#include "scalarList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -57,13 +55,12 @@ namespace Foam template<class CloudType> class SurfaceReactionModel { - // 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 @@ -92,6 +89,9 @@ public: // Constructors + //- Construct null from owner + SurfaceReactionModel(CloudType& owner); + //- Construct from dictionary SurfaceReactionModel ( @@ -101,18 +101,16 @@ public: ); - // Destructor - - virtual ~SurfaceReactionModel(); + //- Destructor + virtual ~SurfaceReactionModel(); - // Selector - - static autoPtr<SurfaceReactionModel<CloudType> > New - ( - const dictionary& dict, - CloudType& cloud - ); + //- Selector + static autoPtr<SurfaceReactionModel<CloudType> > New + ( + const dictionary& dict, + CloudType& cloud + ); // Access @@ -129,28 +127,30 @@ public: // Member Functions - //- Flag to indicate whether model activates devolatisation model + //- Flag to indicate whether model activates surface reaction model virtual bool active() const = 0; //- Update surface reactions - virtual void calculate + // Returns the heat of reaction + virtual scalar calculate ( const scalar dt, - const label celli, - const scalar dp, - const scalar T0, - const scalar T1, + const label cellI, + const scalar d, + const scalar T, const scalar Tc, const scalar pc, const scalar rhoc, - const scalar massp, - const scalarList& dMassMT, - scalarField& YGas, - scalarField& YLiquid, - scalarField& YSolid, - scalarField& YMixture, - scalarList& dMassSR, - scalar& dhRet + const scalar mass, + const scalarField& YGas, + const scalarField& YLiquid, + const scalarField& YSolid, + const scalarField& YMixture, + const scalarField& dMassVolatile, + scalarField& dMassGas, + scalarField& dMassLiquid, + scalarField& dMassSolid, + scalarField& dMassSRCarrier ) const = 0; }; @@ -172,22 +172,18 @@ public: ); -#define makeSurfaceReactionModelType(SS, CloudType, ParcelType) \ - \ - defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \ - \ - SurfaceReactionModel<CloudType<ParcelType> >:: \ - adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \ - add##SS##CloudType##ParcelType##ConstructorToTable_; - - -#define makeSurfaceReactionModelTypeInstance(SS, CloudType, ParcelType) \ +#define makeSurfaceReactionModelThermoType(SS, CloudType, ParcelType, ThermoType)\ \ - 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.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.C index 64d33f815f0c64d21cb3d369a5011b98c50e3549..37b5276269d3f01e9563f6f4b087c13afc63647a 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.C @@ -28,6 +28,15 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +template<class CloudType> +Foam::HeatTransferModel<CloudType>::HeatTransferModel(CloudType& owner) +: + dict_(dictionary::null), + owner_(owner), + coeffDict_(dictionary::null) +{} + + template<class CloudType> Foam::HeatTransferModel<CloudType>::HeatTransferModel ( @@ -35,7 +44,8 @@ Foam::HeatTransferModel<CloudType>::HeatTransferModel CloudType& owner, const word& type ) -: dict_(dict), +: + dict_(dict), owner_(owner), coeffDict_(dict.subDict(type + "Coeffs")) {} @@ -83,7 +93,7 @@ Foam::scalar Foam::HeatTransferModel<CloudType>::h const scalar muc ) const { - const scalar Re = rhoc*mag(Ur)*dp/(muc + SMALL); + const scalar Re = rhoc*mag(Ur)*dp/(muc + ROOTVSMALL); // const scalar Pr = muc/alphac; const scalar Pr = this->Pr(); @@ -108,7 +118,7 @@ Foam::scalar Foam::HeatTransferModel<CloudType>::Cu const scalar muc ) const { - const scalar Re = rhoc*mag(Ur)*dp/(muc + SMALL); + const scalar Re = rhoc*mag(Ur)*dp/(muc + ROOTVSMALL); // const scalar Pr = muc/alphac; const scalar Pr = this->Pr(); diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H index 1866093986ec5fa758c474aa59b70aaf16a0a45f..baf61f2395e973377c975c5f21b4c8f5c6b313fd 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H @@ -25,7 +25,6 @@ License Class Foam::HeatTransferModel - Description Templated heat transfer model class @@ -54,7 +53,6 @@ namespace Foam template<class CloudType> class HeatTransferModel { - // Private data //- The cloud dictionary @@ -63,7 +61,7 @@ class HeatTransferModel //- Reference to the owner cloud class CloudType& owner_; - //- The coefficents dictionary + //- The coefficients dictionary const dictionary coeffDict_; @@ -88,6 +86,9 @@ public: // Constructors + //- Construct null from owner + HeatTransferModel(CloudType& owner); + //- Construct from dictionary HeatTransferModel ( @@ -97,18 +98,16 @@ public: ); - // Destructor - - virtual ~HeatTransferModel(); + //- Destructor + virtual ~HeatTransferModel(); - // Selector - - static autoPtr<HeatTransferModel<CloudType> > New - ( - const dictionary& dict, - CloudType& owner - ); + //- Selector + static autoPtr<HeatTransferModel<CloudType> > New + ( + const dictionary& dict, + CloudType& owner + ); // Access @@ -139,7 +138,7 @@ public: virtual scalar Pr() const = 0; //- Return heat transfer coefficient - scalar h + virtual scalar h ( const scalar dp, const vector& Ur, @@ -151,7 +150,7 @@ public: ) const; //- Return linearised coefficient for temperature equation - scalar Cu + virtual scalar Cu ( const scalar dp, const vector& Ur, @@ -190,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/HeatTransferModel/NewHeatTransferModel.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/NewHeatTransferModel.C index fb0362bbc3ae584bd27e0fa4f4d6a9d40af0044c..d5d4748c4db4727e12eb5164a8bd2285c124599c 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/NewHeatTransferModel.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/NewHeatTransferModel.C @@ -36,10 +36,7 @@ Foam::HeatTransferModel<CloudType>::New CloudType& owner ) { - word HeatTransferModelType - ( - dict.lookup("HeatTransferModel") - ); + word HeatTransferModelType(dict.lookup("HeatTransferModel")); Info<< "Selecting HeatTransferModel " << HeatTransferModelType << endl; @@ -51,12 +48,14 @@ Foam::HeatTransferModel<CloudType>::New FatalErrorIn ( "HeatTransferModel<CloudType>::New" - "(const dictionary&, CloudType&)" - ) - << "Unknown HeatTransferModelType type " + "(" + "const dictionary&, " + "CloudType&" + ")" + ) << "Unknown HeatTransferModelType type " << HeatTransferModelType << ", constructor not in hash table" << nl << nl - << " Valid HeatTransferModel types are :" << nl + << " Valid HeatTransferModel types are:" << nl << dictionaryConstructorTablePtr_->toc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.C index ab80ae9895f3109e6d769fdcbd39dfdf88c9ebbb..c50dd4d511f29a3ba4ff25980140e949e57d96a6 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.C @@ -31,11 +31,11 @@ License template <class CloudType> Foam::NoHeatTransfer<CloudType>::NoHeatTransfer ( - const dictionary& dict, - CloudType& cloud + const dictionary&, + CloudType& owner ) : - HeatTransferModel<CloudType>(dict, cloud, typeName) + HeatTransferModel<CloudType>(owner) {} diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H index 641605465ebde9ec14937007d7ce161f91f53843..2941b4c2b7b9f6eb08515dff5e39c669fcc333a7 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H @@ -26,7 +26,7 @@ Class Foam::NoHeatTransfer Description - Dummy heat transfer model for 'no heat transfer' + Dummy heat transfer model for 'none' \*---------------------------------------------------------------------------*/ @@ -40,7 +40,7 @@ Description namespace Foam { /*---------------------------------------------------------------------------*\ - Class NoHeatTransfer Declaration + Class NoHeatTransfer Declaration \*---------------------------------------------------------------------------*/ template<class CloudType> @@ -48,42 +48,36 @@ class NoHeatTransfer : public HeatTransferModel<CloudType> { - public: //- Runtime type information - TypeName("NoHeatTransfer"); + TypeName("none"); // Constructors //- Construct from dictionary - NoHeatTransfer - ( - const dictionary& dict, - CloudType& cloud - ); - + NoHeatTransfer(const dictionary&, CloudType& owner); - // Destructor - ~NoHeatTransfer(); + //- Destructor + virtual ~NoHeatTransfer(); // 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 3cfe1f712c78f92c238bf23aee85ffa3fe6440fe..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 * * * * * * * * * * * * * * // @@ -65,7 +63,7 @@ Foam::scalar Foam::RanzMarshall<CloudType>::Nu const scalar Pr ) const { - return 2.0 + 0.6*pow(Re, 1.0/2.0)*pow(Pr, 1.0/3.0); + return 2.0 + 0.6*pow(Re, 0.5)*pow(Pr, 0.333); } diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H index 09a3abb4f65220f5fbf4b2d934095243ba54be71..f010160c1feb51aef1ec100b5fd4ae04692dc95c 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H @@ -48,7 +48,6 @@ class RanzMarshall : public HeatTransferModel<CloudType> { - // Private data // Prandtl number @@ -71,25 +70,24 @@ public: ); - // Destructor - - ~RanzMarshall(); + //- Destructor + virtual ~RanzMarshall(); // 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/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C b/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C index de19513e4a91a97816bf4515bfd8207e36a0dae4..fae1d15e6b2aadaad63af8cc36531a29314ee21a 100644 --- a/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C +++ b/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C @@ -72,7 +72,7 @@ Foam::radiation::cloudAbsorptionEmission::~cloudAbsorptionEmission() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::tmp<Foam::volScalarField> -Foam::radiation::cloudAbsorptionEmission::aDisp() const +Foam::radiation::cloudAbsorptionEmission::aDisp(const label) const { tmp<volScalarField> ta ( @@ -107,7 +107,7 @@ Foam::radiation::cloudAbsorptionEmission::aDisp() const Foam::tmp<Foam::volScalarField> -Foam::radiation::cloudAbsorptionEmission::eDisp() const +Foam::radiation::cloudAbsorptionEmission::eDisp(const label bandI) const { tmp<volScalarField> te ( @@ -132,7 +132,7 @@ Foam::radiation::cloudAbsorptionEmission::eDisp() const Foam::tmp<Foam::volScalarField> -Foam::radiation::cloudAbsorptionEmission::EDisp() const +Foam::radiation::cloudAbsorptionEmission::EDisp(const label bandI) const { tmp<volScalarField> tE ( diff --git a/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.H b/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.H index eeb8ce7cb23564901c47e5df5abb7b4e30922d09..a737764e88ce9add4f113e6c324ddd1bd9f8f266 100644 --- a/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.H +++ b/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.H @@ -53,7 +53,6 @@ class cloudAbsorptionEmission : public absorptionEmissionModel { - // Private data //- Coefficients dictionary @@ -72,16 +71,11 @@ public: // Constructors //- Construct from components - cloudAbsorptionEmission - ( - const dictionary& dict, - const fvMesh& mesh - ); + cloudAbsorptionEmission(const dictionary& dict, const fvMesh& mesh); // Destructor - - ~cloudAbsorptionEmission(); + virtual ~cloudAbsorptionEmission(); // Member Operators @@ -91,19 +85,19 @@ public: // Absorption coefficient //- Absorption coefficient for dispersed phase - tmp<volScalarField> aDisp() const; + virtual tmp<volScalarField> aDisp(const label bandI = 0) const; // Emission coefficient //- Emission coefficient for dispersed phase - tmp<volScalarField> eDisp() const; + virtual tmp<volScalarField> eDisp(const label bandI = 0) const; // Emission contribution //- Return emission contribution for dispersed phase - tmp<volScalarField> EDisp() const; + virtual tmp<volScalarField> EDisp(const label bandI = 0) const; }; diff --git a/src/lagrangian/intermediate/submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.H b/src/lagrangian/intermediate/submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.H index 288edd839116a8e4ac8f6cf1bb332caf0656d8ab..2d36e281f4756692ed43914b9071ff9aed9ca6a9 100644 --- a/src/lagrangian/intermediate/submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.H +++ b/src/lagrangian/intermediate/submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.H @@ -46,16 +46,13 @@ namespace radiation { /*---------------------------------------------------------------------------*\ - Class cloudScatter Declaration + Class cloudScatter Declaration \*---------------------------------------------------------------------------*/ class cloudScatter : public scatterModel { - -private: - // Private data //- Absorption model dictionary @@ -82,14 +79,11 @@ public: // Destructor - - ~cloudScatter(); + virtual ~cloudScatter(); // Member Operators - // Edit - // Access //- Return scatter coefficient diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.C b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.C index ef5e4b0250c49eb1cd4a61a9bc551826eacee36e..64c5c45ccf9bc54036aca97284dbe6d218a314f2 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 13111e5ac4f5249ef68e456366453e7e92cf122d..538d4f340cfc6b127a036d3dd7f05a160565b44d 100644 --- a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H +++ b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H @@ -262,7 +262,8 @@ public: // Member Functions - //- Tracking + // Tracking + bool move(trackData&); void transformProperties(const tensor& T); @@ -273,6 +274,7 @@ public: void setSiteSizes(label size); + // Access inline const tensor& Q() const; @@ -311,8 +313,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/meshTools/indexedOctree/treeDataEdge.C b/src/meshTools/indexedOctree/treeDataEdge.C index 12f347c16483afff5664c6295b9211123f6c69f2..3f7ae86ce8c27c25bbc2d590ed99b1abecfb1cf8 100644 --- a/src/meshTools/indexedOctree/treeDataEdge.C +++ b/src/meshTools/indexedOctree/treeDataEdge.C @@ -134,7 +134,7 @@ void Foam::treeDataEdge::findNearest { label index = indices[i]; - const edge& e = edges_[index]; + const edge& e = edges_[edgeLabels_[index]]; pointHit nearHit = e.line(points_).nearestDist(sample); @@ -170,7 +170,7 @@ void Foam::treeDataEdge::findNearest { label index = indices[i]; - const edge& e = edges_[index]; + const edge& e = edges_[edgeLabels_[index]]; // Note: could do bb test ? Worthwhile? diff --git a/src/meshTools/meshTools/meshTools.C b/src/meshTools/meshTools/meshTools.C index 4568b32e38ad8179c9d280678be0a88cd416a116..0441013d46bcc3745b27645f4467525c3a47ea50 100644 --- a/src/meshTools/meshTools/meshTools.C +++ b/src/meshTools/meshTools/meshTools.C @@ -46,7 +46,7 @@ bool Foam::meshTools::visNormal return false; } } - + return true; } @@ -63,7 +63,7 @@ Foam::vectorField Foam::meshTools::calcBoxPointNormals(const primitivePatch& pp) octantNormal[pXmYpZ] = vector(1, -1, 1); octantNormal[mXpYpZ] = vector(-1, 1, 1); octantNormal[pXpYpZ] = vector(1, 1, 1); - + octantNormal /= mag(octantNormal); @@ -300,7 +300,7 @@ bool Foam::meshTools::edgeOnCell ) { return findIndex(mesh.edgeCells(edgeI), cellI) != -1; -} +} bool Foam::meshTools::edgeOnFace @@ -311,7 +311,7 @@ bool Foam::meshTools::edgeOnFace ) { return findIndex(mesh.faceEdges(faceI), edgeI) != -1; -} +} // Return true if faceI part of cellI @@ -635,9 +635,14 @@ Foam::label Foam::meshTools::walkFace } -void Foam::meshTools::constrainToMeshCentre(const polyMesh& mesh, point& pt) +void Foam::meshTools::constrainToMeshCentre +( + const polyMesh& mesh, + point& pt +) { const Vector<label>& dirs = mesh.geometricD(); + const point& min = mesh.bounds().min(); const point& max = mesh.bounds().max(); @@ -645,7 +650,7 @@ void Foam::meshTools::constrainToMeshCentre(const polyMesh& mesh, point& pt) { if (dirs[cmpt] == -1) { - pt[cmpt] = 0.5*(min[cmpt]+max[cmpt]); + pt[cmpt] = 0.5*(min[cmpt] + max[cmpt]); } } } @@ -658,6 +663,7 @@ void Foam::meshTools::constrainToMeshCentre ) { const Vector<label>& dirs = mesh.geometricD(); + const point& min = mesh.bounds().min(); const point& max = mesh.bounds().max(); @@ -679,7 +685,7 @@ void Foam::meshTools::constrainToMeshCentre { if (dirs[cmpt] == -1) { - pts[i][cmpt] = 0.5*(min[cmpt]+max[cmpt]); + pts[i][cmpt] = 0.5*(min[cmpt] + max[cmpt]); } } } @@ -688,10 +694,13 @@ void Foam::meshTools::constrainToMeshCentre //- Set the constrained components of directions/velocity to zero -void Foam::meshTools::constrainDirection(const polyMesh& mesh, vector& d) +void Foam::meshTools::constrainDirection +( + const polyMesh& mesh, + const Vector<label>& dirs, + vector& d +) { - const Vector<label>& dirs = mesh.geometricD(); - for (direction cmpt=0; cmpt<vector::nComponents; cmpt++) { if (dirs[cmpt] == -1) @@ -702,10 +711,13 @@ void Foam::meshTools::constrainDirection(const polyMesh& mesh, vector& d) } -void Foam::meshTools::constrainDirection(const polyMesh& mesh, vectorField& d) +void Foam::meshTools::constrainDirection +( + const polyMesh& mesh, + const Vector<label>& dirs, + vectorField& d +) { - const Vector<label>& dirs = mesh.geometricD(); - bool isConstrained = false; for (direction cmpt=0; cmpt<vector::nComponents; cmpt++) { @@ -857,7 +869,7 @@ Foam::label Foam::meshTools::cutDirToEdge doneEdges.insert(e2); doneEdges.insert(e3); } - } + } } forAll(cEdges, cEdgeI) diff --git a/src/meshTools/meshTools/meshTools.H b/src/meshTools/meshTools/meshTools.H index 3710d5af06250dc654465ebcba5bb47697f13465..0bd033b8893dbbbf4a412a31710762d77f806010 100644 --- a/src/meshTools/meshTools/meshTools.H +++ b/src/meshTools/meshTools/meshTools.H @@ -215,7 +215,7 @@ namespace meshTools const label vertI ); - //- Return face on cell using edgeI but not faceI. Throws error + //- Return face on cell using edgeI but not faceI. Throws error // if none found. label otherFace ( @@ -225,7 +225,7 @@ namespace meshTools const label edgeI ); - //- Return cell on other side of face. Throws error + //- Return cell on other side of face. Throws error // if face not internal. label otherCell ( @@ -249,14 +249,32 @@ namespace meshTools // Constraints on position //- Set the constrained components of position to mesh centre - void constrainToMeshCentre(const polyMesh&, point&); - void constrainToMeshCentre(const polyMesh&, pointField&); + void constrainToMeshCentre + ( + const polyMesh& mesh, + point& pt + ); + void constrainToMeshCentre + ( + const polyMesh& mesh, + pointField& pt + ); //- Set the constrained components of directions/velocity to zero - void constrainDirection(const polyMesh&, vector&); - void constrainDirection(const polyMesh&, vectorField&); + void constrainDirection + ( + const polyMesh& mesh, + const Vector<label>& dirs, + vector& d + ); + void constrainDirection + ( + const polyMesh& mesh, + const Vector<label>& dirs, + vectorField& d + ); + - // Hex only functionality. //- Given edge on hex find other 'parallel', non-connected edges. @@ -287,7 +305,7 @@ namespace meshTools const label cellI, const vector& cutDir ); - + } // End namespace meshTools diff --git a/src/meshTools/searchableSurface/searchableBox.C b/src/meshTools/searchableSurface/searchableBox.C index cb9ca7e4426cbc0397baf64d7188f2f9f5e1213e..8b4c0f5c76c5c8abfd0b0ab5f432e268766769a8 100644 --- a/src/meshTools/searchableSurface/searchableBox.C +++ b/src/meshTools/searchableSurface/searchableBox.C @@ -170,7 +170,20 @@ Foam::searchableBox::searchableBox : searchableSurface(io), treeBoundBox(bb) -{} +{ + if (!contains(midpoint())) + { + FatalErrorIn + ( + "Foam::searchableBox::searchableBox\n" + "(\n" + " const IOobject& io,\n" + " const treeBoundBox& bb\n" + ")\n" + ) << "Illegal bounding box specification : " + << static_cast<const treeBoundBox>(*this) << exit(FatalError); + } +} Foam::searchableBox::searchableBox @@ -181,7 +194,20 @@ Foam::searchableBox::searchableBox : searchableSurface(io), treeBoundBox(dict.lookup("min"), dict.lookup("max")) -{} +{ + if (!contains(midpoint())) + { + FatalErrorIn + ( + "Foam::searchableBox::searchableBox\n" + "(\n" + " const IOobject& io,\n" + " const treeBoundBox& bb\n" + ")\n" + ) << "Illegal bounding box specification : " + << static_cast<const treeBoundBox>(*this) << exit(FatalError); + } +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/meshTools/searchableSurface/searchableSurfaceCollection.C b/src/meshTools/searchableSurface/searchableSurfaceCollection.C index 11b37bf97bba53761ebfe02e5e51016dfbd58435..306e78df25fd8242892b219ae4a9e63daf633be0 100644 --- a/src/meshTools/searchableSurface/searchableSurfaceCollection.C +++ b/src/meshTools/searchableSurface/searchableSurfaceCollection.C @@ -36,7 +36,12 @@ namespace Foam { defineTypeNameAndDebug(searchableSurfaceCollection, 0); -addToRunTimeSelectionTable(searchableSurface, searchableSurfaceCollection, dict); +addToRunTimeSelectionTable +( + searchableSurface, + searchableSurfaceCollection, + dict +); } @@ -63,15 +68,17 @@ void Foam::searchableSurfaceCollection::findNearest forAll(subGeom_, surfI) { - // Transform then divide - tmp<pointField> localSamples = cmptDivide + subGeom_[surfI].findNearest ( - transform_[surfI].localPosition(samples), - scale_[surfI] + cmptDivide // Transform then divide + ( + transform_[surfI].localPosition(samples), + scale_[surfI] + ), + localMinDistSqr, + hitInfo ); - subGeom_[surfI].findNearest(localSamples, localMinDistSqr, hitInfo); - forAll(hitInfo, pointI) { if (hitInfo[pointI].hit()) @@ -115,7 +122,8 @@ Foam::searchableSurfaceCollection::searchableSurfaceCollection instance_(dict.size()), scale_(dict.size()), transform_(dict.size()), - subGeom_(dict.size()) + subGeom_(dict.size()), + mergeSubRegions_(dict.lookup("mergeSubRegions")) { Info<< "SearchableCollection : " << name() << endl; @@ -181,12 +189,19 @@ const Foam::wordList& Foam::searchableSurfaceCollection::regions() const { regionOffset_[surfI] = allRegions.size(); - const wordList& subRegions = subGeom_[surfI].regions(); - - forAll(subRegions, i) + if (mergeSubRegions_) { - //allRegions.append(subRegions[i] + "_" + Foam::name(surfI)); - allRegions.append(instance_[surfI] + "_" + subRegions[i]); + // Single name regardless how many regions subsurface has + allRegions.append(instance_[surfI] + "_" + Foam::name(surfI)); + } + else + { + const wordList& subRegions = subGeom_[surfI].regions(); + + forAll(subRegions, i) + { + allRegions.append(instance_[surfI] + "_" + subRegions[i]); + } } } regions_.transfer(allRegions.shrink()); @@ -370,7 +385,15 @@ void Foam::searchableSurfaceCollection::getRegion {} else if (subGeom_.size() == 1) { - subGeom_[0].getRegion(info, region); + if (mergeSubRegions_) + { + region.setSize(info.size()); + region = regionOffset_[0]; + } + else + { + subGeom_[0].getRegion(info, region); + } } else { @@ -429,15 +452,25 @@ void Foam::searchableSurfaceCollection::getRegion // Collect points from my surface labelList indices(findIndices(nearestSurf, surfI)); - labelList surfRegion; - subGeom_[surfI].getRegion - ( - UIndirectList<pointIndexHit>(info, indices), - surfRegion - ); - forAll(indices, i) + if (mergeSubRegions_) { - region[indices[i]] = regionOffset_[surfI] + surfRegion[i]; + forAll(indices, i) + { + region[indices[i]] = regionOffset_[surfI]; + } + } + else + { + labelList surfRegion; + subGeom_[surfI].getRegion + ( + UIndirectList<pointIndexHit>(info, indices), + surfRegion + ); + forAll(indices, i) + { + region[indices[i]] = regionOffset_[surfI] + surfRegion[i]; + } } } } diff --git a/src/meshTools/searchableSurface/searchableSurfaceCollection.H b/src/meshTools/searchableSurface/searchableSurfaceCollection.H index 9c39923747f9abcb1c21b4b4ce3993086ba14773..2004bf9400c24c01a7bf2a1c475973f05a1c6562 100644 --- a/src/meshTools/searchableSurface/searchableSurfaceCollection.H +++ b/src/meshTools/searchableSurface/searchableSurfaceCollection.H @@ -40,6 +40,7 @@ SourceFiles #include "treeBoundBox.H" #include "coordinateSystem.H" #include "UPtrList.H" +#include "Switch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -73,6 +74,8 @@ private: UPtrList<searchableSurface> subGeom_; + Switch mergeSubRegions_; + //- Region names mutable wordList regions_; //- From individual regions to collection regions diff --git a/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.C b/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.C index b64f5f8adbbc4a68d2d5f5c114e1ba7662e93700..080f02765881f785be50c5cdbf01ac6bd9d92981 100644 --- a/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.C +++ b/src/postProcessing/foamCalcFunctions/basic/addSubtract/addSubtract.C @@ -232,14 +232,14 @@ void Foam::calcTypes::addSubtract::preCalc << exit(FatalError); } - if (args.options().found("field")) + if (args.optionFound("field")) { - addSubtractFieldName_ = args.options()["field"]; + addSubtractFieldName_ = args.option("field"); calcType_ = FIELD; } - else if (args.options().found("value")) + else if (args.optionFound("value")) { - addSubtractValueStr_ = args.options()["value"]; + addSubtractValueStr_ = args.option("value"); calcType_ = VALUE; } else @@ -249,9 +249,9 @@ void Foam::calcTypes::addSubtract::preCalc << nl << exit(FatalError); } - if (args.options().found("resultName")) + if (args.optionFound("resultName")) { - resultName_ = args.options()["resultName"]; + resultName_ = args.option("resultName"); } } diff --git a/src/postProcessing/functionObjects/Allwmake b/src/postProcessing/functionObjects/Allwmake index 051f73227f574ad9d0be87941e07f54dd0c49337..6c642dfe7b6333d4e71ab8c22f4458da73294503 100755 --- a/src/postProcessing/functionObjects/Allwmake +++ b/src/postProcessing/functionObjects/Allwmake @@ -4,6 +4,7 @@ set -x wmake libso field wmake libso forces +wmake libso IO wmake libso utilities wmake libso systemCall diff --git a/src/postProcessing/functionObjects/IO/Make/files b/src/postProcessing/functionObjects/IO/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..a3517e560f1e3a3349b3dee8930ec12a8e420086 --- /dev/null +++ b/src/postProcessing/functionObjects/IO/Make/files @@ -0,0 +1,4 @@ +writeRegisteredObject/writeRegisteredObject.C +writeRegisteredObject/writeRegisteredObjectFunctionObject.C + +LIB = $(FOAM_LIBBIN)/libIOFunctionObjects diff --git a/src/postProcessing/functionObjects/IO/Make/options b/src/postProcessing/functionObjects/IO/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..5166bcc9e32f547f48a5f87c9c60d7210409967f --- /dev/null +++ b/src/postProcessing/functionObjects/IO/Make/options @@ -0,0 +1,9 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude + +LIB_LIBS = \ + -lfiniteVolume \ + -lmeshTools \ + -lsampling diff --git a/src/postProcessing/functionObjects/IO/writeRegisteredObject/IOwriteRegisteredObject.H b/src/postProcessing/functionObjects/IO/writeRegisteredObject/IOwriteRegisteredObject.H new file mode 100644 index 0000000000000000000000000000000000000000..cb014395c95ecb15909e1c26aae0b9b0bf8f9e91 --- /dev/null +++ b/src/postProcessing/functionObjects/IO/writeRegisteredObject/IOwriteRegisteredObject.H @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +Typedef + Foam::IOwriteRegisteredObject + +Description + Instance of the generic IOOutputFilter for writeRegisteredObject. + +\*---------------------------------------------------------------------------*/ + +#ifndef IOwriteRegisteredObject_H +#define IOwriteRegisteredObject_H + +#include "writeRegisteredObject.H" +#include "IOOutputFilter.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + typedef IOOutputFilter<writeRegisteredObject> IOwriteRegisteredObject; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.C b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.C new file mode 100644 index 0000000000000000000000000000000000000000..b5ad785ab164d7fb424ea8310066d415c372cf0f --- /dev/null +++ b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.C @@ -0,0 +1,123 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "writeRegisteredObject.H" +#include "dictionary.H" +#include "Time.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(writeRegisteredObject, 0); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::writeRegisteredObject::writeRegisteredObject +( + const word& name, + const objectRegistry& obr, + const dictionary& dict, + const bool loadFromFiles +) +: + name_(name), + obr_(obr), + active_(true), + objectNames_() +{ + read(dict); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::writeRegisteredObject::~writeRegisteredObject() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::writeRegisteredObject::read(const dictionary& dict) +{ + if (active_) + { + dict.lookup("objectNames") >> objectNames_; + + forAll(objectNames_, i) + { + if (obr_.foundObject<regIOobject>(objectNames_[i])) + { + regIOobject& obj = + const_cast<regIOobject&> + ( + obr_.lookupObject<regIOobject>(objectNames_[i]) + ); + obj.writeOpt() = IOobject::NO_WRITE; + } + else + { + FatalErrorIn + ( + "Foam::writeRegisteredObject::read(const dictionary&)" + ) << "Object " << objectNames_[i] << " not found in " + << "database. Available objects are:" << nl << obr_.toc() + << nl << exit(FatalError); + } + } + } +} + + +void Foam::writeRegisteredObject::execute() +{ + // Do nothing - only valid on write +} + + +void Foam::writeRegisteredObject::end() +{ + // Do nothing - only valid on write +} + + +void Foam::writeRegisteredObject::write() +{ + if (active_) + { + forAll(objectNames_, i) + { + const regIOobject& obj = + obr_.lookupObject<regIOobject>(objectNames_[i]); + obj.write(); + } + } +} + + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H new file mode 100644 index 0000000000000000000000000000000000000000..6cfeaa5e0b88de7c7690cd1724f28a43f6bad72b --- /dev/null +++ b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H @@ -0,0 +1,150 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::writeRegisteredObject + +Description + Takes over the writing of registered IO objects + +SourceFiles + writeRegisteredObject.C + IOwriteRegisteredObject.H + +\*---------------------------------------------------------------------------*/ + +#ifndef writeRegisteredObject_H +#define writeRegisteredObject_H + +#include "pointFieldFwd.H" +#include "wordList.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes +class objectRegistry; +class dictionary; +class mapPolyMesh; + +/*---------------------------------------------------------------------------*\ + Class writeRegisteredObject Declaration +\*---------------------------------------------------------------------------*/ + +class writeRegisteredObject +{ +protected: + + // Private data + + //- Name of this set of writeRegisteredObject + word name_; + + const objectRegistry& obr_; + + //- On/off switch + bool active_; + + + // Read from dictionary + + //- Names of objects to control + wordList objectNames_; + + + // Private Member Functions + + + //- Disallow default bitwise copy construct + writeRegisteredObject(const writeRegisteredObject&); + + //- Disallow default bitwise assignment + void operator=(const writeRegisteredObject&); + + +public: + + //- Runtime type information + TypeName("writeRegisteredObject"); + + + // Constructors + + //- Construct for given objectRegistry and dictionary. + // Allow the possibility to load fields from files + writeRegisteredObject + ( + const word& name, + const objectRegistry&, + const dictionary&, + const bool loadFromFiles = false + ); + + + //- Destructor + virtual ~writeRegisteredObject(); + + + // Member Functions + + //- Return name of the writeRegisteredObject + virtual const word& name() const + { + return name_; + } + + //- Read the writeRegisteredObject data + virtual void read(const dictionary&); + + //- Execute, currently does nothing + virtual void execute(); + + //- Execute at the final time-loop, currently does nothing + virtual void end(); + + //- Write the writeRegisteredObject + virtual void write(); + + //- Update for changes of mesh + virtual void updateMesh(const mapPolyMesh&) + {} + + //- Update for changes of mesh + virtual void movePoints(const pointField&) + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObjectFunctionObject.C b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObjectFunctionObject.C new file mode 100644 index 0000000000000000000000000000000000000000..9b4c324c9d08ae1d1a5d0da5df32bed853d543a0 --- /dev/null +++ b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObjectFunctionObject.C @@ -0,0 +1,47 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "writeRegisteredObjectFunctionObject.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineNamedTemplateTypeNameAndDebug + ( + writeRegisteredObjectFunctionObject, + 0 + ); + + addToRunTimeSelectionTable + ( + functionObject, + writeRegisteredObjectFunctionObject, + dictionary + ); +} + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObjectFunctionObject.H b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObjectFunctionObject.H new file mode 100644 index 0000000000000000000000000000000000000000..284aa6c17a77ad26a05c9af0c06d6117f6520fe4 --- /dev/null +++ b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObjectFunctionObject.H @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +Typedef + Foam::writeRegisteredObjectFunctionObject + +Description + FunctionObject wrapper around writeRegisteredObject to allow them to be + created via the functions list within controlDict. + +SourceFiles + writeRegisteredObjectFunctionObject.C + +\*---------------------------------------------------------------------------*/ + +#ifndef writeRegisteredObjectFunctionObject_H +#define writeRegisteredObjectFunctionObject_H + +#include "writeRegisteredObject.H" +#include "OutputFilterFunctionObject.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + typedef OutputFilterFunctionObject<writeRegisteredObject> + writeRegisteredObjectFunctionObject; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // 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/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/createRadiationModel.H b/src/thermophysicalModels/radiation/include/createRadiationModel.H similarity index 100% rename from applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/createRadiationModel.H rename to src/thermophysicalModels/radiation/include/createRadiationModel.H diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/binaryAbsorptionEmission/binaryAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/binaryAbsorptionEmission/binaryAbsorptionEmission.C index 15d8c37a31008217e0c5d07b4c9d416f1f33aa78..5cc3ac9b27a4582e0b35edbf26b0be858ea74509 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/binaryAbsorptionEmission/binaryAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/binaryAbsorptionEmission/binaryAbsorptionEmission.C @@ -75,44 +75,44 @@ Foam::radiation::binaryAbsorptionEmission::~binaryAbsorptionEmission() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::tmp<Foam::volScalarField> -Foam::radiation::binaryAbsorptionEmission::aCont() const +Foam::radiation::binaryAbsorptionEmission::aCont(const label bandI) const { - return model1_->aCont() + model2_->aCont(); + return model1_->aCont(bandI) + model2_->aCont(bandI); } Foam::tmp<Foam::volScalarField> -Foam::radiation::binaryAbsorptionEmission::aDisp() const +Foam::radiation::binaryAbsorptionEmission::aDisp(const label bandI) const { - return model1_->aDisp() + model2_->aDisp(); + return model1_->aDisp(bandI) + model2_->aDisp(bandI); } Foam::tmp<Foam::volScalarField> -Foam::radiation::binaryAbsorptionEmission::eCont() const +Foam::radiation::binaryAbsorptionEmission::eCont(const label bandI) const { - return model1_->eCont() + model2_->eCont(); + return model1_->eCont(bandI) + model2_->eCont(bandI); } Foam::tmp<Foam::volScalarField> -Foam::radiation::binaryAbsorptionEmission::eDisp() const +Foam::radiation::binaryAbsorptionEmission::eDisp(const label bandI) const { - return model1_->eDisp() + model2_->eDisp(); + return model1_->eDisp(bandI) + model2_->eDisp(bandI); } Foam::tmp<Foam::volScalarField> -Foam::radiation::binaryAbsorptionEmission::ECont() const +Foam::radiation::binaryAbsorptionEmission::ECont(const label bandI) const { - return model1_->ECont() + model2_->ECont(); + return model1_->ECont(bandI) + model2_->ECont(bandI); } Foam::tmp<Foam::volScalarField> -Foam::radiation::binaryAbsorptionEmission::EDisp() const +Foam::radiation::binaryAbsorptionEmission::EDisp(const label bandI) const { - return model1_->EDisp() + model2_->EDisp(); + return model1_->EDisp(bandI) + model2_->EDisp(bandI); } diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/binaryAbsorptionEmission/binaryAbsorptionEmission.H b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/binaryAbsorptionEmission/binaryAbsorptionEmission.H index 68ad204b84a3dab0d32d02ab65937fc5e7bee28d..d5cec44a8f923746b2a6e6770a8a581ce553fb45 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/binaryAbsorptionEmission/binaryAbsorptionEmission.H +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/binaryAbsorptionEmission/binaryAbsorptionEmission.H @@ -92,28 +92,28 @@ public: // Absorption coefficient //- Absorption coefficient for continuous phase - tmp<volScalarField> aCont() const; + virtual tmp<volScalarField> aCont(const label bandI = 0) const; //- Absorption coefficient for dispersed phase - tmp<volScalarField> aDisp() const; + virtual tmp<volScalarField> aDisp(const label bandI = 0) const; // Emission coefficient //- Emission coefficient for continuous phase - tmp<volScalarField> eCont() const; + virtual tmp<volScalarField> eCont(const label bandI = 0) const; //- Emission coefficient for dispersed phase - tmp<volScalarField> eDisp() const; + virtual tmp<volScalarField> eDisp(const label bandI = 0) const; // Emission contribution //- Emission contribution for continuous phase - tmp<volScalarField> ECont() const; + virtual tmp<volScalarField> ECont(const label bandI = 0) const; //- Emission contribution for continuous phase - tmp<volScalarField> EDisp() const; + virtual tmp<volScalarField> EDisp(const label bandI = 0) const; }; diff --git a/src/thermophysicalModels/solids/C/C.C b/src/thermophysicalModels/solids/C/C.C new file mode 100644 index 0000000000000000000000000000000000000000..bc701872b76382487d792168f6904dd315bec87b --- /dev/null +++ b/src/thermophysicalModels/solids/C/C.C @@ -0,0 +1,86 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "C.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(C, 0); +addToRunTimeSelectionTable(solid, C,); +addToRunTimeSelectionTable(solid, C, Istream); + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::C::C() +: + solid(2010, 710, 0.04, 0.0, 1.0) +{ + WarningIn("C::C()") + << "Properties of graphite need to be checked!!!" + << endl; +} + + +Foam::C::C(const solid& s) +: + solid(s) +{} + + +Foam::C::C(Istream& is) +: + solid(is) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::C::writeData(Ostream& os) const +{ + solid::writeData(os); +} + + +// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // + +Foam::Ostream& operator<<(Ostream& os, const C& s) +{ + s.writeData(os); + return os; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/thermophysicalModels/solids/C/C.H b/src/thermophysicalModels/solids/C/C.H new file mode 100644 index 0000000000000000000000000000000000000000..0a3110b55d63d7e60341fb029c5b2f3246ae3809 --- /dev/null +++ b/src/thermophysicalModels/solids/C/C.H @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::C + +Description + Graphite + +SourceFiles + C.C + +\*---------------------------------------------------------------------------*/ + +#ifndef solid_C_H +#define solid_C_H + +#include "solid.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class C; + +Ostream& operator<< +( + Ostream&, + const C& +); + + +/*---------------------------------------------------------------------------*\ + Class C Declaration +\*---------------------------------------------------------------------------*/ + +class C +: + public solid +{ +public: + + //- Runtime type information + TypeName("C"); + + + // Constructors + + //- Construct null + C(); + + //- Construct from solid + C(const solid& s); + + //- Construct from Istream + C(Istream& is); + + + // I-O + + //- Write the function coefficients + void writeData(Ostream& os) const; + + + //- Ostream Operator + friend Ostream& operator<<(Ostream& os, const C& s); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/solids/CaCO3/CaCO3.C b/src/thermophysicalModels/solids/CaCO3/CaCO3.C new file mode 100644 index 0000000000000000000000000000000000000000..36dcdd3d5c907f2ecf8b2e8f3731850a61d34e2e --- /dev/null +++ b/src/thermophysicalModels/solids/CaCO3/CaCO3.C @@ -0,0 +1,86 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "CaCO3.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(CaCO3, 0); +addToRunTimeSelectionTable(solid, CaCO3,); +addToRunTimeSelectionTable(solid, CaCO3, Istream); + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::CaCO3::CaCO3() +: + solid(2710, 850, 1.3, 0.0, 1.0) +{ + WarningIn("CaCO3::CaCO3()") + << "Properties of CaCO3 need to be checked!!!" + << endl; +} + + +Foam::CaCO3::CaCO3(const solid& s) +: + solid(s) +{} + + +Foam::CaCO3::CaCO3(Istream& is) +: + solid(is) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::CaCO3::writeData(Ostream& os) const +{ + solid::writeData(os); +} + + +// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // + +Foam::Ostream& operator<<(Ostream& os, const CaCO3& s) +{ + s.writeData(os); + return os; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/thermophysicalModels/solids/Cs/Cs.H b/src/thermophysicalModels/solids/CaCO3/CaCO3.H similarity index 73% rename from src/thermophysicalModels/solids/Cs/Cs.H rename to src/thermophysicalModels/solids/CaCO3/CaCO3.H index 648c5bf9106af5939873fa7b8c44042af7d6157c..a3336f2f77105e1651d314796172122bd50f5d3b 100644 --- a/src/thermophysicalModels/solids/Cs/Cs.H +++ b/src/thermophysicalModels/solids/CaCO3/CaCO3.H @@ -23,18 +23,18 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::Cs + Foam::CaCO3 Description - Graphite + Calcium carbonate (limestone) SourceFiles - Cs.C + CaCO3.C \*---------------------------------------------------------------------------*/ -#ifndef solid_Cs_H -#define solid_Cs_H +#ifndef solid_CaCO3_H +#define solid_CaCO3_H #include "solid.H" @@ -43,11 +43,20 @@ SourceFiles namespace Foam { +class CaCO3; + +Ostream& operator<< +( + Ostream&, + const CaCO3& +); + + /*---------------------------------------------------------------------------*\ - Class Cs Declaration + Class CaCO3 Declaration \*---------------------------------------------------------------------------*/ -class Cs +class CaCO3 : public solid { @@ -55,50 +64,30 @@ class Cs public: //- Runtime type information - TypeName("Cs"); + TypeName("CaCO3"); // Constructors //- Construct null - Cs() - : - solid(2010, 710, 0.04, 0.0, 1.0) - { - WarningIn("Cs::Cs()") - << "Properties of graphite need to be checked!!!" - << endl; - } + CaCO3(); //- Construct from solid - Cs - ( - const solid& s - ) - : - solid(s) - {} + CaCO3(const solid& s); //- Construct from Istream - Cs(Istream& is) - : - solid(is) - {} + CaCO3(Istream& is); + + + // I-O //- Write the function coefficients - void writeData(Ostream& os) const - { - solid::writeData(os); - } + void writeData(Ostream& os) const; // Ostream Operator - friend Ostream& operator<<(Ostream& os, const Cs& s) - { - s.writeData(os); - return os; - } + friend Ostream& operator<<(Ostream& os, const CaCO3& s); }; diff --git a/src/thermophysicalModels/solids/Make/files b/src/thermophysicalModels/solids/Make/files index 407737ead160d245904cd9b74f15069d29dbfec3..5da964b97f8ac1237b2d8f8c2dfd8eec89fadc7c 100644 --- a/src/thermophysicalModels/solids/Make/files +++ b/src/thermophysicalModels/solids/Make/files @@ -1,5 +1,8 @@ solid/solid.C +solid/newSolid.C + ash/ash.C -Cs/Cs.C +C/C.C +CaCO3/CaCO3.C LIB = $(FOAM_LIBBIN)/libsolids diff --git a/src/thermophysicalModels/solids/ash/ash.C b/src/thermophysicalModels/solids/ash/ash.C index c63318e399967e59a27af428b3b5f806f285fb9f..42da228d2c17168f474323522dd18a0b84f999e0 100644 --- a/src/thermophysicalModels/solids/ash/ash.C +++ b/src/thermophysicalModels/solids/ash/ash.C @@ -38,6 +38,47 @@ defineTypeNameAndDebug(ash, 0); addToRunTimeSelectionTable(solid, ash,); addToRunTimeSelectionTable(solid, ash, Istream); +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::ash::ash() +: + solid(2010, 710, 0.04, 0.0, 1.0) +{ + WarningIn("ash::ash()") + << "Properties of ash need to be checked!!!" + << endl; +} + + +Foam::ash::ash(const solid& s) +: + solid(s) +{} + + +Foam::ash::ash(Istream& is) +: + solid(is) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::ash::writeData(Ostream& os) const +{ + solid::writeData(os); +} + + +// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // + +Foam::Ostream& operator<<(Ostream& os, const ash& s) +{ + s.writeData(os); + return os; +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/thermophysicalModels/solids/ash/ash.H b/src/thermophysicalModels/solids/ash/ash.H index e9de1e74db5783b805e14aa301f4ab5cdf477a85..f4bab78fdccbada0ebc326de653b45ac8c9b1389 100644 --- a/src/thermophysicalModels/solids/ash/ash.H +++ b/src/thermophysicalModels/solids/ash/ash.H @@ -43,6 +43,15 @@ SourceFiles namespace Foam { +class ash; + +Ostream& operator<< +( + Ostream&, + const ash& +); + + /*---------------------------------------------------------------------------*\ Class ash Declaration \*---------------------------------------------------------------------------*/ @@ -61,45 +70,24 @@ public: // Constructors //- Construct null - ash() - : -// rho Cp K Hf e -// [kg/m3] [J/(kg.K)] [W/(m.K)] [J/kg] [-] - solid(2010, 710, 0.04, 0.0, 1.0) // TODO - { - WarningIn("ash::ash()") - << "Properties of ash need to be checked!!!" - << endl; - } - - ash - ( - const solid& s - ) - : - solid(s) - {} + ash(); + + //- Construct from solid + ash(const solid& s); //- Construct from Istream - ash(Istream& is) - : - solid(is) - {} + ash(Istream& is); + + + // I-O //- Write the function coefficients - void writeData(Ostream& os) const - { - solid::writeData(os); - } + void writeData(Ostream& os) const; // Ostream Operator - friend Ostream& operator<<(Ostream& os, const ash& s) - { - s.writeData(os); - return os; - } + friend Ostream& operator<<(Ostream& os, const ash& s); }; diff --git a/src/thermophysicalModels/solids/solid/newSolid.C b/src/thermophysicalModels/solids/solid/newSolid.C new file mode 100644 index 0000000000000000000000000000000000000000..445a98a00d31e5df5b3620ed0521a2d394ebdd79 --- /dev/null +++ b/src/thermophysicalModels/solids/solid/newSolid.C @@ -0,0 +1,89 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "solid.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::autoPtr<Foam::solid> Foam::solid::New(Istream& is) +{ + if (debug) + { + Info<< "solid::New(Istream&): " + << "constructing solid" + << endl; + } + + word solidType(is); + + word coeffs(is); + + if (coeffs == "defaultCoeffs") + { + ConstructorTable::iterator cstrIter = + ConstructorTablePtr_->find(solidType); + + if (cstrIter == ConstructorTablePtr_->end()) + { + FatalErrorIn("solid::New(Istream&)") + << "Unknown solid type " << solidType << nl << nl + << "Valid solid types are:" << endl + << ConstructorTablePtr_->toc() + << exit(FatalError); + } + + return autoPtr<solid>(cstrIter()()); + } + else if (coeffs == "coeffs") + { + IstreamConstructorTable::iterator cstrIter = + IstreamConstructorTablePtr_->find(solidType); + + if (cstrIter == IstreamConstructorTablePtr_->end()) + { + FatalErrorIn("solid::New(Istream&)") + << "Unknown solid type " << solidType << nl << nl + << "Valid solid types are:" << endl + << IstreamConstructorTablePtr_->toc() + << exit(FatalError); + } + + return autoPtr<solid>(cstrIter()(is)); + } + else + { + FatalErrorIn("solid::New(Istream&)") + << "solid type " << solidType + << ", option " << coeffs << " given" + << ", should be coeffs or defaultCoeffs" + << exit(FatalError); + + return autoPtr<solid>(NULL); + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/solids/solid/solid.C b/src/thermophysicalModels/solids/solid/solid.C index 02a0fdde4668e0593364b539ba93b53f77f1e7a5..8d617154651995bce9961bb3b32acd55b7037fec 100644 --- a/src/thermophysicalModels/solids/solid/solid.C +++ b/src/thermophysicalModels/solids/solid/solid.C @@ -39,61 +39,51 @@ defineRunTimeSelectionTable(solid, Istream); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr<solid> solid::New(Istream& is) +Foam::solid::solid +( + scalar rho, + scalar cp, + scalar K, + scalar Hf, + scalar emissivity +) +: + rho_(rho), + cp_(cp), + K_(K), + Hf_(Hf), + emissivity_(emissivity) +{} + + +Foam::solid::solid(Istream& is) +: + rho_(readScalar(is)), + cp_(readScalar(is)), + K_(readScalar(is)), + Hf_(readScalar(is)), + emissivity_(readScalar(is)) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::solid::writeData(Ostream& os) const { - if (debug) - { - Info<< "solid::New(Istream&): " - << "constructing solid" - << endl; - } - - word solidType(is); - - word coeffs(is); - - if (coeffs == "defaultCoeffs") - { - ConstructorTable::iterator cstrIter = - ConstructorTablePtr_->find(solidType); - - if (cstrIter == ConstructorTablePtr_->end()) - { - FatalErrorIn("solid::New(Istream&)") - << "Unknown solid type " << solidType << nl << nl - << "Valid solid types are :" << endl - << ConstructorTablePtr_->toc() - << exit(FatalError); - } - - return autoPtr<solid>(cstrIter()()); - } - else if (coeffs == "coeffs") - { - IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(solidType); - - if (cstrIter == IstreamConstructorTablePtr_->end()) - { - FatalErrorIn("solid::New(Istream&)") - << "Unknown solid type " << solidType << nl << nl - << "Valid solid types are :" << endl - << IstreamConstructorTablePtr_->toc() - << exit(FatalError); - } - - return autoPtr<solid>(cstrIter()(is)); - } - else - { - FatalErrorIn("solid::New(Istream&)") - << "solid type " << solidType - << ", option " << coeffs << " given" - << ", should be coeffs or defaultCoeffs" - << exit(FatalError); - - return autoPtr<solid>(NULL); - } + os << rho_ << token::SPACE + << cp_ << token::SPACE + << K_ << token::SPACE + << Hf_ << token::SPACE + << emissivity_; +} + + +// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // + +Foam::Ostream& operator<<(Ostream& os, const solid& s) +{ + s.writeData(os); + return os; } diff --git a/src/thermophysicalModels/solids/solid/solid.H b/src/thermophysicalModels/solids/solid/solid.H index 7ad30e79a285117e261d2ce1732993789e80f292..3a7c8e27101a6e554b1a951e1ef69944b5de8357 100644 --- a/src/thermophysicalModels/solids/solid/solid.H +++ b/src/thermophysicalModels/solids/solid/solid.H @@ -45,6 +45,15 @@ SourceFiles namespace Foam { +class solid; + +Ostream& operator<< +( + Ostream&, + const solid& +); + + /*---------------------------------------------------------------------------*\ Class solid Declaration \*---------------------------------------------------------------------------*/ @@ -107,24 +116,10 @@ public: scalar K, scalar Hf, scalar emissivity - ) - : - rho_(rho), - cp_(cp), - K_(K), - Hf_(Hf), - emissivity_(emissivity) - {} + ); //- Construct from Istream - solid(Istream& is) - : - rho_(readScalar(is)), - cp_(readScalar(is)), - K_(readScalar(is)), - Hf_(readScalar(is)), - emissivity_(readScalar(is)) - {} + solid(Istream& is); //- Return a pointer to a new solid created from input static autoPtr<solid> New(Istream& is); @@ -141,59 +136,37 @@ public: // Phisical constants which define the solid //- Density [kg/m3] - scalar rho() const - { - return rho_; - } + inline scalar rho() const; //- Specific heat capacity [J/(kg.K)] - scalar cp() const - { - return cp_; - } + inline scalar cp() const; //- Thermal conductivity [W/(m.K)] - scalar K() const - { - return K_; - } + inline scalar K() const; //- Heat of formation [J/kg] - scalar Hf() const - { - return Hf_; - } + inline scalar Hf() const; - //- emissivity - scalar emissivity() const - { - return emissivity_; - } + //- Emissivity [] + inline scalar emissivity() const; // I-O //- Write the solid properties - virtual void writeData(Ostream& os) const - { - os<< rho_ << token::SPACE - << cp_ << token::SPACE - << K_ << token::SPACE - << Hf_ << token::SPACE - << emissivity_; - } + virtual void writeData(Ostream& os) const; // Ostream Operator - friend Ostream& operator<<(Ostream& os, const solid& s) - { - s.writeData(os); - return os; - } + friend Ostream& operator<<(Ostream& os, const solid& s); }; +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "solidI.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/thermophysicalModels/solids/solid/solidI.H b/src/thermophysicalModels/solids/solid/solidI.H new file mode 100644 index 0000000000000000000000000000000000000000..1921b1da3c25454593c7f113030343f01a657cdb --- /dev/null +++ b/src/thermophysicalModels/solids/solid/solidI.H @@ -0,0 +1,59 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +inline Foam::scalar Foam::solid::rho() const +{ + return rho_; +} + + +inline Foam::scalar Foam::solid::cp() const +{ + return cp_; +} + + +inline Foam::scalar Foam::solid::K() const +{ + return K_; +} + + +inline Foam::scalar Foam::solid::Hf() const +{ + return Hf_; +} + + +inline Foam::scalar Foam::solid::emissivity() const +{ + return emissivity_; +} + + +// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C index 38a275aeb573e2603e2418bcf1b342397b350a80..a6b699d20d6fda74edceb157834b4f392049bce4 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C @@ -45,25 +45,23 @@ namespace RASModels scalar mutRoughWallFunctionFvPatchScalarField::fnRough ( const scalar KsPlus, - const scalar Cs, - const scalar kappa + const scalar Cs ) const { - // Set deltaB based on non-dimensional roughness height - scalar deltaB = 0.0; + // Return fn based on non-dimensional roughness height + if (KsPlus < 90.0) { - deltaB = - 1.0/kappa - *log((KsPlus - 2.25)/87.75 + Cs*KsPlus) - *sin(0.4258*(log(KsPlus) - 0.811)); + return pow + ( + (KsPlus - 2.25)/87.75 + Cs*KsPlus, + sin(0.4258*(log(KsPlus) - 0.811)) + ); } else { - deltaB = 1.0/kappa*log(1.0 + Cs*KsPlus); + return (1.0 + Cs*KsPlus); } - - return exp(min(deltaB*kappa, 50.0)); } @@ -216,8 +214,8 @@ void mutRoughWallFunctionFvPatchScalarField::updateCoeffs() scalar yPlusLamNew = yPlusLam; if (KsPlus > 2.25) { - Edash = E/fnRough(KsPlus, Cs_[faceI], kappa); - yPlusLam = rasModel.yPlusLam(kappa, Edash); + Edash = E/fnRough(KsPlus, Cs_[faceI]); + yPlusLamNew = rasModel.yPlusLam(kappa, Edash); } if (debug) @@ -231,7 +229,9 @@ void mutRoughWallFunctionFvPatchScalarField::updateCoeffs() if (yPlus > yPlusLamNew) { - mutw[faceI] = muw[faceI]*(yPlus*kappa/log(Edash*yPlus) - 1); + mutw[faceI] = + muw[faceI] + *(yPlus*kappa/log(max(Edash*yPlus, 1+1e-4)) - 1); } else { diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H index 88209f4184e215053badbfe174afd321ff03f801..b12ad6bc5765937ccb7226bb9580f9605fa91b6a 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H @@ -83,12 +83,7 @@ class mutRoughWallFunctionFvPatchScalarField // Private member functions //- Compute the roughness function - scalar fnRough - ( - const scalar KsPlus, - const scalar Cs, - const scalar kappa - ) const; + scalar fnRough(const scalar KsPlus, const scalar Cs) const; public: diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C index 42e537295ed6ab622b998dbcea63e3a7d4602038..afb08a5d52320014e214532e6da48e6ebaad1a90 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C @@ -45,8 +45,7 @@ namespace RASModels scalar nutRoughWallFunctionFvPatchScalarField::fnRough ( const scalar KsPlus, - const scalar Cs, - const scalar kappa + const scalar Cs ) const { // Return fn based on non-dimensional roughness height @@ -205,7 +204,7 @@ void nutRoughWallFunctionFvPatchScalarField::updateCoeffs() if (KsPlus > 2.25) { - Edash = E/fnRough(KsPlus, Cs_[faceI], kappa); + Edash = E/fnRough(KsPlus, Cs_[faceI]); } if (yPlus > yPlusLam) @@ -219,7 +218,8 @@ void nutRoughWallFunctionFvPatchScalarField::updateCoeffs() ( min ( - nuw[faceI]*(yPlus*kappa/log(Edash*yPlus) - 1), + nuw[faceI] + *(yPlus*kappa/log(max(Edash*yPlus, 1+1e-4)) - 1), 2*limitingNutw ), 0.5*limitingNutw ); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.H index 968c5c3f8f86612779651182cc3a6f733dd1ec92..3371cbaa6d396ccdcb7ef8aec11ca662c10882f2 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.H @@ -80,12 +80,7 @@ class nutRoughWallFunctionFvPatchScalarField // Private member functions //- Compute the roughness function - scalar fnRough - ( - const scalar KsPlus, - const scalar Cs, - const scalar kappa - ) const; + scalar fnRough(const scalar KsPlus, const scalar Cs) const; public: diff --git a/tutorials/combustion/engineFoam/kivaTest/system/controlDict b/tutorials/combustion/engineFoam/kivaTest/system/controlDict index 359d4d135af67717be49fb54cd02cb64b8b16c58..2ae209cb5f6c44f1723423ec922326436a2e7b58 100644 --- a/tutorials/combustion/engineFoam/kivaTest/system/controlDict +++ b/tutorials/combustion/engineFoam/kivaTest/system/controlDict @@ -11,10 +11,12 @@ FoamFile format ascii; class dictionary; location "system"; - object controlDict; + object controlDict.1st; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +applicationClass engineFoam; + startFrom startTime; startTime -180; 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/mut b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/mut new file mode 100644 index 0000000000000000000000000000000000000000..7c893682965996d4b4b48036a27527eeab2ebdf6 --- /dev/null +++ b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/mut @@ -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 mut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + floor + { + type mutWallFunction; + value uniform 0; + } + ceiling + { + type mutWallFunction; + value uniform 0; + } + fixedWalls + { + 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/mut b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/mut new file mode 100644 index 0000000000000000000000000000000000000000..7c893682965996d4b4b48036a27527eeab2ebdf6 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/mut @@ -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 mut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + floor + { + type mutWallFunction; + value uniform 0; + } + ceiling + { + type mutWallFunction; + value uniform 0; + } + fixedWalls + { + 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/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/constant/radiationProperties b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/constant/radiationProperties index d8bbfe7f595cd351683a08e8f1d8fe5974ea401d..5fc829b87cf5f1b92eaa88fe1ef7e7324601bbc1 100644 --- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/constant/radiationProperties +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/constant/radiationProperties @@ -27,6 +27,9 @@ P1Coeffs { } +// Number of flow iterations per radiation iteration +solverFreq 1; + absorptionEmissionModel constantAbsorptionEmission; constantAbsorptionEmissionCoeffs diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/pd b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/G similarity index 68% rename from tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/pd rename to tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/G index dbfc6661058517618c784bf060911ebe265b98c9..cb9783649fe55f5f67032842ed34cefccd958808 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/pd +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/G @@ -10,45 +10,45 @@ FoamFile version 2.0; format ascii; class volScalarField; - object p; + object G; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -2 0 0 0 0]; +dimensions [1 0 -3 0 0 0 0]; internalField uniform 0; boundaryField { - minX + floor { - type zeroGradient; - value uniform 0; - } - maxX - { - type fixedValue; + type MarshakRadiation; + T T; + emissivity 1; value uniform 0; } - minY - { - type zeroGradient; - value uniform 0; - } - maxY + fixedWalls { - type zeroGradient; + type MarshakRadiation; + T T; + emissivity 1; value uniform 0; } - minZ + + ceiling { - type zeroGradient; + type MarshakRadiation; + T T; + emissivity 1; value uniform 0; } - maxZ + + box { - type zeroGradient; + type MarshakRadiation; + T T; + emissivity 1; value uniform 0; } } diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/IDefault b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/IDefault new file mode 100644 index 0000000000000000000000000000000000000000..bbb4ec4ca347db87a2f6d153c8a75e30f9abb452 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/IDefault @@ -0,0 +1,32 @@ +/*--------------------------------*- 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 volScalarField; + object IDefault; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 0 -3 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + ".*" + { + type greyDiffusiveRadiation; + T T; + emissivity 0.5; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/T b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/T new file mode 100644 index 0000000000000000000000000000000000000000..19ee7d9d08e1a184e767104e3384895d5ab2e4c0 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/T @@ -0,0 +1,47 @@ +/*--------------------------------*- 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 volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 300; + +boundaryField +{ + floor + { + type fixedValue; + value uniform 300.0; + } + + ceiling + { + type fixedValue; + value uniform 300.0; + } + + fixedWalls + { + type zeroGradient; + } + + box + { + type fixedValue; + value uniform 500.0; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/U b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/U new file mode 100644 index 0000000000000000000000000000000000000000..9a0eaf66b54cacbc5eed28bb9ed45cf51b8e8ba3 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/U @@ -0,0 +1,48 @@ +/*--------------------------------*- 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 volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + floor + { + type fixedValue; + value uniform (0 0 0); + } + + ceiling + { + type fixedValue; + value uniform (0 0 0); + } + + fixedWalls + { + type fixedValue; + value uniform (0 0 0); + } + + box + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/alphat b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/alphat new file mode 100644 index 0000000000000000000000000000000000000000..f11126d3f5379f99fbfa6dd2237ce2157f5189a9 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/alphat @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + box + { + type alphatWallFunction; + value uniform 0; + } + floor + { + type alphatWallFunction; + value uniform 0; + } + ceiling + { + type alphatWallFunction; + value uniform 0; + } + fixedWalls + { + type alphatWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/epsilon b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/epsilon new file mode 100644 index 0000000000000000000000000000000000000000..d5e7b9cd0273d6d3e2024e42e6ec4aaac6be4986 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/epsilon @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 2 -3 0 0 0 0 ]; + +internalField uniform 0.01; + +boundaryField +{ + floor + { + type compressible::epsilonWallFunction; + value uniform 0; + } + + ceiling + { + type compressible::epsilonWallFunction; + value uniform 0; + } + + fixedWalls + { + type compressible::epsilonWallFunction; + value uniform 0; + } + + box + { + type compressible::epsilonWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/k b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/k new file mode 100644 index 0000000000000000000000000000000000000000..5b206f8e4e379cbc9d5a2764071140549649d354 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/k @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 2 -2 0 0 0 0 ]; + +internalField uniform 0.1; + +boundaryField +{ + floor + { + type compressible::kQRWallFunction; + value uniform 0; + } + + ceiling + { + type compressible::kQRWallFunction; + value uniform 0; + } + + fixedWalls + { + type compressible::kQRWallFunction; + value uniform 0; + } + + box + { + type compressible::kQRWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/mut b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/mut new file mode 100644 index 0000000000000000000000000000000000000000..c609cbf3d2c865212d20992980a9b59a349b9c68 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/mut @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object mut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 1 -1 -1 0 0 0 0 ]; + +internalField uniform 0; + +boundaryField +{ + box + { + type mutWallFunction; + value uniform 0; + } + + floor + { + type mutWallFunction; + value uniform 0; + } + + ceiling + { + type mutWallFunction; + value uniform 0; + } + + fixedWalls + { + type mutWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/p b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/p new file mode 100644 index 0000000000000000000000000000000000000000..f200e3eeb0f918f10cf34f5b87e5d04abd76b21d --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/p @@ -0,0 +1,48 @@ +/*--------------------------------*- 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 volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 100000; + +boundaryField +{ + floor + { + type calculated; + value uniform 100000; + } + + ceiling + { + type calculated; + value uniform 100000; + } + + fixedWalls + { + type calculated; + value uniform 100000; + } + + box + { + type calculated; + value uniform 100000; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/pd b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/pd similarity index 92% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/pd rename to tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/pd index 3a679ba63a51f43776afa9f72c8fe4e69e328aac..1841d7882f5c06e25080901cd800391c09d11868 100644 --- a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/pd +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/pd @@ -37,6 +37,12 @@ boundaryField type fixedFluxBuoyantPressure; value uniform 0; } + + box + { + type fixedFluxBuoyantPressure; + value uniform 0; + } } // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/RASProperties b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/RASProperties new file mode 100644 index 0000000000000000000000000000000000000000..35b5a409f230c180f07469bfe0679cdf00cb419d --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/RASProperties @@ -0,0 +1,100 @@ +/*--------------------------------*- 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 "constant"; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RASModel kEpsilon; + +turbulence on; + +printCoeffs on; + +laminarCoeffs +{ +} + +kEpsilonCoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 0.85; + alphah 1; + alphak 1; + alphaEps 0.76923; +} + +RNGkEpsilonCoeffs +{ + Cmu 0.0845; + C1 1.42; + C2 1.68; + C3 -0.33; + alphah 1; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; +} + +LaunderSharmaKECoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; +} + +LRRCoeffs +{ + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + alphah 1; + Cs 0.25; + Ceps 0.15; + alphaR 1; + alphaEps 0.76923; +} + +LaunderGibsonRSTMCoeffs +{ + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + alphah 1; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaR 1; + alphaEps 0.76923; +} + +wallFunctionCoeffs +{ + kappa 0.4187; + E 9; +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/environmentalProperties b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/environmentalProperties new file mode 100644 index 0000000000000000000000000000000000000000..639bd90b066ffdac881dc8722b84c1bf39170e9d --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/environmentalProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- 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 "constant"; + object environmentalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +g g [ 0 1 -2 0 0 0 0 ] ( 0 0 -9.81 ); + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/polyMesh/blockMeshDict b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..e69de20d9d6c7b3b86178f0f7d486dae976931ad --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/polyMesh/blockMeshDict @@ -0,0 +1,170 @@ +/*--------------------------------*- 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 dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + ( 0.0 0.0 0.0) + ( 0.5 0.0 0.0) + ( 1.5 0.0 0.0) + (10.0 0.0 0.0) + ( 0.0 0.5 0.0) + ( 0.5 0.5 0.0) + ( 1.5 0.5 0.0) + (10.0 0.5 0.0) + ( 0.0 1.5 0.0) + ( 0.5 1.5 0.0) + ( 1.5 1.5 0.0) + (10.0 1.5 0.0) + ( 0.0 6.0 0.0) + ( 0.5 6.0 0.0) + ( 1.5 6.0 0.0) + (10.0 6.0 0.0) + + ( 0.0 0.0 0.5) + ( 0.5 0.0 0.5) + ( 1.5 0.0 0.5) + (10.0 0.0 0.5) + ( 0.0 0.5 0.5) + ( 0.5 0.5 0.5) + ( 1.5 0.5 0.5) + (10.0 0.5 0.5) + ( 0.0 1.5 0.5) + ( 0.5 1.5 0.5) + ( 1.5 1.5 0.5) + (10.0 1.5 0.5) + ( 0.0 6.0 0.5) + ( 0.5 6.0 0.5) + ( 1.5 6.0 0.5) + (10.0 6.0 0.5) + + ( 0.0 0.0 2.0) + ( 0.5 0.0 2.0) + ( 1.5 0.0 2.0) + (10.0 0.0 2.0) + ( 0.0 0.5 2.0) + ( 0.5 0.5 2.0) + ( 1.5 0.5 2.0) + (10.0 0.5 2.0) + ( 0.0 1.5 2.0) + ( 0.5 1.5 2.0) + ( 1.5 1.5 2.0) + (10.0 1.5 2.0) + ( 0.0 6.0 2.0) + ( 0.5 6.0 2.0) + ( 1.5 6.0 2.0) + (10.0 6.0 2.0) +); + +blocks +( + hex ( 0 1 5 4 16 17 21 20) ( 5 5 5) simpleGrading (1 1 1) + hex ( 1 2 6 5 17 18 22 21) (10 5 5) simpleGrading (1 1 1) + hex ( 2 3 7 6 18 19 23 22) (80 5 5) simpleGrading (1 1 1) + hex ( 4 5 9 8 20 21 25 24) ( 5 10 5) simpleGrading (1 1 1) + hex ( 6 7 11 10 22 23 27 26) (80 10 5) simpleGrading (1 1 1) + hex ( 8 9 13 12 24 25 29 28) ( 5 40 5) simpleGrading (1 1 1) + hex ( 9 10 14 13 25 26 30 29) (10 40 5) simpleGrading (1 1 1) + hex (10 11 15 14 26 27 31 30) (80 40 5) simpleGrading (1 1 1) + + hex (16 17 21 20 32 33 37 36) ( 5 5 15) simpleGrading (1 1 1) + hex (17 18 22 21 33 34 38 37) (10 5 15) simpleGrading (1 1 1) + hex (18 19 23 22 34 35 39 38) (80 5 15) simpleGrading (1 1 1) + hex (20 21 25 24 36 37 41 40) ( 5 10 15) simpleGrading (1 1 1) + + hex (21 22 26 25 37 38 42 41) (10 10 15) simpleGrading (1 1 1) + + hex (22 23 27 26 38 39 43 42) (80 10 15) simpleGrading (1 1 1) + hex (24 25 29 28 40 41 45 44) ( 5 40 15) simpleGrading (1 1 1) + hex (25 26 30 29 41 42 46 45) (10 40 15) simpleGrading (1 1 1) + hex (26 27 31 30 42 43 47 46) (80 40 15) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + wall box + ( + ( 6 22 21 5) + (10 26 22 6) + ( 9 25 26 10) + ( 5 21 25 9) + (22 26 25 21) + ) + wall floor + ( + ( 1 5 4 0) + ( 2 6 5 1) + ( 3 7 6 2) + ( 5 9 8 4) + ( 7 11 10 6) + ( 9 13 12 8) + (10 14 13 9) + (11 15 14 10) + ) + wall ceiling + ( + (33 37 36 32) + (34 38 37 33) + (35 39 38 34) + (37 41 40 36) + (38 42 41 37) + (39 43 42 38) + (41 45 44 40) + (42 46 45 41) + (43 47 46 42) + ) + wall fixedWalls + ( + ( 1 17 16 0) + ( 2 18 17 1) + ( 3 19 18 2) + (17 33 32 16) + (18 34 33 17) + (19 35 34 18) + + ( 7 23 19 3) + (11 27 23 7) + (15 31 27 11) + (23 39 35 19) + (27 43 39 23) + (31 47 43 27) + + (14 30 31 15) + (13 29 30 14) + (12 28 29 13) + (30 46 47 31) + (29 45 46 30) + (28 44 45 29) + + ( 8 24 28 12) + ( 4 20 24 8) + ( 0 16 20 4) + (24 40 44 28) + (20 36 40 24) + (16 32 36 20) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/polyMesh/boundary b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..ab64c00e2818ae921e8d7797fd57ddc8e836a70c --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/polyMesh/boundary @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +4 +( + box + { + type wall; + nFaces 300; + startFace 303675; + } + floor + { + type wall; + nFaces 5125; + startFace 303975; + } + ceiling + { + type wall; + nFaces 5225; + startFace 309100; + } + fixedWalls + { + type wall; + nFaces 6000; + startFace 314325; + } +) + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/radiationProperties b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/radiationProperties new file mode 100644 index 0000000000000000000000000000000000000000..1521e119a1c03763e3ee05efd9afd3fc4579c46a --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/radiationProperties @@ -0,0 +1,59 @@ +/*--------------------------------*- 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 "constant"; + object radiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +radiation on; + +radiationModel fvDOM; + +noRadiation +{ +} + +P1Coeffs +{ +} + +fvDOMCoeffs +{ + nPhi 3; // azimuthal angles in PI/2 on X-Y.(from Y to X) + nTheta 5; // polar angles in PI (from Z to X-Y plane) + convergence 1e-3; // convergence criteria for radiation iteration + maxIter 10; // maximum number of iterations +} + +// Number of flow iterations per radiation iteration +solverFreq 10; + +absorptionEmissionModel constantAbsorptionEmission; + +constantAbsorptionEmissionCoeffs +{ + a a [ 0 -1 0 0 0 0 0 ] 0.01; + e e [ 0 -1 0 0 0 0 0 ] 0; + E E [ 1 -1 -3 0 0 0 0 ] 0; +} + +scatterModel constantScatter; + +constantScatterCoeffs +{ + sigma sigma [ 0 -1 0 0 0 0 0 ] 0; + C C [ 0 0 0 0 0 0 0 ] 0; +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/thermophysicalProperties new file mode 100644 index 0000000000000000000000000000000000000000..f826516c2ebc44480f764103bbcc05c3f2e83efd --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/thermophysicalProperties @@ -0,0 +1,25 @@ +/*--------------------------------*- 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 "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType hThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>; + +mixture air 1 28.9 1000 0 1.8e-05 0.7; + +pRef 100000; + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/controlDict b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..06eec5ead0b78d157eddd5c952c86b16a369c092 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/controlDict @@ -0,0 +1,47 @@ +/*--------------------------------*- 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 controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 1000; + +deltaT 1; + +writeControl timeStep; + +writeInterval 100; + +purgeWrite 0; + +writeFormat binary; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..0800e9f9323d8477caa278e74075c327f307206a --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSchemes @@ -0,0 +1,70 @@ +/*--------------------------------*- 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 fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss upwind; + div(phi,h) Gauss upwind; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(phi,R) Gauss upwind; + div(R) Gauss linear; + div(Ji,Ii_h) Gauss linearUpwind Gauss linear; //Gauss upwind; + div((muEff*dev2(grad(U).T()))) Gauss linear; +} + +laplacianSchemes +{ + default none; + laplacian(muEff,U) Gauss linear corrected; + laplacian((rho*(1|A(U))),pd) Gauss linear corrected; + laplacian(alphaEff,h) Gauss linear corrected; + laplacian(DkEff,k) Gauss linear corrected; + laplacian(DepsilonEff,epsilon) Gauss linear corrected; + laplacian(DREff,R) Gauss linear corrected; + laplacian(gammaRad,G) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + pd ; +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSolution b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..a5d6208674369243cbae66f6912c317406ef60d3 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSolution @@ -0,0 +1,92 @@ +/*--------------------------------*- 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 fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + pd + { + solver GAMG; + tolerance 1e-06; + relTol 0.01; + smoother GaussSeidel; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + U + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } + + h + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } + + k + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } + + epsilon + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } + + Ii + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } +} + +SIMPLE +{ + nNonOrthogonalCorrectors 0; + pdRefCell 0; + pdRefValue 0; +} + +relaxationFactors +{ + rho 1.0; + pd 0.3; + U 0.7; + h 0.7; + k 0.7; + epsilon 0.7; + "ILambda.*" 0.7; +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/p b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/p index a98fc2825d0103495eea908d93fe1de81df15128..8a2a5d0a87887b19799c65d58f14a8c7aaf03b13 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/p +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/0/p @@ -16,40 +16,40 @@ FoamFile dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 0; +internalField uniform 1e5; boundaryField { minX { - type calculated; - value uniform 0; + type fixedFluxBuoyantPressure; + value 1e5; } maxX { - type calculated; - value uniform 0; + type fixedFluxBuoyantPressure; + value 1e5; } minY { - type calculated; - value uniform 0; + type fixedFluxBuoyantPressure; + value 1e5; } maxY { - type calculated; - value uniform 0; + type fixedFluxBuoyantPressure; + value 1e5; } minZ { - type calculated; - value uniform 0; + type fixedFluxBuoyantPressure; + value 1e5; } maxZ { - type calculated; - value uniform 0; + type fixedFluxBuoyantPressure; + value 1e5; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun index f4374b6a93079b3971e9000714616bab0a1a0685..1fce68e81c1dad9bb03027069d2cacfc6df06c26 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun @@ -30,7 +30,26 @@ do rm -f 0*/$i/{cp,K} done -runApplication chtMultiRegionFoam + +#-- Run on single processor +#runApplication chtMultiRegionFoam + +# Decompose +for i in bottomAir topAir heater leftSolid rightSolid +do + decomposePar -region $i +done + +# Run +hostname > system/machines +runParallel chtMultiRegionFoam 4 system/machines + +# Reconstruct +for i in bottomAir topAir heater leftSolid rightSolid +do + reconstructPar -region $i +done + echo echo "creating files for paraview post-processing" diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomAir/turbulenceProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomAir/turbulenceProperties index 07f85c68df22113b7c7747b89457597b0ea41d66..0efb448180f1ba26ac35d2dda07035e9ec6873f6 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomAir/turbulenceProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomAir/turbulenceProperties @@ -14,6 +14,6 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RASModel; +simulationType laminar; // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/polyMesh/boundary b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/polyMesh/boundary index 69a0952209dee387ae6cda9212a645086bba6b7a..73459cea0720d03956f9bd6cfb7f59f4d60a5d64 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/polyMesh/boundary +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/polyMesh/boundary @@ -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 diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/regionProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/regionProperties index e72fde91a8b5918e35f833a9997d6ba34d496a92..4fc4b886687248dbf1cbc6b1d248c9e22b2d8ea2 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/regionProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/regionProperties @@ -19,7 +19,4 @@ fluidRegionNames ( bottomAir topAir ); solidRegionNames ( heater leftSolid rightSolid ); -pRef 100000; - - // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/README b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/README index fd464e464c710813fac07db7d9ee31278ad58094..5a81b9a5708b0346c6cdd4bd2f6835feb3700bc1 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/README +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/README @@ -1,3 +1,3 @@ -fvSchemes and fvSolution are not used here -- added so that pre-processing activities can proceed +fvSolution is used for outer correctors specification. +fvSchemes is only so that pre-processing activities can proceed diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict index 5f75f1a76ddf1691f69796712f10ba8a2ec10238..7ee62d4bd7ab20aa698476583b6260258630fc37 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict @@ -16,6 +16,31 @@ FoamFile dictionaryReplacement { + boundary + { + bottomAir_to_leftSolid + { + offset ( 0 0 0 ); + sampleMode nearestPatchFace; + sampleRegion leftSolid; + samplePatch leftSolid_to_bottomAir; + } + bottomAir_to_rightSolid + { + offset ( 0 0 0 ); + sampleMode nearestPatchFace; + sampleRegion rightSolid; + samplePatch rightSolid_to_bottomAir; + } + bottomAir_to_heater + { + offset ( 0 0 0 ); + sampleMode nearestPatchFace; + sampleRegion heater; + samplePatch heater_to_bottomAir; + } + } + U { internalField uniform (0 0 0); @@ -62,8 +87,6 @@ dictionaryReplacement bottomAir_to_leftSolid { type solidWallMixedTemperatureCoupled; - neighbourRegionName leftSolid; - neighbourPatchName leftSolid_to_bottomAir; neighbourFieldName T; K K; value uniform 300; @@ -72,8 +95,6 @@ dictionaryReplacement bottomAir_to_heater { type solidWallMixedTemperatureCoupled; - neighbourRegionName heater; - neighbourPatchName heater_to_bottomAir; neighbourFieldName T; K K; value uniform 300; @@ -81,8 +102,6 @@ dictionaryReplacement bottomAir_to_rightSolid { type solidWallMixedTemperatureCoupled; - neighbourRegionName rightSolid; - neighbourPatchName rightSolid_to_bottomAir; neighbourFieldName T; K K; value uniform 300; @@ -205,101 +224,55 @@ dictionaryReplacement } } - pd + p { + internalField uniform 1E5; + boundaryField { minX { type fixedFluxBuoyantPressure; - value 0; + value 1e5; } maxX { type fixedFluxBuoyantPressure; - value 0; + value 1e5; } minY { type fixedFluxBuoyantPressure; - value 0; + value 1e5; } minZ { type fixedFluxBuoyantPressure; - value 0; + value 1e5; } maxZ { type fixedFluxBuoyantPressure; - value 0; + value 1e5; } bottomAir_to_leftSolid { type fixedFluxBuoyantPressure; - value 0; + value 1e5; } bottomAir_to_heater { type fixedFluxBuoyantPressure; - value 0; + value 1e5; } bottomAir_to_rightSolid { type fixedFluxBuoyantPressure; - value 0; + value 1e5; } } } - p - { - internalField uniform 100000; - boundaryField - { - minX - { - type calculated; - value uniform 100000; - } - maxX - { - type calculated; - value uniform 100000; - } - minY - { - type calculated; - value uniform 100000; - } - minZ - { - type calculated; - value uniform 100000; - } - maxZ - { - type calculated; - value uniform 100000; - } - - bottomAir_to_leftSolid - { - type calculated; - value uniform 100000; - } - bottomAir_to_heater - { - type calculated; - value uniform 100000; - } - bottomAir_to_rightSolid - { - type calculated; - value uniform 100000; - } - } - } } // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..aad15ee459b6e01cdf6fabba08eb2fa5b8c2a4dd --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/decomposeParDict @@ -0,0 +1,86 @@ +/*-------------------------------*- C++ -*---------------------------------*\ +| ========= | +| \\ / OpenFOAM | +| \\ / | +| \\ / The Open Source CFD Toolbox | +| \\/ http://www.OpenFOAM.org | +\*-------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + location "system"; + object decomposeParDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +//- Keep owner and neighbour on same processor for faces in zones: +// preserveFaceZones (heater solid1 solid3); + +method scotch; +// method hierarchical; +// method simple; +// method metis; +// method manual; + +simpleCoeffs +{ + n (2 2 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (2 2 1); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + /* + processorWeights + ( + 1 + 1 + 1 + 1 + ); + */ +} + +scotchCoeffs +{ + //processorWeights + //( + // 1 + // 1 + // 1 + // 1 + //); + //writeGraph true; + //strategy "b"; +} + +manualCoeffs +{ + dataFile "decompositionData"; +} + + +//// Is the case distributed +//distributed yes; +//// Per slave (so nProcs-1 entries) the directory above the case. +//roots +//( +// "/tmp" +// "/tmp" +//); + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSchemes b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSchemes index 9e792da55f1a212351fd1e5d2d26e2992642a502..5559e33626b9f62d129a9265641d3156edb4814d 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSchemes +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSchemes @@ -30,7 +30,7 @@ divSchemes { default none; div(phi,U) Gauss upwind; - div(phiU,p) Gauss upwind; + div(phiU,p) Gauss linear; div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; @@ -43,7 +43,7 @@ laplacianSchemes { default none; laplacian(muEff,U) Gauss linear limited 0.333; - laplacian((rho*(1|A(U))),pd) Gauss linear limited 0.333; + laplacian((rho*(1|A(U))),p) Gauss linear limited 0.333; laplacian(alphaEff,h) Gauss linear limited 0.333; laplacian(DkEff,k) Gauss linear limited 0.333; laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333; @@ -63,7 +63,7 @@ snGradSchemes fluxRequired { default no; - pd; + p; } // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution index 84839fe0ac905869edce0e444073487c84f3c61e..e0ecb9405c6ee97475280b790e95176ff3b61e41 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution @@ -20,28 +20,14 @@ solvers { solver PCG preconditioner DIC; - tolerance 1e-6; + tolerance 1e-8; relTol 0; }; -// pd -// { -// solver PCG -// preconditioner DIC; -// tolerance 1e-6; -// relTol 0.1; -// }; -// pdFinal -// { -// solver PCG; -// preconditioner DIC; -// tolerance 1e-08; -// relTol 0; -// }; - pd + p { solver GAMG; - tolerance 1e-6; - relTol 0.1; + tolerance 1e-8; + relTol 0.01; smoother GaussSeidel; @@ -50,10 +36,10 @@ solvers agglomerator faceAreaPair; mergeLevels 1; }; - pdFinal + pFinal { solver GAMG; - tolerance 1e-6; + tolerance 1e-8; relTol 0; smoother GaussSeidel; @@ -70,32 +56,41 @@ solvers tolerance 1e-08; relTol 0; }; + h { solver PBiCG; preconditioner DILU; - tolerance 1e-06; + tolerance 1e-08; + relTol 0.1; + }; + hFinal + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-08; relTol 0; }; + k { solver PBiCG; preconditioner DILU; - tolerance 1e-06; + tolerance 1e-08; relTol 0; }; epsilon { solver PBiCG; preconditioner DILU; - tolerance 1e-06; + tolerance 1e-08; relTol 0; }; R { solver PBiCG; preconditioner DILU; - tolerance 1e-06; + tolerance 1e-08; relTol 0; }; } @@ -106,14 +101,23 @@ PISO nOuterCorrectors 1; nCorrectors 2; nNonOrthogonalCorrectors 1; - pdRefCell 0; - pdRefValue 0; + pRefPoint (-0.081 -0.0257 8.01); + pRefValue 1e5; +} + + +PIMPLE +{ + momentumPredictor on; + nCorrectors 2; + nNonOrthogonalCorrectors 0; } -//relaxationFactors -//{ -//// h 0.9; + +relaxationFactors +{ +// h 0.9; // U 0.9; -//} +} // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/controlDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/controlDict index 2a5d32fc95549424c2cb293f12ff9656a8daf9c9..ba30afed2a2f13c7f5362edb583baa00576c8ab0 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/controlDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/controlDict @@ -17,17 +17,17 @@ FoamFile startFrom latestTime; -startTime 0; +startTime 0.001; stopAt endTime; -endTime 180; +endTime 200; deltaT 0.001; writeControl adjustableRunTime; -writeInterval 5; +writeInterval 50; purgeWrite 0; diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..aad15ee459b6e01cdf6fabba08eb2fa5b8c2a4dd --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/decomposeParDict @@ -0,0 +1,86 @@ +/*-------------------------------*- C++ -*---------------------------------*\ +| ========= | +| \\ / OpenFOAM | +| \\ / | +| \\ / The Open Source CFD Toolbox | +| \\/ http://www.OpenFOAM.org | +\*-------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + location "system"; + object decomposeParDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +//- Keep owner and neighbour on same processor for faces in zones: +// preserveFaceZones (heater solid1 solid3); + +method scotch; +// method hierarchical; +// method simple; +// method metis; +// method manual; + +simpleCoeffs +{ + n (2 2 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (2 2 1); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + /* + processorWeights + ( + 1 + 1 + 1 + 1 + ); + */ +} + +scotchCoeffs +{ + //processorWeights + //( + // 1 + // 1 + // 1 + // 1 + //); + //writeGraph true; + //strategy "b"; +} + +manualCoeffs +{ + dataFile "decompositionData"; +} + + +//// Is the case distributed +//distributed yes; +//// Per slave (so nProcs-1 entries) the directory above the case. +//roots +//( +// "/tmp" +// "/tmp" +//); + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/fvSolution index 78262ec2df008422f0817dc264bc8dab539bf568..50f28d672d7203b69ec909d90a6764a191c51631 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/fvSolution @@ -14,4 +14,9 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +PIMPLE +{ + nOuterCorrectors 1; +} + // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/changeDictionaryDict index 92038e31df8fd503518e3a30e581e9d16756227c..2bea6785224723f43db9cba91aaaf21d5ebf8998 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/changeDictionaryDict @@ -16,6 +16,38 @@ FoamFile dictionaryReplacement { + boundary + { + heater_to_bottomAir + { + offset ( 0 0 0 ); + sampleMode nearestPatchFace; + sampleRegion bottomAir; + samplePatch bottomAir_to_heater; + } + heater_to_leftSolid + { + offset ( 0 0 0 ); + sampleMode nearestPatchFace; + sampleRegion leftSolid; + samplePatch leftSolid_to_heater; + } + heater_to_rightSolid + { + offset ( 0 0 0 ); + sampleMode nearestPatchFace; + sampleRegion rightSolid; + samplePatch rightSolid_to_heater; + } + heater_to_topAir + { + offset ( 0 0 0 ); + sampleMode nearestPatchFace; + sampleRegion topAir; + samplePatch topAir_to_heater; + } + } + T { internalField uniform 300; @@ -40,8 +72,6 @@ dictionaryReplacement heater_to_bottomAir { type solidWallMixedTemperatureCoupled; - neighbourRegionName bottomAir; - neighbourPatchName bottomAir_to_heater; neighbourFieldName T; K K; value uniform 300; @@ -50,8 +80,6 @@ dictionaryReplacement heater_to_leftSolid { type solidWallMixedTemperatureCoupled; - neighbourRegionName leftSolid; - neighbourPatchName leftSolid_to_heater; neighbourFieldName T; K K; value uniform 300; @@ -59,8 +87,6 @@ dictionaryReplacement heater_to_rightSolid { type solidWallMixedTemperatureCoupled; - neighbourRegionName rightSolid; - neighbourPatchName rightSolid_to_heater; neighbourFieldName T; K K; value uniform 300; @@ -68,8 +94,6 @@ dictionaryReplacement heater_to_topAir { type solidWallMixedTemperatureCoupled; - neighbourRegionName topAir; - neighbourPatchName topAir_to_heater; neighbourFieldName T; K K; value uniform 300; diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..aad15ee459b6e01cdf6fabba08eb2fa5b8c2a4dd --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/decomposeParDict @@ -0,0 +1,86 @@ +/*-------------------------------*- C++ -*---------------------------------*\ +| ========= | +| \\ / OpenFOAM | +| \\ / | +| \\ / The Open Source CFD Toolbox | +| \\/ http://www.OpenFOAM.org | +\*-------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + location "system"; + object decomposeParDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +//- Keep owner and neighbour on same processor for faces in zones: +// preserveFaceZones (heater solid1 solid3); + +method scotch; +// method hierarchical; +// method simple; +// method metis; +// method manual; + +simpleCoeffs +{ + n (2 2 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (2 2 1); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + /* + processorWeights + ( + 1 + 1 + 1 + 1 + ); + */ +} + +scotchCoeffs +{ + //processorWeights + //( + // 1 + // 1 + // 1 + // 1 + //); + //writeGraph true; + //strategy "b"; +} + +manualCoeffs +{ + dataFile "decompositionData"; +} + + +//// Is the case distributed +//distributed yes; +//// Per slave (so nProcs-1 entries) the directory above the case. +//roots +//( +// "/tmp" +// "/tmp" +//); + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSolution index d1c768d4d4444eb6e1937e1840ddde4a19096376..342a7d4232540c1bcefb8362e4e638d7e9a3b9b0 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSolution @@ -30,4 +30,9 @@ PISO nNonOrthogonalCorrectors 1; } +PIMPLE +{ + nNonOrthogonalCorrectors 1; +} + // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/changeDictionaryDict index c30a9b5c4bb180f2b7541a0cbaefa68c62791b40..0fb3ee191c8a06de31849237b5bdd5499d40f8f0 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/changeDictionaryDict @@ -16,6 +16,31 @@ FoamFile dictionaryReplacement { + boundary + { + leftSolid_to_bottomAir + { + offset ( 0 0 0 ); + sampleMode nearestPatchFace; + sampleRegion bottomAir; + samplePatch bottomAir_to_leftSolid; + } + leftSolid_to_heater + { + offset ( 0 0 0 ); + sampleMode nearestPatchFace; + sampleRegion heater; + samplePatch heater_to_leftSolid;; + } + leftSolid_to_topAir + { + offset ( 0 0 0 ); + sampleMode nearestPatchFace; + sampleRegion topAir; + samplePatch topAir_to_leftSolid;; + } + } + T { internalField uniform 300; @@ -37,8 +62,6 @@ dictionaryReplacement leftSolid_to_bottomAir { type solidWallMixedTemperatureCoupled; - neighbourRegionName bottomAir; - neighbourPatchName bottomAir_to_leftSolid; neighbourFieldName T; K K; value uniform 300; @@ -47,8 +70,6 @@ dictionaryReplacement leftSolid_to_heater { type solidWallMixedTemperatureCoupled; - neighbourRegionName heater; - neighbourPatchName heater_to_leftSolid; neighbourFieldName T; K K; value uniform 300; @@ -56,8 +77,6 @@ dictionaryReplacement leftSolid_to_topAir { type solidWallMixedTemperatureCoupled; - neighbourRegionName topAir; - neighbourPatchName topAir_to_leftSolid; neighbourFieldName T; K K; value uniform 300; diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..aad15ee459b6e01cdf6fabba08eb2fa5b8c2a4dd --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/decomposeParDict @@ -0,0 +1,86 @@ +/*-------------------------------*- C++ -*---------------------------------*\ +| ========= | +| \\ / OpenFOAM | +| \\ / | +| \\ / The Open Source CFD Toolbox | +| \\/ http://www.OpenFOAM.org | +\*-------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + location "system"; + object decomposeParDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +//- Keep owner and neighbour on same processor for faces in zones: +// preserveFaceZones (heater solid1 solid3); + +method scotch; +// method hierarchical; +// method simple; +// method metis; +// method manual; + +simpleCoeffs +{ + n (2 2 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (2 2 1); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + /* + processorWeights + ( + 1 + 1 + 1 + 1 + ); + */ +} + +scotchCoeffs +{ + //processorWeights + //( + // 1 + // 1 + // 1 + // 1 + //); + //writeGraph true; + //strategy "b"; +} + +manualCoeffs +{ + dataFile "decompositionData"; +} + + +//// Is the case distributed +//distributed yes; +//// Per slave (so nProcs-1 entries) the directory above the case. +//roots +//( +// "/tmp" +// "/tmp" +//); + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/changeDictionaryDict index 292f92f1d3b4efdd81831370545adc34357fd586..c3d6b08a0d147cef9d91a02a45036fadc4cfa59b 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/changeDictionaryDict @@ -16,6 +16,31 @@ FoamFile dictionaryReplacement { + boundary + { + rightSolid_to_heater + { + offset ( 0 0 0 ); + sampleMode nearestPatchFace; + sampleRegion heater; + samplePatch heater_to_rightSolid; + } + rightSolid_to_bottomAir + { + offset ( 0 0 0 ); + sampleMode nearestPatchFace; + sampleRegion bottomAir; + samplePatch bottomAir_to_rightSolid; + } + rightSolid_to_topAir + { + offset ( 0 0 0 ); + sampleMode nearestPatchFace; + sampleRegion topAir; + samplePatch topAir_to_rightSolid; + } + } + T { internalField uniform 300; @@ -37,8 +62,6 @@ dictionaryReplacement rightSolid_to_heater { type solidWallMixedTemperatureCoupled; - neighbourRegionName heater; - neighbourPatchName heater_to_rightSolid; neighbourFieldName T; K K; value uniform 300; @@ -46,8 +69,6 @@ dictionaryReplacement rightSolid_to_bottomAir { type solidWallMixedTemperatureCoupled; - neighbourRegionName bottomAir; - neighbourPatchName bottomAir_to_rightSolid; neighbourFieldName T; K K; value uniform 300; @@ -55,8 +76,6 @@ dictionaryReplacement rightSolid_to_topAir { type solidWallMixedTemperatureCoupled; - neighbourRegionName topAir; - neighbourPatchName topAir_to_rightSolid; neighbourFieldName T; K K; value uniform 300; diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..aad15ee459b6e01cdf6fabba08eb2fa5b8c2a4dd --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/decomposeParDict @@ -0,0 +1,86 @@ +/*-------------------------------*- C++ -*---------------------------------*\ +| ========= | +| \\ / OpenFOAM | +| \\ / | +| \\ / The Open Source CFD Toolbox | +| \\/ http://www.OpenFOAM.org | +\*-------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + location "system"; + object decomposeParDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +//- Keep owner and neighbour on same processor for faces in zones: +// preserveFaceZones (heater solid1 solid3); + +method scotch; +// method hierarchical; +// method simple; +// method metis; +// method manual; + +simpleCoeffs +{ + n (2 2 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (2 2 1); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + /* + processorWeights + ( + 1 + 1 + 1 + 1 + ); + */ +} + +scotchCoeffs +{ + //processorWeights + //( + // 1 + // 1 + // 1 + // 1 + //); + //writeGraph true; + //strategy "b"; +} + +manualCoeffs +{ + dataFile "decompositionData"; +} + + +//// Is the case distributed +//distributed yes; +//// Per slave (so nProcs-1 entries) the directory above the case. +//roots +//( +// "/tmp" +// "/tmp" +//); + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict index e13083daa743d89571b74dfcac14d8605ea0b60b..f4f44ee6d49cc25317612a2ae6cd4355296aa3e1 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict @@ -16,6 +16,31 @@ FoamFile dictionaryReplacement { + boundary + { + topAir_to_leftSolid + { + offset ( 0 0 0 ); + sampleMode nearestPatchFace; + sampleRegion leftSolid; + samplePatch leftSolid_to_topAir; + } + topAir_to_heater + { + offset ( 0 0 0 ); + sampleMode nearestPatchFace; + sampleRegion heater; + samplePatch heater_to_topAir; + } + topAir_to_rightSolid + { + offset ( 0 0 0 ); + sampleMode nearestPatchFace; + sampleRegion rightSolid; + samplePatch rightSolid_to_topAir; + } + } + U { internalField uniform ( 0.01 0 0 ); @@ -63,8 +88,6 @@ dictionaryReplacement topAir_to_leftSolid { type solidWallMixedTemperatureCoupled; - neighbourRegionName leftSolid; - neighbourPatchName leftSolid_to_topAir; neighbourFieldName T; K K; value uniform 300; @@ -73,8 +96,6 @@ dictionaryReplacement topAir_to_heater { type solidWallMixedTemperatureCoupled; - neighbourRegionName heater; - neighbourPatchName heater_to_topAir; neighbourFieldName T; K K; value uniform 300; @@ -82,8 +103,6 @@ dictionaryReplacement topAir_to_rightSolid { type solidWallMixedTemperatureCoupled; - neighbourRegionName rightSolid; - neighbourPatchName rightSolid_to_topAir; neighbourFieldName T; K K; value uniform 300; @@ -204,109 +223,61 @@ dictionaryReplacement } } - pd + p { + internalField uniform 1E5; + boundaryField { minX { type fixedFluxBuoyantPressure; - value 0; + value 1e5; } maxX { type waveTransmissive; - field pd; + //field p; phi phi; rho rho; psi psi; gamma 1.4; // cp/cv - fieldInf 0; + fieldInf 1e5; lInf 0.40; // double length of domain - value uniform 0; + value uniform 1e5; } minY { type fixedFluxBuoyantPressure; - value 0; + value 1e5; } minZ { type fixedFluxBuoyantPressure; - value 0; + value 1e5; } maxZ { type fixedFluxBuoyantPressure; - value 0; + value 1e5; } topAir_to_leftSolid { type fixedFluxBuoyantPressure; - value 0; + value 1e5; } topAir_to_heater { type fixedFluxBuoyantPressure; - value 0; + value 1e5; } topAir_to_rightSolid { type fixedFluxBuoyantPressure; - value 0; - } - } - } - - p - { - internalField uniform 100000; - - boundaryField - { - minX - { - type calculated; - value uniform 100000; - } - maxX - { - type calculated; - value uniform 100000; - } - maxY - { - type calculated; - value uniform 100000; - } - minZ - { - type calculated; - value uniform 100000; - } - maxZ - { - type calculated; - value uniform 100000; - } - - topAir_to_leftSolid - { - type calculated; - value uniform 100000; - } - topAir_to_heater - { - type calculated; - value uniform 100000; - } - topAir_to_rightSolid - { - type calculated; - value uniform 100000; + value 1e5; } } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/decomposeParDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..aad15ee459b6e01cdf6fabba08eb2fa5b8c2a4dd --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/decomposeParDict @@ -0,0 +1,86 @@ +/*-------------------------------*- C++ -*---------------------------------*\ +| ========= | +| \\ / OpenFOAM | +| \\ / | +| \\ / The Open Source CFD Toolbox | +| \\/ http://www.OpenFOAM.org | +\*-------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + location "system"; + object decomposeParDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +//- Keep owner and neighbour on same processor for faces in zones: +// preserveFaceZones (heater solid1 solid3); + +method scotch; +// method hierarchical; +// method simple; +// method metis; +// method manual; + +simpleCoeffs +{ + n (2 2 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (2 2 1); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + /* + processorWeights + ( + 1 + 1 + 1 + 1 + ); + */ +} + +scotchCoeffs +{ + //processorWeights + //( + // 1 + // 1 + // 1 + // 1 + //); + //writeGraph true; + //strategy "b"; +} + +manualCoeffs +{ + dataFile "decompositionData"; +} + + +//// Is the case distributed +//distributed yes; +//// Per slave (so nProcs-1 entries) the directory above the case. +//roots +//( +// "/tmp" +// "/tmp" +//); + + +// ************************************************************************* // diff --git a/tutorials/incompressible/MRFSimpleFoam/MRFSimpleFoam/MRFSimpleFoam.C b/tutorials/incompressible/MRFSimpleFoam/MRFSimpleFoam/MRFSimpleFoam.C index 241b6930fc533a640da3e2074eca1754de2bbcb6..9225fe4cb7c20e4456307054f6ade7afa7aec3d3 100644 --- a/tutorials/incompressible/MRFSimpleFoam/MRFSimpleFoam/MRFSimpleFoam.C +++ b/tutorials/incompressible/MRFSimpleFoam/MRFSimpleFoam/MRFSimpleFoam.C @@ -40,15 +40,14 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" -# include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "createFields.H" + #include "initContinuityErrs.H" -# include "createTime.H" -# include "createMesh.H" -# include "createFields.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -56,7 +55,7 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readSIMPLEControls.H" + #include "readSIMPLEControls.H" p.storePrevIter(); @@ -101,7 +100,7 @@ int main(int argc, char *argv[]) } } -# include "continuityErrs.H" + #include "continuityErrs.H" // Explicitly relax pressure for momentum corrector p.relax(); diff --git a/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSolution b/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSolution index 486f7ad5fb2836444d68502c50b37e8c4e55b62a..ca87cfa23b842b53e1d7e75478f7e809c12c2083 100644 --- a/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSolution +++ b/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSolution @@ -58,9 +58,10 @@ solvers } } -PISO +PIMPLE { - nCorrectors 2; + nOuterCorrectors 2; + nCorrectors 1; nNonOrthogonalCorrectors 0; } diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/CH4 b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/CH4 new file mode 100644 index 0000000000000000000000000000000000000000..5b0f18db0c6875dbc23ea4628dd8d379c60352e2 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/CH4 @@ -0,0 +1,51 @@ +/*--------------------------------*- 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 CH4; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + top + { + type zeroGradient; + } + + bottom + { + type zeroGradient; + } + + walls + { + type zeroGradient; + } + + symmetry + { + type symmetryPlane; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/CO b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/CO new file mode 100644 index 0000000000000000000000000000000000000000..40eed00221bf5cab6f6a4b747c4cfd87995b47f5 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/CO @@ -0,0 +1,51 @@ +/*--------------------------------*- 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 CO; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + top + { + type zeroGradient; + } + + bottom + { + type zeroGradient; + } + + walls + { + type zeroGradient; + } + + symmetry + { + type symmetryPlane; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/CO2 b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/CO2 new file mode 100644 index 0000000000000000000000000000000000000000..6afb84af406e6b1d6c1808bf0b48709a9ca5c72c --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/CO2 @@ -0,0 +1,51 @@ +/*--------------------------------*- 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 CO2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + top + { + type zeroGradient; + } + + bottom + { + type zeroGradient; + } + + walls + { + type zeroGradient; + } + + symmetry + { + type symmetryPlane; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/G b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/G new file mode 100644 index 0000000000000000000000000000000000000000..1fbaf23d4d1a6799f3214f3fce3c3ddb44b20155 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/G @@ -0,0 +1,56 @@ +/*--------------------------------*- 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 +{ + top + { + type MarshakRadiation; + T T; + emissivity 1.0; + value uniform 0; + } + bottom + { + type MarshakRadiation; + T T; + emissivity 1.0; + value uniform 0; + } + walls + { + type MarshakRadiation; + T T; + emissivity 1.0; + value uniform 0; + } + symmetry + { + type symmetryPlane; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/H2 b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/H2 new file mode 100644 index 0000000000000000000000000000000000000000..c0632b8637eeb249ae07fff809a2982fe78d0895 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/H2 @@ -0,0 +1,51 @@ +/*--------------------------------*- 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 H2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + top + { + type zeroGradient; + } + + bottom + { + type zeroGradient; + } + + walls + { + type zeroGradient; + } + + symmetry + { + type symmetryPlane; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/H2O b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/H2O new file mode 100644 index 0000000000000000000000000000000000000000..39a64df509d548c4854c802acf92d15be3b4d271 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/H2O @@ -0,0 +1,51 @@ +/*--------------------------------*- 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 +{ + top + { + type zeroGradient; + } + + bottom + { + type zeroGradient; + } + + walls + { + type zeroGradient; + } + + symmetry + { + type symmetryPlane; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/N2 b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/N2 new file mode 100644 index 0000000000000000000000000000000000000000..8d98a27778df9c5d83935c86aad7018a14ea1524 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/N2 @@ -0,0 +1,51 @@ +/*--------------------------------*- 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 +{ + top + { + type zeroGradient; + } + + bottom + { + type zeroGradient; + } + + walls + { + type zeroGradient; + } + + symmetry + { + type symmetryPlane; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/O2 b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/O2 new file mode 100644 index 0000000000000000000000000000000000000000..2715a766861a21e627f8147b8f73343cacb582ee --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/O2 @@ -0,0 +1,51 @@ +/*--------------------------------*- 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 +{ + top + { + type zeroGradient; + } + + bottom + { + type zeroGradient; + } + + walls + { + type zeroGradient; + } + + symmetry + { + type symmetryPlane; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/T b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/T new file mode 100644 index 0000000000000000000000000000000000000000..9cfa5c9c23054721bc7d8f07d89b9524ac766cd5 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/T @@ -0,0 +1,52 @@ +/*--------------------------------*- 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 T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 400; + +boundaryField +{ + top + { + type zeroGradient; + } + + bottom + { + type zeroGradient; + } + + walls + { + type fixedValue; + value uniform 400; + } + + symmetry + { + type symmetryPlane; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/U b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/U new file mode 100644 index 0000000000000000000000000000000000000000..b6c4c172b85c40b8cd9fab0b47b98f50ff1d83ac --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/U @@ -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 volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + top + { + type fixedValue; + value uniform (0 0 0); + } + bottom + { + type fixedValue; + value uniform (0 0 0); + } + walls + { + type fixedValue; + value uniform (0 0 0); + } + symmetry + { + type symmetryPlane; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/epsilon b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/epsilon new file mode 100644 index 0000000000000000000000000000000000000000..e5ed472a8b8b551fb4ab7245a9318c590c271030 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/epsilon @@ -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 volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 5390.5; + +boundaryField +{ + top + { + type compressible::epsilonWallFunction; + value uniform 5390.5; + } + bottom + { + type compressible::epsilonWallFunction; + value uniform 5390.5; + } + walls + { + type compressible::epsilonWallFunction; + value uniform 5390.5; + } + symmetry + { + type symmetryPlane; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/k b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/k new file mode 100644 index 0000000000000000000000000000000000000000..1d9c0d007fb294979895e61912032922c75639cd --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/k @@ -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 volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 37.5; + +boundaryField +{ + top + { + type compressible::kQRWallFunction; + value uniform 37.5; + } + bottom + { + type compressible::kQRWallFunction; + value uniform 37.5; + } + walls + { + type compressible::kQRWallFunction; + value uniform 37.5; + } + symmetry + { + type symmetryPlane; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/p b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/p new file mode 100644 index 0000000000000000000000000000000000000000..55edbea3d6a520edbeac996c3f63849072fc68b9 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/p @@ -0,0 +1,2551 @@ +/*--------------------------------*- 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 p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField nonuniform List<scalar> +2500 +( +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +5e+05 +) +; + +boundaryField +{ + top + { + type zeroGradient; + } + bottom + { + type zeroGradient; + } + walls + { + type zeroGradient; + } + symmetry + { + type symmetryPlane; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/p.org b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/p.org new file mode 100644 index 0000000000000000000000000000000000000000..e716bc595b57c9309c03f85c8f87d57b8abf2022 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/p.org @@ -0,0 +1,51 @@ +/*--------------------------------*- 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 p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 100000; + +boundaryField +{ + top + { + type zeroGradient; + } + + bottom + { + type zeroGradient; + } + + walls + { + type zeroGradient; + } + + symmetry + { + type symmetryPlane; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/chem.inp b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/chem.inp new file mode 100644 index 0000000000000000000000000000000000000000..0e2a2580cac2df2a45ae23f51fd88749d506f2f3 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/chem.inp @@ -0,0 +1,11 @@ +ELEMENTS +O H C N +END +SPECIES +N2 O2 CH4 H2 CO2 H2O +END +REACTIONS + CH4 + 2 O2 => CO2 + 2 H2O 7.000E+12 0.00 20000 + H2 + 0.5 O2 => H2O 1.500E+14 0.00 20000 + +END diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/foam.dat b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/foam.dat new file mode 100644 index 0000000000000000000000000000000000000000..b3a1716ea5ce4bae7365586f328a2bfb0401d95e --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/foam.dat @@ -0,0 +1,32 @@ +( +CO2 CO2 1 44.01 + 0 5000 1000 + 3.85746 0.00441437 -2.21481e-06 5.2349e-10 -4.72084e-14 -48759.2 2.27164 + 2.35677 0.0089846 -7.12356e-06 2.45919e-09 -1.437e-13 -48372 9.90105 + 1.67212e-06 170.672 +CH4 CH4 1 16.043 + 0 5000 1000 + 0.0748515 0.0133909 -5.73286e-06 1.22293e-09 -1.01815e-13 -9468.34 18.4373 + 5.14988 -0.013671 4.91801e-05 -4.84743e-08 1.66694e-11 -10246.6 -4.6413 + 1.67212e-06 170.672 +H2 H2 1 2.01594 + 0 5000 1000 + 3.33728 -4.94025e-05 4.99457e-07 -1.79566e-10 2.00255e-14 -950.159 -3.20502 + 2.34433 0.00798052 -1.94782e-05 2.01572e-08 -7.37612e-12 -917.935 0.68301 + 1.67212e-06 170.672 +H2O H2O 1 18.0153 + 0 5000 1000 + 3.03399 0.00217692 -1.64073e-07 -9.7042e-11 1.68201e-14 -30004.3 4.96677 + 4.19864 -0.00203643 6.5204e-06 -5.48797e-09 1.77198e-12 -30293.7 -0.849032 + 1.67212e-06 170.672 +O2 O2 1 31.9988 + 0 5000 1000 + 3.28254 0.00148309 -7.57967e-07 2.09471e-10 -2.16718e-14 -1088.46 5.45323 + 3.78246 -0.00299673 9.8473e-06 -9.6813e-09 3.24373e-12 -1063.94 3.65768 + 1.67212e-06 170.672 +N2 N2 1 28.0134 + 0 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.44485e-12 -1020.9 3.95037 + 1.67212e-06 170.672 +) diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/foam.inp b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/foam.inp new file mode 100644 index 0000000000000000000000000000000000000000..9473b7e8fabb566b85f949b468c737844f9318d9 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/foam.inp @@ -0,0 +1,22 @@ +species +6 +( +N2 +O2 +CH4 +H2 +CO2 +H2O +) +; + +reactions +2 +( +irreversibleArrheniusReaction + CH4 + 2O2^1.0 = CO2 + 2H2O^1.0 + (7e+06 0 10063.8) +irreversibleArrheniusReaction + H2 + 0.5O2^1.0 = H2O + (4.74342e+12 0 10063.8) +); diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/therm.dat b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/therm.dat new file mode 100644 index 0000000000000000000000000000000000000000..20792659cfd9fce124c0c83f297c356c811258f2 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/chemkin/therm.dat @@ -0,0 +1,3283 @@ +THERMO ALL + 200.000 1000.000 5000.000 +(CH2O)3 70590C 3H 6O 3 G 0200.00 4000.00 1500.00 1 + 0.01913678E+03 0.08578044E-01-0.08882060E-05-0.03574819E-08 0.06605143E-12 2 +-0.06560876E+06-0.08432507E+03-0.04662286E+02 0.06091547E+00-0.04710536E-03 3 + 0.01968843E-06-0.03563271E-10-0.05665404E+06 0.04525265E+03 4 +(CH3)2SICH2 61991H 8C 3SI 1 G 0200.00 2500.00 1500.00 1 + 0.01547852E+03 0.01065700E+00-0.01234345E-05-0.01293352E-07 0.02528715E-11 2 +-0.06693076E+04-0.05358884E+03 0.02027522E+02 0.04408673E+00-0.03370024E-03 3 + 0.01484466E-06-0.02830898E-10 0.03931454E+05 0.01815821E+03 4 +AL 62987AL 1 G 0200.00 5000.00 0600.00 1 + 0.02559589E+02-0.01063224E-02 0.07202828E-06-0.02121105E-09 0.02289429E-13 2 + 0.03890214E+06 0.05234522E+02 0.02736825E+02-0.05912374E-02-0.04033938E-05 3 + 0.02322343E-07-0.01705599E-10 0.03886795E+06 0.04363880E+02 4 +AL2H6 62987AL 2H 6 G 0200.00 1500.00 0600.00 1 + 0.02634884E+02 0.02135952E+00 0.03154151E-05-0.07684674E-07 0.02335832E-10 2 + 0.08871346E+05 0.09827515E+02-0.06800681E+02 0.05080744E+00 0.01039747E-03 3 +-0.01119582E-05 0.08459155E-09 0.01060537E+06 0.05554526E+03 4 +AL2ME6 62987AL 2C 6H 18 G 0200.00 1500.00 0600.00 1 + 0.01773147E+03 0.04935747E+00 0.01196854E-04-0.01639826E-06 0.04890867E-10 2 +-0.03855560E+06-0.05053298E+03-0.07159750E+01 0.01067109E+01 0.02117605E-03 3 +-0.02193212E-05 0.01644144E-08-0.03515546E+06 0.03890763E+03 4 +ALAS 62987AL 1AS 1 G 0200.00 1500.00 0600.00 1 + 0.04790027E+02-0.01908226E-03-0.01983390E-05 0.02239358E-08-0.06904706E-12 2 + 0.05259290E+06 0.03259703E+02 0.05047764E+02-0.06419947E-02-0.01432071E-04 3 + 0.04754391E-07-0.03297621E-10 0.05254264E+06 0.01985206E+02 4 +ALH 62987AL 1H 1 G 0200.00 5000.00 1000.00 1 + 0.03392644E+02 0.01215399E-01-0.04676595E-05 0.08691625E-09-0.06022669E-13 2 + 0.03006845E+06 0.02758899E+02 0.03071503E+02 0.02165549E-01-0.03275638E-04 3 + 0.04136984E-07-0.01877121E-10 0.03021221E+06 0.04548855E+02 4 +ALH2 62987AL 1H 2 G 0200.00 1500.00 0600.00 1 + 0.04486543E+02 0.03128832E-01-0.01969438E-05-0.01016030E-07 0.03497468E-11 2 + 0.01960959E+06 0.08167897E+01 0.02442137E+02 0.09915913E-01 0.02471083E-05 3 +-0.02119583E-06 0.01710234E-09 0.01997588E+06 0.01065270E+03 4 +ALH3 62987AL 1H 3 G 0200.00 1500.00 0600.00 1 + 0.04186838E+02 0.06159249E-01-0.03877593E-06-0.02061928E-07 0.06600276E-11 2 + 0.07908079E+05 0.05134396E+01 0.01008323E+02 0.01640324E+00 0.01976746E-04 3 +-0.03528558E-06 0.02753378E-09 0.08484656E+05 0.01585838E+03 4 +ALME 62987AL 1C 1H 3 G 0200.00 1500.00 0600.00 1 + 0.04662737E+02 0.07097939E-01 0.02520013E-05-0.02114863E-07 0.06097489E-11 2 + 0.08203228E+05 0.01769245E+02 0.02664176E+02 0.01324914E+00 0.02525848E-04 3 +-0.02394396E-06 0.01761855E-09 0.08574173E+05 0.01147449E+03 4 +ALME2 62987AL 1C 2H 6 G 0200.00 1500.00 0600.00 1 + 0.06481282E+02 0.01474605E+00 0.05816529E-05-0.04621347E-07 0.01396041E-10 2 + 0.03745072E+05-0.02603326E+02 0.09494573E+01 0.03206354E+00 0.06134021E-04 3 +-0.06500042E-06 0.04911485E-09 0.04761408E+05 0.02419465E+03 4 +ALME3 62987AL 1C 3H 9 G 0200.00 1500.00 0600.00 1 + 0.06654948E+02 0.02455144E+00 0.01176575E-04-0.07815023E-07 0.02255622E-10 2 +-0.01340952E+06-0.03454481E+02-0.07027567E+01 0.04682764E+00 0.01149903E-03 3 +-0.09160441E-06 0.06687294E-09-0.01203799E+06 0.03232771E+03 4 +AR 120186AR 1 G 0200.00 5000.00 1000.00 1 + 0.02500000E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.07453750E+04 0.04366001E+02 0.02500000E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00-0.07453750E+04 0.04366001E+02 4 +AR+ 121286AR 1E -1 G 0200.00 5000.00 1000.00 1 + 0.02864864E+02-0.01203573E-02-0.01065199E-06 0.09074839E-10-0.09623876E-14 2 + 0.01827230E+07 0.03543585E+02 0.02301341E+02 0.08035529E-02-0.01758806E-05 3 +-0.01781093E-08-0.08937268E-13 0.01829281E+07 0.06659358E+02 4 +AS 62987AS 1 G 0200.00 1500.00 0600.00 1 + 0.02617011E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 + 0.03720455E+06 0.06995524E+02 0.02617011E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00 0.03720455E+06 0.06995524E+02 4 +AS2 62987AS 2 G 0200.00 1500.00 0600.00 1 + 0.04394201E+02 0.05389968E-02-0.02379401E-05-0.06541924E-09 0.05184186E-12 2 + 0.02235094E+06 0.04897919E+02 0.03682892E+02 0.03121811E-01-0.01074052E-04 3 +-0.05629472E-07 0.05178811E-10 0.02247356E+06 0.08283423E+02 4 +AS3 62987AS 3 G 0200.00 1500.00 0600.00 1 + 0.07404036E+02 0.07818426E-02-0.03918297E-05-0.05203629E-09 0.06291907E-12 2 + 0.03063825E+06-0.03417324E+02 0.06403142E+02 0.04477099E-01-0.01866642E-04 3 +-0.07394750E-07 0.07012753E-10 0.03080965E+06 0.01337136E+02 4 +AS4 62987AS 4 G 0200.00 1500.00 0600.00 1 + 0.09695766E+02 0.01306258E-01-0.05519564E-05-0.02150874E-08 0.01457935E-11 2 + 0.01571732E+06-0.01618870E+03 0.07853761E+02 0.07916509E-01-0.02329820E-04 3 +-0.01526312E-06 0.01377435E-09 0.01603629E+06-0.07409755E+02 4 +ASALME 62987AS 1AL 1C 1H 3G 0200.00 1500.00 0600.00 1 + 0.07127107E+02 0.07357864E-01 0.02300796E-06-0.02226399E-07 0.06927227E-11 2 + 0.03273438E+06-0.01847179E+02 0.04053423E+02 0.01726125E+00 0.01833498E-04 3 +-0.03386953E-06 0.02626981E-09 0.03329309E+06 0.01299665E+03 4 +ASALME2 62987AS 1AL 1C 2H 6G 0200.00 1500.00 0600.00 1 + 0.09909938E+02 0.01463850E+00 0.04118731E-05-0.04444658E-07 0.01329501E-10 2 + 0.02815111E+06-0.01523531E+03 0.04808530E+02 0.03067687E+00 0.05048001E-04 3 +-0.05908099E-06 0.04462290E-09 0.02908817E+06 0.09471621E+02 4 +ASGAET 62987AS 1GA 1C 2H 5G 0200.00 1500.00 0600.00 1 + 0.09081073E+02 0.01674632E+00 0.01283130E-05-0.05590436E-07 0.01781315E-10 2 + 0.03807443E+06-0.09142782E+02 0.06364698E+01 0.04382467E+00 0.06144686E-04 3 +-0.09491641E-06 0.07374198E-09 0.03960893E+06 0.03164673E+03 4 +ASGAET2 62987AS 1GA 1C 4H 10G 0200.00 1500.00 0600.00 1 + 0.01032429E+03 0.03073571E+00 0.01086335E-04-0.09971949E-07 0.02945979E-10 2 + 0.03039490E+06-0.01316402E+03-0.03539248E+01 0.06369772E+00 0.01359742E-03 3 +-0.01286142E-05 0.09572181E-09 0.03236903E+06 0.03865086E+03 4 +ASGAME 62987AS 1GA 1C 1H 3G 0200.00 1500.00 0600.00 1 + 0.07322183E+02 0.06995479E-01 0.01069351E-05-0.01995283E-07 0.06040446E-11 2 + 0.03949449E+06-0.07416680E+01 0.04877266E+02 0.01482559E+00 0.01652124E-04 3 +-0.02712058E-06 0.02080196E-09 0.03994071E+06 0.01107670E+03 4 +ASGAME2 62987AS 1GA 1C 2H 6G 0200.00 1500.00 0600.00 1 + 0.09352436E+02 0.01504820E+00 0.05157975E-05-0.04553518E-07 0.01348763E-10 2 + 0.03735856E+06-0.01218114E+03 0.04382076E+02 0.03056345E+00 0.05477067E-04 3 +-0.05834108E-06 0.04373509E-09 0.03827434E+06 0.01191111E+03 4 +ASGAMEH 62987AS 1GA 1C 1H 4G 0200.00 1500.00 0600.00 1 + 0.07842794E+02 0.09682097E-01 0.01060306E-05-0.02991402E-07 0.09382673E-11 2 + 0.04435297E+06-0.05093455E+02 0.03585119E+02 0.02336317E+00 0.02873356E-04 3 +-0.04737895E-06 0.03674461E-09 0.04512703E+06 0.01547160E+03 4 +ASH 62987AS 1H 1 G 0200.00 1500.00 0600.00 1 + 0.03219848E+02 0.01001250E-01-0.04874997E-08-0.01107653E-08-0.09254321E-13 2 + 0.03008176E+06 0.06647311E+02 0.03865843E+02-0.01157571E-01-0.03494372E-05 3 + 0.07079686E-07-0.06014028E-10 0.02996829E+06 0.03549869E+02 4 +ASH2 62987AS 1H 2 G 0200.00 1500.00 0600.00 1 + 0.03428307E+02 0.03181140E-01 0.01460484E-05-0.07937145E-08 0.01694414E-11 2 + 0.02010282E+06 0.02904703E+02 0.03778945E+02 0.01759233E-01 0.08070807E-05 3 + 0.02358763E-07-0.03043521E-10 0.02004862E+06 0.01272974E+02 4 +ASH3 62987AS 1H 3 G 0200.00 1500.00 0600.00 1 + 0.04172022E+02 0.04371323E-01 0.02177574E-05-0.01183264E-07 0.04536374E-11 2 + 0.06882916E+05 0.02803477E+02 0.09446356E+01 0.01508469E+00 0.01201696E-04 3 +-0.03397465E-06 0.02767656E-09 0.07459168E+05 0.01832268E+03 4 +ASME 62987AS 1C 1H 3 G 0200.00 1500.00 0600.00 1 + 0.04657260E+02 0.06976298E-01 0.02147557E-05-0.02101159E-07 0.06082150E-11 2 + 0.02806423E+06 0.03409835E+02 0.02625270E+02 0.01325242E+00 0.02441628E-04 3 +-0.02419567E-06 0.01786944E-09 0.02844080E+06 0.01327336E+03 4 +ASME2 62987AS 1C 2H 6 G 0200.00 1500.00 0600.00 1 + 0.05981395E+02 0.01521284E+00 0.06993355E-05-0.04721619E-07 0.01369912E-10 2 + 0.01467985E+06 0.01192741E+02 0.01390400E+02 0.02923331E+00 0.06598871E-04 3 +-0.05620560E-06 0.04130368E-09 0.01553302E+06 0.02349981E+03 4 +ASME3 62987AS 1C 3H 9 G 0200.00 1500.00 0600.00 1 + 0.06347764E+02 0.02466454E+00 0.01154629E-04-0.07877436E-07 0.02202225E-10 2 +-0.01617323E+05-0.06316786E+01 0.02667388E+01 0.04253171E+00 0.01165106E-03 3 +-0.07914706E-06 0.05603127E-09-0.04685540E+04 0.02904591E+03 4 +BE 81392BE 1 G 0200.00 5000.00 1000.00 1 + 0.02380618E+02 0.02339856E-02-0.01453949E-05 0.03111727E-09-0.01072959E-13 2 + 0.03868083E+06 0.02787792E+02 0.02403493E+02 0.06166087E-02-0.01321925E-04 3 + 0.01144806E-07-0.03437304E-11 0.03864894E+06 0.02549853E+02 4 +BE(S) 81392BE 1 S 0200.00 3000.00 1000.00 1 + 0.01898768E+02 0.01629382E-01-0.03547406E-05 0.01247349E-08-0.01578507E-12 2 +-0.06527011E+04-0.01020412E+03-0.09092963E+01 0.01585668E+00-0.02624182E-03 3 + 0.02044924E-06-0.05872448E-10-0.02390556E+04 0.02598871E+02 4 +BE2SIO4(S) 81392BE 2O 4SI 1 S 0200.00 3000.00 1000.00 1 + 0.01695617E+03 0.06266472E-01-0.02841325E-04 0.06379149E-08-0.04780890E-12 2 +-0.02614324E+07-0.09398438E+03-0.06380159E+02 0.09333352E+00-0.01415477E-02 3 + 0.01101948E-05-0.03462902E-09-0.02558671E+07 0.02162977E+03 4 +BE3B2O6(S) 81392B 2BE 3O 6 S 0200.00 3000.00 1000.00 1 + 0.02640267E+03 0.01142674E+00-0.03773479E-04 0.04332047E-08 0.02356543E-12 2 +-0.03849576E+07-0.01487137E+04-0.05230657E+02 0.01105769E+01-0.01614054E-02 3 + 0.01447797E-05-0.05420786E-09-0.03755957E+07 0.01490974E+03 4 +BE3N2(A) 81392BE 3N 2 S 0200.00 3000.00 1000.00 1 + 0.01097008E+03 0.06416846E-01-0.02938928E-04 0.04564651E-08-0.05509703E-13 2 +-0.07519767E+06-0.06231286E+03-0.08167547E+02 0.08515091E+00-0.01355569E-02 3 + 0.01060406E-05-0.03256815E-09-0.07110460E+06 0.03040606E+03 4 +BE3N2(L) 81392BE 3N 2 L 0200.00 4000.00 1000.00 1 + 0.01610468E+03 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.06338252E+06-0.08701469E+03 0.01610468E+03 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00-0.06338252E+06-0.08701468E+03 4 +BEAL2O4(S) 81392AL 2BE 1O 4 S 0200.00 2400.00 1000.00 1 + 0.01118219E+03 0.01677777E+00-0.06692989E-04-0.01497360E-07 0.01203700E-10 2 +-0.02810337E+07-0.06116527E+03-0.07257604E+02 0.01074554E+01-0.01713422E-02 3 + 0.01295274E-05-0.03740965E-09-0.02780832E+07 0.02383770E+03 4 +BEB2O4 81392B 2BE 1O 4 G 0200.00 5000.00 1000.00 1 + 0.01266018E+03 0.06883210E-01-0.02963169E-04 0.05694789E-08-0.04050458E-12 2 +-0.01672990E+07-0.03636876E+03 0.04012008E+02 0.03052847E+00-0.02571938E-03 3 + 0.09738810E-07-0.01450712E-10-0.01648983E+07 0.08399628E+02 4 +BEBO2 81392B 1BE 1O 2 G 0200.00 5000.00 1000.00 1 + 0.06831273E+02 0.03424464E-01-0.01471236E-04 0.02825118E-08-0.02008790E-12 2 +-0.06047559E+06-0.08730609E+02 0.02426203E+02 0.01572415E+00-0.01309160E-03 3 + 0.04244447E-07-0.02562806E-11-0.05929016E+06 0.01394744E+03 4 +BEBR 81392BE 1BR 1 G 0200.00 5000.00 1000.00 1 + 0.04166357E+02 0.04424462E-02-0.01713095E-05 0.03185381E-09-0.01964221E-13 2 + 0.01313080E+06 0.03473875E+02 0.03178756E+02 0.03144181E-01-0.01989189E-04 3 +-0.04871910E-08 0.06208255E-11 0.01337870E+06 0.08520506E+02 4 +BEBR2 81392BE 1BR 2 G 0200.00 5000.00 1000.00 1 + 0.06814040E+02 0.07848450E-02-0.03497501E-05 0.06885841E-09-0.04984129E-13 2 +-0.02974764E+06-0.06362110E+02 0.05216331E+02 0.05128972E-01-0.03678726E-04 3 + 0.08525872E-09 0.05611721E-11-0.02932967E+06 0.01847829E+02 4 +BEBR2(S) 81392BE 1BR 2 S 0200.00 1500.00 1000.00 1 + 0.07680161E+02 0.03193456E-01-0.02439097E-05-0.09487536E-08 0.03902210E-11 2 +-0.04528092E+06-0.03282152E+03 0.05659917E+02 0.08805599E-01-0.02790316E-04 3 +-0.04611400E-07 0.03007373E-10-0.04482571E+06-0.02263852E+03 4 +BECL 81392BE 1CL 1 G 0200.00 5000.00 1000.00 1 + 0.04072243E+02 0.05328307E-02-0.02146892E-05 0.04097687E-09-0.02774848E-13 2 + 0.05990792E+05 0.02639872E+02 0.03006275E+02 0.03385550E-01-0.02274674E-04 3 +-0.01333438E-08 0.04447782E-11 0.06271131E+05 0.08126810E+02 4 +BECL2 81392BE 1CL 2 G 0200.00 5000.00 1000.00 1 + 0.06656109E+02 0.09583935E-02-0.04248637E-05 0.08333911E-09-0.06016211E-13 2 +-0.04547842E+06-0.08159565E+02 0.04835084E+02 0.05899051E-01-0.04307799E-04 3 + 0.03113267E-08 0.05292957E-11-0.04499748E+06 0.01210616E+02 4 +BECL2(A) 81392BE 1CL 2 S 0200.00 1500.00 1000.00 1 + 0.08380054E+02 0.02572312E-01-0.07554892E-05-0.02368242E-08 0.01042547E-11 2 +-0.06177281E+06-0.03886076E+03 0.08074927E+01 0.03830225E+00-0.06255340E-03 3 + 0.04645940E-06-0.01295143E-09-0.06052883E+06-0.03683825E+02 4 +BECL2(B) 81392BE 1CL 2 S 0200.00 1500.00 1000.00 1 + 0.07791771E+02 0.02945389E-01-0.04237093E-05-0.05339604E-08 0.01505044E-11 2 +-0.06231958E+06-0.03656698E+03 0.03004424E+02 0.02353211E+00-0.03553037E-03 3 + 0.02706855E-06-0.08144728E-10-0.06136495E+06-0.01365758E+03 4 +BECLF 81392BE 1CL 1F 1 G 0200.00 5000.00 1000.00 1 + 0.06393787E+02 0.01234948E-01-0.05412476E-05 0.01053150E-08-0.07557553E-13 2 +-0.07104831E+06-0.07478512E+02 0.04405415E+02 0.06642228E-01-0.05154354E-04 3 + 0.01063175E-07 0.02287810E-11-0.07051262E+06 0.02777586E+02 4 +BEF 81392BE 1F 1 G 0200.00 5000.00 1000.00 1 + 0.03741370E+02 0.08524818E-02-0.03436428E-05 0.06466099E-09-0.04475089E-13 2 +-0.02167667E+06 0.02968223E+02 0.02905108E+02 0.02952099E-01-0.02747617E-04 3 + 0.01918800E-07-0.07179964E-11-0.02140972E+06 0.07407617E+02 4 +BEF2 81392BE 1F 2 G 0200.00 5000.00 1000.00 1 + 0.06008875E+02 0.01636431E-01-0.07094651E-05 0.01370220E-08-0.09780462E-13 2 +-0.09777056E+06-0.07723693E+02 0.03801759E+02 0.07737988E-01-0.06427724E-04 3 + 0.02097328E-07-0.01462695E-11-0.09717092E+06 0.03660784E+02 4 +BEF2(L) 81392BE 1F 2 L 0200.00 2000.00 1000.00 1 + 0.05976585E+02 0.04777009E-01-0.05064131E-05 0.05012404E-09 0.08570416E-13 2 +-0.01251277E+07-0.02873833E+03-0.05587355E+01 0.03423905E+00-0.05210078E-03 3 + 0.04099400E-06-0.01226767E-09-0.01239060E+07 0.02162308E+02 4 +BEH 81392BE 1H 1 G 0200.00 5000.00 1000.00 1 + 0.03103757E+02 0.01443026E-01-0.05486383E-05 0.09992518E-09-0.06823073E-13 2 + 0.03762032E+06 0.03113887E+02 0.03220220E+02 0.01660638E-01-0.03759811E-04 3 + 0.05403578E-07-0.02433378E-10 0.03762484E+06 0.02536116E+02 4 +BEH+ 81392BE 1H 1E -1 G 0200.00 5000.00 1000.00 1 + 0.02935026E+02 0.01642881E-01-0.06606950E-05 0.01253854E-08-0.08322438E-13 2 + 0.01381605E+07 0.03342443E+02 0.03203174E+02 0.01918095E-01-0.04743515E-04 3 + 0.06392785E-07-0.02736265E-10 0.01380944E+07 0.01849186E+02 4 +BEH2 81392BE 1H 2 G 0200.00 5000.00 1000.00 1 + 0.03274395E+02 0.04312822E-01-0.01774785E-04 0.03298131E-08-0.02286391E-12 2 + 0.01367913E+06 0.03758700E+01 0.01761472E+02 0.08827701E-01-0.01241923E-03 3 + 0.01412574E-06-0.06176309E-10 0.01426447E+06 0.08573833E+02 4 +BEH2O2 81392BE 1H 2O 2 G 0200.00 5000.00 1000.00 1 + 0.07694718E+02 0.04893975E-01-0.01780895E-04 0.03055611E-08-0.02009121E-12 2 +-0.08403520E+06-0.01751820E+03 0.03118833E+02 0.01997183E+00-0.01673101E-03 3 + 0.03275766E-07 0.01457848E-10-0.08305301E+06 0.05128545E+02 4 +BEH2O2(A) 81392BE 1H 2O 2 S 0200.00 1000.00 1000.00 1 + 0.01357669E+03 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.01138925E+07-0.07369071E+03-0.07121292E+02 0.08378375E+00-0.01435144E-02 3 + 0.01164084E-05-0.03597983E-09-0.01091544E+07 0.02745148E+03 4 +BEH2O2(B) 81392BE 1H 2O 2 S 0200.00 1000.00 1000.00 1 + 0.01357669E+03 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.01142447E+07-0.07409333E+03-0.07121292E+02 0.08378375E+00-0.01435144E-02 3 + 0.01164084E-05-0.03597983E-09-0.01095066E+07 0.02704887E+03 4 +BEI 81392BE 1I 1 G 0200.00 5000.00 1000.00 1 + 0.04226574E+02 0.03948427E-02-0.01549696E-05 0.03023851E-09-0.01932301E-13 2 + 0.01912832E+06 0.04229493E+02 0.03358791E+02 0.02864276E-01-0.01889889E-04 3 +-0.04370942E-08 0.05986692E-11 0.01933641E+06 0.08627578E+02 4 +BEI2 81392BE 1I 2 G 0200.00 5000.00 1000.00 1 + 0.06974217E+02 0.06094573E-02-0.02739783E-05 0.05428767E-09-0.03948833E-13 2 +-0.09890086E+05-0.05063732E+02 0.05564008E+02 0.04472664E-01-0.03090745E-04 3 +-0.02609722E-08 0.06750777E-11-0.09529549E+05 0.02158152E+02 4 +BEI2(S) 81392BE 1I 2 S 0200.00 1500.00 1000.00 1 + 0.08868316E+02 0.02591978E-01-0.07796846E-05-0.02236952E-08 0.01016032E-11 2 +-0.02556556E+06-0.03709859E+03 0.01301872E+02 0.03830115E+00-0.06255080E-03 3 + 0.04645675E-06-0.01295046E-09-0.02432303E+06-0.01952190E+02 4 +BEN 81392BE 1N 1 G 0200.00 5000.00 1000.00 1 + 0.03799137E+02 0.08135072E-02-0.03271826E-05 0.06267597E-09-0.04443547E-13 2 + 0.05006582E+06 0.03013958E+02 0.02880282E+02 0.03157848E-01-0.02749300E-04 3 + 0.01549304E-07-0.04944407E-11 0.05034622E+06 0.07854857E+02 4 +BEO(A) 81392BE 1O 1 S 0200.00 3500.00 1000.00 1 + 0.04606101E+02 0.01465013E-01-0.09316989E-06-0.08839902E-09 0.01840163E-12 2 +-0.07492927E+06-0.02579358E+03-0.01187545E+01 0.01231168E+00-0.02298405E-04 3 +-0.09318502E-07 0.05331928E-10-0.07364786E+06-0.01151163E+02 4 +BEO(B) 81392BE 1O 1 S 0200.00 3500.00 1000.00 1 + 0.04606101E+02 0.01465013E-01-0.09316989E-06-0.08839902E-09 0.01840163E-12 2 +-0.07412403E+06-0.02545418E+03-0.01187545E+01 0.01231168E+00-0.02298405E-04 3 +-0.09318502E-07 0.05331928E-10-0.07284262E+06-0.08117651E+01 4 +BEOH 81392BE 1H 1O 1 G 0200.00 5000.00 1000.00 1 + 0.04580703E+02 0.02444079E-01-0.08794693E-05 0.01484750E-08-0.09530468E-13 2 +-0.01534682E+06-0.01819725E+02 0.02577868E+02 0.08977628E-01-0.07867956E-04 3 + 0.02536139E-07 0.06057864E-12-0.01489220E+06 0.08162645E+02 4 +BES(S) 81392BE 1S 1 S 0200.00 3000.00 1000.00 1 + 0.04944107E+02 0.03098929E-01-0.01308985E-04 0.02564670E-08-0.01377673E-12 2 +-0.03004408E+06-0.02521191E+03-0.03045166E+02 0.03934537E+00-0.06572406E-03 3 + 0.05230436E-06-0.01590377E-09-0.02854032E+06 0.01256033E+03 4 +BESO4(A) 81392BE 1O 4S 1 S 0200.00 2200.00 1000.00 1 + 0.02081235E+01 0.03035540E+00-0.07769396E-04-0.02942517E-07 0.01112249E-10 2 +-0.01455278E+07 0.02609183E+01-0.08960041E+02 0.01179726E+01-0.02438390E-02 3 + 0.02430177E-05-0.08722741E-09-0.01453005E+07 0.03410812E+03 4 +BESO4(B) 81392BE 1O 4S 1 S 0200.00 2200.00 1000.00 1 + 0.02081235E+01 0.03035540E+00-0.07769396E-04-0.02942517E-07 0.01112249E-10 2 +-0.01453939E+07 0.04157230E+01-0.08960041E+02 0.01179726E+01-0.02438390E-02 3 + 0.02430177E-05-0.08722741E-09-0.01451667E+07 0.03426292E+03 4 +BESO4(GAM) 81392BE 1O 4S 1 S 0200.00 2200.00 1000.00 1 + 0.02081235E+01 0.03035540E+00-0.07769396E-04-0.02942517E-07 0.01112249E-10 2 +-0.01430422E+07 0.03005051E+02-0.08960041E+02 0.01179726E+01-0.02438390E-02 3 + 0.02430177E-05-0.08722741E-09-0.01428148E+07 0.03685225E+03 4 +C 121086C 1 G 0200.00 5000.00 1000.00 1 + 0.02602087E+02-0.01787081E-02 0.09087041E-06-0.01149933E-09 0.03310844E-14 2 + 0.08542154E+06 0.04195177E+02 0.02498585E+02 0.08085777E-03-0.02697697E-05 3 + 0.03040729E-08-0.01106652E-11 0.08545878E+06 0.04753459E+02 4 +C(S) 121286C 1 S 0200.00 5000.00 1000.00 1 + 0.01490166E+02 0.01662126E-01-0.06687204E-05 0.01290880E-08-0.09205334E-13 2 +-0.07074019E+04-0.08717785E+02-0.06705661E+01 0.07181500E-01-0.05632921E-04 3 + 0.02142299E-07-0.04168562E-11-0.07339498E+03 0.02601596E+02 4 +C+ 120186C 1E -1 G 0200.00 5000.00 1000.00 1 + 0.02511827E+02-0.01735978E-03 0.09504268E-07-0.02218852E-10 0.01862189E-14 2 + 0.02166772E+07 0.04286130E+02 0.02595384E+02-0.04068665E-02 0.06892367E-05 3 +-0.05266488E-08 0.01508338E-11 0.02166628E+07 0.03895730E+02 4 +C- 121686C 1E 1 G 0200.00 5000.00 1000.00 1 + 0.02990221E+02-0.09184596E-02 0.05055560E-05-0.07703410E-09 0.03163271E-13 2 + 0.06983931E+06 0.01259453E+02 0.02783903E+02-0.01774288E-01 0.03696761E-04 3 +-0.03066693E-07 0.08637622E-11 0.06998511E+06 0.02726281E+02 4 +C2 121286C 2 G 0200.00 5000.00 1000.00 1 + 0.04135979E+02 0.06531618E-03 0.01837099E-05-0.05295085E-09 0.04712137E-13 2 + 0.09967272E+06 0.07472923E+01 0.06996045E+02-0.07400602E-01 0.03234704E-04 3 + 0.04802535E-07-0.03295918E-10 0.09897487E+06-0.01386227E+03 4 +C2- 121286C 2E 1 G 0200.00 5000.00 1000.00 1 + 0.03796891E+02 0.02530050E-02 0.09709118E-06-0.01614804E-09-0.03212893E-15 2 + 0.05207981E+06 0.01658147E+02 0.03468012E+02-0.02352875E-02 0.01243912E-04 3 + 0.04705961E-08-0.08164274E-11 0.05231215E+06 0.03886699E+02 4 +C2CL3 40992C 2CL 3 G 0200.00 4000.00 1500.00 1 + 0.01183853E+03 0.09460851E-02-0.02920870E-05 0.03847024E-09-0.01539560E-13 2 + 0.02313143E+06-0.02891445E+03 0.04808647E+02 0.02212948E+00-0.02548847E-03 3 + 0.01372083E-06-0.02812663E-10 0.02514353E+06 0.07232629E+02 4 +C2CL5 40992C 2CL 5 G 0200.00 4000.00 1500.00 1 + 0.01775107E+03 0.09220800E-02-0.04852694E-05 0.01190373E-08-0.01100446E-12 2 +-0.02402768E+05-0.05545676E+03 0.06414346E+02 0.03867367E+00-0.04857935E-03 3 + 0.02734513E-06-0.05732891E-10 0.04697039E+04 0.01542036E+02 4 +C2CL6 40992C 2CL 6 G 0200.00 4000.00 1500.00 1 + 0.02021422E+03 0.01757648E-01-0.05881040E-05 0.08029739E-09-0.03958238E-13 2 +-0.02340156E+06-0.07096011E+03 0.07492710E+02 0.04318468E+00-0.05275048E-03 3 + 0.02947143E-06-0.06176554E-10-0.02006555E+06-0.06635582E+02 4 +C2F6 82489C 2F 6 G 0200.00 5000.00 1000.00 1 + 0.01602057E+03 0.06273007E-01-0.02797778E-04 0.05517547E-08-0.04004651E-12 2 +-0.01675654E+07-0.05519459E+03 0.03577448E+02 0.03913670E+00-0.02714862E-03 3 + 0.04348459E-08 0.04007135E-10-0.01642174E+07 0.09098384E+02 4 +C2H 81193C 2H 1 G 0200.00 4000.00 1000.00 1 + 0.03986367E+02 0.03143123E-01-0.01267243E-04 0.02924363E-08-0.02716320E-12 2 + 0.06655884E+06 0.01191063E+02 0.02737704E+02 0.08048446E-01-0.09244310E-04 3 + 0.06525259E-07-0.01939580E-10 0.06683813E+06 0.07300220E+02 4 +C2H2 121386C 2H 2 G 0200.00 5000.00 1000.00 1 + 0.04436770E+02 0.05376039E-01-0.01912817E-04 0.03286379E-08-0.02156710E-12 2 + 0.02566766E+06-0.02800338E+02 0.02013562E+02 0.01519045E+00-0.01616319E-03 3 + 0.09078992E-07-0.01912746E-10 0.02612444E+06 0.08805378E+02 4 +C2H3 12787C 2H 3 G 0200.00 5000.00 1000.00 1 + 0.05933468E+02 0.04017746E-01-0.03966740E-05-0.01441267E-08 0.02378644E-12 2 + 0.03185435E+06-0.08530313E+02 0.02459276E+02 0.07371476E-01 0.02109873E-04 3 +-0.01321642E-07-0.01184784E-10 0.03335225E+06 0.01155620E+03 4 +C2H4 121286C 2H 4 G 0200.00 5000.00 1000.00 1 + 0.03528419E+02 0.01148518E+00-0.04418385E-04 0.07844601E-08-0.05266848E-12 2 + 0.04428289E+05 0.02230389E+02-0.08614880E+01 0.02796163E+00-0.03388677E-03 3 + 0.02785152E-06-0.09737879E-10 0.05573046E+05 0.02421149E+03 4 +C2H5 12387C 2H 5 G 0200.00 5000.00 1000.00 1 + 0.07190480E+02 0.06484077E-01-0.06428065E-05-0.02347879E-08 0.03880877E-12 2 + 0.01067455E+06-0.01478089E+03 0.02690702E+02 0.08719133E-01 0.04419839E-04 3 + 0.09338703E-08-0.03927773E-10 0.01287040E+06 0.01213820E+03 4 +C2H6 121686C 2H 6 G 0200.00 4000.00 1000.00 1 + 0.04825938E+02 0.01384043E+00-0.04557259E-04 0.06724967E-08-0.03598161E-12 2 +-0.01271779E+06-0.05239507E+02 0.01462539E+02 0.01549467E+00 0.05780507E-04 3 +-0.01257832E-06 0.04586267E-10-0.01123918E+06 0.01443229E+03 4 +C2HCL 112989C 2H 1CL 1 G 0200.00 5000.00 1000.00 1 + 0.06295372E+02 0.03883113E-01-0.01506049E-04 0.02700003E-08-0.01830213E-12 2 + 0.02357279E+06-0.08137063E+02 0.03618443E+02 0.01331979E+00-0.01321822E-03 3 + 0.06092024E-07-0.08879026E-11 0.02415385E+06 0.05050645E+02 4 +C2HCL5 40992H 1C 2CL 5 G 0200.00 4000.00 1500.00 1 + 0.01897802E+03 0.02244275E-01-0.05864788E-05 0.02733950E-09 0.04934135E-13 2 +-0.02494887E+06-0.06578714E+03 0.05356044E+02 0.04176390E+00-0.04710787E-03 3 + 0.02550758E-06-0.05324478E-10-0.02079330E+06 0.04970258E+02 4 +C2N 121286C 2N 1 G 0200.00 5000.00 1000.00 1 + 0.06151561E+02 0.01511650E-01-0.06629362E-05 0.01286148E-08-0.09160830E-13 2 + 0.06484318E+06-0.08177850E+02 0.03498544E+02 0.08554433E-01-0.06288697E-04 3 + 0.08638478E-08 0.04915996E-11 0.06556611E+06 0.05548374E+02 4 +C2N2 121286C 2N 2 G 0200.00 5000.00 1000.00 1 + 0.06548003E+02 0.03984707E-01-0.01634216E-04 0.03038597E-08-0.02111069E-12 2 + 0.03490716E+06-0.09735790E+02 0.04265459E+02 0.01192257E+00-0.01342014E-03 3 + 0.09192297E-07-0.02778942E-10 0.03547888E+06 0.01713212E+02 4 +C2O 121286C 2O 1 G 0200.00 5000.00 1000.00 1 + 0.04849809E+02 0.02947585E-01-0.01090729E-04 0.01792562E-08-0.01115758E-12 2 + 0.03282055E+06-0.06453226E+01 0.03368851E+02 0.08241803E-01-0.08765145E-04 3 + 0.05569262E-07-0.01540009E-10 0.03317081E+06 0.06713314E+02 4 +C3 121286C 3 G 0200.00 5000.00 1000.00 1 + 0.03803710E+02 0.02253567E-01-0.07704535E-05 0.01316294E-08-0.08694264E-13 2 + 0.09736135E+06 0.06128063E+02 0.04345528E+02 0.01264466E-01-0.04652557E-04 3 + 0.08695856E-07-0.04243536E-10 0.09731403E+06 0.03519437E+02 4 +C3H2 102193H 2C 3 G 0150.00 4000.00 1000.00 1 + 0.07670981E+02 0.02748749E-01-0.04370943E-05-0.06455599E-09 0.01663887E-12 2 + 0.06259722E+06-0.01236890E+03 0.03166714E+02 0.02482572E+00-0.04591637E-03 3 + 0.04268019E-06-0.01482152E-09 0.06350421E+06 0.08869446E+02 4 +C3H2(S) 101993H 2C 3 G 0200.00 4000.00 1400.00 1 + 0.08351312E+02 0.02672278E-01-0.02129404E-05-0.01478218E-08 0.02583689E-12 2 + 0.06800690E+06-0.01950884E+03 0.04749475E+02 0.08520229E-01-0.01160268E-04 3 +-0.02494954E-07 0.09921004E-11 0.06939979E+06 0.05437792E+01 4 +C3H4 101993H 4C 3 G 0200.00 4000.00 1400.00 1 + 0.09776256E+02 0.05302138E-01-0.03701118E-05-0.03026386E-08 0.05089581E-12 2 + 0.01954972E+06-0.03077061E+03 0.02539831E+02 0.01633437E+00-0.01764950E-04 3 +-0.04647365E-07 0.01729131E-10 0.02251243E+06 0.09935702E+02 4 +C3H4C 101993H 4C 3 G 0200.00 4000.00 1400.00 1 + 0.09708652E+02 0.05344939E-01-0.03953553E-05-0.03111764E-08 0.05369406E-12 2 + 0.02967722E+06-0.03073273E+03 0.01056162E+02 0.01905236E+00-0.02317048E-04 3 +-0.05933690E-07 0.02307128E-10 0.03309110E+06 0.01761927E+03 4 +C3H4P 101993H 4C 3 G 0200.00 4000.00 1400.00 1 + 0.09768102E+02 0.05219151E-01-0.03753140E-05-0.02992191E-08 0.05107878E-12 2 + 0.01860277E+06-0.03020678E+03 0.03029730E+02 0.01498961E+00-0.01398500E-04 3 +-0.03969619E-07 0.01388217E-10 0.02148408E+06 0.08004594E+02 4 +C3H6 120186C 3H 6 G 0200.00 5000.00 1000.00 1 + 0.06732257E+02 0.01490834E+00-0.04949899E-04 0.07212022E-08-0.03766204E-12 2 +-0.09235703E+04-0.01331335E+03 0.01493307E+02 0.02092518E+00 0.04486794E-04 3 +-0.01668912E-06 0.07158146E-10 0.01074826E+05 0.01614534E+03 4 +C3H8 120186C 3H 8 G 0200.00 5000.00 1000.00 1 + 0.07525217E+02 0.01889034E+00-0.06283924E-04 0.09179373E-08-0.04812410E-12 2 +-0.01646455E+06-0.01784390E+03 0.08969208E+01 0.02668986E+00 0.05431425E-04 3 +-0.02126001E-06 0.09243330E-10-0.01395492E+06 0.01935533E+03 4 +C3O2 121286C 3O 2 G 0200.00 5000.00 1000.00 1 + 0.08098897E+02 0.05560040E-01-0.02312265E-04 0.04340709E-08-0.03036387E-12 2 +-0.01421435E+06-0.01521974E+03 0.04018127E+02 0.01836661E+00-0.01907148E-03 3 + 0.01185587E-06-0.03418748E-10-0.01312824E+06 0.05582084E+02 4 +C4 121286C 4 G 0200.00 5000.00 1000.00 1 + 0.06500180E+02 0.04228632E-01-0.01790718E-04 0.03404813E-08-0.02403978E-12 2 + 0.01143401E+07-0.01148889E+03 0.02343028E+02 0.01642981E+00-0.01527986E-03 3 + 0.07343826E-07-0.01582274E-10 0.01154538E+07 0.09826204E+02 4 +C4H 121686C 4H 1 G 0200.00 5000.00 1000.00 1 + 0.06242882E+02 0.06193683E-01-0.02085932E-04 0.03082203E-08-0.01636483E-12 2 + 0.07568019E+06-0.07210806E+02 0.05023247E+02 0.07092375E-01-0.06073762E-07 3 +-0.02275752E-07 0.08086994E-11 0.07623813E+06-0.06942594E+00 4 +C4H10 62090C 4H 10 G 0200.00 4000.00 1500.00 1 + 0.01998785E+03 0.01037281E+00-0.09610818E-05-0.04623018E-08 0.08202828E-12 2 +-0.02625571E+06-0.08837907E+03-0.02256618E+02 0.05881732E+00-0.04525783E-03 3 + 0.02037115E-06-0.04079458E-10-0.01760233E+06 0.03329595E+03 4 +C4H2 121686C 4H 2 G 0200.00 5000.00 1000.00 1 + 0.09031407E+02 0.06047253E-01-0.01948789E-04 0.02754863E-08-0.01385608E-12 2 + 0.05294736E+06-0.02385068E+03 0.04005192E+02 0.01981000E+00-0.09865877E-04 3 +-0.06635158E-07 0.06077413E-10 0.05424065E+06 0.01845737E+02 4 +C4H6 120186C 4H 6 G 0200.00 5000.00 1000.00 1 + 0.08046583E+02 0.01648525E+00-0.05522227E-04 0.08123593E-08-0.04295078E-12 2 + 0.01370130E+06-0.01800458E+03 0.03197108E+02 0.02025592E+00 0.06510192E-04 3 +-0.01658442E-06 0.06400282E-10 0.01571520E+06 0.09895660E+02 4 +C4H8 120386C 4H 8 G 0200.00 5000.00 1000.00 1 + 0.02053584E+02 0.03435051E+00-0.01588320E-03 0.03308966E-07-0.02536104E-11 2 +-0.02139723E+05 0.01554320E+03 0.01181138E+02 0.03085338E+00 0.05086525E-04 3 +-0.02465489E-06 0.01111019E-09-0.01790400E+05 0.02106247E+03 4 +C5 121286C 5 G 0200.00 5000.00 1000.00 1 + 0.08078081E+02 0.05743464E-01-0.02436405E-04 0.04638916E-08-0.03278910E-12 2 + 0.01147022E+07-0.01953024E+03 0.02115274E+02 0.02326332E+00-0.02109499E-03 3 + 0.09072734E-07-0.01540093E-10 0.01162738E+07 0.01097603E+03 4 +C5H 20387C 5H 1 G 0200.00 5000.00 1000.00 1 + 0.08695749E+02 0.06054301E-01-0.02016011E-04 0.02892893E-08-0.01470100E-12 2 + 0.09031069E+06-0.02101595E+03 0.01634825E+02 0.02509538E+00-0.01206636E-03 3 +-0.01046511E-06 0.08809988E-10 0.09212488E+06 0.01512194E+03 4 +C5H12 20387C 5H 12 G 0200.00 4000.00 1000.00 1 + 0.01667798E+03 0.02114483E+00-0.03533321E-04-0.05742202E-08 0.01515948E-11 2 +-0.02553670E+06-0.06372940E+03 0.01877908E+02 0.04121646E+00 0.01253234E-03 3 +-0.03701537E-06 0.01525569E-09-0.02003816E+06 0.01877257E+03 4 +C5H2 20587C 5H 2 G 0200.00 5000.00 1000.00 1 + 0.01132917E+03 0.07424057E-01-0.02628189E-04 0.04082541E-08-0.02301333E-12 2 + 0.07878706E+06-0.03617117E+03 0.03062322E+02 0.02709998E+00-0.01009170E-03 3 +-0.01272745E-06 0.09167219E-10 0.08114969E+06 0.07071078E+02 4 +C5H5 101993H 5C 5 G 0200.00 4000.00 1400.00 1 + 0.01531094E+03 0.07473806E-01-0.05837458E-05-0.04386651E-08 0.07696839E-12 2 + 0.02525890E+06-0.05951593E+03 0.01007316E+02 0.03189880E+00-0.04748189E-04 3 +-0.01102390E-06 0.04584681E-10 0.03047390E+06 0.01934168E+03 4 +C5H6 20387C 5H 6 G 0200.00 5000.00 1000.00 1 + 0.09689815E+02 0.01838262E+00-0.06264884E-04 0.09393377E-08-0.05087708E-12 2 + 0.01102124E+06-0.03122908E+03-0.03196739E+02 0.04081361E+00 0.06816505E-05 3 +-0.03137459E-06 0.01577223E-09 0.01529068E+06 0.03869939E+03 4 +C6H 121686C 6H 1 G 0200.00 5000.00 1000.00 1 + 0.01158735E+03 0.07295363E-01-0.02466008E-04 0.03407046E-08-0.01498185E-12 2 + 0.01031448E+07-0.03172578E+03 0.04769848E+02 0.02457279E+00-0.07561252E-04 3 +-0.01480691E-06 0.09768054E-10 0.01048523E+07 0.03241530E+02 4 +C6H10 20387C 6H 10 G 0200.00 5000.00 1000.00 1 + 0.01592777E+03 0.02374413E+00-0.06908672E-04 0.08109777E-08-0.02683123E-12 2 +-0.08642656E+05-0.06525186E+03-0.01394228E+02 0.04720693E+00 0.01196042E-03 3 +-0.04162896E-06 0.01740336E-09-0.02217790E+05 0.03129604E+03 4 +C6H14 20387C 6H 14 G 0200.00 4000.00 1000.00 1 + 0.02280472E+03 0.02097989E+00-0.03530674E-04-0.05466245E-08 0.01478950E-11 2 +-0.03073757E+06-0.09583162E+03 0.01836174E+02 0.05098461E+00 0.01259586E-03 3 +-0.04428362E-06 0.01872237E-09-0.02292750E+06 0.02088145E+03 4 +C6H2 121686C 6H 2 G 0200.00 5000.00 1000.00 1 + 0.01275652E+03 0.08034381E-01-0.02618215E-04 0.03725060E-08-0.01878851E-12 2 + 0.08075469E+06-0.04041263E+03 0.05751085E+02 0.02636720E+00-0.01166760E-03 3 +-0.01071450E-06 0.08790297E-10 0.08262013E+06-0.04335532E+02 4 +C6H3 20387C 6H 3 G 0200.00 5000.00 1000.00 1 + 0.01276118E+03 0.01038557E+00-0.03479193E-04 0.05109733E-08-0.02690965E-12 2 + 0.07477706E+06-0.03891745E+03 0.05007090E+02 0.02692852E+00-0.05919866E-04 3 +-0.01527233E-06 0.09408310E-10 0.07713200E+06 0.02225621E+02 4 +C6H4 111293H 4C 6 G 0200.00 4000.00 1000.00 1 + 0.01401625E+03 0.08242769E-01-0.08099664E-05-0.04654132E-08 0.08748122E-12 2 + 0.04410396E+06-0.05139376E+03 0.01520024E+02 0.02876611E+00 0.01417725E-04 3 +-0.01650589E-06 0.05873157E-10 0.04844894E+06 0.01719034E+03 4 +C6H5 82489C 6H 5 G 0200.00 4000.00 1000.00 1 + 0.01577589E+03 0.09651109E-01-0.09429416E-05-0.05469111E-08 0.01026522E-11 2 + 0.03302698E+06-0.06176280E+03 0.01143557E+01 0.03627325E+00 0.01158286E-04 3 +-0.02196965E-06 0.08463556E-10 0.03836054E+06 0.02380117E+03 4 +C6H5(L) 82489C 6H 5 G 0200.00 4000.00 1000.00 1 + 0.01721540E+03 0.08621068E-01-0.08221340E-05-0.04752164E-08 0.08844086E-12 2 + 0.06385819E+06-0.06139128E+03 0.04854269E+02 0.03031659E+00 0.01742893E-05 3 +-0.01811010E-06 0.07392511E-10 0.06798734E+06 0.05854935E+02 4 +C6H5O 82489C 6H 5O 1 G 0200.00 4000.00 1000.00 1 + 0.01822639E+03 0.01003985E+00-0.09915668E-05-0.05672804E-08 0.01068372E-11 2 +-0.02620846E+05-0.07361391E+03 0.01107497E+02 0.03956946E+00 0.08497295E-05 3 +-0.02436311E-06 0.09650660E-10 0.03159672E+05 0.01973496E+03 4 +C6H5OH 82489C 6H 6O 1 G 0200.00 4000.00 1000.00 1 + 0.01821633E+03 0.01142427E+00-0.01096684E-04-0.06427442E-08 0.01198893E-11 2 +-0.02053664E+06-0.07304234E+03 0.01391456E+02 0.03931958E+00 0.01777096E-04 3 +-0.02277673E-06 0.08309659E-10-0.01472181E+06 0.01917813E+03 4 +C6H6 20387C 6H 6 G 0200.00 5000.00 1000.00 1 + 0.01291074E+03 0.01723297E+00-0.05024211E-04 0.05893497E-08-0.01947521E-12 2 + 0.03664512E+05-0.05002699E+03-0.03138012E+02 0.04723103E+00-0.02962208E-04 3 +-0.03262819E-06 0.01718692E-09 0.08890031E+05 0.03657573E+03 4 +C6H7 82489C 6H 7 G 0200.00 4000.00 1000.00 1 + 0.01755221E+03 0.01227080E+00-0.01185742E-04-0.06959661E-08 0.01301326E-11 2 + 0.01624581E+06-0.07166589E+03 0.04639166E+01 0.03975928E+00 0.02529095E-04 3 +-0.02223792E-06 0.07557053E-10 0.02225169E+06 0.02235387E+03 4 +C8H 121686C 8H 1 G 0200.00 5000.00 1000.00 1 + 0.01474991E+03 0.09931501E-01-0.03374841E-04 0.04687593E-08-0.02073536E-12 2 + 0.01399448E+07-0.04892690E+03 0.04489508E+02 0.03521521E+00-0.01019390E-03 3 +-0.02197025E-06 0.01421416E-09 0.01425992E+07 0.03996225E+02 4 +C8H2 121686C 8H 2 G 0200.00 5000.00 1000.00 1 + 0.01568021E+03 0.01115461E+00-0.03724373E-04 0.05197891E-08-0.02375550E-12 2 + 0.01081123E+07-0.05571437E+03 0.04630427E+02 0.03937080E+00-0.01148035E-03 3 +-0.02562214E-06 0.01670791E-09 0.01108285E+07 0.08077425E+01 4 +CA 80792CA 1 G 0200.00 5000.00 1000.00 1 + 0.01636990E+02 0.01938281E-01-0.01464011E-04 0.04278257E-08-0.03581686E-12 2 + 0.02109799E+06 0.08990615E+02 0.01563120E+02 0.06228361E-01-0.01415732E-03 3 + 0.01323968E-06-0.04370569E-10 0.02092191E+06 0.08370537E+02 4 +CA(A) 81092CA 1 S 0200.00 1500.00 1000.00 1 + 0.03344424E+02-0.06129555E-04-0.02048549E-05 0.02199575E-08-0.06498067E-12 2 +-0.01020624E+05-0.01410880E+03 0.02492826E+02 0.03921280E-01-0.07242436E-04 3 + 0.05919276E-07-0.01802531E-10-0.08641901E+04-0.01010018E+03 4 +CA(B) 81092CA 1 S 0200.00 2000.00 1000.00 1 + 0.02149662E+02 0.02293734E-01 0.03948384E-05-0.01813978E-08 0.03060995E-12 2 +-0.06970589E+04-0.07862350E+02 0.02013343E+02 0.02718935E-01-0.01374494E-05 3 + 0.01528553E-08-0.06023681E-12-0.06613041E+04-0.07168449E+02 4 +CA(L) 81092CA 1 L 0200.00 3000.00 1000.00 1 + 0.03623553E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 + 0.02310016E+04-0.01455354E+03 0.03623553E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00 0.02310016E+04-0.01455354E+03 4 +CA+ 80792CA 1E -1 G 0200.00 5000.00 1000.00 1 + 0.02415423E+02 0.03140053E-02-0.03458031E-05 0.01350163E-08-0.01342160E-12 2 + 0.09252434E+06 0.05468189E+02 0.02276338E+02 0.01581988E-01-0.03878953E-04 3 + 0.03953701E-07-0.01427856E-10 0.09253536E+06 0.06008258E+02 4 +CA2 80792CA 2 G 0200.00 5000.00 1000.00 1 + 0.04174798E+02-0.07401838E-02 0.03131196E-05-0.05885577E-09 0.04296578E-13 2 + 0.04052221E+06 0.07582380E+02 0.05604867E+02-0.04044408E-01 0.02454638E-04 3 +-0.01495064E-08-0.01724184E-11 0.04008842E+06 0.01167234E+00 4 +CABR 80792BR 1CA 1 G 0200.00 5000.00 1000.00 1 + 0.04312008E+02 0.04246804E-02-0.02536360E-05 0.07082421E-09-0.05508239E-13 2 +-0.07242509E+05 0.05721414E+02 0.04004020E+02 0.01927770E-01-0.02749388E-04 3 + 0.01785012E-07-0.04190442E-11-0.07199987E+05 0.07125700E+02 4 +CABR2 80792BR 2CA 1 G 0200.00 5000.00 1000.00 1 + 0.07388434E+02 0.01393017E-02-0.06561619E-06 0.01342748E-09-0.09993272E-14 2 +-0.04852787E+06-0.04337760E+02 0.06902053E+02 0.01599316E-01-0.01154723E-04 3 +-0.02428795E-08 0.03707822E-11-0.04841873E+06-0.01900929E+02 4 +CABR2(S) 81292BR 2CA 1 S 0200.00 1500.00 1000.00 1 + 0.01076200E+03-0.02979247E-01 0.06950511E-05 0.03569778E-07-0.01382224E-10 2 +-0.08542235E+06-0.04524895E+03 0.05478536E+02 0.02209325E+00-0.04544460E-03 3 + 0.04176543E-06-0.01322726E-09-0.08447516E+06-0.02052538E+03 4 +CACL 80792CA 1CL 1 G 0200.00 5000.00 1000.00 1 + 0.04272197E+02 0.04612770E-02-0.02684554E-05 0.07233022E-09-0.05565813E-13 2 +-0.01387933E+06 0.04556153E+02 0.03810549E+02 0.02372144E-01-0.02939380E-04 3 + 0.01528166E-07-0.02396962E-11-0.01379994E+06 0.06742955E+02 4 +CACL2 80792CA 1CL 2 G 0200.00 5000.00 1000.00 1 + 0.07322969E+02 0.02201546E-02-0.01035664E-05 0.02117574E-09-0.01575201E-13 2 +-0.05893953E+06-0.06959426E+02 0.06595983E+02 0.02364235E-01-0.01611807E-04 3 +-0.04866457E-08 0.05973912E-11-0.05877467E+06-0.03308009E+02 4 +CACL2(S) 81092CA 1CL 2 S 0200.00 2000.00 1000.00 1 + 0.06749013E+02 0.03694542E-01-0.02199980E-05 0.01165549E-08-0.02193898E-12 2 +-0.09759255E+06-0.02629777E+03 0.05722155E+02 0.01836100E+00-0.03597296E-03 3 + 0.03173054E-06-0.09522563E-10-0.09798464E+06-0.02415730E+03 4 +CAF 80792CA 1F 1 G 0200.00 5000.00 1000.00 1 + 0.04150489E+02 0.05746086E-02-0.03081448E-05 0.07585468E-09-0.05641270E-13 2 +-0.03400290E+06 0.03725193E+02 0.03309446E+02 0.03419155E-01-0.03357208E-04 3 + 0.01004510E-07 0.01112627E-11-0.03382332E+06 0.07876121E+02 4 +CAF2 80792CA 1F 2 G 0200.00 5000.00 1000.00 1 + 0.06575083E+02 0.05172194E-02-0.02403804E-05 0.04876347E-09-0.03608526E-13 2 +-0.09641588E+06-0.04868362E+02 0.05023320E+02 0.04921285E-01-0.03129418E-04 3 +-0.01178313E-07 0.01260201E-10-0.09604913E+06 0.02984363E+02 4 +CAH2O2 81292CA 1H 2O 2 G 0200.00 5000.00 1000.00 1 + 0.08627170E+02 0.03353668E-01-0.01123553E-04 0.01801642E-08-0.01122696E-12 2 +-0.07617877E+06-0.01582838E+03 0.05634984E+02 0.01431225E+00-0.01160774E-03 3 + 0.02415328E-08 0.02445194E-10-0.07567777E+06-0.01510141E+02 4 +CAH2O2(S) 81292CA 1H 2O 2 S 0200.00 1000.00 1000.00 1 + 0.01418556E+03 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.01237066E+07-0.07268995E+03-0.07906910E+01 0.06795647E+00-0.01329918E-02 3 + 0.01211862E-05-0.04117456E-09-0.01204396E+07-0.07999789E+01 4 +CAI 80792CA 1I 1 G 0200.00 5000.00 1000.00 1 + 0.04316128E+02 0.04138589E-02-0.02776385E-05 0.08074141E-09-0.06592826E-13 2 +-0.01903879E+05 0.06725163E+02 0.04078205E+02 0.01812968E-01-0.02972846E-04 3 + 0.02225520E-07-0.06173497E-11-0.01881151E+05 0.07754936E+02 4 +CAI2 80792CA 1I 2 G 0200.00 5000.00 1000.00 1 + 0.07403366E+02 0.01208762E-02-0.05698306E-06 0.01167152E-09-0.08696049E-14 2 +-0.03328039E+06-0.02870204E+02 0.06975307E+02 0.01413683E-01-0.01046359E-04 3 +-0.01757655E-08 0.03111958E-11-0.03318450E+06-0.07269292E+01 4 +CAO 80792CA 1O 1 G 0200.00 5000.00 1000.00 1 + 0.08665723E+02-0.09857255E-01 0.07277137E-04-0.01813874E-07 0.01477538E-11 2 + 0.02566423E+05-0.02151985E+03 0.07277069E+02-0.02477194E+00 0.06313166E-03 3 +-0.06322423E-06 0.02200693E-09 0.03774998E+05-0.09934620E+02 4 +CAO(S) 81092CA 1O 1 S 0200.00 3600.00 1000.00 1 + 0.05184497E+02 0.01938337E-01-0.08932525E-05 0.02410689E-08-0.02389613E-12 2 +-0.07806390E+06-0.02562669E+03 0.02964466E+02 0.09464719E-01-0.07948131E-04 3 + 0.06517958E-08 0.01313902E-10-0.07762567E+06-0.01476156E+03 4 +CAOH 80792CA 1H 1O 1 G 0200.00 5000.00 1000.00 1 + 0.05164977E+02 0.01974644E-01-0.07757403E-05 0.01507385E-08-0.01048831E-12 2 +-0.02493597E+06-0.01690344E+02 0.03596803E+02 0.08182874E-01-0.07863515E-04 3 + 0.01974293E-07 0.06136755E-11-0.02469004E+06 0.05713983E+02 4 +CAOH+ 80792CA 1H 1O 1E -1G 0200.00 5000.00 1000.00 1 + 0.05293390E+02 0.01697953E-01-0.05704847E-05 0.09169199E-09-0.05724155E-13 2 + 0.04274157E+06-0.03041255E+02 0.03766022E+02 0.07251869E-01-0.05903957E-04 3 + 0.02063514E-08 0.01186538E-10 0.04300269E+06 0.04285959E+02 4 +CAS 80792CA 1S 1 G 0200.00 5000.00 1000.00 1 + 0.04077726E+02-0.02148896E-01 0.03595164E-04-0.01167272E-07 0.01101218E-11 2 + 0.01401038E+06 0.05797750E+02 0.05045918E+02-0.09248234E-01 0.03176027E-03 3 +-0.04007223E-06 0.01698112E-09 0.01355553E+06 0.08770679E+01 4 +CCL 40992C 1CL 1 G 0200.00 4000.00 1500.00 1 + 0.04306010E+02 0.01816861E-02-0.07184326E-06 0.01354479E-09-0.01002479E-13 2 + 0.05198808E+06 0.01558593E+02 0.02871441E+02 0.04709268E-01-0.05629052E-04 3 + 0.03086609E-07-0.06379756E-11 0.05237631E+06 0.08859373E+02 4 +CCL2 40992C 1CL 2 G 0200.00 4000.00 1500.00 1 + 0.06632435E+02 0.03558831E-02-0.01507592E-05 0.03116243E-09-0.02546496E-13 2 + 0.02443636E+06-0.06590137E+02 0.03329579E+02 0.01112853E+00-0.01375891E-03 3 + 0.07726329E-07-0.01624070E-10 0.02530408E+06 0.01010975E+03 4 +CCL2CCLO 40992C 2 O 1CL 3 G 0200.00 4000.00 1500.00 1 + 0.01497380E+03 0.09004180E-02-0.03714287E-05 0.05602716E-09-0.02392170E-13 2 +-0.01781718E+06-0.04510704E+03 0.05066114E+02 0.02846673E+00-0.03113001E-03 3 + 0.01605483E-06-0.03208502E-10-0.01474354E+06 0.06663101E+02 4 +CCL2CCLOH 53090C 2H 1O 1CL 3G 0200.00 5000.00 1500.00 1 + 0.01567259E+03 0.02218766E-01-0.04425239E-05 0.06261725E-10 0.03673507E-13 2 +-0.02855361E+06-0.05085224E+03 0.04602117E+02 0.03408842E+00-0.03836909E-03 3 + 0.02120271E-06-0.04527143E-10-0.02507945E+06 0.06859776E+02 4 +CCL2CH 40992H 1C 2CL 2 G 0200.00 4000.00 1500.00 1 + 0.01101223E+03 0.01364477E-01-0.03497001E-05 0.01107466E-09 0.03844298E-13 2 + 0.02706218E+06-0.02886258E+03 0.02961736E+02 0.02429423E+00-0.02731403E-03 3 + 0.01493184E-06-0.03162966E-10 0.02960233E+06 0.01317486E+03 4 +CCL2HOO 53090C 1H 1O 2CL 2G 0200.00 5000.00 1500.00 1 + 0.01273967E+03 0.01671789E-01-0.03280073E-05 0.09239024E-10 0.02183938E-13 2 +-0.05665041E+05-0.03552584E+03 0.03425417E+02 0.02745544E+00-0.02973832E-03 3 + 0.01588391E-06-0.03309428E-10-0.02675529E+05 0.01333474E+03 4 +CCL2OHCH2 53090C 2H 3O 1CL 2G 0200.00 5000.00 1500.00 1 + 0.01606355E+03 0.02856412E-01-0.05564238E-05 0.02056416E-09 0.02871365E-13 2 +-0.01756115E+06-0.05438455E+03 0.02870959E+02 0.04462273E+00-0.05377946E-03 3 + 0.03093185E-06-0.06719238E-10-0.01379636E+06 0.01305466E+03 4 +CCL2OHCHCL 53090C 2H 2O 1CL 3G 0200.00 5000.00 1500.00 1 + 0.01681474E+03 0.02433421E-01-0.04717311E-05 0.01595327E-09 0.02647197E-13 2 +-0.02217115E+06-0.05406904E+03 0.05487264E+02 0.03719540E+00-0.04391386E-03 3 + 0.02501465E-06-0.05417859E-10-0.01882134E+06 0.04237537E+02 4 +CCL3 40992C 1CL 3 G 0200.00 4000.00 1500.00 1 + 0.09375859E+02 0.05723237E-02-0.02242398E-05 0.04238666E-09-0.03174834E-13 2 + 0.05113147E+05-0.01813304E+03 0.04292822E+02 0.01682379E+00-0.02044420E-03 3 + 0.01135805E-06-0.02371493E-10 0.06477756E+05 0.07677874E+02 4 +CCL3CCLH2 53090C 2H 2CL 4 G 0200.00 5000.00 1500.00 1 + 0.01788619E+03 0.02281235E-01-0.04746598E-05 0.01962667E-09 0.02451768E-13 2 +-0.02496335E+06-0.06312883E+03 0.03463508E+02 0.04144805E+00-0.04421053E-03 3 + 0.02320525E-06-0.04772525E-10-0.02028144E+06 0.01275956E+03 4 +CCL3CCLO 40992C 2 O 1CL 4 G 0200.00 4000.00 1500.00 1 + 0.01687401E+03 0.01341876E-01-0.04555006E-05 0.07178333E-09-0.04348641E-13 2 +-0.03442278E+06-0.05295025E+03 0.06334167E+02 0.03461171E+00-0.04173791E-03 3 + 0.02324686E-06-0.04882451E-10-0.03152121E+06 0.07697654E+01 4 +CCL3CH2 53090C 2H 2CL 3 G 0200.00 5000.00 1500.00 1 + 0.01468243E+03 0.02202649E-01-0.03960690E-05 0.02319280E-10 0.03655521E-13 2 + 0.03875531E+05-0.04495230E+03 0.05008132E+02 0.03031103E+00-0.03453620E-03 3 + 0.01951049E-06-0.04245840E-10 0.06936588E+05 0.05474640E+02 4 +CCL3CHCL 53090C 2H 1CL 4 G 0200.00 5000.00 1500.00 1 + 0.01610198E+03 0.01597223E-01-0.04069892E-05 0.04158083E-09-0.01105635E-13 2 +-0.02318814E+04-0.04936573E+03 0.05761929E+02 0.03433482E+00-0.04163980E-03 3 + 0.02362341E-06-0.05054182E-10 0.02663920E+05 0.03399588E+02 4 +CCL3CHO 53090C 2H 1O 1CL 3G 0200.00 5000.00 1500.00 1 + 0.01532135E+03 0.01914228E-01-0.03622777E-05 0.05526564E-10 0.03016202E-13 2 +-0.02886499E+06-0.04774516E+03 0.05016867E+02 0.02961902E+00-0.03140321E-03 3 + 0.01666643E-06-0.03481662E-10-0.02544921E+06 0.06644422E+02 4 +CCL3OO 53090C 1O 2CL 3 G 0200.00 5000.00 1500.00 1 + 0.01473249E+03 0.08345102E-02-0.03627944E-05 0.07101159E-09-0.05165897E-13 2 +-0.05526644E+05-0.04381961E+03 0.04317420E+02 0.03486414E+00-0.04287094E-03 3 + 0.02371950E-06-0.04903871E-10-0.02855912E+05 0.08720693E+02 4 +CCL4 40992C 1CL 4 G 0200.00 4000.00 1500.00 1 + 0.01222570E+03 0.07440275E-02-0.03141658E-05 0.06499383E-09-0.05330319E-13 2 +-0.01439931E+06-0.03133566E+03 0.05107111E+02 0.02402469E+00-0.02980593E-03 3 + 0.01678331E-06-0.03535253E-10-0.01253198E+06 0.04640845E+02 4 +CCLH2OO 53090C 1H 2O 2CL 1G 0200.00 5000.00 1500.00 1 + 0.01131351E+03 0.02330645E-01-0.03546376E-05-0.02064087E-09 0.06154082E-13 2 +-0.04225590E+05-0.03183829E+03 0.01583541E+02 0.02745395E+00-0.02803155E-03 3 + 0.01491598E-06-0.03172720E-10-0.08340802E+04 0.01999023E+03 4 +CH 121286C 1H 1 G 0200.00 5000.00 1000.00 1 + 0.02196223E+02 0.02340381E-01-0.07058201E-05 0.09007582E-09-0.03855040E-13 2 + 0.07086723E+06 0.09178373E+02 0.03200202E+02 0.02072876E-01-0.05134431E-04 3 + 0.05733890E-07-0.01955533E-10 0.07045259E+06 0.03331588E+02 4 +CH+ 121286C 1H 1E -1 G 0200.00 5000.00 1000.00 1 + 0.02753358E+02 0.01552900E-01-0.05368453E-05 0.08921772E-09-0.05416801E-13 2 + 0.01948467E+07 0.04654892E+02 0.03327207E+02 0.01347051E-01-0.03895861E-04 3 + 0.05129390E-07-0.02054576E-10 0.01946452E+07 0.01408474E+02 4 +CH2 120186C 1H 2 G 0250.00 4000.00 1000.00 1 + 0.03636408E+02 0.01933057E-01-0.01687016E-05-0.01009899E-08 0.01808256E-12 2 + 0.04534134E+06 0.02156561E+02 0.03762237E+02 0.01159819E-01 0.02489585E-05 3 + 0.08800836E-08-0.07332435E-11 0.04536791E+06 0.01712578E+02 4 +CH2(S) 31287C 1H 2 G 0200.00 4000.00 1000.00 1 + 0.03552889E+02 0.02066788E-01-0.01914116E-05-0.01104673E-08 0.02021350E-12 2 + 0.04984975E+06 0.01686570E+02 0.03971265E+02-0.01699089E-02 0.01025369E-04 3 + 0.02492551E-07-0.01981266E-10 0.04989368E+06 0.05753207E+00 4 +CH2CCL 53090C 2H 2CL 1 G 0200.00 5000.00 1500.00 1 + 0.09117805E+02 0.02336015E-01-0.03466390E-05-0.03584809E-09 0.08154328E-13 2 + 0.02697366E+06-0.02251742E+03 0.01553177E+02 0.02243159E+00-0.02366950E-03 3 + 0.01323270E-06-0.02931823E-10 0.02962339E+06 0.01769303E+03 4 +CH2CCL2 53090C 2H 2CL 2 G 0200.00 5000.00 1500.00 1 + 0.01169451E+03 0.02435982E-01-0.03733045E-05-0.01419412E-09 0.05199337E-13 2 +-0.04601975E+05-0.03547415E+03 0.01527166E+02 0.02983780E+00-0.03171097E-03 3 + 0.01728380E-06-0.03709638E-10-0.01173986E+05 0.01827540E+03 4 +CH2CCLOH 53090C 2H 3O 1CL 1G 0200.00 5000.00 1500.00 1 + 0.01267601E+03 0.03201392E-01-0.04788878E-05-0.02136104E-09 0.07030796E-13 2 +-0.02402379E+06-0.04128498E+03 0.06647840E+01 0.03723168E+00-0.04115206E-03 3 + 0.02307135E-06-0.05021609E-10-0.02012318E+06 0.02165270E+03 4 +CH2CHCCH 82489C 4H 4 G 0200.00 4000.00 1000.00 1 + 0.01069777E+03 0.06982014E-01-0.06567747E-05-0.03884517E-08 0.07200946E-12 2 + 0.03034803E+06-0.03128430E+03 0.03233893E+02 0.01865634E+00 0.01270320E-04 3 +-0.09410096E-07 0.02956111E-10 0.03301097E+06 0.09922676E+02 4 +CH2CHCCH2 82489C 4H 5 G 0200.00 4000.00 1000.00 1 + 0.01199776E+03 0.07990580E-01-0.08098173E-05-0.04568733E-08 0.08636910E-12 2 + 0.03228493E+06-0.03528495E+03 0.03879443E+02 0.01997664E+00 0.01872777E-04 3 +-0.09306953E-07 0.02386116E-10 0.03526859E+06 0.09842152E+02 4 +CH2CHCH2 82489C 3H 5 G 0200.00 4000.00 1000.00 1 + 0.09651539E+02 0.08075596E-01-0.07965424E-05-0.04650696E-08 0.08603280E-12 2 + 0.01530096E+06-0.02686774E+03 0.02276486E+02 0.01985564E+00 0.01123842E-04 3 +-0.01014576E-06 0.03441342E-10 0.01789497E+06 0.01372515E+03 4 +CH2CHCHCH 82489C 4H 5 G 0200.00 4000.00 1000.00 1 + 0.01286597E+03 0.07943369E-01-0.08626466E-05-0.04655635E-08 0.08951131E-12 2 + 0.03783552E+06-0.04182502E+03 0.02995240E+02 0.02288456E+00 0.01975471E-04 3 +-0.01148245E-06 0.03197824E-10 0.04142218E+06 0.01289454E+03 4 +CH2CHCHCH2 120189C 4H 6 G 0200.00 4000.00 1000.00 1 + 0.01254437E+03 0.09596525E-01-0.09187012E-05-0.05429640E-08 0.01005364E-11 2 + 0.08597330E+05-0.04217451E+03 0.01931624E+02 0.02479030E+00 0.03018071E-04 3 +-0.01154686E-06 0.02586623E-10 0.01255468E+06 0.01701999E+03 4 +CH2CHCL 53090C 2H 3CL 1 G 0200.00 5000.00 1500.00 1 + 0.01029820E+03 0.03042926E-01-0.03881390E-05-0.04925565E-09 0.01005072E-12 2 +-0.02492899E+05-0.03108614E+03 0.01118026E+01 0.02796358E+00-0.02726559E-03 3 + 0.01463257E-06-0.03204075E-10 0.01287844E+05 0.02381617E+03 4 +CH2CL 53090C 1H 2CL 1 G 0200.00 5000.00 1500.00 1 + 0.06822515E+02 0.01659744E-01-0.02075515E-05-0.02793518E-09 0.05509087E-13 2 + 0.01080454E+06-0.01090504E+03 0.02419924E+02 0.01303317E+00-0.01356559E-03 3 + 0.07836108E-07-0.01800535E-10 0.01243112E+06 0.01269845E+03 4 +CH2CL2 112989C 1H 2CL 2 G 0200.00 5000.00 1000.00 1 + 0.05917327E+02 0.06762395E-01-0.02676163E-04 0.04856687E-08-0.03316974E-12 2 +-0.01385926E+06-0.03877739E+02 0.01423284E+02 0.02116658E+00-0.02178088E-03 3 + 0.01345873E-06-0.03811649E-10-0.01268664E+06 0.01893445E+03 4 +CH2CLCCL2 53090C 2H 2CL 3 G 0200.00 5000.00 1500.00 1 + 0.01438156E+03 0.02379635E-01-0.04167426E-05-0.02445116E-10 0.04499574E-13 2 +-0.02746720E+05-0.04351762E+03 0.03351194E+02 0.03297633E+00-0.03604139E-03 3 + 0.01977453E-06-0.04233823E-10 0.08620011E+04 0.01444760E+03 4 +CH2CLCCLO 53090C 2H 2O 1CL 2G 0200.00 5000.00 1500.00 1 + 0.01392027E+03 0.02589602E-01-0.04141892E-05-0.01643169E-09 0.06237174E-13 2 +-0.03517257E+06-0.04389503E+03 0.02705995E+02 0.03210128E+00-0.03357727E-03 3 + 0.01814310E-06-0.03890009E-10-0.03130905E+06 0.01566013E+03 4 +CH2CLCH2 53090C 2H 4CL 1 G 0200.00 5000.00 1500.00 1 + 0.01167011E+03 0.03554722E-01-0.04124241E-05-0.07276110E-09 0.01316756E-12 2 + 0.06201629E+05-0.03604549E+03 0.01635864E+02 0.02680201E+00-0.02491421E-03 3 + 0.01349235E-06-0.03046571E-10 0.01014294E+06 0.01864248E+03 4 +CH2CLCH2CL 53090C 2H 4CL 2 G 0200.00 5000.00 1500.00 1 + 0.01443143E+03 0.03836770E-01-0.05299122E-05-0.05165412E-09 0.01177636E-12 2 +-0.02296285E+06-0.05130124E+03-0.02436500E+01 0.04032574E+00-0.03956993E-03 3 + 0.02074245E-06-0.04412604E-10-0.01767830E+06 0.02741366E+03 4 +CH2CLCHCL 53090C 2H 3CL 2 G 0200.00 5000.00 1500.00 1 + 0.01295593E+03 0.03001689E-01-0.04165162E-05-0.03909055E-09 0.09041090E-13 2 + 0.09932077E+04-0.03925387E+03 0.02276185E+02 0.03011401E+00-0.03047664E-03 3 + 0.01654880E-06-0.03613198E-10 0.04836340E+05 0.01792166E+03 4 +CH2CLCHCL2 53090C 2H 3CL 3 G 0200.00 5000.00 1500.00 1 + 0.01618739E+03 0.03047681E-01-0.05011496E-05-0.01596701E-09 0.07107547E-13 2 +-0.02474417E+06-0.05695454E+03 0.01239011E+02 0.04148444E+00-0.04188654E-03 3 + 0.02163214E-06-0.04467364E-10-0.01960717E+06 0.02257856E+03 4 +CH2CLCHO 53090C 2H 3O 1CL 1G 0200.00 5000.00 1500.00 1 + 0.01227955E+03 0.03320979E-01-0.04106710E-05-0.06199826E-09 0.01190594E-12 2 +-0.02678416E+06-0.03762356E+03 0.06553003E+01 0.02959046E+00-0.02635056E-03 3 + 0.01327545E-06-0.02838288E-10-0.02227005E+06 0.02576797E+03 4 +CH2CO 121686C 2H 2O 1 G 0200.00 5000.00 1000.00 1 + 0.06038817E+02 0.05804840E-01-0.01920954E-04 0.02794485E-08-0.01458868E-12 2 +-0.08583402E+05-0.07657581E+02 0.02974971E+02 0.01211871E+00-0.02345046E-04 3 +-0.06466685E-07 0.03905649E-10-0.07632637E+05 0.08673553E+02 4 +CH2F2 82489C 1H 2F 2 G 0200.00 5000.00 1000.00 1 + 0.04730052E+02 0.07997300E-01-0.03186045E-04 0.05801160E-08-0.03967925E-12 2 +-0.05637288E+06-0.04954843E+01 0.03669434E+01 0.02168917E+00-0.02441913E-03 3 + 0.01942310E-06-0.06978343E-10-0.05510103E+06 0.02202215E+03 4 +CH2HCO 110393O 1H 3C 2 G 0200.00 5000.00 1000.00 1 + 0.05975670E+02 0.08130591E-01-0.02743624E-04 0.04070304E-08-0.02176017E-12 2 + 0.04903218E+04-0.05045251E+02 0.03409062E+02 0.01073857E+00 0.01891492E-04 3 +-0.07158583E-07 0.02867385E-10 0.01521477E+05 0.09558290E+02 4 +CH2O 121286C 1H 2O 1 G 0200.00 5000.00 1000.00 1 + 0.02995606E+02 0.06681321E-01-0.02628955E-04 0.04737153E-08-0.03212517E-12 2 +-0.01532037E+06 0.06912572E+02 0.01652731E+02 0.01263144E+00-0.01888168E-03 3 + 0.02050031E-06-0.08413237E-10-0.01486540E+06 0.01378482E+03 4 +CH2OH 120186H 3C 1O 1 G 0250.00 4000.00 1000.00 1 + 0.06327520E+02 0.03608271E-01-0.03201547E-05-0.01938750E-08 0.03509705E-12 2 +-0.04474509E+05-0.08329366E+02 0.02862628E+02 0.01001527E+00-0.05285436E-05 3 +-0.05138540E-07 0.02246041E-10-0.03349679E+05 0.01039794E+03 4 +CH2OHCCL2 53090C 2H 3O 1CL 2G 0200.00 5000.00 1500.00 1 + 0.01602181E+03 0.02846352E-01-0.04974218E-05-0.02167450E-10 0.05246046E-13 2 +-0.01829579E+06-0.05402134E+03 0.01922940E+02 0.04158207E+00-0.04427505E-03 3 + 0.02343015E-06-0.04851868E-10-0.01375512E+06 0.02001902E+03 4 +CH2OHCHCL 53090C 2H 4O 1CL 1G 0200.00 5000.00 1500.00 1 + 0.01446298E+03 0.03569514E-01-0.05419118E-05-0.02862176E-09 0.08920560E-13 2 +-0.01475559E+06-0.04942815E+03 0.03505696E+01 0.04212749E+00-0.04493839E-03 3 + 0.02448187E-06-0.05236589E-10-0.01007314E+06 0.02495261E+03 4 +CH2SICL 40992H 2C 1SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.09915966E+02 0.01896319E-01-0.03304238E-05-0.03882353E-09 0.01089169E-12 2 + 0.01906587E+06-0.02389137E+03 0.03514077E+02 0.01959495E+00-0.02147274E-03 3 + 0.01214017E-06-0.02691323E-10 0.02123280E+06 0.09882836E+02 4 +CH2SICL3 40992H 2C 1SI 1CL 3G 0200.00 4000.00 1500.00 1 + 0.01476240E+03 0.02289499E-01-0.04148337E-05-0.01526182E-09 0.07724698E-13 2 +-0.04947703E+06-0.04020475E+03 0.06718170E+02 0.02712662E+00-0.03168529E-03 3 + 0.01809641E-06-0.03938906E-10-0.04710183E+06 0.01167360E+02 4 +CH2SIH2CL 40992H 4C 1SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.01260561E+03 0.03468476E-01-0.04606434E-05-0.09748147E-09 0.02077681E-12 2 +-0.05748538E+05-0.03743183E+03 0.02426229E+02 0.03028056E+00-0.03039200E-03 3 + 0.01612599E-06-0.03425629E-10-0.02268891E+05 0.01657736E+03 4 +CH2SIHCL2 40992H 3C 1SI 1CL 2G 0200.00 4000.00 1500.00 1 + 0.01365092E+03 0.02909029E-01-0.04521180E-05-0.05274788E-09 0.01389320E-12 2 +-0.02781262E+06-0.03810353E+03 0.04180967E+02 0.03005761E+00-0.03288772E-03 3 + 0.01822025E-06-0.03925700E-10-0.02480330E+06 0.01134845E+03 4 +CH3 121286C 1H 3 G 0200.00 5000.00 1000.00 1 + 0.02844052E+02 0.06137974E-01-0.02230345E-04 0.03785161E-08-0.02452159E-12 2 + 0.01643781E+06 0.05452697E+02 0.02430443E+02 0.01112410E+00-0.01680220E-03 3 + 0.01621829E-06-0.05864953E-10 0.01642378E+06 0.06789794E+02 4 +CH3C(O)CL 53090C 2H 3O 1CL 1G 0200.00 5000.00 1500.00 1 + 0.01240568E+03 0.03210496E-01-0.03737157E-05-0.06739592E-09 0.01219122E-12 2 +-0.03432420E+06-0.03909195E+03 0.02275117E+02 0.02518533E+00-0.02152420E-03 3 + 0.01084005E-06-0.02369191E-10-0.03024376E+06 0.01657016E+03 4 +CH3CC 82489C 3H 3 G 0200.00 4000.00 1000.00 1 + 0.07640221E+02 0.05233556E-01-0.05053635E-05-0.02919772E-08 0.05445700E-12 2 + 0.05909763E+06-0.01629573E+03 0.03798751E+02 0.08749062E-01 0.02523014E-04 3 +-0.01529373E-07-0.01410562E-10 0.06077425E+06 0.05989223E+02 4 +CH3CCCH2 82489C 4H 5 G 0200.00 4000.00 1000.00 1 + 0.01156506E+03 0.08030297E-01-0.07649450E-05-0.04476534E-08 0.08313260E-12 2 + 0.03256813E+06-0.03014066E+03 0.05068450E+02 0.01571747E+00 0.02968975E-04 3 +-0.04990587E-07-0.02984224E-11 0.03518855E+06 0.06791893E+02 4 +CH3CCCH3 120189C 4H 6 G 0200.00 4000.00 1000.00 1 + 0.01133658E+03 0.01005764E+00-0.09511323E-05-0.05660497E-08 0.01049451E-11 2 + 0.01547659E+06-0.03350867E+03 0.04077105E+02 0.01703159E+00 0.04707490E-04 3 +-0.03767240E-07-0.02066963E-10 0.01859757E+06 0.08444801E+02 4 +CH3CCH2 82489C 3H 5 G 0200.00 4000.00 1000.00 1 + 0.09101018E+02 0.07964168E-01-0.07884945E-05-0.04562036E-08 0.08529212E-12 2 + 0.02670680E+06-0.02150559E+03 0.03385811E+02 0.01404534E+00 0.03204127E-04 3 +-0.03824120E-07-0.09053742E-11 0.02909066E+06 0.01126649E+03 4 +CH3CCL 53090C 2H 3CL 1 G 0200.00 5000.00 1500.00 1 + 0.01023962E+03 0.02767116E-01-0.03228853E-05-0.05752548E-09 0.01043430E-12 2 + 0.02633607E+06-0.02806184E+03 0.01687397E+02 0.02164347E+00-0.01891466E-03 3 + 0.09699015E-07-0.02134580E-10 0.02975387E+06 0.01882236E+03 4 +CH3CCL2 53090C 2H 3CL 2 G 0200.00 5000.00 1500.00 1 + 0.01300035E+03 0.02940485E-01-0.03746456E-05-0.05040644E-09 0.01006332E-12 2 +-0.04228816E+04-0.03979863E+03 0.03213473E+02 0.02587378E+00-0.02419993E-03 3 + 0.01273817E-06-0.02788481E-10 0.03325663E+05 0.01333320E+03 4 +CH3CCL3 53090C 2H 3CL 3 G 0200.00 5000.00 1500.00 1 + 0.01637160E+03 0.02935021E-01-0.04836108E-05-0.01454723E-09 0.06731691E-13 2 +-0.02378095E+06-0.05941864E+03 0.02484363E+02 0.03909474E+00-0.04013637E-03 3 + 0.02110179E-06-0.04418213E-10-0.01902540E+06 0.01435603E+03 4 +CH3CCLO 53090C 2H 3O 1CL 1G 0200.00 5000.00 1500.00 1 + 0.01240595E+03 0.03210266E-01-0.03736397E-05-0.06740236E-09 0.01219081E-12 2 +-0.03432283E+06-0.03909605E+03 0.02277402E+02 0.02517912E+00-0.02151632E-03 3 + 0.01083524E-06-0.02368079E-10-0.03024308E+06 0.01655556E+03 4 +CH3CH2CCH 120189C 4H 6 G 0200.00 4000.00 1000.00 1 + 0.01200695E+03 0.09576069E-01-0.08995018E-05-0.05369808E-08 0.09934174E-12 2 + 0.01729420E+06-0.03802692E+03 0.03726043E+02 0.02053493E+00 0.03021439E-04 3 +-0.08131813E-07 0.01095280E-10 0.02048821E+06 0.08538826E+02 4 +CH3CH2CH2C 62090C 4H 10 G 0200.00 4000.00 1500.00 1 + 0.02032597E+03 0.01025189E+00-0.09348665E-05-0.04706743E-08 0.08327283E-12 2 +-0.02590868E+06-0.08998431E+03-0.02544545E+02 0.05770712E+00-0.04104933E-03 3 + 0.01684742E-06-0.03176653E-10-0.01682847E+06 0.03586176E+03 4 +CH3CH2CL 53090C 2H 5CL 1 G 0200.00 5000.00 1500.00 1 + 0.01301118E+03 0.04448941E-01-0.05200473E-05-0.09119710E-09 0.01658842E-12 2 +-0.02013503E+06-0.04677847E+03-0.06981899E+01 0.03567705E+00-0.03230260E-03 3 + 0.01689622E-06-0.03727523E-10-0.01476054E+06 0.02802219E+03 4 +CH3CH2O 103190C 2H 5O 1 G 0200.00 4000.00 1500.00 1 + 0.01187115E+03 0.05390415E-01-0.04990159E-05-0.02399585E-08 0.04255456E-12 2 +-0.05950457E+05-0.03996585E+03 0.06904570E+01 0.02951398E+00-0.02245116E-03 3 + 0.01011600E-06-0.02044101E-10-0.01559918E+05 0.02130230E+03 4 +CH3CHCH 82489C 3H 5 G 0200.00 4000.00 1000.00 1 + 0.09209764E+02 0.07871413E-01-0.07724523E-05-0.04497357E-08 0.08377272E-12 2 + 0.02853967E+06-0.02232370E+03 0.03161863E+02 0.01518100E+00 0.02722659E-04 3 +-0.05177112E-07 0.05435286E-12 0.03095548E+06 0.01197973E+03 4 +CH3CHCL 53090C 2H 4CL 1 G 0200.00 5000.00 1500.00 1 + 0.01166291E+03 0.03539284E-01-0.03858423E-05-0.08186871E-09 0.01407549E-12 2 + 0.03696642E+05-0.03616108E+03 0.01903574E+02 0.02438193E+00-0.02062779E-03 3 + 0.01068382E-06-0.02414461E-10 0.07722870E+05 0.01768152E+03 4 +CH3CHCL2 53090C 2H 4CL 2 G 0200.00 5000.00 1500.00 1 + 0.01454311E+03 0.03772378E-01-0.05189301E-05-0.05141063E-09 0.01163076E-12 2 +-0.02277045E+06-0.05147426E+03 0.04510764E+01 0.03884901E+00-0.03832912E-03 3 + 0.02029502E-06-0.04357591E-10-0.01767234E+06 0.02414546E+03 4 +CH3CHOH 103190C 2H 5O 1 G 0200.00 4000.00 1500.00 1 + 0.01161148E+03 0.05173117E-01-0.04856685E-05-0.02202895E-08 0.03913721E-12 2 +-0.01248811E+06-0.03688213E+03 0.01415940E+02 0.02870648E+00-0.02373820E-03 3 + 0.01148886E-06-0.02391420E-10-0.08638718E+05 0.01844256E+03 4 +CH3CL 112989C 1H 3CL 1 G 0200.00 5000.00 1000.00 1 + 0.03633876E+02 0.08664625E-01-0.03343871E-04 0.05950130E-08-0.04001401E-12 2 +-0.01177659E+06 0.04430651E+02 0.04621901E+01 0.02068247E+00-0.02553133E-03 3 + 0.02160311E-06-0.07706816E-10-0.01093667E+06 0.02032977E+03 4 +CH3CO 120186C 2H 3O 1 G 0200.00 5000.00 1000.00 1 + 0.05612279E+02 0.08449886E-01-0.02854147E-04 0.04238376E-08-0.02268404E-12 2 +-0.05187863E+05-0.03274949E+02 0.03125278E+02 0.09778220E-01 0.04521448E-04 3 +-0.09009462E-07 0.03193718E-10-0.04108508E+05 0.01122885E+03 4 +CH3F 82489C 1H 3F 1 G 0200.00 5000.00 1000.00 1 + 0.03014978E+02 0.09314397E-01-0.03611697E-04 0.06443728E-08-0.04339594E-12 2 +-0.02977838E+06 0.06323815E+02 0.02600911E+01 0.02000788E+00-0.02662585E-03 3 + 0.02561177E-06-0.09935237E-10-0.02896233E+06 0.02031799E+03 4 +CH3HCO 120186C 2O 1H 4 G 0200.00 5000.00 1000.00 1 + 0.05868650E+02 0.01079424E+00-0.03645530E-04 0.05412912E-08-0.02896844E-12 2 +-0.02264569E+06-0.06012946E+02 0.02505695E+02 0.01336991E+00 0.04671953E-04 3 +-0.01128140E-06 0.04263566E-10-0.02124589E+06 0.01335089E+03 4 +CH3NO 103190C 1H 3N 1O 1G 0200.00 4000.00 1500.00 1 + 0.08820547E+02 0.03706233E-01-0.02894741E-05-0.01897910E-08 0.03237544E-12 2 + 0.05362862E+05-0.02213220E+03 0.02109955E+02 0.01517822E+00-0.07071789E-04 3 + 0.01510611E-07-0.01604204E-11 0.08293612E+05 0.01569702E+03 4 +CH3NO2 103190C 1H 3N 1O 2G 0200.00 4000.00 1500.00 1 + 0.01090158E+03 0.04326381E-01-0.04203548E-05-0.01893071E-08 0.03417444E-12 2 +-0.01370862E+06-0.03073183E+03 0.03224717E+01 0.02665147E+00-0.01930574E-03 3 + 0.07762620E-07-0.01398746E-10-0.09597527E+05 0.02726156E+03 4 +CH3O 121686C 1H 3O 1 G 0200.00 3000.00 1000.00 1 + 0.03770800E+02 0.07871497E-01-0.02656384E-04 0.03944431E-08-0.02112616E-12 2 + 0.01278325E+04 0.02929575E+02 0.02106204E+02 0.07216595E-01 0.05338472E-04 3 +-0.07377636E-07 0.02075611E-10 0.09786011E+04 0.01315218E+03 4 +CH3OCH3 103190C 2H 6O 1 G 0200.00 4000.00 1500.00 1 + 0.01228100E+03 0.06711031E-01-0.04726871E-05-0.03636409E-08 0.06084545E-12 2 +-0.02839743E+06-0.04434692E+03 0.01245246E+02 0.02381198E+00-0.08266949E-04 3 + 0.03068452E-08 0.01909248E-11-0.02335996E+06 0.01855817E+03 4 +CH3OCL 53090C 1H 3O 1CL 1G 0200.00 5000.00 1500.00 1 + 0.01022518E+03 0.02780047E-01-0.03331582E-05-0.05437858E-09 0.01012799E-12 2 +-0.01172886E+06-0.02912014E+03 0.01575392E+02 0.02255642E+00-0.02052644E-03 3 + 0.01075312E-06-0.02371140E-10-0.08346834E+05 0.01804593E+03 4 +CH3OH 121686C 1H 4O 1 G 0200.00 5000.00 1000.00 1 + 0.04029061E+02 0.09376593E-01-0.03050254E-04 0.04358793E-08-0.02224723E-12 2 +-0.02615791E+06 0.02378196E+02 0.02660115E+02 0.07341508E-01 0.07170051E-04 3 +-0.08793194E-07 0.02390570E-10-0.02535348E+06 0.01123263E+03 4 +CH3ONO 103190C 1H 3N 1O 2G 0200.00 4000.00 1500.00 1 + 0.01136129E+03 0.04159349E-01-0.04145670E-05-0.01695140E-08 0.03028732E-12 2 +-0.01281482E+06-0.03545435E+03 0.01490345E+02 0.02645433E+00-0.02112332E-03 3 + 0.09414399E-07-0.01811205E-10-0.09125782E+05 0.01813766E+03 4 +CH3ONO2 103190C 1H 3N 1O 3G 0200.00 4000.00 1500.00 1 + 0.01436189E+03 0.04112243E-01-0.05113052E-05-0.01496436E-08 0.03012156E-12 2 +-0.01972440E+06-0.05131842E+03 0.07803354E+01 0.03454204E+00-0.02822328E-03 3 + 0.01232324E-06-0.02302164E-10-0.01465346E+06 0.02245752E+03 4 +CH3SICL 10891C 1H 3CL 1SI 1G 0200.00 4000.00 1500.00 1 + 0.01001981E+03 0.03098227E-01-0.03223524E-05-0.01222654E-08 0.02254960E-12 2 +-0.05427416E+05-0.02357211E+03 0.03485139E+02 0.01833182E+00-0.01573128E-03 3 + 0.07856310E-07-0.01670946E-10-0.02954042E+05 0.01186948E+03 4 +CH3SIH2SIH 10891C 2H 10SI 2 G 0200.00 4000.00 1500.00 1 + 0.02302241E+03 0.08819047E-01-0.08859755E-05-0.03700889E-08 0.06746256E-12 2 +-0.01577058E+06-0.09458104E+03 0.02492915E+02 0.05396367E+00-0.04281663E-03 3 + 0.01967585E-06-0.03981630E-10-0.07813141E+05 0.01758364E+03 4 +CH3SIH2SIH2CH3 61991H 10C 2SI 2 G 0200.00 2500.00 1500.00 1 + 0.01948332E+03 0.01195163E+00-0.02653155E-05-0.01489522E-07 0.03049901E-11 2 +-0.01405639E+06-0.07368209E+03 0.03129493E+02 0.05016930E+00-0.03522061E-03 3 + 0.01354295E-06-0.02274339E-10-0.08303932E+05 0.01426819E+03 4 +CH3SIHCL2 10891C 1CL 2H 4SI 1G 0200.00 4000.00 1500.00 1 + 0.01459367E+03 0.04005638E-01-0.04816391E-05-0.01336359E-08 0.02648177E-12 2 +-0.05325682E+06-0.04689839E+03 0.04156949E+02 0.02994072E+00-0.02797859E-03 3 + 0.01431829E-06-0.03010165E-10-0.04952345E+06 0.09043929E+02 4 +CH4 121286C 1H 4 G 0200.00 5000.00 1000.00 1 + 0.01683479E+02 0.01023724E+00-0.03875129E-04 0.06785585E-08-0.04503423E-12 2 +-0.01008079E+06 0.09623395E+02 0.07787415E+01 0.01747668E+00-0.02783409E-03 3 + 0.03049708E-06-0.01223931E-09-0.09825229E+05 0.01372219E+03 4 +CHCL 112989C 1H 1CL 1 G 0200.00 5000.00 1200.00 1 + 0.03216518E+02 0.05976969E-01-0.02918238E-04 0.05912801E-08-0.04297945E-12 2 + 0.03879839E+06 0.07793842E+02 0.02781263E+02 0.07805384E-01-0.01063711E-03 3 + 0.01065441E-06-0.03916797E-10 0.03916144E+06 0.01045515E+03 4 +CHCL2 40992H 1C 1CL 2 G 0200.00 4000.00 1500.00 1 + 0.06912875E+02 0.01251733E-01-0.01973086E-05-0.02153722E-09 0.05853635E-13 2 + 0.07229632E+05-0.07968135E+02 0.02809820E+02 0.01295936E+00-0.01392392E-03 3 + 0.07533319E-07-0.01588448E-10 0.08515305E+05 0.01343798E+03 4 +CHCL2CCL2 40992H 1C 2CL 4 G 0200.00 4000.00 1500.00 1 + 0.01530640E+03 0.02140772E-01-0.04619954E-05 0.08299157E-10 0.05236928E-13 2 +-0.01524306E+05-0.04358303E+03 0.04207169E+02 0.03437580E+00-0.03802411E-03 3 + 0.02026572E-06-0.04164115E-10 0.01811422E+05 0.01398021E+03 4 +CHCL2CCLO 40992H 1C 2 O 1CL 3G 0200.00 4000.00 1500.00 1 + 0.01488775E+03 0.02323698E-01-0.04365744E-05-0.01680889E-09 0.08613253E-13 2 +-0.03483792E+06-0.04504932E+03 0.04593886E+02 0.03118954E+00-0.03338775E-03 3 + 0.01763042E-06-0.03630728E-10-0.03160866E+06 0.08756166E+02 4 +CHCL2CH2 53090C 2H 3CL 2 G 0200.00 5000.00 1500.00 1 + 0.01306632E+03 0.02964322E-01-0.04303601E-05-0.03173131E-09 0.08244908E-13 2 + 0.04594697E+05-0.03814765E+03 0.02234889E+02 0.03152885E+00-0.03307990E-03 3 + 0.01825221E-06-0.03994163E-10 0.08375531E+05 0.01944506E+03 4 +CHCL2CHCL 53090C 2H 2CL 3 G 0200.00 5000.00 1500.00 1 + 0.01445051E+03 0.02336553E-01-0.04132107E-05-0.05243785E-11 0.04204775E-13 2 +-0.05183250E+04-0.04362699E+03 0.03789098E+02 0.03243338E+00-0.03598339E-03 3 + 0.01993302E-06-0.04287482E-10 0.02920910E+05 0.01221991E+03 4 +CHCL2CHCL2 53090C 2H 2CL 4 G 0200.00 5000.00 1500.00 1 + 0.01745859E+03 0.02484178E-01-0.05127803E-05 0.02266909E-09 0.02371932E-13 2 +-0.02510699E+06-0.06065213E+03 0.02711746E+02 0.04441279E+00-0.04905962E-03 3 + 0.02632472E-06-0.05466293E-10-0.02052421E+06 0.01624857E+03 4 +CHCL3 40992H 1C 1CL 3 G 0200.00 4000.00 1500.00 1 + 0.01034980E+03 0.01690302E-01-0.03209168E-05-0.09502160E-10 0.05845725E-13 2 +-0.01567029E+06-0.02558805E+03 0.02905633E+02 0.02315061E+00-0.02534675E-03 3 + 0.01356724E-06-0.02810882E-10-0.01339798E+06 0.01310749E+03 4 +CHCLCCL 40992H 1C 2CL 2 G 0200.00 4000.00 1500.00 1 + 0.01027647E+03 0.01733039E-01-0.03161161E-05-0.08153494E-10 0.05443014E-13 2 + 0.02418877E+06-0.02436862E+03 0.02625129E+02 0.02366908E+00-0.02583240E-03 3 + 0.01383374E-06-0.02870111E-10 0.02654214E+06 0.01545629E+03 4 +CHCLCCLOH 53090C 2H 2O 1CL 2G 0200.00 5000.00 1500.00 1 + 0.01412206E+03 0.02583764E-01-0.04576900E-05 0.05215675E-10 0.03521300E-13 2 +-0.02752482E+06-0.04544297E+03 0.02020547E+02 0.03810981E+00-0.04280147E-03 3 + 0.02343806E-06-0.04934735E-10-0.02385982E+06 0.01729375E+03 4 +CHCLCH 53090C 2H 2CL 1 G 0200.00 5000.00 1500.00 1 + 0.09924881E+02 0.01618108E-01-0.02995768E-05-0.09718417E-11 0.03296695E-13 2 + 0.02834312E+06-0.02704593E+03 0.01190122E+02 0.02432800E+00-0.02555965E-03 3 + 0.01375158E-06-0.02941848E-10 0.03138157E+06 0.01944186E+03 4 +CHCLCHCL 53090C 2H 2CL 2 G 0200.00 5000.00 1500.00 1 + 0.01163648E+03 0.02461981E-01-0.03900520E-05-0.01521677E-09 0.05853766E-13 2 +-0.05593248E+05-0.03507354E+03 0.01054340E+02 0.03076645E+00-0.03252549E-03 3 + 0.01763454E-06-0.03774444E-10-0.02006846E+05 0.02094011E+03 4 +CHCLCHOH 53090C 2H 3O 1CL 1G 0200.00 5000.00 1500.00 1 + 0.01285464E+03 0.03107712E-01-0.04837735E-05-0.02088657E-09 0.07393125E-13 2 +-0.02505588E+06-0.04274804E+03-0.02073397E+01 0.03868022E+00-0.04104567E-03 3 + 0.02211252E-06-0.04680556E-10-0.02074261E+06 0.02608356E+03 4 +CHCLOH 53090C 1H 2O 1CL 1G 0200.00 5000.00 1500.00 1 + 0.09427376E+02 0.01722643E-01-0.02912707E-05-0.03765845E-10 0.03354461E-13 2 +-0.01224575E+06-0.02330123E+03 0.01319372E+02 0.02406119E+00-0.02560105E-03 3 + 0.01356738E-06-0.02812530E-10-0.09640457E+05 0.01925640E+03 4 +CHCLOHCH2 53090C 2H 4O 1CL 1G 0200.00 5000.00 1500.00 1 + 0.01438435E+03 0.03552541E-01-0.05033147E-05-0.04051247E-09 0.01001172E-12 2 +-0.01383899E+06-0.04819745E+03 0.01473757E+02 0.03764188E+00-0.03898776E-03 3 + 0.02112109E-06-0.04543830E-10-0.09395106E+05 0.02033823E+03 4 +CHCLOHCHCL 53090C 2H 3O 1CL 2G 0200.00 5000.00 1500.00 1 + 0.01567240E+03 0.02970040E-01-0.04827588E-05-0.01366600E-09 0.06500296E-13 2 +-0.01896002E+06-0.05132923E+03 0.02626025E+02 0.03856175E+00-0.04091474E-03 3 + 0.02190241E-06-0.04603080E-10-0.01468188E+06 0.01735864E+03 4 +CHF 82489C 1H 1F 1 G 0200.00 5000.00 1000.00 1 + 0.04242812E+02 0.02066316E-01-0.06527951E-05 0.01388700E-08-0.01213336E-12 2 + 0.01355982E+06 0.01680197E+02 0.03029061E+02 0.04850873E-01-0.04971679E-04 3 + 0.05277968E-07-0.02403154E-10 0.01401435E+06 0.08324101E+02 4 +CHF3 82489C 1H 1F 3 G 0200.00 5000.00 1000.00 1 + 0.06834333E+02 0.06248731E-01-0.02575750E-04 0.04809112E-08-0.03352074E-12 2 +-0.08663771E+06-0.01062741E+03 0.08725142E+01 0.02308432E+00-0.02123718E-03 3 + 0.01114428E-06-0.02909229E-10-0.08496391E+06 0.02021499E+03 4 +CHOHCLCCL2 53090C 2H 2O 1CL 3G 0200.00 5000.00 1500.00 1 + 0.01681824E+03 0.02450153E-01-0.04706624E-05 0.01313263E-09 0.03046283E-13 2 +-0.02253368E+06-0.05396958E+03 0.04216444E+02 0.03898554E+00-0.04360467E-03 3 + 0.02374677E-06-0.04984764E-10-0.01867017E+06 0.01152520E+03 4 +CHSICL 40992H 1C 1SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.08205361E+02 0.01092172E-01-0.02021812E-05-0.04611367E-10 0.03306854E-13 2 + 0.04201323E+06-0.01240589E+03 0.04575767E+02 0.01266147E+00-0.01507699E-03 3 + 0.08704482E-07-0.01902710E-10 0.04304864E+06 0.06132926E+02 4 +CHSICL2 40992H 1C 1SI 1CL 2G 0200.00 4000.00 1500.00 1 + 0.01071823E+03 0.01148355E-01-0.02625783E-05 0.01567972E-09 0.01085455E-13 2 + 0.01124882E+06-0.02053734E+03 0.05945817E+02 0.01709681E+00-0.02135360E-03 3 + 0.01252863E-06-0.02749860E-10 0.01253413E+06 0.03573691E+02 4 +CHSICL3 40992H 1C 1SI 1CL 3G 0200.00 4000.00 1500.00 1 + 0.01359698E+03 0.01283679E-01-0.03320724E-05 0.03292615E-09-0.05463635E-14 2 +-0.02236189E+06-0.03349768E+03 0.07368467E+02 0.02227384E+00-0.02809218E-03 3 + 0.01644147E-06-0.03590729E-10-0.02071740E+06-0.02118077E+02 4 +CHSIH2CL 40992H 3C 1SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.01142815E+03 0.02475732E-01-0.03864817E-05-0.04667547E-09 0.01222497E-12 2 + 0.02085332E+06-0.03033129E+03 0.02869509E+02 0.02622702E+00-0.02794178E-03 3 + 0.01516891E-06-0.03231519E-10 0.02364000E+06 0.01462055E+03 4 +CHSIHCL 40992H 2C 1SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.09716450E+02 0.01691882E-01-0.02846288E-05-0.02130090E-09 0.06948758E-13 2 + 0.03056780E+06-0.02079822E+03 0.04045980E+02 0.01850072E+00-0.02095734E-03 3 + 0.01185107E-06-0.02580401E-10 0.03232392E+06 0.08632908E+02 4 +CHSIHCL2 40992H 2C 1SI 1CL 2G 0200.00 4000.00 1500.00 1 + 0.01246646E+03 0.01911555E-01-0.03687550E-05-0.05466318E-10 0.05749803E-13 2 +-0.09679288E+04-0.03163481E+03 0.04853917E+02 0.02509790E+00-0.02916486E-03 3 + 0.01649649E-06-0.03563598E-10 0.01297543E+05 0.07606296E+02 4 +CL 42189CL 1 G 0200.00 5000.00 1000.00 1 + 0.02920237E+02-0.03597985E-02 0.01294294E-05-0.02162776E-09 0.01376517E-13 2 + 0.01371338E+06 0.03262690E+02 0.02381577E+02 0.08891079E-02 0.04070476E-05 3 +-0.02168943E-07 0.01160827E-10 0.01383999E+06 0.06021818E+02 4 +CL(CH3)SICH2 40992H 5C 2SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.01496923E+03 0.05605854E-01-0.06191278E-05-0.02134591E-08 0.03977673E-12 2 +-0.01304066E+06-0.05036296E+03 0.02980753E+02 0.03627511E+00-0.03428566E-03 3 + 0.01799146E-06-0.03853029E-10-0.08814405E+05 0.01362870E+03 4 +CL2 42189CL 2 G 0200.00 5000.00 1000.00 1 + 0.04274587E+02 0.03717337E-02-0.01893490E-05 0.05337465E-09-0.05057602E-13 2 +-0.01331149E+05 0.02256947E+02 0.03439587E+02 0.02870774E-01-0.02385871E-04 3 + 0.02892918E-08 0.02915057E-11-0.01131787E+05 0.06471359E+02 4 +CL2CCCL2 40992C 2CL 4 G 0200.00 4000.00 1500.00 1 + 0.01440000E+03 0.01269397E-01-0.03525286E-05 0.04493620E-09-0.02348053E-13 2 +-0.08039017E+05-0.04321878E+03 0.05557831E+02 0.02778255E+00-0.03176769E-03 3 + 0.01706054E-06-0.03492940E-10-0.05495042E+05 0.02293508E+02 4 +CL2CCHCL 40992H 1C 2CL 3 G 0200.00 4000.00 1500.00 1 + 0.01278204E+03 0.02068630E-01-0.03764411E-05-0.09077792E-10 0.06116574E-13 2 +-0.06934337E+05-0.03655991E+03 0.03457684E+02 0.02848717E+00-0.03070062E-03 3 + 0.01624951E-06-0.03341401E-10-0.04047205E+05 0.01206381E+03 4 +CL2CCHO 40992H 1C 2 O 1CL 2G 0200.00 4000.00 1500.00 1 + 0.01294627E+03 0.02168144E-01-0.04244587E-05-0.03590986E-09 0.01220303E-12 2 +-0.01144361E+06-0.03783814E+03 0.03400952E+02 0.02760695E+00-0.02843245E-03 3 + 0.01470263E-06-0.03017427E-10-0.08287517E+05 0.01257321E+03 4 +CL2CHOH 53090C 1H 2O 1CL 2G 0200.00 5000.00 1500.00 1 + 0.01129114E+03 0.02286704E-01-0.03461513E-05-0.01814480E-09 0.05661342E-13 2 +-0.03803060E+06-0.03079831E+03 0.02619078E+02 0.02601286E+00-0.02784252E-03 3 + 0.01528682E-06-0.03294008E-10-0.03513998E+06 0.01492462E+03 4 +CL2CO 40992C 1 O 1CL 2 G 0200.00 4000.00 1500.00 1 + 0.08764773E+02 0.08919938E-02-0.02237590E-05 0.01486621E-09 0.09630870E-14 2 +-0.02973390E+06-0.01732025E+03 0.03460242E+02 0.01632331E+00-0.01828304E-03 3 + 0.09805656E-07-0.02024319E-10-0.02813622E+06 0.01019127E+03 4 +CL2COH 53090C 1O 1H 1CL 2G 0200.00 5000.00 1500.00 1 + 0.01026215E+03 0.01316796E-01-0.02754008E-05 0.01630771E-09 0.06472563E-14 2 +-0.01511655E+06-0.02298315E+03 0.03800719E+02 0.02204678E+00-0.02673857E-03 3 + 0.01531854E-06-0.03305323E-10-0.01332053E+06 0.09915879E+02 4 +CL2HCO 53090C 1H 1O 1CL 2G 0200.00 5000.00 1500.00 1 + 0.01051838E+03 0.01499316E-01-0.02927670E-05 0.07898750E-10 0.01988433E-13 2 +-0.06272394E+05-0.02634097E+03 0.02241202E+02 0.02456990E+00-0.02682371E-03 3 + 0.01443170E-06-0.03023080E-10-0.03624526E+05 0.01703508E+03 4 +CL2SI(CH3)2 40992H 6C 2SI 1CL 2G 0200.00 4000.00 1500.00 1 + 0.01890988E+03 0.06245385E-01-0.06370532E-05-0.02508388E-08 0.04589637E-12 2 +-0.06523166E+06-0.06829627E+03 0.05958770E+02 0.03632045E+00-0.03098078E-03 3 + 0.01545683E-06-0.03292671E-10-0.06031232E+06 0.01996401E+02 4 +CL2SI(CH3)CH2 40992H 5C 2SI 1CL 2G 0200.00 4000.00 1500.00 1 + 0.01795078E+03 0.05155757E-01-0.06049094E-05-0.01717793E-08 0.03355529E-12 2 +-0.03961749E+06-0.05949218E+03 0.05993815E+02 0.03621806E+00-0.03546358E-03 3 + 0.01906128E-06-0.04137511E-10-0.03541814E+06 0.04216162E+02 4 +CL2SICH2 40992H 2C 1SI 1CL 2G 0200.00 4000.00 1500.00 1 + 0.01186709E+03 0.02689241E-01-0.04231139E-05-0.05555102E-09 0.01367174E-12 2 +-0.02169965E+06-0.03225026E+03 0.04111900E+02 0.02637445E+00-0.02985130E-03 3 + 0.01679309E-06-0.03625511E-10-0.01940307E+06 0.07695176E+02 4 +CL2SICH3 40992H 3C 1SI 1CL 2G 0200.00 4000.00 1500.00 1 + 0.01285090E+03 0.03239360E-01-0.03774509E-05-0.01111777E-08 0.02163712E-12 2 +-0.03164727E+06-0.03531424E+03 0.05273286E+02 0.02205797E+00-0.02049425E-03 3 + 0.01060061E-06-0.02257829E-10-0.02891555E+06 0.05340218E+02 4 +CL2SISI 40992SI 2CL 2 G 0200.00 4000.00 1500.00 1 + 0.09706403E+02 0.03323652E-02-0.01679851E-05 0.04061274E-09-0.03746093E-13 2 + 0.01334060E+06-0.01565614E+03 0.06576632E+02 0.01105568E+00-0.01422816E-03 3 + 0.08199114E-07-0.01752833E-10 0.01412004E+06 0.06538601E-02 4 +CL2SISICL 40992SI 2CL 3 G 0200.00 4000.00 1500.00 1 + 0.01304318E+03-0.01847658E-03-0.02187635E-05 0.08817012E-09-0.01004063E-12 2 +-0.01640770E+06-0.02832289E+03 0.08389457E+02 0.01629172E+00-0.02138192E-03 3 + 0.01207431E-06-0.02508349E-10-0.01534318E+06-0.05268396E+02 4 +CL2SISICL2 40992SI 2CL 4 G 0200.00 4000.00 1500.00 1 + 0.01620538E+03 0.08400587E-04-0.02457560E-05 0.08992196E-09-0.09639101E-13 2 +-0.05343016E+06-0.04193027E+03 0.01077595E+03 0.01717615E+00-0.02131386E-03 3 + 0.01172528E-06-0.02417202E-10-0.05196762E+06-0.01431634E+03 4 +CL3CCO 81092C 2O 1CL 3 G 0200.00 5000.00 1400.00 1 + 0.01383246E+03 0.01240141E-01-0.03510210E-05 0.04103960E-09-0.01475220E-13 2 + 0.07499342E+07-0.03691505E+03 0.05016825E+02 0.02899350E+00-0.03563990E-03 3 + 0.02082488E-06-0.04661957E-10 0.07524076E+07 0.08141487E+02 4 +CL3CO 53090C 1O 1CL 3 G 0200.00 5000.00 1500.00 1 + 0.01208526E+03 0.07759038E-02-0.02700075E-05 0.04346263E-09-0.02671642E-13 2 +-0.06464079E+05-0.03099432E+03 0.04548646E+02 0.02463303E+00-0.02974898E-03 3 + 0.01647154E-06-0.03433021E-10-0.04416522E+05 0.07360693E+02 4 +CL3COH 53090C 1O 1H 1CL 3G 0200.00 5000.00 1500.00 1 + 0.01285985E+03 0.01588083E-01-0.03377500E-05 0.02031362E-09 0.08017922E-14 2 +-0.03807818E+06-0.03561945E+03 0.04269172E+02 0.02791723E+00-0.03272753E-03 3 + 0.01828272E-06-0.03882978E-10-0.03558880E+06 0.08521096E+02 4 +CL3SICH3 40992H 3C 1SI 1CL 3G 0200.00 4000.00 1500.00 1 + 0.01572988E+03 0.03373817E-01-0.04472970E-05-0.09359551E-09 0.01995442E-12 2 +-0.07539927E+06-0.05017697E+03 0.06708039E+02 0.02724465E+00-0.02730290E-03 3 + 0.01457864E-06-0.03116460E-10-0.07231476E+06-0.02328694E+02 4 +CL3SISI 40992SI 2CL 3 G 0200.00 4000.00 1500.00 1 + 0.01263015E+03 0.04310339E-02-0.02248369E-05 0.05573034E-09-0.05229996E-13 2 +-0.01723335E+06-0.02767933E+03 0.08429942E+02 0.01496243E+00-0.01942087E-03 3 + 0.01125326E-06-0.02414611E-10-0.01619796E+06-0.06711706E+02 4 +CL3SISICL 40992SI 2CL 4 G 0200.00 4000.00 1500.00 1 + 0.01503498E+03 0.05376136E-02-0.02788507E-05 0.06889626E-09-0.06454867E-13 2 +-0.05496076E+06-0.03460735E+03 0.09721335E+02 0.01889709E+00-0.02451039E-03 3 + 0.01419597E-06-0.03045164E-10-0.05364875E+06-0.08073287E+02 4 +CLCCCL 40992C 2CL 2 G 0200.00 4000.00 1500.00 1 + 0.09105373E+02 0.09281996E-02-0.01948371E-05 0.01590377E-10 0.02472937E-13 2 + 0.02507216E+06-0.02072870E+03 0.05118707E+02 0.01243668E+00-0.01386540E-03 3 + 0.07609302E-07-0.01615959E-10 0.02631398E+06 0.03298777E+00 4 +CLCCO 53090C 2O 1CL 1 G 0200.00 5000.00 1500.00 1 + 0.09368609E+02 0.03733935E-02-0.01286981E-05 0.01206469E-09 0.09220283E-15 2 + 0.01762808E+06-0.02046752E+03 0.04417443E+02 0.01129365E+00-0.01013488E-03 3 + 0.04661357E-07-0.09098661E-11 0.01952423E+06 0.06539246E+02 4 +CLCH2OH 53090C 1H 3O 1CL 1G 0200.00 5000.00 1500.00 1 + 0.09750194E+02 0.02974385E-01-0.03450482E-05-0.06010047E-09 0.01089784E-12 2 +-0.03248678E+06-0.02345467E+03 0.08330910E+01 0.02358999E+00-0.02137297E-03 3 + 0.01105808E-06-0.02402402E-10-0.02905351E+06 0.02503745E+03 4 +CLCO 40992C 1 O 1CL 1 G 0200.00 4000.00 1500.00 1 + 0.06134827E+02 0.05369294E-02-0.07583742E-06-0.01514557E-09 0.03376080E-13 2 +-0.05363338E+05-0.03198172E+02 0.04790425E+02 0.03165209E-01-0.02098201E-04 3 + 0.07703306E-08-0.01346351E-11-0.04812905E+05 0.04257480E+02 4 +CLCOH 53090C 1H 1O 1CL 1G 0200.00 5000.00 1500.00 1 + 0.07642908E+02 0.01507814E-01-0.02651581E-05-0.01466785E-09 0.04797316E-13 2 +-0.02511908E+05-0.01405046E+03 0.02037663E+02 0.01733328E+00-0.01936443E-03 3 + 0.01099366E-06-0.02427341E-10-0.06596141E+04 0.01538422E+03 4 +CLH2CO 53090C 1H 2O 1CL 1G 0200.00 5000.00 1500.00 1 + 0.09104530E+02 0.02130629E-01-0.02994563E-05-0.02733652E-09 0.06437597E-13 2 +-0.05255641E+05-0.02258799E+03 0.08437505E+01 0.02258903E+00-0.02217447E-03 3 + 0.01165204E-06-0.02487574E-10-0.02264707E+05 0.02176388E+03 4 +CLHCO 40992H 1C 1 O 1CL 1G 0200.00 4000.00 1500.00 1 + 0.07132409E+02 0.01686027E-01-0.02034320E-05-0.05804520E-09 0.01152902E-12 2 +-0.02522232E+06-0.01150137E+03 0.02378612E+02 0.01278870E+00-0.01094130E-03 3 + 0.05089666E-07-0.09985544E-11-0.02348305E+06 0.01417749E+03 4 +CLO 40992 O 1CL 1 G 0200.00 4000.00 1500.00 1 + 0.04320627E+02 0.01730970E-02-0.07157875E-06 0.01424639E-09-0.01115543E-13 2 + 0.01328601E+06 0.01764362E+02 0.02918696E+02 0.04664857E-01-0.05654826E-04 3 + 0.03131108E-07-0.06515478E-11 0.01365989E+06 0.08877238E+02 4 +CLOCL 53090O 1CL 2 G 0200.00 5000.00 1500.00 1 + 0.06635186E+02 0.03284434E-02-0.01225328E-05 0.02123621E-09-0.01404377E-13 2 + 0.07672352E+05-0.06410996E+02 0.03397880E+02 0.01080127E+00-0.01324655E-03 3 + 0.07392960E-07-0.01546583E-10 0.08527797E+05 0.09981834E+02 4 +CLOO 40992 O 2CL 1 G 0200.00 4000.00 1500.00 1 + 0.06500858E+02 0.04259430E-02-0.01471496E-05 0.02312042E-09-0.01357033E-13 2 + 0.01465068E+06-0.05831007E+02 0.03097113E+02 0.01088530E+00-0.01274586E-03 3 + 0.06909658E-07-0.01419679E-10 0.01560137E+06 0.01159355E+03 4 +CLSI(CH3)2 40992H 6C 2SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.01602072E+03 0.06121766E-01-0.05697358E-05-0.02685516E-08 0.04764446E-12 2 +-0.02023771E+06-0.05448286E+03 0.04366292E+02 0.03146501E+00-0.02442313E-03 3 + 0.01155763E-06-0.02441972E-10-0.01561856E+06 0.09415220E+02 4 +CLSI(CH3)2CH2 40992H 8C 3SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.02115100E+03 0.08018265E-01-0.07924248E-05-0.03295050E-08 0.05955233E-12 2 +-0.02795355E+06-0.07954995E+03 0.05283182E+02 0.04510586E+00-0.03881938E-03 3 + 0.01972924E-06-0.04266615E-10-0.02191153E+06 0.06553031E+02 4 +CLSI(CH3)3 40992H 9C 3SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.02209311E+03 0.09120019E-01-0.08258094E-05-0.04093090E-08 0.07203542E-12 2 +-0.05338834E+06-0.08746922E+03 0.05151450E+02 0.04536455E+00-0.03440035E-03 3 + 0.01610968E-06-0.03411234E-10-0.04659624E+06 0.05658041E+02 4 +CLSICH3 40992H 3C 1SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.01002062E+03 0.03097435E-01-0.03221687E-05-0.01222123E-08 0.02253457E-12 2 +-0.05623578E+05-0.02357626E+03 0.03485850E+02 0.01832800E+00-0.01572477E-03 3 + 0.07852071E-07-0.01669997E-10-0.03149803E+05 0.01186709E+03 4 +CLSISI 40992SI 2CL 1 G 0200.00 4000.00 1500.00 1 + 0.06847303E+02 0.01844250E-02-0.09793979E-06 0.02440659E-09-0.02287823E-13 2 + 0.04772443E+06-0.03339368E+02 0.05234557E+02 0.05788035E-01-0.07516996E-04 3 + 0.04356402E-07-0.09346885E-11 0.04811932E+06 0.04702599E+02 4 +CLSISICL 40992SI 2CL 2 G 0200.00 4000.00 1500.00 1 + 0.01008343E+03-0.01216815E-02-0.01555866E-05 0.07247150E-09-0.08633006E-13 2 + 0.01376083E+06-0.01644862E+03 0.07022588E+02 0.01136420E+00-0.01558778E-03 3 + 0.08961882E-07-0.01874769E-10 0.01437523E+06-0.01570360E+02 4 +CN 121286C 1N 1 G 0200.00 5000.00 1000.00 1 + 0.03720120E+02 0.01518351E-02 0.01987381E-05-0.03798371E-09 0.01328230E-13 2 + 0.05111626E+06 0.02888597E+02 0.03663204E+02-0.01156529E-01 0.02163409E-04 3 + 0.01854208E-08-0.08214695E-11 0.05128118E+06 0.03739016E+02 4 +CN+ 121286C 1N 1E -1 G 0200.00 5000.00 1000.00 1 + 0.03701463E+02 0.07482931E-02-0.01790173E-05 0.02366368E-09-0.01437037E-13 2 + 0.02155966E+07 0.04108678E+02 0.03118657E+02 0.01553258E-01-0.09487764E-05 3 + 0.01479501E-07-0.09096763E-11 0.02158512E+07 0.07456254E+02 4 +CN- 121286C 1N 1E 1 G 0200.00 5000.00 1000.00 1 + 0.02981277E+02 0.01464773E-01-0.05672737E-05 0.01017623E-08-0.06870931E-13 2 + 0.06346098E+05 0.06171693E+02 0.03278995E+02 0.01464192E-01-0.03925899E-04 3 + 0.05629875E-07-0.02473497E-10 0.06279509E+05 0.04568972E+02 4 +CN2 121686C 1N 2 G 0200.00 5000.00 1000.00 1 + 0.05567064E+02 0.02100501E-01-0.09010517E-05 0.01718572E-08-0.01206255E-12 2 + 0.05489968E+06-0.05630054E+02 0.03039964E+02 0.08812105E-01-0.07605508E-04 3 + 0.03554357E-07-0.08746100E-11 0.05563268E+06 0.07555298E+02 4 +CNN 121286C 1N 2 G 0200.00 5000.00 1000.00 1 + 0.04785930E+02 0.02559554E-01-0.01003133E-04 0.01807149E-08-0.01227383E-12 2 + 0.06870411E+06-0.02953957E+01 0.03524436E+02 0.07271923E-01-0.08272698E-04 3 + 0.05628705E-07-0.01641576E-10 0.06899647E+06 0.05932445E+02 4 +CNO 103190C 1N 1O 1 G 0200.00 4000.00 1500.00 1 + 0.06328598E+02 0.07390401E-02-0.01110761E-05-0.01846498E-09 0.04400816E-13 2 + 0.04683387E+06-0.09091839E+02 0.03819863E+02 0.06416255E-01-0.05303312E-04 3 + 0.02308211E-07-0.04256414E-11 0.04775979E+06 0.04507300E+02 4 +CO 121286C 1O 1 G 0200.00 5000.00 1000.00 1 + 0.03025078E+02 0.01442689E-01-0.05630828E-05 0.01018581E-08-0.06910952E-13 2 +-0.01426835E+06 0.06108218E+02 0.03262452E+02 0.01511941E-01-0.03881755E-04 3 + 0.05581944E-07-0.02474951E-10-0.01431054E+06 0.04848897E+02 4 +CO2 121286C 1O 2 G 0200.00 5000.00 1000.00 1 + 0.04453623E+02 0.03140169E-01-0.01278411E-04 0.02393997E-08-0.01669033E-12 2 +-0.04896696E+06-0.09553959E+01 0.02275725E+02 0.09922072E-01-0.01040911E-03 3 + 0.06866687E-07-0.02117280E-10-0.04837314E+06 0.01018849E+03 4 +CO2- 121286C 1O 2E 1 G 0200.00 5000.00 1000.00 1 + 0.04610574E+02 0.02532962E-01-0.01070165E-04 0.02026771E-08-0.01424958E-12 2 +-0.05479882E+06 0.01449630E+02 0.02637077E+02 0.07803230E-01-0.08196187E-04 3 + 0.06537897E-07-0.02520220E-10-0.05416773E+06 0.01188955E+03 4 +COS 121286C 1O 1S 1 G 0200.00 5000.00 1000.00 1 + 0.05191925E+02 0.02506123E-01-0.01024396E-04 0.01943914E-08-0.01370800E-12 2 +-0.01846210E+06-0.02825755E+02 0.02858531E+02 0.09515458E-01-0.08884915E-04 3 + 0.04220994E-07-0.08557340E-11-0.01785145E+06 0.09081989E+02 4 +CS 121686C 1S 1 G 0200.00 5000.00 1000.00 1 + 0.03737431E+02 0.08180451E-02-0.03178918E-05 0.05356801E-09-0.02886195E-13 2 + 0.03247725E+06 0.03576557E+02 0.02938623E+02 0.02724352E-01-0.02397707E-04 3 + 0.01689501E-07-0.06665050E-11 0.03273992E+06 0.07848720E+02 4 +CS2 121286C 1S 2 G 0200.00 5000.00 1000.00 1 + 0.05930515E+02 0.01813645E-01-0.07492172E-05 0.01445892E-08-0.01032638E-12 2 + 0.01205117E+06-0.06093910E+02 0.03566139E+02 0.08374928E-01-0.06835704E-04 3 + 0.02091214E-07-0.06737193E-12 0.01268848E+06 0.06085967E+02 4 +CSICL 40992C 1SI 1CL 1 G 0200.00 4000.00 1500.00 1 + 0.06817655E+02 0.02139344E-02-0.01117811E-05 0.02768133E-09-0.02593011E-13 2 + 0.07133105E+06-0.04934821E+02 0.04809756E+02 0.07155653E-01-0.09274105E-04 3 + 0.05368218E-07-0.01150991E-10 0.07182609E+06 0.05089754E+02 4 +CSICL2 40992C 1SI 1CL 2 G 0200.00 4000.00 1500.00 1 + 0.09603536E+02 0.04212005E-02-0.02008617E-05 0.04653654E-09-0.04174779E-13 2 + 0.04167197E+06-0.01686119E+03 0.05482765E+02 0.01432904E+00-0.01824531E-03 3 + 0.01044588E-06-0.02224179E-10 0.04271677E+06 0.03823593E+02 4 +CSICL3 40992C 1SI 1CL 3 G 0200.00 4000.00 1500.00 1 + 0.01250544E+03 0.05339218E-02-0.02588613E-05 0.06075307E-09-0.05497769E-13 2 + 0.04346089E+04-0.02851950E+03 0.07246579E+02 0.01837148E+00-0.02348583E-03 3 + 0.01347935E-06-0.02874547E-10 0.01760441E+05-0.02151092E+02 4 +CSIH2CL 40992H 2C 1SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.01027485E+03 0.01774759E-01-0.03308189E-05-0.01554251E-09 0.07008815E-13 2 + 0.04915449E+06-0.02589174E+03 0.02180376E+02 0.02405210E+00-0.02551666E-03 3 + 0.01345591E-06-0.02782039E-10 0.05175432E+06 0.01659754E+03 4 +CSIHCL 40992H 1C 1SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.08584251E+02 0.09503299E-02-0.01990512E-05 0.07276089E-11 0.02697011E-13 2 + 0.05701632E+06-0.01616263E+03 0.04195792E+02 0.01336658E+00-0.01458110E-03 3 + 0.07822924E-07-0.01632113E-10 0.05839343E+06 0.06755654E+02 4 +CSIHCL2 40992H 1C 1SI 1CL 2G 0200.00 4000.00 1500.00 1 + 0.01133022E+03 0.01200867E-01-0.03112842E-05 0.02565133E-09 0.05146234E-14 2 + 0.02764986E+06-0.02737920E+03 0.04205701E+02 0.02278870E+00-0.02653546E-03 3 + 0.01465130E-06-0.03083816E-10 0.02972624E+06 0.09294144E+02 4 +DIOXANE 103190C 4H 8O 2 G 0200.00 4000.00 1500.00 1 + 0.02168170E+03 0.01049644E+00-0.01053878E-04-0.04473945E-08 0.08168288E-12 2 +-0.04922005E+06-0.09955139E+03-0.05862900E+02 0.07081444E+00-0.05458695E-03 3 + 0.02315148E-06-0.04289514E-10-0.03876477E+06 0.05061959E+03 4 +E 120186E 1 G 0200.00 5000.00 1000.00 1 + 0.02500000E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.07453749E+04-0.01173403E+03 0.02500000E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00-0.07453750E+04-0.01173403E+03 4 +F 121286F 1 G 0200.00 5000.00 1000.00 1 + 0.02687459E+02-0.02010358E-02 0.08597957E-06-0.01644974E-09 0.01166160E-13 2 + 0.08722883E+05 0.03882212E+02 0.02913905E+02-0.07336339E-02 0.05571015E-05 3 +-0.02666871E-08 0.08643255E-12 0.08651201E+05 0.02677115E+02 4 +F2 121286F 2 G 0200.00 5000.00 1000.00 1 + 0.04018308E+02 0.06221479E-02-0.02420845E-05 0.04742076E-09-0.03418141E-13 2 +-0.01300713E+05 0.01126327E+02 0.02940287E+02 0.03491492E-01-0.02458208E-04 3 + 0.01837073E-08 0.02850917E-11-0.01010430E+05 0.06694194E+02 4 +F2SINH 42489SI 1N 1F 2H 1G 0200.00 3000.00 1000.00 1 + 0.01004830E+03 0.01983144E-01-0.02703169E-05-0.01767853E-08 0.04444368E-12 2 +-0.07739741E+06-0.02303889E+03 0.04951547E+02 0.01329636E+00-0.02098648E-04 3 +-0.01007276E-06 0.05552286E-10-0.07597541E+06 0.03690891E+02 4 +F3SIN 22790F 3SI 1N 1 G 0200.00 4000.00 1000.00 1 + 0.01151242E+03 0.01115029E-01-0.01605465E-05-0.05271933E-09 0.01160900E-12 2 +-0.01045919E+07-0.02981224E+03 0.06028419E+02 0.01278681E+00-0.01878856E-04 3 +-0.09695426E-07 0.05184848E-10-0.01029950E+07-0.08217831E+01 4 +FNNF 42489F 2N 2 G 0200.00 3000.00 1000.00 1 + 0.07255211E+02 0.02274410E-01-0.02793346E-05-0.02203844E-08 0.05359234E-12 2 + 0.06360353E+05-0.01094248E+03 0.03127143E+02 0.01057134E+00-0.09746112E-05 3 +-0.07208357E-07 0.03567978E-10 0.07615831E+05 0.01107465E+03 4 +FNO3 121286F 1N 1O 3 G 0200.00 5000.00 1000.00 1 + 0.09176275E+02 0.04219072E-01-0.01835576E-04 0.03553718E-08-0.02541078E-12 2 +-0.02118639E+05-0.01934397E+03 0.02985786E+02 0.02094642E+00-0.01652733E-03 3 + 0.04318770E-07 0.01660784E-11-0.04237215E+04 0.01266793E+03 4 +FO 121286F 1O 1 G 0200.00 5000.00 1000.00 1 + 0.03913735E+02 0.07210714E-02-0.02796614E-05 0.05337821E-09-0.03720184E-13 2 + 0.01180141E+06 0.03346368E+02 0.02879578E+02 0.03399121E-01-0.02572855E-04 3 + 0.07422381E-08-0.04328053E-12 0.01209663E+06 0.08738887E+02 4 +FO2 121286F 1O 2 G 0200.00 5000.00 1000.00 1 + 0.05678971E+02 0.01442455E-01-0.06229546E-05 0.01199612E-08-0.08543416E-13 2 +-0.03861836E+04-0.01941812E+02 0.03872542E+02 0.06409974E-01-0.05517785E-04 3 + 0.02232771E-07-0.03876157E-11 0.01157076E+04 0.07406950E+02 4 +FSIN 42489SI 1N 1F 1 G 0200.00 3000.00 1000.00 1 + 0.06269572E+02 0.06747867E-02-0.01241976E-05-0.04970158E-09 0.01424452E-12 2 + 0.02533350E+06-0.04201141E+02 0.04269969E+02 0.05298358E-01-0.01103802E-04 3 +-0.03962805E-07 0.02282982E-10 0.02587238E+06 0.06215038E+02 4 +GA 62987GA 1 G 0200.00 1500.00 0600.00 1 + 0.02679919E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 + 0.03368804E+06 0.06788109E+02 0.02679919E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00 0.03368804E+06 0.06788109E+02 4 +GA2H6 62987GA 2H 6 G 0200.00 1500.00 0600.00 1 + 0.06016247E+02 0.01788370E+00-0.01204229E-05-0.06487881E-07 0.02075367E-10 2 + 0.01312548E+06-0.05228030E+02-0.03914561E+02 0.04965434E+00 0.07401904E-04 3 +-0.01124137E-05 0.08726339E-09 0.01493079E+06 0.04274883E+03 4 +GAAS 62987GA 1AS 1 G 0200.00 1500.00 0600.00 1 + 0.04471149E+02 0.04238449E-02-0.02279405E-05-0.04441172E-10 0.02618952E-12 2 + 0.04313359E+06 0.06212471E+02 0.03967474E+02 0.02318966E-01-0.01145452E-04 3 +-0.03411431E-07 0.03365821E-10 0.04321919E+06 0.08599628E+02 4 +GAAS(3,C) 62987GA 3AS 3 G 0200.00 1500.00 0600.00 1 + 0.01485247E+03 0.02959435E-01-0.07124246E-05-0.05316048E-08 0.01287321E-11 2 + 0.01191262E+07-0.03514144E+03 0.01470189E+03 0.03827728E-01-0.02945747E-04 3 + 0.02465370E-07-0.01520598E-10 0.01191496E+07-0.03445955E+03 4 +GAAS(3,L) 62987GA 3AS 3 G 0200.00 1500.00 0600.00 1 + 0.01356850E+03 0.02802435E-01-0.07969918E-05-0.06437098E-08 0.01560255E-11 2 + 0.01248005E+07-0.01381063E+03 0.01341276E+03 0.03617689E-01-0.02726209E-04 3 + 0.01877183E-07-0.01259178E-10 0.01248265E+07-0.01309195E+03 4 +GAAS(5,C) 62987GA 5AS 5 G 0200.00 1500.00 0600.00 1 + 0.02573672E+03 0.05523956E-01-0.01203468E-04-0.01043743E-07 0.02528931E-11 2 + 0.01721381E+07-0.08254488E+03 0.02546512E+03 0.07014337E-01-0.04881356E-04 3 + 0.03825484E-07-0.02450420E-10 0.01721819E+07-0.08130267E+03 4 +GAAS(5,L) 62987GA 5AS 5 G 0200.00 1500.00 0600.00 1 + 0.03045793E+03 0.05403152E-01-0.01649477E-04-0.09968842E-08 0.02413154E-11 2 + 0.02020691E+07-0.07768010E+03 0.03015255E+03 0.07234394E-01-0.06497994E-04 3 + 0.05559585E-07-0.03339653E-10 0.02021151E+07-0.07630866E+03 4 +GAET 62987GA 1C 2H 5 G 0200.00 1500.00 0600.00 1 + 0.05932970E+02 0.01342454E+00 0.04110518E-05-0.04286069E-07 0.01238710E-10 2 + 0.06504863E+05 0.03090838E+02 0.01846399E+02 0.02592050E+00 0.05522394E-04 3 +-0.04977960E-06 0.03654362E-09 0.07264445E+05 0.02294639E+03 4 +GAET2 62987GA 1C 4H 10 G 0200.00 1500.00 0600.00 1 + 0.07213832E+02 0.03055228E+00 0.01249451E-04-0.09990274E-07 0.02881966E-10 2 +-0.01392119E+05-0.07795098E+00-0.02162930E+02 0.05892512E+00 0.01447145E-03 3 +-0.01168602E-05 0.08526654E-09 0.03561841E+04 0.04552626E+03 4 +GAET3 62987GA 1C 6H 15 G 0200.00 1500.00 0600.00 1 + 0.08436453E+02 0.04804950E+00 0.02119157E-04-0.01581685E-06 0.04571178E-10 2 +-0.01346996E+06-0.06196490E+02-0.06544289E+02 0.09332246E+00 0.02364121E-03 3 +-0.01874104E-05 0.01367721E-08-0.01067659E+06 0.06666796E+03 4 +GAH 62987GA 1H 1 G 0200.00 1500.00 0600.00 1 + 0.03232142E+02 0.01343247E-01-0.04325499E-06-0.02791841E-08 0.04973590E-12 2 + 0.02656060E+06 0.05947896E+02 0.03524579E+02 0.03386213E-02-0.02064014E-05 3 + 0.03220999E-07-0.02936132E-10 0.02651074E+06 0.04554067E+02 4 +GAH2 62987GA 1H 2 G 0200.00 1500.00 0600.00 1 + 0.03762385E+02 0.03210792E-01 0.02180096E-06-0.08908393E-08 0.02219063E-11 2 + 0.01936647E+06 0.05783398E+02 0.03559710E+02 0.03676742E-01 0.06484499E-05 3 +-0.03109349E-07 0.01585414E-10 0.01940976E+06 0.06803082E+02 4 +GAH3 62987GA 1H 3 G 0200.00 1500.00 0600.00 1 + 0.03345476E+02 0.06399313E-01 0.01122996E-05-0.02065900E-07 0.05780202E-11 2 + 0.01228185E+06 0.06394842E+02 0.01726154E+02 0.01124739E+00 0.02447527E-04 3 +-0.02026314E-06 0.01447000E-09 0.01258620E+06 0.01428445E+03 4 +GAME 62987GA 1C 1H 3 G 0200.00 1500.00 0600.00 1 + 0.04809857E+02 0.06824207E-01 0.02258235E-05-0.02018341E-07 0.05736453E-11 2 + 0.07558677E+05 0.02595904E+02 0.03054537E+02 0.01218640E+00 0.02332213E-04 3 +-0.02121866E-06 0.01544226E-09 0.07885869E+05 0.01112878E+03 4 +GAME2 62987GA 1C 2H 6 G 0200.00 1500.00 0600.00 1 + 0.07068373E+02 0.01421602E+00 0.05120694E-05-0.04421986E-07 0.01309641E-10 2 + 0.05453790E+05-0.04173960E+02 0.02257655E+02 0.02916446E+00 0.05669861E-04 3 +-0.05709755E-06 0.04268905E-09 0.06341297E+05 0.01915435E+03 4 +GAME3 62987GA 1C 3H 9 G 0200.00 1500.00 0600.00 1 + 0.08410636E+02 0.02262803E+00 0.01043019E-04-0.07049611E-07 0.02015308E-10 2 +-0.09087271E+05-0.01072250E+03 0.02120239E+02 0.04161029E+00 0.09959505E-04 3 +-0.07846792E-06 0.05693396E-09-0.07911968E+05 0.01988516E+03 4 +H 120186H 1 G 0200.00 5000.00 1000.00 1 + 0.02500000E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 + 0.02547163E+06-0.04601176E+01 0.02500000E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00 0.02547163E+06-0.04601176E+01 4 +H(CH3)SICH2 61991H 6C 2SI 1 G 0200.00 2500.00 1500.00 1 + 0.01254527E+03 0.07143719E-01-0.01146987E-05-0.08100963E-08 0.01568740E-11 2 + 0.07723628E+05-0.04075435E+03 0.01206249E+02 0.03587271E+00-0.02971970E-03 3 + 0.01379675E-06-0.02695736E-10 0.01156328E+06 0.01956017E+03 4 +H+ 120186H 1E -1 G 0200.00 5000.00 1000.00 1 + 0.02500000E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 + 0.01840334E+07-0.01153862E+02 0.02500000E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00 0.01840334E+07-0.01153862E+02 4 +H- 120186H 1E 1 G 0200.00 5000.00 1000.00 1 + 0.02500000E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 + 0.01596104E+06-0.01152449E+02 0.02500000E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00 0.01596104E+06-0.01152449E+02 4 +H2 121286H 2 G 0200.00 5000.00 1000.00 1 + 0.02991423E+02 0.07000644E-02-0.05633829E-06-0.09231578E-10 0.01582752E-13 2 +-0.08350340E+04-0.01355110E+02 0.03298124E+02 0.08249442E-02-0.08143015E-05 3 +-0.09475434E-09 0.04134872E-11-0.01012521E+05-0.03294094E+02 4 +H2ALME 62987AL 1C 1H 5 G 0200.00 1500.00 0600.00 1 + 0.04898410E+02 0.01358223E+00 0.02611459E-05-0.04575170E-07 0.01384802E-10 2 + 0.08743072E+04-0.01113117E+02-0.06283259E+01 0.03089531E+00 0.05774090E-04 3 +-0.06488033E-06 0.04907111E-09 0.01889334E+05 0.02565779E+03 4 +H2ASME 62987AS 1C 1H 5 G 0200.00 1500.00 0600.00 1 + 0.05686213E+02 0.02154422E+00 0.08185248E-05-0.07069951E-07 0.02101522E-10 2 + 0.09331084E+05-0.06513957E+02-0.02113506E+02 0.04564229E+00 0.09983227E-04 3 +-0.09399697E-06 0.07014021E-09 0.01077170E+06 0.03132611E+03 4 +H2C4O 120189H 2C 4O 1 G 0200.00 4000.00 1000.00 1 + 0.01026888E+03 0.04896164E-01-0.04885081E-05-0.02708566E-08 0.05107013E-12 2 + 0.02346903E+06-0.02815985E+03 0.04810971E+02 0.01313999E+00 0.09865073E-05 3 +-0.06120720E-07 0.01640003E-10 0.02545803E+06 0.02113424E+02 4 +H2CCC 102093H 2C 3 G 0200.00 4000.00 1400.00 1 + 0.08266525E+02 0.02728619E-01-0.02160829E-05-0.01515161E-08 0.02641695E-12 2 + 0.07757192E+06-0.01864937E+03 0.04212193E+02 0.08954521E-01-0.01050721E-04 3 +-0.02578513E-07 0.09722836E-11 0.07922349E+06 0.04134299E+02 4 +H2CCC(S) 102093H 2C 3 G 0200.00 4000.00 1400.00 1 + 0.07904213E+02 0.02907464E-01-0.02219731E-05-0.01620844E-08 0.02796013E-12 2 + 0.06385167E+06-0.01810882E+03 0.03794178E+02 0.08761049E-01-0.07975878E-05 3 +-0.02308045E-07 0.07911151E-11 0.06563580E+06 0.05264196E+02 4 +H2CCCCCH 101993H 3C 5 G 0200.00 4000.00 1400.00 1 + 0.01440736E+03 0.04424058E-01-0.03618245E-05-0.02456408E-08 0.04327859E-12 2 + 0.05896103E+06-0.04775145E+03 0.07441421E+02 0.01585165E+00-0.02219895E-04 3 +-0.04928038E-07 0.01984559E-10 0.06162266E+06-0.09047891E+02 4 +H2CCCCH 82489C 4H 3 G 0200.00 4000.00 1000.00 1 + 0.01131409E+03 0.05014414E-01-0.05350445E-05-0.02825309E-08 0.05403279E-12 2 + 0.05181211E+06-0.03062434E+03 0.06545799E+02 0.01242477E+00 0.05603226E-05 3 +-0.05631141E-07 0.01665218E-10 0.05352503E+06-0.04264082E+02 4 +H2CCCCH2 82489C 4H 4 G 0200.00 4000.00 1000.00 1 + 0.01062083E+03 0.07199370E-01-0.06806234E-05-0.04021185E-08 0.07378498E-12 2 + 0.03358798E+06-0.03193583E+03 0.03849007E+02 0.01713169E+00 0.01644270E-04 3 +-0.07761590E-07 0.01947860E-10 0.03608372E+06 0.05732121E+02 4 +H2CCCH 82489C 3H 3 G 0200.00 4000.00 1000.00 1 + 0.08831047E+02 0.04357195E-01-0.04109067E-05-0.02368723E-08 0.04376520E-12 2 + 0.03847420E+06-0.02177919E+03 0.04754200E+02 0.01108028E+00 0.02793323E-05 3 +-0.05479212E-07 0.01949629E-10 0.03988883E+06 0.05854549E+01 4 +H2CCCLO 53090C 2H 2O 1CL 1G 0200.00 5000.00 1500.00 1 + 0.01240462E+03 0.02067658E-01-0.03889952E-05-0.03138121E-10 0.04625008E-13 2 +-0.01114503E+06-0.03928723E+03 0.01680422E+02 0.03020642E+00-0.03234256E-03 3 + 0.01779343E-06-0.03877221E-10-0.07395297E+05 0.01777265E+03 4 +H2CCH(SICL2H) 40992H 4C 2SI 1CL 2G 0200.00 4000.00 1500.00 1 + 0.01680247E+03 0.04516342E-01-0.05794312E-05-0.01367868E-08 0.02833862E-12 2 +-0.04037858E+06-0.05763375E+03 0.03640801E+02 0.03803764E+00-0.03641732E-03 3 + 0.01855101E-06-0.03834642E-10-0.03581475E+06 0.01252145E+03 4 +H2CCH2OH 103190C 2H 5O 1 G 0200.00 4000.00 1500.00 1 + 0.01144956E+03 0.05249185E-01-0.04887850E-05-0.02243250E-08 0.03973360E-12 2 +-0.07554972E+05-0.03426083E+03 0.01304406E+02 0.02873214E+00-0.02387448E-03 3 + 0.01166988E-06-0.02450027E-10-0.03718933E+05 0.02078756E+03 4 +H2CCHO 103190C 2H 3O 1 G 0200.00 4000.00 1500.00 1 + 0.09710060E+02 0.03854966E-01-0.04677825E-05-0.01505179E-08 0.02941428E-12 2 +-0.02692492E+05-0.02810566E+03 0.02802205E+01 0.02740311E+00-0.02554683E-03 3 + 0.01306679E-06-0.02750425E-10 0.06682648E+04 0.02239731E+03 4 +H2CCHSI 61991H 3C 2SI 1 G 0200.00 2500.00 1500.00 1 + 0.09386889E+02 0.03941784E-01-0.01316150E-05-0.04081553E-08 0.07971026E-12 2 + 0.04528924E+06-0.02340680E+03 0.01645904E+02 0.02461474E+00-0.02252401E-03 3 + 0.01105892E-06-0.02209069E-10 0.04779814E+06 0.01738303E+03 4 +H2CCHSIH 61991H 4C 2SI 1 G 0200.00 2500.00 1500.00 1 + 0.01039415E+03 0.04987864E-01-0.01480904E-05-0.05650110E-08 0.01139073E-11 2 + 0.03263919E+06-0.02930385E+03 0.01989225E+02 0.02637566E+00-0.02197547E-03 3 + 0.09982490E-07-0.01893595E-10 0.03544082E+06 0.01531216E+03 4 +H2CCHSIH2 61991H 5C 2SI 1 G 0200.00 2500.00 1500.00 1 + 0.01289871E+03 0.05366252E-01-0.02345064E-05-0.05622057E-08 0.01143224E-11 2 + 0.02373919E+06-0.04346106E+03 0.04606628E+01 0.03824847E+00-0.03490747E-03 3 + 0.01656684E-06-0.03180820E-10 0.02773639E+06 0.02208512E+03 4 +H2CCHSIH3 61991H 6C 2SI 1 G 0200.00 2500.00 1500.00 1 + 0.01249653E+03 0.07666553E-01-0.02075339E-05-0.09569749E-08 0.01987112E-11 2 + 0.04799029E+05-0.04174850E+03 0.07686183E+01 0.03576322E+00-0.02634364E-03 3 + 0.01032868E-06-0.01717329E-10 0.08811836E+05 0.02100703E+03 4 +H2CLSICH3 40992H 5C 1SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.01354344E+03 0.04577293E-01-0.04988032E-05-0.01758807E-08 0.03311232E-12 2 +-0.03126783E+06-0.04541432E+03 0.02142669E+02 0.03103477E+00-0.02660368E-03 3 + 0.01286599E-06-0.02646554E-10-0.02699973E+06 0.01636317E+03 4 +H2CLSISICL3 40992H 2SI 2CL 4 G 0200.00 4000.00 1500.00 1 + 0.01871701E+03 0.01924360E-01-0.04472779E-05 0.02003132E-09 0.03268818E-13 2 +-0.08047111E+06-0.05817685E+03 0.08945602E+02 0.03068227E+00-0.03483212E-03 3 + 0.01910354E-06-0.04027623E-10-0.07751434E+06-0.07537633E+02 4 +H2CN 41687H 2C 1N 1 G 0200.00 4000.00 1000.00 1 + 0.05209703E+02 0.02969291E-01-0.02855589E-05-0.01635550E-08 0.03043259E-12 2 + 0.02767711E+06-0.04444478E+02 0.02851661E+02 0.05695233E-01 0.01071140E-04 3 +-0.01622612E-07-0.02351108E-11 0.02863782E+06 0.08992751E+02 4 +H2CNCH2 103190C 2H 4N 1 G 0200.00 4000.00 1500.00 1 + 0.01065385E+03 0.05191287E-01-0.05816522E-05-0.02206912E-08 0.04101341E-12 2 + 0.02345063E+06-0.03469895E+03-0.01203076E+01 0.03225369E+00-0.02968723E-03 3 + 0.01527290E-06-0.03242500E-10 0.02728820E+06 0.02297042E+03 4 +H2CNCH2O 103190C 2H 4N 1O 1G 0200.00 4000.00 1500.00 1 + 0.01327652E+03 0.04830938E-01-0.04858949E-05-0.02009495E-08 0.03640181E-12 2 + 0.01624962E+06-0.04713094E+03-0.01978522E+01 0.03341279E+00-0.02432022E-03 3 + 0.09438643E-07-0.01604050E-10 0.02141154E+06 0.02658265E+03 4 +H2CNCHO 103190C 2H 3N 1O 1G 0200.00 4000.00 1500.00 1 + 0.01196792E+03 0.03915428E-01-0.03860933E-05-0.01696877E-08 0.03041050E-12 2 +-0.05902236E+05-0.03958545E+03 0.01096066E+02 0.02577215E+00-0.01711630E-03 3 + 0.05880104E-07-0.08956774E-11-0.01612063E+05 0.02032528E+03 4 +H2CNH 41687C 1H 3N 1 G 0200.00 4000.00 1000.00 1 + 0.05221589E+02 0.04748526E-01-0.04179159E-05-0.02606612E-08 0.04703140E-12 2 + 0.08657219E+05-0.04500776E+02 0.02365879E+02 0.06780570E-01 0.02423000E-04 3 +-0.06157824E-08-0.01615097E-10 0.09971141E+05 0.01230718E+03 4 +H2CNNHO 103190C 1H 3N 2O 1G 0200.00 4000.00 1500.00 1 + 0.01157754E+03 0.04489180E-01-0.05033233E-05-0.01651066E-08 0.03069139E-12 2 + 0.01986783E+06-0.03656958E+03 0.05954945E+01 0.03239559E+00-0.02993966E-03 3 + 0.01489054E-06-0.03022863E-10 0.02364485E+06 0.02192790E+03 4 +H2CNNO 103190C 1H 2N 2O 1G 0200.00 4000.00 1500.00 1 + 0.01016234E+03 0.03065936E-01-0.03082820E-05-0.01194424E-08 0.02169867E-12 2 + 0.02494088E+06-0.02762275E+03 0.02498334E+02 0.01993009E+00-0.01557879E-03 3 + 0.06838956E-07-0.01313250E-10 0.02786476E+06 0.01417025E+03 4 +H2CNNO2 41687H 2C 1N 2O 2G 0200.00 4000.00 1000.00 1 + 0.01140794E+03 0.04564542E-01-0.04600304E-05-0.02513539E-08 0.04782211E-12 2 + 0.01242142E+06-0.03165238E+03 0.03534317E+02 0.01811272E+00 0.02394018E-05 3 +-0.01080024E-06 0.04222725E-10 0.01509006E+06 0.01131138E+03 4 +H2CNO 103190C 1H 2N 1O 1G 0200.00 4000.00 1500.00 1 + 0.08485639E+02 0.02633277E-01-0.03017498E-05-0.08341916E-09 0.01593977E-12 2 + 0.01716434E+06-0.02052156E+03 0.01045856E+02 0.02126494E+00-0.01962754E-03 3 + 0.09659592E-07-0.01941069E-10 0.01974611E+06 0.01919718E+03 4 +H2CNO2 103190C 1H 2N 1O 2G 0200.00 4000.00 1500.00 1 + 0.01127481E+03 0.02584711E-01-0.03934331E-05-0.05614969E-09 0.01392400E-12 2 + 0.01360470E+06-0.03461951E+03 0.01165696E+02 0.02890490E+00-0.02817663E-03 3 + 0.01387569E-06-0.02727595E-10 0.01694546E+06 0.01888293E+03 4 +H2CONO 103190C 1H 2N 1O 2G 0200.00 4000.00 1500.00 1 + 0.01075754E+03 0.02983288E-01-0.04123564E-05-0.08096724E-09 0.01720195E-12 2 + 0.01230253E+06-0.02976009E+03 0.02120026E+02 0.02709056E+00-0.02799616E-03 3 + 0.01479145E-06-0.03074997E-10 0.01504327E+06 0.01546092E+03 4 +H2GAET 62987GA 1C 2H 7 G 0200.00 1500.00 0600.00 1 + 0.07187273E+02 0.01867211E+00 0.06156157E-05-0.06027764E-07 0.01797524E-10 2 +-0.04232757E+05-0.04686699E+02 0.04124020E+01 0.03972972E+00 0.07979140E-04 3 +-0.08059234E-06 0.06040387E-09-0.02983932E+05 0.02816148E+03 4 +H2GAME 62987GA 1C 1H 5 G 0200.00 1500.00 0600.00 1 + 0.05831604E+02 0.01222872E+00 0.03033669E-05-0.03956941E-07 0.01225452E-10 2 + 0.05189255E+05-0.04446614E+02 0.05251130E+01 0.02904695E+00 0.04844148E-04 3 +-0.06097646E-06 0.04672763E-09 0.06158712E+05 0.02122149E+03 4 +H2NF 42489H 2N 1F 1 G 0200.00 3000.00 1000.00 1 + 0.04143658E+02 0.03805135E-01-0.02771153E-05-0.03589717E-08 0.07589549E-12 2 +-0.04891486E+05 0.02309362E+02 0.02597863E+02 0.05882104E-01 0.04938351E-05 3 +-0.01948600E-07 0.03634003E-11-0.04301253E+05 0.01098289E+03 4 +H2NNO 103190H 2N 2O 1 G 0200.00 4000.00 1500.00 1 + 0.07759737E+02 0.03025701E-01-0.02888916E-05-0.01262990E-08 0.02195026E-12 2 + 0.05894193E+05-0.01647713E+03 0.02088916E+02 0.01684997E+00-0.01428977E-03 3 + 0.06830147E-07-0.01368985E-10 0.07907340E+05 0.01394381E+03 4 +H2NO 102290H 2N 1O 1 G 0200.00 4000.00 1500.00 1 + 0.05673346E+02 0.02298837E-01-0.01774446E-05-0.01103482E-08 0.01859762E-12 2 + 0.05569325E+05-0.06153540E+02 0.02530590E+02 0.08596035E-01-0.05471030E-04 3 + 0.02276249E-07-0.04648073E-11 0.06868030E+05 0.01126651E+03 4 +H2NOH 103190H 3N 1O 1 G 0200.00 4000.00 1500.00 1 + 0.06764633E+02 0.03047036E-01-0.02777798E-05-0.01250487E-08 0.02191094E-12 2 +-0.09026701E+05-0.01269845E+03 0.01407003E+02 0.01658498E+00-0.01463594E-03 3 + 0.07318354E-07-0.01511897E-10-0.07158596E+05 0.01589649E+03 4 +H2O 20387H 2O 1 G 0200.00 5000.00 1000.00 1 + 0.02672146E+02 0.03056293E-01-0.08730260E-05 0.01200996E-08-0.06391618E-13 2 +-0.02989921E+06 0.06862817E+02 0.03386842E+02 0.03474982E-01-0.06354696E-04 3 + 0.06968581E-07-0.02506588E-10-0.03020811E+06 0.02590233E+02 4 +H2O(L) 120186H 2O 1 L 0273.15 1000.00 1000.00 1 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 + 0.00000000E+00 0.00000000E+00 0.01271278E+03-0.01766279E+00-0.02255666E-03 3 + 0.02082091E-05-0.02407861E-08-0.03748320E+06-0.05911535E+03 4 +H2O(S) 120186H 2O 1 S 0200.00 0273.15 0273.15 1 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 + 0.00000000E+00 0.00000000E+00-0.03926933E+00 0.01692042E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00-0.03594958E+06 0.05693378E+01 4 +H2O2 120186H 2O 2 G 0200.00 5000.00 1000.00 1 + 0.04573167E+02 0.04336136E-01-0.01474689E-04 0.02348904E-08-0.01431654E-12 2 +-0.01800696E+06 0.05011370E+01 0.03388754E+02 0.06569226E-01-0.01485013E-05 3 +-0.04625806E-07 0.02471515E-10-0.01766315E+06 0.06785363E+02 4 +H2S 121286H 2S 1 G 0200.00 5000.00 1000.00 1 + 0.02883147E+02 0.03827835E-01-0.01423398E-04 0.02497999E-08-0.01660273E-12 2 +-0.03480743E+05 0.07258162E+02 0.03071029E+02 0.05578261E-01-0.01030967E-03 3 + 0.01201953E-06-0.04838370E-10-0.03559826E+05 0.05935226E+02 4 +H2SI(CH3)2 61991H 8C 2SI 1 G 0200.00 2500.00 1500.00 1 + 0.01362000E+03 0.01024457E+00-0.01528107E-05-0.01329179E-07 0.02717974E-11 2 +-0.01781386E+06-0.04695844E+03 0.02005893E+02 0.03638380E+00-0.02273374E-03 3 + 0.07691266E-07-0.01156681E-10-0.01364280E+06 0.01583265E+03 4 +H2SI(CH3)CH2 61991H 7C 2SI 1 G 0200.00 2500.00 1500.00 1 + 0.01388829E+03 0.07937538E-01-0.01559644E-05-0.09324826E-08 0.01847251E-11 2 + 0.06767195E+05-0.04464997E+03 0.01980449E+02 0.03727036E+00-0.02944759E-03 3 + 0.01312558E-06-0.02507859E-10 0.01087973E+06 0.01898102E+03 4 +H2SI(NH2)2 22790SI 1H 6N 2 G 0200.00 4000.00 1000.00 1 + 0.01302179E+03 0.06465444E-01-0.05816746E-05-0.03484493E-08 0.06340675E-12 2 +-0.02357071E+06-0.04132570E+03 0.05615307E+02 0.02079854E+00-0.09999530E-05 3 +-0.01288525E-06 0.06091866E-10-0.02126283E+06-0.01615658E+02 4 +H2SIC 61991H 2C 1SI 1 G 0200.00 2500.00 1500.00 1 + 0.07319671E+02 0.01729952E-01-0.01346466E-05-0.01450487E-08 0.03000643E-12 2 + 0.08125478E+06-0.01320432E+03 0.02408167E+02 0.01437372E+00-0.01331203E-03 3 + 0.06387472E-07-0.01244523E-10 0.08289031E+06 0.01283748E+03 4 +H2SICCH 61991H 3C 2SI 1 G 0200.00 2500.00 1500.00 1 + 0.01091422E+03 0.03001577E-01-0.01622344E-05-0.02466767E-08 0.04595260E-12 2 + 0.04137118E+06-0.03153165E+03 0.02952641E+02 0.02407857E+00-0.02313898E-03 3 + 0.01172227E-06-0.02393835E-10 0.04400800E+06 0.01054929E+03 4 +H2SICH 61991H 3C 1SI 1 G 0200.00 2500.00 1500.00 1 + 0.08489276E+02 0.02348812E-01-0.01091163E-05-0.02027972E-08 0.03759264E-12 2 + 0.04973382E+06-0.01845097E+03 0.03442743E+02 0.01542521E+00-0.01429096E-03 3 + 0.07252204E-07-0.01507009E-10 0.05145786E+06 0.08363421E+02 4 +H2SICH2 61991H 4C 1SI 1 G 0200.00 2500.00 1500.00 1 + 0.09303939E+02 0.04006038E-01-0.09702324E-06-0.03997739E-08 0.07350215E-12 2 + 0.01649066E+06-0.02623845E+03 0.01049782E+02 0.02562277E+00-0.02324392E-03 3 + 0.01142315E-06-0.02295441E-10 0.01922778E+06 0.01743860E+03 4 +H2SICH3 61991H 5C 1SI 1 G 0200.00 2500.00 1500.00 1 + 0.08991115E+02 0.06006339E-01-0.01118591E-05-0.07745983E-08 0.01594429E-11 2 + 0.01270233E+06-0.02218700E+03 0.02094419E+02 0.02127010E+00-0.01294390E-03 3 + 0.04156964E-07-0.05854213E-11 0.01520143E+06 0.01518517E+03 4 +H2SIN 22790H 2SI 1N 1 G 0200.00 4000.00 1000.00 1 + 0.06826533E+02 0.02125460E-01-0.02343132E-05-0.01166339E-08 0.02277273E-12 2 + 0.07253673E+06-0.01052162E+03 0.03549344E+02 0.07311005E-01 0.03249026E-05 3 +-0.03682945E-07 0.01121511E-10 0.07370656E+06 0.07565329E+02 4 +H2SINH 42489SI 1N 1H 3 G 0200.00 3000.00 1000.00 1 + 0.06588295E+02 0.04903194E-01-0.04944720E-05-0.05014630E-08 0.01139470E-11 2 + 0.01809794E+06-0.09522970E+02 0.02822196E+02 0.01245518E+00-0.08350819E-05 3 +-0.07411814E-07 0.03579019E-10 0.01923616E+06 0.01054783E+03 4 +H2SINH2 42489SI 1N 1H 4 G 0200.00 3000.00 1000.00 1 + 0.07392047E+02 0.05476841E-01-0.04453276E-05-0.05236661E-08 0.01138390E-11 2 + 0.01136858E+06-0.01138050E+03 0.04053223E+02 0.01182231E+00-0.04348128E-05 3 +-0.06225818E-07 0.02798829E-10 0.01241971E+06 0.06562033E+02 4 +H2SINH3 121386SI 1H 5N 1 G 0200.00 4000.00 1000.00 1 + 0.08711392E+02 0.05909106E-01-0.05436615E-05-0.03248350E-08 0.05960257E-12 2 + 0.08441694E+05-0.01933470E+03 0.04269730E+02 0.01125224E+00 0.01951722E-04 3 +-0.03578373E-07-0.08372202E-12 0.01022204E+06 0.05876736E+02 4 +H2SISIH2 42489SI 2H 4 G 0200.00 3000.00 1000.00 1 + 0.08986817E+02 0.05405047E-01-0.05214022E-05-0.05313742E-08 0.01188727E-11 2 + 0.02832748E+06-0.02004478E+03 0.05133186E+02 0.01252855E+00-0.04620421E-05 3 +-0.06606075E-07 0.02864345E-10 0.02956915E+06 0.07605133E+01 4 +H3ASGAET3 62987AS 1GA 1C 6H 18G 0200.00 1500.00 0600.00 1 + 0.08508501E+02 0.05632369E+00 0.02524140E-04-0.01861451E-06 0.05372403E-10 2 +-0.01085517E+06-0.03399858E+02-0.08974745E+02 0.01090516E+01 0.02811457E-03 3 +-0.02195513E-05 0.01599734E-08-0.07592761E+05 0.08165459E+03 4 +H3ASGAME3 62987AS 1GA 1C 3H 12G 0200.00 1500.00 0600.00 1 + 0.01125499E+03 0.03159753E+00 0.01177904E-04-0.01013352E-06 0.02947356E-10 2 +-0.07280344E+05-0.02238730E+03 0.01267161E+02 0.06214586E+00 0.01385631E-03 3 +-0.01220044E-05 0.08982019E-09-0.05425619E+05 0.02613306E+03 4 +H3CONHO 103190C 1H 4N 1O 2G 0200.00 4000.00 1500.00 1 + 0.01249270E+03 0.04773900E-01-0.04717255E-05-0.01987935E-08 0.03599460E-12 2 +-0.02354754E+05-0.03945442E+03 0.01930733E+02 0.02865910E+00-0.02313063E-03 3 + 0.01068402E-06-0.02139376E-10 0.01638891E+05 0.01796108E+03 4 +H3SIC 61991H 3C 1SI 1 G 0200.00 2500.00 1500.00 1 + 0.08536022E+02 0.02944748E-01-0.01752614E-05-0.03061316E-08 0.06463710E-12 2 + 0.07066730E+06-0.02041360E+03 0.01037017E+02 0.02192253E+00-0.01926062E-03 3 + 0.08725014E-07-0.01615505E-10 0.07315849E+06 0.01939904E+03 4 +H3SICCH 61991H 4C 2SI 1 G 0200.00 2500.00 1500.00 1 + 0.01193845E+03 0.04298239E-01-0.01882154E-05-0.04212272E-08 0.08245783E-12 2 + 0.02161639E+06-0.03978125E+03 0.01692389E+02 0.03078862E+00-0.02808630E-03 3 + 0.01359918E-06-0.02690423E-10 0.02503587E+06 0.01453670E+03 4 +H3SICH 61991H 4C 1SI 1 G 0200.00 2500.00 1500.00 1 + 0.09747808E+02 0.03532863E-01-0.01540271E-05-0.03539077E-08 0.06992248E-12 2 + 0.04253036E+06-0.02504347E+03 0.01710027E+02 0.02413212E+00-0.02164005E-03 3 + 0.01035470E-06-0.02035579E-10 0.04522928E+06 0.01762908E+03 4 +H3SICH2 61991H 5C 1SI 1 G 0200.00 2500.00 1500.00 1 + 0.01050164E+03 0.04907525E-01-0.01523178E-05-0.05436598E-08 0.01082455E-11 2 + 0.01632252E+06-0.02911264E+03 0.01199673E+02 0.02828259E+00-0.02394311E-03 3 + 0.01103518E-06-0.02125819E-10 0.01948167E+06 0.02041804E+03 4 +H3SICH3 61991H 6C 1SI 1 G 0200.00 2500.00 1500.00 1 + 0.01022214E+03 0.07221275E-01-0.01482544E-05-0.09419140E-08 0.01956175E-11 2 +-0.08301660E+05-0.03163487E+03 0.01240228E+02 0.02729962E+00-0.01707597E-03 3 + 0.05502474E-07-0.07521465E-11-0.05090007E+05 0.01692759E+03 4 +H3SIN 22790H 3SI 1N 1 G 0200.00 4000.00 1000.00 1 + 0.07964213E+02 0.03355633E-01-0.03579695E-05-0.01889818E-08 0.03650912E-12 2 + 0.01148697E+07-0.01924110E+03 0.02790629E+02 0.01134566E+00 0.08321879E-05 3 +-0.05845045E-07 0.01685969E-10 0.01167357E+07 0.09384630E+02 4 +H3SINH 42489SI 1N 1H 4 G 0200.00 3000.00 1000.00 1 + 0.07697340E+02 0.05657943E-01-0.05209306E-05-0.05617966E-08 0.01263502E-11 2 + 0.02282005E+06-0.01330379E+03 0.02778390E+02 0.01510711E+00-0.06734261E-05 3 +-0.08928515E-07 0.04115347E-10 0.02435913E+06 0.01309386E+03 4 +H3SISIH 111191H 4SI 2 G 0200.00 4000.00 1500.00 1 + 0.01127202E+03 0.02538145E-01-0.02998472E-05-0.09465367E-09 0.01855053E-12 2 + 0.03297169E+06-0.03264598E+03 0.03698707E+02 0.01870180E+00-0.01430704E-03 3 + 0.06005836E-07-0.01116293E-10 0.03590825E+06 0.08825191E+02 4 +H3SISIH3 42489SI 2H 6 G 0200.00 3000.00 1000.00 1 + 0.01068273E+03 0.08221416E-01-0.08096035E-05-0.08337975E-08 0.01908205E-11 2 + 0.05316920E+05-0.03082188E+03 0.03898290E+02 0.01977415E+00 0.01791014E-05 3 +-0.01033168E-06 0.03931699E-10 0.07621719E+05 0.06227022E+02 4 +HALME 62987AL 1C 1H 4 G 0200.00 1500.00 0600.00 1 + 0.04812273E+02 0.01029645E+00 0.02582808E-05-0.03323597E-07 0.09884584E-11 2 + 0.01176673E+06 0.09557062E+01 0.01118789E+02 0.02180038E+00 0.04120785E-04 3 +-0.04366690E-06 0.03273825E-09 0.01244736E+06 0.01886107E+03 4 +HALME2 62987AL 1C 2H 7 G 0200.00 1500.00 0600.00 1 + 0.05705172E+02 0.01924317E+00 0.06377855E-05-0.06346800E-07 0.01896800E-10 2 +-0.06049865E+05-0.06331378E+01-0.01494261E+02 0.04158568E+00 0.08686772E-04 3 +-0.08604142E-06 0.06447653E-09-0.04722517E+05 0.03427725E+03 4 +HASALME 62987AS 1AL 1C 1H 4G 0200.00 1500.00 0600.00 1 + 0.06956539E+02 0.01061278E+00 0.02440154E-05-0.03297737E-07 0.01020004E-10 2 + 0.02582506E+06-0.08625792E+01 0.02544859E+02 0.02465795E+00 0.03677808E-04 3 +-0.05008894E-06 0.03848384E-09 0.02663010E+06 0.02046859E+03 4 +HASGAET 62987AS 1GA 1C 2H 6G 0200.00 1500.00 0600.00 1 + 0.06336445E+02 0.02340603E+00 0.09066638E-05-0.07519059E-07 0.01828115E-10 2 + 0.03184605E+06 0.05812180E+02 0.05642724E+02 0.02296739E+00 0.01094867E-03 3 +-0.02449038E-06 0.09602701E-10 0.03204718E+06 0.09675533E+02 4 +HASGAME 62987AS 1GA 1C 1H 4G 0200.00 1500.00 0600.00 1 + 0.07507970E+02 0.09277900E-01 0.01891932E-05-0.02769887E-07 0.07996070E-11 2 + 0.03253908E+06-0.01422608E+02 0.04859127E+02 0.01750423E+00 0.02831996E-04 3 +-0.03107937E-06 0.02299468E-09 0.03302941E+06 0.01142952E+03 4 +HASME 62987AS 1C 1H 4 G 0200.00 1500.00 0600.00 1 + 0.05753261E+02 0.01841813E+00 0.07493313E-05-0.05919917E-07 0.01726247E-10 2 + 0.01880057E+06-0.05360325E+02-0.01575095E+01 0.03649094E+00 0.08332940E-04 3 +-0.07234666E-06 0.05330928E-09 0.01989792E+06 0.02335316E+03 4 +HASME2 62987AS 1C 2H 7 G 0200.00 1500.00 0600.00 1 + 0.05850437E+02 0.01841766E+00 0.08066845E-05-0.05868715E-07 0.01726428E-10 2 + 0.06450535E+05 0.03909152E+01-0.02908405E+01 0.03729577E+00 0.08335855E-04 3 +-0.07455611E-06 0.05527881E-09 0.07587766E+05 0.03020451E+03 4 +HCCCHCCH 101993H 3C 5 G 0200.00 4000.00 1400.00 1 + 0.01412247E+03 0.04593411E-01-0.03738175E-05-0.02574329E-08 0.04539160E-12 2 + 0.06249257E+06-0.04722335E+03 0.06854796E+02 0.01699404E+00-0.02582284E-04 3 +-0.05488765E-07 0.02281481E-10 0.06515364E+06-0.07133854E+02 4 +HCCCL 40992H 1C 2CL 1 G 0200.00 4000.00 1500.00 1 + 0.07743241E+02 0.01618655E-01-0.02465935E-05-0.02909336E-09 0.07522752E-13 2 + 0.02472494E+06-0.01686593E+03 0.02969338E+02 0.01583152E+00-0.01787078E-03 3 + 0.01017728E-06-0.02231985E-10 0.02620733E+06 0.07906791E+02 4 +HCCHCCH 82489C 4H 3 G 0200.00 4000.00 1000.00 1 + 0.01075274E+03 0.05381153E-01-0.05549638E-05-0.03052266E-08 0.05761740E-12 2 + 0.06121419E+06-0.02973025E+03 0.04153882E+02 0.01726287E+00-0.02389374E-05 3 +-0.01018700E-06 0.04340505E-10 0.06338071E+06 0.06036507E+02 4 +HCCO 32387H 1C 2O 1 G 0200.00 4000.00 1000.00 1 + 0.06758073E+02 0.02000400E-01-0.02027607E-05-0.01041132E-08 0.01965165E-12 2 + 0.01901513E+06-0.09071262E+02 0.05047965E+02 0.04453478E-01 0.02268283E-05 3 +-0.01482095E-07 0.02250742E-11 0.01965892E+06 0.04818439E+01 4 +HCCOH 32387H 2C 2O 1 G 0200.00 4000.00 1000.00 1 + 0.07328324E+02 0.03336416E-01-0.03024705E-05-0.01781106E-08 0.03245168E-12 2 + 0.07598258E+05-0.01401214E+03 0.03899465E+02 0.09701075E-01-0.03119309E-05 3 +-0.05537732E-07 0.02465732E-10 0.08701190E+05 0.04491875E+02 4 +HCCSICL2H 40992H 2C 2SI 1CL 2G 0200.00 4000.00 1500.00 1 + 0.01480501E+03 0.02600965E-01-0.04631204E-05-0.02401379E-09 0.09812397E-13 2 +-0.02163059E+06-0.04610236E+03 0.04846840E+02 0.03181717E+00-0.03572068E-03 3 + 0.01983339E-06-0.04248036E-10-0.01856223E+06 0.05613645E+02 4 +HCL 42189CL 1H 1 G 0200.00 5000.00 1000.00 1 + 0.02755335E+02 0.01473581E-01-0.04971254E-05 0.08108658E-09-0.05072063E-13 2 +-0.01191806E+06 0.06515116E+02 0.03338534E+02 0.01268207E-01-0.03666917E-04 3 + 0.04703992E-07-0.01836011E-10-0.01213151E+06 0.03193555E+02 4 +HCL2SICH3 40992H 4C 1SI 1CL 2G 0200.00 4000.00 1500.00 1 + 0.01459366E+03 0.04006211E-01-0.04818700E-05-0.01336338E-08 0.02648821E-12 2 +-0.05346984E+06-0.04689795E+03 0.04155299E+02 0.02995026E+00-0.02799546E-03 3 + 0.01433046E-06-0.03013208E-10-0.04973616E+06 0.09051815E+02 4 +HCL2SISICL2H 40992H 2SI 2CL 4 G 0200.00 4000.00 1500.00 1 + 0.01863092E+03 0.01991871E-01-0.04703153E-05 0.02393378E-09 0.02997096E-13 2 +-0.07983306E+06-0.05812192E+03 0.08215700E+02 0.03290751E+00-0.03764294E-03 3 + 0.02071053E-06-0.04369767E-10-0.07671145E+06-0.04245506E+02 4 +HCLCCCLO 40992H 1C 2 O 1CL 2G 0200.00 4000.00 1500.00 1 + 0.01282877E+03 0.02295631E-01-0.04601887E-05-0.02941710E-09 0.01148412E-12 2 +-0.01481358E+06-0.03708152E+03 0.03082763E+02 0.03013466E+00-0.03298082E-03 3 + 0.01776354E-06-0.03720337E-10-0.01177928E+06 0.01372635E+03 4 +HCLCCHO 53090C 2H 2O 1CL 1G 0200.00 5000.00 1500.00 1 + 0.01228193E+03 0.02136310E-01-0.03756942E-05-0.01347374E-09 0.05834907E-13 2 +-0.08447210E+05-0.03860056E+03 0.01544662E+02 0.02882431E+00-0.02921314E-03 3 + 0.01557811E-06-0.03358528E-10-0.04546644E+05 0.01905110E+03 4 +HCLSI(CH3)2 40992H 7C 2SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.01779932E+03 0.06864497E-01-0.06677913E-05-0.02916791E-08 0.05251096E-12 2 +-0.04235416E+06-0.06627844E+03 0.03428693E+02 0.03880542E+00-0.03118298E-03 3 + 0.01483918E-06-0.03097758E-10-0.03676770E+06 0.01220014E+03 4 +HCLSI(CH3)CH2 40992H 6C 2SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.01684996E+03 0.05769153E-01-0.06362653E-05-0.02117805E-08 0.04004912E-12 2 +-0.01692029E+06-0.05821970E+03 0.03518672E+02 0.03868692E+00-0.03578989E-03 3 + 0.01856940E-06-0.03976975E-10-0.01207708E+06 0.01340137E+03 4 +HCLSICH2 40992H 3C 1SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.01094639E+03 0.03063482E-01-0.04057563E-05-0.07933510E-09 0.01649546E-12 2 +-0.03161099E+05-0.03101113E+03 0.02331473E+02 0.02712338E+00-0.02843577E-03 3 + 0.01542443E-06-0.03288710E-10-0.03745104E+04 0.01417701E+03 4 +HCLSICH3 40992H 4C 1SI 1CL 1G 0200.00 4000.00 1500.00 1 + 0.01183446E+03 0.03802168E-01-0.04054360E-05-0.01478932E-08 0.02756845E-12 2 +-0.09669808E+05-0.03413556E+03 0.03061496E+02 0.02418432E+00-0.02072566E-03 3 + 0.01016711E-06-0.02124115E-10-0.06367089E+05 0.01342892E+03 4 +HCLSISI 40992H 1SI 2CL 1 G 0200.00 4000.00 1500.00 1 + 0.08766356E+02 0.08352699E-02-0.01828719E-05 0.04227080E-10 0.01924493E-13 2 + 0.03066829E+06-0.01515527E+03 0.05006777E+02 0.01170423E+00-0.01308663E-03 3 + 0.07173085E-07-0.01520111E-10 0.03183531E+06 0.04414009E+02 4 +HCN 110193H 1C 1N 1 G 0200.00 4000.00 1000.00 1 + 0.03426457E+02 0.03924190E-01-0.01601138E-04 0.03161966E-08-0.02432850E-12 2 + 0.01485552E+06 0.03607795E+02 0.02417787E+02 0.09031856E-01-0.01107727E-03 3 + 0.07980141E-07-0.02311141E-10 0.01501044E+06 0.08222891E+02 4 +HCNH 41687C 1H 2N 1 G 0200.00 4000.00 1000.00 1 + 0.04923293E+02 0.03332897E-01-0.03370897E-05-0.01901619E-08 0.03531825E-12 2 + 0.03132669E+06-0.01632509E+02 0.02759456E+02 0.06103387E-01 0.07713149E-05 3 +-0.02063094E-07 0.01931920E-11 0.03217247E+06 0.01057489E+03 4 +HCNO 120186H 1C 1N 1O 1G 0250.00 4000.00 1000.00 1 + 0.06692412E+02 0.02368360E-01-0.02371510E-05-0.01275503E-08 0.02407137E-12 2 + 0.01694737E+06-0.01245434E+03 0.03184859E+02 0.09752316E-01-0.01280203E-04 3 +-0.06163104E-07 0.03226275E-10 0.01797907E+06 0.06123844E+02 4 +HCO 121286H 1C 1O 1 G 0200.00 5000.00 1000.00 1 + 0.03557271E+02 0.03345573E-01-0.01335006E-04 0.02470573E-08-0.01713851E-12 2 + 0.03916324E+05 0.05552299E+02 0.02898330E+02 0.06199147E-01-0.09623084E-04 3 + 0.01089825E-06-0.04574885E-10 0.04159922E+05 0.08983614E+02 4 +HCO+ 121286H 1C 1O 1E -1G 0200.00 5000.00 1000.00 1 + 0.03692074E+02 0.03454732E-01-0.01316524E-04 0.02323551E-08-0.01554132E-12 2 + 0.09890941E+06 0.02330722E+02 0.02496483E+02 0.08690658E-01-0.01060445E-03 3 + 0.07882791E-07-0.02418385E-10 0.09915097E+06 0.08048178E+02 4 +HCOOH 103190C 1H 2O 2 G 0200.00 4000.00 1500.00 1 + 0.07959698E+02 0.03024532E-01-0.03434242E-05-0.01326767E-08 0.02520240E-12 2 +-0.05027445E+06-0.01872208E+03 0.09326031E+01 0.01891002E+00-0.01554964E-03 3 + 0.07290031E-07-0.01483695E-10-0.04760071E+06 0.01950653E+03 4 +HE 120186HE 1 G 0200.00 5000.00 1000.00 1 + 0.02500000E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.07453750E+04 0.09153489E+01 0.02500000E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00-0.07453750E+04 0.09153488E+01 4 +HE+ 120186HE 1E -1 G 0200.00 5000.00 1000.00 1 + 0.02500000E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 + 0.02853427E+07 0.01608405E+02 0.02500000E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00 0.02853427E+07 0.01608405E+02 4 +HF 121286H 1F 1 G 0200.00 5000.00 1000.00 1 + 0.02956767E+02 0.07721015E-02-0.09899833E-06-0.04993521E-10 0.01429331E-13 2 +-0.03361061E+06 0.04011673E+02 0.03431841E+02 0.04404166E-02-0.08828452E-05 3 + 0.06574516E-08-0.02055910E-12-0.03381977E+06 0.01238270E+02 4 +HG2BR2(S) 81292BR 2HG 2 S 0200.00 1500.00 1000.00 1 + 0.01131527E+03 0.05176237E-01-0.09149018E-05-0.01774353E-07 0.08208311E-11 2 +-0.02812664E+06-0.03960847E+03 0.09176256E+02 0.01716637E+00-0.02379101E-03 3 + 0.01656353E-06-0.04492058E-10-0.02787921E+06-0.03016915E+03 4 +HG2CL2(S) 81292CL 2HG 2 S 0200.00 1500.00 1000.00 1 + 0.01170237E+03 0.03242224E-01-0.01018772E-05-0.03745899E-08 0.04682208E-12 2 +-0.03555571E+06-0.04461773E+03 0.01002375E+03 0.01031694E+00-0.01160577E-03 3 + 0.08123549E-07-0.02343515E-10-0.03522627E+06-0.03658009E+03 4 +HG2F2(S) 81292F 2HG 2 S 0200.00 1500.00 1000.00 1 + 0.01156086E+03 0.03513290E-01-0.04228193E-06-0.06265655E-08 0.01191005E-11 2 +-0.06207291E+06-0.04780613E+03 0.01035013E+03 0.06139501E-01-0.03674693E-05 3 +-0.03011902E-07 0.01414143E-10-0.06172955E+06-0.04143495E+03 4 +HG2I2(S) 81292HG 2I 2 S 0200.00 1500.00 1000.00 1 + 0.01104021E+03 0.05724188E-01-0.09515335E-05-0.02149612E-07 0.09793057E-11 2 +-0.01777374E+06-0.03535439E+03 0.09788829E+02 0.01440390E+00-0.01844748E-03 3 + 0.01180869E-06-0.02911372E-10-0.01774167E+06-0.03032197E+03 4 +HGAET 62987GA 1C 2H 6 G 0200.00 1500.00 0600.00 1 + 0.06580152E+02 0.01610132E+00 0.05009546E-05-0.05185148E-07 0.01524085E-10 2 + 0.08765131E+05-0.04046067E+01 0.01163284E+02 0.03282213E+00 0.06765717E-04 3 +-0.06509541E-06 0.04835807E-09 0.09767174E+05 0.02588269E+03 4 +HGAET2 62987GA 1C 4H 11 G 0200.00 1500.00 0600.00 1 + 0.06511306E+02 0.02819754E+00 0.01418751E-04-0.09000947E-07 0.02572894E-10 2 +-0.04482180E+05 0.04709022E+02-0.01486576E+02 0.05217640E+00 0.01356342E-03 3 +-0.01011982E-05 0.07319854E-09-0.02985242E+05 0.04364749E+03 4 +HGAME 62987GA 1C 1H 4 G 0200.00 1500.00 0600.00 1 + 0.05318279E+02 0.09490931E-01 0.02277164E-05-0.03005070E-07 0.09037830E-11 2 + 0.01253534E+06-0.01065710E+01 0.01784750E+02 0.02058861E+00 0.03548509E-04 3 +-0.04111927E-06 0.03108978E-09 0.01318422E+06 0.01700702E+03 4 +HGAME2 62987GA 1C 2H 7 G 0200.00 1500.00 0600.00 1 + 0.06759398E+02 0.01426103E+00-0.01174024E-05-0.05001401E-07 0.01502785E-10 2 +-0.01473265E+05-0.02967135E+02 0.09039155E+01 0.03264779E+00 0.05389244E-04 3 +-0.06814504E-06 0.05150323E-09-0.03978242E+04 0.02539305E+03 4 +HGBR 81292BR 1HG 1 G 0200.00 5000.00 1000.00 1 + 0.04470182E+02 0.01740022E-02-0.01782286E-06 0.03639776E-10-0.02699461E-14 2 + 0.01118634E+06 0.07116504E+02 0.04325519E+02 0.06429246E-02-0.04527797E-05 3 + 0.04543436E-09 0.06863204E-12 0.01121730E+06 0.07833202E+02 4 +HGCL2 81292CL 2HG 1 G 0200.00 5000.00 1000.00 1 + 0.07251462E+02 0.03082143E-02-0.01447555E-05 0.02958294E-09-0.02201214E-13 2 +-0.01981231E+06-0.06061846E+02 0.06249130E+02 0.03221573E-01-0.02109668E-04 3 +-0.07713536E-08 0.08526178E-11-0.01958242E+06-0.01015613E+02 4 +HGCL2(S) 81292CL 2HG 1 S 0200.00 1500.00 1000.00 1 + 0.07750329E+02 0.03529253E-01 0.03886646E-06-0.08307839E-08 0.02781535E-11 2 +-0.03009787E+06-0.02772331E+03 0.07611778E+02 0.05084911E-01-0.02887606E-04 3 + 0.09093899E-08 0.04734468E-12-0.03015054E+06-0.02738100E+03 4 +HGF2 81292F 2HG 1 G 0200.00 5000.00 1000.00 1 + 0.06970407E+02 0.06373497E-02-0.02938029E-05 0.05925826E-09-0.04366956E-13 2 +-0.03751535E+06-0.08137829E+02 0.05155538E+02 0.05733727E-01-0.03667157E-04 3 +-0.01223692E-07 0.01370429E-10-0.03707844E+06 0.01073098E+02 4 +HGF2(S) 81292F 2HG 1 S 0200.00 2000.00 1000.00 1 + 0.08322627E+02 0.02317361E-01 0.02103511E-05-0.09665973E-09 0.01631405E-12 2 +-0.05342179E+06-0.03414006E+03 0.08250103E+02 0.02543387E-01-0.07218619E-06 3 + 0.08044224E-09-0.03175138E-12-0.05340276E+06-0.03377085E+03 4 +HGH 81292H 1HG 1 G 0200.00 5000.00 1000.00 1 + 0.03674353E+02 0.01116618E-01-0.03728888E-05 0.07077644E-09-0.04984356E-13 2 + 0.02745200E+06 0.04954799E+02 0.02859969E+02 0.03217363E-01-0.02993410E-04 3 + 0.02267118E-07-0.08671660E-11 0.02771287E+06 0.09273314E+02 4 +HGI 81292HG 1I 1 G 0200.00 5000.00 1000.00 1 + 0.04487935E+02 0.03041356E-02-0.07219846E-07 0.01468881E-10-0.01089820E-14 2 + 0.01470042E+06 0.08086309E+02 0.04411734E+02 0.05799910E-02-0.03475217E-05 3 + 0.01593090E-08-0.01730073E-12 0.01471610E+06 0.08458668E+02 4 +HGO 81292HG 1O 1 G 0200.00 5000.00 1000.00 1 + 0.04192036E+02 0.04176084E-02-0.01658976E-05 0.03318185E-09-0.02429647E-13 2 + 0.03713110E+05 0.04621457E+02 0.03235991E+02 0.03067171E-01-0.01992628E-04 3 +-0.04378690E-08 0.06018341E-11 0.03950193E+05 0.09495331E+02 4 +HGO(S) 81292HG 1O 1 S 0200.00 1000.00 1000.00 1 + 0.07146808E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.01350616E+06-0.03327734E+03 0.02854835E+02 0.01115052E+00-0.01160794E-03 3 + 0.06126729E-07-0.01377341E-10-0.01217635E+06-0.01067390E+03 4 +HMEGAET 62987GA 1C 3H 9 G 0200.00 1500.00 0600.00 1 + 0.07025463E+02 0.02564787E+00 0.09619100E-05-0.08403699E-07 0.02488960E-10 2 +-0.01361377E+05-0.03319484E+02-0.02079143E+02 0.05373076E+00 0.01181036E-03 3 +-0.01099855E-05 0.08189554E-09 0.03216961E+04 0.04086070E+03 4 +HN(OH)2 103190H 3N 1O 2 G 0200.00 4000.00 1500.00 1 + 0.09963640E+02 0.02864737E-01-0.03812930E-05-0.07443356E-09 0.01610124E-12 2 +-0.01662184E+06-0.02871770E+03 0.03244199E+01 0.02850544E+00-0.02753934E-03 3 + 0.01337294E-06-0.02571777E-10-0.01354499E+06 0.02201480E+03 4 +HN3 82687H 1N 3 G 0200.00 4000.00 1000.00 1 + 0.06023015E+02 0.02454362E-01-0.02404279E-05-0.01322973E-08 0.02474146E-12 2 + 0.03394051E+06-0.07015537E+02 0.03621003E+02 0.06030785E-01 0.04054460E-05 3 +-0.02545271E-07 0.06174280E-11 0.03482373E+06 0.06333769E+02 4 +HNC 92392H 1C 1N 1 G 0200.00 5000.00 1500.00 1 + 0.05283464E+02 0.01092476E-01-0.01170865E-05-0.02308672E-09 0.03950673E-13 2 + 0.02012958E+06-0.06388218E+02 0.03592377E+02 0.05561340E-01-0.05936823E-04 3 + 0.03782329E-07-0.09365092E-11 0.02079803E+06 0.02732160E+02 4 +HNCN 62790C 1H 1N 2 G 0200.00 4000.00 1500.00 1 + 0.07251951E+02 0.01587363E-01-0.01995579E-05-0.04841944E-09 0.09908280E-13 2 + 0.03563666E+06-0.01312080E+03 0.02951908E+02 0.01245028E+00-0.01161611E-03 3 + 0.05786108E-07-0.01175004E-10 0.03712483E+06 0.09811426E+02 4 +HNCNH 62790C 1H 2N 2 G 0200.00 4000.00 1500.00 1 + 0.08374143E+02 0.02366143E-01-0.03502324E-05-0.04391102E-09 0.01096859E-12 2 + 0.01461088E+06-0.02107393E+03 0.01001985E+02 0.02464016E+00-0.02759770E-03 3 + 0.01532472E-06-0.03268280E-10 0.01679368E+06 0.01694325E+03 4 +HNCO 110193H 1C 1N 1O 1G 0200.00 4000.00 1400.00 1 + 0.06545307E+02 0.01965760E-01-0.01562664E-05-0.01074318E-08 0.01874680E-12 2 +-0.01664773E+06-0.01003880E+03 0.03858467E+02 0.06390342E-01-0.09016628E-05 3 +-0.01898224E-07 0.07651380E-11-0.01562343E+06 0.04882493E+02 4 +HNF 42489H 1N 1F 1 G 0200.00 3000.00 1000.00 1 + 0.04133219E+02 0.01912057E-01-0.01625330E-05-0.01726461E-08 0.03743691E-12 2 + 0.01467052E+06 0.03292122E+02 0.03249761E+02 0.03261818E-01 0.04355642E-06 3 +-0.01100277E-07 0.02926757E-11 0.01499126E+06 0.08187434E+02 4 +HNF2 42489H 1N 1F 2 G 0200.00 3000.00 1000.00 1 + 0.05704866E+02 0.03049897E-01-0.02826803E-05-0.02923185E-08 0.06551055E-12 2 +-0.09107488E+05-0.03941332E+02 0.02572812E+02 0.08762144E-01-0.02326921E-05 3 +-0.05000826E-07 0.02143838E-10-0.08086760E+05 0.01300681E+03 4 +HNNHO 103190H 2N 2O 1 G 0200.00 4000.00 1500.00 1 + 0.07462348E+02 0.03113521E-01-0.02614534E-05-0.01394601E-08 0.02363352E-12 2 + 0.07517607E+05-0.01619293E+03 0.07974964E+01 0.01693171E+00-0.01141086E-03 3 + 0.04201242E-07-0.06926417E-11 0.01010665E+06 0.02038765E+03 4 +HNNO 103190H 1N 2O 1 G 0200.00 4000.00 1500.00 1 + 0.06991217E+02 0.01875970E-01-0.02124584E-05-0.06710472E-09 0.01230508E-12 2 + 0.02497566E+06-0.01123523E+03 0.02238298E+02 0.01359200E+00-0.01179873E-03 3 + 0.05392971E-07-0.01010859E-10 0.02660259E+06 0.01413679E+03 4 +HNNONO 10891H 1N 3O 2 G 0200.00 4000.00 1500.00 1 + 0.01246747E+03 0.02018438E-01-0.03674474E-05-0.03459117E-09 0.01090810E-12 2 + 0.02452278E+06-0.03868309E+03 0.02642670E+02 0.02625418E+00-0.02477878E-03 3 + 0.01184374E-06-0.02298757E-10 0.02793182E+06 0.01383705E+03 4 +HNO 121286H 1N 1O 1 G 0200.00 5000.00 1000.00 1 + 0.03615144E+02 0.03212486E-01-0.01260337E-04 0.02267298E-08-0.01536236E-12 2 + 0.01066191E+06 0.04810264E+02 0.02784403E+02 0.06609646E-01-0.09300223E-04 3 + 0.09437980E-07-0.03753146E-10 0.01091878E+06 0.09035629E+02 4 +HNO2 103190H 1N 1O 2 G 0200.00 4000.00 1500.00 1 + 0.06479630E+02 0.01995274E-01-0.01740387E-05-0.09695872E-09 0.01701480E-12 2 +-0.09999271E+05-0.01067286E+03 0.01934838E+02 0.01010036E+00-0.04964616E-04 3 + 0.08701120E-08-0.02324135E-13-0.08105484E+05 0.01473250E+03 4 +HNO3 121286H 1N 1O 3 G 0200.00 5000.00 1000.00 1 + 0.07003845E+02 0.05811493E-01-0.02333789E-04 0.04288814E-08-0.02959385E-12 2 +-0.01889952E+06-0.01047863E+03 0.01353185E+02 0.02220025E+00-0.01978812E-03 3 + 0.08773908E-07-0.01658384E-10-0.01738563E+06 0.01851868E+03 4 +HNOH 102290H 2N 1O 1 G 0200.00 4000.00 1500.00 1 + 0.06396134E+02 0.01821067E-01-0.01870892E-05-0.07844472E-09 0.01444855E-12 2 + 0.07859615E+05-0.01040479E+03 0.02125274E+02 0.01066282E+00-0.07602589E-04 3 + 0.03081642E-07-0.05726498E-11 0.09553544E+05 0.01309672E+03 4 +HO2 20387H 1O 2 G 0200.00 5000.00 1000.00 1 + 0.04072191E+02 0.02131296E-01-0.05308145E-05 0.06112269E-09-0.02841165E-13 2 +-0.01579727E+04 0.03476029E+02 0.02979963E+02 0.04996697E-01-0.03790997E-04 3 + 0.02354192E-07-0.08089024E-11 0.01762274E+04 0.09222724E+02 4 +HOCH2OH 103190C 1H 4O 2 G 0200.00 4000.00 1500.00 1 + 0.01089048E+03 0.04000443E-01-0.04729597E-05-0.01295970E-08 0.02552658E-12 2 +-0.05347440E+06-0.03540623E+03-0.06548874E+01 0.03377715E+00-0.03157595E-03 3 + 0.01532216E-06-0.02994259E-10-0.04963411E+06 0.02579207E+03 4 +HOCL 40992H 1 O 1CL 1 G 0200.00 4000.00 1500.00 1 + 0.04953150E+02 0.01100053E-01-0.01256296E-05-0.03349951E-09 0.06464506E-13 2 +-0.01114737E+06-0.06838384E+01 0.02861399E+02 0.07134484E-01-0.07311028E-04 3 + 0.03980236E-07-0.08506421E-11-0.01049306E+06 0.01021485E+03 4 +HOCN 110193H 1C 1N 1O 1G 0200.00 4000.00 1400.00 1 + 0.06022112E+02 0.01929530E-01-0.01455029E-05-0.01045811E-08 0.01794814E-12 2 +-0.04040321E+05-0.05866433E+02 0.03789424E+02 0.05387981E-01-0.06518270E-05 3 +-0.01420164E-07 0.05367969E-11-0.03135335E+05 0.06667052E+02 4 +HOCO 103190C 1H 1O 2 G 0200.00 4000.00 1500.00 1 + 0.07517634E+02 0.01259029E-01-0.01910901E-05-0.03136391E-09 0.07547673E-13 2 +-0.02634121E+06-0.01448392E+03 0.02285122E+02 0.01351435E+00-0.01160407E-03 3 + 0.05047011E-07-0.09032231E-11-0.02448416E+06 0.01367874E+03 4 +HONO 31787H 1N 1O 2 G 0200.00 5000.00 1000.00 1 + 0.05486893E+02 0.04218065E-01-0.01649143E-04 0.02971877E-08-0.02021148E-12 2 +-0.01126865E+06-0.02997002E+02 0.02290413E+02 0.01409922E+00-0.01367872E-03 3 + 0.07498780E-07-0.01876905E-10-0.01043195E+06 0.01328077E+03 4 +HONO2 103190H 1N 1O 3 G 0200.00 4000.00 1500.00 1 + 0.09756148E+02 0.01900948E-01-0.03240020E-05-0.03976639E-09 0.01100334E-12 2 +-0.01942244E+06-0.02690023E+03 0.07877668E+01 0.02382329E+00-0.02205964E-03 3 + 0.01034048E-06-0.01972857E-10-0.01630442E+06 0.02108964E+03 4 +HSI(CH3)2 61991H 7C 2SI 1 G 0200.00 2500.00 1500.00 1 + 0.01220942E+03 0.09173338E-01-0.01186653E-05-0.01188590E-07 0.02418110E-11 2 + 0.03781464E+05-0.03668250E+03 0.02568267E+02 0.03071446E+00-0.01863911E-03 3 + 0.06210373E-07-0.09376544E-11 0.07271919E+05 0.01551808E+03 4 +HSI(CH3)2CH2 61991H 9C 3SI 1 G 0200.00 2500.00 1500.00 1 + 0.01723999E+03 0.01101475E+00-0.01546410E-05-0.01338650E-07 0.02653453E-11 2 +-0.02842083E+05-0.06077749E+03 0.03367732E+02 0.04430759E+00-0.03246598E-03 3 + 0.01379387E-06-0.02586752E-10 0.02041653E+05 0.01367000E+03 4 +HSI(CH3)3 61991H 10C 3SI 1 G 0200.00 2500.00 1500.00 1 + 0.01689903E+03 0.01338224E+00-0.01538243E-05-0.01746233E-07 0.03550375E-11 2 +-0.02740327E+06-0.06121112E+03 0.03224459E+02 0.04373614E+00-0.02597404E-03 3 + 0.08415742E-07-0.01236561E-10-0.02243583E+06 0.01289306E+03 4 +HSI(NH2)2 22790SI 1H 5N 2 G 0200.00 4000.00 1000.00 1 + 0.01171677E+03 0.05339021E-01-0.04667824E-05-0.02824087E-08 0.05080916E-12 2 +-0.01264169E+05-0.03245118E+03 0.06289699E+02 0.01675060E+00-0.01520878E-04 3 +-0.01070065E-06 0.05538641E-10 0.03154771E+04-0.03746008E+02 4 +HSI(NH2)3 22790SI 1H 7N 3 G 0200.00 4000.00 1000.00 1 + 0.01661406E+03 0.07395874E-01-0.06440010E-05-0.03918887E-08 0.07045959E-12 2 +-0.03859547E+06-0.05865318E+03 0.07070983E+02 0.02754435E+00-0.02603669E-04 3 +-0.01874567E-06 0.09778511E-10-0.03582658E+06-0.08209675E+02 4 +HSIC 61991H 1C 1SI 1 G 0200.00 2500.00 1500.00 1 + 0.05849544E+02 0.07628346E-02-0.09974130E-06-0.03811586E-09 0.08581471E-13 2 + 0.09097438E+06-0.04862062E+02 0.03761288E+02 0.06108070E-01-0.05721172E-04 3 + 0.02805116E-07-0.05597709E-11 0.09168219E+06 0.06236756E+02 4 +HSICCH 61991H 2C 2SI 1 G 0200.00 2500.00 1500.00 1 + 0.09098096E+02 0.02292999E-01-0.01278589E-05-0.01869017E-08 0.03514532E-12 2 + 0.04933532E+06-0.02153271E+03 0.03799881E+02 0.01633703E+00-0.01551299E-03 3 + 0.07880591E-07-0.01619982E-10 0.05109468E+06 0.06475363E+02 4 +HSICH2 61991H 3C 1SI 1 G 0200.00 2500.00 1500.00 1 + 0.08641686E+02 0.02535259E-01-0.01532829E-05-0.02418416E-08 0.04870000E-12 2 + 0.03962671E+06-0.02128790E+03 0.02376883E+02 0.01822864E+00-0.01641260E-03 3 + 0.07937691E-07-0.01590356E-10 0.04179768E+06 0.01215211E+03 4 +HSICH3 61991H 4C 1SI 1 G 0200.00 2500.00 1500.00 1 + 0.07578257E+02 0.05000398E-01-0.08706991E-06-0.06516750E-08 0.01344446E-11 2 + 0.02138075E+06-0.01438961E+03 0.02658293E+02 0.01547950E+00-0.08319889E-04 3 + 0.02184355E-07-0.02302844E-11 0.02319822E+06 0.01240552E+03 4 +HSICL 121986SI 1H 1CL 1 G 0200.00 2000.00 1000.00 1 + 0.04900628E+02 0.01981752E-01-0.03634647E-05-0.02285211E-08 0.07633527E-12 2 + 0.06914634E+05 0.01377004E+02 0.03072748E+02 0.09057843E-01-0.01159134E-03 3 + 0.08310477E-07-0.02483000E-10 0.07324210E+05 0.01033490E+03 4 +HSIN 22790H 1SI 1N 1 G 0200.00 4000.00 1000.00 1 + 0.05746590E+02 0.01167119E-01-0.01360742E-05-0.05908617E-09 0.01174696E-12 2 + 0.04484671E+06-0.05931788E+02 0.04865176E+02 0.01775119E-01 0.04890870E-05 3 + 0.03922383E-08-0.07913276E-11 0.04526353E+06-0.07134509E+01 4 +HSINH 42489SI 1H 2N 1 G 0200.00 3000.00 1000.00 1 + 0.06493435E+02 0.02567980E-01-0.03126526E-05-0.02577467E-08 0.06216479E-12 2 + 0.04035934E+06-0.07830112E+02 0.03566343E+02 0.08446736E-01-0.07699952E-05 3 +-0.05270970E-07 0.02581065E-10 0.04124904E+06 0.07780791E+02 4 +HSINH2 42489SI 1N 1H 3 G 0200.00 3000.00 1000.00 1 + 0.06177894E+02 0.04689964E-01-0.03583294E-05-0.04457980E-08 0.09379187E-12 2 + 0.01091277E+06-0.07006672E+02 0.02716144E+02 0.01204278E+00-0.09827195E-05 3 +-0.07408477E-07 0.03789792E-10 0.01190771E+06 0.01126252E+03 4 +HSISICL 40992H 1SI 2CL 1 G 0200.00 4000.00 1500.00 1 + 0.09242357E+02 0.07265211E-02-0.02039730E-05-0.03559737E-10 0.04236577E-13 2 + 0.03651789E+06-0.01714597E+03 0.05753464E+02 0.01000321E+00-0.01097056E-03 3 + 0.06117942E-07-0.01351102E-10 0.03773825E+06 0.01395110E+02 4 +I*C3H7 120186C 3H 7 G 0200.00 5000.00 1000.00 1 + 0.08063369E+02 0.01574488E+00-0.05182392E-04 0.07477245E-08-0.03854422E-12 2 + 0.05313871E+05-0.02192647E+03 0.01713300E+02 0.02542616E+00 0.01580808E-04 3 +-0.01821286E-06 0.08827710E-10 0.07535809E+05 0.01297901E+03 4 +K 81092K 1 G 0200.00 5000.00 1000.00 1 + 0.02563720E+02-0.01453656E-02 0.01223794E-05-0.05337797E-09 0.01196251E-12 2 + 0.09958933E+05 0.04689090E+02 0.02599395E+02-0.06665192E-02 0.01537419E-04 3 +-0.01462701E-07 0.04917226E-11 0.09968534E+05 0.04606125E+02 4 +K(L) 81092K 1 L 0200.00 2000.00 1000.00 1 + 0.03274152E+02-0.08858241E-03 0.03862458E-05 0.01524701E-08-0.07158116E-12 2 +-0.05365253E+04-0.09686786E+02 0.04883188E+02-0.05109876E-01 0.08368289E-04 3 +-0.07183867E-07 0.02694974E-10-0.01014822E+05-0.01801753E+03 4 +K+ 81092K 1E -1 G 0200.00 5000.00 1000.00 1 + 0.02500252E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 + 0.06110476E+06 0.04335097E+02 0.02500252E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00 0.06110476E+06 0.04335097E+02 4 +K2 81092K 2 G 0200.00 5000.00 1000.00 1 + 0.04493744E+02 0.02561175E-02-0.03738461E-07 0.07392168E-11-0.05314252E-15 2 + 0.01393386E+06 0.04344696E+02 0.04445378E+02 0.04507960E-02-0.02923572E-05 3 + 0.01874060E-08-0.04441270E-12 0.01394330E+06 0.04577300E+02 4 +K2B4O7(S) 81292B 4K 2O 7 S 0200.00 2000.00 1000.00 1 + 0.02241821E+03 0.01632758E+00-0.03423961E-04-0.01996427E-07 0.07329643E-11 2 +-0.04092750E+07-0.01095459E+04-0.02998519E+02 0.01131803E+01-0.01363625E-02 3 + 0.07498933E-06-0.01475027E-09-0.04041216E+07 0.01385206E+03 4 +K2B6O10(S) 81292B 6K 2O 10 S 0200.00 2000.00 1000.00 1 + 0.03118760E+03 0.02605101E+00-0.07109914E-04-0.01524101E-07 0.08605891E-11 2 +-0.05702715E+07-0.01601394E+04 0.08964822E+02 0.01355307E+01-0.02844741E-02 3 + 0.03136564E-05-0.01242126E-08-0.05641143E+07-0.05121922E+03 4 +K2B8O13(S) 81292B 8K 2O 13 S 0200.00 2000.00 1000.00 1 + 0.04112535E+03 0.02714051E+00 0.01343626E-04-0.04965544E-07 0.09664300E-11 2 +-0.07315279E+07-0.02135898E+04 0.02800687E+03 0.02363518E+00 0.05436592E-03 3 +-0.04802017E-06 0.07622581E-10-0.07248984E+07-0.01332889E+04 4 +K2CO3(S) 81292C 1K 2O 3 S 0200.00 2000.00 1000.00 1 + 0.01170935E+03 0.01041619E+00 0.01020812E-04-0.05155670E-08 0.09388472E-12 2 +-0.01424670E+07-0.05154899E+03 0.06680495E+02 0.03154875E+00-0.03258348E-03 3 + 0.02341080E-06-0.06331882E-10-0.01414994E+07-0.02751031E+03 4 +K2H2O2 81292H 2K 2O 2 G 0200.00 5000.00 1000.00 1 + 0.09476007E+02 0.05520012E-01-0.02003512E-04 0.03416984E-08-0.02230089E-12 2 +-0.08204786E+06-0.01665546E+03 0.06069657E+02 0.01657159E+00-0.01641134E-03 3 + 0.09628012E-07-0.02546013E-10-0.08118152E+06 0.05625929E+01 4 +K2O(S) 81092K 2O 1 S 0200.00 2000.00 1000.00 1 + 0.09200109E+02 0.04813529E-01-0.01018656E-04 0.08972973E-08-0.02121417E-11 2 +-0.04671154E+06-0.04264142E+03 0.02640315E+02 0.04577225E+00-0.09349357E-03 3 + 0.08921012E-06-0.03044898E-09-0.04583697E+06-0.01392763E+03 4 +K2O2(S) 81092K 2O 2 S 0200.00 2000.00 1000.00 1 + 0.01094138E+03 0.06102309E-01 0.08639951E-05-0.02383978E-08 0.01021959E-12 2 +-0.06335114E+06-0.05099447E+03 0.08940024E+02 0.01225014E+00-0.08065365E-04 3 + 0.07182271E-07-0.02627561E-10-0.06277485E+06-0.04066683E+03 4 +K2SO4 81092K 2O 4S 1 G 0200.00 5000.00 1000.00 1 + 0.01526056E+03 0.04272701E-01-0.01902870E-04 0.03745009E-08-0.02710228E-12 2 +-0.01368994E+07-0.04548655E+03 0.06620770E+02 0.02753542E+00-0.01909671E-03 3 +-0.04668391E-08 0.03385142E-10-0.01346318E+07-0.01043411E+02 4 +K2SO4(A) 81092K 2O 4S 1 S 0200.00 1200.00 1000.00 1 + 0.01112054E+03 0.01688473E+00 0.02694884E-04-0.06810694E-07 0.03326950E-10 2 +-0.01771853E+07-0.04766545E+03 0.05610137E+02 0.05334319E+00-0.08680538E-03 3 + 0.08485600E-06-0.02978756E-09-0.01763645E+07-0.02358624E+03 4 +K2SO4(B) 81092K 2O 4S 1 S 0200.00 1500.00 1000.00 1 + 0.01400625E+03 0.08639256E-01 0.01734839E-04-0.01101018E-07 0.02493181E-11 2 +-0.01758863E+07-0.05931899E+03 0.01384030E+03 0.09154258E-01 0.01580722E-04 3 +-0.01673984E-07 0.06273504E-11-0.01758589E+07-0.05851410E+03 4 +K3CL6AL(S) 81292AL 1CL 6K 3 S 0200.00 2000.00 1000.00 1 + 0.02692199E+03 0.01202448E+00 0.05058586E-06-0.02459252E-07 0.06112274E-11 2 +-0.02602720E+07-0.01118533E+04 0.02756025E+03 0.01980910E-01 0.02914285E-03 3 +-0.03306608E-06 0.01153111E-09-0.02601182E+07-0.01132925E+04 4 +K3CL9AL2(S) 81292AL 2CL 9K 3 S 0200.00 1500.00 1000.00 1 + 0.04789960E+03-0.03698524E-01 0.01208277E-04 0.06439299E-07-0.01714364E-10 2 +-0.03594776E+07-0.02186357E+04 0.03685728E+03 0.02754220E-01 0.05087779E-03 3 +-0.06808868E-06 0.02773367E-09-0.03554758E+07-0.01561649E+04 4 +K3F6AL(S) 81292AL 1F 6K 3 S 0200.00 2000.00 1000.00 1 + 0.02557611E+03 0.01452585E+00-0.02005301E-04-0.01843642E-07 0.05259736E-11 2 +-0.04090259E+07-0.01172057E+04 0.01633462E+03 0.05150368E+00-0.07128115E-03 3 + 0.06274052E-06-0.02251868E-09-0.04067185E+07-0.07147460E+03 4 +KBF4 81292B 1F 4K 1 G 0200.00 5000.00 1000.00 1 + 0.01230182E+03 0.04142506E-01-0.01820830E-04 0.03550730E-08-0.02552394E-12 2 +-0.01910389E+07-0.03449073E+03 0.05358002E+02 0.02295803E+00-0.01721231E-03 3 + 0.02466718E-07 0.01382599E-10-0.01891819E+07 0.01299769E+02 4 +KBO2 81292B 1K 1O 2 G 0200.00 5000.00 1000.00 1 + 0.07506115E+02 0.02663024E-01-0.01134505E-04 0.02165299E-08-0.01532624E-12 2 +-0.08364206E+06-0.08262075E+02 0.04636629E+02 0.01088843E+00-0.09865937E-04 3 + 0.04481115E-07-0.09043993E-11-0.08286314E+06 0.06500684E+02 4 +KBO2(S) 81292B 1K 1O 2 S 0200.00 2000.00 1000.00 1 + 0.07971486E+02 0.06730890E-01-0.01544574E-04-0.09972352E-08 0.04052630E-11 2 +-0.01227148E+07-0.03858371E+03 0.01603821E+02 0.03275175E+00-0.04757948E-03 3 + 0.03848067E-06-0.01269093E-09-0.01212629E+07-0.07486101E+02 4 +KBR 81292BR 1K 1 G 0200.00 5000.00 1000.00 1 + 0.04458711E+02 0.01473836E-02-0.02499466E-06 0.05161851E-10-0.03875234E-14 2 +-0.02300303E+06 0.04657488E+02 0.04270624E+02 0.07398923E-02-0.05320569E-05 3 +-0.05894879E-10 0.01133094E-11-0.02296215E+06 0.05593031E+02 4 +KBR(L) 81292BR 1K 1 L 0200.00 2500.00 1000.00 1 + 0.08404630E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.04779214E+06-0.03519115E+03 0.08404630E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00-0.04779214E+06-0.03519115E+03 4 +KBR(S) 81292BR 1K 1 S 0200.00 1500.00 1000.00 1 +-0.05170830E+02 0.01746852E+00 0.01013392E-04-0.07494241E-07 0.02378879E-10 2 +-0.04495981E+06 0.03946532E+03 0.05431605E+02 0.03845234E-01-0.03455247E-04 3 +-0.09685064E-09 0.02470977E-10-0.04912882E+06-0.02040493E+03 4 +KCL 81092CL 1K 1 G 0200.00 5000.00 1000.00 1 + 0.04434967E+02 0.01726721E-02-0.03865868E-06 0.07943251E-10-0.05932801E-14 2 +-0.02716306E+06 0.03398542E+02 0.04149517E+02 0.01039142E-01-0.07034589E-05 3 +-0.01200715E-08 0.02112008E-11-0.02709960E+06 0.04826011E+02 4 +KCL(L) 81092CL 1K 1 L 0200.00 2000.00 1000.00 1 + 0.08852542E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.05337392E+06-0.04001344E+03 0.08852542E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00-0.05337392E+06-0.04001344E+03 4 +KCL(S) 81092CL 1K 1 S 0200.00 1500.00 1000.00 1 + 0.01391136E+01 0.07749002E-01 0.02100056E-04-0.01960861E-07 0.03813962E-12 2 +-0.05188544E+06 0.09020889E+02 0.05818812E+02-0.05778791E-02 0.09593293E-04 3 +-0.01468548E-06 0.07916702E-10-0.05429399E+06-0.02336092E+03 4 +KCL4AL(S) 81292AL 1CL 4K 1 S 0200.00 2000.00 1000.00 1 + 0.02311946E+03 0.01525936E-01-0.06380630E-06-0.04176163E-08 0.01306884E-11 2 +-0.01521618E+07-0.01113391E+04 0.01753111E+03-0.03647218E-01 0.03673018E-03 3 +-0.03613268E-06 0.09813280E-10-0.01492592E+07-0.07647553E+03 4 +KCLO4(S) 81092CL 1K 1O 4 S 0200.00 1500.00 1000.00 1 + 0.01704025E+03 0.06660737E-01-0.06016704E-05 0.09785776E-08-0.05059647E-11 2 +-0.05676480E+06-0.08085843E+03-0.08468085E+02 0.01228758E+01-0.02129487E-02 3 + 0.01790606E-05-0.05694776E-09-0.05181381E+06 0.04005509E+03 4 +KCN 81092C 1K 1N 1 G 0200.00 5000.00 1000.00 1 + 0.05842749E+02 0.01653475E-01-0.06722096E-05 0.01241081E-08-0.08573718E-13 2 + 0.07711161E+05-0.03406482E+02 0.05315387E+02 0.03936776E-01-0.05387426E-04 3 + 0.04814072E-07-0.01739264E-10 0.07842257E+05-0.08199391E+01 4 +KCN(L) 81092C 1K 1N 1 L 0200.00 3000.00 1000.00 1 + 0.09058883E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.01522798E+06-0.03545687E+03 0.09058883E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00-0.01522798E+06-0.03545687E+03 4 +KCN(S) 81092C 1K 1N 1 S 0200.00 2000.00 1000.00 1 + 0.07894013E+02 0.02150449E-02-0.01621315E-05 0.06831993E-09-0.01060712E-12 2 +-0.01600422E+06-0.02964975E+03 0.08115453E+02-0.08847082E-02 0.01981085E-04 3 +-0.01804607E-07 0.05974163E-11-0.01604356E+06-0.03067895E+03 4 +KF 81292F 1K 1 G 0200.00 5000.00 1000.00 1 + 0.04357120E+02 0.02586241E-02-0.08236973E-06 0.01676907E-09-0.01243132E-13 2 +-0.04063861E+06 0.02285054E+02 0.03798984E+02 0.01885430E-01-0.01210870E-04 3 +-0.03741075E-08 0.04494632E-11-0.04051013E+06 0.05095577E+02 4 +KF(L) 81292F 1K 1 L 0200.00 3000.00 1000.00 1 + 0.08656265E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.06927377E+06-0.04118344E+03 0.08656265E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00-0.06927377E+06-0.04118343E+03 4 +KF(S) 81292F 1K 1 S 0200.00 2000.00 1000.00 1 + 0.03272299E+01 0.08993195E-01-0.03094381E-06-0.02624963E-07 0.07101532E-11 2 +-0.06804909E+06 0.05309298E+02 0.06190467E+02-0.05622034E-01 0.02294401E-03 3 +-0.02818213E-06 0.01204436E-09-0.07014057E+06-0.02637925E+03 4 +KH 81092H 1K 1 G 0200.00 5000.00 1000.00 1 + 0.03968138E+02 0.07086924E-02-0.02618517E-05 0.05096044E-09-0.03655452E-13 2 + 0.01350120E+06 0.08027413E+01 0.02900121E+02 0.03518317E-01-0.02544774E-04 3 + 0.04599961E-08 0.01286229E-11 0.01379667E+06 0.06342766E+02 4 +KH(S) 81092H 1K 1 S 0200.00 1500.00 1000.00 1 + 0.05864564E+02 0.01204909E-01 0.02825877E-06 0.03559937E-08-0.02515747E-11 2 +-0.09079129E+05-0.02848776E+03 0.05248775E+01 0.02016870E+00-0.02768125E-03 3 + 0.02024240E-06-0.06052568E-10-0.07796234E+05-0.01890097E+02 4 +KI 81092I 1K 1 G 0200.00 5000.00 1000.00 1 + 0.04470767E+02 0.01359027E-02-0.01768799E-06 0.03648327E-10-0.02733674E-14 2 +-0.01644198E+06 0.05528315E+02 0.04327901E+02 0.05945793E-02-0.04409470E-05 3 + 0.04559572E-09 0.06522621E-12-0.01641095E+06 0.06237795E+02 4 +KI(L) 81092I 1K 1 L 0200.00 2500.00 1000.00 1 + 0.08706593E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.04022598E+06-0.03588112E+03 0.08706593E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00-0.04022598E+06-0.03588112E+03 4 +KI(S) 81092I 1K 1 S 0200.00 2000.00 1000.00 1 + 0.01442913E+02 0.09802845E-01-0.01380615E-04-0.02325573E-07 0.07600708E-11 2 +-0.03988335E+06 0.02717618E+02 0.05114120E+02 0.08508960E-01-0.02212545E-03 3 + 0.02836093E-06-0.01155892E-09-0.04120049E+06-0.01812497E+03 4 +KO 81092K 1O 1 G 0200.00 5000.00 1000.00 1 + 0.04400291E+02 0.02386787E-02-0.05880047E-06 0.01206713E-09-0.09006961E-14 2 + 0.07217110E+05 0.03434775E+02 0.03985333E+02 0.01469353E-01-0.09479054E-05 3 +-0.02419141E-08 0.03264700E-11 0.07311120E+05 0.05517902E+02 4 +KO- 81092K 1O 1E 1 G 0200.00 5000.00 1000.00 1 + 0.04394805E+02 0.02418371E-02-0.06146423E-06 0.01255348E-09-0.09326869E-14 2 +-0.01794565E+06 0.02053687E+02 0.03961007E+02 0.01526099E-01-0.09806386E-05 3 +-0.02666917E-08 0.03470232E-11-0.01784737E+06 0.04231682E+02 4 +KO2(S) 81092K 1O 2 S 0200.00 1500.00 1000.00 1 + 0.01049310E+03 0.01397618E-01-0.06976643E-05 0.03477427E-08-0.01222708E-11 2 +-0.03767516E+06-0.04607321E+03 0.04023244E+02 0.02903561E+00-0.04812416E-03 3 + 0.03816613E-06-0.01168231E-09-0.03635805E+06-0.01502191E+03 4 +KOH 81092H 1K 1O 1 G 0200.00 2000.00 1000.00 1 + 0.09996477E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.05262511E+06-0.04533806E+03 0.09996477E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00-0.05262511E+06-0.04533805E+03 4 +KOH+ 81092H 1K 1O 1E -1G 0200.00 5000.00 1000.00 1 + 0.05583889E+02 0.01372118E-01-0.04239710E-05 0.06231942E-09-0.03548772E-13 2 + 0.05821436E+06-0.02017959E+02 0.05036081E+02 0.04278173E-01-0.04213406E-04 3 + 0.01114253E-07 0.03757057E-11 0.05823345E+06 0.03093667E+01 4 +ME2GAET 62987GA 1C 4H 11 G 0200.00 1500.00 0600.00 1 + 0.07174541E+02 0.03235532E+00 0.01495199E-04-0.01048226E-06 0.03053962E-10 2 +-0.06383914E+05-0.02026765E+02-0.03218207E+02 0.06398884E+00 0.01554552E-03 3 +-0.01284710E-05 0.09441259E-09-0.04451897E+05 0.04848091E+03 4 +MEGAET 62987GA 1C 3H 8 G 0200.00 1500.00 0600.00 1 + 0.06600990E+02 0.02284791E+00 0.01013375E-04-0.07318046E-07 0.02140197E-10 2 + 0.04071593E+05 0.05239052E+01-0.08169937E+01 0.04554296E+00 0.01053133E-03 3 +-0.09079987E-06 0.06700564E-09 0.05448005E+05 0.03655502E+03 4 +MEGAET2 62987GA 1C 5H 13 G 0200.00 1500.00 0600.00 1 + 0.08123156E+02 0.03978908E+00 0.01690979E-04-0.01308415E-06 0.03852599E-10 2 +-0.08091057E+05-0.05039992E+02-0.05607499E+02 0.08187357E+00 0.01920530E-03 3 +-0.01678979E-05 0.01243354E-08-0.05546688E+05 0.06163371E+03 4 +MG 81292MG 1 G 0200.00 5000.00 1000.00 1 + 0.02392633E+02 0.02085925E-02-0.01269898E-05 0.02553204E-09-0.04502495E-14 2 + 0.01704914E+06 0.04211876E+02 0.02416375E+02 0.05325518E-02-0.01135514E-04 3 + 0.09757325E-08-0.02898280E-11 0.01701992E+06 0.03983786E+02 4 +MG(L) 81292MG 1 L 0200.00 2500.00 1000.00 1 + 0.02664314E+02 0.01304526E-01-0.07547418E-07 0.06776047E-10-0.01436523E-13 2 + 0.02234430E+04-0.01047801E+03 0.02161491E+02 0.04242991E-01-0.06464607E-04 3 + 0.06116790E-07-0.02090033E-10 0.02996028E+04-0.08229090E+02 4 +MG(S) 81292MG 1 S 0200.00 2000.00 1000.00 1 + 0.02318547E+02 0.01929427E-01-0.01682130E-05 0.04131403E-09-0.01669293E-13 2 +-0.07634172E+04-0.09802473E+02 0.01505637E+02 0.09217769E-01-0.01955590E-03 3 + 0.02020331E-06-0.07251403E-10-0.07226661E+04-0.06689818E+02 4 +MG+ 81292MG 1E -1 G 0200.00 5000.00 1000.00 1 + 0.02504405E+02-0.08920014E-04 0.06671727E-07-0.02081615E-10 0.02311490E-14 2 + 0.01064936E+07 0.04292208E+02 0.02498282E+02 0.01465863E-03-0.03808341E-06 3 + 0.04118195E-09-0.01573362E-12 0.01064953E+07 0.04322873E+02 4 +MG2 81292MG 2 G 0200.00 5000.00 1000.00 1 + 0.03671278E+02-0.02125120E-02 0.01013096E-05-0.02144628E-09 0.01719351E-13 2 + 0.03362331E+06 0.08548934E+02 0.04345606E+02-0.02080614E-01 0.01110301E-04 3 + 0.08675645E-08-0.07025087E-11 0.03346530E+06 0.05134171E+02 4 +MG2BR4 81292BR 4MG 2 G 0200.00 5000.00 1000.00 1 + 0.01577579E+03 0.02832096E-02-0.01343784E-05 0.02764443E-09-0.02066139E-13 2 +-0.09710095E+06-0.03457961E+03 0.01476089E+03 0.03361559E-01-0.02433120E-04 3 +-0.05502974E-08 0.08111758E-11-0.09687714E+06-0.02950851E+03 4 +MG2C3(S) 81292C 3MG 2 S 0200.00 2500.00 1000.00 1 + 0.01239169E+03 0.04624400E-01-0.02484800E-04 0.08656213E-08-0.01151950E-11 2 + 0.05393315E+05-0.06051988E+03-0.01026610E+02 0.07016433E+00-0.01240220E-02 3 + 0.01009934E-05-0.03082738E-09 0.07664551E+05 0.01701243E+02 4 +MG2F4 81292F 4MG 2 G 0200.00 5000.00 1000.00 1 + 0.01441927E+03 0.01917749E-01-0.08894670E-05 0.01801607E-08-0.01331627E-12 2 +-0.02113316E+07-0.04283410E+03 0.08770948E+02 0.01784847E+00-0.01109718E-03 3 +-0.04603306E-07 0.04695460E-10-0.02099919E+07-0.01422645E+03 4 +MGAL2O4(S) 81292AL 2MG 1O 4 S 0200.00 2800.00 1000.00 1 + 0.01495895E+03 0.08818509E-01-0.03160711E-04 0.01013391E-07-0.01228526E-11 2 +-0.02817956E+07-0.07811436E+03-0.04868005E+02 0.01055641E+01-0.01821902E-02 3 + 0.01481432E-05-0.04514191E-09-0.02784436E+07 0.01382603E+03 4 +MGB2(S) 81292B 2MG 1 S 0200.00 2000.00 1000.00 1 + 0.06619755E+02 0.01322195E-01 0.04697857E-05 0.03681802E-08-0.01739753E-11 2 +-0.01346401E+06-0.03460640E+03 0.04176086E+02 0.06396544E-01-0.05616456E-04 3 + 0.07092297E-07-0.03442529E-10-0.01255609E+06-0.02118159E+03 4 +MGBR 81292BR 1MG 1 G 0200.00 5000.00 1000.00 1 + 0.04385933E+02 0.01975075E-02-0.06117347E-06 0.01027103E-09-0.03876260E-14 2 +-0.05584836E+05 0.04357095E+02 0.03932960E+02 0.01518559E-01-0.09413456E-05 3 +-0.03806534E-08 0.04026288E-11-0.05481871E+05 0.06634707E+02 4 +MGBR2 81292BR 2MG 1 G 0200.00 5000.00 1000.00 1 + 0.07282371E+02 0.02671005E-02-0.01246470E-05 0.02534839E-09-0.01878437E-13 2 +-0.03865522E+06-0.05463838E+02 0.06436183E+02 0.02723204E-01-0.01828290E-04 3 +-0.05509276E-08 0.06681264E-11-0.03845914E+06-0.01198273E+02 4 +MGBR2+ 81292BR 2MG 1E -1 G 0200.00 5000.00 1000.00 1 + 0.07317323E+02 0.02252288E-02-0.01039562E-05 0.02025280E-09-0.01333602E-13 2 + 0.08575141E+06-0.03144653E+02 0.06600891E+02 0.02322271E-01-0.01575443E-04 3 +-0.04621806E-08 0.05719750E-11 0.08591576E+06 0.04604670E+01 4 +MGC2(S) 81292C 2MG 1 S 0200.00 2500.00 1000.00 1 + 0.07427011E+02 0.02786444E-01-0.01500518E-04 0.05235992E-08-0.06981197E-12 2 + 0.08069270E+05-0.03697419E+03-0.06510206E+01 0.04230993E+00-0.07491559E-03 3 + 0.06109534E-06-0.01867195E-09 0.09434739E+05 0.04708862E+01 4 +MGCL 81292CL 1MG 1 G 0200.00 5000.00 1000.00 1 + 0.04335941E+02 0.02574531E-02-0.09346352E-06 0.01898185E-09-0.01405830E-13 2 +-0.06564693E+05 0.03214818E+02 0.03708081E+02 0.02069048E-01-0.01328293E-04 3 +-0.04347061E-08 0.05033764E-11-0.06418555E+05 0.06382778E+02 4 +MGCL2 81292CL 2MG 1 G 0200.00 5000.00 1000.00 1 + 0.07176871E+02 0.03917414E-02-0.01814155E-05 0.03670114E-09-0.02710187E-13 2 +-0.04941693E+06-0.07830507E+02 0.06000831E+02 0.03745347E-01-0.02447708E-04 3 +-0.07873749E-08 0.09100925E-11-0.04913880E+06-0.01880677E+02 4 +MGCL2(S) 81292CL 2MG 1 S 0200.00 2000.00 1000.00 1 + 0.08460549E+02 0.02204761E-01-0.06316590E-05 0.02617815E-08-0.05082748E-12 2 +-0.07983216E+06-0.03816537E+03 0.04852236E+02 0.02102714E+00-0.03667994E-03 3 + 0.03032449E-06-0.09279303E-10-0.07928891E+06-0.02175204E+03 4 +MGCO3(S) 81292C 1MG 1O 3 S 0200.00 1000.00 1000.00 1 + 0.01585340E+03 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.01402924E+07-0.08639698E+03 0.01344667E+02 0.03695912E+00-0.04452165E-03 3 + 0.03181716E-06-0.09745892E-10-0.01354278E+07-0.09041713E+02 4 +MGF 81292F 1MG 1 G 0200.00 5000.00 1000.00 1 + 0.04166004E+02 0.04434929E-02-0.01720072E-05 0.03280565E-09-0.02190876E-13 2 +-0.02980270E+06 0.02577443E+02 0.03172942E+02 0.03157075E-01-0.02008009E-04 3 +-0.04636928E-08 0.06097890E-11-0.02955269E+06 0.07654193E+02 4 +MGF2 81292F 2MG 1 G 0200.00 5000.00 1000.00 1 + 0.06314408E+02 0.08013760E-02-0.03622602E-05 0.07202929E-09-0.05250556E-13 2 +-0.08944590E+06-0.05637362E+02 0.04365511E+02 0.06150098E-01-0.04077014E-04 3 +-0.07490467E-08 0.01130754E-10-0.08895505E+06 0.04323487E+02 4 +MGF2(S) 81292F 2MG 1 S 0200.00 2000.00 1000.00 1 + 0.08170168E+02 0.02353222E-01-0.01060785E-04 0.02392788E-08-0.01594861E-12 2 +-0.01379692E+07-0.04083052E+03 0.01762995E+02 0.03056669E+00-0.04933989E-03 3 + 0.03778577E-06-0.01108964E-09-0.01367476E+07-0.01039233E+03 4 +MGF2+ 81292F 2MG 1E -1 G 0200.00 5000.00 1000.00 1 + 0.06819974E+02 0.08267521E-02-0.03871799E-05 0.07864547E-09-0.05589085E-13 2 + 0.06903427E+06-0.08313943E+02 0.04782002E+02 0.06580736E-01-0.04470059E-04 3 +-0.08656625E-08 0.01305586E-10 0.06953005E+06 0.02038302E+02 4 +MGH 81292H 1MG 1 G 0200.00 5000.00 1000.00 1 + 0.03501857E+02 0.01196289E-01-0.04870483E-05 0.09616032E-09-0.06566165E-13 2 + 0.01915847E+06 0.02762077E+02 0.02929127E+02 0.02881565E-01-0.03702138E-04 3 + 0.03761425E-07-0.01569289E-10 0.01935649E+06 0.05809553E+02 4 +MGH2(S) 81292H 2MG 1 S 0200.00 2000.00 1000.00 1 + 0.04503751E+02 0.05009365E-01-0.07076169E-05-0.09321345E-08 0.03016174E-11 2 +-0.01106837E+06-0.02418625E+03-0.09052193E+00 0.01938007E+00-0.01936573E-03 3 + 0.01164904E-06-0.03397887E-10-0.09845471E+05-0.07606392E+01 4 +MGH2O2 81292H 2MG 1O 2 G 0200.00 5000.00 1000.00 1 + 0.08302454E+02 0.03712996E-01-0.01279645E-04 0.02102831E-08-0.01337217E-12 2 +-0.07153173E+06-0.01640682E+03 0.04724303E+02 0.01611746E+00-0.01291007E-03 3 + 0.05703660E-08 0.02430663E-10-0.07085783E+06 0.09898885E+01 4 +MGH2O2(S) 81292H 2MG 1O 2 S 0200.00 1000.00 1000.00 1 + 0.01381001E+03 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.01162998E+07-0.07323205E+03-0.04220693E+02 0.07726916E+00-0.01383568E-02 3 + 0.01155986E-05-0.03648025E-09-0.01123883E+07 0.01381610E+03 4 +MGN 81292MG 1N 1 G 0200.00 5000.00 1000.00 1 + 0.04177825E+02 0.04387980E-02-0.01726040E-05 0.03444124E-09-0.02516521E-13 2 + 0.03340716E+06 0.02969357E+02 0.03200092E+02 0.03139739E-01-0.02045035E-04 3 +-0.04125930E-08 0.05937391E-11 0.03365107E+06 0.07958522E+02 4 +MGO(S) 81292MG 1O 1 S 0200.00 4000.00 1000.00 1 + 0.04857470E+02 0.01952289E-01-0.08605956E-05 0.02101340E-08-0.01886027E-12 2 +-0.07394488E+06-0.02524503E+03 0.01971740E+02 0.01095483E+00-0.08169910E-04 3 +-0.06359402E-08 0.02019714E-10-0.07332016E+06-0.01088662E+03 4 +MGOH 81292H 1MG 1O 1 G 0200.00 5000.00 1000.00 1 + 0.05156858E+02 0.01849251E-01-0.06339213E-05 0.01026031E-08-0.06282974E-13 2 +-0.02145938E+06-0.02774689E+02 0.03347871E+02 0.08101305E-01-0.06443066E-04 3 + 0.02006805E-08 0.01261718E-10-0.02111816E+06 0.06024177E+02 4 +MGOH+ 81292H 1MG 1O 1E -1G 0200.00 5000.00 1000.00 1 + 0.05171484E+02 0.01835998E-01-0.06314934E-05 0.01036229E-08-0.06583402E-13 2 + 0.06865354E+06-0.03526109E+02 0.03383351E+02 0.08055572E-01-0.06452790E-04 3 + 0.02400212E-08 0.01246873E-10 0.06898753E+06 0.05158118E+02 4 +MGS 81292MG 1S 1 G 0200.00 5000.00 1000.00 1 + 0.01071331E+03-0.06086042E-01 0.02390833E-04-0.04174042E-08 0.02737530E-12 2 + 0.01317442E+06-0.03521998E+03 0.03789723E+02-0.03985028E-01 0.02217192E-03 3 +-0.01858825E-06 0.03239714E-10 0.01635406E+06 0.05868810E+02 4 +MGS(S) 81292MG 1S 1 S 0200.00 3000.00 1000.00 1 + 0.05581918E+02 0.08031267E-02-0.01812239E-05 0.04113088E-09-0.02798069E-13 2 +-0.04331716E+06-0.02607368E+03 0.04076152E+02 0.07088011E-01-0.09604458E-04 3 + 0.06056009E-07-0.01373560E-10-0.04304232E+06-0.01890776E+03 4 +MGSO4(S) 81292MG 1O 4S 1 S 0200.00 2500.00 1000.00 1 + 0.08845820E+02 0.01221900E+00-0.02141897E-04-0.09580988E-08 0.02954552E-11 2 +-0.01549512E+07-0.04302983E+03 0.02258418E+02 0.04788929E+00-0.07110586E-03 3 + 0.05630850E-06-0.01709008E-09-0.01540505E+07-0.01345647E+03 4 +N 120186N 1 G 0200.00 5000.00 1000.00 1 + 0.02450268E+02 0.01066146E-02-0.07465337E-06 0.01879652E-09-0.01025984E-13 2 + 0.05611604E+06 0.04448758E+02 0.02503071E+02-0.02180018E-03 0.05420529E-06 3 +-0.05647560E-09 0.02099904E-12 0.05609890E+06 0.04167566E+02 4 +N*C3H7 120186C 3H 7 G 0200.00 5000.00 1000.00 1 + 0.07978291E+02 0.01576113E+00-0.05173243E-04 0.07443892E-08-0.03824978E-12 2 + 0.07579402E+05-0.01935611E+03 0.01922537E+02 0.02478927E+00 0.01810249E-04 3 +-0.01783266E-06 0.08582996E-10 0.09713281E+05 0.01399271E+03 4 +N2 121286N 2 G 0200.00 5000.00 1000.00 1 + 0.02926640E+02 0.01487977E-01-0.05684761E-05 0.01009704E-08-0.06753351E-13 2 +-0.09227977E+04 0.05980528E+02 0.03298677E+02 0.01408240E-01-0.03963222E-04 3 + 0.05641515E-07-0.02444855E-10-0.01020900E+05 0.03950372E+02 4 +N2H2 121286N 2H 2 G 0200.00 5000.00 1000.00 1 + 0.03371185E+02 0.06039968E-01-0.02303854E-04 0.04062789E-08-0.02713144E-12 2 + 0.02418172E+06 0.04980585E+02 0.01617999E+02 0.01306312E+00-0.01715712E-03 3 + 0.01605608E-06-0.06093639E-10 0.02467526E+06 0.01379467E+03 4 +N2H3 120186N 2H 3 G 0200.00 5000.00 1000.00 1 + 0.04441846E+02 0.07214271E-01-0.02495684E-04 0.03920565E-08-0.02298950E-12 2 + 0.01664221E+06-0.04275205E+01 0.03174204E+02 0.04715907E-01 0.01334867E-03 3 +-0.01919685E-06 0.07487564E-10 0.01727270E+06 0.07557224E+02 4 +N2H4 121286N 2H 4 G 0200.00 5000.00 1000.00 1 + 0.04977317E+02 0.09595519E-01-0.03547639E-04 0.06124299E-08-0.04029795E-12 2 + 0.09341219E+05-0.02962990E+02 0.06442606E+00 0.02749730E+00-0.02899451E-03 3 + 0.01745240E-06-0.04422282E-10 0.01045192E+06 0.02127789E+03 4 +N2H4(L) 90589H 4N 2 L 0200.00 0600.00 0450.00 1 + 0.08890683E+02 0.08330343E-01 0.04945549E-04-0.04909251E-08-0.03355824E-10 2 + 0.03032250E+05-0.03871433E+03 0.09047444E+02 0.09241592E-01 0.02263547E-04 3 +-0.08952247E-07 0.01486863E-09 0.02970393E+05-0.03974034E+03 4 +N2O 121286N 2O 1 G 0200.00 5000.00 1000.00 1 + 0.04718977E+02 0.02873714E-01-0.01197496E-04 0.02250552E-08-0.01575337E-12 2 + 0.08165811E+05-0.01657250E+02 0.02543058E+02 0.09492193E-01-0.09792775E-04 3 + 0.06263845E-07-0.01901826E-10 0.08765100E+05 0.09511222E+02 4 +N2O+ 121286N 2O 1E -1 G 0200.00 5000.00 1000.00 1 + 0.05398516E+02 0.02249478E-01-0.09577057E-05 0.01823193E-08-0.01284422E-12 2 + 0.01584851E+07-0.03733146E+02 0.03187228E+02 0.08350714E-01-0.07894549E-04 3 + 0.04597445E-07-0.01381075E-10 0.01591279E+07 0.07779426E+02 4 +N2O4 121286N 2O 4 G 0200.00 5000.00 1000.00 1 + 0.01048220E+03 0.05972272E-01-0.02564044E-04 0.04916885E-08-0.03490969E-12 2 +-0.02849989E+05-0.02612289E+03 0.03624593E+02 0.02474708E+00-0.02172875E-03 3 + 0.09927104E-07-0.02222817E-10-0.09128241E+04 0.09457174E+02 4 +N3 121286N 3 G 0200.00 5000.00 1000.00 1 + 0.05208505E+02 0.02444507E-01-0.01038941E-04 0.01977417E-08-0.01395644E-12 2 + 0.04796178E+06-0.03612756E+02 0.02882219E+02 0.08930338E-01-0.08539038E-04 3 + 0.05045585E-07-0.01521248E-10 0.04863468E+06 0.08481757E+02 4 +NA 80792NA 1 G 0200.00 5000.00 1000.00 1 + 0.02574480E+02-0.01605880E-02 0.01250641E-05-0.04516576E-09 0.06941745E-13 2 + 0.01219129E+06 0.03830900E+02 0.02591348E+02-0.05961520E-02 0.01327651E-04 3 +-0.01211123E-07 0.03890067E-11 0.01220642E+06 0.03841789E+02 4 +NA(L) 81092NA 1 L 0200.00 2000.00 1000.00 1 + 0.04030581E+02-0.01320419E-01 0.04136604E-05 0.05486936E-08-0.01916626E-11 2 +-0.07899189E+04-0.01548589E+03 0.04682137E+02-0.03624112E-01 0.04776195E-04 3 +-0.03871514E-07 0.01518150E-10-0.09807172E+04-0.01881830E+03 4 +NA+ 80792NA 1E -1 G 0200.00 5000.00 1000.00 1 + 0.02500252E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 + 0.07260903E+06 0.03538490E+02 0.02500252E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00 0.07260904E+06 0.03538490E+02 4 +NA2 80792NA 2 G 0200.00 5000.00 1000.00 1 + 0.04480669E+02 0.02178011E-02-0.01102830E-06 0.02208498E-10-0.01614866E-14 2 + 0.01519313E+06 0.02073203E+02 0.04369675E+02 0.05850265E-02-0.03825359E-05 3 + 0.08752245E-09 0.02980178E-12 0.01521703E+06 0.02622521E+02 4 +NA2B4O7(S) 81292B 4NA 2O 7 S 0200.00 2000.00 1000.00 1 + 0.02061542E+03 0.01728323E+00-0.04016503E-04-0.07600982E-08 0.05580242E-11 2 +-0.04014288E+07-0.01006093E+04 0.01430907E+02 0.01167214E+01-0.02000861E-02 3 + 0.01698028E-05-0.05418888E-09-0.03982982E+07-0.01265829E+03 4 +NA2B6O10(S) 81292B 6NA 2O 10 S 0200.00 2000.00 1000.00 1 + 0.02989617E+03 0.03053411E+00-0.02146684E-04-0.04458443E-07 0.09406424E-11 2 +-0.05638429E+07-0.01571271E+04 0.09347958E+02 0.08948274E+00-0.01024848E-02 3 + 0.01015647E-05-0.04314482E-09-0.05570116E+07-0.04828430E+03 4 +NA2C2N2 81292C 2N 2NA 2 G 0200.00 5000.00 1000.00 1 + 0.01253426E+03 0.03485206E-01-0.01426483E-04 0.02648455E-08-0.01838071E-12 2 +-0.05033986E+05-0.03087649E+03 0.01092445E+03 0.09724206E-01-0.01190420E-03 3 + 0.08942515E-07-0.02847524E-10-0.04654688E+05-0.02294170E+03 4 +NA2F2 80792F 2NA 2 G 0200.00 5000.00 1000.00 1 + 0.09265403E+02 0.09044011E-02-0.04233919E-05 0.08630666E-09-0.06408558E-13 2 +-0.01047310E+07-0.01880290E+03 0.06422050E+02 0.09031559E-01-0.05593408E-04 3 +-0.02581729E-07 0.02547837E-10-0.01040718E+07-0.04453081E+02 4 +NA2H2O2 80792H 2NA 2O 2 G 0200.00 5000.00 1000.00 1 + 0.09347846E+02 0.05678318E-01-0.02077824E-04 0.03568716E-08-0.02342868E-12 2 +-0.07634945E+06-0.01850110E+03 0.05441492E+02 0.01814821E+00-0.01733029E-03 3 + 0.09077551E-07-0.02055174E-10-0.07536770E+06 0.01240430E+02 4 +NA2O(L) 81092NA 2O 1 L 0200.00 3000.00 1000.00 1 + 0.01258178E+03 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.04859891E+06-0.06066678E+03 0.01258178E+03 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00-0.04859891E+06-0.06066677E+03 4 +NA2O(S) 81092NA 2O 1 S 0200.00 2000.00 1000.00 1 + 0.08804423E+02 0.03253428E-01-0.03530522E-05-0.04324117E-08 0.01394574E-11 2 +-0.05257507E+06-0.04209654E+03 0.04776964E+02 0.01483269E+00-0.01052247E-03 3 + 0.01278469E-07 0.01046187E-10-0.05155651E+06-0.02156737E+03 4 +NA2O2 81092NA 2O 2 S 0200.00 2500.00 1000.00 1 + 0.01382402E+03-0.03556455E-02 0.02837263E-05-0.09701692E-09 0.01205762E-12 2 +-0.06583802E+06-0.06789536E+03 0.08035418E+02 0.05983777E-01 0.01935571E-03 3 +-0.03410482E-06 0.01439706E-09-0.06395152E+06-0.03604480E+03 4 +NA2SO4 80792NA 2O 4S 1 G 0200.00 5000.00 1000.00 1 + 0.01506456E+03 0.04508233E-01-0.02011474E-04 0.03963989E-08-0.02871466E-12 2 +-0.01296053E+07-0.04683857E+03 0.05752581E+02 0.02964118E+00-0.02035211E-03 3 +-0.01073243E-07 0.03960597E-10-0.01271767E+07 0.01016246E+02 4 +NA2SO4(D) 81092NA 2O 4S 1 S 0200.00 1500.00 1000.00 1 + 0.01062092E+03 0.01179912E+00 0.03608537E-04-0.03424054E-09-0.09650399E-11 2 +-0.01684493E+07-0.04191208E+03 0.01187237E+03 0.04287018E+00-0.09072926E-03 3 + 0.09042235E-06-0.02940634E-09-0.01707163E+07-0.05750085E+03 4 +NA2SO4(i) 81092NA 2O 4S 1 S 0200.00 1500.00 1000.00 1 + 0.01711668E+03 0.05878399E-01 0.01196697E-04 0.01676018E-08-0.02640822E-11 2 +-0.01714447E+07-0.07997372E+03 0.01674756E+03 0.01133662E+00-0.01526634E-03 3 + 0.01819548E-06-0.06918027E-10-0.01714932E+07-0.07899648E+03 4 +NA2SO4(iii) 81092NA 2O 4S 1 S 0200.00 1000.00 1000.00 1 + 0.03701786E+03 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.01854858E+07-0.02084472E+04 0.01413394E+03-0.01694491E+00 0.09403022E-03 3 +-0.07815722E-06 0.02395583E-09-0.01707247E+07-0.06037737E+03 4 +NA2SO4(iv) 81092NA 2O 4S 1 S 0200.00 1000.00 1000.00 1 + 0.02590382E+03 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.01779857E+07-0.01365608E+04 0.05917499E+02 0.04507074E+00-0.05672574E-03 3 + 0.04596655E-06-0.01432523E-09-0.01702527E+07-0.02694892E+03 4 +NA2SO4(v) 81092NA 2O 4S 1 S 0200.00 1000.00 1000.00 1 + 0.02590382E+03 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.01780169E+07-0.01366284E+04 0.05917499E+02 0.04507074E+00-0.05672574E-03 3 + 0.04596655E-06-0.01432523E-09-0.01702840E+07-0.02701654E+03 4 +NA3CL6AL(S) 81292AL 1CL 6NA 3 S 0200.00 2000.00 1000.00 1 + 0.02863182E+03 0.08169580E-01 0.01787040E-05-0.09984084E-08 0.01787581E-11 2 +-0.02473307E+07-0.01246570E+04 0.02610594E+03 0.09148861E-01 0.09743193E-04 3 +-0.01296166E-06 0.04124132E-10-0.02462808E+07-0.01099689E+04 4 +NA3F6AL(S) 81292AL 1F 6NA 3 S 0200.00 1200.00 1000.00 1 + 0.01867366E+03 0.02426805E+00 0.01311169E-04-0.01223061E-06 0.06326451E-10 2 +-0.04056682E+07-0.08492075E+03 0.01182130E+03 0.07831376E+00-0.01387551E-02 3 + 0.01331742E-05-0.04620547E-09-0.04049948E+07-0.05693419E+03 4 +NABH4(S) 81292B 1H 4NA 1 S 0200.00 2000.00 1000.00 1 + 0.08204329E+02 0.01008304E+00-0.01032261E-04-0.02815504E-07 0.09005147E-11 2 +-0.02614390E+06-0.03790153E+03 0.08076391E+02 0.05407829E-01 0.01208139E-03 3 +-0.01450540E-06 0.04279918E-10-0.02580298E+06-0.03584760E+03 4 +NABO2 81092B 1NA 1O 2 G 0200.00 5000.00 1000.00 1 + 0.07449052E+02 0.02730088E-01-0.01165145E-04 0.02226924E-08-0.01578063E-12 2 +-0.08056425E+06-0.09194809E+02 0.04413702E+02 0.01144045E+00-0.01021892E-03 3 + 0.04340556E-07-0.07548787E-11-0.07974780E+06 0.06401325E+02 4 +NABO2(S) 81292B 1NA 1O 2 S 0200.00 2000.00 1000.00 1 + 0.07820448E+02 0.06702746E-01-0.01488126E-04-0.01033983E-07 0.04130615E-11 2 +-0.01203511E+07-0.03848530E+03 0.01695994E+02 0.03131723E+00-0.04453876E-03 3 + 0.03572163E-06-0.01178195E-09-0.01189335E+07-0.08471359E+02 4 +NABR 81092BR 1NA 1 G 0200.00 5000.00 1000.00 1 + 0.04424304E+02 0.01887477E-02-0.04500799E-06 0.09226701E-10-0.06871650E-14 2 +-0.01865205E+06 0.03707466E+02 0.04097639E+02 0.01170972E-01-0.07798224E-05 3 +-0.01611608E-08 0.02489549E-11-0.01857889E+06 0.05343556E+02 4 +NABR(L) 81292BR 1NA 1 L 0200.00 2500.00 1000.00 1 + 0.07498742E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 +-0.04305332E+06-0.03017306E+03 0.07498742E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00-0.04305333E+06-0.03017306E+03 4 +NABR(S) 81292BR 1NA 1 S 0200.00 2000.00 1000.00 1 + 0.05741811E+02 0.01766697E-01-0.01899553E-05 0.01473021E-09 0.01715605E-12 2 +-0.04526151E+06-0.02279248E+03 0.04706446E+02 0.08010188E-01-0.01346175E-03 3 + 0.01196933E-06-0.03873765E-10-0.04513442E+06-0.01826015E+03 4 +NACH 80792C 1N 1NA 1 G 0200.00 5000.00 1000.00 1 + 0.05791865E+02 0.01708993E-01-0.06965832E-05 0.01288980E-08-0.08921502E-13 2 + 0.09496355E+05-0.04320624E+02 0.05123989E+02 0.04411283E-01-0.05682223E-04 3 + 0.04664804E-07-0.01593603E-10 0.09657925E+05-0.01032367E+02 4 +NACL 81092CL 1NA 1 G 0200.00 5000.00 1000.00 1 + 0.04393820E+02 0.02153336E-02-0.06198756E-06 0.01266879E-09-0.09427806E-14 2 +-0.02315864E+06 0.02486064E+02 0.03953003E+02 0.01514187E-01-0.09819465E-05 3 +-0.02807090E-08 0.03543574E-11-0.02305831E+06 0.04701214E+02 4 +NACL(S) 81092CL 1NA 1 S 0200.00 1500.00 1000.00 1 + 0.07639640E+02-0.03933726E-01 0.02071020E-04 0.04233998E-07-0.02204761E-10 2 +-0.05163684E+06-0.03397957E+03 0.04982695E+02 0.05432908E-01-0.07698454E-04 3 + 0.06300821E-07-0.01211800E-10-0.05112201E+06-0.02104512E+03 4 +NACL4AL(S) 81292AL 1CL 4NA 1 S 0200.00 2000.00 1000.00 1 + 0.02138498E+03 0.03252454E-01-0.01769716E-05-0.07072990E-08 0.01928080E-11 2 +-0.01447874E+07-0.01021539E+04 0.01588411E+03 0.04527768E-01 0.02409928E-03 3 +-0.03108224E-06 0.01051706E-09-0.01424874E+07-0.07002475E+03 4 +NACN 81092C 1N 1NA 1 G 0200.00 5000.00 1000.00 1 + 0.05791865E+02 0.01708993E-01-0.06965832E-05 0.01288980E-08-0.08921502E-13 2 + 0.09496355E+05-0.04320624E+02 0.05123989E+02 0.04411283E-01-0.05682223E-04 3 + 0.04664804E-07-0.01593603E-10 0.09657925E+05-0.01032367E+02 4 +NACN(S) 81292C 1N 1NA 1 S 0200.00 2000.00 1000.00 1 + 0.08137501E+02 0.03044670E-02-0.01811052E-05 0.08281245E-09-0.01435891E-12 2 +-0.01334049E+06-0.03217693E+03 0.08239171E+02-0.05281579E-03 0.03829305E-05 3 +-0.03800801E-08 0.01401136E-11-0.01336670E+06-0.03268830E+03 4 +NAF 80792F 1NA 1 G 0200.00 5000.00 1000.00 1 + 0.04289078E+02 0.03377828E-02-0.01184403E-05 0.02398348E-09-0.01772778E-13 2 +-0.03626513E+06 0.01538309E+02 0.03532346E+02 0.02495132E-01-0.01587195E-04 3 +-0.04836335E-08 0.05739804E-11-0.03608573E+06 0.05367920E+02 4 +NAF2- 81092F 2NA 1E 1 G 0200.00 5000.00 1000.00 1 + 0.07032279E+02 0.05655084E-02-0.02615340E-05 0.05285863E-09-0.03900402E-13 2 +-0.08272088E+06-0.01028459E+03 0.05382830E+02 0.05231638E-01-0.03350411E-04 3 +-0.01169983E-07 0.01291137E-10-0.08232816E+06-0.01928436E+02 4 +NAF4AL 81092AL 1F 4NA 1 G 0200.00 5000.00 1000.00 1 + 0.01407161E+03 0.02285303E-01-0.01043457E-04 0.02090484E-08-0.01532874E-12 2 +-0.02260449E+07-0.04013149E+03 0.08103421E+02 0.01881143E+00-0.01205279E-03 3 +-0.03477927E-07 0.04123038E-10-0.02245760E+07-0.09731781E+02 4 +NAH 80792H 1NA 1 G 0200.00 5000.00 1000.00 1 + 0.03818649E+02 0.08597439E-02-0.03202059E-05 0.06146711E-09-0.04364567E-13 2 + 0.01368120E+06 0.04367959E+01 0.02864363E+02 0.03308582E-01-0.02753919E-04 3 + 0.01399522E-07-0.04032581E-11 0.01396756E+06 0.05450493E+02 4 +NAI(S) 81292I 1NA 1 S 0200.00 2000.00 1000.00 1 + 0.05987605E+02 0.01342139E-01-0.03807255E-06 0.01660138E-09-0.06066889E-13 2 +-0.03648630E+06-0.02270427E+03 0.05407032E+02 0.04235908E-01-0.05679955E-04 3 + 0.04941357E-07-0.01602135E-10-0.03638396E+06-0.02000921E+03 4 +NAO 80792NA 1O 1 G 0200.00 5000.00 1000.00 1 + 0.04349803E+02 0.02849959E-02-0.08615992E-06 0.01754054E-09-0.01301677E-13 2 + 0.08731694E+05 0.02618339E+02 0.03765728E+02 0.01980031E-01-0.01256303E-04 3 +-0.03909831E-08 0.04664039E-11 0.08866889E+05 0.05562273E+02 4 +NAO- 80792NA 1O 1E 1 G 0200.00 5000.00 1000.00 1 + 0.04343846E+02 0.02955424E-02-0.08923111E-06 0.01813572E-09-0.01343290E-13 2 +-0.01592823E+06 0.01245911E+02 0.03740064E+02 0.02044313E-01-0.01291719E-04 3 +-0.04080754E-08 0.04823669E-11-0.01578820E+06 0.04290303E+02 4 +NAO2(S) 81092NA 1O 2 S 0200.00 2000.00 1000.00 1 + 0.07379480E+02 0.04377048E-01 0.06355202E-05-0.03238946E-08 0.06014399E-12 2 +-0.03376432E+06-0.02946090E+03 0.07236605E+02 0.04751740E-01 0.03458707E-05 3 +-0.02971627E-08 0.09124652E-12-0.03372514E+06-0.02872050E+03 4 +NAO2AL(S) 81292AL 1NA 1O 2 S 0200.00 3000.00 1000.00 1 + 0.09963634E+02 0.02329677E-01-0.08188510E-07 0.02070425E-09-0.02306699E-12 2 +-0.01394255E+07-0.04932653E+03 0.03669741E+02 0.02226343E+00-0.01558734E-03 3 +-0.03446683E-07 0.05383614E-10-0.01381199E+07-0.01818990E+03 4 +NAOH 80792H 1NA 1O 1 G 0200.00 5000.00 1000.00 1 + 0.05527852E+02 0.01420623E-01-0.04439615E-05 0.06635639E-09-0.03866820E-13 2 +-0.02545869E+06-0.04374785E+02 0.04727895E+02 0.05001262E-01-0.04534391E-04 3 + 0.07051240E-08 0.06671123E-11-0.02537947E+06-0.07649678E+01 4 +NAOH(L) 81092H 1NA 1O 1 L 0200.00 2500.00 1000.00 1 + 0.01061400E+03-0.03116447E-02-0.02964198E-05 0.05475463E-09 0.01021178E-12 2 +-0.05327943E+06-0.05120959E+03 0.01079389E+03-0.08545728E-02 0.03780039E-05 3 +-0.03848777E-08 0.01384542E-11-0.05332840E+06-0.05213201E+03 4 +NAOH+ 80792H 1NA 1O 1E -1G 0200.00 5000.00 1000.00 1 + 0.05570452E+02 0.01387979E-01-0.04311444E-05 0.06372652E-09-0.03648954E-13 2 + 0.07985595E+06-0.02878876E+02 0.04974624E+02 0.04424591E-01-0.04296418E-04 3 + 0.01067747E-07 0.04168198E-11 0.07988680E+06-0.03068088E+01 4 +NCN 103190C 1N 2 G 0200.00 4000.00 1500.00 1 + 0.06652121E+02 0.06108034E-02-0.01389727E-05 0.02695549E-10 0.01669944E-13 2 + 0.05172403E+06-0.01138517E+03 0.03101270E+02 0.09981674E-01-0.09920701E-04 3 + 0.04758919E-07-0.08968626E-11 0.05285757E+06 0.07317579E+02 4 +NCO 110193C 1N 1O 1 G 0200.00 4000.00 1400.00 1 + 0.06072346E+02 0.09227829E-02-0.09845574E-06-0.04764123E-09 0.09090445E-13 2 + 0.01359820E+06-0.08507293E+02 0.03359593E+02 0.05393239E-01-0.08144585E-05 3 +-0.01912868E-07 0.07836794E-11 0.01462809E+06 0.06549694E+02 4 +NF 121286N 1F 1 G 0200.00 5000.00 1000.00 1 + 0.03862177E+02 0.07551806E-02-0.03044943E-05 0.05874447E-09-0.04187479E-13 2 + 0.02867243E+06 0.03457233E+02 0.02871947E+02 0.03312193E-01-0.02691159E-04 3 + 0.01121951E-07-0.02475131E-11 0.02896257E+06 0.08640247E+02 4 +NFO 121286N 1F 1O 1 G 0200.00 5000.00 1000.00 1 + 0.05174520E+02 0.01938472E-01-0.08222701E-05 0.01564291E-08-0.01104497E-12 2 +-0.09670935E+05-0.05352461E+01 0.03352307E+02 0.07229966E-01-0.06951137E-04 3 + 0.03828526E-07-0.01023558E-10-0.09167035E+05 0.08854189E+02 4 +NFO2 121286N 1F 1O 2 G 0200.00 5000.00 1000.00 1 + 0.06816857E+02 0.03462640E-01-0.01492216E-04 0.02869665E-08-0.02041857E-12 2 +-0.01560262E+06-0.09320129E+02 0.02447529E+02 0.01544110E+00-0.01300595E-03 3 + 0.04856383E-07-0.06852266E-11-0.01439400E+06 0.01328360E+03 4 +NH 31387H 1N 1 G 0200.00 5000.00 1000.00 1 + 0.02760249E+02 0.01375346E-01-0.04451914E-05 0.07692792E-09-0.05017592E-13 2 + 0.04207828E+06 0.05857199E+02 0.03339758E+02 0.01253009E-01-0.03491646E-04 3 + 0.04218812E-07-0.01557618E-10 0.04185047E+06 0.02507181E+02 4 +NH2 121686N 1H 2 G 0200.00 5000.00 1000.00 1 + 0.02961311E+02 0.02932699E-01-0.09063600E-05 0.01617257E-08-0.01204200E-12 2 + 0.02191977E+06 0.05777878E+02 0.03432493E+02 0.03299540E-01-0.06613600E-04 3 + 0.08590947E-07-0.03572047E-10 0.02177228E+06 0.03090111E+02 4 +NH3 121386N 1H 3 G 0200.00 5000.00 1000.00 1 + 0.02461904E+02 0.06059166E-01-0.02004977E-04 0.03136003E-08-0.01938317E-12 2 +-0.06493270E+05 0.07472097E+02 0.02204352E+02 0.01011476E+00-0.01465265E-03 3 + 0.01447235E-06-0.05328509E-10-0.06525488E+05 0.08127138E+02 4 +NNH 120186N 2H 1 G 0250.00 4000.00 1000.00 1 + 0.04415342E+02 0.01614388E-01-0.01632894E-05-0.08559846E-09 0.01614791E-12 2 + 0.02788029E+06 0.09042888E+01 0.03501344E+02 0.02053587E-01 0.07170410E-05 3 + 0.04921348E-08-0.09671170E-11 0.02833347E+06 0.06391837E+02 4 +NO 121286N 1O 1 G 0200.00 5000.00 1000.00 1 + 0.03245435E+02 0.01269138E-01-0.05015890E-05 0.09169283E-09-0.06275419E-13 2 + 0.09800840E+05 0.06417294E+02 0.03376542E+02 0.01253063E-01-0.03302751E-04 3 + 0.05217810E-07-0.02446263E-10 0.09817961E+05 0.05829590E+02 4 +NO+ 121286N 1O 1E -1 G 0200.00 5000.00 1000.00 1 + 0.02914889E+02 0.01499335E-01-0.05727972E-05 0.01017777E-08-0.06825390E-13 2 + 0.01181869E+07 0.06844346E+02 0.03297349E+02 0.01422890E-01-0.04007441E-04 3 + 0.05670551E-07-0.02446972E-10 0.01180834E+07 0.04749948E+02 4 +NO2 121286N 1O 2 G 0200.00 5000.00 1000.00 1 + 0.04682859E+02 0.02462429E-01-0.01042259E-04 0.01976902E-08-0.01391717E-12 2 + 0.02261292E+05 0.09885985E+01 0.02670600E+02 0.07838501E-01-0.08063865E-04 3 + 0.06161715E-07-0.02320150E-10 0.02896291E+05 0.01161207E+03 4 +NO2- 121286N 1O 2E 1 G 0200.00 5000.00 1000.00 1 + 0.05043114E+02 0.02166428E-01-0.09455454E-05 0.01816314E-08-0.01238394E-12 2 +-0.02621554E+06-0.01445905E+02 0.02448586E+02 0.08982507E-01-0.07853431E-04 3 + 0.03927277E-07-0.01071694E-10-0.02545097E+06 0.01213060E+03 4 +NO3 121286N 1O 3 G 0200.00 5000.00 1000.00 1 + 0.07120307E+02 0.03246228E-01-0.01431613E-04 0.02797053E-08-0.02013008E-12 2 + 0.05864479E+05-0.01213730E+03 0.01221076E+02 0.01878797E+00-0.01344321E-03 3 + 0.01274601E-07 0.01354060E-10 0.07473144E+05 0.01840203E+03 4 +O 120186O 1 G 0200.00 5000.00 1000.00 1 + 0.02542060E+02-0.02755062E-03-0.03102803E-07 0.04551067E-10-0.04368052E-14 2 + 0.02923080E+06 0.04920308E+02 0.02946429E+02-0.01638166E-01 0.02421032E-04 3 +-0.01602843E-07 0.03890696E-11 0.02914764E+06 0.02963995E+02 4 +O+ 121286O 1E -1 G 0200.00 5000.00 1000.00 1 + 0.02501869E+02-0.06107262E-04 0.07324307E-07-0.03438353E-10 0.05506408E-14 2 + 0.01879553E+07 0.04372827E+02 0.02499273E+02 0.05820598E-04-0.01120922E-06 3 + 0.08232109E-10-0.01916378E-13 0.01879557E+07 0.04384826E+02 4 +O- 90589O 1E 1 G 0200.00 5000.00 1000.00 1 + 0.02559581E+02-0.07147888E-03 0.03301804E-06-0.06660944E-10 0.04900727E-14 2 + 0.01148935E+06 0.04426187E+02 0.02747263E+02-0.05724860E-02 0.02712548E-05 3 + 0.02691512E-08-0.02002357E-11 0.01144395E+06 0.03469852E+02 4 +O2 121386O 2 G 0200.00 5000.00 1000.00 1 + 0.03697578E+02 0.06135197E-02-0.01258842E-05 0.01775281E-09-0.01136435E-13 2 +-0.01233930E+05 0.03189166E+02 0.03212936E+02 0.01127486E-01-0.05756150E-05 3 + 0.01313877E-07-0.08768554E-11-0.01005249E+05 0.06034738E+02 4 +O2- 121286O 2E 1 G 0200.00 5000.00 1000.00 1 + 0.03883013E+02 0.07407872E-02-0.02961776E-05 0.05724305E-09-0.04086548E-13 2 +-0.07121644E+05 0.02658212E+02 0.02872292E+02 0.03359716E-01-0.02664886E-04 3 + 0.09807524E-08-0.01670957E-11-0.06829094E+05 0.07938373E+02 4 +O3 121286O 3 G 0200.00 5000.00 1000.00 1 + 0.05429371E+02 0.01820380E-01-0.07705607E-05 0.01499293E-08-0.01075563E-12 2 + 0.01523527E+06-0.03266387E+02 0.02462609E+02 0.09582781E-01-0.07087359E-04 3 + 0.01363368E-07 0.02969647E-11 0.01606152E+06 0.01214187E+03 4 +OC(OH)2 103190C 1H 2O 3 G 0200.00 4000.00 1500.00 1 + 0.01143196E+03 0.02555103E-01-0.04326538E-05-0.05781341E-09 0.01545461E-12 2 +-0.07904865E+06-0.03657201E+03 0.03540332E+01 0.03042528E+00-0.02939616E-03 3 + 0.01452934E-06-0.02906245E-10-0.07522630E+06 0.02250923E+03 4 +OCHCHO 103190C 2H 2O 2 G 0200.00 4000.00 1500.00 1 + 0.01056843E+03 0.02907353E-01-0.03452401E-05-0.01037593E-08 0.02042135E-12 2 +-0.02952623E+06-0.03104084E+03 0.01863564E+02 0.02298297E+00-0.01917997E-03 3 + 0.08558604E-07-0.01612346E-10-0.02634847E+06 0.01601674E+03 4 +OCHNNHO 103190C 1H 2N 2O 2G 0200.00 4000.00 1500.00 1 + 0.01241397E+03 0.04091551E-01-0.04547841E-05-0.01752324E-08 0.03271472E-12 2 +-0.06754774E+05-0.04078722E+03 0.01405275E+02 0.02776281E+00-0.02088466E-03 3 + 0.08550259E-07-0.01543486E-10-0.02537631E+05 0.01937723E+03 4 +OH 121286O 1H 1 G 0200.00 5000.00 1000.00 1 + 0.02882730E+02 0.01013974E-01-0.02276877E-05 0.02174684E-09-0.05126305E-14 2 + 0.03886888E+05 0.05595712E+02 0.03637266E+02 0.01850910E-02-0.01676165E-04 3 + 0.02387203E-07-0.08431442E-11 0.03606782E+05 0.01358860E+02 4 +OH+ 121286O 1H 1E -1 G 0200.00 5000.00 1000.00 1 + 0.02719059E+02 0.01508571E-01-0.05029369E-05 0.08261952E-09-0.04947453E-13 2 + 0.01576341E+07 0.06234536E+02 0.03326979E+02 0.01345786E-01-0.03777168E-04 3 + 0.04687750E-07-0.01780982E-10 0.01574029E+07 0.02744042E+02 4 +OH- 121286O 1H 1E 1 G 0200.00 5000.00 1000.00 1 + 0.02846205E+02 0.01041835E-01-0.02416851E-05 0.02483215E-09-0.07775605E-14 2 +-0.01807280E+06 0.04422712E+02 0.03390038E+02 0.07922381E-02-0.01943430E-04 3 + 0.02001770E-07-0.05702087E-11-0.01830494E+06 0.01249892E+02 4 +ONHNHO 103190H 2N 2O 2 G 0200.00 4000.00 1500.00 1 + 0.01005510E+03 0.03525461E-01-0.03868362E-05-0.01298654E-08 0.02398500E-12 2 + 0.07381692E+05-0.02950581E+03 0.07815142E+01 0.02605711E+00-0.02264714E-03 3 + 0.01049925E-06-0.02012847E-10 0.01062778E+06 0.02017946E+03 4 +ONHNOH 103190H 2N 2O 2 G 0200.00 4000.00 1500.00 1 + 0.01120874E+03 0.02650303E-01-0.03760644E-05-0.06355768E-09 0.01466251E-12 2 +-0.05721250E+05-0.03476475E+03 0.01053271E+02 0.02809676E+00-0.02637380E-03 3 + 0.01270757E-06-0.02478550E-10-0.02244769E+05 0.01937011E+03 4 +S 121286S 1 G 0200.00 5000.00 1000.00 1 + 0.02902148E+02-0.05484546E-02 0.02764576E-05-0.05017115E-09 0.03150685E-13 2 + 0.03249423E+06 0.03838471E+02 0.03187329E+02-0.01595776E-01 0.02005531E-04 3 +-0.01507081E-07 0.04931282E-11 0.03242259E+06 0.02414441E+02 4 +S(L) 120186S 1 L 0388.36 2000.00 1000.00 1 + 0.03603667E+02 0.09903341E-02-0.01011441E-04 0.04053633E-08-0.05667914E-12 2 +-0.08453839E+04-0.01634471E+03-0.01270631E+03 0.09072521E+00-0.01695179E-02 3 + 0.01307064E-05-0.03527615E-09 0.01234607E+05 0.05621016E+03 4 +S(S) 120186S 1 S 0200.00 0388.36 0388.36 1 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 + 0.00000000E+00 0.00000000E+00-0.05063703E+02 0.02881935E-01-0.02133020E-03 3 + 0.08478786E-05-0.01734497E-07 0.07148263E+04 0.02871407E+03 4 +S+ 121286S 1E -1 G 0200.00 5000.00 1000.00 1 + 0.02404600E+02 0.02410909E-02-0.02041780E-05 0.06592945E-09-0.05756939E-13 2 + 0.01535223E+07 0.05924256E+02 0.02366101E+02 0.09130767E-02-0.02140284E-04 3 + 0.02076178E-07-0.07133859E-11 0.01535091E+07 0.05993094E+02 4 +S-TRIAZINE 41687C 3N 3H 3 G 0200.00 4000.00 1000.00 1 + 0.01303617E+03 0.07711820E-01-0.07724374E-05-0.04385191E-08 0.08298992E-12 2 + 0.02251663E+06-0.04777676E+03 0.04493492E+01 0.02728306E+00 0.02309305E-04 3 +-0.01496844E-06 0.04546753E-10 0.02703032E+06 0.02178518E+03 4 +S2 121386S 2 G 0200.00 5000.00 1000.00 1 + 0.03904443E+02 0.06925733E-02-0.01233097E-05 0.08783809E-11 0.01374662E-13 2 + 0.01425693E+06 0.04956834E+02 0.03157673E+02 0.03099480E-01-0.01560746E-04 3 +-0.01357891E-07 0.01137444E-10 0.01439187E+06 0.08596062E+02 4 +SH 121286S 1H 1 G 0200.00 5000.00 1000.00 1 + 0.03053810E+02 0.01258884E-01-0.04249169E-05 0.06929591E-09-0.04281691E-13 2 + 0.01588225E+06 0.05973551E+02 0.04133327E+02-0.03787893E-02-0.02777854E-04 3 + 0.05370112E-07-0.02394006E-10 0.01555862E+06 0.01611535E+01 4 +SI 32989SI 1 G 0200.00 4000.00 1000.00 1 + 0.02775846E+02-0.06213257E-02 0.04843696E-05-0.01275615E-08 0.01134482E-12 2 + 0.05339791E+06 0.04543298E+02 0.03113515E+02-0.02330991E-01 0.03518531E-04 3 +-0.02417573E-07 0.06391902E-11 0.05335062E+06 0.03009719E+02 4 +SI(CH3)2 61991H 6C 2SI 1 G 0200.00 2500.00 1500.00 1 + 0.01092572E+03 0.07986807E-01-0.09096208E-06-0.01014552E-07 0.02037989E-11 2 + 0.01132561E+06-0.02834187E+03 0.02308663E+02 0.02773810E+00-0.01799333E-03 3 + 0.06733023E-07-0.01154743E-10 0.01442892E+06 0.01819319E+03 4 +SI(CH3)3 61991H 9C 3SI 1 G 0200.00 2500.00 1500.00 1 + 0.01536389E+03 0.01242119E+00-0.01189769E-05-0.01630302E-07 0.03308576E-11 2 +-0.05218398E+05-0.05088962E+03 0.03907073E+02 0.03734813E+00-0.02072025E-03 3 + 0.06180575E-07-0.08429605E-11-0.01002462E+05 0.01138100E+03 4 +SI(CH3)3CH2 61991H 11C 4SI 1 G 0200.00 2500.00 1500.00 1 + 0.02061565E+03 0.01408136E+00-0.01497876E-05-0.01748111E-07 0.03468780E-11 2 +-0.01240235E+06-0.07596671E+03 0.05258771E+02 0.04995369E+00-0.03393958E-03 3 + 0.01367592E-06-0.02513506E-10-0.06886708E+05 0.06814728E+02 4 +SI(CH3)4 61991H 12C 4SI 1 G 0200.00 2500.00 1500.00 1 + 0.02023461E+03 0.01648004E+00-0.01486572E-05-0.02161245E-07 0.04377236E-11 2 +-0.03702410E+06-0.07661021E+03 0.05009315E+02 0.04952953E+00-0.02745875E-03 3 + 0.08231031E-07-0.01137614E-10-0.03140314E+06 0.06187860E+02 4 +SI(L) 90589SI 1 L 0200.00 4500.00 1000.00 1 + 0.03271263E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2 + 0.04855058E+05-0.01329054E+03 0.03271263E+02 0.00000000E+00 0.00000000E+00 3 + 0.00000000E+00 0.00000000E+00 0.04855059E+05-0.01329054E+03 4 +SI(NH2)3 42489SI 1N 3H 6 G 0200.00 3000.00 1000.00 1 + 0.01406550E+03 0.07581744E-01-0.05168510E-05-0.06743626E-08 0.01397926E-11 2 +-0.01414403E+06-0.04063874E+03 0.07598413E+02 0.02435266E+00-0.04296202E-04 3 +-0.01756007E-06 0.01050102E-09-0.01265343E+06-0.07808647E+02 4 +SI(NH2)4 22790SI 1N 4H 8 G 0200.00 4000.00 1000.00 1 + 0.02032107E+03 0.08289798E-01-0.07077612E-05-0.04340724E-08 0.07747068E-12 2 +-0.05389855E+06-0.07730464E+03 0.08454529E+02 0.03465772E+00-0.04266782E-04 3 +-0.02495363E-06 0.01365466E-09-0.05061518E+06-0.01514301E+03 4 +SI(S) 90589SI 1 S 0200.00 2500.00 1000.00 1 + 0.02530275E+02 0.08522433E-02-0.03223469E-05 0.01280821E-08-0.01850849E-12 2 +-0.08395197E+04-0.01251478E+03 0.05746418E+01 0.01026485E+00-0.01775346E-03 3 + 0.01457500E-06-0.04491292E-10-0.04969951E+04-0.03400243E+02 4 +SI2 111191SI 2 G 0200.00 4000.00 1500.00 1 + 0.04402888E+02 0.01154530E-02-0.06005177E-06 0.01469072E-09-0.01357408E-13 2 + 0.07199220E+06 0.02340066E+02 0.03439839E+02 0.03440171E-01-0.04437681E-04 3 + 0.02559961E-07-0.05474618E-11 0.07222934E+06 0.07148545E+02 4 +SI2C 112989C 1SI 2 G 0200.00 5000.00 1000.00 1 + 0.06334110E+02 0.01210252E-01-0.06798289E-05 0.02244433E-08-0.02280178E-12 2 + 0.06227189E+06-0.07770097E+02 0.04157246E+02 0.07031825E-01-0.07263033E-04 3 + 0.04633583E-07-0.01493448E-10 0.06292421E+06 0.03635126E+02 4 +SI2CL5 40992SI 2CL 5 G 0200.00 4000.00 1500.00 1 + 0.01800427E+03 0.05920529E-02-0.03159743E-05 0.07962538E-09-0.07553642E-13 2 +-0.08208587E+06-0.04815622E+03 0.01218195E+03 0.02086930E+00-0.02723261E-03 3 + 0.01583266E-06-0.03404617E-10-0.08066122E+06-0.01913372E+03 4 +SI2CL5H 40992H 1SI 2CL 5 G 0200.00 4000.00 1500.00 1 + 0.01977366E+03 0.01346980E-01-0.04241463E-05 0.05994784E-09-0.03079337E-13 2 +-0.01018307E+07-0.05982624E+03 0.01104810E+03 0.02909474E+00-0.03536307E-03 3 + 0.01998957E-06-0.04259074E-10-0.09941194E+06-0.01536396E+03 4 +SI2CL6 40992SI 2CL 6 G 0200.00 4000.00 1500.00 1 + 0.02095456E+03 0.06904584E-02-0.03881968E-05 0.01014163E-08-0.09844696E-13 2 +-0.01238540E+07-0.06426893E+03 0.01372380E+03 0.02622361E+00-0.03460508E-03 3 + 0.02024950E-06-0.04371480E-10-0.01221143E+07-0.02834094E+03 4 +SI2F6 42489SI 2F 6 G 0200.00 3000.00 1000.00 1 + 0.01830048E+03 0.02868753E-01-0.04545577E-05-0.02497900E-08 0.06630658E-12 2 +-0.02928185E+07-0.05760425E+03 0.09998134E+02 0.02170314E+00-0.03875092E-04 3 +-0.01670252E-06 0.09407529E-10-0.02905483E+07-0.01422886E+03 4 +SI2H2 111191H 2SI 2 G 0200.00 4000.00 1500.00 1 + 0.08099063E+02 0.01294220E-01-0.02447198E-05-0.01449512E-09 0.05867240E-13 2 + 0.04476428E+06-0.01877323E+03 0.09668390E+01 0.01932959E+00-0.01825422E-03 3 + 0.08404012E-07-0.01537228E-10 0.04712241E+06 0.01907609E+03 4 +SI2H3 90589SI 2H 3 G 0200.00 2000.00 1000.00 1 + 0.07257627E+02 0.05123860E-01-0.07633465E-05-0.06662471E-08 0.02053053E-11 2 + 0.05062055E+06-0.01031413E+03 0.03335404E+02 0.02155615E+00-0.02933937E-03 3 + 0.02287785E-06-0.07272827E-10 0.05146157E+06 0.08656853E+02 4 +SI2H5 90589SI 2H 5 G 0200.00 2000.00 1000.00 1 + 0.08451010E+02 0.09286371E-01-0.01091183E-04-0.01442367E-07 0.04250825E-11 2 + 0.02472719E+06-0.01710331E+03 0.01578848E+02 0.03549383E+00-0.04267511E-03 3 + 0.03059177E-06-0.09360425E-10 0.02630550E+06 0.01672073E+03 4 +SI2H6 90589SI 2H 6 G 0200.00 2000.00 1000.00 1 + 0.08882090E+02 0.01151395E+00-0.01216216E-04-0.01905086E-07 0.05542379E-11 2 + 0.05967242E+05-0.02265611E+03 0.05301921E+01 0.04184056E+00-0.04685249E-03 3 + 0.03179525E-06-0.09484526E-10 0.07950598E+05 0.01880453E+03 4 +SI3 32989SI 3 G 0200.00 4000.00 1000.00 1 + 0.07021585E+02 0.06981538E-02-0.04818729E-05 0.01720754E-08-0.01927025E-12 2 + 0.07429956E+06-0.08179233E+02 0.05312161E+02 0.05920181E-01-0.05075225E-04 3 + 0.05303866E-08 0.07031630E-11 0.07469502E+06 0.04036452E+01 4 +SI3H8 90589SI 3H 8 G 0200.00 2000.00 1000.00 1 + 0.01342277E+03 0.01563632E+00-0.01936565E-04-0.02388330E-07 0.07120030E-11 2 + 0.09165887E+05-0.04163000E+03 0.06319791E+01 0.06412995E+00-0.07772444E-03 3 + 0.05486969E-06-0.01646097E-09 0.01209258E+06 0.02133318E+03 4 +SI3N4(A) 42589N 4SI 3 S 0200.00 3000.00 1000.00 1 + 0.09667453E+02 0.01192721E+00-0.01709282E-04-0.01084607E-07 0.02713018E-11 2 +-0.09324734E+06-0.04556492E+03 0.06631384E+02 0.02293929E+00-0.02152876E-03 3 + 0.01766237E-06-0.06632215E-10-0.09241684E+06-0.03021795E+03 4 +SIC 112989C 1SI 1 G 0200.00 5000.00 1000.00 1 + 0.05024270E+02-0.04920894E-02 0.03109315E-05-0.06901344E-09 0.05215735E-13 2 + 0.08531026E+06-0.02478798E+02 0.02427812E+02 0.09551934E-01-0.02796633E-04 3 +-0.01360012E-06 0.09196323E-10 0.08546512E+06 0.09179253E+02 4 +SIC(B) 112989C 1SI 1 S 0200.00 4000.00 1000.00 1 + 0.03548057E+02 0.03636817E-01-0.01734873E-04 0.03912869E-08-0.03337953E-12 2 +-0.01018858E+06-0.01967253E+03-0.03551396E+01 0.01599881E+00-0.01393327E-03 3 + 0.03314914E-07 0.07825957E-11-0.09294352E+05-0.01515388E+01 4 +SIC2 112989C 2SI 1 G 0200.00 5000.00 1000.00 1 + 0.05753726E+02 0.02067546E-01-0.01132535E-04 0.03106456E-08-0.02799937E-12 2 + 0.07200461E+06-0.05294927E+02 0.03647725E+02 0.08765100E-01-0.01079869E-03 3 + 0.07974287E-07-0.02617042E-10 0.07258578E+06 0.05481050E+02 4 +SICCH 61991H 1C 2SI 1 G 0200.00 2500.00 1500.00 1 + 0.08229114E+02 0.01220783E-01-0.01179375E-05-0.03293923E-09 0.02957217E-13 2 + 0.06029046E+06-0.01793033E+03 0.03946147E+02 0.01353938E+00-0.01476061E-03 3 + 0.08141935E-07-0.01743041E-10 0.06163490E+06 0.04400106E+02 4 +SICH 61991H 1C 1SI 1 G 0200.00 2500.00 1500.00 1 + 0.06212049E+02 0.05590981E-02-0.07015929E-06 0.03497540E-09-0.01203199E-12 2 + 0.06044180E+06-0.08520574E+02 0.03822068E+02 0.07938745E-01-0.09707239E-04 3 + 0.05877454E-07-0.01338338E-10 0.06118631E+06 0.03835953E+02 4 +SICH2 61991H 2C 1SI 1 G 0200.00 2500.00 1500.00 1 + 0.06246250E+02 0.02147775E-01-0.06406396E-06-0.02067218E-08 0.03841890E-12 2 + 0.03490992E+06-0.08995611E+02 0.02794283E+02 0.01138805E+00-0.01041700E-03 3 + 0.05368052E-07-0.01132779E-10 0.03606279E+06 0.09246714E+02 4 +SICH3 61991H 3C 1SI 1 G 0200.00 2500.00 1500.00 1 + 0.06681751E+02 0.03837387E-01-0.06162348E-06-0.04678285E-08 0.09346313E-12 2 + 0.03472013E+06-0.01022379E+03 0.02444652E+02 0.01367883E+00-0.09266249E-04 3 + 0.03704818E-07-0.06763833E-11 0.03624755E+06 0.01263619E+03 4 +SICL 121986SI 1CL 1 G 0200.00 2000.00 1000.00 1 + 0.04258460E+02 0.04020317E-02-0.02888145E-05 0.01009777E-08-0.01411012E-12 2 + 0.01775614E+06 0.04134521E+02 0.03096406E+02 0.05738623E-01-0.09740903E-04 3 + 0.07643597E-07-0.02279179E-10 0.01796795E+06 0.09603212E+02 4 +SICL2 121986SI 1CL 2 G 0200.00 2000.00 1000.00 1 + 0.06491205E+02 0.08242384E-02-0.05767737E-05 0.01972405E-08-0.02713757E-12 2 +-0.02232408E+06-0.03570531E+02 0.03826666E+02 0.01308296E+00-0.02234087E-03 3 + 0.01760742E-06-0.05267404E-10-0.02183869E+06 0.08965448E+02 4 +SICL2H2 121986SI 1H 2CL 2 G 0200.00 2000.00 1000.00 1 + 0.07727079E+02 0.05034189E-01-0.01095746E-04-0.04419587E-08 0.01631124E-11 2 +-0.04028605E+06-0.01170816E+03 0.01100209E+02 0.03262362E+00-0.04691995E-03 3 + 0.03494565E-06-0.01036285E-09-0.03892087E+06 0.02022693E+03 4 +SICL3 121986SI 1CL 3 G 0200.00 2000.00 1000.00 1 + 0.09098097E+02 0.01405353E-01-0.09317005E-05 0.02982296E-08-0.03822011E-12 2 +-0.04140193E+06-0.01455012E+03 0.04485691E+02 0.02241754E+00-0.03794196E-03 3 + 0.02973183E-06-0.08861335E-10-0.04055264E+06 0.07198771E+02 4 +SICL3CH2CH 10891C 2CL 3H 5SI 1G 0200.00 4000.00 1500.00 1 + 0.02087242E+03 0.05492755E-01-0.06829558E-05-0.01876697E-08 0.03787112E-12 2 +-0.07972510E+06-0.07741949E+03 0.04624781E+02 0.04378379E+00-0.03850522E-03 3 + 0.01844376E-06-0.03709272E-10-0.07377043E+06 0.01029869E+03 4 +SICL3H 121986SI 1H 1CL 3 G 0200.00 2000.00 1000.00 1 + 0.09663121E+02 0.03563368E-01-0.01214911E-04-0.01609009E-09 0.05641710E-12 2 +-0.06295557E+06-0.01894777E+03 0.02883770E+02 0.03308241E+00-0.05169241E-03 3 + 0.03949918E-06-0.01172104E-09-0.06163323E+06 0.01337466E+03 4 +SICL4 121986SI 1CL 4 G 0200.00 2000.00 1000.00 1 + 0.01170938E+03 0.01972092E-01-0.01269077E-04 0.03900188E-08-0.04756468E-12 2 +-0.08347808E+06-0.02791153E+03 0.05252110E+02 0.03122067E+00-0.05254593E-03 3 + 0.04102707E-06-0.01219907E-09-0.08228177E+06 0.02575727E+02 4 +SICLH3 121986SI 1H 3CL 1 G 0200.00 2000.00 1000.00 1 + 0.05964238E+02 0.06278087E-01-0.08205635E-05-0.09280558E-08 0.02796643E-11 2 +-0.01854309E+06-0.06395305E+02 0.05057173E+01 0.02703378E+00-0.03301474E-03 3 + 0.02302732E-06-0.06778703E-10-0.01730819E+06 0.02043167E+03 4 +SIF 42489SI 1F 1 G 0200.00 3000.00 1000.00 1 + 0.04120067E+02 0.03548821E-02-0.07200222E-06-0.02190434E-09 0.06764591E-13 2 +-0.07561378E+05 0.02784246E+02 0.03144948E+02 0.02588557E-01-0.05795912E-05 3 +-0.01807279E-07 0.01041172E-10-0.07294439E+05 0.07876774E+02 4 +SIF(NH2)2 22790SI 1F 1N 2H 4G 0200.00 4000.00 1000.00 1 + 0.01287944E+03 0.04598535E-01-0.04004441E-05-0.02374189E-08 0.04255211E-12 2 +-0.05238279E+06-0.03653418E+03 0.07210094E+02 0.01764698E+00-0.02542060E-04 3 +-0.01242214E-06 0.06989787E-10-0.05086706E+06-0.07024622E+02 4 +SIF(NH2)3 42489SI 1N 3H 6F 1G 0200.00 3000.00 1000.00 1 + 0.01611180E+03 0.08329222E-01-0.06023787E-05-0.07470125E-08 0.01570731E-11 2 +-0.09137007E+06-0.05098123E+03 0.08388268E+02 0.02746622E+00-0.04455675E-04 3 +-0.01955733E-06 0.01140721E-09-0.08947806E+06-0.01138178E+03 4 +SIF2 42489SI 1F 2 G 0200.00 3000.00 1000.00 1 + 0.06142470E+02 0.07807974E-02-0.01339312E-05-0.06264839E-09 0.01725138E-12 2 +-0.07744042E+06-0.04712327E+02 0.03845345E+02 0.06038465E-01-0.01167732E-04 3 +-0.04579554E-07 0.02607414E-10-0.07681634E+06 0.07272984E+02 4 +SIF2(NH2)2 42489SI 1N 2H 4F 2G 0200.00 3000.00 1000.00 1 + 0.01441477E+03 0.06110646E-01-0.04871145E-05-0.05455935E-08 0.01172714E-11 2 +-0.01292757E+07-0.04308682E+03 0.07634268E+02 0.02315843E+00-0.04193827E-04 3 +-0.01715351E-06 0.01016462E-09-0.01276410E+07-0.08419031E+02 4 +SIF2N 42489SI 1N 1F 2 G 0200.00 3000.00 1000.00 1 + 0.08687337E+02 0.01193488E-01-0.01992661E-05-0.09951334E-09 0.02704383E-12 2 +-0.03463832E+06-0.01494053E+03 0.05102583E+02 0.09456606E-01-0.01819383E-04 3 +-0.07309616E-07 0.04178902E-10-0.03367294E+06 0.03734424E+02 4 +SIF2NH2 42489SI 1N 1F 2H 2G 0200.00 3000.00 1000.00 1 + 0.09872415E+02 0.03722112E-01-0.03271338E-05-0.03321674E-08 0.07293692E-12 2 +-0.08751628E+06-0.01899096E+03 0.05890444E+02 0.01285128E+00-0.01863556E-04 3 +-0.08718963E-07 0.04848951E-10-0.08644527E+06 0.01756163E+02 4 +SIF3 42489SI 1F 3 G 0200.00 3000.00 1000.00 1 + 0.08524790E+02 0.01323792E-01-0.02104279E-05-0.01149504E-08 0.03055301E-12 2 +-0.01223522E+07-0.01550234E+03 0.04662868E+02 0.01008788E+00-0.01805544E-04 3 +-0.07769299E-07 0.04377852E-10-0.01212965E+07 0.04672966E+02 4 +SIF3NH 42489SI 1N 1F 3H 1G 0200.00 3000.00 1000.00 1 + 0.01163766E+03 0.02880769E-01-0.03357310E-05-0.02584594E-08 0.06162371E-12 2 +-0.01295891E+07-0.02590718E+03 0.06013822E+02 0.01597729E+00-0.02791466E-04 3 +-0.01214120E-06 0.06927415E-10-0.01280974E+07 0.03316771E+02 4 +SIF3NH2 42489SI 1N 1F 3H 2G 0200.00 3000.00 1000.00 1 + 0.01210964E+03 0.04383282E-01-0.04142245E-05-0.03989090E-08 0.08958954E-12 2 +-0.01641768E+07-0.03046928E+03 0.06229403E+02 0.01778015E+00-0.02612304E-04 3 +-0.01267243E-06 0.07044556E-10-0.01625849E+07 0.02045441E+01 4 +SIF3NHSIH3 42489SI 2N 1H 4F 3G 0200.00 3000.00 1000.00 1 + 0.01669941E+03 0.07789785E-01-0.08110570E-05-0.07650199E-08 0.01773956E-11 2 +-0.01673412E+07-0.05080007E+03 0.06216046E+02 0.02939330E+00-0.02717745E-04 3 +-0.01982878E-06 0.01002768E-09-0.01642282E+07 0.04858261E+02 4 +SIF3NSIH3 42489SI 2N 1H 3F 3G 0200.00 3000.00 1000.00 1 + 0.01599146E+03 0.06371086E-01-0.07256824E-05-0.06292690E-08 0.01495157E-11 2 +-0.01331158E+07-0.04495265E+03 0.06404372E+02 0.02601982E+00-0.02491543E-04 3 +-0.01769542E-06 0.08919883E-10-0.01302520E+07 0.06002945E+02 4 +SIF4 41389F 4SI 1 G 0200.00 2000.00 1000.00 1 + 0.09985301E+02 0.03532637E-01-0.01197378E-04-0.01036549E-08 0.08661585E-12 2 +-0.01977200E+07-0.02472644E+03 0.02147416E+02 0.03402219E+00-0.04756874E-03 3 + 0.03252196E-06-0.08819304E-10-0.01960449E+07 0.01346315E+03 4 +SIFH3 42489SI 1F 1H 3 G 0200.00 3000.00 1000.00 1 + 0.06799678E+02 0.04747086E-01-0.04767067E-05-0.04814665E-08 0.01107761E-11 2 +-0.04577024E+06-0.01261433E+03 0.02032190E+02 0.01341363E+00-0.02806381E-05 3 +-0.07803291E-07 0.03337474E-10-0.04421627E+06 0.01318768E+03 4 +SIFNH 42489SI 1N 1F 1H 1G 0200.00 3000.00 1000.00 1 + 0.07163299E+02 0.01521325E-01-0.01536337E-05-0.01195933E-08 0.02684100E-12 2 +-0.09065496E+05-0.06764144E+02 0.05390691E+02 0.06071319E-01-0.01359490E-04 3 +-0.04267435E-07 0.02603154E-10-0.08644237E+05 0.02272065E+02 4 +SIFNH2 22790F 1SI 1N 1H 2G 0200.00 4000.00 1000.00 1 + 0.08017582E+02 0.03209103E-01-0.03361364E-05-0.01796537E-08 0.03385552E-12 2 +-0.04313426E+06-0.01487024E+03 0.04214050E+02 0.01105423E+00-0.01014725E-04 3 +-0.07143728E-07 0.03634923E-10-0.04200629E+06 0.05318890E+02 4 +SIH 121986SI 1H 1 G 0200.00 2000.00 1000.00 1 + 0.03110430E+02 0.01094946E-01 0.02898629E-06-0.02745104E-08 0.07051799E-12 2 + 0.04516898E+06 0.04193487E+02 0.03836010E+02-0.02702657E-01 0.06849070E-04 3 +-0.05424184E-07 0.01472131E-10 0.04507593E+06 0.09350778E+01 4 +SIH2 42489SI 1H 2 G 0200.00 3000.00 1000.00 1 + 0.04142390E+02 0.02150191E-01-0.02190730E-05-0.02073725E-08 0.04741018E-12 2 + 0.03110484E+06 0.02930745E+01 0.03475092E+02 0.02139338E-01 0.07672306E-05 3 + 0.05217668E-08-0.09898824E-11 0.03147397E+06 0.04436585E+02 4 +SIH2CL 121986SI 1H 2CL 1 G 0200.00 2000.00 1000.00 1 + 0.05555902E+02 0.04046479E-01-0.06581751E-05-0.05027548E-08 0.01599110E-11 2 + 0.01912428E+05-0.01906890E+02 0.01699256E+02 0.01961407E+00-0.02622973E-03 3 + 0.01936417E-06-0.05846399E-10 0.02743662E+05 0.01683133E+03 4 +SIH2F 42489SI 1F 1H 2 G 0200.00 3000.00 1000.00 1 + 0.06020399E+02 0.03074040E-01-0.03248887E-05-0.03052243E-08 0.07098090E-12 2 +-0.02347670E+06-0.05919595E+02 0.02782566E+02 0.09148257E-01-0.04186788E-05 3 +-0.05388971E-07 0.02412133E-10-0.02244201E+06 0.01152854E+03 4 +SIH2F2 42489SI 1H 2F 2 G 0200.00 3000.00 1000.00 1 + 0.07997762E+02 0.03911538E-01-0.04222679E-05-0.03913812E-08 0.09171569E-12 2 +-0.09682880E+06-0.01622400E+03 0.02701455E+02 0.01456545E+00-0.01163300E-04 3 +-0.09685830E-07 0.04769591E-10-0.09522440E+06 0.01200689E+03 4 +SIH3 42489SI 1H 3 G 0200.00 3000.00 1000.00 1 + 0.05015906E+02 0.03732750E-01-0.03609053E-05-0.03729193E-08 0.08468490E-12 2 + 0.02190233E+06-0.04291368E+02 0.02946733E+02 0.06466764E-01 0.05991653E-05 3 +-0.02218413E-07 0.03052670E-11 0.02270173E+06 0.07347948E+02 4 +SIH3NH2 42489SI 1N 1H 5 G 0200.00 3000.00 1000.00 1 + 0.08109945E+02 0.07215753E-01-0.06052251E-05-0.07086088E-08 0.01557864E-11 2 +-0.08999782E+05-0.01651650E+03 0.02936348E+02 0.01674704E+00-0.03232859E-05 3 +-0.09171970E-07 0.03979516E-10-0.07334716E+05 0.01141437E+03 4 +SIH3NHSIH3 42489SI 2N 1H 7 G 0200.00 3000.00 1000.00 1 + 0.01265296E+03 0.01066748E+00-0.01007336E-04-0.01081222E-07 0.02452364E-11 2 +-0.01249721E+06-0.03441428E+03 0.02468750E+02 0.02940255E+00-0.06248179E-05 3 +-0.01731462E-06 0.07545261E-10-0.09209690E+05 0.02059560E+03 4 +SIH3NSIH3 42489SI 2N 1H 6 G 0200.00 3000.00 1000.00 1 + 0.01201462E+03 0.09187517E-01-0.09159516E-05-0.09380967E-08 0.02156435E-11 2 + 0.01965066E+06-0.02978186E+03 0.02827574E+02 0.02580647E+00-0.04200478E-05 3 +-0.01503859E-06 0.06388325E-10 0.02265351E+06 0.01997012E+03 4 +SIH3SIH2CH3 111391H 8C 1SI 2 G 0200.00 4000.00 1500.00 1 + 0.01886736E+03 0.06449996E-01-0.06896411E-05-0.02584789E-08 0.04830521E-12 2 +-0.06620909E+05-0.07374424E+03 0.02132164E+02 0.04348657E+00-0.03495608E-03 3 + 0.01588231E-06-0.03150773E-10-0.02040937E+04 0.01752930E+03 4 +SIH4 121386SI 1H 4 G 0200.00 4000.00 1000.00 1 + 0.06893874E+02 0.04030501E-01-0.04183314E-05-0.02291395E-08 0.04384766E-12 2 + 0.01107037E+05-0.01749117E+03 0.02475167E+02 0.09003721E-01 0.02185394E-04 3 +-0.02681423E-07-0.06621081E-11 0.02925488E+05 0.07751015E+02 4 +SIHCL2 121986SI 1H 1CL 2 G 0200.00 2000.00 1000.00 1 + 0.07229734E+02 0.02869206E-01-0.08849876E-05-0.07495866E-09 0.05752338E-12 2 +-0.01971399E+06-0.07052663E+02 0.02368353E+02 0.02401088E+00-0.03717220E-03 3 + 0.02851998E-06-0.08530494E-10-0.01875884E+06 0.01614587E+03 4 +SIHF 42489SI 1F 1H 1 G 0200.00 3000.00 1000.00 1 + 0.05073509E+02 0.01533279E-01-0.01840659E-05-0.01440038E-08 0.03452517E-12 2 +-0.01973880E+06-0.01079507E+02 0.03223728E+02 0.04981221E-01-0.03173051E-05 3 +-0.02822231E-07 0.01247832E-10-0.01914168E+06 0.08906423E+02 4 +SIHF2 42489SI 1H 1F 2 G 0200.00 3000.00 1000.00 1 + 0.07216536E+02 0.02253240E-01-0.02737472E-05-0.02173460E-08 0.05255331E-12 2 +-0.07280241E+06-0.09783487E+02 0.03377237E+02 0.01036607E+00-0.01239082E-04 3 +-0.07267982E-07 0.03794989E-10-0.07168358E+06 0.01052189E+03 4 +SIHF3 42489SI 1H 1F 3 G 0200.00 3000.00 1000.00 1 + 0.09363567E+02 0.02947556E-01-0.03577633E-05-0.02858224E-08 0.06915729E-12 2 +-0.01486074E+07-0.02169453E+03 0.03918053E+02 0.01463917E+00-0.01856070E-04 3 +-0.01058200E-06 0.05617543E-10-0.01470439E+07 0.07024261E+02 4 +SIN 42489SI 1N 1 G 0200.00 3000.00 1000.00 1 + 0.04122909E+02 0.03521458E-02-0.07161081E-06-0.02154956E-09 0.06667571E-13 2 + 0.05683927E+06 0.02389838E+02 0.03149182E+02 0.02584376E-01-0.05804625E-05 3 +-0.01805627E-07 0.01041095E-10 0.05710564E+06 0.07474389E+02 4 +SINH 42489SI 1N 1H 1 G 0200.00 3000.00 1000.00 1 + 0.04928801E+02 0.01628624E-01-0.01367197E-05-0.01390460E-08 0.02998969E-12 2 + 0.01767790E+06-0.02823472E+02 0.03166975E+02 0.05805823E-01-0.09524443E-05 3 +-0.03991893E-07 0.02283188E-10 0.01813561E+06 0.06298440E+02 4 +SINH2 42489SI 1N 1H 2 G 0200.00 3000.00 1000.00 1 + 0.05186436E+02 0.03016656E-01-0.02165476E-05-0.02722658E-08 0.05706182E-12 2 + 0.02270508E+06-0.01242140E+02 0.03362770E+02 0.07261176E-01-0.08721233E-05 3 +-0.04400014E-07 0.02419532E-10 0.02318446E+06 0.08223867E+02 4 +SN 121286S 1N 1 G 0200.00 5000.00 1000.00 1 + 0.03888287E+02 0.06778427E-02-0.02725309E-05 0.05135927E-09-0.03593836E-13 2 + 0.03044496E+06 0.04194291E+02 0.03407346E+02 0.01797887E-01-0.02018970E-04 3 + 0.02107857E-07-0.09527592E-11 0.03062373E+06 0.06821481E+02 4 +SO 121286S 1O 1 G 0200.00 5000.00 1000.00 1 + 0.04021078E+02 0.02584856E-02 0.08948142E-06-0.03580145E-09 0.03228430E-13 2 +-0.07119620E+04 0.03452523E+02 0.03080401E+02 0.01803106E-01 0.06705022E-05 3 +-0.02069005E-07 0.08514657E-11-0.03986163E+04 0.08581028E+02 4 +SO2 121286S 1O 2 G 0200.00 5000.00 1000.00 1 + 0.05254498E+02 0.01978545E-01-0.08204226E-05 0.01576383E-08-0.01120451E-12 2 +-0.03756886E+06-0.01146056E+02 0.02911439E+02 0.08103022E-01-0.06906710E-04 3 + 0.03329016E-07-0.08777121E-11-0.03687882E+06 0.01111740E+03 4 +SO3 121286S 1O 3 G 0200.00 5000.00 1000.00 1 + 0.07050668E+02 0.03246560E-01-0.01408897E-04 0.02721535E-08-0.01942365E-12 2 +-0.05020668E+06-0.01106443E+03 0.02575283E+02 0.01515092E+00-0.01229872E-03 3 + 0.04240257E-07-0.05266812E-11-0.04894411E+06 0.01219512E+03 4 +CH2* L S/93C 1H 2 00 00G 200.000 3500.000 1000.000 1 + 2.29203842E+00 4.65588637E-03-2.01191947E-06 4.17906000E-10-3.39716365E-14 2 + 5.09259997E+04 8.62650169E+00 4.19860411E+00-2.36661419E-03 8.23296220E-06 3 +-6.68815981E-09 1.94314737E-12 5.04968163E+04-7.69118967E-01 9.93967200E+03 4 +C2H3O T04/83O 1H 3C 2 0G 200.000 5000.000 1 + 0.59756699E+01 0.81305914E-02-0.27436245E-05 0.40703041E-09-0.21760171E-13 2 + 0.49032178E+03-0.50320879E+01 0.34090624E+01 0.10738574E-01 0.18914925E-05 3 + 0.71585831E-08 0.28673851E-11 0.15214766E+04 0.95714535E+01 0.30474436E+04 4 +PC3H4 40687C 3H 4 G 0200.00 5000.00 1000.00 1 + 0.05511034E+02 0.01246956E+00-0.04814165E-04 0.08573769E-08-0.05771561E-12 2 + 0.01961967E+06-0.01079475E+03 0.06271447E+01 0.03116179E+00-0.03747664E-03 3 + 0.02964118E-06-0.09987382E-10 0.02083493E+06 0.01346880E+03 4 +n-C4H3 HW /94C 4H 3 0 0G 200.000 3000.000 1 + 0.54328279E+01 0.16860981E-01-0.94313109E-05 0.25703895E-08-0.27456309E-12 2 + 0.61600680E+05-0.15673981E+01-0.31684113E+00 0.46912100E-01-0.68093810E-04 3 + 0.53179921E-07-0.16523005E-10 0.62476199E+05 0.24622559E+02 4 +i-C4H3 AB1/93C 4H 3 0 0G 200.000 3000.000 1 + 0.90978165E+01 0.92207119E-02-0.33878441E-05 0.49160498E-09-0.14529780E-13 2 + 0.56600574E+05-0.19802597E+02 0.20830412E+01 0.40834274E-01-0.62159685E-04 3 + 0.51679358E-07-0.17029184E-10 0.58005129E+05 0.13617462E+02 4 +n-C4H5 HW /94C 4H 5 0 0G 200.000 3000.000 1 + 0.98501978E+01 0.10779008E-01-0.13672125E-05-0.77200535E-09 0.18366314E-12 2 + 0.38840301E+05-0.26001846E+02 0.16305321E+00 0.39830137E-01-0.34000128E-04 3 + 0.15147233E-07-0.24665825E-11 0.41429766E+05 0.23536163E+02 4 +i-C4H5 HW /94C 4H 5 0 0G 200.000 3000.000 1 + 0.10229092E+02 0.94850138E-02-0.90406445E-07-0.12596100E-08 0.24781468E-12 2 + 0.34642812E+05-0.28564529E+02-0.19932900E-01 0.38005672E-01-0.27559450E-04 3 + 0.77835551E-08 0.40209383E-12 0.37496223E+05 0.24394241E+02 4 +C4H612 A 8/83C 4H 6 0 0G 200. 3000. 1000.0 1 + 0.1781557E 02 -0.4257502E-02 0.1051185E-04 -0.4473844E-08 0.5848138E-12 2 + 0.1267342E 05 -0.6982662E 02 0.1023467E 01 0.3495919E-01 -0.2200905E-04 3 + 0.6942272E-08 -0.7879187E-12 0.1811799E 05 0.1975066E 02 0.1950807E+05 4 +A1 HW /94C 6H 6 0 0G 200.000 3000.000 1 + 0.17246994E+02 0.38420164E-02 0.82776232E-05-0.48961120E-08 0.76064545E-12 2 + 0.26646055E+04-0.71945175E+02-0.48998680E+01 0.59806932E-01-0.36710087E-04 3 + 0.32740399E-08 0.37600886E-11 0.91824570E+04 0.44095642E+02 4 +C5H3 20387C 5H 3 G 0200.00 5000.00 1000.00 1 + 0.01078762E+03 0.09539619E-01-0.03206745E-04 0.04733323E-08-0.02512135E-12 2 + 0.06392904E+06-0.03005444E+03 0.04328720E+02 0.02352480E+00-0.05856723E-04 3 +-0.01215449E-06 0.07726478E-10 0.06588531E+06 0.04173259E+02 4 +l-C6H4 HW /94C 6H 4 0 0G 200.000 3000.000 1 + 0.12715182E+02 0.13839662E-01-0.43765440E-05 0.31541636E-09 0.46619026E-13 2 + 0.57031148E+05-0.39464600E+02 0.29590225E+00 0.58053318E-01-0.67766756E-04 3 + 0.43376762E-07-0.11418864E-10 0.60001371E+05 0.22318970E+02 4 +n-C6H5 HW /94C 6H 5 0 0G 200.000 3000.000 1 + 0.16070068E+02 0.81899539E-02 0.17325165E-05-0.20624185E-08 0.36292345E-12 2 + 0.64616867E+05-0.56163742E+02-0.61135769E+00 0.65082610E-01-0.78262397E-04 3 + 0.53030828E-07-0.14946683E-10 0.68805375E+05 0.27635468E+02 4 +A1- HW /94C 6H 5 0 0G 200.000 3000.000 1 + 0.14493439E+02 0.75712688E-02 0.37894542E-05-0.30769500E-08 0.51347820E-12 2 + 0.33189977E+05-0.54288940E+02-0.49076147E+01 0.59790771E-01-0.45639827E-04 3 + 0.14964993E-07-0.91767826E-12 0.38733410E+05 0.46567780E+02 4 +c-C6H4 HW /94C 6H 4 0 0G 200.000 3000.000 1 + 0.13849209E+02 0.78807920E-02 0.18243836E-05-0.21169166E-08 0.37459977E-12 2 + 0.47446340E+05-0.50404953E+02-0.30991268E+01 0.54030564E-01-0.40839004E-04 3 + 0.10738837E-07 0.98078490E-12 0.52205711E+05 0.37415207E+02 4 +l-C6H6 HW /94C 6H 6 0 0G 200.000 3000.000 1 + 0.10874918E+02 0.23293324E-01-0.94495535E-05 0.16255329E-08-0.84771200E-13 2 + 0.36224055E+05-0.30326756E+02 0.59114441E-01 0.55723339E-01-0.43485274E-04 3 + 0.14487391E-07-0.52512541E-12 0.39042688E+05 0.24796795E+02 4 +n-C6H7 HW /94C 6H 7 0 0G 200.000 3000.000 1 + 0.22577469E+02-0.30737517E-02 0.14225234E-04-0.69880848E-08 0.10232874E-11 2 + 0.41228980E+05-0.91568619E+02 0.13248032E+00 0.57103366E-01-0.43712644E-04 3 + 0.15538603E-07-0.12976356E-11 0.47730512E+05 0.25339081E+02 4 +c-C6H7 HW /94C 6H 7 0 0G 200.000 3000.000 1 + 0.19996841E+02 0.11189543E-02 0.11649756E-04-0.62779471E-08 0.94939508E-12 2 + 0.16730059E+05-0.83746933E+02-0.30328493E+01 0.50804518E-01-0.69150292E-05 3 +-0.29715974E-07 0.16296353E-10 0.23895383E+05 0.38909180E+02 4 +C6H8 HW /94C 6H 8 0 0G 200.000 3000.000 1 + 0.28481979E+02-0.15702948E-01 0.26771697E-04-0.11780109E-07 0.16573427E-11 2 + 0.93346445E+04-0.12500226E+03 0.15850439E+01 0.40215142E-01 0.78439543E-05 3 +-0.38761325E-07 0.18545207E-10 0.17949613E+05 0.19112625E+02 4 +i-C6H5 HW /94C 6H 5 0 0G 200.000 3000.000 1 + 0.22501663E+02-0.81009977E-02 0.15955695E-04-0.72310371E-08 0.10310424E-11 2 + 0.58473410E+05-0.91224777E+02-0.78585434E+00 0.60221825E-01-0.62890264E-04 3 + 0.36310730E-07-0.87000259E-11 0.64942270E+05 0.28658905E+02 4 +i-C6H7 HW /94C 6H 7 0 0G 200.000 3000.000 1 + 0.20481506E+02 0.79439697E-03 0.11450761E-04-0.60991177E-08 0.91756724E-12 2 + 0.37728426E+05-0.81812073E+02-0.17099094E+01 0.62486034E-01-0.54290707E-04 3 + 0.26959682E-07-0.58999090E-11 0.44086621E+05 0.33344772E+02 4 +A1C2H HW /94C 8H 6 0 0G 200.000 3000.000 1 + 0.24090759E+02 0.78232400E-03 0.11453964E-04-0.61620504E-08 0.93346685E-12 2 + 0.27429445E+05-0.10499631E+03-0.52645016E+01 0.84511042E-01-0.76597848E-04 3 + 0.33216978E-07-0.47673063E-11 0.35566242E+05 0.46378815E+02 4 +A1C2H- HW /94C 8H 5 0 0G 200.000 3000.000 1 + 0.12359501E+02 0.25453357E-01-0.10606554E-04 0.18914603E-08-0.10630622E-12 2 + 0.60930461E+05-0.40900208E+02-0.44495859E+01 0.76995067E-01-0.66617038E-04 3 + 0.25038682E-07-0.19756601E-11 0.65225926E+05 0.44427948E+02 4 +n-A1C2H2 HW /94C 8H 7 0 0G 200.000 3000.000 1 + 0.30433151E+02-0.13965182E-01 0.25416972E-04-0.11354174E-07 0.16092050E-11 2 + 0.35738719E+05-0.13416492E+03-0.44899931E+01 0.78750789E-01-0.62376959E-04 3 + 0.21952140E-07-0.16960955E-11 0.45902949E+05 0.47980759E+02 4 +i-A1C2H2 HW /94C 8H 7 0 0G 200.000 3000.000 1 + 0.24365524E+02 0.11262144E-02 0.12931670E-04-0.69641146E-08 0.10540145E-11 2 + 0.33549121E+05-0.10462067E+03-0.25971584E+01 0.63454390E-01-0.20852312E-04 3 +-0.22604624E-07 0.15112869E-10 0.41707375E+05 0.37893417E+02 4 +A1C2H* HW /94C 8H 5 0 0G 200.000 3000.000 1 + 0.28686157E+02-0.13869863E-01 0.22721186E-04-0.99882271E-08 0.14085851E-11 2 + 0.56047309E+05-0.12750334E+03-0.29324217E+01 0.66043675E-01-0.39500475E-04 3 +-0.31830381E-08 0.85300387E-11 0.65324043E+05 0.38058685E+02 4 +A1C2H3 HW /94C 8H 8 0 0G 200.000 3000.000 1 + 0.11303213E+02 0.33709887E-01-0.13208885E-04 0.21140962E-08-0.87311377E-13 2 + 0.11725388E+05-0.34737919E+02-0.38678493E+01 0.67947865E-01-0.25230333E-04 3 +-0.18017145E-07 0.12998470E-10 0.16200269E+05 0.45271770E+02 4 +A1C2H3* HW /94C 8H 7 0 0G 200.000 3000.000 1 + 0.11563599E+02 0.30210810E-01-0.11545593E-04 0.17302320E-08-0.52379765E-13 2 + 0.40498492E+05-0.34882965E+02-0.38868685E+01 0.68168961E-01-0.34805875E-04 3 +-0.56410254E-08 0.80714758E-11 0.44941359E+05 0.45943188E+02 4 +A1C2HC2H2 HW /94C 10H 7 0 0G 200.000 3000.000 1 + 0.37523422E+02-0.17028838E-01 0.28777416E-04-0.12719674E-07 0.17976818E-11 2 + 0.61041488E+05-0.17188731E+03-0.63184557E+01 0.11657917E+00-0.13638573E-03 3 + 0.88823526E-07-0.24348468E-10 0.72977062E+05 0.52624207E+02 4 +A1C2H)2 HW /94C 10H 6 0 0G 200.000 3000.000 1 + 0.39766785E+02-0.24939798E-01 0.34210185E-04-0.14473258E-07 0.20104023E-11 2 + 0.50136750E+05-0.18657632E+03-0.75570364E+01 0.12159592E+00-0.15138849E-03 3 + 0.10287488E-06-0.28950911E-10 0.62914168E+05 0.55213287E+02 4 +A2-1 HW /94C 10H 7 0 0G 200.000 3000.000 1 + 0.38380905E+02-0.23157451E-01 0.35479272E-04-0.15395457E-07 0.21609069E-11 2 + 0.32698469E+05-0.18106512E+03-0.85287294E+01 0.10334599E+00-0.91922702E-04 3 + 0.43147448E-07-0.85738135E-11 0.46335004E+05 0.63342224E+02 4 +A2-2 HW /94C 10H 7 0 0G 200.000 3000.000 1 + 0.37326401E+02-0.20478070E-01 0.33183067E-04-0.14576987E-07 0.20569137E-11 2 + 0.32840301E+05-0.17537704E+03-0.38448524E+01 0.70514679E-01-0.93748040E-05 3 +-0.44051607E-07 0.24267865E-10 0.45627656E+05 0.43582001E+02 4 +A2 HW /94C 10H 8 0 0G 200.000 3000.000 1 + 0.36468643E+02-0.15419513E-01 0.30160038E-04-0.13700120E-07 0.19582730E-11 2 + 0.35091445E+04-0.17329489E+03-0.94505043E+01 0.11137849E+00-0.10345667E-03 3 + 0.52800392E-07-0.11804439E-10 0.16695594E+05 0.65187668E+02 4 +naphthyne HW /94C 10H 6 0 0G 200.000 3000.000 1 + 0.37680222E+02-0.23843173E-01 0.34590019E-04-0.14841252E-07 0.20744023E-11 2 + 0.45771934E+05-0.17676088E+03-0.68131294E+01 0.96868336E-01-0.87982247E-04 3 + 0.41858918E-07-0.82716637E-11 0.58661090E+05 0.54849548E+02 4 +A2C2H2 HW /94C 12H 9 0 0G 200.000 3000.000 1 + 0.38449295E+02-0.62794946E-02 0.24404828E-04-0.11968822E-07 0.17586878E-11 2 + 0.41090176E+05-0.17668623E+03-0.78516331E+01 0.12104863E+00-0.10531662E-03 3 + 0.46280483E-07-0.77963885E-11 0.54316234E+05 0.63654388E+02 4 +A2C2HA HW /94C 12H 8 0 0G 200.000 3000.000 1 + 0.49453674E+02-0.33857111E-01 0.46505607E-04-0.19681195E-07 0.27340769E-11 2 + 0.26851051E+05-0.23933099E+03-0.11530450E+02 0.14741433E+00-0.17302344E-03 3 + 0.11500390E-06-0.32709183E-10 0.43793129E+05 0.74391754E+02 4 +A2C2HB HW /94C 12H 8 0 0G 200.000 3000.000 1 + 0.18184774E+02 0.41343965E-01-0.17302822E-04 0.31004770E-08-0.17580817E-12 2 + 0.36171543E+05-0.73466003E+02-0.68233256E+01 0.11382083E+00-0.88584900E-04 3 + 0.25930856E-07 0.80712824E-12 0.42797719E+05 0.54592098E+02 4 +A2C2HA* HW /94C 12H 7 0 0G 200.000 3000.000 1 + 0.36614349E+02-0.60314685E-02 0.21614964E-04-0.10579910E-07 0.15563124E-11 2 + 0.60723898E+05-0.17026691E+03-0.84175968E+01 0.12391680E+00-0.12250672E-03 3 + 0.64071344E-07-0.13889583E-10 0.73248562E+05 0.61893204E+02 4 +A2C2HB* HW /94C 12H 7 0 0G 200.000 3000.000 1 + 0.44933517E+02-0.26026871E-01 0.38589074E-04-0.16646357E-07 0.23321310E-11 2 + 0.57926637E+05-0.21417279E+03-0.11824737E+02 0.14904183E+00-0.18618468E-03 3 + 0.13129460E-06-0.39145326E-10 0.73385375E+05 0.76273834E+02 4 +A2C2H)2 HW /94C 14H 8 0 0G 200.000 3000.000 1 + 0.23671062E+02 0.42137049E-01-0.17596645E-04 0.31081251E-08-0.16805216E-12 2 + 0.77926273E+05-0.99615448E+02-0.63029008E+01 0.13745695E+00-0.13055481E-03 3 + 0.60730663E-07-0.10178345E-10 0.85489430E+05 0.51891548E+02 4 +A2HR5 HW /94C 12H 9 0 0G 200.000 3000.000 1 + 0.51227890E+02-0.36250230E-01 0.50296483E-04-0.21346413E-07 0.29698119E-11 2 + 0.32111648E+05-0.25061665E+03-0.92796507E+01 0.11707741E+00-0.78334211E-04 3 + 0.10778407E-07 0.66555260E-11 0.50063973E+05 0.66712509E+02 4 +A2R5 HW /94C 12H 8 0 0G 200.000 3000.000 1 + 0.45883698E+02-0.27226903E-01 0.41569336E-04-0.18047093E-07 0.25351396E-11 2 + 0.13394574E+05-0.22304584E+03-0.97011614E+01 0.12019449E+00-0.98907694E-04 3 + 0.37240884E-07-0.41124578E-11 0.29601926E+05 0.66970596E+02 4 +A3-4 HW /94C 14H 9 0 0G 200.000 3000.000 1 + 0.55788879E+02-0.37930615E-01 0.53528085E-04-0.22830790E-07 0.31841231E-11 2 + 0.32605633E+05-0.27378882E+03-0.11266616E+02 0.14216852E+00-0.12632679E-03 3 + 0.58348800E-07-0.11184283E-10 0.52141961E+05 0.75774780E+02 4 +A3-1 HW /94C 14H 9 0 0G 200.000 3000.000 1 + 0.51812469E+02-0.28380312E-01 0.45409150E-04-0.19924162E-07 0.28118107E-11 2 + 0.34357359E+05-0.25257889E+03-0.73971558E+01 0.11464679E+00-0.57456185E-04 3 +-0.14070547E-07 0.16005933E-10 0.52239715E+05 0.59582397E+02 4 +A3 HW /94C 14H 10 0 0G 200.000 3000.000 1 + 0.55916473E+02-0.35253201E-01 0.52522926E-04-0.22672634E-07 0.31770584E-11 2 + 0.32654609E+04-0.27604980E+03-0.12275226E+02 0.15032256E+00-0.13862801E-03 3 + 0.69376767E-07-0.15105445E-10 0.23030492E+05 0.78889145E+02 4 +A3C2H2 HW /94C 16H 11 0 0G 200.000 3000.000 1 + 0.47582428E+02-0.12822752E-02 0.25647692E-04-0.13378838E-07 0.20086545E-11 2 + 0.46191215E+05-0.22653258E+03-0.95893555E+01 0.15080631E+00-0.11617327E-03 3 + 0.36814228E-07-0.12802901E-11 0.62701906E+05 0.71309311E+02 4 +A3C2H HW /94C 16H 10 0 0G 200.000 3000.000 1 + 0.52165146E+02-0.13197318E-01 0.34353056E-04-0.16283892E-07 0.23677362E-11 2 + 0.34235055E+05-0.25406651E+03-0.11602674E+02 0.16824394E+00-0.16432030E-03 3 + 0.86394380E-07-0.19310567E-10 0.52172836E+05 0.75515366E+02 4 +A4H HW /94C 16H 11 0 0G 200.000 3000.000 1 + 0.53775238E+02-0.15681151E-01 0.38488797E-04-0.18134241E-07 0.26325071E-11 2 + 0.24154484E+05-0.26532764E+03-0.12209255E+02 0.15599608E+00-0.11474930E-03 3 + 0.30214796E-07 0.18287498E-11 0.43453211E+05 0.79503540E+02 4 +A4 HW /94C 16H 10 0 0G 200.000 3000.000 1 + 0.58017273E+02-0.29164989E-01 0.48728383E-04-0.21593682E-07 0.30609786E-11 2 + 0.43451016E+04-0.29017163E+03-0.13759249E+02 0.16772294E+00-0.15500121E-03 3 + 0.75759544E-07-0.15674045E-10 0.24996187E+05 0.82853027E+02 4 +A4- HW /94C 16H 9 0 0G 200.000 3000.000 1 + 0.22088816E+02 0.53355407E-01-0.22329932E-04 0.39479620E-08-0.21313176E-12 2 + 0.45200934E+05-0.96724930E+02-0.96258593E+01 0.13385314E+00-0.77600773E-04 3 +-0.36330547E-08 0.13855670E-10 0.54171852E+05 0.68499725E+02 4 +P2 HW /94C 12H 10 0 0G 200.000 3000.000 1 + 0.50761871E+02-0.34501564E-01 0.50293413E-04-0.21559579E-07 0.30097192E-11 2 + 0.21538867E+04-0.24670712E+03-0.10283234E+02 0.12428707E+00-0.95990268E-04 3 + 0.32294793E-07-0.23045229E-11 0.20165258E+05 0.72707947E+02 4 +P2- HW /94C 12H 9 0 0G 200.000 3000.000 1 + 0.44711853E+02-0.22851825E-01 0.39102117E-04-0.17352100E-07 0.24579375E-11 2 + 0.33714000E+05-0.21220692E+03-0.11851097E+02 0.13545156E+00-0.13310938E-03 3 + 0.73769911E-07-0.18193003E-10 0.49878781E+05 0.81107361E+02 4 +P2-H HW /94C 12H 11 0 0G 200.000 3000.000 1 + 0.41542511E+02-0.83502531E-02 0.29097937E-04-0.14148299E-07 0.20728341E-11 2 + 0.22772937E+05-0.19578616E+03-0.99978790E+01 0.12279570E+00-0.80112615E-04 3 + 0.11102152E-07 0.64273890E-11 0.37960410E+05 0.74195984E+02 4 +C5H4OH L 8/89C 5H 5O 1 0G 200.000 6000.000 1 + 0.13367912d+02 0.15205785d-01-0.54592258d-05 0.88134866d-09-0.52774454d-13 2 + 0.38411506d+04-0.45920839d+02-0.12822236d+01 0.49041160d-01-0.13688997d-04 3 +-0.29133858d-07 0.19006964d-10 0.80087098d+04 0.30798358d+02 0.96365992d+04 4 +C5H5O L 7/89C 5O 1H 5 0G 200.000 6000.000 1 + 0.12606422d+02 0.16747260d-01-0.61098574d-05 0.99676557d-09-0.60113201d-13 2 + 0.39313455d+04-0.42604277d+02 0.23042835d+00 0.32322691d-01 0.28900443d-04 3 +-0.70679977d-07 0.33406891d-10 0.80753082d+04 0.25330974d+02 4 +C5H4O P 1/93C 5H 4O 1 0G 200.000 3000.000 1 + 0.47927242E+01 0.29221680E-01-0.15997486E-04 0.42069049E-08-0.42815179E-12 2 + 0.22849286E+04-0.30131893E+01-0.23915355E+01 0.47363680E-01-0.30728171E-04 3 + 0.78031552E-08-0.25145729E-12 0.43740152E+04 0.34594337E+02 4 +C7H16 P10/95C 7H 16 0 0G 200.000 5000.000 1391.000 1 + 2.22148969e+01 3.47675750e-02-1.18407129e-05 1.83298478e-09-1.06130266e-13 2 +-3.42760081e+04-9.23040196e+01-1.26836187e+00 8.54355820e-02-5.25346786e-05 3 + 1.62945721e-08-2.02394925e-12-2.56586565e+04 3.53732912e+01 4 +C7H15-1 2/10/95 C 7H 15 0 0G 200.000 5000.000 1391.000 1 + 2.17940709e+01 3.26280243e-02-1.11138244e-05 1.72067148e-09-9.96366999e-14 2 +-9.20938221e+03-8.64954311e+01-4.99570406e-01 8.08826467e-02-5.00532754e-05 3 + 1.56549308e-08-1.96616227e-12-1.04590223e+03 3.46564011e+01 4 +C7H15-2 2/10/95 C 7H 15 0 0G 200.000 5000.000 1391.000 1 + 2.16368842e+01 3.23324804e-02-1.09273807e-05 1.68357060e-09-9.71774091e-14 2 +-1.05873616e+04-8.52209653e+01-3.79155767e-02 7.56726570e-02-4.07473634e-05 3 + 9.32678943e-09-4.92360745e-13-2.35605303e+03 3.37321506e+01 4 +C4H9 P10/84C 4.H 9. 0. 0.G 200.000 6000.000 1 + 9.43040607E+00 2.34271349E-02-8.53599182E-06 1.39748355E-09-8.44057456E-14 2 + 2.14214862E+03-2.42207994E+01 3.54885235E+00 1.78747638E-02 5.00782825E-05 3 +-7.94475071E-08 3.35802354E-11 4.74011588E+03 1.11849382E+01 6.89397210E+03 4 +C3H7 N-L 9/84C 3H 7 0 0G 200.000 5000.000 1 + 0.77026987E 01 0.16044203E-01-0.52833220E-05 0.76298590E-09-0.39392284E-13 2 + 0.82984336E 04-0.15480180E 02 0.10515518E 01 0.25991980E-01 0.23800540E-05 3 +-0.19609569E-07 0.93732470E-11 0.10631863E 05 0.21122559E 02 0.12087447E 05 4 +C7H15O2 7/23/98 C 7.H 15.O 2. 0.G 200.000 5000.000 1 + 2.49023689e+01 3.50716920e-02-1.20440306e-05 1.87464822e-09-1.08947791e-13 2 +-2.82976050e+04-9.73923542e+01 2.37499334e+00 8.34651906e-02-5.13897320e-05 3 + 1.64217662e-08-2.19505216e-12-1.99237961e+04 2.53067342e+01 4 +C7H14O2H 7/23/98 C 7.H 15.O 2. 0.G 200.000 5000.000 1 + 2.70028807e+01 3.22272216e-02-1.09366516e-05 1.68977918e-09-9.77321946e-14 2 +-2.27229231e+04-1.06332170e+02 2.49875186e+00 8.32443344e-02-4.85933986e-05 3 + 1.28927950e-08-1.09878385e-12-1.36530733e+04 2.73754005e+01 4 +C7H14O2HO2 7/23/98 C 7.H 15.O 4. 0.G 200.000 5000.000 1 + 3.23937788e+01 3.33911097e-02-1.15672104e-05 1.81146023e-09-1.05739941e-13 2 +-4.36321048e+04-1.32597311e+02 3.84933185e+00 9.45955097e-02-5.94934121e-05 3 + 1.78836457e-08-2.00618696e-12-3.32051631e+04 2.25912030e+01 4 +C7KET12 7/23/98 C 7.H 14.O 3. 0.G 200.000 5000.000 1 + 2.97472906e+01 3.06622294e-02-1.05563590e-05 1.64627343e-09-9.58171675e-14 2 +-5.66856828e+04-1.22432490e+02 5.82433697e-01 1.01207869e-01-7.65855996e-05 3 + 3.00738606e-08-4.82902792e-12-4.68054419e+04 3.33331449e+01 4 +C7KET21 2/10/95 C 7.H 14.O 3. 0.G 200.000 5000.000 1382.000 1 + 2.80512936e+01 3.27356029e-02-1.14107044e-05 1.79404506e-09-1.05002142e-13 2 +-5.89640173e+04-1.11392338e+02 4.19023030e+00 8.43118237e-02-5.44315814e-05 3 + 1.85837721e-08-2.72768938e-12-5.00570382e+04 1.85783455e+01 4 +C5H11CHO 2/29/96 C 6H 12O 1 0G 200.000 5000.000 1 + 1.98891043e+01 2.71869340e-02-9.27391515e-06 1.43744158e-09-8.33090761e-14 2 +-3.97523444e+04-7.60741671e+01 1.37517192e+00 6.65669689e-02-4.04423050e-05 3 + 1.23836270e-08-1.52905857e-12-3.28740986e+04 2.48343934e+01 4 +C5H11CO 2/29/96 C 6.H 11.O 1. 0.G 200.000 5000.000 1 + 1.94783812e+01 2.50466029e-02-8.54861346e-06 1.32557944e-09-7.68503296e-14 2 +-2.07923937e+04-7.21995578e+01 2.14479069e+00 6.17863563e-02-3.74134690e-05 3 + 1.13283795e-08-1.36917698e-12-1.43451172e+04 2.23128045e+01 4 +C5H11 T03/97C 5.H 11. 0. 0.G 200.000 5000.000 1 + 1.13324106E+01 3.03659897E-02-1.13934480E-05 1.99539733E-09-1.32825012E-13 2 +-5.95299959E+03-3.13564905E+01 3.57867617E+00 3.04236365E-02 3.27768270E-05 3 +-5.86453147E-08 2.39315107E-11-2.60420265E+03 1.42591121E+01 6.68760000E+03 4 +CH3O2 L 1/84C 1H 3O 2N 0G 200.000 5000.00 1 + 0.66812963E 01 0.80057271E-02-0.27188507E-05 0.40631365E-09-0.21927725E-13 2 + 0.52621851E 03-0.99423847E 01 0.20986490E 01 0.15786357E-01 0.75683261E-07 3 +-0.11274587E-07 0.56665133E-11 0.20695879E 04 0.15007068E 02 4 +CH4O2 T11/96C 1H 4O 2 0G 200.000 6000.000 1 + 6.86907934E+00 1.00840883E-02-3.66515947E-06 5.96302681E-10-3.58894156E-14 2 +-1.98402231E+04-1.24951986E+01 3.72654981E+00 7.51851847E-03 2.35970425E-05 3 +-3.52694507E-08 1.42757614E-11-1.83982011E+04 6.52443362E+00-1.68074366E+04 4 +C6H12 2/14/95 C 6.H 12.O 0. 0.G 200.000 5000.000 1 + 1.78337529e+01 2.67377658e-02-9.10036773e-06 1.40819768e-09-8.15124244e-14 2 +-1.42062860e+04-6.83818851e+01-1.35275205e+00 6.98655426e-02-4.59408022e-05 3 + 1.56967343e-08-2.21296175e-12-7.34368617e+03 3.53120691e+01 4 +C3H5 BUR 92C 3H 5O 0N 0G 200.000 6000.000 1 + 6.54761132E+00 1.33152246E-02-4.78333100E-06 7.71949814E-10-4.61930808E-14 2 + 1.72714707E+04-9.27486841E+00 3.78794693E+00 9.48414335E-03 2.42343368E-05 3 +-3.65604010E-08 1.48592356E-11 1.86261218E+04 7.82822499E+00 2.03259122E+04 4 +CH3CHO L 8/88C 2H 4O 1 G 200.000 6000.000 1000.000 1 + 0.54041108E+01 0.11723059E-01-0.42263137E-05 0.68372451E-09-0.40984863E-13 2 +-0.22593122E+05-0.34807917E+01 0.47294595E+01-0.31932858E-02 0.47534921E-04 3 +-0.57458611E-07 0.21931112E-10-0.21572878E+05 0.41030159E+01 4 +C3H3 BUR 92C 3H 3O 0N 0G 200.000 6000.000 1 + 6.64175821E+00 8.08587428E-03-2.84787887E-06 4.53525977E-10-2.68879815E-14 2 + 3.89793699E+04-1.04004255E+01 1.82840766E+00 2.37839036E-02-2.19228176E-05 3 + 1.00067444E-08-1.38984644E-12 4.01863058E+04 1.38447957E+01 4.16139977E+04 4 +C4H3 L 9/89C 4H 3O 0N 0G 200.000 6000.000 1 + 0.84762079E+01 0.88782327E-02-0.30328412E-05 0.47358302E-09-0.27716627E-13 2 + 0.54756540E+05-0.17170551E+02 0.24173247E+01 0.24104782E-01-0.12813470E-04 3 +-0.28606237E-08 0.39194527E-11 0.56506476E+05 0.14471107E+02 0.58181574E+05 4 +CH2CHO SAND86O 1H 3C 2 G 200.000 5000.000 1000.000 1 + 0.05975670E+02 0.08130591E-01-0.02743624E-04 0.04070304E-08-0.02176017E-12 2 + 0.04903218E+04-0.05045251E+02 0.03409062E+02 0.10738574E-01 0.01891492E-04 3 +-0.07158583E-07 0.02867385E-10 0.15214766E+04 0.09558290E+02 4 +END diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/RASProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/RASProperties new file mode 100644 index 0000000000000000000000000000000000000000..907214c9f88bfcbb7588a24963aa40f42a944036 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/RASProperties @@ -0,0 +1,60 @@ +/*--------------------------------*- 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 RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RASModel kEpsilon; + +turbulence on; + +laminarCoeffs +{ +} + +kEpsilonCoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; +} + +RNGkEpsilonCoeffs +{ +} + +LaunderSharmaKECoeffs +{ +} + +LRRCoeffs +{ +} + +LaunderGibsonRSTMCoeffs +{ +} + +wallFunctionCoeffs +{ + kappa 0.4187; + E 9; +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/chemistryProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/chemistryProperties new file mode 100644 index 0000000000000000000000000000000000000000..a13dc664a59cac61c012ec36d0c56ee450d07929 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/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 on; + +turbulentReaction on; + +chemistrySolver ODE; + +initialChemicalTimeStep 1e-07; + +sequentialCoeffs +{ + cTauChem 0.001; +} + +EulerImplicitCoeffs +{ + cTauChem 0.05; + equilibriumRateLimiter off; +} + +ODECoeffs +{ + ODESolver SIBS; + eps 0.05; + scale 1; +} + +Cmix Cmix [ 0 0 0 0 0 0 0 ] 1; + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Positions b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Positions new file mode 100644 index 0000000000000000000000000000000000000000..a5cc78c32e2afdc616102f8f61788b2aeed5407c --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Positions @@ -0,0 +1,48 @@ +/*--------------------------------*- 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 ""; + class vectorField; + object coalCloudPositions; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +( +(0.005 0.5 0.05) +(0.010 0.5 0.05) +(0.015 0.5 0.05) +(0.020 0.5 0.05) +(0.025 0.5 0.05) +(0.030 0.5 0.05) +(0.035 0.5 0.05) +(0.040 0.5 0.05) +(0.045 0.5 0.05) +(0.005 0.6 0.05) +(0.010 0.6 0.05) +(0.015 0.6 0.05) +(0.020 0.6 0.05) +(0.025 0.6 0.05) +(0.030 0.6 0.05) +(0.035 0.6 0.05) +(0.040 0.6 0.05) +(0.045 0.6 0.05) +(0.005 0.7 0.05) +(0.010 0.7 0.05) +(0.015 0.7 0.05) +(0.020 0.7 0.05) +(0.025 0.7 0.05) +(0.030 0.7 0.05) +(0.035 0.7 0.05) +(0.040 0.7 0.05) +(0.045 0.7 0.05) +) +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties new file mode 100644 index 0000000000000000000000000000000000000000..8f53d4c4b002c03c44517a65d7bf6f7c18153540 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties @@ -0,0 +1,165 @@ +/*--------------------------------*- 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 coalCloud1Properties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +InjectionModel ManualInjection; + +DragModel SphereDrag; + +DispersionModel StochasticDispersionRAS; + +PatchInteractionModel StandardWallInteraction; + +HeatTransferModel RanzMarshall; + +CompositionModel SingleMixtureFraction; + +PhaseChangeModel LiquidEvaporation; + +DevolatilisationModel ConstantRateDevolatilisation; + +SurfaceReactionModel COxidationDiffusionLimitedRate; + +PostProcessingModel none; + +radiation on; + +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; + minParticleMass minParticleMass [ 1 0 0 0 0 ] 1e-15; + rho0 rho0 [ 1 -3 0 0 0 ] 1000; + T0 T0 [ 0 0 0 1 0 ] 300; + 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; + Tvap Tvap [ 0 0 0 1 0 ] 400; + LDevol LDevol [ 0 0 0 0 0 ] 0; + hRetentionCoeff hRetentionCoeff [ 0 0 0 0 0 ] 1; + constantVolume true; +} + +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 ] 0.0001; + parcelBasisType mass; + SOI 0; + positionsFile "coalCloud1Positions"; + U0 ( 0 -10 0 ); + parcelPDF + { + pdfType RosinRammler; + RosinRammlerPDF + { + minValue 5e-06; + maxValue 0.0005; + d ( 5e-05 ); + n ( 0.5 ); + } + } +} + +StandardWallInteractionCoeffs +{ + e e [ 0 0 0 0 0 ] 1; + mu mu [ 0 0 0 0 0 ] 0; +} + +RanzMarshallCoeffs +{ + Pr Pr [ 0 0 0 0 0 ] 0.7; +} + +SingleMixtureFractionCoeffs +{ + phases + ( + gas + { + CH4 0.604; + H2 0.099; + CO2 0.297; + } + liquid + { + H2O 1; + } + solid + { + ash 0.136304; + C 0.863696; + } + ); + YGasTot0 0.211; + YLiquidTot0 0.026; + YSolidTot0 0.763; +} + +LiquidEvaporationCoeffs +{ + activeLiquids + ( + H2O + ); +} + +ConstantRateDevolatilisationCoeffs +{ + A0 A0 [ 0 0 -1 0 0 ] 12; + volatileResidualCoeff 0.001; +} + +COxidationDiffusionLimitedRateCoeffs +{ + Sb Sb [ 0 0 0 0 0 ] 1; + D D [ 0 2 -1 0 0 ] 1.5e-05; +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/enthalpySourceProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/enthalpySourceProperties new file mode 100644 index 0000000000000000000000000000000000000000..9c1295cc93c7296b01b2e4f6a974827096d94134 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/enthalpySourceProperties @@ -0,0 +1,39 @@ +/*--------------------------------*- 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 enthalpySourceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +active yes; + +cellSource sphereToCell; + +volumeType absolute; + +timeStart 0.15; + +duration 0.1; + +onValue 10000; + +offValue 0; + +sphereToCellCoeffs +{ + centre ( 0.125 0.375 0.05 ); + radius 0.005; +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/environmentalProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/environmentalProperties new file mode 100644 index 0000000000000000000000000000000000000000..4baaea2a25ae33b74c1a57066d6bb1db10704eea --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/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 -9.81 0 ); + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties new file mode 100644 index 0000000000000000000000000000000000000000..51e1df08101c3ce45839e94cdfa1168e2f9a7d66 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties @@ -0,0 +1,106 @@ +/*--------------------------------*- 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 limestoneCloud1Properties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +InjectionModel ManualInjection; + +DragModel SphereDrag; + +DispersionModel StochasticDispersionRAS; + +PatchInteractionModel StandardWallInteraction; + +HeatTransferModel RanzMarshall; + +PostProcessingModel none; + +radiation on; + +coupled true; + +cellValueSourceCorrection on; + +parcelTypeId 2; + +constantProperties +{ + rhoMin rhoMin [ 1 -3 0 0 0 ] 1e-15; + TMin TMin [ 0 0 0 1 0 ] 200; + minParticleMass minParticleMass [ 1 0 0 0 0 ] 1e-15; + rho0 rho0 [ 1 -3 0 0 0 ] 2500; + T0 T0 [ 0 0 0 1 0 ] 300; + cp0 cp0 [ 0 2 -2 -1 0 ] 900; + epsilon0 epsilon0 [ 0 0 0 0 0 ] 1; + f0 f0 [ 0 0 0 0 0 ] 0.5; +} + +interpolationSchemes +{ + rho cell; + mu cell; + U cellPoint; + Cp cell; + T 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 ] 0.0001; + parcelBasisType mass; + SOI 0; + positionsFile "limestonePositions"; + U0 ( 0 0 0 ); + parcelPDF + { + pdfType RosinRammler; + RosinRammlerPDF + { + minValue 5e-06; + maxValue 0.000565; + d ( 4.8e-05 ); + n ( 0.5 ); + } + } +} + +StandardWallInteractionCoeffs +{ + e e [ 0 0 0 0 0 ] 1; + mu mu [ 0 0 0 0 0 ] 0; +} + +RanzMarshallCoeffs +{ + Pr Pr [ 0 0 0 0 0 ] 0.7; +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestonePositions b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestonePositions new file mode 100644 index 0000000000000000000000000000000000000000..e94ef685103857f451b00d39634f4f78df18509e --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestonePositions @@ -0,0 +1,37 @@ +/*--------------------------------*- 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 ""; + class vectorField; + object limestonePositions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +( +(0.0075 0.55 0.05) +(0.0125 0.55 0.05) +(0.0175 0.55 0.05) +(0.0225 0.55 0.05) +(0.0275 0.55 0.05) +(0.0325 0.55 0.05) +(0.0375 0.55 0.05) +(0.0425 0.55 0.05) +(0.0475 0.55 0.05) +(0.0075 0.45 0.05) +(0.0125 0.45 0.05) +(0.0175 0.45 0.05) +(0.0225 0.45 0.05) +(0.0275 0.45 0.05) +(0.0325 0.45 0.05) +(0.0375 0.45 0.05) +(0.0425 0.45 0.05) +(0.0475 0.45 0.05) +) +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/polyMesh/blockMeshDict b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..fd9096e9524642d771a3cdc3d21957a9c13a55fc --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/polyMesh/blockMeshDict @@ -0,0 +1,88 @@ +/*--------------------------------*- 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/polyMesh"; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1.0; + +vertices +( + (0 0 0) + (0.05 0 0) + (0.05 0.5 0) + (0 0.5 0) + (0 0 0.1) + (0.05 0 0.1) + (0.05 0.5 0.1) + (0 0.5 0.1) + (0.5 0 0) + (0.5 0.5 0) + (0.5 0 0.1) + (0.5 0.5 0.1) + (0.05 1 0) + (0 1 0) + (0.05 1 0.1) + (0 1 0.1) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (5 50 1) simpleGrading (1 1 1) + hex (1 8 9 2 5 10 11 6) (40 50 1) simpleGrading (1 1 1) + hex (3 2 12 13 7 6 14 15) (5 50 1) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + wall top + ( + (13 15 14 12) + ) + wall bottom + ( + (0 1 5 4) + (1 8 10 5) + ) + wall walls + ( + (8 9 11 10) + (9 2 6 11) + (2 12 14 6) + ) + symmetryPlane symmetry + ( + (4 7 3 0) + (7 15 13 3) + ) + empty frontAndBack + ( + (0 3 2 1) + (3 13 12 2) + (1 2 9 8) + (5 6 7 4) + (6 14 15 7) + (10 11 6 5) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/radiationProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/radiationProperties new file mode 100644 index 0000000000000000000000000000000000000000..8fbbdfa7202105d49a104735d2501e55b0c25f4d --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/radiationProperties @@ -0,0 +1,73 @@ +/*--------------------------------*- 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 on; + +solverFreq 1; + +radiationModel P1; + +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/coalChemistryFoam/simplifiedSiwek/constant/thermophysicalProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/thermophysicalProperties new file mode 100644 index 0000000000000000000000000000000000000000..4936c35ab1a0392631456c8a0dcee3d6b7883db2 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/thermophysicalProperties @@ -0,0 +1,46 @@ +/*--------------------------------*- 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; + +foamChemistryThermoFile "$FOAM_CASE/chemkin/foam.dat"; + +foamChemistryFile "$FOAM_CASE/chemkin/foam.inp"; + +inertSpecie N2; + +liquidComponents +( + H2O +); + +H2O H2O defaultCoeffs; + +solidFuelComponents +( + C + ash +); + +C C defaultCoeffs; + +ash ash defaultCoeffs; + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/turbulenceProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..78f28eca604be4d8fc94d38d23ae0cbb679b18fb --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/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/coalChemistryFoam/simplifiedSiwek/system/controlDict b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..50cd97415e2827afb6d1ef6cca3d46ef50788b72 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/controlDict @@ -0,0 +1,55 @@ +/*--------------------------------*- 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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application coalChemistryFoam; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 0.5; + +deltaT 0.0001; + +writeControl adjustableRunTime; + +writeInterval 0.0025; + +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/coalChemistryFoam/simplifiedSiwek/system/decomposeParDict b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..e9784a98d78f4c2d7f0435a759a78ad3f30a0226 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/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/coalChemistryFoam/simplifiedSiwek/system/fvSchemes b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes new file mode 100755 index 0000000000000000000000000000000000000000..99267208eae1f5130781bee35206d73e203fc64a --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/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/coalChemistryFoam/simplifiedSiwek/system/fvSolution b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution new file mode 100755 index 0000000000000000000000000000000000000000..08e0c7a037ab36453b3c30cae21fa61bef32c837 --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution @@ -0,0 +1,143 @@ +/*--------------------------------*- 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 PBiCG; + preconditioner DILU; + tolerance 1e-06; + relTol 0; + }; + 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 yes; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + momentumPredictor yes; +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/G b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/G new file mode 100644 index 0000000000000000000000000000000000000000..fa160e6bb38aee4a10d101cb0dfe2a75b7f5693a --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/G @@ -0,0 +1,37 @@ +/*--------------------------------*- 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; + } + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/H2O b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/H2O new file mode 100644 index 0000000000000000000000000000000000000000..a5001202eaca379918e2ebd0908ea999240d9948 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/H2O @@ -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 volScalarField; + location "0"; + object H2O; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + walls + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/N2 b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/N2 new file mode 100644 index 0000000000000000000000000000000000000000..61a0a0cd9dbcc3734588bd1bc951f94d506d2c13 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/N2 @@ -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 volScalarField; + location "0"; + object N2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.79; + +boundaryField +{ + walls + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/O2 b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/O2 new file mode 100644 index 0000000000000000000000000000000000000000..3927d8183c89e4e1d0f46210e2f16249c2a27f33 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/O2 @@ -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 volScalarField; + location "0"; + object O2; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.21; + +boundaryField +{ + walls + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/T b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/T new file mode 100644 index 0000000000000000000000000000000000000000..4a49016ccd8379e5d47f5178f6a15f918e9b816f --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/T @@ -0,0 +1,35 @@ +/*--------------------------------*- 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 400; + +boundaryField +{ + walls + { + type fixedValue; + value uniform 400; + } + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/U b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/U new file mode 100644 index 0000000000000000000000000000000000000000..2b02dd199a657910b74a6c5b6368595cfe4103f9 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/U @@ -0,0 +1,35 @@ +/*--------------------------------*- 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); + } + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/epsilon b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/epsilon new file mode 100644 index 0000000000000000000000000000000000000000..50b54646b3d3d5ab88f13d0619c6e4afbcdba413 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/epsilon @@ -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 volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 5390.5; + +boundaryField +{ + walls + { + type compressible::epsilonWallFunction; + value uniform 5390.5; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/k b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/k new file mode 100644 index 0000000000000000000000000000000000000000..26fcff0babb808a41223f7d9d5732248b4ea2aec --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/k @@ -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 volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 37.5; + +boundaryField +{ + walls + { + type compressible::kQRWallFunction; + value uniform 37.5; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/p b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/p new file mode 100644 index 0000000000000000000000000000000000000000..9563def1f1e547eb01ecf34203eeea0580b46f2e --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/0/p @@ -0,0 +1,34 @@ +/*--------------------------------*- 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; + } + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/chem.inp b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/chem.inp new file mode 100644 index 0000000000000000000000000000000000000000..e1c66808259097c7678e10a52072760041181bec --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/chem.inp @@ -0,0 +1,6 @@ +ELEMENTS +O H N +END +SPECIES +N2 O2 H2O +END diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/foam.dat b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/foam.dat new file mode 100644 index 0000000000000000000000000000000000000000..36ef32431218784d9c10aa1609870debbbbb5924 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/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/reactingParcelFoam/evaporationTest/chemkin/foam.inp b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/foam.inp new file mode 100644 index 0000000000000000000000000000000000000000..80d66f62c04dbc0e5638ad8912f02619e526e7be --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/foam.inp @@ -0,0 +1,11 @@ +species +( + O2 + H2O + N2 +) +; + +reactions +( +); diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/therm.dat b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/therm.dat new file mode 100644 index 0000000000000000000000000000000000000000..2a896be3987daf9b20db6bff6b4f7c67b8c6e4c8 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/chemkin/therm.dat @@ -0,0 +1,15 @@ +THERMO ALL + 200.000 1000.000 5000.000 +H2O 20387H 2O 1 G 0200.00 5000.00 1000.00 1 + 0.02672146E+02 0.03056293E-01-0.08730260E-05 0.01200996E-08-0.06391618E-13 2 +-0.02989921E+06 0.06862817E+02 0.03386842E+02 0.03474982E-01-0.06354696E-04 3 + 0.06968581E-07-0.02506588E-10-0.03020811E+06 0.02590233E+02 4 +N2 121286N 2 G 0200.00 5000.00 1000.00 1 + 0.02926640E+02 0.01487977E-01-0.05684761E-05 0.01009704E-08-0.06753351E-13 2 +-0.09227977E+04 0.05980528E+02 0.03298677E+02 0.01408240E-01-0.03963222E-04 3 + 0.05641515E-07-0.02444855E-10-0.01020900E+05 0.03950372E+02 4 +O2 121386O 2 G 0200.00 5000.00 1000.00 1 + 0.03697578E+02 0.06135197E-02-0.01258842E-05 0.01775281E-09-0.01136435E-13 2 +-0.01233930E+05 0.03189166E+02 0.03212936E+02 0.01127486E-01-0.05756150E-05 3 + 0.01313877E-07-0.08768554E-11-0.01005249E+05 0.06034738E+02 4 +END diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/chemistryProperties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/chemistryProperties new file mode 100644 index 0000000000000000000000000000000000000000..53a5860d33ad658f415a68c944c3a89007fe22d3 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/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/reactingParcelFoam/evaporationTest/constant/environmentalProperties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/environmentalProperties new file mode 100644 index 0000000000000000000000000000000000000000..e5124f24528a9aefc741713cd06a11917107de2a --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/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/reactingParcelFoam/evaporationTest/constant/polyMesh/blockMeshDict b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..68e44fead41bca4eccc385d092ad5a424c0b37f9 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/polyMesh/blockMeshDict @@ -0,0 +1,61 @@ +/*--------------------------------*- 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 0.001; + +vertices +( + ( 0 0 0) + (12 0 0) + (12 12 0) + ( 0 12 0) + ( 0 0 1) + (12 0 1) + (12 12 1) + ( 0 12 1) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + wall walls + ( + (3 7 6 2) + (0 4 7 3) + (2 6 5 1) + (1 5 4 0) + ) + empty frontAndBack + ( + (0 3 2 1) + (4 5 6 7) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/radiationProperties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/radiationProperties new file mode 100644 index 0000000000000000000000000000000000000000..59468cd924256aa242b4f679efcef467ddf95b20 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/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/reactingParcelFoam/evaporationTest/constant/reactingCloud1Positions b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Positions new file mode 100644 index 0000000000000000000000000000000000000000..6d19cbc19bad9ca1c5c8ba0b7c51cd24b0778b37 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/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/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties new file mode 100644 index 0000000000000000000000000000000000000000..be03e91343092bf58fa5b353f4fa76a49d3d05d7 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties @@ -0,0 +1,130 @@ +/*--------------------------------*- 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 ManualInjection; + +DragModel SphereDrag; + +DispersionModel none; + +PatchInteractionModel StandardWallInteraction; + +HeatTransferModel RanzMarshall; + +CompositionModel SinglePhaseMixture; + +PhaseChangeModel LiquidEvaporation; + +PostProcessingModel none; + +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 ] 4187; + 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; + } + } +} + +StandardWallInteractionCoeffs +{ + e e [ 0 0 0 0 0 ] 1; + mu mu [ 0 0 0 0 0 ] 0; +} + +RanzMarshallCoeffs +{ + Pr Pr [ 0 0 0 0 0 ] 0.7; +} + +SinglePhaseMixtureCoeffs +{ + phases + ( + liquid + { + H2O 1; + } + ); +} + +LiquidEvaporationCoeffs +{ + activeLiquids + ( + H2O + ); +} + +// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/thermophysicalProperties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/thermophysicalProperties new file mode 100644 index 0000000000000000000000000000000000000000..04b13b12cf071d823be29a6c41dc37ec5ab58875 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/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/reactingParcelFoam/evaporationTest/constant/turbulenceProperties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..974e568fa84afa295d535b90a50fdb79826892b7 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/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 laminar; + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/controlDict b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..fb4a4c45a761f802494c7437a226768a67cce452 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/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 1; + +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 0.3; + +maxDeltaT 1e-3; + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/decomposeParDict b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..e9784a98d78f4c2d7f0435a759a78ad3f30a0226 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/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/reactingParcelFoam/evaporationTest/system/fvSchemes b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..99267208eae1f5130781bee35206d73e203fc64a --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/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/reactingParcelFoam/evaporationTest/system/fvSolution b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..294428ed7bf29edbbb1b08f5ae8ceba909903285 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution @@ -0,0 +1,143 @@ +/*--------------------------------*- 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 PBiCG; + preconditioner DILU; + tolerance 1e-06; + relTol 0; + } + 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 yes; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + momentumPredictor yes; +} + + +// ************************************************************************* // 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 + diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/snappyHexMeshDict b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/snappyHexMeshDict index be30045c6d4d77a2bf014349a0e4890ff5d963bd..30da45333116a695a3d463d85d30aa98babc1b38 100644 --- a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/snappyHexMeshDict +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/snappyHexMeshDict @@ -45,6 +45,8 @@ geometry fridgeFreezer { type searchableSurfaceCollection; + + mergeSubRegions true; freezer { @@ -75,6 +77,8 @@ geometry { type searchableSurfaceCollection; + mergeSubRegions true; + seal { surface fridgeFreezer; @@ -244,6 +248,8 @@ snapControls // Settings for the layer addition. addLayersControls { + relativeSizes true; + // Per final patch (so not geometry!) the layer information layers { @@ -264,7 +270,7 @@ addLayersControls // is the // thickness of the layer furthest away from the wall. // Relative to undistorted size of cell outside layer. - finalLayerRatio 0.5; + finalLayerThickness 0.5; //- Minimum thickness of cell layer. If for any reason layer // cannot be above minThickness do not add layer. diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/MRFInterFoam.C b/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/MRFInterFoam.C new file mode 100644 index 0000000000000000000000000000000000000000..9f1efad337fce1be11e0728662c8980823f3ab80 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/MRFInterFoam.C @@ -0,0 +1,109 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +Application + MRFInterFoam + +Description + Solver for 2 incompressible, isothermal immiscible fluids using a VOF + (volume of fluid) phase-fraction based interface capturing approach. + The momentum and other fluid properties are of the "mixture" and a single + momentum equation is solved. + + Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. + + For a two-fluid approach see twoPhaseEulerFoam. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "MULES.H" +#include "subCycle.H" +#include "interfaceProperties.H" +#include "twoPhaseMixture.H" +#include "turbulenceModel.H" +#include "MRFZones.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readEnvironmentalProperties.H" + #include "readPISOControls.H" + #include "initContinuityErrs.H" + #include "createFields.H" + #include "createMRFZones.H" + #include "readTimeControls.H" + #include "correctPhi.H" + #include "CourantNo.H" + #include "setInitialDeltaT.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.run()) + { + #include "readPISOControls.H" + #include "readTimeControls.H" + #include "CourantNo.H" + #include "setDeltaT.H" + + runTime++; + + Info<< "Time = " << runTime.timeName() << nl << endl; + + twoPhaseProperties.correct(); + + #include "alphaEqnSubCycle.H" + + #include "UEqn.H" + + // --- PISO loop + for (int corr=0; corr<nCorr; corr++) + { + #include "pEqn.H" + } + + #include "continuityErrs.H" + + turbulence->correct(); + + runTime.write(); + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + } + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/Make/files b/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..706858442e6a56a1a60fb8bb7377b9879e221fd0 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/Make/files @@ -0,0 +1,3 @@ +MRFInterFoam.C + +EXE = $(FOAM_USER_APPBIN)/MRFInterFoam diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/Make/options b/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..e4acc4ce993fdad66ddeb7fb84c06b2824ccbc53 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/Make/options @@ -0,0 +1,14 @@ +EXE_INC = \ + -I$(FOAM_SOLVERS)/multiphase/interFoam \ + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ + -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +EXE_LIBS = \ + -linterfaceProperties \ + -lincompressibleTransportModels \ + -lincompressibleRASModels \ + -lincompressibleLESModels \ + -lfiniteVolume diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/UEqn.H b/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/UEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..ae944a9d0e5b4060da256b629f1ff0326d014967 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/UEqn.H @@ -0,0 +1,35 @@ + surfaceScalarField muEff + ( + "muEff", + twoPhaseProperties.muf() + + fvc::interpolate(rho*turbulence->nut()) + ); + + fvVectorMatrix UEqn + ( + fvm::ddt(rho, U) + + fvm::div(rhoPhi, U) + - fvm::laplacian(muEff, U) + - (fvc::grad(U) & fvc::grad(muEff)) + //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + ); + mrfZones.addCoriolis(rho, UEqn); + + UEqn.relax(); + + if (momentumPredictor) + { + solve + ( + UEqn + == + fvc::reconstruct + ( + fvc::interpolate(rho)*(g & mesh.Sf()) + + ( + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) + - fvc::snGrad(p) + ) * mesh.magSf() + ) + ); + } diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/createMRFZones.H b/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/createMRFZones.H new file mode 100644 index 0000000000000000000000000000000000000000..161446a8e6f2397982c0579c232b8ce3e458053d --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/createMRFZones.H @@ -0,0 +1,2 @@ + MRFZones mrfZones(mesh); + mrfZones.correctBoundaryVelocity(U); diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/pEqn.H b/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/pEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..5a67dd0497b150c4a46f62f306afdf814cfe17aa --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/pEqn.H @@ -0,0 +1,48 @@ +{ + volScalarField rUA = 1.0/UEqn.A(); + surfaceScalarField rUAf = fvc::interpolate(rUA); + + U = rUA*UEqn.H(); + + surfaceScalarField phiU + ( + "phiU", + (fvc::interpolate(U) & mesh.Sf()) + //+ fvc::ddtPhiCorr(rUA, rho, U, phi) + ); + mrfZones.relativeFlux(phiU); + + phi = phiU + + ( + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf() + + fvc::interpolate(rho)*(g & mesh.Sf()) + )*rUAf; + adjustPhi(phi, U, p); + + for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvm::laplacian(rUAf, p) == fvc::div(phi) + ); + + pEqn.setReference(pRefCell, pRefValue); + + if (corr == nCorr-1 && nonOrth == nNonOrthCorr) + { + pEqn.solve(mesh.solver(p.name() + "Final")); + } + else + { + pEqn.solve(mesh.solver(p.name())); + } + + if (nonOrth == nNonOrthCorr) + { + phi -= pEqn.flux(); + } + } + + U += rUA*fvc::reconstruct((phi - phiU)/rUAf); + U.correctBoundaryConditions(); +} diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/0/U b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/0/U new file mode 100644 index 0000000000000000000000000000000000000000..500a0fbea165c8862b993215de7a33f21267fd13 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/0/U @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + rotor + { + type fixedValue; + value uniform (0 0 0); + } + stator + { + type fixedValue; + value uniform (0 0 0); + } + front + { + type empty; + } + back + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/0/alpha1 b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/0/alpha1 new file mode 100644 index 0000000000000000000000000000000000000000..f4e647e372dc3641e186e02d763fdb92a4217d95 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/0/alpha1 @@ -0,0 +1,3119 @@ +/*--------------------------------*- 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 alpha1; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField nonuniform List<scalar> +3072 +( +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +) +; + +boundaryField +{ + rotor + { + type zeroGradient; + } + stator + { + type zeroGradient; + } + front + { + type empty; + } + back + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/0/alpha1.org b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/0/alpha1.org new file mode 100644 index 0000000000000000000000000000000000000000..adc19d7f15a738efc8b7f2d48da4e25141e3e6d3 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/0/alpha1.org @@ -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 volScalarField; + object alpha1; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + rotor + { + type zeroGradient; + } + + stator + { + type zeroGradient; + } + + front + { + type empty; + } + + back + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/pd b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/0/p similarity index 74% rename from tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/pd rename to tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/0/p index 3a679ba63a51f43776afa9f72c8fe4e69e328aac..25b3e3f0d4d589ff4a01f1f88a5c627252dd7288 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/pd +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/0/p @@ -10,7 +10,7 @@ FoamFile version 2.0; format ascii; class volScalarField; - object pd; + object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -20,22 +20,24 @@ internalField uniform 0; boundaryField { - floor + rotor { - type fixedFluxBuoyantPressure; - value uniform 0; + type zeroGradient; } - ceiling + stator { - type fixedFluxBuoyantPressure; - value uniform 0; + type zeroGradient; } - fixedWalls + front { - type fixedFluxBuoyantPressure; - value uniform 0; + type empty; + } + + back + { + type empty; } } diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/Allrun b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..e8e310bf86a0faa6481cf8e4284b6fbfaf5780ce --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/Allrun @@ -0,0 +1,9 @@ +#!/bin/sh + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +application="MRFInterFoam" + +./makeMesh +runApplication $application diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/MRFZones b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/MRFZones new file mode 100644 index 0000000000000000000000000000000000000000..855e3864ce8f3fcf79fe47d6301ddaa13ae78306 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/MRFZones @@ -0,0 +1,31 @@ +/*--------------------------------*- 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 dictionary; + location "constant"; + object MRFZones; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +1 +( + rotor + { + // Fixed patches (by default they 'move' with the MRF zone) + nonRotatingPatches (); + + origin origin [0 1 0 0 0 0 0] (0 0 0); + axis axis [0 0 0 0 0 0 0] (0 0 1); + omega omega [0 0 -1 0 0 0 0] 6.2831853; + } +) + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/environmentalProperties b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/environmentalProperties new file mode 100644 index 0000000000000000000000000000000000000000..1f0ea06a3cb5296cd1202223d4955977d562ca1f --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/environmentalProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- 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 "constant"; + object environmentalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +g g [0 1 -2 0 0 0 0] (0 0 0); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/polyMesh/blockMeshDict b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..554df2afd61191c9b3b121c440c6fad3d4ceb429 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/polyMesh/blockMeshDict @@ -0,0 +1,818 @@ +/*--------------------------------*- 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 dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// General macros to create 2D/extruded-2D meshes + + + + + + + + + + + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.1; + +// Hub radius + + +// Impeller-tip radius + + +// Baffle-tip radius + + +// Tank radius + + +// MRF region radius + + +// Thickness of 2D slab + + +// Base z + + +// Top z + + +// Number of cells radially between hub and impeller tip + + +// Number of cells radially in each of the two regions between +// impeller and baffle tips + + +// Number of cells radially between baffle tip and tank + + +// Number of cells azimuthally in each of the 8 blocks + + +// Number of cells in the thickness of the slab + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +vertices +( + (0.2 0 0) // Vertex r0b = 0 + (0.2 0 0) // Vertex r0sb = 1 + (0.141421356364228 -0.141421356110391 0) // Vertex r1b = 2 + (3.58979347393082e-10 -0.2 0) // Vertex r2b = 3 + (3.58979347393082e-10 -0.2 0) // Vertex r2sb = 4 + (-0.141421355856554 -0.141421356618065 0) // Vertex r3b = 5 + (-0.2 7.17958694786164e-10 0) // Vertex r4b = 6 + (-0.2 7.17958694786164e-10 0) // Vertex r4sb = 7 + (-0.141421355856554 0.141421356618065 0) // Vertex r5b = 8 + (3.58979347393082e-10 0.2 0) // Vertex r6b = 9 + (3.58979347393082e-10 0.2 0) // Vertex r6sb = 10 + (0.141421356364228 0.141421356110391 0) // Vertex r7b = 11 + + (0.5 0 0) // Vertex rb0b = 12 + (0.353553390910569 -0.353553390275978 0) // Vertex rb1b = 13 + (8.97448368482705e-10 -0.5 0) // Vertex rb2b = 14 + (-0.353553389641386 -0.353553391545162 0) // Vertex rb3b = 15 + (-0.5 1.79489673696541e-09 0) // Vertex rb4b = 16 + (-0.353553389641386 0.353553391545162 0) // Vertex rb5b = 17 + (8.97448368482705e-10 0.5 0) // Vertex rb6b = 18 + (0.353553390910569 0.353553390275978 0) // Vertex rb7b = 19 + + (0.6 0 0) // Vertex ri0b = 20 + (0.424264069092683 -0.424264068331174 0) // Vertex ri1b = 21 + (1.07693804217925e-09 -0.6 0) // Vertex ri2b = 22 + (-0.424264067569663 -0.424264069854194 0) // Vertex ri3b = 23 + (-0.6 2.15387608435849e-09 0) // Vertex ri4b = 24 + (-0.424264067569663 0.424264069854194 0) // Vertex ri5b = 25 + (1.07693804217925e-09 0.6 0) // Vertex ri6b = 26 + (0.424264069092683 0.424264068331174 0) // Vertex ri7b = 27 + + (0.7 0 0) // Vertex Rb0b = 28 + (0.494974747274797 -0.494974746386369 0) // Vertex Rb1b = 29 + (1.25642771587579e-09 -0.7 0) // Vertex Rb2b = 30 + (-0.49497474549794 -0.494974748163226 0) // Vertex Rb3b = 31 + (-0.7 2.51285543175157e-09 0) // Vertex Rb4b = 32 + (-0.49497474549794 0.494974748163226 0) // Vertex Rb5b = 33 + (1.25642771587579e-09 0.7 0) // Vertex Rb6b = 34 + (0.494974747274797 0.494974746386369 0) // Vertex Rb7b = 35 + + (1 0 0) // Vertex R0b = 36 + (0.707106781821139 -0.707106780551956 0) // Vertex R1b = 37 + (0.707106781821139 -0.707106780551956 0) // Vertex R1sb = 38 + (1.79489673696541e-09 -1 0) // Vertex R2b = 39 + (-0.707106779282772 -0.707106783090323 0) // Vertex R3b = 40 + (-0.707106779282772 -0.707106783090323 0) // Vertex R3sb = 41 + (-1 3.58979347393082e-09 0) // Vertex R4b = 42 + (-0.707106779282772 0.707106783090323 0) // Vertex R5b = 43 + (-0.707106779282772 0.707106783090323 0) // Vertex R5sb = 44 + (1.79489673696541e-09 1 0) // Vertex R6b = 45 + (0.707106781821139 0.707106780551956 0) // Vertex R7b = 46 + (0.707106781821139 0.707106780551956 0) // Vertex R7sb = 47 + + (0.2 0 0.1) // Vertex r0t = 48 + (0.2 0 0.1) // Vertex r0st = 49 + (0.141421356364228 -0.141421356110391 0.1) // Vertex r1t = 50 + (3.58979347393082e-10 -0.2 0.1) // Vertex r2t = 51 + (3.58979347393082e-10 -0.2 0.1) // Vertex r2st = 52 + (-0.141421355856554 -0.141421356618065 0.1) // Vertex r3t = 53 + (-0.2 7.17958694786164e-10 0.1) // Vertex r4t = 54 + (-0.2 7.17958694786164e-10 0.1) // Vertex r4st = 55 + (-0.141421355856554 0.141421356618065 0.1) // Vertex r5t = 56 + (3.58979347393082e-10 0.2 0.1) // Vertex r6t = 57 + (3.58979347393082e-10 0.2 0.1) // Vertex r6st = 58 + (0.141421356364228 0.141421356110391 0.1) // Vertex r7t = 59 + + (0.5 0 0.1) // Vertex rb0t = 60 + (0.353553390910569 -0.353553390275978 0.1) // Vertex rb1t = 61 + (8.97448368482705e-10 -0.5 0.1) // Vertex rb2t = 62 + (-0.353553389641386 -0.353553391545162 0.1) // Vertex rb3t = 63 + (-0.5 1.79489673696541e-09 0.1) // Vertex rb4t = 64 + (-0.353553389641386 0.353553391545162 0.1) // Vertex rb5t = 65 + (8.97448368482705e-10 0.5 0.1) // Vertex rb6t = 66 + (0.353553390910569 0.353553390275978 0.1) // Vertex rb7t = 67 + + (0.6 0 0.1) // Vertex ri0t = 68 + (0.424264069092683 -0.424264068331174 0.1) // Vertex ri1t = 69 + (1.07693804217925e-09 -0.6 0.1) // Vertex ri2t = 70 + (-0.424264067569663 -0.424264069854194 0.1) // Vertex ri3t = 71 + (-0.6 2.15387608435849e-09 0.1) // Vertex ri4t = 72 + (-0.424264067569663 0.424264069854194 0.1) // Vertex ri5t = 73 + (1.07693804217925e-09 0.6 0.1) // Vertex ri6t = 74 + (0.424264069092683 0.424264068331174 0.1) // Vertex ri7t = 75 + + (0.7 0 0.1) // Vertex Rb0t = 76 + (0.494974747274797 -0.494974746386369 0.1) // Vertex Rb1t = 77 + (1.25642771587579e-09 -0.7 0.1) // Vertex Rb2t = 78 + (-0.49497474549794 -0.494974748163226 0.1) // Vertex Rb3t = 79 + (-0.7 2.51285543175157e-09 0.1) // Vertex Rb4t = 80 + (-0.49497474549794 0.494974748163226 0.1) // Vertex Rb5t = 81 + (1.25642771587579e-09 0.7 0.1) // Vertex Rb6t = 82 + (0.494974747274797 0.494974746386369 0.1) // Vertex Rb7t = 83 + + (1 0 0.1) // Vertex R0t = 84 + (0.707106781821139 -0.707106780551956 0.1) // Vertex R1t = 85 + (0.707106781821139 -0.707106780551956 0.1) // Vertex R1st = 86 + (1.79489673696541e-09 -1 0.1) // Vertex R2t = 87 + (-0.707106779282772 -0.707106783090323 0.1) // Vertex R3t = 88 + (-0.707106779282772 -0.707106783090323 0.1) // Vertex R3st = 89 + (-1 3.58979347393082e-09 0.1) // Vertex R4t = 90 + (-0.707106779282772 0.707106783090323 0.1) // Vertex R5t = 91 + (-0.707106779282772 0.707106783090323 0.1) // Vertex R5st = 92 + (1.79489673696541e-09 1 0.1) // Vertex R6t = 93 + (0.707106781821139 0.707106780551956 0.1) // Vertex R7t = 94 + (0.707106781821139 0.707106780551956 0.1) // Vertex R7st = 95 +); + +blocks +( + // block0 + hex (0 2 13 12 48 50 61 60) + rotor + (12 12 1) + simpleGrading (1 1 1) + + // block1 + hex (2 4 14 13 50 52 62 61) + rotor + (12 12 1) + simpleGrading (1 1 1) + + // block2 + hex (3 5 15 14 51 53 63 62) + rotor + (12 12 1) + simpleGrading (1 1 1) + + // block3 + hex (5 7 16 15 53 55 64 63) + rotor + (12 12 1) + simpleGrading (1 1 1) + + // block4 + hex (6 8 17 16 54 56 65 64) + rotor + (12 12 1) + simpleGrading (1 1 1) + + // block5 + hex (8 10 18 17 56 58 66 65) + rotor + (12 12 1) + simpleGrading (1 1 1) + + // block6 + hex (9 11 19 18 57 59 67 66) + rotor + (12 12 1) + simpleGrading (1 1 1) + + // block7 + hex (11 1 12 19 59 49 60 67) + rotor + (12 12 1) + simpleGrading (1 1 1) + + // block0 + hex (12 13 21 20 60 61 69 68) + rotor + (12 4 1) + simpleGrading (1 1 1) + + // block1 + hex (13 14 22 21 61 62 70 69) + rotor + (12 4 1) + simpleGrading (1 1 1) + + // block2 + hex (14 15 23 22 62 63 71 70) + rotor + (12 4 1) + simpleGrading (1 1 1) + + // block3 + hex (15 16 24 23 63 64 72 71) + rotor + (12 4 1) + simpleGrading (1 1 1) + + // block4 + hex (16 17 25 24 64 65 73 72) + rotor + (12 4 1) + simpleGrading (1 1 1) + + // block5 + hex (17 18 26 25 65 66 74 73) + rotor + (12 4 1) + simpleGrading (1 1 1) + + // block6 + hex (18 19 27 26 66 67 75 74) + rotor + (12 4 1) + simpleGrading (1 1 1) + + // block7 + hex (19 12 20 27 67 60 68 75) + rotor + (12 4 1) + simpleGrading (1 1 1) + + // block0 + hex (20 21 29 28 68 69 77 76) + (12 4 1) + simpleGrading (1 1 1) + + // block1 + hex (21 22 30 29 69 70 78 77) + (12 4 1) + simpleGrading (1 1 1) + + // block2 + hex (22 23 31 30 70 71 79 78) + (12 4 1) + simpleGrading (1 1 1) + + // block3 + hex (23 24 32 31 71 72 80 79) + (12 4 1) + simpleGrading (1 1 1) + + // block4 + hex (24 25 33 32 72 73 81 80) + (12 4 1) + simpleGrading (1 1 1) + + // block5 + hex (25 26 34 33 73 74 82 81) + (12 4 1) + simpleGrading (1 1 1) + + // block6 + hex (26 27 35 34 74 75 83 82) + (12 4 1) + simpleGrading (1 1 1) + + // block7 + hex (27 20 28 35 75 68 76 83) + (12 4 1) + simpleGrading (1 1 1) + + // block0 + hex (28 29 38 36 76 77 86 84) + (12 12 1) + simpleGrading (1 1 1) + + // block1 + hex (29 30 39 37 77 78 87 85) + (12 12 1) + simpleGrading (1 1 1) + + // block2 + hex (30 31 41 39 78 79 89 87) + (12 12 1) + simpleGrading (1 1 1) + + // block3 + hex (31 32 42 40 79 80 90 88) + (12 12 1) + simpleGrading (1 1 1) + + // block4 + hex (32 33 44 42 80 81 92 90) + (12 12 1) + simpleGrading (1 1 1) + + // block5 + hex (33 34 45 43 81 82 93 91) + (12 12 1) + simpleGrading (1 1 1) + + // block6 + hex (34 35 47 45 82 83 95 93) + (12 12 1) + simpleGrading (1 1 1) + + // block7 + hex (35 28 36 46 83 76 84 94) + (12 12 1) + simpleGrading (1 1 1) +); + +edges +( + arc 0 2 (0.184775906536601 -0.0765366863901046 0) + arc 2 4 (0.0765366867217582 -0.184775906399226 0) + arc 3 5 (-0.0765366860584508 -0.184775906673977 0) + arc 5 7 (-0.18477590626185 -0.0765366870534118 0) + arc 6 8 (-0.18477590626185 0.0765366870534118 0) + arc 8 10 (-0.0765366860584508 0.184775906673977 0) + arc 9 11 (0.0765366867217582 0.184775906399226 0) + arc 11 1 (0.184775906536601 0.0765366863901046 0) + + arc 12 13 (0.461939766341503 -0.191341715975262 0) + arc 13 14 (0.191341716804395 -0.461939765998065 0) + arc 14 15 (-0.191341715146127 -0.461939766684942 0) + arc 15 16 (-0.461939765654626 -0.19134171763353 0) + arc 16 17 (-0.461939765654626 0.19134171763353 0) + arc 17 18 (-0.191341715146127 0.461939766684942 0) + arc 18 19 (0.191341716804395 0.461939765998065 0) + arc 19 12 (0.461939766341503 0.191341715975262 0) + + arc 20 21 (0.554327719609804 -0.229610059170314 0) + arc 21 22 (0.229610060165275 -0.554327719197677 0) + arc 22 23 (-0.229610058175352 -0.55432772002193 0) + arc 23 24 (-0.554327718785551 -0.229610061160235 0) + arc 24 25 (-0.554327718785551 0.229610061160235 0) + arc 25 26 (-0.229610058175352 0.55432772002193 0) + arc 26 27 (0.229610060165275 0.554327719197677 0) + arc 27 20 (0.554327719609804 0.229610059170314 0) + + arc 28 29 (0.646715672878104 -0.267878402365366 0) + arc 29 30 (0.267878403526154 -0.64671567239729 0) + arc 30 31 (-0.267878401204578 -0.646715673358918 0) + arc 31 32 (-0.646715671916476 -0.267878404686941 0) + arc 32 33 (-0.646715671916476 0.267878404686941 0) + arc 33 34 (-0.267878401204578 0.646715673358918 0) + arc 34 35 (0.267878403526154 0.64671567239729 0) + arc 35 28 (0.646715672878104 0.267878402365366 0) + + arc 36 38 (0.923879532683006 -0.382683431950523 0) + arc 37 39 (0.382683433608791 -0.923879531996129 0) + arc 39 41 (-0.382683430292254 -0.923879533369883 0) + arc 40 42 (-0.923879531309252 -0.382683435267059 0) + arc 42 44 (-0.923879531309252 0.382683435267059 0) + arc 43 45 (-0.382683430292254 0.923879533369883 0) + arc 45 47 (0.382683433608791 0.923879531996129 0) + arc 46 36 (0.923879532683006 0.382683431950523 0) + + arc 48 50 (0.184775906536601 -0.0765366863901046 0.1) + arc 50 52 (0.0765366867217582 -0.184775906399226 0.1) + arc 51 53 (-0.0765366860584508 -0.184775906673977 0.1) + arc 53 55 (-0.18477590626185 -0.0765366870534118 0.1) + arc 54 56 (-0.18477590626185 0.0765366870534118 0.1) + arc 56 58 (-0.0765366860584508 0.184775906673977 0.1) + arc 57 59 (0.0765366867217582 0.184775906399226 0.1) + arc 59 49 (0.184775906536601 0.0765366863901046 0.1) + + arc 60 61 (0.461939766341503 -0.191341715975262 0.1) + arc 61 62 (0.191341716804395 -0.461939765998065 0.1) + arc 62 63 (-0.191341715146127 -0.461939766684942 0.1) + arc 63 64 (-0.461939765654626 -0.19134171763353 0.1) + arc 64 65 (-0.461939765654626 0.19134171763353 0.1) + arc 65 66 (-0.191341715146127 0.461939766684942 0.1) + arc 66 67 (0.191341716804395 0.461939765998065 0.1) + arc 67 60 (0.461939766341503 0.191341715975262 0.1) + + arc 68 69 (0.554327719609804 -0.229610059170314 0.1) + arc 69 70 (0.229610060165275 -0.554327719197677 0.1) + arc 70 71 (-0.229610058175352 -0.55432772002193 0.1) + arc 71 72 (-0.554327718785551 -0.229610061160235 0.1) + arc 72 73 (-0.554327718785551 0.229610061160235 0.1) + arc 73 74 (-0.229610058175352 0.55432772002193 0.1) + arc 74 75 (0.229610060165275 0.554327719197677 0.1) + arc 75 68 (0.554327719609804 0.229610059170314 0.1) + + arc 76 77 (0.646715672878104 -0.267878402365366 0.1) + arc 77 78 (0.267878403526154 -0.64671567239729 0.1) + arc 78 79 (-0.267878401204578 -0.646715673358918 0.1) + arc 79 80 (-0.646715671916476 -0.267878404686941 0.1) + arc 80 81 (-0.646715671916476 0.267878404686941 0.1) + arc 81 82 (-0.267878401204578 0.646715673358918 0.1) + arc 82 83 (0.267878403526154 0.64671567239729 0.1) + arc 83 76 (0.646715672878104 0.267878402365366 0.1) + + arc 84 86 (0.923879532683006 -0.382683431950523 0.1) + arc 85 87 (0.382683433608791 -0.923879531996129 0.1) + arc 87 89 (-0.382683430292254 -0.923879533369883 0.1) + arc 88 90 (-0.923879531309252 -0.382683435267059 0.1) + arc 90 92 (-0.923879531309252 0.382683435267059 0.1) + arc 91 93 (-0.382683430292254 0.923879533369883 0.1) + arc 93 95 (0.382683433608791 0.923879531996129 0.1) + arc 94 84 (0.923879532683006 0.382683431950523 0.1) +); + +patches +( + wall rotor + ( + (0 2 50 48) + (2 4 52 50) + (3 5 53 51) + (5 7 55 53) + (6 8 56 54) + (8 10 58 56) + (9 11 59 57) + (11 1 49 59) + + (0 12 60 48) + (1 12 60 49) + + (3 14 62 51) + (4 14 62 52) + + (6 16 64 54) + (7 16 64 55) + + (9 18 66 57) + (10 18 66 58) + ) + + wall stator + ( + (36 38 86 84) + (37 39 87 85) + (39 41 89 87) + (40 42 90 88) + (42 44 92 90) + (43 45 93 91) + (45 47 95 93) + (46 36 84 94) + + (37 29 77 85) + (38 29 77 86) + + (40 31 79 88) + (41 31 79 89) + + (43 33 81 91) + (44 33 81 92) + + (46 35 83 94) + (47 35 83 95) + ) + + empty front + ( + (48 50 61 60) + (50 52 62 61) + (51 53 63 62) + (53 55 64 63) + (54 56 65 64) + (56 58 66 65) + (57 59 67 66) + (59 49 60 67) + (60 61 69 68) + (61 62 70 69) + (62 63 71 70) + (63 64 72 71) + (64 65 73 72) + (65 66 74 73) + (66 67 75 74) + (67 60 68 75) + (68 69 77 76) + (69 70 78 77) + (70 71 79 78) + (71 72 80 79) + (72 73 81 80) + (73 74 82 81) + (74 75 83 82) + (75 68 76 83) + (76 77 86 84) + (77 78 87 85) + (78 79 89 87) + (79 80 90 88) + (80 81 92 90) + (81 82 93 91) + (82 83 95 93) + (83 76 84 94) + ) + + empty back + ( + (0 12 13 2) + (2 13 14 4) + (3 14 15 5) + (5 15 16 7) + (6 16 17 8) + (8 17 18 10) + (9 18 19 11) + (11 19 12 1) + (12 20 21 13) + (13 21 22 14) + (14 22 23 15) + (15 23 24 16) + (16 24 25 17) + (17 25 26 18) + (18 26 27 19) + (19 27 20 12) + (20 28 29 21) + (21 29 30 22) + (22 30 31 23) + (23 31 32 24) + (24 32 33 25) + (25 33 34 26) + (26 34 35 27) + (27 35 28 20) + (28 36 38 29) + (29 37 39 30) + (30 39 41 31) + (31 40 42 32) + (32 42 44 33) + (33 43 45 34) + (34 45 47 35) + (35 46 36 28) + ) +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/polyMesh/blockMeshDict.m4 b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/polyMesh/blockMeshDict.m4 new file mode 100644 index 0000000000000000000000000000000000000000..eaa448596c06a89b270603aaabd722cf44fa7f3e --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/polyMesh/blockMeshDict.m4 @@ -0,0 +1,818 @@ +/*--------------------------------*- 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 dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// General macros to create 2D/extruded-2D meshes + +changecom(//)changequote([,]) +define(calc, [esyscmd(perl -e 'print ($1)')]) +define(VCOUNT, 0) +define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) +define(pi, 3.14159265) + +define(hex2D, hex ($1b $2b $3b $4b $1t $2t $3t $4t)) +define(quad2D, ($1b $2b $2t $1t)) +define(frontQuad, ($1t $2t $3t $4t)) +define(backQuad, ($1b $4b $3b $2b)) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.1; + +// Hub radius +define(r, 0.2) + +// Impeller-tip radius +define(rb, 0.5) + +// Baffle-tip radius +define(Rb, 0.7) + +// Tank radius +define(R, 1) + +// MRF region radius +define(ri, calc(0.5*(rb + Rb))) + +// Thickness of 2D slab +define(z, 0.1) + +// Base z +define(Zb, 0) + +// Top z +define(Zt, calc(Zb + z)) + +// Number of cells radially between hub and impeller tip +define(Nr, 12) + +// Number of cells radially in each of the two regions between +// impeller and baffle tips +define(Ni, 4) + +// Number of cells radially between baffle tip and tank +define(NR, 12) + +// Number of cells azimuthally in each of the 8 blocks +define(Na, 12) + +// Number of cells in the thickness of the slab +define(Nz, 1) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +define(vert, (x$1$2 y$1$2 $3)) +define(evert, (ex$1$2 ey$1$2 $3)) + +define(a0, 0) +define(a1, -45) +define(a2, -90) +define(a3, -135) +define(a4, 180) +define(a5, 135) +define(a6, 90) +define(a7, 45) + +define(ea0, -22.5) +define(ea1, -67.5) +define(ea2, -112.5) +define(ea3, -157.5) +define(ea4, 157.5) +define(ea5, 112.5) +define(ea6, 67.5) +define(ea7, 22.5) + +define(ca0, calc(cos((pi/180)*a0))) +define(ca1, calc(cos((pi/180)*a1))) +define(ca2, calc(cos((pi/180)*a2))) +define(ca3, calc(cos((pi/180)*a3))) +define(ca4, calc(cos((pi/180)*a4))) +define(ca5, calc(cos((pi/180)*a5))) +define(ca6, calc(cos((pi/180)*a6))) +define(ca7, calc(cos((pi/180)*a7))) + +define(sa0, calc(sin((pi/180)*a0))) +define(sa1, calc(sin((pi/180)*a1))) +define(sa2, calc(sin((pi/180)*a2))) +define(sa3, calc(sin((pi/180)*a3))) +define(sa4, calc(sin((pi/180)*a4))) +define(sa5, calc(sin((pi/180)*a5))) +define(sa6, calc(sin((pi/180)*a6))) +define(sa7, calc(sin((pi/180)*a7))) + +define(cea0, calc(cos((pi/180)*ea0))) +define(cea1, calc(cos((pi/180)*ea1))) +define(cea2, calc(cos((pi/180)*ea2))) +define(cea3, calc(cos((pi/180)*ea3))) +define(cea4, calc(cos((pi/180)*ea4))) +define(cea5, calc(cos((pi/180)*ea5))) +define(cea6, calc(cos((pi/180)*ea6))) +define(cea7, calc(cos((pi/180)*ea7))) + +define(sea0, calc(sin((pi/180)*ea0))) +define(sea1, calc(sin((pi/180)*ea1))) +define(sea2, calc(sin((pi/180)*ea2))) +define(sea3, calc(sin((pi/180)*ea3))) +define(sea4, calc(sin((pi/180)*ea4))) +define(sea5, calc(sin((pi/180)*ea5))) +define(sea6, calc(sin((pi/180)*ea6))) +define(sea7, calc(sin((pi/180)*ea7))) + +define(x00, calc(r*ca0)) +define(x01, calc(r*ca1)) +define(x02, calc(r*ca2)) +define(x03, calc(r*ca3)) +define(x04, calc(r*ca4)) +define(x05, calc(r*ca5)) +define(x06, calc(r*ca6)) +define(x07, calc(r*ca7)) + +define(x10, calc(rb*ca0)) +define(x11, calc(rb*ca1)) +define(x12, calc(rb*ca2)) +define(x13, calc(rb*ca3)) +define(x14, calc(rb*ca4)) +define(x15, calc(rb*ca5)) +define(x16, calc(rb*ca6)) +define(x17, calc(rb*ca7)) + +define(x20, calc(ri*ca0)) +define(x21, calc(ri*ca1)) +define(x22, calc(ri*ca2)) +define(x23, calc(ri*ca3)) +define(x24, calc(ri*ca4)) +define(x25, calc(ri*ca5)) +define(x26, calc(ri*ca6)) +define(x27, calc(ri*ca7)) + +define(x30, calc(Rb*ca0)) +define(x31, calc(Rb*ca1)) +define(x32, calc(Rb*ca2)) +define(x33, calc(Rb*ca3)) +define(x34, calc(Rb*ca4)) +define(x35, calc(Rb*ca5)) +define(x36, calc(Rb*ca6)) +define(x37, calc(Rb*ca7)) + +define(x40, calc(R*ca0)) +define(x41, calc(R*ca1)) +define(x42, calc(R*ca2)) +define(x43, calc(R*ca3)) +define(x44, calc(R*ca4)) +define(x45, calc(R*ca5)) +define(x46, calc(R*ca6)) +define(x47, calc(R*ca7)) + +define(y00, calc(r*sa0)) +define(y01, calc(r*sa1)) +define(y02, calc(r*sa2)) +define(y03, calc(r*sa3)) +define(y04, calc(r*sa4)) +define(y05, calc(r*sa5)) +define(y06, calc(r*sa6)) +define(y07, calc(r*sa7)) + +define(y10, calc(rb*sa0)) +define(y11, calc(rb*sa1)) +define(y12, calc(rb*sa2)) +define(y13, calc(rb*sa3)) +define(y14, calc(rb*sa4)) +define(y15, calc(rb*sa5)) +define(y16, calc(rb*sa6)) +define(y17, calc(rb*sa7)) + +define(y20, calc(ri*sa0)) +define(y21, calc(ri*sa1)) +define(y22, calc(ri*sa2)) +define(y23, calc(ri*sa3)) +define(y24, calc(ri*sa4)) +define(y25, calc(ri*sa5)) +define(y26, calc(ri*sa6)) +define(y27, calc(ri*sa7)) + +define(y30, calc(Rb*sa0)) +define(y31, calc(Rb*sa1)) +define(y32, calc(Rb*sa2)) +define(y33, calc(Rb*sa3)) +define(y34, calc(Rb*sa4)) +define(y35, calc(Rb*sa5)) +define(y36, calc(Rb*sa6)) +define(y37, calc(Rb*sa7)) + +define(y40, calc(R*sa0)) +define(y41, calc(R*sa1)) +define(y42, calc(R*sa2)) +define(y43, calc(R*sa3)) +define(y44, calc(R*sa4)) +define(y45, calc(R*sa5)) +define(y46, calc(R*sa6)) +define(y47, calc(R*sa7)) + +define(ex00, calc(r*cea0)) +define(ex01, calc(r*cea1)) +define(ex02, calc(r*cea2)) +define(ex03, calc(r*cea3)) +define(ex04, calc(r*cea4)) +define(ex05, calc(r*cea5)) +define(ex06, calc(r*cea6)) +define(ex07, calc(r*cea7)) + +define(ex10, calc(rb*cea0)) +define(ex11, calc(rb*cea1)) +define(ex12, calc(rb*cea2)) +define(ex13, calc(rb*cea3)) +define(ex14, calc(rb*cea4)) +define(ex15, calc(rb*cea5)) +define(ex16, calc(rb*cea6)) +define(ex17, calc(rb*cea7)) + +define(ex20, calc(ri*cea0)) +define(ex21, calc(ri*cea1)) +define(ex22, calc(ri*cea2)) +define(ex23, calc(ri*cea3)) +define(ex24, calc(ri*cea4)) +define(ex25, calc(ri*cea5)) +define(ex26, calc(ri*cea6)) +define(ex27, calc(ri*cea7)) + +define(ex30, calc(Rb*cea0)) +define(ex31, calc(Rb*cea1)) +define(ex32, calc(Rb*cea2)) +define(ex33, calc(Rb*cea3)) +define(ex34, calc(Rb*cea4)) +define(ex35, calc(Rb*cea5)) +define(ex36, calc(Rb*cea6)) +define(ex37, calc(Rb*cea7)) + +define(ex40, calc(R*cea0)) +define(ex41, calc(R*cea1)) +define(ex42, calc(R*cea2)) +define(ex43, calc(R*cea3)) +define(ex44, calc(R*cea4)) +define(ex45, calc(R*cea5)) +define(ex46, calc(R*cea6)) +define(ex47, calc(R*cea7)) + +define(ey00, calc(r*sea0)) +define(ey01, calc(r*sea1)) +define(ey02, calc(r*sea2)) +define(ey03, calc(r*sea3)) +define(ey04, calc(r*sea4)) +define(ey05, calc(r*sea5)) +define(ey06, calc(r*sea6)) +define(ey07, calc(r*sea7)) + +define(ey10, calc(rb*sea0)) +define(ey11, calc(rb*sea1)) +define(ey12, calc(rb*sea2)) +define(ey13, calc(rb*sea3)) +define(ey14, calc(rb*sea4)) +define(ey15, calc(rb*sea5)) +define(ey16, calc(rb*sea6)) +define(ey17, calc(rb*sea7)) + +define(ey20, calc(ri*sea0)) +define(ey21, calc(ri*sea1)) +define(ey22, calc(ri*sea2)) +define(ey23, calc(ri*sea3)) +define(ey24, calc(ri*sea4)) +define(ey25, calc(ri*sea5)) +define(ey26, calc(ri*sea6)) +define(ey27, calc(ri*sea7)) + +define(ey30, calc(Rb*sea0)) +define(ey31, calc(Rb*sea1)) +define(ey32, calc(Rb*sea2)) +define(ey33, calc(Rb*sea3)) +define(ey34, calc(Rb*sea4)) +define(ey35, calc(Rb*sea5)) +define(ey36, calc(Rb*sea6)) +define(ey37, calc(Rb*sea7)) + +define(ey40, calc(R*sea0)) +define(ey41, calc(R*sea1)) +define(ey42, calc(R*sea2)) +define(ey43, calc(R*sea3)) +define(ey44, calc(R*sea4)) +define(ey45, calc(R*sea5)) +define(ey46, calc(R*sea6)) +define(ey47, calc(R*sea7)) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +vertices +( + vert(0, 0, Zb) vlabel(r0b) + vert(0, 0, Zb) vlabel(r0sb) + vert(0, 1, Zb) vlabel(r1b) + vert(0, 2, Zb) vlabel(r2b) + vert(0, 2, Zb) vlabel(r2sb) + vert(0, 3, Zb) vlabel(r3b) + vert(0, 4, Zb) vlabel(r4b) + vert(0, 4, Zb) vlabel(r4sb) + vert(0, 5, Zb) vlabel(r5b) + vert(0, 6, Zb) vlabel(r6b) + vert(0, 6, Zb) vlabel(r6sb) + vert(0, 7, Zb) vlabel(r7b) + + vert(1, 0, Zb) vlabel(rb0b) + vert(1, 1, Zb) vlabel(rb1b) + vert(1, 2, Zb) vlabel(rb2b) + vert(1, 3, Zb) vlabel(rb3b) + vert(1, 4, Zb) vlabel(rb4b) + vert(1, 5, Zb) vlabel(rb5b) + vert(1, 6, Zb) vlabel(rb6b) + vert(1, 7, Zb) vlabel(rb7b) + + vert(2, 0, Zb) vlabel(ri0b) + vert(2, 1, Zb) vlabel(ri1b) + vert(2, 2, Zb) vlabel(ri2b) + vert(2, 3, Zb) vlabel(ri3b) + vert(2, 4, Zb) vlabel(ri4b) + vert(2, 5, Zb) vlabel(ri5b) + vert(2, 6, Zb) vlabel(ri6b) + vert(2, 7, Zb) vlabel(ri7b) + + vert(3, 0, Zb) vlabel(Rb0b) + vert(3, 1, Zb) vlabel(Rb1b) + vert(3, 2, Zb) vlabel(Rb2b) + vert(3, 3, Zb) vlabel(Rb3b) + vert(3, 4, Zb) vlabel(Rb4b) + vert(3, 5, Zb) vlabel(Rb5b) + vert(3, 6, Zb) vlabel(Rb6b) + vert(3, 7, Zb) vlabel(Rb7b) + + vert(4, 0, Zb) vlabel(R0b) + vert(4, 1, Zb) vlabel(R1b) + vert(4, 1, Zb) vlabel(R1sb) + vert(4, 2, Zb) vlabel(R2b) + vert(4, 3, Zb) vlabel(R3b) + vert(4, 3, Zb) vlabel(R3sb) + vert(4, 4, Zb) vlabel(R4b) + vert(4, 5, Zb) vlabel(R5b) + vert(4, 5, Zb) vlabel(R5sb) + vert(4, 6, Zb) vlabel(R6b) + vert(4, 7, Zb) vlabel(R7b) + vert(4, 7, Zb) vlabel(R7sb) + + vert(0, 0, Zt) vlabel(r0t) + vert(0, 0, Zt) vlabel(r0st) + vert(0, 1, Zt) vlabel(r1t) + vert(0, 2, Zt) vlabel(r2t) + vert(0, 2, Zt) vlabel(r2st) + vert(0, 3, Zt) vlabel(r3t) + vert(0, 4, Zt) vlabel(r4t) + vert(0, 4, Zt) vlabel(r4st) + vert(0, 5, Zt) vlabel(r5t) + vert(0, 6, Zt) vlabel(r6t) + vert(0, 6, Zt) vlabel(r6st) + vert(0, 7, Zt) vlabel(r7t) + + vert(1, 0, Zt) vlabel(rb0t) + vert(1, 1, Zt) vlabel(rb1t) + vert(1, 2, Zt) vlabel(rb2t) + vert(1, 3, Zt) vlabel(rb3t) + vert(1, 4, Zt) vlabel(rb4t) + vert(1, 5, Zt) vlabel(rb5t) + vert(1, 6, Zt) vlabel(rb6t) + vert(1, 7, Zt) vlabel(rb7t) + + vert(2, 0, Zt) vlabel(ri0t) + vert(2, 1, Zt) vlabel(ri1t) + vert(2, 2, Zt) vlabel(ri2t) + vert(2, 3, Zt) vlabel(ri3t) + vert(2, 4, Zt) vlabel(ri4t) + vert(2, 5, Zt) vlabel(ri5t) + vert(2, 6, Zt) vlabel(ri6t) + vert(2, 7, Zt) vlabel(ri7t) + + vert(3, 0, Zt) vlabel(Rb0t) + vert(3, 1, Zt) vlabel(Rb1t) + vert(3, 2, Zt) vlabel(Rb2t) + vert(3, 3, Zt) vlabel(Rb3t) + vert(3, 4, Zt) vlabel(Rb4t) + vert(3, 5, Zt) vlabel(Rb5t) + vert(3, 6, Zt) vlabel(Rb6t) + vert(3, 7, Zt) vlabel(Rb7t) + + vert(4, 0, Zt) vlabel(R0t) + vert(4, 1, Zt) vlabel(R1t) + vert(4, 1, Zt) vlabel(R1st) + vert(4, 2, Zt) vlabel(R2t) + vert(4, 3, Zt) vlabel(R3t) + vert(4, 3, Zt) vlabel(R3st) + vert(4, 4, Zt) vlabel(R4t) + vert(4, 5, Zt) vlabel(R5t) + vert(4, 5, Zt) vlabel(R5st) + vert(4, 6, Zt) vlabel(R6t) + vert(4, 7, Zt) vlabel(R7t) + vert(4, 7, Zt) vlabel(R7st) +); + +blocks +( + // block0 + hex2D(r0, r1, rb1, rb0) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block1 + hex2D(r1, r2s, rb2, rb1) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block2 + hex2D(r2, r3, rb3, rb2) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block3 + hex2D(r3, r4s, rb4, rb3) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block4 + hex2D(r4, r5, rb5, rb4) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block5 + hex2D(r5, r6s, rb6, rb5) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block6 + hex2D(r6, r7, rb7, rb6) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block7 + hex2D(r7, r0s, rb0, rb7) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block0 + hex2D(rb0, rb1, ri1, ri0) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block1 + hex2D(rb1, rb2, ri2, ri1) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block2 + hex2D(rb2, rb3, ri3, ri2) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block3 + hex2D(rb3, rb4, ri4, ri3) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block4 + hex2D(rb4, rb5, ri5, ri4) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block5 + hex2D(rb5, rb6, ri6, ri5) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block6 + hex2D(rb6, rb7, ri7, ri6) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block7 + hex2D(rb7, rb0, ri0, ri7) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block0 + hex2D(ri0, ri1, Rb1, Rb0) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block1 + hex2D(ri1, ri2, Rb2, Rb1) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block2 + hex2D(ri2, ri3, Rb3, Rb2) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block3 + hex2D(ri3, ri4, Rb4, Rb3) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block4 + hex2D(ri4, ri5, Rb5, Rb4) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block5 + hex2D(ri5, ri6, Rb6, Rb5) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block6 + hex2D(ri6, ri7, Rb7, Rb6) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block7 + hex2D(ri7, ri0, Rb0, Rb7) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block0 + hex2D(Rb0, Rb1, R1s, R0) + (Na NR Nz) + simpleGrading (1 1 1) + + // block1 + hex2D(Rb1, Rb2, R2, R1) + (Na NR Nz) + simpleGrading (1 1 1) + + // block2 + hex2D(Rb2, Rb3, R3s, R2) + (Na NR Nz) + simpleGrading (1 1 1) + + // block3 + hex2D(Rb3, Rb4, R4, R3) + (Na NR Nz) + simpleGrading (1 1 1) + + // block4 + hex2D(Rb4, Rb5, R5s, R4) + (Na NR Nz) + simpleGrading (1 1 1) + + // block5 + hex2D(Rb5, Rb6, R6, R5) + (Na NR Nz) + simpleGrading (1 1 1) + + // block6 + hex2D(Rb6, Rb7, R7s, R6) + (Na NR Nz) + simpleGrading (1 1 1) + + // block7 + hex2D(Rb7, Rb0, R0, R7) + (Na NR Nz) + simpleGrading (1 1 1) +); + +edges +( + arc r0b r1b evert(0, 0, Zb) + arc r1b r2sb evert(0, 1, Zb) + arc r2b r3b evert(0, 2, Zb) + arc r3b r4sb evert(0, 3, Zb) + arc r4b r5b evert(0, 4, Zb) + arc r5b r6sb evert(0, 5, Zb) + arc r6b r7b evert(0, 6, Zb) + arc r7b r0sb evert(0, 7, Zb) + + arc rb0b rb1b evert(1, 0, Zb) + arc rb1b rb2b evert(1, 1, Zb) + arc rb2b rb3b evert(1, 2, Zb) + arc rb3b rb4b evert(1, 3, Zb) + arc rb4b rb5b evert(1, 4, Zb) + arc rb5b rb6b evert(1, 5, Zb) + arc rb6b rb7b evert(1, 6, Zb) + arc rb7b rb0b evert(1, 7, Zb) + + arc ri0b ri1b evert(2, 0, Zb) + arc ri1b ri2b evert(2, 1, Zb) + arc ri2b ri3b evert(2, 2, Zb) + arc ri3b ri4b evert(2, 3, Zb) + arc ri4b ri5b evert(2, 4, Zb) + arc ri5b ri6b evert(2, 5, Zb) + arc ri6b ri7b evert(2, 6, Zb) + arc ri7b ri0b evert(2, 7, Zb) + + arc Rb0b Rb1b evert(3, 0, Zb) + arc Rb1b Rb2b evert(3, 1, Zb) + arc Rb2b Rb3b evert(3, 2, Zb) + arc Rb3b Rb4b evert(3, 3, Zb) + arc Rb4b Rb5b evert(3, 4, Zb) + arc Rb5b Rb6b evert(3, 5, Zb) + arc Rb6b Rb7b evert(3, 6, Zb) + arc Rb7b Rb0b evert(3, 7, Zb) + + arc R0b R1sb evert(4, 0, Zb) + arc R1b R2b evert(4, 1, Zb) + arc R2b R3sb evert(4, 2, Zb) + arc R3b R4b evert(4, 3, Zb) + arc R4b R5sb evert(4, 4, Zb) + arc R5b R6b evert(4, 5, Zb) + arc R6b R7sb evert(4, 6, Zb) + arc R7b R0b evert(4, 7, Zb) + + arc r0t r1t evert(0, 0, Zt) + arc r1t r2st evert(0, 1, Zt) + arc r2t r3t evert(0, 2, Zt) + arc r3t r4st evert(0, 3, Zt) + arc r4t r5t evert(0, 4, Zt) + arc r5t r6st evert(0, 5, Zt) + arc r6t r7t evert(0, 6, Zt) + arc r7t r0st evert(0, 7, Zt) + + arc rb0t rb1t evert(1, 0, Zt) + arc rb1t rb2t evert(1, 1, Zt) + arc rb2t rb3t evert(1, 2, Zt) + arc rb3t rb4t evert(1, 3, Zt) + arc rb4t rb5t evert(1, 4, Zt) + arc rb5t rb6t evert(1, 5, Zt) + arc rb6t rb7t evert(1, 6, Zt) + arc rb7t rb0t evert(1, 7, Zt) + + arc ri0t ri1t evert(2, 0, Zt) + arc ri1t ri2t evert(2, 1, Zt) + arc ri2t ri3t evert(2, 2, Zt) + arc ri3t ri4t evert(2, 3, Zt) + arc ri4t ri5t evert(2, 4, Zt) + arc ri5t ri6t evert(2, 5, Zt) + arc ri6t ri7t evert(2, 6, Zt) + arc ri7t ri0t evert(2, 7, Zt) + + arc Rb0t Rb1t evert(3, 0, Zt) + arc Rb1t Rb2t evert(3, 1, Zt) + arc Rb2t Rb3t evert(3, 2, Zt) + arc Rb3t Rb4t evert(3, 3, Zt) + arc Rb4t Rb5t evert(3, 4, Zt) + arc Rb5t Rb6t evert(3, 5, Zt) + arc Rb6t Rb7t evert(3, 6, Zt) + arc Rb7t Rb0t evert(3, 7, Zt) + + arc R0t R1st evert(4, 0, Zt) + arc R1t R2t evert(4, 1, Zt) + arc R2t R3st evert(4, 2, Zt) + arc R3t R4t evert(4, 3, Zt) + arc R4t R5st evert(4, 4, Zt) + arc R5t R6t evert(4, 5, Zt) + arc R6t R7st evert(4, 6, Zt) + arc R7t R0t evert(4, 7, Zt) +); + +patches +( + wall rotor + ( + quad2D(r0, r1) + quad2D(r1, r2s) + quad2D(r2, r3) + quad2D(r3, r4s) + quad2D(r4, r5) + quad2D(r5, r6s) + quad2D(r6, r7) + quad2D(r7, r0s) + + quad2D(r0, rb0) + quad2D(r0s, rb0) + + quad2D(r2, rb2) + quad2D(r2s, rb2) + + quad2D(r4, rb4) + quad2D(r4s, rb4) + + quad2D(r6, rb6) + quad2D(r6s, rb6) + ) + + wall stator + ( + quad2D(R0, R1s) + quad2D(R1, R2) + quad2D(R2, R3s) + quad2D(R3, R4) + quad2D(R4, R5s) + quad2D(R5, R6) + quad2D(R6, R7s) + quad2D(R7, R0) + + quad2D(R1, Rb1) + quad2D(R1s, Rb1) + + quad2D(R3, Rb3) + quad2D(R3s, Rb3) + + quad2D(R5, Rb5) + quad2D(R5s, Rb5) + + quad2D(R7, Rb7) + quad2D(R7s, Rb7) + ) + + empty front + ( + frontQuad(r0, r1, rb1, rb0) + frontQuad(r1, r2s, rb2, rb1) + frontQuad(r2, r3, rb3, rb2) + frontQuad(r3, r4s, rb4, rb3) + frontQuad(r4, r5, rb5, rb4) + frontQuad(r5, r6s, rb6, rb5) + frontQuad(r6, r7, rb7, rb6) + frontQuad(r7, r0s, rb0, rb7) + frontQuad(rb0, rb1, ri1, ri0) + frontQuad(rb1, rb2, ri2, ri1) + frontQuad(rb2, rb3, ri3, ri2) + frontQuad(rb3, rb4, ri4, ri3) + frontQuad(rb4, rb5, ri5, ri4) + frontQuad(rb5, rb6, ri6, ri5) + frontQuad(rb6, rb7, ri7, ri6) + frontQuad(rb7, rb0, ri0, ri7) + frontQuad(ri0, ri1, Rb1, Rb0) + frontQuad(ri1, ri2, Rb2, Rb1) + frontQuad(ri2, ri3, Rb3, Rb2) + frontQuad(ri3, ri4, Rb4, Rb3) + frontQuad(ri4, ri5, Rb5, Rb4) + frontQuad(ri5, ri6, Rb6, Rb5) + frontQuad(ri6, ri7, Rb7, Rb6) + frontQuad(ri7, ri0, Rb0, Rb7) + frontQuad(Rb0, Rb1, R1s, R0) + frontQuad(Rb1, Rb2, R2, R1) + frontQuad(Rb2, Rb3, R3s, R2) + frontQuad(Rb3, Rb4, R4, R3) + frontQuad(Rb4, Rb5, R5s, R4) + frontQuad(Rb5, Rb6, R6, R5) + frontQuad(Rb6, Rb7, R7s, R6) + frontQuad(Rb7, Rb0, R0, R7) + ) + + empty back + ( + backQuad(r0, r1, rb1, rb0) + backQuad(r1, r2s, rb2, rb1) + backQuad(r2, r3, rb3, rb2) + backQuad(r3, r4s, rb4, rb3) + backQuad(r4, r5, rb5, rb4) + backQuad(r5, r6s, rb6, rb5) + backQuad(r6, r7, rb7, rb6) + backQuad(r7, r0s, rb0, rb7) + backQuad(rb0, rb1, ri1, ri0) + backQuad(rb1, rb2, ri2, ri1) + backQuad(rb2, rb3, ri3, ri2) + backQuad(rb3, rb4, ri4, ri3) + backQuad(rb4, rb5, ri5, ri4) + backQuad(rb5, rb6, ri6, ri5) + backQuad(rb6, rb7, ri7, ri6) + backQuad(rb7, rb0, ri0, ri7) + backQuad(ri0, ri1, Rb1, Rb0) + backQuad(ri1, ri2, Rb2, Rb1) + backQuad(ri2, ri3, Rb3, Rb2) + backQuad(ri3, ri4, Rb4, Rb3) + backQuad(ri4, ri5, Rb5, Rb4) + backQuad(ri5, ri6, Rb6, Rb5) + backQuad(ri6, ri7, Rb7, Rb6) + backQuad(ri7, ri0, Rb0, Rb7) + backQuad(Rb0, Rb1, R1s, R0) + backQuad(Rb1, Rb2, R2, R1) + backQuad(Rb2, Rb3, R3s, R2) + backQuad(Rb3, Rb4, R4, R3) + backQuad(Rb4, Rb5, R5s, R4) + backQuad(Rb5, Rb6, R6, R5) + backQuad(Rb6, Rb7, R7s, R6) + backQuad(Rb7, Rb0, R0, R7) + ) +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/polyMesh/boundary b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..292f25b806357d9df75c7731f74dee0ec0aa3a40 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/polyMesh/boundary @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +4 +( + rotor + { + type wall; + nFaces 192; + startFace 5952; + } + stator + { + type wall; + nFaces 192; + startFace 6144; + } + front + { + type empty; + nFaces 3072; + startFace 6336; + } + back + { + type empty; + nFaces 3072; + startFace 9408; + } +) + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/transportProperties b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..e29c7f9fc04be3aafc3bf54d2ac9208b0250c4e6 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/transportProperties @@ -0,0 +1,35 @@ +/*--------------------------------*- 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 "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phase1 +{ + transportModel Newtonian; + nu nu [ 0 2 -1 0 0 0 0 ] 1e-4; + rho rho [ 1 -3 0 0 0 0 0 ] 1000; +} + +phase2 +{ + transportModel Newtonian; + nu nu [ 0 2 -1 0 0 0 0 ] 1e-4; + rho rho [ 1 -3 0 0 0 0 0 ] 500; +} + +sigma sigma [ 1 0 -2 0 0 0 0 ] 0.05; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/turbulenceProperties b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..886d34bdef135c39216d342240a96bf0530bdd62 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/constant/turbulenceProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- 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 "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/makeMesh b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/makeMesh new file mode 100755 index 0000000000000000000000000000000000000000..b0be10d8e5f2b0525cec8f23c93585fde73f5879 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/makeMesh @@ -0,0 +1,11 @@ +#!/bin/sh + +m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict +blockMesh +cellSet +#- MRF determines its own faceZone if not supplied +#cp system/faceSetDict_rotorFaces system/faceSetDict +#faceSet +#cp system/faceSetDict_noBoundaryFaces system/faceSetDict +#faceSet +setsToZones -noFlipMap diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/cellSetDict b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/cellSetDict new file mode 100644 index 0000000000000000000000000000000000000000..6d1af846e3c61c753852a90c8c8bcc5cfd68cf4d --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/cellSetDict @@ -0,0 +1,25 @@ +/*--------------------------------*- 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 rotor; + +action new; + +topoSetSources ( zoneToCell { name rotor ; } ); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/controlDict b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..249378f87cac7f374e958053846a949d585e047e --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/controlDict @@ -0,0 +1,53 @@ +/*--------------------------------*- 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 controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 4; + +deltaT 1e-3; + +writeControl adjustableRunTime; + +writeInterval 0.125; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.5; + +maxDeltaT 1; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict new file mode 100644 index 0000000000000000000000000000000000000000..5507dbd729453219d583c8c3f7e8867eee0ac1a4 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict @@ -0,0 +1,25 @@ +/*--------------------------------*- 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 faceSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +name rotor; + +action delete; + +topoSetSources ( boundaryToFace { } ); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict_noBoundaryFaces b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict_noBoundaryFaces new file mode 100644 index 0000000000000000000000000000000000000000..062727698328907a23480d3aaae086f2030a1537 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict_noBoundaryFaces @@ -0,0 +1,25 @@ +/*--------------------------------*- 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 faceSetDict_noBoundaryFaces; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +name rotor; + +action delete; + +topoSetSources ( boundaryToFace { } ); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict_rotorFaces b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict_rotorFaces new file mode 100644 index 0000000000000000000000000000000000000000..5e7917b2fe4f3eae8b3dd4db38d66a39f29a92a3 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict_rotorFaces @@ -0,0 +1,25 @@ +/*--------------------------------*- 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 faceSetDict_rotorFaces; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +name rotor; + +action new; + +topoSetSources ( cellToFace { set rotor ; option all ; } ); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/fvSchemes b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..75d5813812fc769d95a0204eab2181acc078ca8c --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/fvSchemes @@ -0,0 +1,61 @@ +/*--------------------------------*- 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 fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(U) Gauss linear; + grad(alpha1) Gauss linear; +} + +divSchemes +{ + div(rho*phi,U) Gauss linear; + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss interfaceCompression; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p ; + pcorr ; + alpha1 ; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/fvSolution b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..febd619c4824c91a5fee8280895288ecf80e408e --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/fvSolution @@ -0,0 +1,66 @@ +/*--------------------------------*- 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 fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + pcorr + { + solver PCG; + preconditioner DIC; + tolerance 1e-10; + relTol 0; + } + + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-07; + relTol 0.05; + } + + pFinal + { + solver PCG; + preconditioner DIC; + tolerance 1e-07; + relTol 0; + } + + U + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-06; + relTol 0; + } +} + +PISO +{ + momentumPredictor no; + nCorrectors 3; + nNonOrthogonalCorrectors 0; + nAlphaCorr 1; + nAlphaSubCycles 2; + cAlpha 1; + pRefCell 0; + pRefValue 0; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/setFieldsDict b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/setFieldsDict new file mode 100644 index 0000000000000000000000000000000000000000..2de344506d223ab76e1bb8cc7b273c285b37d5a3 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/setFieldsDict @@ -0,0 +1,37 @@ +/*--------------------------------*- 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 setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha1 0 + volVectorFieldValue U (0 0 0) +); + +regions +( + boxToCell + { + box (0 0 -1) (1 1 1); + fieldValues + ( + volScalarFieldValue alpha1 1 + ); + } +); + + +// ************************************************************************* // diff --git a/wmake/Makefile b/wmake/Makefile index 02c573a2659390c6f644afe3666442eb1692bd54..78b442e43df46b2ec4e517b835504945bf4d0ad4 100644 --- a/wmake/Makefile +++ b/wmake/Makefile @@ -63,7 +63,7 @@ CLASSES_DIR = $(MAKE_DIR)/classes SYS_INC = SYS_LIBS = -PROJECT_INC = -I$(LIB_SRC)/$(WM_PROJECT)/lnInclude -I$(LIB_SRC)/OSspecific/$(WM_OS)/lnInclude +PROJECT_INC = -I$(LIB_SRC)/$(WM_PROJECT)/lnInclude -I$(LIB_SRC)/OSspecific/$(WM_OSTYPE)/lnInclude PROJECT_LIBS = -l$(WM_PROJECT) ## ## unused: