diff --git a/applications/solvers/lagrangian/coalChemistryFoam/Make/options b/applications/solvers/lagrangian/coalChemistryFoam/Make/options index b4758dace7..c6daa2b570 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/Make/options +++ b/applications/solvers/lagrangian/coalChemistryFoam/Make/options @@ -14,6 +14,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/solidMixture/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/radiation/lnInclude \ -I$(LIB_SRC)/surfaceFilmModels/lnInclude \ @@ -36,6 +37,7 @@ EXE_LIBS = \ -lsolidMixture \ -lthermophysicalFunctions \ -lreactionThermophysicalModels \ + -lSLGThermo \ -lchemistryModel \ -lradiation \ -lsurfaceFilmModels \ diff --git a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C index 65fb0b616b..5f373cc224 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C +++ b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C @@ -39,11 +39,12 @@ Description #include "hCombustionThermo.H" #include "turbulenceModel.H" #include "basicThermoCloud.H" -#include "CoalCloud.H" +#include "coalCloud.H" #include "psiChemistryModel.H" #include "chemistrySolver.H" #include "timeActivatedExplicitSource.H" #include "radiationModel.H" +#include "SLGThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/lagrangian/coalChemistryFoam/createClouds.H b/applications/solvers/lagrangian/coalChemistryFoam/createClouds.H index dbd7cf9659..5dcfe1df4f 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/createClouds.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/createClouds.H @@ -1,11 +1,11 @@ Info<< "\nConstructing coal cloud" << endl; -thermoCoalCloud coalParcels +coalCloud coalParcels ( "coalCloud1", rho, U, g, - thermo + slgThermo ); Info<< "\nConstructing limestone cloud" << endl; @@ -15,5 +15,5 @@ basicThermoCloud limestoneParcels rho, U, g, - thermo + slgThermo ); diff --git a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H index ea325dabe0..97e409215c 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H @@ -8,6 +8,8 @@ hsCombustionThermo& thermo = chemistry.thermo(); + SLGThermo slgThermo(mesh, thermo); + basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options index 3639d884a2..6e117fc63b 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options @@ -14,6 +14,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/solidMixture/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/radiation/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ @@ -35,6 +36,7 @@ EXE_LIBS = \ -lsolidMixture \ -lthermophysicalFunctions \ -lreactionThermophysicalModels \ + -lSLGThermo \ -lchemistryModel \ -lradiation \ -lODE \ diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createClouds.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createClouds.H index 74a66b63e8..954b74e069 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createClouds.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createClouds.H @@ -1,9 +1,9 @@ Info<< "\nConstructing reacting cloud" << endl; -icoPoly8ThermoReactingMultiphaseCloud parcels +basicReactingMultiphaseCloud parcels ( "reactingCloud1", rho, U, g, - thermo + slgThermo ); diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H index 3ad06c22b3..22d7c1f219 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H @@ -8,6 +8,8 @@ hsReactionThermo& thermo = chemistry.thermo(); + SLGThermo slgThermo(mesh, thermo); + basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C index c16ba1ec1a..35dfc7e616 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C @@ -33,7 +33,6 @@ Description - reacting multiphase parcel cloud - porous media - mass, momentum and energy sources - - polynomial based, incompressible thermodynamics (f(T)) Note: ddtPhiCorr not used here when porous zones are active - not well defined for porous calculations @@ -43,12 +42,13 @@ Description #include "fvCFD.H" #include "hReactionThermo.H" #include "turbulenceModel.H" -#include "BasicReactingMultiphaseCloud.H" +#include "basicReactingMultiphaseCloud.H" #include "rhoChemistryModel.H" #include "chemistrySolver.H" #include "radiationModel.H" #include "porousZones.H" #include "timeActivatedExplicitSource.H" +#include "SLGThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options index 8b15c3e9ae..230a08dfad 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options @@ -1,5 +1,3 @@ -DEV_PATH=./../.. - EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \ @@ -13,6 +11,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/liquidMixture/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/radiation/lnInclude \ -I$(LIB_SRC)/surfaceFilmModels/lnInclude \ @@ -31,6 +30,7 @@ EXE_LIBS = \ -lsolidMixture \ -lthermophysicalFunctions \ -lreactionThermophysicalModels \ + -lSLGThermo \ -lchemistryModel \ -lradiation \ -lsurfaceFilmModels \ diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/createClouds.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/createClouds.H index f3e043143c..c568be12a1 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/createClouds.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/createClouds.H @@ -1,9 +1,9 @@ Info<< "\nConstructing reacting cloud" << endl; -thermoReactingCloud parcels +basicReactingCloud parcels ( "reactingCloud1", rho, U, g, - thermo + slgThermo ); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H index 909d0351f7..2e3208b0ee 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H @@ -8,6 +8,8 @@ hsCombustionThermo& thermo = chemistry.thermo(); + SLGThermo slgThermo(mesh, thermo); + basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C b/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C index f39d8f070a..f788da57e4 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C @@ -33,11 +33,12 @@ Description #include "fvCFD.H" #include "hCombustionThermo.H" #include "turbulenceModel.H" -#include "BasicReactingCloud.H" +#include "basicReactingCloud.H" #include "surfaceFilmModel.H" #include "psiChemistryModel.H" #include "chemistrySolver.H" #include "radiationModel.H" +#include "SLGThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/lagrangian/reactingParcelFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFoam/Make/options index 33d575609b..3954a34ea3 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFoam/Make/options @@ -13,6 +13,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/solidMixture/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/radiation/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ @@ -34,6 +35,7 @@ EXE_LIBS = \ -lsolidMixture \ -lthermophysicalFunctions \ -lreactionThermophysicalModels \ + -lSLGThermo \ -lchemistryModel \ -lradiation \ -lODE \ diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createClouds.H b/applications/solvers/lagrangian/reactingParcelFoam/createClouds.H index f3e043143c..c568be12a1 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/createClouds.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/createClouds.H @@ -1,9 +1,9 @@ Info<< "\nConstructing reacting cloud" << endl; -thermoReactingCloud parcels +basicReactingCloud parcels ( "reactingCloud1", rho, U, g, - thermo + slgThermo ); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H index 0fd631fb7f..089489a014 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H @@ -8,6 +8,8 @@ hsCombustionThermo& thermo = chemistry.thermo(); + SLGThermo slgThermo(mesh, thermo); + basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C index e9f33f6229..38a1bf908e 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C @@ -33,10 +33,11 @@ Description #include "fvCFD.H" #include "hCombustionThermo.H" #include "turbulenceModel.H" -#include "BasicReactingCloud.H" +#include "basicReactingCloud.H" #include "psiChemistryModel.H" #include "chemistrySolver.H" #include "radiationModel.H" +#include "SLGThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/Allwmake b/applications/utilities/mesh/generation/extrudeToRegionMesh/Allwmake deleted file mode 100755 index c19360ac26..0000000000 --- a/applications/utilities/mesh/generation/extrudeToRegionMesh/Allwmake +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # run from this directory - -set -x - -wmake libso nonuniformTransformCyclic -wmake - -# ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/Make/options b/applications/utilities/mesh/generation/extrudeToRegionMesh/Make/options index c00ca0534b..7c1ab5a64a 100644 --- a/applications/utilities/mesh/generation/extrudeToRegionMesh/Make/options +++ b/applications/utilities/mesh/generation/extrudeToRegionMesh/Make/options @@ -1,11 +1,9 @@ EXE_INC = \ - -InonuniformTransformCyclic/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude EXE_LIBS = \ - -lnonuniformTransformCyclic \ -lfiniteVolume \ -lmeshTools \ -ldynamicMesh diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/Make/files b/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/Make/files deleted file mode 100644 index ffacacb4da..0000000000 --- a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/Make/files +++ /dev/null @@ -1,8 +0,0 @@ -fvPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatch.C -pointPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.C -polyPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPolyPatch.C -pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchFields.C -fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFields.C -fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFields.C - -LIB = $(FOAM_LIBBIN)/libnonuniformTransformCyclic diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/Make/options b/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/Make/options deleted file mode 100644 index 71b7873964..0000000000 --- a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/Make/options +++ /dev/null @@ -1,5 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -LIB_LIBS = \ - -lfiniteVolume diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index ec202a76ee..e9103f8020 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -341,13 +341,14 @@ $(basicPolyPatches)/coupled/coupledPolyPatch.C $(basicPolyPatches)/generic/genericPolyPatch.C constraintPolyPatches = $(polyPatches)/constraint -$(constraintPolyPatches)/empty/emptyPolyPatch.C -$(constraintPolyPatches)/symmetry/symmetryPolyPatch.C -$(constraintPolyPatches)/wedge/wedgePolyPatch.C $(constraintPolyPatches)/cyclic/cyclicPolyPatch.C $(constraintPolyPatches)/cyclicSlip/cyclicSlipPolyPatch.C +$(constraintPolyPatches)/empty/emptyPolyPatch.C +$(constraintPolyPatches)/nonuniformTransformCyclic/nonuniformTransformCyclicPolyPatch.C $(constraintPolyPatches)/processorCyclic/processorCyclicPolyPatch.C $(constraintPolyPatches)/processor/processorPolyPatch.C +$(constraintPolyPatches)/symmetry/symmetryPolyPatch.C +$(constraintPolyPatches)/wedge/wedgePolyPatch.C derivedPolyPatches = $(polyPatches)/derived $(derivedPolyPatches)/wall/wallPolyPatch.C @@ -453,13 +454,14 @@ $(basicPointPatches)/coupled/coupledPointPatch.C $(basicPointPatches)/generic/genericPointPatch.C constraintPointPatches = $(pointPatches)/constraint -$(constraintPointPatches)/empty/emptyPointPatch.C -$(constraintPointPatches)/symmetry/symmetryPointPatch.C -$(constraintPointPatches)/wedge/wedgePointPatch.C $(constraintPointPatches)/cyclic/cyclicPointPatch.C $(constraintPointPatches)/cyclicSlip/cyclicSlipPointPatch.C +$(constraintPointPatches)/empty/emptyPointPatch.C +$(constraintPointPatches)/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.C $(constraintPointPatches)/processor/processorPointPatch.C $(constraintPointPatches)/processorCyclic/processorCyclicPointPatch.C +$(constraintPointPatches)/symmetry/symmetryPointPatch.C +$(constraintPointPatches)/wedge/wedgePointPatch.C derivedPointPatches = $(pointPatches)/derived $(derivedPointPatches)/coupled/coupledFacePointPatch.C @@ -520,13 +522,14 @@ $(basicPointPatchFields)/zeroGradient/zeroGradientPointPatchFields.C $(basicPointPatchFields)/mixed/mixedPointPatchFields.C constraintPointPatchFields = $(pointPatchFields)/constraint -$(constraintPointPatchFields)/empty/emptyPointPatchFields.C -$(constraintPointPatchFields)/symmetry/symmetryPointPatchFields.C -$(constraintPointPatchFields)/wedge/wedgePointPatchFields.C $(constraintPointPatchFields)/cyclic/cyclicPointPatchFields.C $(constraintPointPatchFields)/cyclicSlip/cyclicSlipPointPatchFields.C +$(constraintPointPatchFields)/empty/emptyPointPatchFields.C +$(constraintPointPatchFields)/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchFields.C $(constraintPointPatchFields)/processor/processorPointPatchFields.C $(constraintPointPatchFields)/processorCyclic/processorCyclicPointPatchFields.C +$(constraintPointPatchFields)/symmetry/symmetryPointPatchFields.C +$(constraintPointPatchFields)/wedge/wedgePointPatchFields.C derivedPointPatchFields = $(pointPatchFields)/derived $(derivedPointPatchFields)/slip/slipPointPatchFields.C diff --git a/src/OpenFOAM/db/dictionary/dictionary.H b/src/OpenFOAM/db/dictionary/dictionary.H index 7457d1e31f..bb5f186aad 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.H +++ b/src/OpenFOAM/db/dictionary/dictionary.H @@ -38,8 +38,7 @@ Description dictionaries since, unlike the IOdictionary class, it does not use an objectRegistry itself to work. -ToDo - A merge() member function with a non-const dictionary parameter. + To add - a merge() member function with a non-const dictionary parameter? This would avoid unnecessary cloning in the add(entry*, bool) method. SourceFiles diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.C similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.C rename to src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.C diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H rename to src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchField.H diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchFields.C b/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchFields.C similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchFields.C rename to src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchFields.C diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchFields.H b/src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchFields.H similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchFields.H rename to src/OpenFOAM/fields/pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchFields.H diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/pointPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.C similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/pointPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.C rename to src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.C diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/pointPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.H similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/pointPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.H rename to src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.H diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/polyPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPolyPatch.C similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/polyPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPolyPatch.C rename to src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPolyPatch.C diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/polyPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPolyPatch.H similarity index 89% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/polyPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPolyPatch.H rename to src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPolyPatch.H index db79adc4f7..b3d65a67c8 100644 --- a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/polyPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPolyPatch.H @@ -156,6 +156,29 @@ public: ); } + //- Construct and return a clone, resetting the face list + // and boundary mesh + virtual autoPtr clone + ( + const polyBoundaryMesh& bm, + const label index, + const unallocLabelList& mapAddressing, + const label newStart + ) const + { + return autoPtr + ( + new nonuniformTransformCyclicPolyPatch + ( + *this, + bm, + index, + mapAddressing, + newStart + ) + ); + } + // Destructor diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 9c280f9288..21b90fa409 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -16,13 +16,14 @@ $(basicFvPatches)/coupled/coupledFvPatch.C $(basicFvPatches)/generic/genericFvPatch.C constraintFvPatches = $(fvPatches)/constraint -$(constraintFvPatches)/empty/emptyFvPatch.C -$(constraintFvPatches)/symmetry/symmetryFvPatch.C -$(constraintFvPatches)/wedge/wedgeFvPatch.C $(constraintFvPatches)/cyclic/cyclicFvPatch.C $(constraintFvPatches)/cyclicSlip/cyclicSlipFvPatch.C +$(constraintFvPatches)/empty/emptyFvPatch.C +$(constraintFvPatches)/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatch.C $(constraintFvPatches)/processor/processorFvPatch.C $(constraintFvPatches)/processorCyclic/processorCyclicFvPatch.C +$(constraintFvPatches)/symmetry/symmetryFvPatch.C +$(constraintFvPatches)/wedge/wedgeFvPatch.C derivedFvPatches = $(fvPatches)/derived $(derivedFvPatches)/wall/wallFvPatch.C @@ -100,6 +101,7 @@ $(constraintFvPatchFields)/cyclic/cyclicFvPatchFields.C $(constraintFvPatchFields)/cyclicSlip/cyclicSlipFvPatchFields.C $(constraintFvPatchFields)/empty/emptyFvPatchFields.C $(constraintFvPatchFields)/jumpCyclic/jumpCyclicFvPatchFields.C +$(constraintFvPatchFields)/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFields.C $(constraintFvPatchFields)/processor/processorFvPatchFields.C $(constraintFvPatchFields)/processor/processorFvPatchScalarField.C $(constraintFvPatchFields)/processorCyclic/processorCyclicFvPatchFields.C @@ -174,12 +176,12 @@ constraintFvsPatchFields = $(fvsPatchFields)/constraint $(constraintFvsPatchFields)/cyclic/cyclicFvsPatchFields.C $(constraintFvsPatchFields)/cyclicSlip/cyclicSlipFvsPatchFields.C $(constraintFvsPatchFields)/empty/emptyFvsPatchFields.C +$(constraintFvsPatchFields)/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFields.C $(constraintFvsPatchFields)/processor/processorFvsPatchFields.C $(constraintFvsPatchFields)/processorCyclic/processorCyclicFvsPatchFields.C $(constraintFvsPatchFields)/symmetry/symmetryFvsPatchFields.C $(constraintFvsPatchFields)/wedge/wedgeFvsPatchFields.C - fields/volFields/volFields.C fields/surfaceFields/surfaceFields.C diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C index 0fc5dc0cc4..5b608b0fd9 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C @@ -57,18 +57,18 @@ cyclicFvPatchField::cyclicFvPatchField coupledFvPatchField(ptf, p, iF, mapper), cyclicPatch_(refCast(p)) { - if (!isType(this->patch())) + if (!isA(this->patch())) { FatalErrorIn ( - "cyclicFvPatchField::cyclicFvPatchField\n" - "(\n" - " const cyclicFvPatchField& ptf,\n" - " const fvPatch& p,\n" - " const DimensionedField& iF,\n" - " const fvPatchFieldMapper& mapper\n" - ")\n" - ) << "\n patch type '" << p.type() + "cyclicFvPatchField::cyclicFvPatchField" + "(" + "const cyclicFvPatchField& ," + "const fvPatch&, " + "const DimensionedField&, " + "const fvPatchFieldMapper&" + ")" + ) << " patch type '" << p.type() << "' not constraint type '" << typeName << "'" << "\n for patch " << p.name() << " of field " << this->dimensionedInternalField().name() @@ -89,18 +89,18 @@ cyclicFvPatchField::cyclicFvPatchField coupledFvPatchField(p, iF, dict), cyclicPatch_(refCast(p)) { - if (!isType(p)) + if (!isA(p)) { FatalIOErrorIn ( - "cyclicFvPatchField::cyclicFvPatchField\n" - "(\n" - " const fvPatch& p,\n" - " const Field& field,\n" - " const dictionary& dict\n" - ")\n", + "cyclicFvPatchField::cyclicFvPatchField" + "(" + "const fvPatch&, " + "const Field&, " + "const dictionary&" + ")", dict - ) << "\n patch type '" << p.type() + ) << " patch type '" << p.type() << "' not constraint type '" << typeName << "'" << "\n for patch " << p.name() << " of field " << this->dimensionedInternalField().name() diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.C similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.C rename to src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.C diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.H similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.H rename to src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchField.H diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFields.C similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFields.C rename to src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFields.C diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFields.H b/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFields.H similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFields.H rename to src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFields.H diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFieldsFwd.H b/src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFieldsFwd.H similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFieldsFwd.H rename to src/finiteVolume/fields/fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFieldsFwd.H diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.C similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.C rename to src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.C diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.H similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.H rename to src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchField.H diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFields.C b/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFields.C similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFields.C rename to src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFields.C diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFields.H b/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFields.H similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFields.H rename to src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFields.H diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFieldsFwd.H b/src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFieldsFwd.H similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFieldsFwd.H rename to src/finiteVolume/fields/fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFieldsFwd.H diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatch.C similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatch.C rename to src/finiteVolume/fvMesh/fvPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatch.C diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatch.H similarity index 100% rename from applications/utilities/mesh/generation/extrudeToRegionMesh/nonuniformTransformCyclic/fvPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatch.H rename to src/finiteVolume/fvMesh/fvPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatch.H diff --git a/src/lagrangian/coalCombustion/Make/files b/src/lagrangian/coalCombustion/Make/files index e00ab17131..7f710449cf 100644 --- a/src/lagrangian/coalCombustion/Make/files +++ b/src/lagrangian/coalCombustion/Make/files @@ -1,5 +1,6 @@ /* Coal parcel and sub-models */ -CoalParcel/defineCoalParcel.C -CoalParcel/makeCoalParcelSubmodels.C +coalParcel/coalParcel.C +coalParcel/defineCoalParcel.C +coalParcel/makeCoalParcelSubmodels.C LIB = $(FOAM_LIBBIN)/libcoalCombustion diff --git a/src/lagrangian/coalCombustion/Make/options b/src/lagrangian/coalCombustion/Make/options index 00f9ee4f0f..2dabd03766 100644 --- a/src/lagrangian/coalCombustion/Make/options +++ b/src/lagrangian/coalCombustion/Make/options @@ -11,6 +11,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ @@ -32,6 +33,7 @@ LIB_LIBS = \ -lsolids \ -lsolidMixture \ -lreactionThermophysicalModels \ + -lSLGThermo \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lsurfaceFilmModels diff --git a/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.H b/src/lagrangian/coalCombustion/coalCloud/coalCloud.H similarity index 76% rename from src/lagrangian/coalCombustion/CoalCloud/CoalCloud.H rename to src/lagrangian/coalCombustion/coalCloud/coalCloud.H index 2e26fbc0fd..63271a0a79 100644 --- a/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.H +++ b/src/lagrangian/coalCombustion/coalCloud/coalCloud.H @@ -25,29 +25,21 @@ Class CoalCloud Description - Coal cloud templated on the type of carrier phase thermodynamics + Coal cloud \*---------------------------------------------------------------------------*/ -#ifndef CoalCloud_H -#define CoalCloud_H +#ifndef coalCloud_H +#define coalCloud_H #include "ReactingMultiphaseCloud.H" -#include "CoalParcel.H" -#include "thermoPhysicsTypes.H" +#include "coalParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - typedef ReactingMultiphaseCloud > - constThermoCoalCloud; - - typedef ReactingMultiphaseCloud > - thermoCoalCloud; - - typedef ReactingMultiphaseCloud > - icoPoly8ThermoCoalCloud; + typedef ReactingMultiphaseCloud coalCloud; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/coalCombustion/CoalParcel/CoalParcel.C b/src/lagrangian/coalCombustion/coalParcel/coalParcel.C similarity index 72% rename from src/lagrangian/coalCombustion/CoalParcel/CoalParcel.C rename to src/lagrangian/coalCombustion/coalParcel/coalParcel.C index 3c1d517c58..21086b996c 100644 --- a/src/lagrangian/coalCombustion/CoalParcel/CoalParcel.C +++ b/src/lagrangian/coalCombustion/coalParcel/coalParcel.C @@ -23,26 +23,24 @@ License \*---------------------------------------------------------------------------*/ -#include "CoalParcel.H" +#include "coalParcel.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -Foam::CoalParcel::CoalParcel +Foam::coalParcel::coalParcel ( - ReactingMultiphaseCloud >& owner, + ReactingMultiphaseCloud& owner, const vector& position, const label cellI ) : - ReactingMultiphaseParcel >(owner, position, cellI) + ReactingMultiphaseParcel(owner, position, cellI) {} -template -Foam::CoalParcel::CoalParcel +Foam::coalParcel::coalParcel ( - ReactingMultiphaseCloud >& owner, + ReactingMultiphaseCloud& owner, const vector& position, const label cellI, const label typeId, @@ -56,12 +54,10 @@ Foam::CoalParcel::CoalParcel const scalarField& YGas0, const scalarField& YLiquid0, const scalarField& YSolid0, - const typename - ReactingMultiphaseParcel >:: - constantProperties& constProps + const ReactingMultiphaseParcel::constantProperties& constProps ) : - ReactingMultiphaseParcel > + ReactingMultiphaseParcel ( owner, position, @@ -82,22 +78,27 @@ Foam::CoalParcel::CoalParcel {} -template -Foam::CoalParcel::CoalParcel +Foam::coalParcel::coalParcel ( - const Cloud >& cloud, + const Cloud& cloud, Istream& is, bool readFields ) : - ReactingMultiphaseParcel >(cloud, is, readFields) + ReactingMultiphaseParcel(cloud, is, readFields) {} +Foam::coalParcel::coalParcel(const coalParcel& p) +: + ReactingMultiphaseParcel(p) +{ +} + + // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // -template -Foam::CoalParcel::~CoalParcel() +Foam::coalParcel::~coalParcel() {} diff --git a/src/lagrangian/coalCombustion/CoalParcel/CoalParcel.H b/src/lagrangian/coalCombustion/coalParcel/coalParcel.H similarity index 72% rename from src/lagrangian/coalCombustion/CoalParcel/CoalParcel.H rename to src/lagrangian/coalCombustion/coalParcel/coalParcel.H index 54c8077bb2..2904ccbbcf 100644 --- a/src/lagrangian/coalCombustion/CoalParcel/CoalParcel.H +++ b/src/lagrangian/coalCombustion/coalParcel/coalParcel.H @@ -22,19 +22,18 @@ License along with OpenFOAM. If not, see . Class - CoalParcel + coalParcel Description - + Coal parcel class SourceFiles CoalParcel.C - CoalParcelIO.C \*---------------------------------------------------------------------------*/ -#ifndef CoalParcel_H -#define CoalParcel_H +#ifndef coalParcel_H +#define coalParcel_H #include "ReactingMultiphaseParcel.H" @@ -43,42 +42,34 @@ SourceFiles namespace Foam { -// Forward declaration of classes -template -class CoalParcel; - /*---------------------------------------------------------------------------*\ - Class CoalParcel Declaration + Class coalParcel Declaration \*---------------------------------------------------------------------------*/ -template -class CoalParcel +class coalParcel : - public ReactingMultiphaseParcel > + public ReactingMultiphaseParcel { public: - //- The type of thermodynamics this parcel was instantiated for - typedef ThermoType thermoType; - // Run-time type information - TypeName("CoalParcel"); + TypeName("coalParcel"); // Constructors //- Construct from owner, position, and cloud owner // Other properties initialised as null - CoalParcel + coalParcel ( - ReactingMultiphaseCloud& owner, + ReactingMultiphaseCloud& owner, const vector& position, const label cellI ); //- Construct from components - CoalParcel + coalParcel ( - ReactingMultiphaseCloud& owner, + ReactingMultiphaseCloud& owner, const vector& position, const label cellI, const label typeId, @@ -92,28 +83,30 @@ public: const scalarField& YGas0, const scalarField& YLiquid0, const scalarField& YSolid0, - const typename - ReactingMultiphaseParcel:: - constantProperties& constProps + const ReactingMultiphaseParcel::constantProperties& + constProps ); //- Construct from Istream - CoalParcel + coalParcel ( - const Cloud& c, + const Cloud& c, Istream& is, bool readFields = true ); + //- Construct as a copy + coalParcel(const coalParcel& p); + //- Construct and return a clone - autoPtr clone() const + autoPtr clone() const { - return autoPtr(new CoalParcel(*this)); + return autoPtr(new coalParcel(*this)); } //- Destructor - virtual ~CoalParcel(); + virtual ~coalParcel(); }; @@ -123,12 +116,6 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#ifdef NoRepository - #include "CoalParcel.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - #endif // ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/CoalParcel/defineCoalParcel.C b/src/lagrangian/coalCombustion/coalParcel/defineCoalParcel.C similarity index 91% rename from src/lagrangian/coalCombustion/CoalParcel/defineCoalParcel.C rename to src/lagrangian/coalCombustion/coalParcel/defineCoalParcel.C index 5b1ff95cfc..e6aa0453e9 100644 --- a/src/lagrangian/coalCombustion/CoalParcel/defineCoalParcel.C +++ b/src/lagrangian/coalCombustion/coalParcel/defineCoalParcel.C @@ -23,14 +23,14 @@ License \*---------------------------------------------------------------------------*/ -#include "createCoalParcelTypes.H" -#include "CoalParcel.H" +#include "createReactingMultiphaseParcelTypes.H" +#include "coalParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - createCoalParcelType(CoalParcel); + createReactingMultiphaseParcelTypes(coalParcel); }; diff --git a/src/lagrangian/coalCombustion/CoalParcel/makeCoalParcelSubmodels.C b/src/lagrangian/coalCombustion/coalParcel/makeCoalParcelSubmodels.C similarity index 65% rename from src/lagrangian/coalCombustion/CoalParcel/makeCoalParcelSubmodels.C rename to src/lagrangian/coalCombustion/coalParcel/makeCoalParcelSubmodels.C index 649dbe6794..9a92dc377e 100644 --- a/src/lagrangian/coalCombustion/CoalParcel/makeCoalParcelSubmodels.C +++ b/src/lagrangian/coalCombustion/coalParcel/makeCoalParcelSubmodels.C @@ -23,26 +23,26 @@ License \*---------------------------------------------------------------------------*/ -#include "CoalParcel.H" +#include "coalParcel.H" // Kinematic -#include "makeReactingParcelDispersionModels.H" -#include "makeReactingParcelDragModels.H" +#include "makeParcelDispersionModels.H" +#include "makeParcelDragModels.H" #include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant -#include "makeReactingParcelCollisionModels.H" -#include "makeReactingParcelPatchInteractionModels.H" -#include "makeReactingParcelPostProcessingModels.H" +#include "makeParcelCollisionModels.H" +#include "makeParcelPatchInteractionModels.H" +#include "makeParcelPostProcessingModels.H" // Thermodynamic -#include "makeReactingParcelHeatTransferModels.H" +#include "makeParcelHeatTransferModels.H" // Reacting #include "makeReactingMultiphaseParcelCompositionModels.H" // MP variant #include "makeReactingParcelPhaseChangeModels.H" +#include "makeReactingParcelSurfaceFilmModels.H" // Reacting multiphase #include "makeReactingMultiphaseParcelDevolatilisationModels.H" -#include "makeReactingMultiphaseParcelSurfaceFilmModels.H" // Coal specific #include "makeCoalParcelSurfaceReactionModels.H" @@ -52,24 +52,24 @@ License namespace Foam { // Kinematic sub-models - makeReactingDispersionModels(CoalParcel); - makeReactingDragModels(CoalParcel); - makeReactingMultiphaseInjectionModels(CoalParcel); - makeReactingCollisionModels(CoalParcel); - makeReactingPatchInteractionModels(CoalParcel); - makeReactingPostProcessingModels(CoalParcel); + makeParcelDispersionModels(coalParcel); + makeParcelDragModels(coalParcel); + makeReactingMultiphaseParcelInjectionModels(coalParcel); + makeParcelCollisionModels(coalParcel); + makeParcelPatchInteractionModels(coalParcel); + makeParcelPostProcessingModels(coalParcel); // Thermo sub-models - makeReactingHeatTransferModels(CoalParcel); + makeParcelHeatTransferModels(coalParcel); // Reacting sub-models - makeReactingMultiphaseCompositionModels(CoalParcel); - makeReactingPhaseChangeModels(CoalParcel); + makeReactingMultiphaseParcelCompositionModels(coalParcel); + makeReactingParcelPhaseChangeModels(coalParcel); // Reacting multiphase sub-models - makeReactingMultiphaseDevolatilisationModels(CoalParcel); - makeReactingMultiphaseSurfaceFilmModels(CoalParcel); - makeCoalSurfaceReactionModels(CoalParcel); + makeReactingMultiphaseParcelDevolatilisationModels(coalParcel); + makeReactingParcelSurfaceFilmModels(coalParcel); + makeCoalParcelSurfaceReactionModels(coalParcel); }; diff --git a/src/lagrangian/coalCombustion/include/createCoalParcelTypes.H b/src/lagrangian/coalCombustion/include/createCoalParcelTypes.H deleted file mode 100644 index 732159c5a3..0000000000 --- a/src/lagrangian/coalCombustion/include/createCoalParcelTypes.H +++ /dev/null @@ -1,98 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can 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 . - -\*---------------------------------------------------------------------------*/ - -#ifndef createCoalParcelTypes_H -#define createCoalParcelTypes_H - -#include "thermoPhysicsTypes.H" -#include "CoalCloud.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#define createCoalParcelType(ParcelType) \ - \ - createCoalParcelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ - createCoalParcelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - createCoalParcelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define createCoalParcelThermoType(ParcelType, ThermoType) \ - \ - typedef ParcelType ParcelType##ThermoType; \ - \ - defineTemplateTypeNameAndDebug(ParcelType##ThermoType, 0); \ - defineTemplateTypeNameAndDebug(Particle, 0); \ - defineTemplateTypeNameAndDebug(Cloud, 0); \ - \ - defineParcelTypeNameAndDebug(KinematicParcel, 0); \ - defineTemplateTypeNameAndDebug \ - ( \ - KinematicParcel, \ - 0 \ - ); \ - defineParcelTypeNameAndDebug(ThermoParcel, 0); \ - defineTemplateTypeNameAndDebug(ThermoParcel, 0); \ - defineParcelTypeNameAndDebug(ReactingParcel, 0); \ - defineTemplateTypeNameAndDebug(ReactingParcel, 0);\ - defineParcelTypeNameAndDebug \ - ( \ - ReactingMultiphaseParcel, \ - 0 \ - ); \ - defineTemplateTypeNameAndDebug \ - ( \ - ReactingMultiphaseParcel, \ - 0 \ - ); \ - defineParcelTypeNameAndDebug(CoalParcel, 0); \ - defineTemplateTypeNameAndDebug(CoalParcel, 0); \ - \ - defineParcelTypeNameAndDebug(KinematicCloud, 0); \ - defineParcelTypeNameAndDebug(ThermoCloud, 0); \ - defineParcelTypeNameAndDebug(ReactingCloud, 0); \ - defineParcelTypeNameAndDebug \ - ( \ - ReactingMultiphaseCloud, \ - 0 \ - ); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/include/makeCoalParcelSurfaceReactionModels.H b/src/lagrangian/coalCombustion/include/makeCoalParcelSurfaceReactionModels.H index 0f63b37f58..0e06345fb4 100644 --- a/src/lagrangian/coalCombustion/include/makeCoalParcelSurfaceReactionModels.H +++ b/src/lagrangian/coalCombustion/include/makeCoalParcelSurfaceReactionModels.H @@ -28,7 +28,6 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "thermoPhysicsTypes.H" #include "ReactingMultiphaseCloud.H" #include "NoSurfaceReaction.H" @@ -38,59 +37,33 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeCoalSurfaceReactionModels(ParcelType) \ +#define makeCoalParcelSurfaceReactionModels(ParcelType) \ \ - makeCoalSurfaceReactionModelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ - makeCoalSurfaceReactionModelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - makeCoalSurfaceReactionModelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define makeCoalSurfaceReactionModelThermoType(ParcelType, ThermoType) \ + makeSurfaceReactionModel(ReactingMultiphaseCloud); \ \ - makeSurfaceReactionModel \ - ( \ - ReactingMultiphaseCloud > \ - ); \ - \ - makeSurfaceReactionModelThermoType \ + makeSurfaceReactionModelType \ ( \ NoSurfaceReaction, \ ReactingMultiphaseCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeSurfaceReactionModelThermoType \ + makeSurfaceReactionModelType \ ( \ COxidationDiffusionLimitedRate, \ ReactingMultiphaseCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeSurfaceReactionModelThermoType \ + makeSurfaceReactionModelType \ ( \ COxidationKineticDiffusionLimitedRate, \ ReactingMultiphaseCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeSurfaceReactionModelThermoType \ + makeSurfaceReactionModelType \ ( \ COxidationMurphyShaddix, \ ReactingMultiphaseCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C index 71e40a0a64..833566efee 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C @@ -50,10 +50,10 @@ Foam::COxidationDiffusionLimitedRate::COxidationDiffusionLimitedRate CsLocalId_ = owner.composition().localId(idSolid, "C"); // Set local copies of thermo properties - WO2_ = owner.mcCarrierThermo().speciesData()[O2GlobalId_].W(); - scalar WCO2 = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].W(); + WO2_ = owner.thermo().carrier().W(O2GlobalId_); + const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_); WC_ = WCO2 - WO2_; - HcCO2_ = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].Hc(); + HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_); if (Sb_ < 0) { @@ -120,7 +120,7 @@ Foam::scalar Foam::COxidationDiffusionLimitedRate::calculate } // Local mass fraction of O2 in the carrier phase - const scalar YO2 = this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI]; + const scalar YO2 = this->owner().thermo().carrier().Y(O2GlobalId_)[cellI]; // Change in C mass [kg] scalar dmC = diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C index 3fb7d18879..8e3dc2059e 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C @@ -58,10 +58,10 @@ COxidationKineticDiffusionLimitedRate CsLocalId_ = owner.composition().localId(idSolid, "C"); // Set local copies of thermo properties - WO2_ = owner.mcCarrierThermo().speciesData()[O2GlobalId_].W(); - scalar WCO2 = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].W(); + WO2_ = owner.thermo().carrier().W(O2GlobalId_); + const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_); WC_ = WCO2 - WO2_; - HcCO2_ = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].Hc(); + HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_); if (Sb_ < 0) { @@ -128,7 +128,7 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate::calculate } // Local mass fraction of O2 in the carrier phase - const scalar YO2 = this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI]; + const scalar YO2 = this->owner().thermo().carrier().Y(O2GlobalId_)[cellI]; // Diffusion rate coefficient const scalar D0 = C1_/d*pow(0.5*(T + Tc), 0.75); diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C index 48e0ad37aa..4030f6d93c 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C @@ -69,8 +69,8 @@ Foam::COxidationMurphyShaddix::COxidationMurphyShaddix CsLocalId_ = owner.composition().localId(idSolid, "C"); // Set local copies of thermo properties - WO2_ = owner.mcCarrierThermo().speciesData()[O2GlobalId_].W(); - scalar WCO2 = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].W(); + WO2_ = owner.thermo().carrier().W(O2GlobalId_); + const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_); WC_ = WCO2 - WO2_; } @@ -125,7 +125,7 @@ Foam::scalar Foam::COxidationMurphyShaddix::calculate // Cell carrier phase O2 species density [kg/m^3] const scalar rhoO2 = - rhoc*this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI]; + rhoc*this->owner().thermo().carrier().Y(O2GlobalId_)[cellI]; if (rhoO2 < SMALL) { @@ -207,10 +207,8 @@ Foam::scalar Foam::COxidationMurphyShaddix::calculate const scalar HC = this->owner().composition().solids().properties()[CsLocalId_].Hf() + this->owner().composition().solids().properties()[CsLocalId_].cp()*T; - const scalar HCO2 = - this->owner().mcCarrierThermo().speciesData()[CO2GlobalId_].H(T); - const scalar HO2 = - this->owner().mcCarrierThermo().speciesData()[O2GlobalId_].H(T); + const scalar HCO2 = this->owner().thermo().carrier().H(CO2GlobalId_, T); + const scalar HO2 = this->owner().thermo().carrier().H(O2GlobalId_, T); // Heat of reaction return dOmega*(WC_*HC + WO2_*HO2 - (WC_ + WO2_)*HCO2); diff --git a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/ORourke/sameCell.H b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/ORourke/sameCell.H index 84b96ab88d..dd66d1d3dd 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/ORourke/sameCell.H +++ b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/ORourke/sameCell.H @@ -13,7 +13,8 @@ spray::iterator pMax = p2; scalar dMin = pMin().d(); scalar dMax = pMax().d(); -if (dMin > dMax) { +if (dMin > dMax) +{ dMin = pMax().d(); dMax = pMin().d(); pMin = p2; @@ -31,13 +32,14 @@ scalar nMin = pMin().N(rhoMin); scalar mdMin = mMin/nMin; -scalar nu0 = 0.25*constant::mathematical::pi*sumD*sumD*magVRel*dt/vols_[cell1]; +scalar nu0 = 0.25*constant::mathematical::pi*sqr(sumD)*magVRel*dt/vols_[cell1]; scalar nu = nMin*nu0; scalar collProb = exp(-nu); scalar xx = rndGen_.scalar01(); -// collision occur -if (( xx > collProb) && (mMin > VSMALL) && (mMax > VSMALL)) { +if ((xx > collProb) && (mMin > VSMALL) && (mMax > VSMALL)) +{ + // collision occurs scalar gamma = dMax/max(dMin, 1.0e-12); scalar f = gamma*gamma*gamma + 2.7*gamma - 2.4*gamma*gamma; @@ -63,8 +65,8 @@ if (( xx > collProb) && (mMin > VSMALL) && (mMax > VSMALL)) { scalar prob = rndGen_.scalar01(); // Coalescence - if ( prob < coalesceProb && coalescence_) { - + if (prob < coalesceProb && coalescence_) + { // How 'many' of the droplets coalesce // This is the kiva way ... which actually works best @@ -73,14 +75,17 @@ if (( xx > collProb) && (mMin > VSMALL) && (mMax > VSMALL)) { label n=2; // xx > collProb=zz - while ((zz < xx) && (n<1000)) { + while ((zz < xx) && (n<1000)) + { zz += vnu; vnu *= nu/n; + n++; } - //Info<< "vnu = " << vnu << ", n = " << n << endl; scalar nProb = n - 1; + // All droplets coalesce - if (nProb*nMax > nMin) { + if (nProb*nMax > nMin) + { nProb = nMin/nMax; } @@ -93,7 +98,7 @@ if (( xx > collProb) && (mMin > VSMALL) && (mMax > VSMALL)) { pMax().T() = (averageTemp*mTot - newMinMass*pMin().T())/newMaxMass; rhoMax = spray_.fuels().rho(pc, pMax().T(), pMax().X()); - scalar d3 = pow(dMax, 3) + nProb*pow(dMin,3); + scalar d3 = pow3(dMax) + nProb*pow3(dMin); pMax().d() = cbrt(d3); pMax().U() = (momMax + (1.0-newMinMass/mMin)*momMin)/newMaxMass; @@ -110,14 +115,15 @@ if (( xx > collProb) && (mMin > VSMALL) && (mMax > VSMALL)) { { pMax().X()[i] = Ynew[i]/(spray_.fuels().properties()[i].W()*Wlinv); } - } - // Grazing collision (no coalescence) - else { + else + { + // Grazing collision (no coalescence) scalar gf = sqrt(prob) - sqrt(coalesceProb); scalar denom = 1.0 - sqrt(coalesceProb); - if (denom < 1.0e-5) { + if (denom < 1.0e-5) + { denom = 1.0; } gf /= denom; @@ -139,16 +145,16 @@ if (( xx > collProb) && (mMin > VSMALL) && (mMax > VSMALL)) { vector v1p = (mr + m2*gf*vRel)/(m1+m2); vector v2p = (mr - m1*gf*vRel)/(m1+m2); - if (n1 < n2) { + if (n1 < n2) + { p1().U() = v1p; p2().U() = (n1*v2p + (n2-n1)*v2)/n2; } - else { + else + { p1().U() = (n2*v1p + (n1-n2)*v1)/n1; p2().U() = v2p; } - - } // if - coalescence or not - -} // if - collision + } +} diff --git a/src/lagrangian/intermediate/Make/files b/src/lagrangian/intermediate/Make/files index 8ac0c9f1b6..068400f0d7 100644 --- a/src/lagrangian/intermediate/Make/files +++ b/src/lagrangian/intermediate/Make/files @@ -33,13 +33,15 @@ $(THERMOPARCEL)/makeBasicThermoParcelSubmodels.C /* reacting parcel sub-models */ -REACTINGPARCEL=$(DERIVEDPARCELS)/BasicReactingParcel +REACTINGPARCEL=$(DERIVEDPARCELS)/basicReactingParcel +$(REACTINGPARCEL)/basicReactingParcel.C $(REACTINGPARCEL)/defineBasicReactingParcel.C $(REACTINGPARCEL)/makeBasicReactingParcelSubmodels.C /* reacting multiphase parcel sub-models */ -REACTINGMPPARCEL=$(DERIVEDPARCELS)/BasicReactingMultiphaseParcel +REACTINGMPPARCEL=$(DERIVEDPARCELS)/basicReactingMultiphaseParcel +$(REACTINGMPPARCEL)/basicReactingMultiphaseParcel.C $(REACTINGMPPARCEL)/defineBasicReactingMultiphaseParcel.C $(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelSubmodels.C @@ -49,9 +51,6 @@ RADIATION=submodels/addOns/radiation $(RADIATION)/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C $(RADIATION)/scatter/cloudScatter/cloudScatter.C -SURFACEFILM=submodels/addOns/surfaceFilmModel -$(SURFACEFILM)/injection/cloudInjection/cloudInjection.C - submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.C KINEMATICINJECTION=submodels/Kinematic/InjectionModel diff --git a/src/lagrangian/intermediate/Make/options b/src/lagrangian/intermediate/Make/options index c67687c84e..5625914e28 100644 --- a/src/lagrangian/intermediate/Make/options +++ b/src/lagrangian/intermediate/Make/options @@ -10,6 +10,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ @@ -19,7 +20,6 @@ EXE_INC = \ -I$(LIB_SRC)/surfaceFilmModels/lnInclude LIB_LIBS = \ - -lsurfaceFilmModels \ -lfiniteVolume \ -lmeshTools \ -llagrangian \ @@ -31,8 +31,10 @@ LIB_LIBS = \ -lspecie \ -lbasicThermophysicalModels \ -lreactionThermophysicalModels \ + -lSLGThermo \ -lchemistryModel \ -lradiation \ -lODE \ -lcompressibleRASModels \ - -lcompressibleLESModels + -lcompressibleLESModels \ + -lsurfaceFilmModels diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C index bb04cd20c4..fec5e02ea3 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C @@ -67,9 +67,9 @@ void Foam::ReactingCloud::preEvolve() template void Foam::ReactingCloud::evolveCloud() { - const volScalarField& T = this->carrierThermo().T(); - const volScalarField cp = this->carrierThermo().Cp(); - const volScalarField& p = this->carrierThermo().p(); + const volScalarField& T = this->thermo().thermo().T(); + const volScalarField cp = this->thermo().thermo().Cp(); + const volScalarField& p = this->thermo().thermo().p(); autoPtr > rhoInterp = interpolation::New ( @@ -149,17 +149,13 @@ Foam::ReactingCloud::ReactingCloud const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - basicThermo& thermo, + const SLGThermo& thermo, bool readFields ) : ThermoCloud(cloudName, rho, U, g, thermo, false), reactingCloud(), constProps_(this->particleProperties()), - mcCarrierThermo_ - ( - dynamic_cast&>(thermo) - ), compositionModel_ ( CompositionModel >::New @@ -176,12 +172,13 @@ Foam::ReactingCloud::ReactingCloud *this ) ), - rhoTrans_(mcCarrierThermo_.species().size()), + rhoTrans_(thermo.carrier().species().size()), dMassPhaseChange_(0.0) { // Set storage for mass source fields and initialise to zero forAll(rhoTrans_, i) { + const word& specieName = thermo.carrier().species()[i]; rhoTrans_.set ( i, @@ -189,7 +186,7 @@ Foam::ReactingCloud::ReactingCloud ( IOobject ( - this->name() + "rhoTrans_" + mcCarrierThermo_.species()[i], + this->name() + "rhoTrans_" + specieName, this->db().time().timeName(), this->db(), IOobject::NO_READ, diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H index 1c380a37f9..38b33eab48 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H @@ -42,7 +42,6 @@ SourceFiles #include "ThermoCloud.H" #include "reactingCloud.H" -#include "multiComponentMixture.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -67,11 +66,6 @@ class ReactingCloud public ThermoCloud, public reactingCloud { -public: - - //- Type of thermodynamics the cloud was instantiated for - typedef typename ParcelType::thermoType thermoType; - private: @@ -91,9 +85,6 @@ protected: //- Parcel constant properties typename ParcelType::constantProperties constProps_; - //- Multi-component carrier phase thermo - multiComponentMixture& mcCarrierThermo_; - // References to the cloud sub-models @@ -154,7 +145,7 @@ public: const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - basicThermo& thermo, + const SLGThermo& thermo, bool readFields = true ); @@ -175,13 +166,6 @@ public: inline const typename ParcelType::constantProperties& constProps() const; - //- Return const access to multi-component carrier phase thermo - inline const multiComponentMixture& - mcCarrierThermo() const; - - //- Return access to multi-component carrier phase thermo - inline multiComponentMixture& mcCarrierThermo(); - // Sub-models diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H index e68f44dba4..bc859a9060 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H @@ -33,22 +33,6 @@ Foam::ReactingCloud::constProps() const } -template -inline const Foam::multiComponentMixture& -Foam::ReactingCloud::mcCarrierThermo() const -{ - return mcCarrierThermo_; -} - - -template -inline Foam::multiComponentMixture& -Foam::ReactingCloud::mcCarrierThermo() -{ - return mcCarrierThermo_; -} - - template inline const Foam::CompositionModel >& Foam::ReactingCloud::composition() const diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C index cd9d597b71..954f048634 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C @@ -40,9 +40,9 @@ void Foam::ReactingMultiphaseCloud::preEvolve() template void Foam::ReactingMultiphaseCloud::evolveCloud() { - const volScalarField& T = this->carrierThermo().T(); - const volScalarField cp = this->carrierThermo().Cp(); - const volScalarField& p = this->carrierThermo().p(); + const volScalarField& T = this->thermo().thermo().T(); + const volScalarField cp = this->thermo().thermo().Cp(); + const volScalarField& p = this->thermo().thermo().p(); autoPtr > rhoInterp = interpolation::New ( @@ -122,7 +122,7 @@ Foam::ReactingMultiphaseCloud::ReactingMultiphaseCloud const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - basicThermo& thermo, + const SLGThermo& thermo, bool readFields ) : diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H index a6b4de3de6..efd1eaab8e 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H @@ -136,7 +136,7 @@ public: const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - basicThermo& thermo, + const SLGThermo& thermo, bool readFields = true ); diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C index deb2fa3daa..96d6d59b8a 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C @@ -41,8 +41,8 @@ void Foam::ThermoCloud::preEvolve() template void Foam::ThermoCloud::evolveCloud() { - const volScalarField& T = carrierThermo_.T(); - const volScalarField cp = carrierThermo_.Cp(); + const volScalarField& T = thermo_.thermo().T(); + const volScalarField cp = thermo_.thermo().Cp(); autoPtr > rhoInterp = interpolation::New ( @@ -115,7 +115,7 @@ Foam::ThermoCloud::ThermoCloud const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - basicThermo& thermo, + const SLGThermo& thermo, bool readFields ) : @@ -124,13 +124,13 @@ Foam::ThermoCloud::ThermoCloud cloudName, rho, U, - thermo.mu(), + thermo.thermo().mu(), g, false ), thermoCloud(), constProps_(this->particleProperties()), - carrierThermo_(thermo), + thermo_(thermo), heatTransferModel_ ( HeatTransferModel >::New diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H index 1450f8f10c..0f7c8afb23 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H @@ -41,7 +41,7 @@ SourceFiles #include "KinematicCloud.H" #include "thermoCloud.H" -#include "basicThermo.H" +#include "SLGThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -82,8 +82,8 @@ protected: // References to the carrier gas fields - //- Thermodynamics package (basic) - basicThermo& carrierThermo_; + //- SLG thermodynamics package + const SLGThermo& thermo_; // References to the cloud sub-models @@ -136,7 +136,7 @@ public: const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - basicThermo& thermo, + const SLGThermo& thermo, bool readFields = true ); @@ -158,10 +158,7 @@ public: constProps() const; //- Return const access to thermo package - inline const basicThermo& carrierThermo() const; - - //- Return access to thermo package - inline basicThermo& carrierThermo(); + inline const SLGThermo& thermo() const; // Sub-models diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H index 83e0f5708d..a8907205ce 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H @@ -38,18 +38,9 @@ Foam::ThermoCloud::constProps() const template -inline const Foam::basicThermo& -Foam::ThermoCloud::carrierThermo() const +inline const Foam::SLGThermo& Foam::ThermoCloud::thermo() const { - return carrierThermo_; -} - - -template -inline Foam::basicThermo& -Foam::ThermoCloud::carrierThermo() -{ - return carrierThermo_; + return thermo_; } diff --git a/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.H b/src/lagrangian/intermediate/clouds/derived/basicReactingCloud/basicReactingCloud.H similarity index 73% rename from src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.H rename to src/lagrangian/intermediate/clouds/derived/basicReactingCloud/basicReactingCloud.H index 27159c7133..e9057ac69c 100644 --- a/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.H +++ b/src/lagrangian/intermediate/clouds/derived/basicReactingCloud/basicReactingCloud.H @@ -22,35 +22,27 @@ License along with OpenFOAM. If not, see . Class - Foam::BasicReactingCloud + Foam::basicReactingCloud Description - Reacting cloud templated on the type of carrier phase thermodynamics + Cloud class to introduce reacting parcels SourceFiles BasicReactingCloud.C \*---------------------------------------------------------------------------*/ -#ifndef BasicReactingCloud_H -#define BasicReactingCloud_H +#ifndef basicReactingCloud_H +#define basicReactingCloud_H #include "ReactingCloud.H" -#include "BasicReactingParcel.H" -#include "thermoPhysicsTypes.H" +#include "basicReactingParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - typedef ReactingCloud > - constThermoReactingCloud; - - typedef ReactingCloud > - thermoReactingCloud; - - typedef ReactingCloud > - icoPoly8ThermoReactingCloud; + typedef ReactingCloud basicReactingCloud; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.H b/src/lagrangian/intermediate/clouds/derived/basicReactingMultiphaseCloud/basicReactingMultiphaseCloud.H similarity index 64% rename from src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.H rename to src/lagrangian/intermediate/clouds/derived/basicReactingMultiphaseCloud/basicReactingMultiphaseCloud.H index 8f14d51721..f56c60d1fa 100644 --- a/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.H +++ b/src/lagrangian/intermediate/clouds/derived/basicReactingMultiphaseCloud/basicReactingMultiphaseCloud.H @@ -22,20 +22,18 @@ License along with OpenFOAM. If not, see . Class - Foam::BasicReactingMultiphaseCloud + Foam::basicReactingMultiphaseCloud Description - Reacting multiphase cloud templated on the type of carrier phase - thermodynamics + Cloud class to introduce multi-phase reacting parcels \*---------------------------------------------------------------------------*/ -#ifndef BasicReactingMultiphaseCloud_H -#define BasicReactingMultiphaseCloud_H +#ifndef basicReactingMultiphaseCloud_H +#define basicReactingMultiphaseCloud_H #include "ReactingMultiphaseCloud.H" -#include "BasicReactingMultiphaseParcel.H" -#include "thermoPhysicsTypes.H" +#include "basicReactingMultiphaseParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -43,30 +41,9 @@ namespace Foam { typedef ReactingMultiphaseCloud < - BasicReactingMultiphaseParcel - < - constGasThermoPhysics - > + basicReactingMultiphaseParcel > - constThermoReactingMultiphaseCloud; - - typedef ReactingMultiphaseCloud - < - BasicReactingMultiphaseParcel - < - gasThermoPhysics - > - > - thermoReactingMultiphaseCloud; - - typedef ReactingMultiphaseCloud - < - BasicReactingMultiphaseParcel - < - icoPoly8ThermoPhysics - > - > - icoPoly8ThermoReactingMultiphaseCloud; + basicReactingMultiphaseCloud; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C index 6ff07adc81..1deed776b9 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C @@ -170,8 +170,7 @@ void Foam::ReactingMultiphaseParcel::cellValueSourceCorrection forAll(td.cloud().rhoTrans(), i) { scalar Y = td.cloud().rhoTrans(i)[cellI]/addedMass; - cpEff += - Y*td.cloud().mcCarrierThermo().speciesData()[i].Cp(this->Tc_); + cpEff += Y*td.cloud().thermo().carrier().Cp(i, this->Tc_); } } const scalar cpc = td.cpInterp().psi()[cellI]; @@ -247,7 +246,7 @@ void Foam::ReactingMultiphaseParcel::calc scalar NCpW = 0.0; // Surface concentrations of emitted species - scalarField Cs(td.cloud().mcCarrierThermo().species().size(), 0.0); + scalarField Cs(td.cloud().composition().carrier().species().size(), 0.0); // Calc mass and enthalpy transfer due to phase change calcPhaseChange @@ -313,7 +312,7 @@ void Foam::ReactingMultiphaseParcel::calc scalarField dMassSRCarrier ( - td.cloud().mcCarrierThermo().species().size(), + td.cloud().composition().carrier().species().size(), 0.0 ); @@ -547,8 +546,8 @@ void Foam::ReactingMultiphaseParcel::calcDevolatilisation const scalar beta = sqr(cbrt(15.0) + cbrt(15.0)); const label id = td.cloud().composition().localToGlobalCarrierId(GAS, i); - const scalar Cp = td.cloud().mcCarrierThermo().speciesData()[id].Cp(Ts); - const scalar W = td.cloud().mcCarrierThermo().speciesData()[id].W(); + const scalar Cp = td.cloud().thermo().carrier().Cp(id, Ts); + const scalar W = td.cloud().thermo().carrier().W(id); const scalar Ni = dMassDV[i]/(this->areaS(d)*dt*W); // Dab calc'd using API vapour mass diffusivity function diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C index 08d614ff9b..fa5f3f5ede 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C @@ -89,8 +89,7 @@ void Foam::ReactingParcel::cellValueSourceCorrection forAll(td.cloud().rhoTrans(), i) { scalar Y = td.cloud().rhoTrans(i)[cellI]/addedMass; - cpEff += - Y*td.cloud().mcCarrierThermo().speciesData()[i].Cp(this->Tc_); + cpEff += Y*td.cloud().composition().carrier().Cp(i, this->Tc_); } } const scalar cpc = td.cpInterp().psi()[cellI]; @@ -121,13 +120,13 @@ void Foam::ReactingParcel::correctSurfaceValues } // Far field carrier molar fractions - scalarField Xinf(td.cloud().mcCarrierThermo().speciesData().size()); + scalarField Xinf(td.cloud().thermo().carrier().species().size()); forAll(Xinf, i) { Xinf[i] = - td.cloud().mcCarrierThermo().Y(i)[cellI] - /td.cloud().mcCarrierThermo().speciesData()[i].W(); + td.cloud().thermo().carrier().Y(i)[cellI] + /td.cloud().thermo().carrier().W(i); } Xinf /= sum(Xinf); @@ -149,7 +148,7 @@ void Foam::ReactingParcel::correctSurfaceValues const scalar Csi = Cs[i] + Xsff*Xinf[i]*CsTot; Xs[i] = (2.0*Csi + Xinf[i]*CsTot)/3.0; - Ys[i] = Xs[i]*td.cloud().mcCarrierThermo().speciesData()[i].W(); + Ys[i] = Xs[i]*td.cloud().thermo().carrier().W(i); } Xs /= sum(Xs); Ys /= sum(Ys); @@ -164,16 +163,13 @@ void Foam::ReactingParcel::correctSurfaceValues forAll(Ys, i) { - const scalar sqrtW = - sqrt(td.cloud().mcCarrierThermo().speciesData()[i].W()); - const scalar cbrtW = - cbrt(td.cloud().mcCarrierThermo().speciesData()[i].W()); + const scalar sqrtW = sqrt(td.cloud().thermo().carrier().W(i)); + const scalar cbrtW = cbrt(td.cloud().thermo().carrier().W(i)); - rhos += Xs[i]*td.cloud().mcCarrierThermo().speciesData()[i].W(); - mus += Ys[i]*sqrtW*td.cloud().mcCarrierThermo().speciesData()[i].mu(T); - kappa += - Ys[i]*cbrtW*td.cloud().mcCarrierThermo().speciesData()[i].kappa(T); - cps += Xs[i]*td.cloud().mcCarrierThermo().speciesData()[i].Cp(T); + rhos += Xs[i]*td.cloud().thermo().carrier().W(i); + mus += Ys[i]*sqrtW*td.cloud().thermo().carrier().mu(i, T); + kappa += Ys[i]*cbrtW*td.cloud().thermo().carrier().kappa(i, T); + cps += Xs[i]*td.cloud().thermo().carrier().Cp(i, T); sumYiSqrtW += Ys[i]*sqrtW; sumYiCbrtW += Ys[i]*cbrtW; @@ -267,7 +263,7 @@ void Foam::ReactingParcel::calc scalar NCpW = 0.0; // Surface concentrations of emitted species - scalarField Cs(td.cloud().mcCarrierThermo().species().size(), 0.0); + scalarField Cs(td.cloud().composition().carrier().species().size(), 0.0); // Calc mass and enthalpy transfer due to phase change calcPhaseChange @@ -416,10 +412,10 @@ void Foam::ReactingParcel::calcPhaseChange scalarField& Cs ) { - typedef PhaseChangeModel - < - typename ReactingParcel::trackData::cloudType - > phaseChangeModelType; + typedef typename ReactingParcel::trackData::cloudType cloudType; + typedef PhaseChangeModel phaseChangeModelType; + const CompositionModel& composition = td.cloud().composition(); + if ( @@ -458,9 +454,8 @@ void Foam::ReactingParcel::calcPhaseChange forAll(YComponents, i) { - const label idc = - td.cloud().composition().localToGlobalCarrierId(idPhase, i); - const label idl = td.cloud().composition().globalIds(idPhase)[i]; + const label idc = composition.localToGlobalCarrierId(idPhase, i); + const label idl = composition.globalIds(idPhase)[i]; // Calculate enthalpy transfer if @@ -469,28 +464,25 @@ void Foam::ReactingParcel::calcPhaseChange == phaseChangeModelType::etLatentHeat ) { - scalar hlp = - td.cloud().composition().liquids().properties()[idl].hl(pc_, T); + scalar hlp = composition.liquids().properties()[idl].hl(pc_, T); Sh -= dMassPC[i]*hlp/dt; } else { // Note: enthalpies of both phases must use the same reference - scalar hc = td.cloud().mcCarrierThermo().speciesData()[idc].H(T); - scalar hp = - td.cloud().composition().liquids().properties()[idl].h(pc_, T); + scalar hc = composition.carrier().H(idc, T); + scalar hp = composition.liquids().properties()[idl].h(pc_, T); Sh -= dMassPC[i]*(hc - hp)/dt; } // Update particle surface thermo properties const scalar Dab = - td.cloud().composition().liquids().properties()[idl].D(pc_, Ts, Wc); + composition.liquids().properties()[idl].D(pc_, Ts, Wc); - const scalar Cp = - td.cloud().mcCarrierThermo().speciesData()[idc].Cp(Ts); - const scalar W = td.cloud().mcCarrierThermo().speciesData()[idc].W(); + const scalar Cp = composition.carrier().Cp(idc, Ts); + const scalar W = composition.carrier().W(idc); const scalar Ni = dMassPC[i]/(this->areaS(d)*dt*W); // Molar flux of species coming from the particle (kmol/m^2/s) diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelSubmodels.C b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelSubmodels.C index 002e2eb66a..d6c2d4532e 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelSubmodels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelSubmodels.C @@ -32,7 +32,7 @@ License #include "makeParcelCollisionModels.H" #include "makeParcelPatchInteractionModels.H" #include "makeParcelPostProcessingModels.H" -#include "makeKinematicParcelSurfaceFilmModels.H" +#include "makeParcelSurfaceFilmModels.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,7 +45,7 @@ namespace Foam makeParcelCollisionModels(basicKinematicParcel); makeParcelPatchInteractionModels(basicKinematicParcel); makeParcelPostProcessingModels(basicKinematicParcel); - makeKinematicParcelSurfaceFilmModels(basicKinematicParcel); + makeParcelSurfaceFilmModels(basicKinematicParcel); }; diff --git a/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/BasicReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.C similarity index 64% rename from src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/BasicReactingMultiphaseParcel.C rename to src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.C index 849575b92f..56359e0d96 100644 --- a/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/BasicReactingMultiphaseParcel.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.C @@ -23,19 +23,18 @@ License \*---------------------------------------------------------------------------*/ -#include "BasicReactingMultiphaseParcel.H" +#include "basicReactingMultiphaseParcel.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -Foam::BasicReactingMultiphaseParcel::BasicReactingMultiphaseParcel +Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel ( - ReactingMultiphaseCloud >& owner, + ReactingMultiphaseCloud& owner, const vector& position, const label cellI ) : - ReactingMultiphaseParcel > + ReactingMultiphaseParcel ( owner, position, @@ -44,10 +43,9 @@ Foam::BasicReactingMultiphaseParcel::BasicReactingMultiphaseParcel {} -template -Foam::BasicReactingMultiphaseParcel::BasicReactingMultiphaseParcel +Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel ( - ReactingMultiphaseCloud >& owner, + ReactingMultiphaseCloud& owner, const vector& position, const label cellI, const label typeId, @@ -61,12 +59,11 @@ Foam::BasicReactingMultiphaseParcel::BasicReactingMultiphaseParcel const scalarField& YLiquid0, const scalarField& YSolid0, const scalarField& Y0, - const typename - ReactingMultiphaseParcel:: + const ReactingMultiphaseParcel:: constantProperties& constProps ) : - ReactingMultiphaseParcel > + ReactingMultiphaseParcel ( owner, position, @@ -87,15 +84,14 @@ Foam::BasicReactingMultiphaseParcel::BasicReactingMultiphaseParcel {} -template -Foam::BasicReactingMultiphaseParcel::BasicReactingMultiphaseParcel +Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel ( - const Cloud >& cloud, + const Cloud& cloud, Istream& is, bool readFields ) : - ReactingMultiphaseParcel > + ReactingMultiphaseParcel ( cloud, is, @@ -104,21 +100,18 @@ Foam::BasicReactingMultiphaseParcel::BasicReactingMultiphaseParcel {} -template -Foam::BasicReactingMultiphaseParcel::BasicReactingMultiphaseParcel +Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel ( - const BasicReactingMultiphaseParcel& p + const basicReactingMultiphaseParcel& p ) : - ReactingMultiphaseParcel >(p) + ReactingMultiphaseParcel(p) {} // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // -template -Foam::BasicReactingMultiphaseParcel:: -~BasicReactingMultiphaseParcel() +Foam::basicReactingMultiphaseParcel::~basicReactingMultiphaseParcel() {} diff --git a/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/BasicReactingMultiphaseParcel.H b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.H similarity index 67% rename from src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/BasicReactingMultiphaseParcel.H rename to src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.H index cc50ae66d1..6cc9d2f535 100644 --- a/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/BasicReactingMultiphaseParcel.H +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.H @@ -28,13 +28,13 @@ Description SourceFiles - BasicReactingMultiphaseParcel.C - BasicReactingMultiphaseParcelIO.C + basicReactingMultiphaseParcel.C + basicReactingMultiphaseParcelIO.C \*---------------------------------------------------------------------------*/ -#ifndef BasicReactingMultiphaseParcel_H -#define BasicReactingMultiphaseParcel_H +#ifndef basicReactingMultiphaseParcel_H +#define basicReactingMultiphaseParcel_H #include "ReactingMultiphaseParcel.H" @@ -44,43 +44,35 @@ SourceFiles namespace Foam { -// Forward declaration of classes -template -class BasicReactingMultiphaseParcel; - /*---------------------------------------------------------------------------*\ - Class BasicReactingMultiphaseParcel Declaration + Class basicReactingMultiphaseParcel Declaration \*---------------------------------------------------------------------------*/ -template -class BasicReactingMultiphaseParcel +class basicReactingMultiphaseParcel : - public ReactingMultiphaseParcel > + public ReactingMultiphaseParcel { public: - //- The type of thermodynamics this parcel was instantiated for - typedef ThermoType thermoType; - //- Run-time type information - TypeName("BasicReactingMultiphaseParcel"); + TypeName("basicReactingMultiphaseParcel"); // Constructors //- Construct from owner, position, and cloud owner // Other properties initialised as null - BasicReactingMultiphaseParcel + basicReactingMultiphaseParcel ( - ReactingMultiphaseCloud& owner, + ReactingMultiphaseCloud& owner, const vector& position, const label cellI ); //- Construct from components - BasicReactingMultiphaseParcel + basicReactingMultiphaseParcel ( - ReactingMultiphaseCloud& owner, + ReactingMultiphaseCloud& owner, const vector& position, const label cellI, const label typeId, @@ -94,35 +86,34 @@ public: const scalarField& YLiquid0, const scalarField& YSolid0, const scalarField& Y0, - const typename - ReactingMultiphaseParcel:: + const ReactingMultiphaseParcel:: constantProperties& constProps ); //- Construct from Istream - BasicReactingMultiphaseParcel + basicReactingMultiphaseParcel ( - const Cloud& c, + const Cloud& c, Istream& is, bool readFields = true ); //- Construct as a copy - BasicReactingMultiphaseParcel(const BasicReactingMultiphaseParcel& p); + basicReactingMultiphaseParcel(const basicReactingMultiphaseParcel& p); //- Construct and return a clone - autoPtr clone() const + autoPtr clone() const { return - autoPtr + autoPtr ( - new BasicReactingMultiphaseParcel(*this) + new basicReactingMultiphaseParcel(*this) ); } //- Destructor - virtual ~BasicReactingMultiphaseParcel(); + virtual ~basicReactingMultiphaseParcel(); }; @@ -132,12 +123,6 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#ifdef NoRepository - #include "BasicReactingMultiphaseParcel.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - #endif // ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C similarity index 92% rename from src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C rename to src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C index cbcc47926a..3c3e9fe8fa 100644 --- a/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C @@ -24,13 +24,13 @@ License \*---------------------------------------------------------------------------*/ #include "createReactingMultiphaseParcelTypes.H" -#include "BasicReactingMultiphaseParcel.H" +#include "basicReactingMultiphaseParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - createReactingMultiphaseParcelType(BasicReactingMultiphaseParcel); + createReactingMultiphaseParcelTypes(basicReactingMultiphaseParcel); }; diff --git a/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSubmodels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSubmodels.C similarity index 59% rename from src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSubmodels.C rename to src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSubmodels.C index b33358db3f..490d99b116 100644 --- a/src/lagrangian/intermediate/parcels/derived/BasicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSubmodels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSubmodels.C @@ -23,26 +23,26 @@ License \*---------------------------------------------------------------------------*/ -#include "BasicReactingMultiphaseParcel.H" +#include "basicReactingMultiphaseParcel.H" // Kinematic -#include "makeReactingParcelDispersionModels.H" -#include "makeReactingParcelDragModels.H" +#include "makeParcelDispersionModels.H" +#include "makeParcelDragModels.H" #include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant -#include "makeReactingParcelCollisionModels.H" -#include "makeReactingParcelPatchInteractionModels.H" -#include "makeReactingParcelPostProcessingModels.H" +#include "makeParcelCollisionModels.H" +#include "makeParcelPatchInteractionModels.H" +#include "makeParcelPostProcessingModels.H" // Thermodynamic -#include "makeReactingParcelHeatTransferModels.H" +#include "makeParcelHeatTransferModels.H" // Reacting -#include "makeReactingMultiphaseParcelCompositionModels.H" // MP variant +#include "makeReactingMultiphaseParcelCompositionModels.H" // MP Variant #include "makeReactingParcelPhaseChangeModels.H" +#include "makeReactingParcelSurfaceFilmModels.H" // Reacting multiphase #include "makeReactingMultiphaseParcelDevolatilisationModels.H" -#include "makeReactingMultiphaseParcelSurfaceFilmModels.H" #include "makeReactingMultiphaseParcelSurfaceReactionModels.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -50,32 +50,35 @@ License namespace Foam { // Kinematic sub-models - makeReactingDispersionModels(BasicReactingMultiphaseParcel); - makeReactingDragModels(BasicReactingMultiphaseParcel); - makeReactingMultiphaseInjectionModels(BasicReactingMultiphaseParcel); - makeReactingCollisionModels(BasicReactingMultiphaseParcel); - makeReactingPatchInteractionModels(BasicReactingMultiphaseParcel); - makeReactingPostProcessingModels(BasicReactingMultiphaseParcel); + makeParcelDispersionModels(basicReactingMultiphaseParcel); + makeParcelDragModels(basicReactingMultiphaseParcel); + makeReactingMultiphaseParcelInjectionModels(basicReactingMultiphaseParcel); + makeParcelCollisionModels(basicReactingMultiphaseParcel); + makeParcelPatchInteractionModels(basicReactingMultiphaseParcel); + makeParcelPostProcessingModels(basicReactingMultiphaseParcel); // Thermo sub-models - makeReactingHeatTransferModels(BasicReactingMultiphaseParcel); + makeParcelHeatTransferModels(basicReactingMultiphaseParcel); // Reacting sub-models - makeReactingMultiphaseCompositionModels(BasicReactingMultiphaseParcel); - makeReactingPhaseChangeModels(BasicReactingMultiphaseParcel); + makeReactingMultiphaseParcelCompositionModels + ( + basicReactingMultiphaseParcel + ); + makeReactingParcelPhaseChangeModels(basicReactingMultiphaseParcel); // Reacting multiphase sub-models - makeReactingMultiphaseDevolatilisationModels + makeReactingMultiphaseParcelDevolatilisationModels ( - BasicReactingMultiphaseParcel + basicReactingMultiphaseParcel ); - makeReactingMultiphaseSurfaceFilmModels + makeReactingParcelSurfaceFilmModels ( - BasicReactingMultiphaseParcel + basicReactingMultiphaseParcel ); - makeReactingMultiphaseSurfaceReactionModels + makeReactingMultiphaseParcelSurfaceReactionModels ( - BasicReactingMultiphaseParcel + basicReactingMultiphaseParcel ); }; diff --git a/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/BasicReactingParcel.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.C similarity index 65% rename from src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/BasicReactingParcel.C rename to src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.C index 5e173ff85e..23ef85c02e 100644 --- a/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/BasicReactingParcel.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.C @@ -23,26 +23,24 @@ License \*---------------------------------------------------------------------------*/ -#include "BasicReactingParcel.H" +#include "basicReactingParcel.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -Foam::BasicReactingParcel::BasicReactingParcel +Foam::basicReactingParcel::basicReactingParcel ( - ReactingCloud >& owner, + ReactingCloud& owner, const vector& position, const label cellI ) : - ReactingParcel >(owner, position, cellI) + ReactingParcel(owner, position, cellI) {} -template -Foam::BasicReactingParcel::BasicReactingParcel +Foam::basicReactingParcel::basicReactingParcel ( - ReactingCloud >& owner, + ReactingCloud& owner, const vector& position, const label cellI, const label typeId, @@ -53,11 +51,10 @@ Foam::BasicReactingParcel::BasicReactingParcel const vector& angularMomentum0, const vector& torque0, const scalarField& Y0, - const typename ReactingParcel >:: - constantProperties& constProps + const ReactingParcel::constantProperties& constProps ) : - ReactingParcel > + ReactingParcel ( owner, position, @@ -75,32 +72,29 @@ Foam::BasicReactingParcel::BasicReactingParcel {} -template -Foam::BasicReactingParcel::BasicReactingParcel +Foam::basicReactingParcel::basicReactingParcel ( - const Cloud >& cloud, + const Cloud& cloud, Istream& is, bool readFields ) : - ReactingParcel >(cloud, is, readFields) + ReactingParcel(cloud, is, readFields) {} -template -Foam::BasicReactingParcel::BasicReactingParcel +Foam::basicReactingParcel::basicReactingParcel ( - const BasicReactingParcel& p + const basicReactingParcel& p ) : - ReactingParcel(p) + ReactingParcel(p) {} // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // -template -Foam::BasicReactingParcel::~BasicReactingParcel() +Foam::basicReactingParcel::~basicReactingParcel() {} diff --git a/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/BasicReactingParcel.H b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H similarity index 67% rename from src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/BasicReactingParcel.H rename to src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H index dc3d69e75d..86e9d726f5 100644 --- a/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/BasicReactingParcel.H +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/basicReactingParcel.H @@ -22,19 +22,18 @@ License along with OpenFOAM. If not, see . Class - Foam::BasicReactingParcel + Foam::basicReactingParcel Description SourceFiles - BasicReactingParcel.C - BasicReactingParcelIO.C + basicReactingParcel.C \*---------------------------------------------------------------------------*/ -#ifndef BasicReactingParcel_H -#define BasicReactingParcel_H +#ifndef basicReactingParcel_H +#define basicReactingParcel_H #include "ReactingParcel.H" @@ -43,43 +42,35 @@ SourceFiles namespace Foam { -// Forward declaration of classes -template -class BasicReactingParcel; - /*---------------------------------------------------------------------------*\ - Class BasicReactingParcel Declaration + Class basicReactingParcel Declaration \*---------------------------------------------------------------------------*/ -template -class BasicReactingParcel +class basicReactingParcel : - public ReactingParcel > + public ReactingParcel { public: - //- The type of thermodynamics this parcel was instantiated for - typedef ThermoType thermoType; - //- Run-time type information - TypeName("BasicReactingParcel"); + TypeName("basicReactingParcel"); // Constructors //- Construct from owner, position, and cloud owner // Other properties initialised as null - BasicReactingParcel + basicReactingParcel ( - ReactingCloud& owner, + ReactingCloud& owner, const vector& position, const label cellI ); //- Construct from components - BasicReactingParcel + basicReactingParcel ( - ReactingCloud& owner, + ReactingCloud& owner, const vector& position, const label cellI, const label typeId, @@ -90,49 +81,50 @@ public: const vector& angularMomentum0, const vector& torque0, const scalarField& Y0, - const typename ReactingParcel:: - constantProperties& constProps + const ReactingParcel::constantProperties& + constProps ); //- Construct from Istream - BasicReactingParcel + basicReactingParcel ( - const Cloud& c, + const Cloud& c, Istream& is, bool readFields = true ); //- Construct as a copy - BasicReactingParcel(const BasicReactingParcel& p); + basicReactingParcel(const basicReactingParcel& p); //- Construct and return a clone - autoPtr clone() const + autoPtr clone() const { return - autoPtr + autoPtr ( - new BasicReactingParcel(*this) + new basicReactingParcel(*this) ); } //- Destructor - virtual ~BasicReactingParcel(); + virtual ~basicReactingParcel(); }; +template<> +inline bool contiguous() +{ + return false; +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#ifdef NoRepository - #include "BasicReactingParcel.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - #endif // ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/defineBasicReactingParcel.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/defineBasicReactingParcel.C similarity index 94% rename from src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/defineBasicReactingParcel.C rename to src/lagrangian/intermediate/parcels/derived/basicReactingParcel/defineBasicReactingParcel.C index c4dc663cbd..0eb06eedd5 100644 --- a/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/defineBasicReactingParcel.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/defineBasicReactingParcel.C @@ -23,14 +23,14 @@ License \*---------------------------------------------------------------------------*/ +#include "basicReactingParcel.H" #include "createReactingParcelTypes.H" -#include "BasicReactingParcel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - createReactingParcelType(BasicReactingParcel); + createReactingParcelTypes(basicReactingParcel); }; diff --git a/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/makeBasicReactingParcelSubmodels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelSubmodels.C similarity index 63% rename from src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/makeBasicReactingParcelSubmodels.C rename to src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelSubmodels.C index d2e23542d1..cd4f0e1775 100644 --- a/src/lagrangian/intermediate/parcels/derived/BasicReactingParcel/makeBasicReactingParcelSubmodels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelSubmodels.C @@ -23,18 +23,18 @@ License \*---------------------------------------------------------------------------*/ -#include "BasicReactingParcel.H" +#include "basicReactingParcel.H" // Kinematic -#include "makeReactingParcelDispersionModels.H" -#include "makeReactingParcelDragModels.H" -#include "makeReactingParcelInjectionModels.H" -#include "makeReactingParcelCollisionModels.H" -#include "makeReactingParcelPatchInteractionModels.H" -#include "makeReactingParcelPostProcessingModels.H" +#include "makeParcelDispersionModels.H" +#include "makeParcelDragModels.H" +#include "makeReactingParcelInjectionModels.H" // Reacting variant +#include "makeParcelCollisionModels.H" +#include "makeParcelPatchInteractionModels.H" +#include "makeParcelPostProcessingModels.H" // Thermodynamic -#include "makeReactingParcelHeatTransferModels.H" +#include "makeParcelHeatTransferModels.H" // Reacting #include "makeReactingParcelCompositionModels.H" @@ -46,20 +46,20 @@ License namespace Foam { // Kinematic sub-models - makeReactingDispersionModels(BasicReactingParcel); - makeReactingDragModels(BasicReactingParcel); - makeReactingInjectionModels(BasicReactingParcel); - makeReactingCollisionModels(BasicReactingParcel); - makeReactingPatchInteractionModels(BasicReactingParcel); - makeReactingPostProcessingModels(BasicReactingParcel); + makeParcelDispersionModels(basicReactingParcel); + makeParcelDragModels(basicReactingParcel); + makeReactingParcelInjectionModels(basicReactingParcel); + makeParcelCollisionModels(basicReactingParcel); + makeParcelPatchInteractionModels(basicReactingParcel); + makeParcelPostProcessingModels(basicReactingParcel); // Thermo sub-models - makeReactingHeatTransferModels(BasicReactingParcel); + makeParcelHeatTransferModels(basicReactingParcel); // Reacting sub-models - makeReactingCompositionModels(BasicReactingParcel); - makeReactingPhaseChangeModels(BasicReactingParcel); - makeReactingSurfaceFilmModels(BasicReactingParcel); + makeReactingParcelCompositionModels(basicReactingParcel); + makeReactingParcelPhaseChangeModels(basicReactingParcel); + makeReactingParcelSurfaceFilmModels(basicReactingParcel); }; diff --git a/src/lagrangian/intermediate/parcels/include/createKinematicParcelTypes.H b/src/lagrangian/intermediate/parcels/include/createKinematicParcelTypes.H new file mode 100644 index 0000000000..acdace44af --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/createKinematicParcelTypes.H @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can 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 . + +\*---------------------------------------------------------------------------*/ + +#ifndef createKinematicParcelTypes_H +#define createKinematicParcelTypes_H + +#include "KinematicParcel.H" +#include "KinematicCloud.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define createKinematicParcelTypes(ParcelType) \ + \ + defineTemplateTypeNameAndDebug(ParcelType, 0); \ + defineTemplateTypeNameAndDebug(Particle, 0); \ + defineTemplateTypeNameAndDebug(Cloud, 0); \ + \ + defineParcelTypeNameAndDebug(KinematicParcel, 0); \ + defineTemplateTypeNameAndDebug(KinematicParcel, 0); \ + defineParcelTypeNameAndDebug(KinematicCloud, 0); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // + diff --git a/src/lagrangian/intermediate/parcels/include/createReactingMultiphaseParcelTypes.H b/src/lagrangian/intermediate/parcels/include/createReactingMultiphaseParcelTypes.H index 5013e8d905..50a31657bb 100644 --- a/src/lagrangian/intermediate/parcels/include/createReactingMultiphaseParcelTypes.H +++ b/src/lagrangian/intermediate/parcels/include/createReactingMultiphaseParcelTypes.H @@ -26,67 +26,20 @@ License #ifndef createReactingMultiphaseParcelTypes_H #define createReactingMultiphaseParcelTypes_H -#include "thermoPhysicsTypes.H" +#include "ReactingMultiphaseParcel.H" +#include "ReactingMultiphaseCloud.H" + +#include "createReactingParcelTypes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define createReactingMultiphaseParcelType(ParcelType) \ +#define createReactingMultiphaseParcelTypes(ParcelType) \ \ - createReactingMultiphaseParcelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ - createReactingMultiphaseParcelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - createReactingMultiphaseParcelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define createReactingMultiphaseParcelThermoType(ParcelType, ThermoType) \ + createReactingParcelTypes(ParcelType); \ \ - typedef ParcelType ParcelType##ThermoType; \ - \ - defineTemplateTypeNameAndDebug(ParcelType##ThermoType, 0); \ - defineTemplateTypeNameAndDebug(Particle, 0); \ - defineTemplateTypeNameAndDebug(Cloud, 0); \ - \ - defineParcelTypeNameAndDebug(KinematicParcel, 0); \ - defineTemplateTypeNameAndDebug \ - ( \ - KinematicParcel, \ - 0 \ - ); \ - defineParcelTypeNameAndDebug(ThermoParcel, 0); \ - defineTemplateTypeNameAndDebug(ThermoParcel, 0); \ - defineParcelTypeNameAndDebug(ReactingParcel, 0); \ - defineTemplateTypeNameAndDebug(ReactingParcel, 0);\ - defineParcelTypeNameAndDebug \ - ( \ - ReactingMultiphaseParcel, \ - 0 \ - ); \ - defineTemplateTypeNameAndDebug \ - ( \ - ReactingMultiphaseParcel, \ - 0 \ - ); \ - \ - defineParcelTypeNameAndDebug(KinematicCloud, 0); \ - defineParcelTypeNameAndDebug(ThermoCloud, 0); \ - defineParcelTypeNameAndDebug(ReactingCloud, 0); \ - defineParcelTypeNameAndDebug \ - ( \ - ReactingMultiphaseCloud, \ - 0 \ - ); - + defineParcelTypeNameAndDebug(ReactingMultiphaseParcel, 0); \ + defineTemplateTypeNameAndDebug(ReactingMultiphaseParcel, 0); \ + defineParcelTypeNameAndDebug(ReactingMultiphaseCloud, 0); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/parcels/include/createReactingParcelTypes.H b/src/lagrangian/intermediate/parcels/include/createReactingParcelTypes.H index a530b43f8b..fb06844c9b 100644 --- a/src/lagrangian/intermediate/parcels/include/createReactingParcelTypes.H +++ b/src/lagrangian/intermediate/parcels/include/createReactingParcelTypes.H @@ -26,39 +26,20 @@ License #ifndef createReactingParcelTypes_H #define createReactingParcelTypes_H -#include "thermoPhysicsTypes.H" +#include "ReactingParcel.H" +#include "ReactingCloud.H" + +#include "createThermoParcelTypes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define createReactingParcelType(ParcelType) \ +#define createReactingParcelTypes(ParcelType) \ \ - createReactingParcelThermoType(ParcelType, constGasThermoPhysics); \ - createReactingParcelThermoType(ParcelType, gasThermoPhysics); \ - createReactingParcelThermoType(ParcelType, icoPoly8ThermoPhysics); - - -#define createReactingParcelThermoType(ParcelType, ThermoType) \ + createThermoParcelTypes(ParcelType); \ \ - typedef ParcelType ParcelType##ThermoType; \ - \ - defineTemplateTypeNameAndDebug(ParcelType##ThermoType, 0); \ - defineTemplateTypeNameAndDebug(Particle, 0); \ - defineTemplateTypeNameAndDebug(Cloud, 0); \ - \ - defineParcelTypeNameAndDebug(KinematicParcel, 0); \ - defineTemplateTypeNameAndDebug \ - ( \ - KinematicParcel, \ - 0 \ - ); \ - defineParcelTypeNameAndDebug(ThermoParcel, 0); \ - defineTemplateTypeNameAndDebug(ThermoParcel, 0); \ - defineParcelTypeNameAndDebug(ReactingParcel, 0); \ - defineTemplateTypeNameAndDebug(ReactingParcel, 0);\ - \ - defineParcelTypeNameAndDebug(KinematicCloud, 0); \ - defineParcelTypeNameAndDebug(ThermoCloud, 0); \ - defineParcelTypeNameAndDebug(ReactingCloud, 0); + defineParcelTypeNameAndDebug(ReactingParcel, 0); \ + defineTemplateTypeNameAndDebug(ReactingParcel, 0); \ + defineParcelTypeNameAndDebug(ReactingCloud, 0); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/parcels/include/createThermoParcelTypes.H b/src/lagrangian/intermediate/parcels/include/createThermoParcelTypes.H new file mode 100644 index 0000000000..1cbab2a4bb --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/createThermoParcelTypes.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can 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 . + +\*---------------------------------------------------------------------------*/ + +#ifndef createThermoParcelTypes_H +#define createThermoParcelTypes_H + +#include "ThermoParcel.H" +#include "ThermoCloud.H" + +#include "createKinematicParcelTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define createThermoParcelTypes(ParcelType) \ + \ + createKinematicParcelTypes(ParcelType); \ + \ + defineParcelTypeNameAndDebug(ThermoParcel, 0); \ + defineTemplateTypeNameAndDebug(ThermoParcel, 0); \ + defineParcelTypeNameAndDebug(ThermoCloud, 0); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // + + diff --git a/src/lagrangian/intermediate/parcels/include/makeKinematicParcelSurfaceFilmModels.H b/src/lagrangian/intermediate/parcels/include/makeParcelSurfaceFilmModels.H similarity index 94% rename from src/lagrangian/intermediate/parcels/include/makeKinematicParcelSurfaceFilmModels.H rename to src/lagrangian/intermediate/parcels/include/makeParcelSurfaceFilmModels.H index 9f695653e6..b150710a4f 100644 --- a/src/lagrangian/intermediate/parcels/include/makeKinematicParcelSurfaceFilmModels.H +++ b/src/lagrangian/intermediate/parcels/include/makeParcelSurfaceFilmModels.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,11 +29,12 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "KinematicCloud.H" + #include "NoSurfaceFilm.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeKinematicParcelSurfaceFilmModels(ParcelType) \ +#define makeParcelSurfaceFilmModels(ParcelType) \ \ makeSurfaceFilmModel(KinematicCloud); \ \ @@ -44,8 +45,11 @@ License ParcelType \ ); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************************************* // + + diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelCompositionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelCompositionModels.H index e87b835f5d..814820d682 100644 --- a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelCompositionModels.H +++ b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelCompositionModels.H @@ -28,42 +28,20 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "thermoPhysicsTypes.H" -#include "ReactingCloud.H" - +#include "ReactingMultiphaseCloud.H" #include "SingleMixtureFraction.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeReactingMultiphaseCompositionModels(ParcelType) \ +#define makeReactingMultiphaseParcelCompositionModels(ParcelType) \ \ - makeReactingMultiphaseCompositionModelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ - makeReactingMultiphaseCompositionModelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - makeReactingMultiphaseCompositionModelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define makeReactingMultiphaseCompositionModelThermoType(ParcelType, ThermoType)\ + makeCompositionModel(ReactingCloud); \ \ - makeCompositionModel(ReactingCloud >); \ - \ - makeCompositionModelThermoType \ + makeCompositionModelType \ ( \ SingleMixtureFraction, \ ReactingCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelDevolatilisationModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelDevolatilisationModels.H index c1d14efcac..f44f9228a2 100644 --- a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelDevolatilisationModels.H +++ b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelDevolatilisationModels.H @@ -28,7 +28,6 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "thermoPhysicsTypes.H" #include "ReactingMultiphaseCloud.H" #include "ConstantRateDevolatilisation.H" @@ -37,52 +36,27 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeReactingMultiphaseDevolatilisationModels(ParcelType) \ +#define makeReactingMultiphaseParcelDevolatilisationModels(ParcelType) \ \ - makeReactingMultiphaseDevolatilisationModelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ - makeReactingMultiphaseDevolatilisationModelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - makeReactingMultiphaseDevolatilisationModelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define makeReactingMultiphaseDevolatilisationModelThermoType(ParcelType, ThermoType)\ + makeDevolatilisationModel(ReactingMultiphaseCloud); \ \ - makeDevolatilisationModel \ - ( \ - ReactingMultiphaseCloud > \ - ); \ - \ - makeDevolatilisationModelThermoType \ + makeDevolatilisationModelType \ ( \ ConstantRateDevolatilisation, \ ReactingMultiphaseCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeDevolatilisationModelThermoType \ + makeDevolatilisationModelType \ ( \ NoDevolatilisation, \ ReactingMultiphaseCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeDevolatilisationModelThermoType \ + makeDevolatilisationModelType \ ( \ SingleKineticRateDevolatilisation, \ ReactingMultiphaseCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H index ca064118da..6bdc55f3bc 100644 --- a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H +++ b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H @@ -41,79 +41,51 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeReactingMultiphaseInjectionModels(ParcelType) \ +#define makeReactingMultiphaseParcelInjectionModels(ParcelType) \ \ - makeReactingMultiphaseInjectionModelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ + makeInjectionModel(KinematicCloud); \ \ - makeReactingMultiphaseInjectionModelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - \ - makeReactingMultiphaseInjectionModelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define makeReactingMultiphaseInjectionModelThermoType(ParcelType, ThermoType)\ - \ - makeInjectionModel(KinematicCloud >); \ - \ - makeInjectionModelThermoType \ + makeInjectionModelType \ ( \ ConeInjection, \ KinematicCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeInjectionModelThermoType \ + makeInjectionModelType \ ( \ ConeInjectionMP, \ KinematicCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeInjectionModelThermoType \ + makeInjectionModelType \ ( \ FieldActivatedInjection, \ KinematicCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeInjectionModelThermoType \ + makeInjectionModelType \ ( \ ManualInjection, \ KinematicCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeInjectionModelThermoType \ + makeInjectionModelType \ ( \ NoInjection, \ KinematicCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeInjectionModelThermoType \ + makeInjectionModelType \ ( \ PatchInjection, \ KinematicCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeInjectionModelThermoType \ + makeInjectionModelType \ ( \ ReactingMultiphaseLookupTableInjection, \ KinematicCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelSurfaceFilmModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelSurfaceFilmModels.H deleted file mode 100644 index 92ed38da94..0000000000 --- a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelSurfaceFilmModels.H +++ /dev/null @@ -1,74 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can 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 . - -\*---------------------------------------------------------------------------*/ - -#ifndef makeReactingMultiphaseParcelSurfaceFilmModels_H -#define makeReactingMultiphaseParcelSurfaceFilmModels_H - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "thermoPhysicsTypes.H" -#include "ReactingMultiphaseCloud.H" - -#include "NoSurfaceFilm.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#define makeReactingMultiphaseSurfaceFilmModels(ParcelType) \ - \ - makeReactingMultiphaseSurfaceFilmModelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ - makeReactingMultiphaseSurfaceFilmModelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - makeReactingMultiphaseSurfaceFilmModelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define makeReactingMultiphaseSurfaceFilmModelThermoType(ParcelType, ThermoType)\ - \ - makeSurfaceFilmModel(KinematicCloud >); \ - \ - makeSurfaceFilmModelThermoType \ - ( \ - NoSurfaceFilm, \ - KinematicCloud, \ - ParcelType, \ - ThermoType \ - ); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelSurfaceReactionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelSurfaceReactionModels.H index 4aa621ffb4..b548fd2308 100644 --- a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelSurfaceReactionModels.H +++ b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelSurfaceReactionModels.H @@ -28,45 +28,20 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "thermoPhysicsTypes.H" #include "ReactingMultiphaseCloud.H" - #include "NoSurfaceReaction.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeReactingMultiphaseSurfaceReactionModels(ParcelType) \ +#define makeReactingMultiphaseParcelSurfaceReactionModels(ParcelType) \ \ - makeReactingMultiphaseSurfaceReactionModelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ - makeReactingMultiphaseSurfaceReactionModelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - makeReactingMultiphaseSurfaceReactionModelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define makeReactingMultiphaseSurfaceReactionModelThermoType(ParcelType, ThermoType)\ + makeSurfaceReactionModel(ReactingMultiphaseCloud); \ \ - makeSurfaceReactionModel \ - ( \ - ReactingMultiphaseCloud > \ - ); \ - \ - makeSurfaceReactionModelThermoType \ + makeSurfaceReactionModelType \ ( \ NoSurfaceReaction, \ ReactingMultiphaseCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelCollisionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelCollisionModels.H deleted file mode 100644 index 289615125f..0000000000 --- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelCollisionModels.H +++ /dev/null @@ -1,117 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can 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 . - -\*---------------------------------------------------------------------------*/ - -#ifndef makeReactingParcelCollisionModels_H -#define makeReactingParcelCollisionModels_H - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "thermoPhysicsTypes.H" -#include "KinematicCloud.H" - -#include "NoCollision.H" -#include "PairCollision.H" - -#include "PairSpringSliderDashpot.H" - -#include "WallSpringSliderDashpot.H" -#include "WallLocalSpringSliderDashpot.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#define makeReactingCollisionModels(ParcelType) \ - \ - makeReactingCollisionModelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ - \ - makeReactingCollisionModelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - \ - makeReactingCollisionModelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define makeReactingCollisionModelThermoType(ParcelType, ThermoType) \ - \ - makeCollisionModel(KinematicCloud >); \ - \ - makeCollisionModelThermoType \ - ( \ - NoCollision, \ - KinematicCloud, \ - ParcelType, \ - ThermoType \ - ); \ - \ - makeCollisionModelThermoType \ - ( \ - PairCollision, \ - KinematicCloud, \ - ParcelType, \ - ThermoType \ - ); \ - \ - makePairModel(KinematicCloud >); \ - \ - makePairModelThermoType \ - ( \ - PairSpringSliderDashpot, \ - KinematicCloud, \ - ParcelType, \ - ThermoType \ - ); \ - \ - makeWallModel(KinematicCloud >); \ - \ - makeWallModelThermoType \ - ( \ - WallSpringSliderDashpot, \ - KinematicCloud, \ - ParcelType, \ - ThermoType \ - ); \ - \ - makeWallModelThermoType \ - ( \ - WallLocalSpringSliderDashpot, \ - KinematicCloud, \ - ParcelType, \ - ThermoType \ - ); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelCompositionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelCompositionModels.H index 8f8fdb7061..a9e35c7446 100644 --- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelCompositionModels.H +++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelCompositionModels.H @@ -28,42 +28,20 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "thermoPhysicsTypes.H" #include "ReactingCloud.H" - #include "SinglePhaseMixture.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeReactingCompositionModels(ParcelType) \ +#define makeReactingParcelCompositionModels(ParcelType) \ \ - makeReactingCompositionModelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ - makeReactingCompositionModelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - makeReactingCompositionModelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define makeReactingCompositionModelThermoType(ParcelType, ThermoType) \ + makeCompositionModel(ReactingCloud); \ \ - makeCompositionModel(ReactingCloud >); \ - \ - makeCompositionModelThermoType \ + makeCompositionModelType \ ( \ SinglePhaseMixture, \ ReactingCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelDispersionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelDispersionModels.H deleted file mode 100644 index a010713aaf..0000000000 --- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelDispersionModels.H +++ /dev/null @@ -1,98 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can 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 . - -\*---------------------------------------------------------------------------*/ - -#ifndef makeReactingParcelDispersionModels_H -#define makeReactingParcelDispersionModels_H - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "thermoPhysicsTypes.H" -#include "KinematicCloud.H" - -#include "NoDispersion.H" -#include "GradientDispersionRAS.H" -#include "StochasticDispersionRAS.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#define makeReactingDispersionModels(ParcelType) \ - \ - makeReactingDispersionModelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ - \ - makeReactingDispersionModelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - \ - makeReactingDispersionModelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define makeReactingDispersionModelThermoType(ParcelType, ThermoType) \ - \ - makeDispersionModel(KinematicCloud >); \ - \ - defineNamedTemplateTypeNameAndDebug \ - ( \ - DispersionRASModel > >, \ - 0 \ - ); \ - \ - makeDispersionModelThermoType \ - ( \ - NoDispersion, \ - KinematicCloud, \ - ParcelType, \ - ThermoType \ - ); \ - makeDispersionModelThermoType \ - ( \ - GradientDispersionRAS, \ - KinematicCloud, \ - ParcelType, \ - ThermoType \ - ); \ - makeDispersionModelThermoType \ - ( \ - StochasticDispersionRAS, \ - KinematicCloud, \ - ParcelType, \ - ThermoType \ - ); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelDragModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelDragModels.H deleted file mode 100644 index 05ad04fa29..0000000000 --- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelDragModels.H +++ /dev/null @@ -1,82 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can 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 . - -\*---------------------------------------------------------------------------*/ - -#ifndef makeReactingParcelDragModels_H -#define makeReactingParcelDragModels_H - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "thermoPhysicsTypes.H" -#include "KinematicCloud.H" - -#include "NoDrag.H" -#include "SphereDrag.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#define makeReactingDragModels(ParcelType) \ - \ - makeReactingDragModelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ - makeReactingDragModelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - makeReactingDragModelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define makeReactingDragModelThermoType(ParcelType, ThermoType) \ - \ - makeDragModel(KinematicCloud >); \ - \ - makeDragModelThermoType \ - ( \ - NoDrag, \ - KinematicCloud, \ - ParcelType, \ - ThermoType \ - ); \ - makeDragModelThermoType \ - ( \ - SphereDrag, \ - KinematicCloud, \ - ParcelType, \ - ThermoType \ - ); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelHeatTransferModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelHeatTransferModels.H deleted file mode 100644 index 864177001c..0000000000 --- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelHeatTransferModels.H +++ /dev/null @@ -1,82 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can 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 . - -\*---------------------------------------------------------------------------*/ - -#ifndef makeReactingParcelHeatTransferModels_H -#define makeReactingParcelHeatTransferModels_H - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "thermoPhysicsTypes.H" -#include "ThermoCloud.H" - -#include "NoHeatTransfer.H" -#include "RanzMarshall.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#define makeReactingHeatTransferModels(ParcelType) \ - \ - makeReactingHeatTransferModelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ - makeReactingHeatTransferModelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - makeReactingHeatTransferModelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define makeReactingHeatTransferModelThermoType(ParcelType, ThermoType) \ - \ - makeHeatTransferModel(ThermoCloud >); \ - \ - makeHeatTransferModelThermoType \ - ( \ - NoHeatTransfer, \ - ThermoCloud, \ - ParcelType, \ - ThermoType \ - ); \ - makeHeatTransferModelThermoType \ - ( \ - RanzMarshall, \ - ThermoCloud, \ - ParcelType, \ - ThermoType \ - ); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelInjectionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelInjectionModels.H index cae3ea5bbc..c68403914c 100644 --- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelInjectionModels.H +++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelInjectionModels.H @@ -28,7 +28,6 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "thermoPhysicsTypes.H" #include "KinematicCloud.H" #include "ConeInjection.H" @@ -41,79 +40,51 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeReactingInjectionModels(ParcelType) \ +#define makeReactingParcelInjectionModels(ParcelType) \ \ - makeReactingInjectionModelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ + makeInjectionModel(KinematicCloud); \ \ - makeReactingInjectionModelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - \ - makeReactingInjectionModelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define makeReactingInjectionModelThermoType(ParcelType, ThermoType) \ - \ - makeInjectionModel(KinematicCloud >); \ - \ - makeInjectionModelThermoType \ + makeInjectionModelType \ ( \ ConeInjection, \ KinematicCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeInjectionModelThermoType \ + makeInjectionModelType \ ( \ ConeInjectionMP, \ KinematicCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeInjectionModelThermoType \ + makeInjectionModelType \ ( \ FieldActivatedInjection, \ KinematicCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeInjectionModelThermoType \ + makeInjectionModelType \ ( \ ManualInjection, \ KinematicCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeInjectionModelThermoType \ + makeInjectionModelType \ ( \ NoInjection, \ KinematicCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeInjectionModelThermoType \ + makeInjectionModelType \ ( \ PatchInjection, \ KinematicCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeInjectionModelThermoType \ + makeInjectionModelType \ ( \ ReactingLookupTableInjection, \ KinematicCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelPatchInteractionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelPatchInteractionModels.H deleted file mode 100644 index b41f1ce7a4..0000000000 --- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelPatchInteractionModels.H +++ /dev/null @@ -1,92 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can 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 . - -\*---------------------------------------------------------------------------*/ - -#ifndef makeReactingParcelPatchInteractionModels_H -#define makeReactingParcelPatchInteractionModels_H - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "thermoPhysicsTypes.H" -#include "KinematicCloud.H" - -#include "LocalInteraction.H" -#include "Rebound.H" -#include "StandardWallInteraction.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#define makeReactingPatchInteractionModels(ParcelType) \ - \ - makeReactingPatchInteractionModelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ - \ - makeReactingPatchInteractionModelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - \ - makeReactingPatchInteractionModelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define makeReactingPatchInteractionModelThermoType(ParcelType, ThermoType) \ - \ - makePatchInteractionModel(KinematicCloud >); \ - \ - makePatchInteractionModelThermoType \ - ( \ - LocalInteraction, \ - KinematicCloud, \ - ParcelType, \ - ThermoType \ - ); \ - makePatchInteractionModelThermoType \ - ( \ - Rebound, \ - KinematicCloud, \ - ParcelType, \ - ThermoType \ - ); \ - makePatchInteractionModelThermoType \ - ( \ - StandardWallInteraction, \ - KinematicCloud, \ - ParcelType, \ - ThermoType \ - ); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelPhaseChangeModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelPhaseChangeModels.H index 0505383759..e08e703fdb 100644 --- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelPhaseChangeModels.H +++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelPhaseChangeModels.H @@ -28,7 +28,6 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "thermoPhysicsTypes.H" #include "ReactingCloud.H" #include "NoPhaseChange.H" @@ -36,44 +35,21 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeReactingPhaseChangeModels(ParcelType) \ +#define makeReactingParcelPhaseChangeModels(ParcelType) \ \ - makeReactingPhaseChangeModelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ + makePhaseChangeModel(ReactingCloud); \ \ - makeReactingPhaseChangeModelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - \ - makeReactingPhaseChangeModelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define makeReactingPhaseChangeModelThermoType(ParcelType, ThermoType) \ - \ - makePhaseChangeModel(ReactingCloud >); \ - \ - makePhaseChangeModelThermoType \ + makePhaseChangeModelType \ ( \ NoPhaseChange, \ ReactingCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makePhaseChangeModelThermoType \ + makePhaseChangeModelType \ ( \ LiquidEvaporation, \ ReactingCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); @@ -82,3 +58,4 @@ License #endif // ************************************************************************* // + diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelPostProcessingModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelPostProcessingModels.H deleted file mode 100644 index b6a900ddab..0000000000 --- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelPostProcessingModels.H +++ /dev/null @@ -1,84 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can 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 . - -\*---------------------------------------------------------------------------*/ - -#ifndef makeReactingParcelPostProcessingModels_H -#define makeReactingParcelPostProcessingModels_H - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "thermoPhysicsTypes.H" -#include "KinematicCloud.H" - -#include "NoPostProcessing.H" -#include "PatchPostProcessing.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#define makeReactingPostProcessingModels(ParcelType) \ - \ - makeReactingPostProcessingModelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ - \ - makeReactingPostProcessingModelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - \ - makeReactingPostProcessingModelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define makeReactingPostProcessingModelThermoType(ParcelType, ThermoType) \ - \ - makePostProcessingModel(KinematicCloud >); \ - \ - makePostProcessingModelThermoType \ - ( \ - NoPostProcessing, \ - KinematicCloud, \ - ParcelType, \ - ThermoType \ - ); \ - makePostProcessingModelThermoType \ - ( \ - PatchPostProcessing, \ - KinematicCloud, \ - ParcelType, \ - ThermoType \ - ); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelSurfaceFilmModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelSurfaceFilmModels.H index b2b1bf2d89..a7ae4e064e 100644 --- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelSurfaceFilmModels.H +++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelSurfaceFilmModels.H @@ -28,7 +28,6 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "thermoPhysicsTypes.H" #include "KinematicCloud.H" #include "NoSurfaceFilm.H" @@ -36,44 +35,21 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeReactingSurfaceFilmModels(ParcelType) \ +#define makeReactingParcelSurfaceFilmModels(ParcelType) \ \ - makeReactingSurfaceFilmModelThermoType \ - ( \ - ParcelType, \ - constGasThermoPhysics \ - ); \ + makeSurfaceFilmModel(KinematicCloud); \ \ - makeReactingSurfaceFilmModelThermoType \ - ( \ - ParcelType, \ - gasThermoPhysics \ - ); \ - \ - makeReactingSurfaceFilmModelThermoType \ - ( \ - ParcelType, \ - icoPoly8ThermoPhysics \ - ); - - -#define makeReactingSurfaceFilmModelThermoType(ParcelType, ThermoType) \ - \ - makeSurfaceFilmModel(KinematicCloud >); \ - \ - makeSurfaceFilmModelThermoType \ + makeSurfaceFilmModelType \ ( \ NoSurfaceFilm, \ KinematicCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); \ - makeSurfaceFilmModelThermoType \ + makeSurfaceFilmModelType \ ( \ ThermoSurfaceFilm, \ KinematicCloud, \ - ParcelType, \ - ThermoType \ + ParcelType \ ); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/CollisionModel/CollisionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/CollisionModel/CollisionModel.H index fc6f9a4886..4ff1cc0000 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/CollisionModel/CollisionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/CollisionModel/CollisionModel.H @@ -172,21 +172,6 @@ public: add##SS##CloudType##ParcelType##ConstructorToTable_; -#define makeCollisionModelThermoType(SS, CloudType, ParcelType, ThermoType) \ - \ - defineNamedTemplateTypeNameAndDebug \ - ( \ - SS > >, \ - 0 \ - ); \ - \ - CollisionModel > >:: \ - adddictionaryConstructorToTable \ - > > > \ - add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; - - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "CollisionModelI.H" diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H index 68ebe671c1..b1634db21e 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H @@ -162,20 +162,6 @@ public: add##SS##CloudType##ParcelType##ConstructorToTable_; -#define makeDispersionModelThermoType(SS, CloudType, ParcelType, ThermoType) \ - \ - defineNamedTemplateTypeNameAndDebug \ - ( \ - SS > >, \ - 0 \ - ); \ - \ - DispersionModel > >:: \ - adddictionaryConstructorToTable \ - > > > \ - add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H index 67d0e36f94..e60126e1d0 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H @@ -147,20 +147,6 @@ public: add##SS##CloudType##ParcelType##ConstructorToTable_; -#define makeDragModelThermoType(SS, CloudType, ParcelType, ThermoType) \ - \ - defineNamedTemplateTypeNameAndDebug \ - ( \ - SS > >, \ - 0 \ - ); \ - \ - DragModel > >:: \ - adddictionaryConstructorToTable \ - > > > \ - add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H index ad3d4b1dae..b40abbde90 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H @@ -357,21 +357,6 @@ public: add##SS##CloudType##ParcelType##ConstructorToTable_; -#define makeInjectionModelThermoType(SS, CloudType, ParcelType, ThermoType) \ - \ - defineNamedTemplateTypeNameAndDebug \ - ( \ - SS > >, \ - 0 \ - ); \ - \ - InjectionModel > >:: \ - adddictionaryConstructorToTable \ - > > > \ - add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; - - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "InjectionModelI.H" diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H index 95a4b04f99..1bd1684773 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H @@ -187,20 +187,6 @@ public: add##SS##CloudType##ParcelType##ConstructorToTable_; -#define makePatchInteractionModelThermoType(SS, CloudType, ParcelType, ThermoType)\ - \ - defineNamedTemplateTypeNameAndDebug \ - ( \ - SS > >, \ - 0 \ - ); \ - \ - PatchInteractionModel > >:: \ - adddictionaryConstructorToTable \ - > > > \ - add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.H b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.H index 8942dec879..0d503bbdc5 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.H @@ -177,20 +177,6 @@ public: add##SS##CloudType##ParcelType##ConstructorToTable_; -#define makePostProcessingModelThermoType(SS, CloudType, ParcelType, ThermoType)\ - \ - defineNamedTemplateTypeNameAndDebug \ - ( \ - SS > >, \ - 0 \ - ); \ - \ - PostProcessingModel > >:: \ - adddictionaryConstructorToTable \ - > > > \ - add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "PostProcessingModelI.H" diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H index 2ba518788f..986bd943d8 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H @@ -263,21 +263,6 @@ public: add##SS##CloudType##ParcelType##ConstructorToTable_; -#define makeSurfaceFilmModelThermoType(SS, CloudType, ParcelType, ThermoType) \ - \ - defineNamedTemplateTypeNameAndDebug \ - ( \ - SS > >, \ - 0 \ - ); \ - \ - SurfaceFilmModel > >:: \ - adddictionaryConstructorToTable \ - > > > \ - add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; - - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "SurfaceFilmModelI.H" diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C index e1a3a54f4e..7ce1c6d3c0 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C @@ -38,33 +38,13 @@ Foam::CompositionModel::CompositionModel dict_(dict), owner_(owner), coeffDict_(dict.subDict(type + "Coeffs")), - mcCarrierThermo_(owner.mcCarrierThermo()), - liquids_ - ( - liquidMixture::New - ( - owner.mesh().objectRegistry::lookupObject - ( - owner.carrierThermo().name() - ) - ) - ), - solids_ - ( - solidMixture::New - ( - owner.mesh().objectRegistry::lookupObject - ( - owner.carrierThermo().name() - ) - ) - ), + thermo_(owner.thermo()), phaseProps_ ( coeffDict_.lookup("phases"), - mcCarrierThermo_.species(), - liquids_().components(), - solids_().components() + thermo_.carrier().species(), + thermo_.liquids().components(), + thermo_.solids().components() ) {} @@ -100,24 +80,31 @@ const Foam::dictionary& Foam::CompositionModel::coeffDict() const template -const Foam::multiComponentMixture& -Foam::CompositionModel::mcCarrierThermo() const +const Foam::SLGThermo& Foam::CompositionModel::thermo() const { - return mcCarrierThermo_; + return thermo_; +} + + +template +const Foam::basicMultiComponentMixture& +Foam::CompositionModel::carrier() const +{ + return thermo_.carrier(); } template const Foam::liquidMixture& Foam::CompositionModel::liquids() const { - return liquids_(); + return thermo_.liquids(); } template const Foam::solidMixture& Foam::CompositionModel::solids() const { - return solids_(); + return thermo_.solids(); } @@ -137,8 +124,7 @@ Foam::label Foam::CompositionModel::nPhase() const template -const Foam::wordList& -Foam::CompositionModel::phaseTypes() const +const Foam::wordList& Foam::CompositionModel::phaseTypes() const { // if only 1 phase, return the constituent component names if (phaseProps_.size() == 1) @@ -153,8 +139,7 @@ Foam::CompositionModel::phaseTypes() const template -const Foam::wordList& -Foam::CompositionModel::stateLabels() const +const Foam::wordList& Foam::CompositionModel::stateLabels() const { return phaseProps_.stateLabels(); } @@ -174,24 +159,22 @@ Foam::label Foam::CompositionModel::globalCarrierId const word& cmptName ) const { - forAll(mcCarrierThermo_.species(), i) + label id = thermo_.carrierId(cmptName); + + if (id < 0) { - if (cmptName == mcCarrierThermo_.species()[i]) - { - return i; - } + FatalErrorIn + ( + "Foam::label Foam::CompositionModel::globalCarrierId" + "(" + "const word&" + ") const" + ) << "Unable to determine global id for requested component " + << cmptName << ". Available components are " << nl + << thermo_.carrier().species() << abort(FatalError); } - FatalErrorIn - ( - "Foam::label Foam::CompositionModel::globalCarrierId" - "(" - "const word&" - ") const" - ) << "Unable to determine global id for requested component " - << cmptName << nl << abort(FatalError); - - return -1; + return id; } @@ -214,7 +197,7 @@ Foam::label Foam::CompositionModel::globalId "const word&" ") const" ) << "Unable to determine global id for requested component " - << cmptName << nl << abort(FatalError); + << cmptName << abort(FatalError); } return id; @@ -250,7 +233,7 @@ Foam::label Foam::CompositionModel::localId "const word&" ") const" ) << "Unable to determine local id for component " << cmptName - << nl << abort(FatalError); + << abort(FatalError); } return id; @@ -278,7 +261,7 @@ Foam::label Foam::CompositionModel::localToGlobalCarrierId ") const" ) << "Unable to determine global carrier id for phase " << phaseI << " with local id " << id - << nl << abort(FatalError); + << abort(FatalError); } return gid; @@ -312,8 +295,8 @@ Foam::scalarField Foam::CompositionModel::X forAll(Y, i) { label gid = props.globalIds()[i]; - WInv += Y[i]/mcCarrierThermo_.speciesData()[gid].W(); - X[i] = Y[i]/mcCarrierThermo_.speciesData()[gid].W(); + WInv += Y[i]/thermo_.carrier().W(gid); + X[i] = Y[i]/thermo_.carrier().W(gid); } break; } @@ -322,8 +305,8 @@ Foam::scalarField Foam::CompositionModel::X forAll(Y, i) { label gid = props.globalIds()[i]; - WInv += Y[i]/this->liquids().properties()[gid].W(); - X[i] += Y[i]/this->liquids().properties()[gid].W(); + WInv += Y[i]/thermo_.liquids().properties()[gid].W(); + X[i] += Y[i]/thermo_.liquids().properties()[gid].W(); } break; } @@ -337,7 +320,7 @@ Foam::scalarField Foam::CompositionModel::X "const scalarField&" ") const" ) << "Only possible to convert gas and liquid mass fractions" - << nl << abort(FatalError); + << abort(FatalError); } } @@ -363,7 +346,7 @@ Foam::scalar Foam::CompositionModel::H forAll(Y, i) { label gid = props.globalIds()[i]; - HMixture += Y[i]*mcCarrierThermo_.speciesData()[gid].H(T); + HMixture += Y[i]*thermo_.carrier().H(gid, T); } break; } @@ -372,7 +355,7 @@ Foam::scalar Foam::CompositionModel::H forAll(Y, i) { label gid = props.globalIds()[i]; - HMixture += Y[i]*this->liquids().properties()[gid].h(p, T); + HMixture += Y[i]*thermo_.liquids().properties()[gid].h(p, T); } break; } @@ -384,8 +367,8 @@ Foam::scalar Foam::CompositionModel::H HMixture += Y[i] *( - this->solids().properties()[gid].Hf() - + this->solids().properties()[gid].cp()*T + thermo_.solids().properties()[gid].Hf() + + thermo_.solids().properties()[gid].cp()*T ); } break; @@ -401,7 +384,7 @@ Foam::scalar Foam::CompositionModel::H " const scalar, " " const scalar" ") const" - ) << "Unknown phase enumeration" << nl << abort(FatalError); + ) << "Unknown phase enumeration" << abort(FatalError); } } @@ -427,7 +410,7 @@ Foam::scalar Foam::CompositionModel::Hs forAll(Y, i) { label gid = props.globalIds()[i]; - HsMixture += Y[i]*mcCarrierThermo_.speciesData()[gid].Hs(T); + HsMixture += Y[i]*thermo_.carrier().Hs(gid, T); } break; } @@ -439,8 +422,8 @@ Foam::scalar Foam::CompositionModel::Hs HsMixture += Y[i] *( - this->liquids().properties()[gid].h(p, T) - - this->liquids().properties()[gid].h(p, 298.25) + thermo_.liquids().properties()[gid].h(p, T) + - thermo_.liquids().properties()[gid].h(p, 298.15) ); } break; @@ -450,7 +433,7 @@ Foam::scalar Foam::CompositionModel::Hs forAll(Y, i) { label gid = props.globalIds()[i]; - HsMixture += Y[i]*this->solids().properties()[gid].cp()*T; + HsMixture += Y[i]*thermo_.solids().properties()[gid].cp()*T; } break; } @@ -465,7 +448,7 @@ Foam::scalar Foam::CompositionModel::Hs " const scalar, " " const scalar" ") const" - ) << "Unknown phase enumeration" << nl << abort(FatalError); + ) << "Unknown phase enumeration" << abort(FatalError); } } @@ -491,7 +474,7 @@ Foam::scalar Foam::CompositionModel::Hc forAll(Y, i) { label gid = props.globalIds()[i]; - HcMixture += Y[i]*mcCarrierThermo_.speciesData()[gid].Hc(); + HcMixture += Y[i]*thermo_.carrier().Hc(gid); } break; } @@ -501,7 +484,7 @@ Foam::scalar Foam::CompositionModel::Hc { label gid = props.globalIds()[i]; HcMixture += - Y[i]*this->liquids().properties()[gid].h(p, 298.15); + Y[i]*thermo_.liquids().properties()[gid].h(p, 298.15); } break; } @@ -510,7 +493,7 @@ Foam::scalar Foam::CompositionModel::Hc forAll(Y, i) { label gid = props.globalIds()[i]; - HcMixture += Y[i]*this->solids().properties()[gid].Hf(); + HcMixture += Y[i]*thermo_.solids().properties()[gid].Hf(); } break; } @@ -525,7 +508,7 @@ Foam::scalar Foam::CompositionModel::Hc " const scalar, " " const scalar" ") const" - ) << "Unknown phase enumeration" << nl << abort(FatalError); + ) << "Unknown phase enumeration" << abort(FatalError); } } @@ -551,7 +534,7 @@ Foam::scalar Foam::CompositionModel::cp forAll(Y, i) { label gid = props.globalIds()[i]; - cpMixture += Y[i]*mcCarrierThermo_.speciesData()[gid].Cp(T); + cpMixture += Y[i]*thermo_.carrier().Cp(gid, T); } break; } @@ -560,7 +543,7 @@ Foam::scalar Foam::CompositionModel::cp forAll(Y, i) { label gid = props.globalIds()[i]; - cpMixture += Y[i]*this->liquids().properties()[gid].cp(p, T); + cpMixture += Y[i]*thermo_.liquids().properties()[gid].cp(p, T); } break; } @@ -569,7 +552,7 @@ Foam::scalar Foam::CompositionModel::cp forAll(Y, i) { label gid = props.globalIds()[i]; - cpMixture += Y[i]*this->solids().properties()[gid].cp(); + cpMixture += Y[i]*thermo_.solids().properties()[gid].cp(); } break; } @@ -584,7 +567,7 @@ Foam::scalar Foam::CompositionModel::cp "const scalar, " "const scalar" ") const" - ) << "Unknown phase enumeration" << nl << abort(FatalError); + ) << "Unknown phase enumeration" << abort(FatalError); } } @@ -627,7 +610,7 @@ Foam::scalar Foam::CompositionModel::L forAll(Y, i) { label gid = props.globalIds()[i]; - LMixture += Y[i]*this->liquids().properties()[gid].hl(p, T); + LMixture += Y[i]*thermo_.liquids().properties()[gid].hl(p, T); } break; } @@ -659,7 +642,7 @@ Foam::scalar Foam::CompositionModel::L "const scalar, " "const scalar" ") const" - ) << "Unknown phase enumeration" << nl << abort(FatalError); + ) << "Unknown phase enumeration" << abort(FatalError); } } diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H index 3c05f8e261..bff960c2ed 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H @@ -43,10 +43,7 @@ SourceFiles #include "runTimeSelectionTables.H" #include "PtrList.H" -#include "multiComponentMixture.H" - -#include "liquidMixture.H" -#include "solidMixture.H" +#include "SLGThermo.H" #include "phasePropertiesList.H" @@ -73,14 +70,8 @@ class CompositionModel //- The coefficients dictionary const dictionary& coeffDict_; - //- Reference to the multi-component carrier phase thermo - multiComponentMixture& mcCarrierThermo_; - - //- Global (additional) liquid properties data - autoPtr liquids_; - - //- Global (additional) solid properties data - autoPtr solids_; + //- Reference to the thermo database + const SLGThermo& thermo_; //- List of phase properties phasePropertiesList phaseProps_; @@ -141,13 +132,15 @@ public: //- Return the coefficients dictionary const dictionary& coeffDict() const; - //- Return the carrier phase thermo package - const multiComponentMixture& - mcCarrierThermo() const; + //- Return the thermo database + const SLGThermo& thermo() const; // Composition lists + //- Return the carrier components (wrapper function) + const basicMultiComponentMixture& carrier() const; + //- Return the global (additional) liquids const liquidMixture& liquids() const; @@ -197,11 +190,7 @@ public: //- Return the list of phase phaseI volume fractions fractions // based on supplied mass fractions Y - scalarField X - ( - const label phaseI, - const scalarField& Y - ) const; + scalarField X(const label phaseI, const scalarField& Y) const; // Mixture properties @@ -293,18 +282,13 @@ public: ); -#define makeCompositionModelThermoType(SS, CloudType, ParcelType, ThermoType) \ +#define makeCompositionModelType(SS, CloudType, ParcelType) \ \ - defineNamedTemplateTypeNameAndDebug \ - ( \ - SS > >, \ - 0 \ - ); \ + defineNamedTemplateTypeNameAndDebug(SS >, 0); \ \ - CompositionModel > >:: \ - adddictionaryConstructorToTable \ - > > > \ - add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; + CompositionModel >:: \ + adddictionaryConstructorToTable > > \ + add##SS##CloudType##ParcelType##ConstructorToTable_; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.C index 16f577f7a7..76abdaf2ff 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.C @@ -64,19 +64,19 @@ void Foam::SingleMixtureFraction::constructIds() { FatalErrorIn("Foam::SingleMixtureFraction::constructIds()") << "No gas phase found in phase list:" << nl - << this->phaseTypes() << nl << endl; + << this->phaseTypes() << exit(FatalError); } if (idLiquid_ < 0) { FatalErrorIn("Foam::SingleMixtureFraction::constructIds()") << "No liquid phase found in phase list:" << nl - << this->phaseTypes() << nl << endl; + << this->phaseTypes() << exit(FatalError); } if (idSolid_ < 0) { FatalErrorIn("Foam::SingleMixtureFraction::constructIds()") << "No solid phase found in phase list:" << nl - << this->phaseTypes() << nl << endl; + << this->phaseTypes() << exit(FatalError); } } @@ -111,7 +111,7 @@ Foam::SingleMixtureFraction::SingleMixtureFraction "CloudType&" ")" ) << "Incorrect numebr of phases: " << nl - << " Please specify 1 gas, 1 liquid and 1 solid" << nl + << " Please specify 1 gas, 1 liquid and 1 solid" << exit(FatalError); } @@ -130,7 +130,7 @@ Foam::SingleMixtureFraction::SingleMixtureFraction "CloudType&" ")" ) << "Sum of phases should be 1. Phase fractions:" << nl - << YMixture0_ << nl << exit(FatalError); + << YMixture0_ << exit(FatalError); } } diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.C index 4c0f3f332e..f1fd80384d 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SinglePhaseMixture/SinglePhaseMixture.C @@ -35,14 +35,14 @@ void Foam::SinglePhaseMixture::constructIds() FatalErrorIn ( "void Foam::SinglePhaseMixture::constructIds()" - ) << "Phase list is empty" << nl << exit(FatalError); + ) << "Phase list is empty" << exit(FatalError); } else if (this->phaseProps().size() > 1) { FatalErrorIn ( "void Foam::SinglePhaseMixture::constructIds()" - ) << "Only one phase permitted" << nl << exit(FatalError); + ) << "Only one phase permitted" << exit(FatalError); } switch (this->phaseProps()[0].phase()) @@ -67,7 +67,7 @@ void Foam::SinglePhaseMixture::constructIds() FatalErrorIn ( "void Foam::SinglePhaseMixture::constructIds()" - ) << "Unknown phase enumeration" << nl << abort(FatalError); + ) << "Unknown phase enumeration" << abort(FatalError); } } } diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C index 45a8b67d55..fc7673f8a2 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C @@ -37,13 +37,13 @@ Foam::scalarField Foam::LiquidEvaporation::calcXc const label cellI ) const { - scalarField Xc(this->owner().mcCarrierThermo().Y().size()); + scalarField Xc(this->owner().thermo().carrier().Y().size()); forAll(Xc, i) { Xc[i] = - this->owner().mcCarrierThermo().Y()[i][cellI] - /this->owner().mcCarrierThermo().speciesData()[i].W(); + this->owner().thermo().carrier().Y()[i][cellI] + /this->owner().thermo().carrier().W(i); } return Xc/sum(Xc); @@ -71,16 +71,7 @@ Foam::LiquidEvaporation::LiquidEvaporation ) : PhaseChangeModel(dict, owner, typeName), - liquids_ - ( - liquidMixture::New - ( - owner.mesh().objectRegistry::lookupObject - ( - owner.carrierThermo().name() - ) - ) - ), + liquids_(owner.thermo().liquids()), activeLiquids_(this->coeffDict().lookup("activeLiquids")), liqToCarrierMap_(activeLiquids_.size(), -1), liqToLiqMap_(activeLiquids_.size(), -1) @@ -158,7 +149,7 @@ void Foam::LiquidEvaporation::calculate label lid = liqToLiqMap_[i]; // vapour diffusivity [m2/s] - scalar Dab = liquids_->properties()[lid].D(pc, Ts); + scalar Dab = liquids_.properties()[lid].D(pc, Ts); // saturation pressure for species i [pa] // - carrier phase pressure assumed equal to the liquid vapour pressure @@ -166,7 +157,7 @@ void Foam::LiquidEvaporation::calculate // NOTE: if pSat > pc then particle is superheated // calculated evaporation rate will be greater than that of a particle // at boiling point, but this is not a boiling model - scalar pSat = liquids_->properties()[lid].pv(pc, T); + scalar pSat = liquids_.properties()[lid].pv(pc, T); // Schmidt number scalar Sc = nu/(Dab + ROOTVSMALL); @@ -187,7 +178,7 @@ void Foam::LiquidEvaporation::calculate scalar Ni = max(kc*(Cs - Cinf), 0.0); // mass transfer [kg] - dMassPC[lid] += Ni*A*liquids_->properties()[lid].W()*dt; + dMassPC[lid] += Ni*A*liquids_.properties()[lid].W()*dt; } } diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H index a7d7cdd3d1..bef4d3e888 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H @@ -54,7 +54,7 @@ protected: // Protected data //- Global liquid properties data - autoPtr liquids_; + const liquidMixture& liquids_; //- List of active liquid names List activeLiquids_; diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H index 99e39651f7..a216409d33 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H @@ -191,18 +191,13 @@ public: ); -#define makePhaseChangeModelThermoType(SS, CloudType, ParcelType, ThermoType) \ +#define makePhaseChangeModelType(SS, CloudType, ParcelType) \ \ - defineNamedTemplateTypeNameAndDebug \ - ( \ - SS > >, \ - 0 \ - ); \ + defineNamedTemplateTypeNameAndDebug(SS >, 0); \ \ - PhaseChangeModel > >:: \ - adddictionaryConstructorToTable \ - > > > \ - add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; + PhaseChangeModel >:: \ + adddictionaryConstructorToTable > > \ + add##SS##CloudType##ParcelType##ConstructorToTable_; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H index e5572dd884..21c6b79594 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H @@ -159,18 +159,13 @@ public: ); -#define makeDevolatilisationModelThermoType(SS, CloudType, ParcelType, ThermoType)\ +#define makeDevolatilisationModelType(SS, CloudType, ParcelType) \ \ - defineNamedTemplateTypeNameAndDebug \ - ( \ - SS > >, \ - 0 \ - ); \ + defineNamedTemplateTypeNameAndDebug(SS >, 0); \ \ - DevolatilisationModel > >:: \ - adddictionaryConstructorToTable \ - > > > \ - add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; + DevolatilisationModel >:: \ + adddictionaryConstructorToTable > > \ + add##SS##CloudType##ParcelType##ConstructorToTable_; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H index a2a0d3c1eb..8ee2fb1874 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H @@ -171,18 +171,13 @@ public: ); -#define makeSurfaceReactionModelThermoType(SS, CloudType, ParcelType, ThermoType)\ +#define makeSurfaceReactionModelType(SS, CloudType, ParcelType) \ \ - defineNamedTemplateTypeNameAndDebug \ - ( \ - SS > >, \ - 0 \ - ); \ + defineNamedTemplateTypeNameAndDebug(SS >, 0); \ \ - SurfaceReactionModel > >:: \ - adddictionaryConstructorToTable \ - > > > \ - add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; + SurfaceReactionModel >:: \ + adddictionaryConstructorToTable > > \ + add##SS##CloudType##ParcelType##ConstructorToTable_; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H index a71af0d37e..de10004531 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H @@ -179,20 +179,6 @@ public: add##SS##CloudType##ParcelType##ConstructorToTable_; -#define makeHeatTransferModelThermoType(SS, CloudType, ParcelType, ThermoType)\ - \ - defineNamedTemplateTypeNameAndDebug \ - ( \ - SS > >, \ - 0 \ - ); \ - \ - HeatTransferModel > >:: \ - adddictionaryConstructorToTable \ - > > > \ - add##SS##CloudType##ParcelType##ThermoType##ConstructorToTable_; - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilmI.H b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilmI.H deleted file mode 100644 index aeebf2c418..0000000000 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilmI.H +++ /dev/null @@ -1,135 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "ThermoSurfaceFilm.H" -#include "DimensionedFields.H" - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -inline const Foam::word& -Foam::ThermoSurfaceFilm::filmRegionName() const -{ - return filmRegionName_; -} - - -template -inline const Foam::wordList& -Foam::ThermoSurfaceFilm::patchNames() const -{ - return patchNames_; -} - - -template -inline const Foam::polyMesh& -Foam::ThermoSurfaceFilm::filmRegion() const -{ - return filmRegion_; -} - - -template -inline const Foam::volScalarField& -Foam::ThermoSurfaceFilm::hf() const -{ - return hf_; -} - - -template -inline const Foam::volScalarField& -Foam::ThermoSurfaceFilm::rho() const -{ - return rho_; -} - - -template -inline const Foam::volVectorField& -Foam::ThermoSurfaceFilm::U() const -{ - return U_; -} - - -template -inline const Foam::volScalarField& -Foam::ThermoSurfaceFilm::p() const -{ - return p_; -} - - -template -inline const Foam::volScalarField& -Foam::ThermoSurfaceFilm::h() const -{ - return h_; -} - - -template -inline const Foam::volScalarField& -Foam::ThermoSurfaceFilm::mu() const -{ - return mu_; -} - - -template -inline Foam::DimensionedField& -Foam::ThermoSurfaceFilm::rhoSp() -{ - return rhoSp_; -} - - -template -inline Foam::DimensionedField& -Foam::ThermoSurfaceFilm::USp() -{ - return USp_; -} - - -template -inline Foam::DimensionedField& -Foam::ThermoSurfaceFilm::hSp() -{ - return hSp_; -} - - -template -inline Foam::DimensionedField& -Foam::ThermoSurfaceFilm::pSp() -{ - return pSp_; -} - - -// ************************************************************************* // diff --git a/src/mesh/blockMesh/curvedEdges/BSpline.H b/src/mesh/blockMesh/curvedEdges/BSpline.H index 122d6e8a8c..93a8e75b43 100644 --- a/src/mesh/blockMesh/curvedEdges/BSpline.H +++ b/src/mesh/blockMesh/curvedEdges/BSpline.H @@ -47,12 +47,11 @@ Description segments. In rare cases (sections with very high curvatures), the resulting distribution may be sub-optimal. + A future implementation could also handle closed splines. + SeeAlso CatmullRomSpline -ToDo - A future implementation could also handle closed splines. - SourceFiles BSpline.C diff --git a/src/mesh/blockMesh/curvedEdges/CatmullRomSpline.H b/src/mesh/blockMesh/curvedEdges/CatmullRomSpline.H index 3726346f0f..b3ac25bc54 100644 --- a/src/mesh/blockMesh/curvedEdges/CatmullRomSpline.H +++ b/src/mesh/blockMesh/curvedEdges/CatmullRomSpline.H @@ -48,13 +48,12 @@ Description segments. In rare cases (sections with very high curvatures), the resulting distribution may be sub-optimal. + A future implementation could also handle closed splines. + SeeAlso http://www.algorithmist.net/catmullrom.html provides a nice introduction -ToDo - A future implementation could also handle closed splines. - SourceFiles CatmullRomSpline.C diff --git a/src/mesh/blockMesh/curvedEdges/polyLine.H b/src/mesh/blockMesh/curvedEdges/polyLine.H index 4014939e97..f44e61faf6 100644 --- a/src/mesh/blockMesh/curvedEdges/polyLine.H +++ b/src/mesh/blockMesh/curvedEdges/polyLine.H @@ -28,7 +28,6 @@ Description A series of straight line segments, which can also be interpreted as a series of control points for splines, etc. -ToDo A future implementation could also handle a closed polyLine. SourceFiles diff --git a/src/surfaceFilmModels/Make/files b/src/surfaceFilmModels/Make/files index cbaf49b810..8b84a94e14 100644 --- a/src/surfaceFilmModels/Make/files +++ b/src/surfaceFilmModels/Make/files @@ -10,17 +10,30 @@ surfaceFilmModel/thermoSingleLayer/thermoSingleLayer.C submodels/kinematic/injectionModel/injectionModel/injectionModel.C submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C submodels/kinematic/injectionModel/noInjection/noInjection.C +submodels/kinematic/injectionModel/cloudInjection/cloudInjection.C submodels/kinematic/injectionModel/removeInjection/removeInjection.C submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModel.C submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C submodels/thermo/phaseChangeModel/noPhaseChange/noPhaseChange.C +submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C + +submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModel.C +submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModelNew.C +submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C +submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.C /* Boundary conditions */ derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.C +derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamedFixedValueFvPatchFields.C derivedFvPatchFields/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.C derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.C +derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C + +/* Wall functions for primary region */ +derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C +derivedFvPatchFields/wallFunctions/mutFilmWallFunction/mutFilmWallFunctionFvPatchScalarField.C LIB = $(FOAM_LIBBIN)/libsurfaceFilmModels diff --git a/src/surfaceFilmModels/Make/options b/src/surfaceFilmModels/Make/options index d27c95d033..bd04197ec3 100644 --- a/src/surfaceFilmModels/Make/options +++ b/src/surfaceFilmModels/Make/options @@ -1,7 +1,23 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/pdfs/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude EXE_LIBS = \ + -lSLGThermo \ -lfiniteVolume \ - -lmeshTools + -lmeshTools \ + -lpdf \ + -lcompressibleRASModels \ + -lcompressibleLESModels diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C b/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C index 0f5c3db7c1..9c84101d85 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C +++ b/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C @@ -111,10 +111,8 @@ void directMappedFixedInternalValueFvPatchField::updateCoeffs() directMappedFixedValueFvPatchField::updateCoeffs(); // Get the coupling information from the directMappedPatchBase - const directMappedPatchBase& mpp = refCast - ( - this->patch().patch() - ); + const directMappedPatchBase& mpp = + refCast(this->patch().patch()); const polyMesh& nbrMesh = mpp.sampleMesh(); const fvPatch& nbrPatch = refCast diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamedFixedValueFvPatchField.C b/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamedFixedValueFvPatchField.C new file mode 100644 index 0000000000..c9e799e08a --- /dev/null +++ b/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamedFixedValueFvPatchField.C @@ -0,0 +1,334 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "directMappedNamedFixedValueFvPatchField.H" +#include "directMappedPatchBase.H" +#include "volFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +directMappedNamedFixedValueFvPatchField:: +directMappedNamedFixedValueFvPatchField +( + const fvPatch& p, + const DimensionedField& iF +) +: + fixedValueFvPatchField(p, iF), + fieldName_(iF.name()), + setAverage_(false), + average_(pTraits::zero) +{} + + +template +directMappedNamedFixedValueFvPatchField:: +directMappedNamedFixedValueFvPatchField +( + const directMappedNamedFixedValueFvPatchField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + fixedValueFvPatchField(ptf, p, iF, mapper), + fieldName_(ptf.fieldName_), + setAverage_(ptf.setAverage_), + average_(ptf.average_) +{ + if (!isA(this->patch().patch())) + { + FatalErrorIn + ( + "directMappedNamedFixedValueFvPatchField::" + "directMappedNamedFixedValueFvPatchField\n" + "(" + "const directMappedNamedFixedValueFvPatchField&, " + "const fvPatch&, " + "const Field&, " + "const fvPatchFieldMapper& " + ")" + ) << " patch type '" << p.type() + << "' not type '" << directMappedPatchBase::typeName << "'" + << "\n for patch " << p.name() + << " of field " << this->dimensionedInternalField().name() + << " in file " << this->dimensionedInternalField().objectPath() + << exit(FatalError); + } +} + + +template +directMappedNamedFixedValueFvPatchField:: +directMappedNamedFixedValueFvPatchField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + fixedValueFvPatchField(p, iF, dict), + fieldName_(dict.lookupOrDefault("fieldName", iF.name())), + setAverage_(readBool(dict.lookup("setAverage"))), + average_(pTraits(dict.lookup("average"))) +{ + if (!isA(this->patch().patch())) + { + FatalErrorIn + ( + "directMappedNamedFixedValueFvPatchField::" + "directMappedNamedFixedValueFvPatchField" + "(" + "const fvPatch&, " + "const DimensionedField& iF, " + "const dictionary&" + ")" + ) << " patch type '" << p.type() + << "' not type '" << directMappedPatchBase::typeName << "'" + << "\n for patch " << p.name() + << " of field " << fieldName_ + << " in file " << this->dimensionedInternalField().objectPath() + << exit(FatalError); + } + + //// Force calculation of schedule (uses parallel comms) + //const directMappedPatchBase& mpp = refCast + //( + // this->patch().patch() + //); + //(void)mpp.map().schedule(); +} + + +template +directMappedNamedFixedValueFvPatchField:: +directMappedNamedFixedValueFvPatchField +( + const directMappedNamedFixedValueFvPatchField& ptf +) +: + fixedValueFvPatchField(ptf), + fieldName_(ptf.fieldName_), + setAverage_(ptf.setAverage_), + average_(ptf.average_) +{} + + +template +directMappedNamedFixedValueFvPatchField:: +directMappedNamedFixedValueFvPatchField +( + const directMappedNamedFixedValueFvPatchField& ptf, + const DimensionedField& iF +) +: + fixedValueFvPatchField(ptf, iF), + fieldName_(ptf.fieldName_), + setAverage_(ptf.setAverage_), + average_(ptf.average_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void directMappedNamedFixedValueFvPatchField::updateCoeffs() +{ + if (this->updated()) + { + return; + } + + typedef GeometricField fieldType; + + // Get the scheduling information from the directMappedPatchBase + const directMappedPatchBase& mpp = refCast + ( + directMappedNamedFixedValueFvPatchField::patch().patch() + ); + const mapDistribute& distMap = mpp.map(); + + // Force recalculation of schedule + (void)distMap.schedule(); + + const fvMesh& nbrMesh = refCast(mpp.sampleMesh()); + + // Result of obtaining remote values + Field newValues; + + switch (mpp.mode()) + { + case directMappedPatchBase::NEARESTCELL: + { + if (mpp.sameRegion()) + { + newValues = this->internalField(); + } + else + { + newValues = nbrMesh.lookupObject + ( + fieldName_ + ).internalField(); + } + mapDistribute::distribute + ( + Pstream::defaultCommsType, + distMap.schedule(), + distMap.constructSize(), + distMap.subMap(), + distMap.constructMap(), + newValues + ); + + break; + } + case directMappedPatchBase::NEARESTPATCHFACE: + { + const label nbrPatchID = + nbrMesh.boundaryMesh().findPatchID(mpp.samplePatch()); + if (nbrPatchID < 0) + { + FatalErrorIn + ( + "void directMappedNamedFixedValueFvPatchField::" + "updateCoeffs()" + )<< "Unable to find sample patch " << mpp.samplePatch() + << " in region " << mpp.sampleRegion() + << " for patch " << this->patch().name() << nl + << abort(FatalError); + } + + const fieldType& nbrField = + nbrMesh.lookupObject(fieldName_); + newValues = nbrField.boundaryField()[nbrPatchID]; + mapDistribute::distribute + ( + Pstream::defaultCommsType, + distMap.schedule(), + distMap.constructSize(), + distMap.subMap(), + distMap.constructMap(), + newValues + ); + + break; + } + case directMappedPatchBase::NEARESTFACE: + { + Field allValues(nbrMesh.nFaces(), pTraits::zero); + + const fieldType& nbrField = + nbrMesh.lookupObject(fieldName_); + forAll(nbrField.boundaryField(), patchI) + { + const fvPatchField& pf = + nbrField.boundaryField()[patchI]; + label faceStart = pf.patch().patch().start(); + + forAll(pf, faceI) + { + allValues[faceStart++] = pf[faceI]; + } + } + + mapDistribute::distribute + ( + Pstream::defaultCommsType, + distMap.schedule(), + distMap.constructSize(), + distMap.subMap(), + distMap.constructMap(), + allValues + ); + + newValues = this->patch().patchSlice(allValues); + + break; + } + default: + { + FatalErrorIn + ( + "directMappedNamedFixedValueFvPatchField::updateCoeffs()" + )<< "Unknown sampling mode: " << mpp.mode() + << nl << abort(FatalError); + } + } + + if (setAverage_) + { + Type averagePsi = + gSum(this->patch().magSf()*newValues) + /gSum(this->patch().magSf()); + + if (mag(averagePsi)/mag(average_) > 0.5) + { + newValues *= mag(average_)/mag(averagePsi); + } + else + { + newValues += (average_ - averagePsi); + } + } + + this->operator==(newValues); + + if (debug) + { + Info<< "directMapped on field:" << fieldName_ + << " patch:" << this->patch().name() + << " avg:" << gAverage(*this) + << " min:" << gMin(*this) + << " max:" << gMax(*this) + << endl; + } + + fixedValueFvPatchField::updateCoeffs(); +} + + +template +void directMappedNamedFixedValueFvPatchField::write(Ostream& os) const +{ + fvPatchField::write(os); + os.writeKeyword("fieldName") << fieldName_ << token::END_STATEMENT << nl; + os.writeKeyword("setAverage") << setAverage_ << token::END_STATEMENT << nl; + os.writeKeyword("average") << average_ << token::END_STATEMENT << nl; + this->writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamedFixedValueFvPatchField.H b/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamedFixedValueFvPatchField.H new file mode 100644 index 0000000000..711ed1ec98 --- /dev/null +++ b/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamedFixedValueFvPatchField.H @@ -0,0 +1,164 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::directMappedNamedFixedValueFvPatchField + +Description + Variant of directMappedFixedValueFvPatch where the name of the field to + map is input. + +SourceFiles + directMappedNamedFixedValueFvPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef directMappedNamedFixedValueFvPatchField_H +#define directMappedNamedFixedValueFvPatchField_H + +#include "fixedValueFvPatchField.H" +#include "directMappedFvPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class directMappedNamesFixedValueFvPatchField Declaration +\*---------------------------------------------------------------------------*/ + +template +class directMappedNamedFixedValueFvPatchField +: + public fixedValueFvPatchField +{ + // Private data + + //- Name of field to sample - defaults to field associated with this + // patch if not specified + word fieldName_; + + //- If true adjust the mapped field to maintain average value average_ + bool setAverage_; + + //- Average value the mapped field is adjusted to maintain if + // setAverage_ is set true + Type average_; + + +public: + + //- Runtime type information + TypeName("directMappedNamedFixedValue"); + + + // Constructors + + //- Construct from patch and internal field + directMappedNamedFixedValueFvPatchField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + directMappedNamedFixedValueFvPatchField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given directMappedNamedFixedValueFvPatchField + // onto a new patch + directMappedNamedFixedValueFvPatchField + ( + const directMappedNamedFixedValueFvPatchField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + directMappedNamedFixedValueFvPatchField + ( + const directMappedNamedFixedValueFvPatchField& + ); + + //- Construct and return a clone + virtual tmp > clone() const + { + return tmp > + ( + new directMappedNamedFixedValueFvPatchField(*this) + ); + } + + //- Construct as copy setting internal field reference + directMappedNamedFixedValueFvPatchField + ( + const directMappedNamedFixedValueFvPatchField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp > clone + ( + const DimensionedField& iF + ) const + { + return tmp > + ( + new directMappedNamedFixedValueFvPatchField(*this, iF) + ); + } + + + // Member functions + + // Evaluation functions + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "directMappedNamedFixedValueFvPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamedFixedValueFvPatchFields.C b/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamedFixedValueFvPatchFields.C new file mode 100644 index 0000000000..849cc55825 --- /dev/null +++ b/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamedFixedValueFvPatchFields.C @@ -0,0 +1,43 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "directMappedNamedFixedValueFvPatchFields.H" +#include "volMesh.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makePatchFields(directMappedNamedFixedValue); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamedFixedValueFvPatchFields.H b/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamedFixedValueFvPatchFields.H new file mode 100644 index 0000000000..2f815fb81a --- /dev/null +++ b/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamedFixedValueFvPatchFields.H @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can 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 . + +\*---------------------------------------------------------------------------*/ + +#ifndef directMappedNamedFixedValueFvPatchFields_H +#define directMappedNamedFixedValueFvPatchFields_H + +#include "directMappedNamedFixedValueFvPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePatchTypeFieldTypedefs(directMappedNamedFixedValue) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamedFixedValueFvPatchFieldsFwd.H b/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamedFixedValueFvPatchFieldsFwd.H new file mode 100644 index 0000000000..c7d6e5c11c --- /dev/null +++ b/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamedFixedValueFvPatchFieldsFwd.H @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can 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 . + +\*---------------------------------------------------------------------------*/ + +#ifndef directMappedNamedFixedValueFvPatchFieldsFwd_H +#define directMappedNamedFixedValueFvPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template class directMappedNamedFixedValueFvPatchField; + +makePatchTypeFieldTypedefs(directMappedNamedFixedValue) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamesFixedValueFvPatchFieldsFwd.H b/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamesFixedValueFvPatchFieldsFwd.H new file mode 100644 index 0000000000..c7d6e5c11c --- /dev/null +++ b/src/surfaceFilmModels/derivedFvPatchFields/directMappedNamedFixedValue/directMappedNamesFixedValueFvPatchFieldsFwd.H @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can 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 . + +\*---------------------------------------------------------------------------*/ + +#ifndef directMappedNamedFixedValueFvPatchFieldsFwd_H +#define directMappedNamedFixedValueFvPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template class directMappedNamedFixedValueFvPatchField; + +makePatchTypeFieldTypedefs(directMappedNamedFixedValue) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C b/src/surfaceFilmModels/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C new file mode 100644 index 0000000000..c8ca479b6a --- /dev/null +++ b/src/surfaceFilmModels/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C @@ -0,0 +1,165 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "htcConvFvPatchScalarField.H" +#include "RASModel.H" +#include "fvPatchFieldMapper.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ +namespace RASModels +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +htcConvFvPatchScalarField::htcConvFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + fixedValueFvPatchScalarField(p, iF), + L_(1.0) +{} + + +htcConvFvPatchScalarField::htcConvFvPatchScalarField +( + const htcConvFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + fixedValueFvPatchScalarField(ptf, p, iF, mapper), + L_(ptf.L_) +{} + + +htcConvFvPatchScalarField::htcConvFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + fixedValueFvPatchScalarField(p, iF, dict), + L_(readScalar(dict.lookup("L"))) +{} + + +htcConvFvPatchScalarField::htcConvFvPatchScalarField +( + const htcConvFvPatchScalarField& htcpsf +) +: + fixedValueFvPatchScalarField(htcpsf), + L_(htcpsf.L_) +{} + + +htcConvFvPatchScalarField::htcConvFvPatchScalarField +( + const htcConvFvPatchScalarField& htcpsf, + const DimensionedField& iF +) +: + fixedValueFvPatchScalarField(htcpsf, iF), + L_(htcpsf.L_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void htcConvFvPatchScalarField::updateCoeffs() +{ + if (updated()) + { + return; + } + + const label patchI = patch().index(); + + const RASModel& rasModel = db().lookupObject("RASProperties"); + const scalarField alphaEffw = rasModel.alphaEff()().boundaryField()[patchI]; + const scalarField& muw = rasModel.mu().boundaryField()[patchI]; + const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; + const vectorField& Uc = rasModel.U(); + const vectorField& Uw = rasModel.U().boundaryField()[patchI]; + const scalarField& Tw = rasModel.thermo().T().boundaryField()[patchI]; + const scalarField Cpw = rasModel.thermo().Cp(Tw, patchI); + + const scalarField kappaw = Cpw*alphaEffw; + const scalarField Pr = muw*Cpw/kappaw; + + scalarField& htc = *this; + forAll(htc, faceI) + { + label faceCellI = patch().faceCells()[faceI]; + + scalar Re = rhow[faceI]*mag(Uc[faceCellI] - Uw[faceI])*L_/muw[faceI]; + + if (Re < 5.0E+05) + { + htc[faceI] = 0.664*sqrt(Re)*cbrt(Pr[faceI])*kappaw[faceI]/L_; + } + else + { + htc[faceI] = 0.037*pow(Re, 0.8)*cbrt(Pr[faceI])*kappaw[faceI]/L_; + } + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void htcConvFvPatchScalarField::write(Ostream& os) const +{ + fvPatchField::write(os); + os.writeKeyword("L") << L_ << token::END_STATEMENT << nl; + writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePatchTypeField +( + fvPatchScalarField, + htcConvFvPatchScalarField +); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace RASModels +} // End namespace compressible +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.H b/src/surfaceFilmModels/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.H new file mode 100644 index 0000000000..4b5585e578 --- /dev/null +++ b/src/surfaceFilmModels/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.H @@ -0,0 +1,159 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::compressible::RASModels::htcConvFvPatchScalarField + +Description + Convective heat transfer boundary condition + +SourceFiles + htcConvFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef compressibleMutRoughWallFunctionFvPatchScalarField_H +#define compressibleMutRoughWallFunctionFvPatchScalarField_H + +#include "fixedValueFvPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ +namespace RASModels +{ + +/*---------------------------------------------------------------------------*\ + Class htcConvFvPatchScalarField Declaration +\*---------------------------------------------------------------------------*/ + +class htcConvFvPatchScalarField +: + public fixedValueFvPatchScalarField +{ +protected: + + // Protected data + + //- L Length scale [m] + const scalar L_; + + +public: + + //- Runtime type information + TypeName("htcConvection"); + + + // Constructors + + //- Construct from patch and internal field + htcConvFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + htcConvFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given + // htcConvFvPatchScalarField + // onto a new patch + htcConvFvPatchScalarField + ( + const htcConvFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + htcConvFvPatchScalarField + ( + const htcConvFvPatchScalarField& + ); + + //- Construct and return a clone + virtual tmp clone() const + { + return tmp + ( + new htcConvFvPatchScalarField(*this) + ); + } + + //- Construct as copy setting internal field reference + htcConvFvPatchScalarField + ( + const htcConvFvPatchScalarField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp clone + ( + const DimensionedField& iF + ) const + { + return tmp + ( + new htcConvFvPatchScalarField(*this, iF) + ); + } + + + // Member functions + + // Evaluation functions + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + + // I-O + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace RASModels +} // End namespace compressible +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C b/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C new file mode 100644 index 0000000000..3a43ceaa7a --- /dev/null +++ b/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C @@ -0,0 +1,247 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "alphatFilmWallFunctionFvPatchScalarField.H" +#include "RASModel.H" +#include "surfaceFilmModel.H" +#include "fvPatchFieldMapper.H" +#include "volFields.H" +#include "addToRunTimeSelectionTable.H" +#include "directMappedWallPolyPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ +namespace RASModels +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +alphatFilmWallFunctionFvPatchScalarField:: +alphatFilmWallFunctionFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + fixedValueFvPatchScalarField(p, iF), + B_(5.5), + yPlusCrit_(11.05), + Cmu_(0.09), + kappa_(0.41), + Prt_(0.85) +{} + + +alphatFilmWallFunctionFvPatchScalarField:: +alphatFilmWallFunctionFvPatchScalarField +( + const alphatFilmWallFunctionFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + fixedValueFvPatchScalarField(ptf, p, iF, mapper), + B_(ptf.B_), + yPlusCrit_(ptf.yPlusCrit_), + Cmu_(ptf.Cmu_), + kappa_(ptf.kappa_), + Prt_(ptf.Prt_) +{} + + +alphatFilmWallFunctionFvPatchScalarField:: +alphatFilmWallFunctionFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + fixedValueFvPatchScalarField(p, iF, dict), + B_(dict.lookupOrDefault("B", 5.5)), + yPlusCrit_(dict.lookupOrDefault("yPlusCrit", 11.05)), + Cmu_(dict.lookupOrDefault("Cmu", 0.09)), + kappa_(dict.lookupOrDefault("kappa", 0.41)), + Prt_(dict.lookupOrDefault("Prt", 0.85)) +{} + + +alphatFilmWallFunctionFvPatchScalarField:: +alphatFilmWallFunctionFvPatchScalarField +( + const alphatFilmWallFunctionFvPatchScalarField& fwfpsf +) +: + fixedValueFvPatchScalarField(fwfpsf), + B_(fwfpsf.B_), + yPlusCrit_(fwfpsf.yPlusCrit_), + Cmu_(fwfpsf.Cmu_), + kappa_(fwfpsf.kappa_), + Prt_(fwfpsf.Prt_) +{} + + +alphatFilmWallFunctionFvPatchScalarField:: +alphatFilmWallFunctionFvPatchScalarField +( + const alphatFilmWallFunctionFvPatchScalarField& fwfpsf, + const DimensionedField& iF +) +: + fixedValueFvPatchScalarField(fwfpsf, iF), + B_(fwfpsf.B_), + yPlusCrit_(fwfpsf.yPlusCrit_), + Cmu_(fwfpsf.Cmu_), + kappa_(fwfpsf.kappa_), + Prt_(fwfpsf.Prt_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs() +{ + if (updated()) + { + return; + } + + bool ok = + db().objectRegistry::foundObject + ("surfaceFilmProperties"); + + if (!ok) + { + // do nothing on construction - film model doesn't exist yet + return; + } + + const label patchI = patch().index(); + + // Retrieve phase change mass from surface film model + const surfaceFilmModels::surfaceFilmModel& filmModel = + db().objectRegistry::lookupObject + ("surfaceFilmProperties"); + + const directMappedWallPolyPatch& wpp = + refCast(patch().patch()); + const mapDistribute& distMap = wpp.map(); + label filmPatchI = -1; + forAll(filmModel.primaryPatchIDs(), i) + { + if (filmModel.primaryPatchIDs()[i] == patchI) + { + filmPatchI = filmModel.filmBottomPatchIDs()[i]; + break; + } + } + + scalarField mDotFilm = + filmModel.massPhaseChangeForPrimary().boundaryField()[filmPatchI]; + distMap.distribute(mDotFilm); + + // Retrieve RAS turbulence model + const RASModel& rasModel = db().lookupObject("RASProperties"); + + const scalarField& y = rasModel.y()[patchI]; + const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; + const tmp tk = rasModel.k(); + const volScalarField& k = tk(); + const scalarField& muw = rasModel.mu().boundaryField()[patchI]; + const scalarField& alphaw = rasModel.alpha().boundaryField()[patchI]; + + const scalar Cmu25 = pow(Cmu_, 0.25); + + // Populate alphat field values + scalarField& alphat = *this; + forAll(alphat, faceI) + { + label faceCellI = patch().faceCells()[faceI]; + + scalar uTau = Cmu25*sqrt(k[faceCellI]); + + scalar yPlus = y[faceI]*uTau/(muw[faceI]/rhow[faceI]); + + scalar Pr = muw[faceI]/alphaw[faceI]; + + scalar factor = 0.0; + scalar mStar = mDotFilm[faceI]/(y[faceI]*uTau); + if (yPlus > yPlusCrit_) + { + scalar expTerm = exp(min(50.0, yPlusCrit_*mStar*Pr)); + scalar yPlusRatio = yPlus/yPlusCrit_; + scalar powTerm = mStar*Prt_/kappa_; + factor = + mStar/(expTerm*(pow(yPlusRatio, powTerm)) - 1.0 + ROOTVSMALL); + } + else + { + scalar expTerm = exp(min(50.0, yPlus*mStar*Pr)); + factor = mStar/(expTerm - 1.0 + ROOTVSMALL); + } + + scalar dx = patch().deltaCoeffs()[faceI]; + + scalar alphaEff = dx*rhow[faceI]*uTau*factor; + + alphat[faceI] = max(alphaEff - alphaw[faceI], 0.0); + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void alphatFilmWallFunctionFvPatchScalarField::write(Ostream& os) const +{ + fvPatchField::write(os); + os.writeKeyword("B") << B_ << token::END_STATEMENT << nl; + os.writeKeyword("yPlusCrit") << yPlusCrit_ << token::END_STATEMENT << nl; + os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; + os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; + os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl; + writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePatchTypeField +( + fvPatchScalarField, + alphatFilmWallFunctionFvPatchScalarField +); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace RASModels +} // End namespace compressible +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.H b/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.H new file mode 100644 index 0000000000..c899e853da --- /dev/null +++ b/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.H @@ -0,0 +1,172 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::compressible::RASModels::alphatFilmWallFunctionFvPatchScalarField + +Description + Turbulent thermal diffusivity boundary conditions for use with surface + film models. + +SourceFiles + alphatFilmWallFunctionFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef compressibleMutRoughWallFunctionFvPatchScalarField_H +#define compressibleMutRoughWallFunctionFvPatchScalarField_H + +#include "fixedValueFvPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ +namespace RASModels +{ + +/*---------------------------------------------------------------------------*\ + Class alphatFilmWallFunctionFvPatchScalarField Declaration +\*---------------------------------------------------------------------------*/ + +class alphatFilmWallFunctionFvPatchScalarField +: + public fixedValueFvPatchScalarField +{ +protected: + + // Protected data + + //- B Coefficient (default = 5.5) + scalar B_; + + //- y+ value for laminar -> turbulent transition (default = 11.05) + scalar yPlusCrit_; + + //- Turbulent Cmu coefficient (default = 0.09) + scalar Cmu_; + + //- Von-Karman constant (default = 0.41) + scalar kappa_; + + //- Turbulent Prandtl number (default = 0.85) + scalar Prt_; + + +public: + + //- Runtime type information + TypeName("alphatFilmWallFunction"); + + + // Constructors + + //- Construct from patch and internal field + alphatFilmWallFunctionFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + alphatFilmWallFunctionFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given + // alphatFilmWallFunctionFvPatchScalarField + // onto a new patch + alphatFilmWallFunctionFvPatchScalarField + ( + const alphatFilmWallFunctionFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + alphatFilmWallFunctionFvPatchScalarField + ( + const alphatFilmWallFunctionFvPatchScalarField& + ); + + //- Construct and return a clone + virtual tmp clone() const + { + return tmp + ( + new alphatFilmWallFunctionFvPatchScalarField(*this) + ); + } + + //- Construct as copy setting internal field reference + alphatFilmWallFunctionFvPatchScalarField + ( + const alphatFilmWallFunctionFvPatchScalarField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp clone + ( + const DimensionedField& iF + ) const + { + return tmp + ( + new alphatFilmWallFunctionFvPatchScalarField(*this, iF) + ); + } + + + // Member functions + + // Evaluation functions + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + + // I-O + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace RASModels +} // End namespace compressible +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutFilmWallFunction/mutFilmWallFunctionFvPatchScalarField.C b/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutFilmWallFunction/mutFilmWallFunctionFvPatchScalarField.C new file mode 100644 index 0000000000..f7a44c586a --- /dev/null +++ b/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutFilmWallFunction/mutFilmWallFunctionFvPatchScalarField.C @@ -0,0 +1,246 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can 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 (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "mutFilmWallFunctionFvPatchScalarField.H" +#include "fvPatchFieldMapper.H" +#include "volFields.H" +#include "RASModel.H" +#include "addToRunTimeSelectionTable.H" +#include "surfaceFilmModel.H" +#include "directMappedWallPolyPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ +namespace RASModels +{ + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +tmp mutFilmWallFunctionFvPatchScalarField::calcUTau +( + const scalarField& magGradU +) const +{ + tmp tuTau(new scalarField(patch().size(), 0.0)); + scalarField& uTau = tuTau(); + + bool ok = + db().objectRegistry::foundObject + ("surfaceFilmProperties"); + + if (!ok) + { + // do nothing on construction - film model doesn't exist yet + return tuTau; + } + + const label patchI = patch().index(); + + // Retrieve phase change mass from surface film model + const surfaceFilmModels::surfaceFilmModel& filmModel = + db().objectRegistry::lookupObject + ("surfaceFilmProperties"); + + const directMappedWallPolyPatch& wpp = + refCast(patch().patch()); + const mapDistribute& distMap = wpp.map(); + label filmPatchI = -1; + forAll(filmModel.primaryPatchIDs(), i) + { + if (filmModel.primaryPatchIDs()[i] == patchI) + { + filmPatchI = filmModel.filmBottomPatchIDs()[i]; + break; + } + } + + scalarField mDotFilm = + filmModel.massPhaseChangeForPrimary().boundaryField()[filmPatchI]; + distMap.distribute(mDotFilm); + + + // Retrieve RAS turbulence model + const RASModel& rasModel = db().lookupObject("RASProperties"); + const scalarField& y = rasModel.y()[patchI]; + const fvPatchScalarField& rhow = rasModel.rho().boundaryField()[patchI]; + const fvPatchScalarField& muw = rasModel.mu().boundaryField()[patchI]; + const tmp tk = rasModel.k(); + const volScalarField& k = tk(); + + const scalar Cmu25 = pow(Cmu_, 0.25); + + forAll(uTau, faceI) + { + label faceCellI = patch().faceCells()[faceI]; + + scalar ut = Cmu25*sqrt(k[faceCellI]); + + scalar yPlus = y[faceI]*ut/(muw[faceI]/rhow[faceI]); + + scalar mStar = mDotFilm[faceI]/(y[faceI]*ut); + + scalar factor = 0.0; + if (yPlus > yPlusCrit_) + { + scalar expTerm = exp(min(50.0, B_*mStar)); + scalar powTerm = pow(yPlus, mStar/kappa_); + factor = mStar/(expTerm*powTerm - 1.0 + ROOTVSMALL); + } + else + { + scalar expTerm = exp(min(50.0, mStar)); + factor = mStar/(expTerm*yPlus - 1.0 + ROOTVSMALL); + } + + uTau[faceI] = sqrt(max(0, magGradU[faceI]*ut*factor)); + } + + return tuTau; +} + + +tmp mutFilmWallFunctionFvPatchScalarField::calcMut() const +{ + const label patchI = patch().index(); + + const RASModel& rasModel = db().lookupObject("RASProperties"); + const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; + const scalarField magGradU = mag(Uw.snGrad()); + const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; + const scalarField& muw = rasModel.mu().boundaryField()[patchI]; + + return max + ( + scalar(0), + rhow*sqr(calcUTau(magGradU))/(magGradU + ROOTVSMALL) - muw + ); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +mutFilmWallFunctionFvPatchScalarField::mutFilmWallFunctionFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + mutkWallFunctionFvPatchScalarField(p, iF), + B_(5.5), + yPlusCrit_(11.05) +{} + + +mutFilmWallFunctionFvPatchScalarField::mutFilmWallFunctionFvPatchScalarField +( + const mutFilmWallFunctionFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper), + B_(5.5), + yPlusCrit_(11.05) +{} + + +mutFilmWallFunctionFvPatchScalarField::mutFilmWallFunctionFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + mutkWallFunctionFvPatchScalarField(p, iF, dict), + B_(dict.lookupOrDefault("B", 5.5)), + yPlusCrit_(dict.lookupOrDefault("yPlusCrit", 11.05)) +{} + + +mutFilmWallFunctionFvPatchScalarField::mutFilmWallFunctionFvPatchScalarField +( + const mutFilmWallFunctionFvPatchScalarField& wfpsf +) +: + mutkWallFunctionFvPatchScalarField(wfpsf), + B_(wfpsf.B_), + yPlusCrit_(wfpsf.yPlusCrit_) +{} + + +mutFilmWallFunctionFvPatchScalarField::mutFilmWallFunctionFvPatchScalarField +( + const mutFilmWallFunctionFvPatchScalarField& wfpsf, + const DimensionedField& iF +) +: + mutkWallFunctionFvPatchScalarField(wfpsf, iF), + B_(wfpsf.B_), + yPlusCrit_(wfpsf.yPlusCrit_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +tmp mutFilmWallFunctionFvPatchScalarField::yPlus() const +{ + const label patchI = patch().index(); + + const RASModel& rasModel = db().lookupObject("RASProperties"); + const scalarField& y = rasModel.y()[patchI]; + const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; + const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; + const scalarField& muw = rasModel.mu().boundaryField()[patchI]; + + return y*calcUTau(mag(Uw.snGrad()))/(muw/rhow); +} + + +void mutFilmWallFunctionFvPatchScalarField::write(Ostream& os) const +{ + fvPatchField::write(os); + writeLocalEntries(os); + os.writeKeyword("B") << B_ << token::END_STATEMENT << nl; + os.writeKeyword("yPlusCrit") << yPlusCrit_ << token::END_STATEMENT << nl; + writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePatchTypeField(fvPatchScalarField, mutFilmWallFunctionFvPatchScalarField); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace RASModels +} // End namespace compressible +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutFilmWallFunction/mutFilmWallFunctionFvPatchScalarField.H b/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutFilmWallFunction/mutFilmWallFunctionFvPatchScalarField.H new file mode 100644 index 0000000000..e6a40f5f78 --- /dev/null +++ b/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutFilmWallFunction/mutFilmWallFunctionFvPatchScalarField.H @@ -0,0 +1,172 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can 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 (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::compressible::RASModels:: + mutFilmWallFunctionFvPatchScalarField + +Description + Wall function boundary condition for use with surface film models. + +SourceFiles + mutFilmWallFunctionFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef compressibleMutSpalartAllmarasWallFunctionFvPatchScalarField_H +#define compressibleMutSpalartAllmarasWallFunctionFvPatchScalarField_H + +#include "mutkWallFunctionFvPatchScalarField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ +namespace RASModels +{ + +/*---------------------------------------------------------------------------*\ + Class mutFilmWallFunctionFvPatchScalarField Declaration +\*---------------------------------------------------------------------------*/ + +class mutFilmWallFunctionFvPatchScalarField +: + public mutkWallFunctionFvPatchScalarField +{ +protected: + + // Protected data + + //- B Coefficient (default = 5.5) + scalar B_; + + //- y+ value for laminar -> turbulent transition (default = 11.05) + scalar yPlusCrit_; + + + // Protected member functions + + //- Calculate the turbulence viscosity + virtual tmp calcMut() const; + + //- Calculate the friction velocity + virtual tmp calcUTau(const scalarField& magGradU) const; + + +public: + + //- Runtime type information + TypeName("mutFilmWallFunction"); + + + // Constructors + + //- Construct from patch and internal field + mutFilmWallFunctionFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + mutFilmWallFunctionFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given + // mutFilmWallFunctionFvPatchScalarField + // onto a new patch + mutFilmWallFunctionFvPatchScalarField + ( + const mutFilmWallFunctionFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + mutFilmWallFunctionFvPatchScalarField + ( + const mutFilmWallFunctionFvPatchScalarField& + ); + + //- Construct and return a clone + virtual tmp clone() const + { + return tmp + ( + new mutFilmWallFunctionFvPatchScalarField(*this) + ); + } + + //- Construct as copy setting internal field reference + mutFilmWallFunctionFvPatchScalarField + ( + const mutFilmWallFunctionFvPatchScalarField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp clone + ( + const DimensionedField& iF + ) const + { + return tmp + ( + new mutFilmWallFunctionFvPatchScalarField(*this, iF) + ); + } + + + // Member functions + + // Evaluation functions + + //- Calculate and return the yPlus at the boundary + virtual tmp yPlus() const; + + + // I-O + + //- Write + virtual void write(Ostream& os) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace RASModels +} // End namespace compressible +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjection.C b/src/surfaceFilmModels/submodels/kinematic/injectionModel/cloudInjection/cloudInjection.C similarity index 91% rename from src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjection.C rename to src/surfaceFilmModels/submodels/kinematic/injectionModel/cloudInjection/cloudInjection.C index 8f41c43758..a1993a7e33 100644 --- a/src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjection.C +++ b/src/surfaceFilmModels/submodels/kinematic/injectionModel/cloudInjection/cloudInjection.C @@ -31,8 +31,6 @@ License #include "Random.H" #include "volFields.H" -using namespace Foam::constant; - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam @@ -54,14 +52,6 @@ Foam::surfaceFilmModels::cloudInjection::cloudInjection ) : injectionModel(type(), owner, dict), - cloudName_(coeffs_.lookup("cloudName")), - cloud_ - ( - const_cast - ( - owner.mesh().lookupObject(cloudName_) - ) - ), particlesPerParcel_(readScalar(coeffs_.lookup("particlesPerParcel"))), rndGen_(label(0)), parcelPDF_(pdfs::pdf::New(coeffs_.subDict("parcelPDF"), rndGen_)), @@ -88,6 +78,7 @@ void Foam::surfaceFilmModels::cloudInjection::correct scalarField& diameterToInject ) { + const scalar pi = constant::mathematical::pi; const scalarField& rhoFilm = owner().rho(); // Collect the data to be transferred @@ -95,7 +86,7 @@ void Foam::surfaceFilmModels::cloudInjection::correct { scalar rho = rhoFilm[cellI]; scalar diam = diameter_[cellI]; - scalar minMass = particlesPerParcel_*rho*mathematical::pi/6*pow3(diam); + scalar minMass = particlesPerParcel_*rho*pi/6*pow3(diam); if (massToInject[cellI] > minMass) { diff --git a/src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjection.H b/src/surfaceFilmModels/submodels/kinematic/injectionModel/cloudInjection/cloudInjection.H similarity index 86% rename from src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjection.H rename to src/surfaceFilmModels/submodels/kinematic/injectionModel/cloudInjection/cloudInjection.H index ec9d544e16..01c9f5eedb 100644 --- a/src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjection.H +++ b/src/surfaceFilmModels/submodels/kinematic/injectionModel/cloudInjection/cloudInjection.H @@ -36,7 +36,6 @@ SourceFiles #define cloudInjection_H #include "injectionModel.H" -#include "kinematicCloud.H" #include "pdf.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -69,12 +68,6 @@ protected: // Protected data - //- Name of the cloud owner for newly ejected parcels - word cloudName_; - - //- Reference to the cloud - kinematicCloud& cloud_; - //- Number of particles per parcel scalar particlesPerParcel_; @@ -106,15 +99,6 @@ public: // Member Functions - // Access - - //- Return the cloud name - inline const word& cloudName() const; - - //- Return a reference to the cloud - inline const kinematicCloud& cloud() const; - - // Evolution //- Correct @@ -133,10 +117,6 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "cloudInjectionI.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - #endif // ************************************************************************* // diff --git a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModel.C b/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModel.C index 96d59420ca..fe3e0d9e77 100644 --- a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModel.C +++ b/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModel.C @@ -41,8 +41,7 @@ namespace Foam Foam::surfaceFilmModels::injectionModel::injectionModel ( - const surfaceFilmModel& owner, - const dictionary& dict + const surfaceFilmModel& owner ) : owner_(owner), diff --git a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModel.H b/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModel.H index bc140539bf..539184c745 100644 --- a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModel.H +++ b/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModel.H @@ -25,6 +25,15 @@ Class Foam::injectionModel Description + Injection model class for use with surface film modelling + + Sets the newly injected fluid properties by manipulating two arrays: + + - massToInject + - diameterToInject + + This mass is later subtracted from the film + SourceFiles injectionModelI.H @@ -97,7 +106,7 @@ public: // Constructors //- Construct null - injectionModel(const surfaceFilmModel& owner, const dictionary& dict); + injectionModel(const surfaceFilmModel& owner); //- Construct from type name, dictionary and surface film model injectionModel diff --git a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C b/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C index 07bfb64cdf..7bddebcc8e 100644 --- a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C +++ b/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C @@ -34,7 +34,7 @@ Foam::surfaceFilmModels::injectionModel::New const dictionary& dict ) { - const word modelType(dict.lookup("injectionModel")); + word modelType(dict.lookup("injectionModel")); Info<< " Selecting injectionModel " << modelType << endl; diff --git a/src/surfaceFilmModels/submodels/kinematic/injectionModel/noInjection/noInjection.C b/src/surfaceFilmModels/submodels/kinematic/injectionModel/noInjection/noInjection.C index 39d2c34706..f696f1a1bc 100644 --- a/src/surfaceFilmModels/submodels/kinematic/injectionModel/noInjection/noInjection.C +++ b/src/surfaceFilmModels/submodels/kinematic/injectionModel/noInjection/noInjection.C @@ -43,10 +43,10 @@ namespace Foam Foam::surfaceFilmModels::noInjection::noInjection ( const surfaceFilmModel& owner, - const dictionary& dict + const dictionary& ) : - injectionModel(owner, dict) + injectionModel(owner) {} diff --git a/src/surfaceFilmModels/submodels/kinematic/injectionModel/removeInjection/removeInjection.C b/src/surfaceFilmModels/submodels/kinematic/injectionModel/removeInjection/removeInjection.C index 58fbd9fe5a..97d9bb00aa 100644 --- a/src/surfaceFilmModels/submodels/kinematic/injectionModel/removeInjection/removeInjection.C +++ b/src/surfaceFilmModels/submodels/kinematic/injectionModel/removeInjection/removeInjection.C @@ -43,10 +43,10 @@ namespace Foam Foam::surfaceFilmModels::removeInjection::removeInjection ( const surfaceFilmModel& owner, - const dictionary& dict + const dictionary& ) : - injectionModel(owner, dict) + injectionModel(owner) {} diff --git a/src/surfaceFilmModels/submodels/kinematic/injectionModel/removeInjection/removeInjection.H b/src/surfaceFilmModels/submodels/kinematic/injectionModel/removeInjection/removeInjection.H index 4fc4a63fc4..9c651560f8 100644 --- a/src/surfaceFilmModels/submodels/kinematic/injectionModel/removeInjection/removeInjection.H +++ b/src/surfaceFilmModels/submodels/kinematic/injectionModel/removeInjection/removeInjection.H @@ -66,7 +66,7 @@ private: public: //- Runtime type information - TypeName("remove"); + TypeName("removeInjection"); // Constructors diff --git a/src/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C b/src/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C new file mode 100644 index 0000000000..682971f3a6 --- /dev/null +++ b/src/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C @@ -0,0 +1,105 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "constantHeatTransfer.H" +#include "volFields.H" +#include "addToRunTimeSelectionTable.H" +#include "zeroGradientFvPatchFields.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + namespace surfaceFilmModels + { + defineTypeNameAndDebug(constantHeatTransfer, 0); + addToRunTimeSelectionTable + ( + heatTransferModel, + constantHeatTransfer, + dictionary + ); + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::surfaceFilmModels::constantHeatTransfer::constantHeatTransfer +( + const surfaceFilmModel& owner, + const dictionary& dict +) +: + heatTransferModel(typeName, owner, dict), + c0_(readScalar(coeffs_.lookup("c0"))) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::surfaceFilmModels::constantHeatTransfer::~constantHeatTransfer() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +void Foam::surfaceFilmModels::constantHeatTransfer::correct() +{ + // do nothing +} + + +Foam::tmp +Foam::surfaceFilmModels::constantHeatTransfer::h() const +{ + return tmp + ( + new volScalarField + ( + IOobject + ( + "htc", + owner_.time().timeName(), + owner_.film(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + owner_.film(), + dimensionedScalar + ( + "c0", + dimEnergy/dimTime/sqr(dimLength)/dimTemperature, + c0_ + ), + zeroGradientFvPatchScalarField::typeName + ) + ); +} + + + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.H b/src/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.H new file mode 100644 index 0000000000..537e70fae2 --- /dev/null +++ b/src/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.H @@ -0,0 +1,114 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::constantHeatTransfer + +Description + Constant heat transfer model + +SourceFiles + constantHeatTransfer.C + +\*---------------------------------------------------------------------------*/ + +#ifndef constantHeatTransfer_H +#define constantHeatTransfer_H + +#include "heatTransferModel.H" +#include "volFieldsFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace surfaceFilmModels +{ + +/*---------------------------------------------------------------------------*\ + Class constantHeatTransfer Declaration +\*---------------------------------------------------------------------------*/ + +class constantHeatTransfer +: + public heatTransferModel +{ +private: + + // Private data + + //- Constant heat transfer coefficient [W/m2/K] + scalar c0_; + + + // Private member functions + + //- Disallow default bitwise copy construct + constantHeatTransfer(const constantHeatTransfer&); + + //- Disallow default bitwise assignment + void operator=(const constantHeatTransfer&); + + +public: + + //- Runtime type information + TypeName("constant"); + + + // Constructors + + //- Construct from surface film model and dictionary + constantHeatTransfer + ( + const surfaceFilmModel& owner, + const dictionary& dict + ); + + + //- Destructor + virtual ~constantHeatTransfer(); + + + // Member Functions + + // Evolution + + //- Correct + virtual void correct(); + + //- Return the heat transfer coefficient [W/m2/K] + virtual tmp h() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace surfaceFilmModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModel.C b/src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModel.C new file mode 100644 index 0000000000..b7ee185225 --- /dev/null +++ b/src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModel.C @@ -0,0 +1,69 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "heatTransferModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + namespace surfaceFilmModels + { + defineTypeNameAndDebug(heatTransferModel, 0); + defineRunTimeSelectionTable(heatTransferModel, dictionary); + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::surfaceFilmModels::heatTransferModel::heatTransferModel +( + const surfaceFilmModel& owner +) +: + owner_(owner) +{} + + +Foam::surfaceFilmModels::heatTransferModel::heatTransferModel +( + const word& type, + const surfaceFilmModel& owner, + const dictionary& dict +) +: + owner_(owner), + coeffs_(dict.subDict(type + "Coeffs")) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::surfaceFilmModels::heatTransferModel::~heatTransferModel() +{} + + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModel.H b/src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModel.H new file mode 100644 index 0000000000..25caf051d9 --- /dev/null +++ b/src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModel.H @@ -0,0 +1,159 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::heatTransferModel + +Description + Base class for heat transfer models + +SourceFiles + heatTransferModelI.H + heatTransferModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef heatTransferModel_H +#define heatTransferModel_H + +#include "surfaceFilmModel.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace surfaceFilmModels +{ + +/*---------------------------------------------------------------------------*\ + Class heatTransferModel Declaration +\*---------------------------------------------------------------------------*/ + +class heatTransferModel +{ +private: + + // Private Member Functions + + //- Disallow default bitwise copy construct + heatTransferModel(const heatTransferModel&); + + //- Disallow default bitwise assignment + void operator=(const heatTransferModel&); + + +protected: + + // Protected data + + //- Reference to the owner surface film model + const surfaceFilmModel& owner_; + + //- Model coefficients dictionary + dictionary coeffs_; + + +public: + + //- Runtime type information + TypeName("heatTransferModel"); + + + // Declare runtime constructor selection table + + declareRunTimeSelectionTable + ( + autoPtr, + heatTransferModel, + dictionary, + ( + const surfaceFilmModel& owner, + const dictionary& dict + ), + (owner, dict) + ); + + // Constructors + + //- Construct null + heatTransferModel(const surfaceFilmModel& owner); + + //- Construct from type name, dictionary and surface film model + heatTransferModel + ( + const word& type, + const surfaceFilmModel& owner, + const dictionary& dict + ); + + + // Selectors + + //- Return a reference to the selected phase change model + static autoPtr New + ( + const surfaceFilmModel& owner, + const dictionary& dict + ); + + + //- Destructor + virtual ~heatTransferModel(); + + + // Member Functions + + // Access + + //- Return the reference to the owner surface film model + inline const surfaceFilmModel& owner() const; + + //- Return the model coefficients dictionary + inline const dictionary& coeffs() const; + + + // Evolution + + //- Correct + virtual void correct() = 0; + + //- Return the heat transfer coefficient [W/m2/K] + virtual tmp h() const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace surfaceFilmModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "heatTransferModelI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjectionI.H b/src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModelI.H similarity index 78% rename from src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjectionI.H rename to src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModelI.H index 4c85267e6a..c9a99ffe29 100644 --- a/src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjectionI.H +++ b/src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModelI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,21 +23,21 @@ License \*---------------------------------------------------------------------------*/ -#include "cloudInjection.H" +#include "heatTransferModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -inline const Foam::word& -Foam::surfaceFilmModels::cloudInjection::cloudName() const +inline const Foam::surfaceFilmModels::surfaceFilmModel& +Foam::surfaceFilmModels::heatTransferModel::owner() const { - return cloudName_; + return owner_; } -inline const Foam::kinematicCloud& -Foam::surfaceFilmModels::cloudInjection::cloud() const +inline const Foam::dictionary& +Foam::surfaceFilmModels::heatTransferModel::coeffs() const { - return cloud_; + return coeffs_; } diff --git a/src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModelNew.C b/src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModelNew.C new file mode 100644 index 0000000000..e16c40afaf --- /dev/null +++ b/src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModelNew.C @@ -0,0 +1,59 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "heatTransferModel.H" + +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::surfaceFilmModels::heatTransferModel::New +( + const surfaceFilmModel& model, + const dictionary& dict +) +{ + word modelType(dict.lookup("heatTransferModel")); + + Info<< " Selecting heatTransferModel " << modelType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(modelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "heatTransferModel::New(const surfaceFilmModel&, const dictionary&)" + ) << "Unknown heatTransferModel type " << modelType << nl << nl + << "Valid heatTransferModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + return autoPtr(cstrIter()(model, dict)); +} + + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.C b/src/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.C new file mode 100644 index 0000000000..cfe6d577fe --- /dev/null +++ b/src/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.C @@ -0,0 +1,121 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "mappedConvectiveHeatTransfer.H" +#include "zeroGradientFvPatchFields.H" +#include "addToRunTimeSelectionTable.H" +#include "kinematicSingleLayer.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + namespace surfaceFilmModels + { + defineTypeNameAndDebug(mappedConvectiveHeatTransfer, 0); + addToRunTimeSelectionTable + ( + heatTransferModel, + mappedConvectiveHeatTransfer, + dictionary + ); + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::surfaceFilmModels::mappedConvectiveHeatTransfer:: +mappedConvectiveHeatTransfer +( + const surfaceFilmModel& owner, + const dictionary& dict +) +: +// heatTransferModel(typeName, owner, dict), + heatTransferModel(owner), + htcConvPrimary_ + ( + IOobject + ( + "htcConv", + owner.time().timeName(), + owner.mesh(), + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + owner.mesh() + ), + htcConvFilm_ + ( + IOobject + ( + htcConvPrimary_.name(), // must have same name as above for mapping + owner.time().timeName(), + owner.film(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + owner.film(), + dimensionedScalar("zero", dimMass/pow3(dimTime)/dimTemperature, 0.0), + refCast(owner).pSp().boundaryField().types() + ) +{ + // Update the primary-side convective heat transfer coefficient + htcConvPrimary_.correctBoundaryConditions(); + + // Pull the data from the primary region via direct mapped BCs + htcConvFilm_.correctBoundaryConditions(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::surfaceFilmModels::mappedConvectiveHeatTransfer:: +~mappedConvectiveHeatTransfer() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +void Foam::surfaceFilmModels::mappedConvectiveHeatTransfer::correct() +{ + // Update the primary-side convective heat transfer coefficient + htcConvPrimary_.correctBoundaryConditions(); + + // Pull the data from the primary region via direct mapped BCs + htcConvFilm_.correctBoundaryConditions(); +} + + +Foam::tmp +Foam::surfaceFilmModels::mappedConvectiveHeatTransfer::h() const +{ + return htcConvFilm_; +} + + + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.H b/src/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.H new file mode 100644 index 0000000000..8f02cb61ba --- /dev/null +++ b/src/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.H @@ -0,0 +1,120 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::mappedConvectiveHeatTransfer + +Description + Convective heat transfer model based on a re-working of a Nusselt number + correlation + +SourceFiles + mappedConvectiveHeatTransfer.C + +\*---------------------------------------------------------------------------*/ + +#ifndef mappedConvectiveHeatTransfer_H +#define mappedConvectiveHeatTransfer_H + +#include "heatTransferModel.H" +#include "volFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace surfaceFilmModels +{ + +/*---------------------------------------------------------------------------*\ + Class mappedConvectiveHeatTransfer Declaration +\*---------------------------------------------------------------------------*/ + +class mappedConvectiveHeatTransfer +: + public heatTransferModel +{ +private: + + // Private data + + //- Heat transfer coefficient - primary region [W/m2/K] + volScalarField htcConvPrimary_; + + //- Heat transfer coefficient - film region [W/m2/K] + // Assumes that the primary regtion to film region boundaries are + // described as directMappedPushed types + volScalarField htcConvFilm_; + + + // Private member functions + + //- Disallow default bitwise copy construct + mappedConvectiveHeatTransfer(const mappedConvectiveHeatTransfer&); + + //- Disallow default bitwise assignment + void operator=(const mappedConvectiveHeatTransfer&); + + +public: + + //- Runtime type information + TypeName("mappedConvectiveHeatTransfer"); + + + // Constructors + + //- Construct from surface film model and dictionary + mappedConvectiveHeatTransfer + ( + const surfaceFilmModel& owner, + const dictionary& dict + ); + + + //- Destructor + virtual ~mappedConvectiveHeatTransfer(); + + + // Member Functions + + // Evolution + + //- Correct + virtual void correct(); + + //- Return the heat transfer coefficient [W/m2/K] + virtual tmp h() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace surfaceFilmModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/noPhaseChange/noPhaseChange.C b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/noPhaseChange/noPhaseChange.C index 551bfb2a44..8e023485b5 100644 --- a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/noPhaseChange/noPhaseChange.C +++ b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/noPhaseChange/noPhaseChange.C @@ -43,10 +43,10 @@ namespace Foam Foam::surfaceFilmModels::noPhaseChange::noPhaseChange ( const surfaceFilmModel& owner, - const dictionary& dict + const dictionary& ) : - phaseChangeModel(owner, dict) + phaseChangeModel(owner) {} @@ -58,7 +58,12 @@ Foam::surfaceFilmModels::noPhaseChange::~noPhaseChange() // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -void Foam::surfaceFilmModels::noPhaseChange::correct() +void Foam::surfaceFilmModels::noPhaseChange::correct +( + const scalar, + scalarField&, + scalarField& +) { // do nothing } diff --git a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/noPhaseChange/noPhaseChange.H b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/noPhaseChange/noPhaseChange.H index 487e3c2b3c..e75a9f78c4 100644 --- a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/noPhaseChange/noPhaseChange.H +++ b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/noPhaseChange/noPhaseChange.H @@ -84,7 +84,12 @@ public: // Evolution //- Correct - virtual void correct(); + virtual void correct + ( + const scalar dt, + scalarField& dMass, + scalarField& dEnergy + ); }; diff --git a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModel.C b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModel.C index e2a0b93a75..7e7e310d61 100644 --- a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModel.C +++ b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModel.C @@ -41,8 +41,7 @@ namespace Foam Foam::surfaceFilmModels::phaseChangeModel::phaseChangeModel ( - const surfaceFilmModel& owner, - const dictionary& dict + const surfaceFilmModel& owner ) : owner_(owner), @@ -59,17 +58,7 @@ Foam::surfaceFilmModels::phaseChangeModel::phaseChangeModel : owner_(owner), coeffs_(dict.subDict(type + "Coeffs")) -{ - WarningIn - ( - "phaseChangeModel::phaseChangeModel" - "(" - "const word&, " - "const surfaceFilmModel&, " - "const dictionary&" - ")" - ) << "Phase change models not implemented!" << endl; -} +{} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModel.H b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModel.H index 87a08b1016..63f0c227c1 100644 --- a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModel.H +++ b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModel.H @@ -25,6 +25,7 @@ Class Foam::phaseChangeModel Description + Phase change model for surface film modelling. SourceFiles phaseChangeModelI.H @@ -37,6 +38,7 @@ SourceFiles #include "surfaceFilmModel.H" #include "runTimeSelectionTables.H" +#include "scalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -96,7 +98,7 @@ public: // Constructors //- Construct null - phaseChangeModel(const surfaceFilmModel& owner, const dictionary& dict); + phaseChangeModel(const surfaceFilmModel& owner); //- Construct from type name, dictionary and surface film model phaseChangeModel @@ -134,8 +136,13 @@ public: // Evolution - //- Correct // TODO - virtual void correct() = 0; + //- Correct + virtual void correct + ( + const scalar dt, + scalarField& dMass, + scalarField& dEnergy + ) = 0; }; diff --git a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C index 1ad7bd0b71..7cc04c0027 100644 --- a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C +++ b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C @@ -34,7 +34,7 @@ Foam::surfaceFilmModels::phaseChangeModel::New const dictionary& dict ) { - const word modelType(dict.lookup("phaseChangeModel")); + word modelType(dict.lookup("phaseChangeModel")); Info<< " Selecting phaseChangeModel " << modelType << endl; diff --git a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C new file mode 100644 index 0000000000..4619a4a76a --- /dev/null +++ b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C @@ -0,0 +1,183 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "standardPhaseChange.H" +#include "addToRunTimeSelectionTable.H" +#include "thermoSingleLayer.H" +#include "specie.H" +#include "heatTransferModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + namespace surfaceFilmModels + { + defineTypeNameAndDebug(standardPhaseChange, 0); + addToRunTimeSelectionTable + ( + phaseChangeModel, + standardPhaseChange, + dictionary + ); + } +} + + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +Foam::scalar Foam::surfaceFilmModels::standardPhaseChange::Sh +( + const scalar Re, + const scalar Sc +) const +{ + if (Re < 5.0E+05) + { + return 0.664*sqrt(Re)*cbrt(Sc); + } + else + { + return 0.037*pow(Re, 0.8)*cbrt(Sc); + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::surfaceFilmModels::standardPhaseChange::standardPhaseChange +( + const surfaceFilmModel& owner, + const dictionary& dict +) +: + phaseChangeModel(typeName, owner, dict), + deltaMin_(readScalar(coeffs_.lookup("deltaMin"))), + L_(readScalar(coeffs_.lookup("L"))) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::surfaceFilmModels::standardPhaseChange::~standardPhaseChange() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +void Foam::surfaceFilmModels::standardPhaseChange::correct +( + const scalar dt, + scalarField& dMass, + scalarField& dEnergy +) +{ + const thermoSingleLayer& film = refCast(owner_); + + // set local thermo properties + const SLGThermo& thermo = film.thermo(); + const label liqId = film.liquidId(); + const liquid& liq = thermo.liquids().properties()[liqId]; + const label vapId = thermo.carrierId(thermo.liquids().components()[liqId]); + + // retrieve fields from film model + const scalarField& delta = film.delta(); + const scalarField& YInf = film.YPrimary()[vapId]; + const scalarField& pInf = film.pPrimary(); + const scalarField& T = film.T(); + const scalarField& Ts = film.Ts(); + const scalarField& Tw = film.Tw(); + const scalarField& TInf = film.TPrimary(); + const scalarField& rho = film.rho(); + const scalarField& mu = film.mu(); + const scalarField& magSf = film.magSf(); + const scalarField hInf = film.htcs().h(); + const scalarField hFilm = film.htcw().h(); + const vectorField dU = film.UPrimary() - film.Us(); + const scalarField availableMass = delta*rho*magSf; + + // Reynolds number + const scalarField Re = rho*mag(dU)*L_/mu; + + // molecular weight of vapour + const scalar Wvap = thermo.carrier().W(vapId); + + // molecular weight of liquid + const scalar Wliq = liq.W(); + + forAll(dMass, cellI) + { + if (delta[cellI] > deltaMin_) + { + // cell pressure + const scalar pc = pInf[cellI]; + + // saturation pressure + const scalar pSat = liq.pv(pc, Ts[cellI]); + + // latent heat + const scalar hVap = liq.hl(pc, Ts[cellI]); + + // calculate mass transfer + if (pSat > pc) + { + // boiling + const scalar qDotInf = hInf[cellI]*(TInf[cellI] - T[cellI]); + const scalar qDotFilm = hFilm[cellI]*(T[cellI] - Tw[cellI]); + dMass[cellI] = dt*magSf[cellI]/hVap*(qDotInf - qDotFilm); + } + else + { + // vapour mass fraction at interface + const scalar Ys = Wliq*pSat/(Wliq*pSat + Wvap*(pc - pSat)); + + // bulk gas average density + const scalar rhoAve = pc/(specie::RR*Ts[cellI]); + + // vapour diffusivity [m2/s] + const scalar Dab = liq.D(pc, Ts[cellI]); + + // Schmidt number + const scalar Sc = mu[cellI]/(rho[cellI]*(Dab + ROOTVSMALL)); + + // Sherwood number + const scalar Sh = this->Sh(Re[cellI], Sc); + + // mass transfer coefficient [m/s] + const scalar hm = Sh*Dab/L_; + + // add mass contribution to source + dMass[cellI] = + dt*magSf[cellI]*rhoAve*hm*(Ys - YInf[cellI])/(1.0 - Ys); + } + + dMass[cellI] = min(availableMass[cellI], max(0.0, dMass[cellI])); + dEnergy[cellI] = dMass[cellI]*hVap; + } + } +} + + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.H b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.H new file mode 100644 index 0000000000..726f36e2cc --- /dev/null +++ b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.H @@ -0,0 +1,126 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::standardPhaseChange + +Description + + +SourceFiles + standardPhaseChange.C + +\*---------------------------------------------------------------------------*/ + +#ifndef standardPhaseChange_H +#define standardPhaseChange_H + +#include "phaseChangeModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace surfaceFilmModels +{ + +/*---------------------------------------------------------------------------*\ + Class standardPhaseChange Declaration +\*---------------------------------------------------------------------------*/ + +class standardPhaseChange +: + public phaseChangeModel +{ +private: + + // Private member functions + + //- Disallow default bitwise copy construct + standardPhaseChange(const standardPhaseChange&); + + //- Disallow default bitwise assignment + void operator=(const standardPhaseChange&); + + +protected: + + // Protected data + + //- Minimum film height for model to be active + const scalar deltaMin_; + + //- Length scalae / [m] + const scalar L_; + + + // Protected member functions + + //- Return Sherwood number as a function of Reynolds and Schmidt numbers + scalar Sh(const scalar Re, const scalar Sc) const; + + +public: + + //- Runtime type information + TypeName("standardPhaseChange"); + + + // Constructors + + //- Construct from surface film model + standardPhaseChange + ( + const surfaceFilmModel& owner, + const dictionary& dict + ); + + + //- Destructor + virtual ~standardPhaseChange(); + + + // Member Functions + + // Evolution + + //- Correct + virtual void correct + ( + const scalar dt, + scalarField& dMass, + scalarField& dEnergy + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace surfaceFilmModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C b/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C index 36f2899353..bbba0b5371 100644 --- a/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C @@ -1,1062 +1,1304 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "kinematicSingleLayer.H" -#include "fvm.H" -#include "fvcDiv.H" -#include "fvcLaplacian.H" -#include "fvcSnGrad.H" -#include "fvcReconstruct.H" -#include "fvcVolumeIntegrate.H" -#include "addToRunTimeSelectionTable.H" -#include "directMappedWallPolyPatch.H" - -// Sub-models -#include "injectionModel.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - namespace surfaceFilmModels - { - defineTypeNameAndDebug(kinematicSingleLayer, 0); - addToRunTimeSelectionTable - ( - surfaceFilmModel, - kinematicSingleLayer, - mesh - ); - } -} - - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -bool Foam::surfaceFilmModels::kinematicSingleLayer::read() -{ - if (surfaceFilmModel::read()) - { - const dictionary& solution = filmRegion_.solutionDict().subDict("PISO"); - solution.lookup("momentumPredictor") >> momentumPredictor_; - solution.lookup("nOuterCorr") >> nOuterCorr_; - solution.lookup("nCorr") >> nCorr_; - solution.lookup("nNonOrthCorr") >> nNonOrthCorr_; - - coeffs_.lookup("Cf") >> Cf_; - coeffs_.lookup("deltaStable") >> deltaStable_; - - return true; - } - else - { - return false; - } -} - - -void Foam::surfaceFilmModels::kinematicSingleLayer::initialise() -{ - if (debug) - { - Pout<< "kinematicSingleLayer::initialise()" << endl; - } - - label nBoundaryFaces = 0; - DynamicList