diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C index 0ddfa64588cff2d1bf0fe3177ddb244b3ee6dacc..000948514ef0ff61699665830a1e557743e315a2 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C @@ -30,7 +30,7 @@ Description Sub-models include: - turbulence modelling, i.e. laminar, RAS or LES - - run-time selectable fvOptions, e.g. MRF, explicit porosity + - run-time selectable finitie volume options, e.g. MRF, explicit porosity \*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/lagrangian/reactingParcelFoam/Allwmake b/applications/solvers/lagrangian/reactingParcelFoam/Allwmake index ecd3f260150d6169af78e88562a5bf3e87487aa8..f615df216c2c4087951cbcf947d83060f0ce8488 100755 --- a/applications/solvers/lagrangian/reactingParcelFoam/Allwmake +++ b/applications/solvers/lagrangian/reactingParcelFoam/Allwmake @@ -3,6 +3,7 @@ cd ${0%/*} || exit 1 # run from this directory set -x wmake +wmake simpleReactingParcelFoam wmake LTSReactingParcelFoam # ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/LTSReactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/LTSReactingParcelFoam.C index 991de15ad658d640eb6e0a2bc69f66442c5fdd39..34aecb65b4ee3cb3ef287d6f61410e8e6e249301 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/LTSReactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/LTSReactingParcelFoam/LTSReactingParcelFoam.C @@ -28,7 +28,7 @@ Description Local time stepping (LTS) solver for steady, compressible, laminar or turbulent reacting and non-reacting flow with multiphase Lagrangian parcels and porous media, including run-time selectable finitite volume - options, e.g. fvOptions, constraints + options, e.g. sources, constraints Note: ddtPhiCorr not used here when porous zones are active - not well defined for porous calculations diff --git a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C index 424c23b8b9ce3b88a42feb5ded7b4fceb3e5c32a..c4503cc10119f5dddb0e7d86179fafd042790706 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C @@ -22,12 +22,12 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Application - porousExplicitSourceReactingParcelFoam + reactingParcelFoam Description Transient PIMPLE solver for compressible, laminar or turbulent flow with reacting multiphase Lagrangian parcels, including run-time selectable - finite volume options, e.g. fvOptions, constraints + finite volume options, e.g. sources, constraints \*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/EEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/EEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..d4d686e35569c6ea2d4151a455998a1f62ea581f --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/EEqn.H @@ -0,0 +1,32 @@ +{ + volScalarField& he = thermo.he(); + + fvScalarMatrix EEqn + ( + mvConvection->fvmDiv(phi, he) + + ( + he.name() == "e" + ? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho)) + : fvc::div(phi, volScalarField("K", 0.5*magSqr(U))) + ) + - fvm::laplacian(turbulence->alphaEff(), he) + == + parcels.Sh(he) + + radiation->Sh(thermo) + + combustion->Sh() + + fvOptions(rho, he) + ); + + EEqn.relax(); + + fvOptions.constrain(EEqn); + + EEqn.solve(); + + fvOptions.correct(he); + thermo.correct(); + radiation->correct(); + + Info<< "T gas min/max = " << min(T).value() << ", " + << max(T).value() << endl; +} diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/files b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..4a202fcd4df960c5f67830593c89222b6211409a --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/files @@ -0,0 +1,3 @@ +simpleReactingParcelFoam.C + +EXE = $(FOAM_APPBIN)/simpleReactingParcelFoam diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..705cfc9433f4f9e47764f0f7d26e59cb0d82ff2c --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/Make/options @@ -0,0 +1,53 @@ +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)/lagrangian/distributionModels/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ + -I$(LIB_SRC)/ODE/lnInclude \ + -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/combustionModels/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(FOAM_SOLVERS)/combustion/reactingFoam + + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools \ + -lcompressibleTurbulenceModel \ + -lcompressibleRASModels \ + -lcompressibleLESModels \ + -llagrangian \ + -llagrangianIntermediate \ + -lspecie \ + -lfluidThermophysicalModels \ + -lliquidProperties \ + -lliquidMixtureProperties \ + -lsolidProperties \ + -lsolidMixtureProperties \ + -lthermophysicalFunctions \ + -lreactionThermophysicalModels \ + -lSLGThermo \ + -lchemistryModel \ + -lradiationModels \ + -lODE \ + -lregionModels \ + -lsurfaceFilmModels \ + -lcombustionModels \ + -lfvOptions \ + -lsampling diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..eabbb40454739032efbe679f92e2f69985cf9852 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H @@ -0,0 +1,17 @@ + tmp<fvVectorMatrix> UEqn + ( + fvm::div(phi, U) + + turbulence->divDevRhoReff(U) + == + rho.dimensionedInternalField()*g + + parcels.SU(U) + + fvOptions(rho, U) + ); + + UEqn().relax(); + + fvOptions.constrain(UEqn()); + + solve(UEqn() == -fvc::grad(p)); + + fvOptions.correct(U); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..cd0a45f0f020295bb6341f345e109b2999465471 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H @@ -0,0 +1,53 @@ +tmp<fv::convectionScheme<scalar> > mvConvection +( + fv::convectionScheme<scalar>::New + ( + mesh, + fields, + phi, + mesh.divScheme("div(phi,Yi_h)") + ) +); + +{ + combustion->correct(); + dQ = combustion->dQ(); + label inertIndex = -1; + volScalarField Yt(0.0*Y[0]); + + forAll(Y, i) + { + if (Y[i].name() != inertSpecie) + { + volScalarField& Yi = Y[i]; + + fvScalarMatrix YEqn + ( + mvConvection->fvmDiv(phi, Yi) + - fvm::laplacian(turbulence->muEff(), Yi) + == + parcels.SYi(i, Yi) + + combustion->R(Yi) + + fvOptions(rho, Yi) + ); + + YEqn.relax(); + + fvOptions.constrain(YEqn); + + YEqn.solve(mesh.solver("Yi")); + + fvOptions.correct(Yi); + + 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/simpleReactingParcelFoam/createClouds.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createClouds.H new file mode 100644 index 0000000000000000000000000000000000000000..954b74e069f5463683ba0941a1f2818a5258e9fc --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createClouds.H @@ -0,0 +1,9 @@ +Info<< "\nConstructing reacting cloud" << endl; +basicReactingMultiphaseCloud parcels +( + "reactingCloud1", + rho, + U, + g, + slgThermo +); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H new file mode 100644 index 0000000000000000000000000000000000000000..d6df24cb48db47b198ce034055c0a656b0bac387 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H @@ -0,0 +1,98 @@ + Info<< "Creating combustion model\n" << endl; + + autoPtr<combustionModels::rhoCombustionModel> combustion + ( + combustionModels::rhoCombustionModel::New(mesh) + ); + + rhoReactionThermo& thermo = combustion->thermo(); + thermo.validate(args.executable(), "h", "e"); + + SLGThermo slgThermo(mesh, thermo); + + basicMultiComponentMixture& composition = thermo.composition(); + PtrList<volScalarField>& Y = composition.Y(); + + const word inertSpecie(thermo.lookup("inertSpecie")); + + if (!composition.contains(inertSpecie)) + { + FatalErrorIn(args.executable()) + << "Specified inert specie '" << inertSpecie << "' not found in " + << "species list. Available species:" << composition.species() + << exit(FatalError); + } + + volScalarField& p = thermo.p(); + 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" + + dimensionedScalar rhoMax(simple.dict().lookup("rhoMax")); + dimensionedScalar rhoMin(simple.dict().lookup("rhoMin")); + + Info<< "Creating turbulence model\n" << endl; + autoPtr<compressible::turbulenceModel> turbulence + ( + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo + ) + ); + + // Set the turbulence into the combustion model + combustion->setTurbulence(turbulence()); + + Info<< "Creating multi-variate interpolation scheme\n" << endl; + multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields; + + forAll(Y, i) + { + fields.add(Y[i]); + } + fields.add(thermo.he()); + + volScalarField dQ + ( + IOobject + ( + "dQ", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) + ); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H new file mode 100644 index 0000000000000000000000000000000000000000..0d1aa2e2387c3ad5d52c518414060634bbb2200b --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H @@ -0,0 +1,59 @@ +{ + rho = thermo.rho(); + + // Thermodynamic density needs to be updated by psi*d(p) after the + // pressure solution - done in 2 parts. Part 1: + thermo.rho() -= psi*p; + + volScalarField rAU(1.0/UEqn().A()); + volVectorField HbyA("HbyA", U); + HbyA = rAU*UEqn().H(); + + UEqn.clear(); + + surfaceScalarField phiHbyA + ( + "phiHbyA", + fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf()) + ); + + fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); + + while (simple.correctNonOrthogonal()) + { + fvScalarMatrix pEqn + ( + fvc::div(phiHbyA) + - fvm::laplacian(rho*rAU, p) + == + parcels.Srho() + + fvOptions(psi, p, rho.name()) + ); + + fvOptions.constrain(pEqn); + + pEqn.solve(); + + if (simple.finalNonOrthogonalIter()) + { + phi = phiHbyA + pEqn.flux(); + } + } + + p.relax(); + + // Second part of thermodynamic density update + thermo.rho() += psi*p; + + #include "compressibleContinuityErrs.H" + + U = HbyA - rAU*fvc::grad(p); + U.correctBoundaryConditions(); + fvOptions.correct(U); + + rho = thermo.rho(); + rho = max(rho, rhoMin); + rho = min(rho, rhoMax); + + Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl; +} diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C new file mode 100644 index 0000000000000000000000000000000000000000..6620d2af52dfbb6a40bf811c3503132db7d75f89 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/simpleReactingParcelFoam.C @@ -0,0 +1,95 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Application + simpleReactingParcelFoam + +Description + Steady state SIMPLE solver for compressible, laminar or turbulent flow with + reacting multiphase Lagrangian parcels, including run-time selectable + finite volume options, e.g. sources, constraints + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "turbulenceModel.H" +#include "basicReactingMultiphaseCloud.H" +#include "rhoCombustionModel.H" +#include "radiationModel.H" +#include "IOporosityModelList.H" +#include "fvIOoptionList.H" +#include "SLGThermo.H" +#include "simpleControl.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + + #include "createTime.H" + #include "createMesh.H" + #include "readGravitationalAcceleration.H" + + simpleControl simple(mesh); + + #include "createFields.H" + #include "createRadiationModel.H" + #include "createClouds.H" + #include "createFvOptions.H" + #include "initContinuityErrs.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (simple.loop()) + { + Info<< "Time = " << runTime.timeName() << nl << endl; + + parcels.evolve(); + + // --- Pressure-velocity SIMPLE corrector loop + { + #include "UEqn.H" + #include "YEqn.H" + #include "EEqn.H" + #include "pEqn.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/src/fvOptions/Make/files b/src/fvOptions/Make/files index d6c2e970a5ebe7393e7f251f0583d2a8ad7057af..23fdf0282f79f2151a91baac02f4112def7ec7e8 100644 --- a/src/fvOptions/Make/files +++ b/src/fvOptions/Make/files @@ -28,11 +28,12 @@ $(derivedSources)/rotorDiskSource/trimModel/trimModel/trimModelNew.C $(derivedSources)/rotorDiskSource/trimModel/fixed/fixedTrim.C $(derivedSources)/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C -interRegion = $(derivedSources)/interRegionHeatTransferModel -$(interRegion)/constantHeatTransfer/constantHeatTransfer.C -$(interRegion)/interRegionHeatTransferModel/interRegionHeatTransferModel.C -$(interRegion)/tabulatedHeatTransfer/tabulatedHeatTransfer.C -$(interRegion)/variableHeatTransfer/variableHeatTransfer.C +interRegion = sources/interRegion +$(interRegion)/interRegionHeatTransferModel/constantHeatTransfer/constantHeatTransfer.C +$(interRegion)/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModel.C +$(interRegion)/interRegionHeatTransferModel/tabulatedHeatTransfer/tabulatedHeatTransfer.C +$(interRegion)/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C +$(interRegion)/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C /* constraints */ diff --git a/src/fvOptions/fvOptions/fvIOoptionList.C b/src/fvOptions/fvOptions/fvIOoptionList.C index 1ea4be17d260ebbe4131e7393b52069dd9c82d2f..287e4171be455dd9856a37eeaf0530260324ffe4 100644 --- a/src/fvOptions/fvOptions/fvIOoptionList.C +++ b/src/fvOptions/fvOptions/fvIOoptionList.C @@ -45,14 +45,15 @@ Foam::IOobject Foam::fv::IOoptionList::createIOobject if (io.headerOk()) { - Info<< "Creating field source list from " << io.name() << nl << endl; + Info<< "Creating fintite volume options from " << io.name() << nl + << endl; io.readOpt() = IOobject::MUST_READ_IF_MODIFIED; return io; } else { - Info<< "No field sources present" << nl << endl; + Info<< "No finite volume options present" << nl << endl; io.readOpt() = IOobject::NO_READ; return io; diff --git a/src/fvOptions/fvOptions/fvOption.C b/src/fvOptions/fvOptions/fvOption.C index 6cd5c770f4e90b95e03c88ca66479d186f45a86a..8cb72b8e996b90a89826b037d0781aa5f6b4da5b 100644 --- a/src/fvOptions/fvOptions/fvOption.C +++ b/src/fvOptions/fvOptions/fvOption.C @@ -27,6 +27,7 @@ License #include "fvMesh.H" #include "fvMatrices.H" #include "volFields.H" +#include "ListOps.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -86,9 +87,7 @@ void Foam::fv::option::setSelection(const dictionary& dict) } case smMapRegion: { - dict.lookup("nbrModelName") >> nbrModelName_; dict.lookup("nbrRegionName") >> nbrRegionName_; - master_ = readBool(dict.lookup("master")); break; } case smAll: @@ -250,7 +249,8 @@ Foam::fv::option::option const word& name, const word& modelType, const dictionary& dict, - const fvMesh& mesh + const fvMesh& mesh, + const bool master ) : name_(name), @@ -264,9 +264,8 @@ Foam::fv::option::option cellSetName_("none"), V_(0.0), meshInterpPtr_(), - nbrModelName_("none"), nbrRegionName_("none"), - master_(false), + master_(master), fieldNames_(), applied_() { @@ -353,15 +352,7 @@ Foam::label Foam::fv::option::applyToField(const word& fieldName) const return 0; } - forAll(fieldNames_, i) - { - if (fieldNames_[i] == fieldName) - { - return i; - } - } - - return -1; + return findIndex(fieldNames_, fieldName); } diff --git a/src/fvOptions/fvOptions/fvOption.H b/src/fvOptions/fvOptions/fvOption.H index 3501fdfa45f9393706ea128cbfe35da09884ffeb..28509ee4c0636cb66e86e5a78c353ea5fb65147b 100644 --- a/src/fvOptions/fvOptions/fvOption.H +++ b/src/fvOptions/fvOptions/fvOption.H @@ -134,9 +134,6 @@ protected: //- Mesh to mesh interpolation object autoPtr<meshToMeshNew> meshInterpPtr_; - //- Name of the model in the neighbour mesh - word nbrModelName_; - //- Name of the neighbour region to map word nbrRegionName_; @@ -194,7 +191,8 @@ public: const word& name, const word& modelType, const dictionary& dict, - const fvMesh& mesh + const fvMesh& mesh, + const bool master = false ); //- Return clone @@ -288,9 +286,6 @@ public: //- Return const access to the total cell volume inline scalar V() const; - //- Return const access to the neighbour model name - inline const word& nbrModelName() const; - //- Return const access to the neighbour region name inline const word& nbrRegionName() const; diff --git a/src/fvOptions/fvOptions/fvOptionI.H b/src/fvOptions/fvOptions/fvOptionI.H index aed4c14e552259ee077cbbaf7abd9885368c424a..796b2fdbc91a6f5a346598fe1aaf79856794e2e0 100644 --- a/src/fvOptions/fvOptions/fvOptionI.H +++ b/src/fvOptions/fvOptions/fvOptionI.H @@ -126,12 +126,6 @@ inline Foam::scalar& Foam::fv::option::duration() } -inline const Foam::word& Foam::fv::option::nbrModelName() const -{ - return nbrModelName_; -} - - inline const Foam::word& Foam::fv::option::nbrRegionName() const { return nbrRegionName_; diff --git a/src/fvOptions/fvOptions/fvOptionIO.C b/src/fvOptions/fvOptions/fvOptionIO.C index c89c97b864706ebe892e81a76083fa5797e56163..c51b6b9b483e5acbb030c20e7c24056add040fc0 100644 --- a/src/fvOptions/fvOptions/fvOptionIO.C +++ b/src/fvOptions/fvOptions/fvOptionIO.C @@ -90,8 +90,11 @@ void Foam::fv::option::writeData(Ostream& os) const bool Foam::fv::option::read(const dictionary& dict) { active_ = readBool(dict.lookup("active")); - timeStart_ = readScalar(dict.lookup("timeStart")); - duration_ = readScalar(dict.lookup("duration")); + + if (dict.readIfPresent("timeStart", timeStart_)) + { + dict.lookup("duration") >> duration_; + } coeffs_ = dict.subDict(type() + "Coeffs"); diff --git a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C new file mode 100644 index 0000000000000000000000000000000000000000..0c0cf7f284dba71aee14c85870798039f91006d1 --- /dev/null +++ b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C @@ -0,0 +1,230 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 3 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*----------------------------------------------------------------------------*/ + +#include "interRegionExplicitPorositySource.H" +#include "fvMesh.H" +#include "fvMatrices.H" +#include "porosityModel.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace fv +{ + defineTypeNameAndDebug(interRegionExplicitPorositySource, 0); + addToRunTimeSelectionTable + ( + option, + interRegionExplicitPorositySource, + dictionary + ); +} +} + +// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // + +void Foam::fv::interRegionExplicitPorositySource::initialise() +{ + if (!firstIter_) + { + return; + } + + const word zoneName(name_ + ".porous"); + + const fvMesh& nbrMesh = mesh_.time().lookupObject<fvMesh>(nbrRegionName_); + const cellZoneMesh& cellZones = nbrMesh.cellZones(); + label zoneID = cellZones.findZoneID(zoneName); + + if (zoneID == -1) + { + cellZoneMesh& cz = const_cast<cellZoneMesh&>(cellZones); + + zoneID = cz.size(); + + cz.setSize(zoneID + 1); + + cz.set + ( + zoneID, + new cellZone + ( + zoneName, + nbrMesh.faceNeighbour(), // neighbour internal cells + zoneID, + cellZones + ) + ); + + cz.clearAddressing(); + } + else + { + FatalErrorIn + ( + "void Foam::fv::interRegionExplicitPorositySource::initialise()" + ) + << "Unable to create porous cellZone " << zoneName + << ": zone already exists" + << abort(FatalError); + } + + porosityPtr_.reset + ( + porosityModel::New + ( + name_, + nbrMesh, + coeffs_, + zoneName + ).ptr() + ), + + firstIter_ = false; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::fv::interRegionExplicitPorositySource::interRegionExplicitPorositySource +( + const word& name, + const word& modelType, + const dictionary& dict, + const fvMesh& mesh +) +: + option(name, modelType, dict, mesh, true), + porosityPtr_(NULL), + firstIter_(-1), + UName_(coeffs_.lookupOrDefault<word>("UName", "U")), + rhoName_(coeffs_.lookupOrDefault<word>("rhoName", "rho")), + muName_(coeffs_.lookupOrDefault<word>("muName", "thermo:mu")) +{ + if (active_) + { + fieldNames_.setSize(1, UName_); + applied_.setSize(1, false); + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::fv::interRegionExplicitPorositySource::addSup +( + fvMatrix<vector>& eqn, + const label fieldI +) +{ + initialise(); + + const fvMesh& nbrMesh = mesh_.time().lookupObject<fvMesh>(nbrRegionName_); + + const volVectorField& U = eqn.psi(); + + volVectorField UNbr + ( + IOobject + ( + name_ + ".UNbr", + nbrMesh.time().timeName(), + nbrMesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + nbrMesh, + dimensionedVector("zero", U.dimensions(), vector::zero) + ); + + // map local velocity onto neighbour region + meshInterp().mapSrcToTgt + ( + U.internalField(), + plusEqOp<vector>(), + UNbr.internalField() + ); + + fvMatrix<vector> nbrEqn(UNbr, eqn.dimensions()); + + if (eqn.dimensions() == dimForce) + { + const volScalarField& rhoNbr = + nbrMesh.lookupObject<volScalarField>(rhoName_); + const volScalarField& muNbr = + nbrMesh.lookupObject<volScalarField>(muName_); + + porosityPtr_->addResistance(nbrEqn, rhoNbr, muNbr); + } + else + { + porosityPtr_->addResistance(nbrEqn); + } + + // convert source from neighbour to local region + fvMatrix<vector> porosityEqn(U, eqn.dimensions()); + scalarField& Udiag = porosityEqn.diag(); + vectorField& Usource = porosityEqn.source(); + + Udiag.setSize(eqn.diag().size(), 0.0); + Usource.setSize(eqn.source().size(), vector::zero); + + meshInterp().mapTgtToSrc(nbrEqn.diag(), plusEqOp<scalar>(), Udiag); + meshInterp().mapTgtToSrc(nbrEqn.source(), plusEqOp<vector>(), Usource); + + eqn -= porosityEqn; +} + + +void Foam::fv::interRegionExplicitPorositySource::writeData(Ostream& os) const +{ + os << indent << name_ << endl; + dict_.write(os); +} + + +bool Foam::fv::interRegionExplicitPorositySource::read(const dictionary& dict) +{ + if (option::read(dict)) + { + coeffs_.readIfPresent("UName", UName_); + coeffs_.readIfPresent("rhoName", rhoName_); + coeffs_.readIfPresent("muName", muName_); + + // reset the porosity model? + + return true; + } + else + { + return false; + } +} + + +// ************************************************************************* // diff --git a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.H b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.H new file mode 100644 index 0000000000000000000000000000000000000000..da93314a0a1c58e4541a7f76ce788c282fbdabdd --- /dev/null +++ b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.H @@ -0,0 +1,177 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 3 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::fv::interRegionExplicitPorositySource + +Description + Inter-region explicit porosity source + + Sources described by, for example using the DarcyForchheimer model: + + interRegionExplicitPorositySourceCoeffs + { + type DarcyForchheimer; + DarcyForchheimerCoeffs + { + d d [0 -2 0 0 0 0 0] (5e7 -1000 -1000); + f f [0 -1 0 0 0 0 0] (0 0 0); + + coordinateSystem + { + e1 (0.70710678 0.70710678 0); + e2 (0 0 1); + } + } + } + +Note: + The porous region must be selected as a cellZone. + +SourceFiles + interRegionExplicitPorositySource.C + +\*---------------------------------------------------------------------------*/ + +#ifndef interRegionExplicitPorositySource_H +#define interRegionExplicitPorositySource_H + +#include "fvOption.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class porosityModel; + +namespace fv +{ + + +/*---------------------------------------------------------------------------*\ + Class interRegionExplicitPorositySource Declaration +\*---------------------------------------------------------------------------*/ + +class interRegionExplicitPorositySource +: + public option +{ + +protected: + + // Protected data + + //- Run-time selectable porosity model + autoPtr<porosityModel> porosityPtr_; + + //- First iteration + bool firstIter_; + + //- Velocity field name, default = U + word UName_; + + //- Density field name (compressible case only), default = rho + word rhoName_; + + //- Dynamic viscosity field name (compressible case only) + // default = thermo:mu + word muName_; + + + // Protected Member Functions + + //- Initialise + void initialise(); + + +private: + + // Private Member Functions + + //- Disallow default bitwise copy construct + interRegionExplicitPorositySource + ( + const interRegionExplicitPorositySource& + ); + + //- Disallow default bitwise assignment + void operator=(const interRegionExplicitPorositySource&); + + +public: + + //- Runtime type information + TypeName("interRegionExplicitPorositySource"); + + + // Constructors + + //- Construct from components + interRegionExplicitPorositySource + ( + const word& name, + const word& modelType, + const dictionary& dict, + const fvMesh& mesh + ); + + + //- Destructor + virtual ~interRegionExplicitPorositySource() + {} + + + // Member Functions + + // Add explicit and implicit contributions + + //- Vector + virtual void addSup + ( + fvMatrix<vector>& eqn, + const label fieldI + ); + + + // I-O + + //- Write data + virtual void writeData(Ostream&) const; + + //- Read dictionary + virtual bool read(const dictionary& dict); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fv +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/fvOptions/sources/derived/interRegionHeatTransferModel/constantHeatTransfer/constantHeatTransfer.C b/src/fvOptions/sources/interRegion/interRegionHeatTransferModel/constantHeatTransfer/constantHeatTransfer.C similarity index 100% rename from src/fvOptions/sources/derived/interRegionHeatTransferModel/constantHeatTransfer/constantHeatTransfer.C rename to src/fvOptions/sources/interRegion/interRegionHeatTransferModel/constantHeatTransfer/constantHeatTransfer.C diff --git a/src/fvOptions/sources/derived/interRegionHeatTransferModel/constantHeatTransfer/constantHeatTransfer.H b/src/fvOptions/sources/interRegion/interRegionHeatTransferModel/constantHeatTransfer/constantHeatTransfer.H similarity index 100% rename from src/fvOptions/sources/derived/interRegionHeatTransferModel/constantHeatTransfer/constantHeatTransfer.H rename to src/fvOptions/sources/interRegion/interRegionHeatTransferModel/constantHeatTransfer/constantHeatTransfer.H diff --git a/src/fvOptions/sources/derived/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModel.C b/src/fvOptions/sources/interRegion/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModel.C similarity index 97% rename from src/fvOptions/sources/derived/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModel.C rename to src/fvOptions/sources/interRegion/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModel.C index 31a684afb9681ff041c8d2846e3e210519204e0e..710a43cf3eced30de48c54b0d74e14970ec6bb11 100644 --- a/src/fvOptions/sources/derived/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModel.C +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModel.C @@ -109,8 +109,9 @@ Foam::fv::interRegionHeatTransferModel::interRegionHeatTransferModel const fvMesh& mesh ) : - option(name, modelType, dict, mesh), + option(name, modelType, dict, mesh, readBool(dict.lookup("master"))), nbrModel_(NULL), + nbrModelName_(word::null), firstIter_(true), timeIndex_(-1), htc_ @@ -138,6 +139,8 @@ Foam::fv::interRegionHeatTransferModel::interRegionHeatTransferModel { if (active()) { + coeffs_.lookup("nbrModelName") >> nbrModelName_; + coeffs_.lookup("fieldNames") >> fieldNames_; applied_.setSize(fieldNames_.size(), false); diff --git a/src/fvOptions/sources/derived/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModel.H b/src/fvOptions/sources/interRegion/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModel.H similarity index 98% rename from src/fvOptions/sources/derived/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModel.H rename to src/fvOptions/sources/interRegion/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModel.H index 736bd094fb22d94c6236fedc6e7e37313f796524..55aabd45e1e8ffd16fedb86daa795bb33d06a4d5 100644 --- a/src/fvOptions/sources/derived/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModel.H +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModel.H @@ -65,6 +65,9 @@ private: //- Pointer to neighbour interRegionHeatTransferModel interRegionHeatTransferModel* nbrModel_; + //- Name of the model in the neighbour mesh + word nbrModelName_; + //- First iteration bool firstIter_; diff --git a/src/fvOptions/sources/derived/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModelI.H b/src/fvOptions/sources/interRegion/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModelI.H similarity index 100% rename from src/fvOptions/sources/derived/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModelI.H rename to src/fvOptions/sources/interRegion/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModelI.H diff --git a/src/fvOptions/sources/derived/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModelTemplates.C b/src/fvOptions/sources/interRegion/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModelTemplates.C similarity index 100% rename from src/fvOptions/sources/derived/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModelTemplates.C rename to src/fvOptions/sources/interRegion/interRegionHeatTransferModel/interRegionHeatTransferModel/interRegionHeatTransferModelTemplates.C diff --git a/src/fvOptions/sources/derived/interRegionHeatTransferModel/tabulatedHeatTransfer/tabulatedHeatTransfer.C b/src/fvOptions/sources/interRegion/interRegionHeatTransferModel/tabulatedHeatTransfer/tabulatedHeatTransfer.C similarity index 100% rename from src/fvOptions/sources/derived/interRegionHeatTransferModel/tabulatedHeatTransfer/tabulatedHeatTransfer.C rename to src/fvOptions/sources/interRegion/interRegionHeatTransferModel/tabulatedHeatTransfer/tabulatedHeatTransfer.C diff --git a/src/fvOptions/sources/derived/interRegionHeatTransferModel/tabulatedHeatTransfer/tabulatedHeatTransfer.H b/src/fvOptions/sources/interRegion/interRegionHeatTransferModel/tabulatedHeatTransfer/tabulatedHeatTransfer.H similarity index 100% rename from src/fvOptions/sources/derived/interRegionHeatTransferModel/tabulatedHeatTransfer/tabulatedHeatTransfer.H rename to src/fvOptions/sources/interRegion/interRegionHeatTransferModel/tabulatedHeatTransfer/tabulatedHeatTransfer.H diff --git a/src/fvOptions/sources/derived/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C b/src/fvOptions/sources/interRegion/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C similarity index 100% rename from src/fvOptions/sources/derived/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C rename to src/fvOptions/sources/interRegion/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C diff --git a/src/fvOptions/sources/derived/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.H b/src/fvOptions/sources/interRegion/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.H similarity index 100% rename from src/fvOptions/sources/derived/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.H rename to src/fvOptions/sources/interRegion/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.H diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H index 6d717bb1747419704390e5242cbd8e17d0dd76b6..405eb9bf0e3be13dd60cfd31607c5cdd0ec52e67 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H @@ -407,7 +407,7 @@ inline Foam::scalar Foam::ThermoCloud<CloudType>::Tmin() const reduce(T, minOp<scalar>()); - return max(0.0, T); + return min(0.0, T); } diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C index e9bc8153045af85ad40f565aed04d670821859f2..ed60ded9596a6b0545dd8968f5f7782fd2150694 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -510,6 +510,9 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange const CompositionModel<reactingCloudType>& composition = td.cloud().composition(); + const scalar TMax = td.cloud().phaseChange().TMax(pc_, this->Tc_); + const scalar Tdash = min(T, TMax); + const scalar Tsdash = min(Ts, TMax); // Calculate mass transfer due to phase change td.cloud().phaseChange().calculate @@ -520,8 +523,8 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange Pr, d, nus, - T, - Ts, + Tdash, + Tsdash, pc_, this->Tc_, YComponents, @@ -541,7 +544,7 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange const label idc = composition.localToGlobalCarrierId(idPhase, i); const label idl = composition.globalIds(idPhase)[i]; - const scalar dh = td.cloud().phaseChange().dh(idc, idl, pc_, T); + const scalar dh = td.cloud().phaseChange().dh(idc, idl, pc_, Tdash); Sh -= dMassPC[i]*dh/dt; } @@ -558,12 +561,12 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange const label idc = composition.localToGlobalCarrierId(idPhase, i); const label idl = composition.globalIds(idPhase)[i]; - const scalar Cp = composition.carrier().Cp(idc, pc_, Ts); + const scalar Cp = composition.carrier().Cp(idc, pc_, Tsdash); const scalar W = composition.carrier().W(idc); const scalar Ni = dMassPC[i]/(this->areaS(d)*dt*W); const scalar Dab = - composition.liquids().properties()[idl].D(pc_, Ts, Wc); + composition.liquids().properties()[idl].D(pc_, Tsdash, Wc); // Molar flux of species coming from the particle (kmol/m^2/s) N += Ni; diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C index f1dc7c4ba06db92b2feaa5aeddc402bfea0d1f2f..0316eb726a2424a4d469b2d9bba5239a4d7e7fad 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -404,20 +404,23 @@ void Foam::ParticleCollector<CloudType>::write() } - Field<scalar> faceMassTotal(mass_.size()); - Field<scalar> faceMassFlowRate(massFlowRate_.size()); + Field<scalar> faceMassTotal(mass_.size(), 0.0); + this->getModelProperty("massTotal", faceMassTotal); + + Field<scalar> faceMassFlowRate(massFlowRate_.size(), 0.0); + this->getModelProperty("massFlowRate", faceMassFlowRate); forAll(faces_, faceI) { scalarList allProcMass(Pstream::nProcs()); allProcMass[procI] = massTotal_[faceI]; Pstream::gatherList(allProcMass); - faceMassTotal[faceI] = sum(allProcMass); + faceMassTotal[faceI] += sum(allProcMass); scalarList allProcMassFlowRate(Pstream::nProcs()); allProcMassFlowRate[procI] = massFlowRate_[faceI]; Pstream::gatherList(allProcMassFlowRate); - faceMassFlowRate[faceI] = sum(allProcMassFlowRate); + faceMassFlowRate[faceI] += sum(allProcMassFlowRate); Info<< " face " << faceI << ": total mass = " << faceMassTotal[faceI] @@ -470,20 +473,25 @@ void Foam::ParticleCollector<CloudType>::write() if (resetOnWrite_) { - forAll(faces_, faceI) - { - massFlowRate_[faceI] = 0.0; - } + Field<scalar> dummy(faceMassTotal.size(), 0.0); + this->setModelProperty("massTotal", dummy); + this->setModelProperty("massFlowRate", dummy); + timeOld_ = timeNew; totalTime_ = 0.0; } + else + { + this->setModelProperty("massTotal", faceMassTotal); + this->setModelProperty("massFlowRate", faceMassFlowRate); + } forAll(faces_, faceI) { mass_[faceI] = 0.0; + massTotal_[faceI] = 0.0; + massFlowRate_[faceI] = 0.0; } - - // writeProperties(); } @@ -552,8 +560,8 @@ Foam::ParticleCollector<CloudType>::ParticleCollector ( "Foam::ParticleCollector<CloudType>::ParticleCollector" "(" - "const dictionary& dict," - "CloudType& owner" + "const dictionary&," + "CloudType&" ")" ) << "Unknown mode " << mode << ". Available options are " @@ -565,8 +573,6 @@ Foam::ParticleCollector<CloudType>::ParticleCollector massFlowRate_.setSize(faces_.size(), 0.0); makeLogFile(faces_, points_, area_); - - // readProperties(); AND initialise mass... fields } diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C index 97b84a6049f5a51924769e9b25162e41a45056b4..b46ea2b5bf18b14ab48c3eb4988c6c84ee723bc0 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -200,8 +200,8 @@ Foam::scalar Foam::LiquidEvaporation<CloudType>::dh ( const label idc, const label idl, - const label p, - const label T + const scalar p, + const scalar T ) const { scalar dh = 0; @@ -230,8 +230,8 @@ Foam::scalar Foam::LiquidEvaporation<CloudType>::dh "(" "const label, " "const label, " - "const label, " - "const label" + "const scalar, " + "const scalar" ") const" ) << "Unknown enthalpyTransfer type" << abort(FatalError); } @@ -241,4 +241,21 @@ Foam::scalar Foam::LiquidEvaporation<CloudType>::dh } +template<class CloudType> +Foam::scalar Foam::LiquidEvaporation<CloudType>::TMax +( + const scalar pIn, + const scalar TIn +) const +{ + scalar T = -GREAT; + forAll(liquids_, i) + { + T = max(T, liquids_.properties()[i].pv(pIn, TIn)); + } + + return T; +} + + // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H index 60db6c63a5dda1a43e6ab7674a9b3c22df144195..5a97dc73944b1a815514fe12a3a10ea8922629a3 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -127,9 +127,12 @@ public: ( const label idc, const label idl, - const label p, - const label T + const scalar p, + const scalar T ) const; + + //- Return maximum/limiting temperature + virtual scalar TMax(const scalar pIn, const scalar TIn) const; }; diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C index 803b849fa43d9da8a5a766541eeb3ffade6e8855..8a88620992f306524ccb6e9782c2f24d1c6ff21c 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -293,8 +293,8 @@ Foam::scalar Foam::LiquidEvaporationBoil<CloudType>::dh ( const label idc, const label idl, - const label p, - const label T + const scalar p, + const scalar T ) const { scalar dh = 0; @@ -329,8 +329,8 @@ Foam::scalar Foam::LiquidEvaporationBoil<CloudType>::dh "(" "const label, " "const label, " - "const label, " - "const label" + "const scalar, " + "const scalar" ") const" ) << "Unknown enthalpyTransfer type" << abort(FatalError); } @@ -340,4 +340,21 @@ Foam::scalar Foam::LiquidEvaporationBoil<CloudType>::dh } +template<class CloudType> +Foam::scalar Foam::LiquidEvaporationBoil<CloudType>::TMax +( + const scalar pIn, + const scalar TIn +) const +{ + scalar T = -GREAT; + forAll(liquids_, i) + { + T = max(T, liquids_.properties()[i].pv(pIn, TIn)); + } + + return T; +} + + // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.H index 48d92292cdcd890a46699dc9f7847651512eaf1b..bf9ca867ce51205a14f641decd8cd12838e0adc1 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.H +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -137,9 +137,12 @@ public: ( const label idc, const label idl, - const label p, - const label T + const scalar p, + const scalar T ) const; + + //- Return maximum/limiting temperature + virtual scalar TMax(const scalar pIn, const scalar TIn) const; }; diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C index c84c7b83f887843521dc1529cc243f5b44adb38c..7141ff98147cb1f6668900e1a59b69ddb5db698b 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -170,14 +170,25 @@ Foam::scalar Foam::PhaseChangeModel<CloudType>::dh ( const label idc, const label idl, - const label p, - const label T + const scalar p, + const scalar T ) const { return 0.0; } +template<class CloudType> +Foam::scalar Foam::PhaseChangeModel<CloudType>::TMax +( + const scalar, + const scalar +) const +{ + return GREAT; +} + + template<class CloudType> void Foam::PhaseChangeModel<CloudType>::addToPhaseChangeMass(const scalar dMass) { diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H index 3ee8d4dbd34f0009c869331436838c1384653c1f..ac6c5c06b344f297d37893c481fc25fe5ad162ab 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -180,10 +180,12 @@ public: ( const label idc, const label idl, - const label p, - const label T + const scalar p, + const scalar T ) const; + //- Return maximum/limiting temperature + virtual scalar TMax(const scalar pIn, const scalar TIn) const; //- Add to phase change mass void addToPhaseChangeMass(const scalar dMass); diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C index 3e1a29e988a3fd7dee54e634acba0bee5c94f08a..2d47253de91fb9f1b3fd59d28ab564363a826f10 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -572,7 +572,7 @@ bool Foam::ThermoSurfaceFilm<CloudType>::transferParcel regionModels::surfaceFilmModels::surfaceFilmModel& filmModel = const_cast<regionModels::surfaceFilmModels::surfaceFilmModel&> ( - this->owner().db().objectRegistry::template + this->owner().db().time().objectRegistry::template lookupObject<regionModels::surfaceFilmModels::surfaceFilmModel> ( "surfaceFilmProperties" diff --git a/src/meshTools/tetOverlapVolume/tetOverlapVolume.C b/src/meshTools/tetOverlapVolume/tetOverlapVolume.C index c0f192f7de4a6b88a3e25708d2c5155452b6e2a3..692096b8e91dfc9fdea7f84b7e8d9094ddc63a90 100644 --- a/src/meshTools/tetOverlapVolume/tetOverlapVolume.C +++ b/src/meshTools/tetOverlapVolume/tetOverlapVolume.C @@ -54,9 +54,9 @@ Foam::scalar Foam::tetOverlapVolume::tetTetOverlapVol const tetPoints& tetB ) const { - tetPointRef::tetIntersectionList insideTets; + static tetPointRef::tetIntersectionList insideTets; label nInside = 0; - tetPointRef::tetIntersectionList cutInsideTets; + static tetPointRef::tetIntersectionList cutInsideTets; label nCutInside = 0; tetPointRef::storeOp inside(insideTets, nInside); diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun-serial b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun-serial rename to tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/porous/polyMesh/blockMeshDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/porous/polyMesh/blockMeshDict index eae25e8926e3155d1505f1720f66d056eff33899..f32b1c76217233732b5d3515caa2da74edcad0c2 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/porous/polyMesh/blockMeshDict +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/porous/polyMesh/blockMeshDict @@ -18,20 +18,20 @@ convertToMeters 0.05; vertices ( - (-2 4 4) // 0 - (12 4 4) // 1 - (12 6 4) // 2 - (-2 6 4) // 3 + (-2 2 6) // 0 + (12 2 6) // 1 + (12 8 6) // 2 + (-2 8 6) // 3 - (-2 4 6) // 4 - (12 4 6) // 5 - (12 6 6) // 6 - (-2 6 6) // 7 + (-2 2 7) // 4 + (12 2 7) // 5 + (12 8 7) // 6 + (-2 8 7) // 7 ); blocks ( - hex (0 1 2 3 4 5 6 7) (40 15 15) simpleGrading (1 1 1) + hex (0 1 2 3 4 5 6 7) (40 30 30) simpleGrading (1 1 1) ); edges diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/air/fvOptions b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/air/fvOptions index 44aba3100f97e399341d8178058b7d992708df48..00978429d9b793b60ee8a71b46e1991097ba27ff 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/air/fvOptions +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/air/fvOptions @@ -21,17 +21,43 @@ airToporous active on; selectionMode mapRegion; interpolationMethod cellVolumeWeight; - nbrModelName porousToair; nbrRegionName porous; master false; constantHeatTransferCoeffs { + nbrModelName porousToair; fieldNames (h); semiImplicit no; } } +porosityBlockage +{ + type interRegionExplicitPorositySource; + active on; + selectionMode mapRegion; + interpolationMethod cellVolumeWeight; + nbrRegionName porous; + + interRegionExplicitPorositySourceCoeffs + { + type DarcyForchheimer; + + DarcyForchheimerCoeffs + { + d d [0 -2 0 0 0] (10 -1000 -1000); + f f [0 -1 0 0 0] (0 0 0); + + coordinateSystem + { + e1 (0 1 0); + e2 (0 0 1); + } + } + } +} + MRF1 { type MRFSource; diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/porous/fvOptions b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/porous/fvOptions index 64561c37f6b50b29e0024b96285f2b4246f45dff..f2f64e4882f1e48e05b28dc60cbbfda7e218fa5f 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/porous/fvOptions +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/porous/fvOptions @@ -21,12 +21,12 @@ porousToair active on; selectionMode mapRegion; interpolationMethod cellVolumeWeight; - nbrModelName airToporous; nbrRegionName air; master true; constantHeatTransferCoeffs { + nbrModelName airToporous; fieldNames (h); semiImplicit no; } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/reactingCloud1Properties index 42ddef823562d0f19e64ba22fa74c97fc5496bfb..bcb3e3e80d63667f4ed013fb1be631777cff6e33 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/reactingCloud1Properties @@ -133,7 +133,24 @@ subModels cloudFunctions -{} +{ + particleCollector + { + mode concentricCircle; + + origin (0.05 0.025 0.005); + radius (0.01 0.025 0.05); + nSector 10; + refDir (1 0 0); + normal (0 0 1); + + negateParcelsOppositeNormal no; + removeCollected no; + surfaceFormat vtk; + resetOnWrite no; + log yes; + } +} // ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/H2O b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/H2O new file mode 100644 index 0000000000000000000000000000000000000000..baa8dd215249e6e3f0fe64afc48765f538351869 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/H2O @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object H2O; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.01; + +boundaryField +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + walls + { + type zeroGradient; + } + outlet + { + type inletOutlet; + inletValue uniform 0.0; + } + inletSides + { + type fixedValue; + value uniform 0.01; + } + inletCentral + { + type fixedValue; + value uniform 0.01; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/T b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/T new file mode 100644 index 0000000000000000000000000000000000000000..df744edb03e1e986aec2b3d1b5f622e209bb44d0 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/T @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 473.0; + +boundaryField +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + walls + { + type zeroGradient; + } + outlet + { + type inletOutlet; + inletValue uniform 473.0; + } + inletSides + { + type fixedValue; + value uniform 473.0; + } + inletCentral + { + type fixedValue; + value uniform 573.0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/U b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/U new file mode 100644 index 0000000000000000000000000000000000000000..401e7ced02b50c284bd6f29860de5283660b49c2 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/U @@ -0,0 +1,59 @@ +/*--------------------------------*- 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 +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + inletCentral + { + type flowRateInletVelocity; + rhoInlet 1.2; + massFlowRate constant 0.00379; + value uniform (0 14.68 0); + } + inletSides + { + type flowRateInletVelocity; + rhoInlet 1.2; + massFlowRate constant 0.00832; + value uniform (0 17.79 0); + } + outlet + { + type inletOutlet; + inletValue uniform (0 0 0); + } + walls + { + type fixedValue; + value uniform (0 0 0); + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/air b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/air new file mode 100644 index 0000000000000000000000000000000000000000..81541afef9ba8bd7dce383d397ed237ab2babffb --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/air @@ -0,0 +1,54 @@ +/*--------------------------------*- 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 air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.99; + +boundaryField +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + walls + { + type zeroGradient; + } + outlet + { + type inletOutlet; + inletValue uniform 1.0; + } + inletSides + { + type fixedValue; + value uniform 0.99; + } + inletCentral + { + type fixedValue; + value uniform 0.99; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/alphat b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/alphat new file mode 100644 index 0000000000000000000000000000000000000000..33d260bf7c08ac66cd93e39c7ffe42695a15258f --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/alphat @@ -0,0 +1,56 @@ +/*--------------------------------*- 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 +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + inletCentral + { + type calculated; + value uniform 0; + } + inletSides + { + type calculated; + value uniform 0; + } + outlet + { + type calculated; + value uniform 0; + } + walls + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/k b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/k new file mode 100644 index 0000000000000000000000000000000000000000..2a76936893757ac6bb3379bc2dcf737d40fb1b69 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/k @@ -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 k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 3.75e-9; + +boundaryField +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + inletCentral + { + type turbulentIntensityKineticEnergyInlet; + intensity 0.15; + value uniform 3.75e-9; + } + inletSides + { + type turbulentIntensityKineticEnergyInlet; + intensity 0.16; + value uniform 3.75e-9; + } + outlet + { + type inletOutlet; + inletValue uniform 3.75e-9; + } + walls + { + type compressible::kqRWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/mut b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/mut new file mode 100644 index 0000000000000000000000000000000000000000..7cfeaae133d7fe8289f4a415540c45b7a6a9b5fe --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/mut @@ -0,0 +1,58 @@ +/*--------------------------------*- 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 +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + inletCentral + { + type calculated; + value uniform 0; + } + inletSides + { + type calculated; + value uniform 0; + } + outlet + { + type calculated; + value uniform 0; + } + walls + { + type mutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/omega b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/omega new file mode 100644 index 0000000000000000000000000000000000000000..efd2924775d02edef8c912c48bed1fab405616a0 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/omega @@ -0,0 +1,62 @@ +/*--------------------------------*- 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 omega; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 -1 0 0 0 0]; + +internalField uniform 4.5e-3; + +boundaryField +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + inletCentral + { + type compressible::turbulentMixingLengthFrequencyInlet; + mixingLength 0.007; + k k; + value uniform 4.5e-3; + } + inletSides + { + type compressible::turbulentMixingLengthFrequencyInlet; + mixingLength 0.007; + k k; + value uniform 4.5e-3; + } + outlet + { + type inletOutlet; + inletValue uniform 4.5e-3; + } + walls + { + type compressible::omegaWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/p b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/p new file mode 100644 index 0000000000000000000000000000000000000000..921f06d7a1410ee338d624c9c455acf38976d7ca --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0.org/p @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 100000; + +boundaryField +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + inletCentral + { + type zeroGradient; + } + inletSides + { + type zeroGradient; + } + outlet + { + type fixedValue; + value uniform 100000; + } + walls + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/H2O b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/H2O new file mode 100644 index 0000000000000000000000000000000000000000..baa8dd215249e6e3f0fe64afc48765f538351869 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/H2O @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object H2O; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.01; + +boundaryField +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + walls + { + type zeroGradient; + } + outlet + { + type inletOutlet; + inletValue uniform 0.0; + } + inletSides + { + type fixedValue; + value uniform 0.01; + } + inletCentral + { + type fixedValue; + value uniform 0.01; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/T b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/T new file mode 100644 index 0000000000000000000000000000000000000000..df744edb03e1e986aec2b3d1b5f622e209bb44d0 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/T @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 473.0; + +boundaryField +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + walls + { + type zeroGradient; + } + outlet + { + type inletOutlet; + inletValue uniform 473.0; + } + inletSides + { + type fixedValue; + value uniform 473.0; + } + inletCentral + { + type fixedValue; + value uniform 573.0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/U b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/U new file mode 100644 index 0000000000000000000000000000000000000000..401e7ced02b50c284bd6f29860de5283660b49c2 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/U @@ -0,0 +1,59 @@ +/*--------------------------------*- 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 +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + inletCentral + { + type flowRateInletVelocity; + rhoInlet 1.2; + massFlowRate constant 0.00379; + value uniform (0 14.68 0); + } + inletSides + { + type flowRateInletVelocity; + rhoInlet 1.2; + massFlowRate constant 0.00832; + value uniform (0 17.79 0); + } + outlet + { + type inletOutlet; + inletValue uniform (0 0 0); + } + walls + { + type fixedValue; + value uniform (0 0 0); + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/air b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/air new file mode 100644 index 0000000000000000000000000000000000000000..81541afef9ba8bd7dce383d397ed237ab2babffb --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/air @@ -0,0 +1,54 @@ +/*--------------------------------*- 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 air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.99; + +boundaryField +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + walls + { + type zeroGradient; + } + outlet + { + type inletOutlet; + inletValue uniform 1.0; + } + inletSides + { + type fixedValue; + value uniform 0.99; + } + inletCentral + { + type fixedValue; + value uniform 0.99; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/alphat b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/alphat new file mode 100644 index 0000000000000000000000000000000000000000..33d260bf7c08ac66cd93e39c7ffe42695a15258f --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/alphat @@ -0,0 +1,56 @@ +/*--------------------------------*- 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 +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + inletCentral + { + type calculated; + value uniform 0; + } + inletSides + { + type calculated; + value uniform 0; + } + outlet + { + type calculated; + value uniform 0; + } + walls + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/k b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/k new file mode 100644 index 0000000000000000000000000000000000000000..2a76936893757ac6bb3379bc2dcf737d40fb1b69 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/k @@ -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 k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 3.75e-9; + +boundaryField +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + inletCentral + { + type turbulentIntensityKineticEnergyInlet; + intensity 0.15; + value uniform 3.75e-9; + } + inletSides + { + type turbulentIntensityKineticEnergyInlet; + intensity 0.16; + value uniform 3.75e-9; + } + outlet + { + type inletOutlet; + inletValue uniform 3.75e-9; + } + walls + { + type compressible::kqRWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/mut b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/mut new file mode 100644 index 0000000000000000000000000000000000000000..7cfeaae133d7fe8289f4a415540c45b7a6a9b5fe --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/mut @@ -0,0 +1,58 @@ +/*--------------------------------*- 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 +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + inletCentral + { + type calculated; + value uniform 0; + } + inletSides + { + type calculated; + value uniform 0; + } + outlet + { + type calculated; + value uniform 0; + } + walls + { + type mutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/omega b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/omega new file mode 100644 index 0000000000000000000000000000000000000000..efd2924775d02edef8c912c48bed1fab405616a0 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/omega @@ -0,0 +1,62 @@ +/*--------------------------------*- 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 omega; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 -1 0 0 0 0]; + +internalField uniform 4.5e-3; + +boundaryField +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + inletCentral + { + type compressible::turbulentMixingLengthFrequencyInlet; + mixingLength 0.007; + k k; + value uniform 4.5e-3; + } + inletSides + { + type compressible::turbulentMixingLengthFrequencyInlet; + mixingLength 0.007; + k k; + value uniform 4.5e-3; + } + outlet + { + type inletOutlet; + inletValue uniform 4.5e-3; + } + walls + { + type compressible::omegaWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/p b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/p new file mode 100644 index 0000000000000000000000000000000000000000..921f06d7a1410ee338d624c9c455acf38976d7ca --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/0/p @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 100000; + +boundaryField +{ + back + { + type symmetryPlane; + } + front + { + type symmetryPlane; + } + inletCentral + { + type zeroGradient; + } + inletSides + { + type zeroGradient; + } + outlet + { + type fixedValue; + value uniform 100000; + } + walls + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allclean b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..d0839b002eb376e2de9b5aa131643eb374dcb7a2 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allclean @@ -0,0 +1,15 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +# remove old time and post-processing folders +rm -rf 0 *[1-9]* processor* postProcessing + +# copy 0.org to 0 +cp -r 0.org 0 + +cleanCase + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..36e8545b8433fc1700f3b5d5da6d44f0802b54e7 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun @@ -0,0 +1,19 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +rm -rf 0 +cp -rf 0.org 0 + +runApplication blockMesh + +runApplication potentialFoam + +# remove incompatible (volumetric) flux field +rm -f 0/phi + +runApplication $(getApplication) + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/RASProperties b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/RASProperties new file mode 100644 index 0000000000000000000000000000000000000000..568821b00def4945fcf168421ab44c7f7cd3c15a --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/RASProperties @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RASModel kOmegaSST; // kEpsilon; + +turbulence on; + +printCoeffs on; + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/chemistryProperties b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/chemistryProperties new file mode 100644 index 0000000000000000000000000000000000000000..0fbd9de5dcc424374b17d62042e5db08e9365fb8 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/chemistryProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object chemistryProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +chemistryType +{ + chemistrySolver noChemistrySolver; + chemistryThermo rho; +} + +chemistry off; + +initialChemicalTimeStep 1e-07; // NOT USED + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/combustionProperties b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/combustionProperties new file mode 100644 index 0000000000000000000000000000000000000000..5ede7572c37fca677e4af0a3151992688cdaaa60 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/combustionProperties @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object combustionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +combustionModel PaSR<rhoChemistryCombustion>; + +active false; + +PaSRCoeffs +{ + Cmix 0.1; + turbulentReaction off; + useReactionRate true; +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/g b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/g new file mode 100644 index 0000000000000000000000000000000000000000..e0ac2653b5b370ad62f6770588121d30cac51627 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value ( 0 -9.81 0 ); + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/particleTrackDict b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/particleTrackDict new file mode 100644 index 0000000000000000000000000000000000000000..bf4c329856e92a8c3a82b861504bef6caa21be96 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/particleTrackDict @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object particleTrackDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +cloudName reactingCloud1Tracks; + +fields +( + d + U + T +); + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/polyMesh/blockMeshDict b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..47e0eb9f8ca7322211c430642fd596037deb7940 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/polyMesh/blockMeshDict @@ -0,0 +1,223 @@ +/*--------------------------------*- 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; + location ""; + note "Created Wed Jul 1 19:20:21 2009. Blocks = 8, cells = 9340, vertices = 36"; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.001; + +vertices +( + // front vertices + ( 0.00000e+00 -2.30000e+02 2.50000e+01) // v0 0 + ( 0.00000e+00 -3.00000e+01 2.50000e+01) // v1 1 + ( 0.00000e+00 0.00000e+00 2.50000e+01) // v2 2 + ( 0.00000e+00 1.05000e+03 2.50000e+01) // v3 3 + ( 9.00000e+00 1.05000e+03 2.50000e+01) // v4 4 + ( 1.60000e+01 1.05000e+03 2.50000e+01) // v5 5 + ( 2.50000e+01 1.05000e+03 2.50000e+01) // v6 6 + ( 2.50000e+01 0.00000e+00 2.50000e+01) // v7 7 + ( 2.50000e+01 -3.00000e+01 2.50000e+01) // v8 8 + ( 2.50000e+01 -2.30000e+02 2.50000e+01) // v9 9 + ( 1.80000e+01 -2.30000e+02 2.50000e+01) // v10 10 + ( 1.80000e+01 -3.00000e+01 2.50000e+01) // v11 11 + ( 1.60000e+01 0.00000e+00 2.50000e+01) // v12 12 + ( 1.60000e+01 -2.30000e+02 2.50000e+01) // v13 13 + ( 9.00000e+00 -2.30000e+02 2.50000e+01) // v14 14 + ( 9.00000e+00 0.00000e+00 2.50000e+01) // v15 15 + ( 7.00000e+00 -3.00000e+01 2.50000e+01) // v16 16 + ( 7.00000e+00 -2.30000e+02 2.50000e+01) // v17 17 + + // back vertices + ( 0.00000e+00 -2.30000e+02 -2.50000e+01) // v0 18 + ( 0.00000e+00 -3.00000e+01 -2.50000e+01) // v1 19 + ( 0.00000e+00 0.00000e+00 -2.50000e+01) // v2 20 + ( 0.00000e+00 1.05000e+03 -2.50000e+01) // v3 21 + ( 9.00000e+00 1.05000e+03 -2.50000e+01) // v4 22 + ( 1.60000e+01 1.05000e+03 -2.50000e+01) // v5 23 + ( 2.50000e+01 1.05000e+03 -2.50000e+01) // v6 24 + ( 2.50000e+01 0.00000e+00 -2.50000e+01) // v7 25 + ( 2.50000e+01 -3.00000e+01 -2.50000e+01) // v8 26 + ( 2.50000e+01 -2.30000e+02 -2.50000e+01) // v9 27 + ( 1.80000e+01 -2.30000e+02 -2.50000e+01) // v10 28 + ( 1.80000e+01 -3.00000e+01 -2.50000e+01) // v11 29 + ( 1.60000e+01 0.00000e+00 -2.50000e+01) // v12 30 + ( 1.60000e+01 -2.30000e+02 -2.50000e+01) // v13 31 + ( 9.00000e+00 -2.30000e+02 -2.50000e+01) // v14 32 + ( 9.00000e+00 0.00000e+00 -2.50000e+01) // v15 33 + ( 7.00000e+00 -3.00000e+01 -2.50000e+01) // v16 34 + ( 7.00000e+00 -2.30000e+02 -2.50000e+01) // v17 35 +); + +edges +( +); + +blocks +( + // block 0 + hex (0 1 16 17 18 19 34 35) + (67 10 10) + edgeGrading + ( + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + ) + + // block 1 + hex (1 2 15 16 19 20 33 34) + (10 10 10) + edgeGrading + ( + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + ) + + // block 2 + hex (2 3 4 15 20 21 22 33) + (234 10 10) + edgeGrading + ( + 4.00000e+00 4.00000e+00 4.00000e+00 4.00000e+00 + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + ) + + // block 3 + hex (14 15 12 13 32 33 30 31) + (77 10 10) + edgeGrading + ( + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + ) + + // block 4 + hex (15 4 5 12 33 22 23 30) + (234 10 10) + edgeGrading + ( + 4.00000e+00 4.00000e+00 4.00000e+00 4.00000e+00 + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + ) + + // block 5 + hex (10 11 8 9 28 29 26 27) + (67 10 10) + edgeGrading + ( + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + ) + + // block 6 + hex (11 12 7 8 29 30 25 26) + (11 10 10) + edgeGrading + ( + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + ) + + // block 7 + hex (12 5 6 7 30 23 24 25) + (234 10 10) + edgeGrading + ( + 4.00000e+00 4.00000e+00 4.00000e+00 4.00000e+00 + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + 1.00000e+00 1.00000e+00 1.00000e+00 1.00000e+00 + ) + +); + +defaultPatch +{ + name walls; + type wall; +} + +boundary +( + back + { + type symmetryPlane; + faces + ( + (0 1 16 17) + (1 2 15 16) + (2 3 4 15) + (14 15 12 13) + (15 4 5 12) + (10 11 8 9) + (11 12 7 8) + (12 5 6 7) + ); + } + + front + { + type symmetryPlane; + faces + ( + (18 19 34 35) + (19 20 33 34) + (20 21 22 33) + (32 33 30 31) + (33 22 23 30) + (28 29 26 27) + (29 30 25 26) + (30 23 24 25) + ); + } + + inletCentral + { + type patch; + faces + ( + (13 14 32 31) + ); + } + + inletSides + { + type patch; + faces + ( + (17 0 18 35) + (9 10 28 27) + ); + } + + outlet + { + type patch; + faces + ( + (3 4 22 21) + (4 5 23 22) + (5 6 24 23) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/polyMesh/boundary b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..1319b623261803836c97f2fc155849db5acaa923 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/polyMesh/boundary @@ -0,0 +1,60 @@ +/*--------------------------------*- 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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +6 +( + back + { + type symmetryPlane; + inGroups 1(symmetryPlane); + nFaces 9340; + startFace 265900; + } + front + { + type symmetryPlane; + inGroups 1(symmetryPlane); + nFaces 9340; + startFace 275240; + } + inletCentral + { + type patch; + nFaces 100; + startFace 284580; + } + inletSides + { + type patch; + nFaces 200; + startFace 284680; + } + outlet + { + type patch; + nFaces 300; + startFace 284880; + } + walls + { + type wall; + nFaces 9320; + startFace 285180; + } +) + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/radiationProperties b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/radiationProperties new file mode 100644 index 0000000000000000000000000000000000000000..0ebf90015aa8be5e375757e509a1b724fbfdfcfc --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/radiationProperties @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object radiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +radiation off; + +radiationModel none; + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties new file mode 100644 index 0000000000000000000000000000000000000000..aa8b02241a5b7ed42e112ad151f2340bb5ea59db --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties @@ -0,0 +1,206 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object reactingCloud1Properties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solution +{ + active yes; + + transient no; // yes; + calcFrequency 10; + maxTrackTime 5.0; + maxCo 0.3; + + coupled true; + cellValueSourceCorrection off; + + sourceTerms + { + resetOnStartup false; + schemes + { + rho semiImplicit 1; + U semiImplicit 1; + Yi semiImplicit 1; + h semiImplicit 1; + radiation semiImplicit 1; + } + } + + interpolationSchemes + { + rho cell; + U cellPoint; + thermo:mu cell; + T cell; + Cp cell; + p cell; + } + + integrationSchemes + { + U Euler; + T analytical; + } +} + + +constantProperties +{ + rho0 1000; + T0 350; + Cp0 4100; + + youngsModulus 1e9; + poissonsRatio 0.35; + + epsilon0 1; + f0 0.5; + + Tvap 273; + Tbp 373; + Pr 0.7; + LDevol 0; + hRetentionCoeff 1; + + constantVolume false; +} + + +subModels +{ + particleForces + { + sphereDrag; + gravity; + } + + injectionModels + { + model1 + { + type patchInjection; + massFlowRate 0.8e-03; + parcelBasisType mass; + patchName inletCentral; + parcelsPerSecond 100; + duration 1; // NOTE: set to 1 for steady state + U0 (0 40 0); + flowRateProfile constant 1; + sizeDistribution + { + type general; + generalDistribution + { + distribution + ( + (10e-06 0.0025) + (15e-06 0.0528) + (20e-06 0.2795) + (25e-06 1.0918) + (30e-06 2.3988) + (35e-06 4.4227) + (40e-06 6.3888) + (45e-06 8.6721) + (50e-06 10.3153) + (55e-06 11.6259) + (60e-06 12.0030) + (65e-06 10.4175) + (70e-06 10.8427) + (75e-06 8.0016) + (80e-06 6.1333) + (85e-06 3.8827) + (90e-06 3.4688) + ); + } + } + } + } + + dispersionModel stochasticDispersionRAS; + + patchInteractionModel standardWallInteraction; + + heatTransferModel RanzMarshall; + + compositionModel singleMixtureFraction; + + phaseChangeModel liquidEvaporation; + + devolatilisationModel none; + + surfaceReactionModel none; + + surfaceFilmModel none; + + radiation off; + + standardWallInteractionCoeffs + { + type rebound; + } + + RanzMarshallCoeffs + { + BirdCorrection off; + } + + singleMixtureFractionCoeffs + { + phases + ( + gas + { + } + liquid + { + H2O 1; + } + solid + { + } + ); + YGasTot0 0; + YLiquidTot0 1; + YSolidTot0 0; + } + + liquidEvaporationCoeffs + { + enthalpyTransfer enthalpyDifference; + activeLiquids ( H2O ); + } +} + + +cloudFunctions +{ + patchPostProcessing + { + maxStoredParcels 100; + patches ( outlet ); + } + + particleTracks + { + trackInterval 5; + maxSamples 1000000; + resetOnWrite yes; + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/reactions b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/reactions new file mode 100644 index 0000000000000000000000000000000000000000..228f5f836b5e29d41329266f82c2fcbef7044135 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/reactions @@ -0,0 +1,8 @@ +species +( + air + H2O +); + +reactions +{} diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/thermo.incompressiblePoly b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/thermo.incompressiblePoly new file mode 100644 index 0000000000000000000000000000000000000000..3b8bf27dfe8f02b4e8dd0363b6c13f85f7ff1f74 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/thermo.incompressiblePoly @@ -0,0 +1,91 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermo.incompressiblePoly; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +N2 +{ + specie + { + nMoles 1; + molWeight 28.0134; + } + equationOfState + { + rhoCoeffs<8> ( 3.8936 -0.016463 3.2101e-05 -2.9174e-08 9.9889e-12 0 0 0 ); + } + thermodynamics + { + Hf 0; + Sf 0; + CpCoeffs<8> ( 979.08 0.41787 -0.0011761 1.6742e-06 -7.2559e-10 0 0 0 ); + } + transport + { + muCoeffs<8> ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 ); + kappaCoeffs<8> ( 0.0031494 8.4997e-05 -1.2621e-08 0 0 0 0 0 ); + } +} + +H2O +{ + specie + { + nMoles 1; + molWeight 18.0153; + } + equationOfState + { + rhoCoeffs<8> ( 2.5039 -0.010587 2.0643e-05 -1.8761e-08 6.4237e-12 0 0 0 ); + } + thermodynamics + { + Hf -13423000; + Sf 10482; + CpCoeffs<8> ( 1563.1 1.604 -0.0029334 3.2168e-06 -1.1571e-09 0 0 0 ); + } + transport + { + muCoeffs<8> ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 ); + kappaCoeffs<8> ( 0.0037972 0.00015336 -1.1859e-08 0 0 0 0 0 ); + } +} + +air +{ + specie + { + nMoles 1; + molWeight 28.85; + } + equationOfState + { + rhoCoeffs<8> ( 4.0097 -0.016954 3.3057e-05 -3.0042e-08 1.0286e-11 0 0 0 ); + } + thermodynamics + { + Hf 0; + Sf 0; + CpCoeffs<8> ( 948.76 0.39171 -0.00095999 1.393e-06 -6.2029e-10 0 0 0 ); + } + transport + { + muCoeffs<8> ( 1.5061e-06 6.16e-08 -1.819e-11 0 0 0 0 0 ); + kappaCoeffs<8> ( 0.0025219 8.506e-05 -1.312e-08 0 0 0 0 0 ); + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/thermophysicalProperties b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/thermophysicalProperties new file mode 100644 index 0000000000000000000000000000000000000000..9b63bc18b377f17d1f016206567f66bcbe76470f --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/thermophysicalProperties @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture reactingMixture; + transport polynomial; + thermo hPolynomial; + energy sensibleEnthalpy; + equationOfState icoPolynomial; + specie specie; +} + +chemistryReader foamChemistryReader; + +foamChemistryFile "$FOAM_CASE/constant/reactions"; + +foamChemistryThermoFile "$FOAM_CASE/constant/thermo.incompressiblePoly"; + +inertSpecie air; + +liquids +{ + H2O + { + defaultCoeffs yes; + } +} + +solids +{ + // none +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/turbulenceProperties b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..aaccd5feb0f9b868f458ca63411e1a59b376d567 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/turbulenceProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RASModel; + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/system/controlDict b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..273cb3b23dc920e6f1e8787c2079eca32eb49d89 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/system/controlDict @@ -0,0 +1,72 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application simpleReactingParcelFoam; + +startFoam latestTime; + +startTime 0; + +stopAt endTime; + +endTime 500; + +deltaT 1; + +writeControl timeStep; + +writeInterval 20; + +purgeWrite 10; + +writeFormat ascii; + +writePrecision 10; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + + +functions +{ + faceSource1 + { + type faceSource; + functionObjectLibs ("libfieldFunctionObjects.so"); + enabled yes; + outputControl outputTime; + log yes; + valueOutput no; + source patch; + sourceName outlet; + operation weightedAverage; + weightField phi; + fields + ( + H2O + T + ); + } +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/system/fvOptions b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/system/fvOptions new file mode 100644 index 0000000000000000000000000000000000000000..82e5c6b4b02bdfa1641c107e64de005db2aa0330 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/system/fvOptions @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvOptions; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// none + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/system/fvSchemes b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..45390e50dc2ef75e9f4782913e654569838ac88c --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/system/fvSchemes @@ -0,0 +1,65 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) bounded Gauss upwind; + div(phid,p) bounded Gauss upwind; + div(phi,K) bounded Gauss linear; + div(phi,h) bounded Gauss upwind; + div(phi,k) bounded Gauss upwind; + div(phi,epsilon) bounded Gauss upwind; + div(phi,omega) bounded Gauss upwind; + div(phi,Yi_h) Gauss upwind; + div((muEff*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear uncorrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default uncorrected; +} + +fluxRequired +{ + default no; + p; +} + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/system/fvSolution b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..a1c90c36c68a11d7c95089c81110e04e06f3cda0 --- /dev/null +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/system/fvSolution @@ -0,0 +1,79 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver GAMG; + + tolerance 0; + relTol 0.05; + + smoother DICGaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + + cacheAgglomeration true; + + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + + maxIter 50; + }; + + "(U|Yi|h|k|omega)" + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 0; + relTol 0.1; + maxIter 20; + } +} + +potentialFlow +{ + nNonOrthogonalCorrectors 5; +} + +SIMPLE +{ + nCorrectors 2; + nNonOrthogonalCorrectors 0; + rhoMin rhoMin [1 -3 0 0 0] 0.1; + rhoMax rhoMax [1 -3 0 0 0] 1.5; +} + +relaxationFactors +{ + fields + { + p 0.3; + rho 1; + } + equations + { + U 0.7; + h 0.7; + ".*" 0.7; + } +} + + +// ************************************************************************* //