From 82dab7d6738ec9a7e351301b19a1fcf7410cb219 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 1 Feb 2010 13:14:34 +0000 Subject: [PATCH 01/20] ENH: Updated the porousExplicitSourceReactingParcelFoam solver to use the reacting multi-phase level of cloud/parcel - changes to createClouds.H - updated tutorial cases to reflect changes --- .../createClouds.H | 2 +- .../porousExplicitSourceReactingParcelFoam.C | 2 +- .../constant/reactingCloud1Properties | 21 ++++++++++++++++--- .../constant/reactingCloud1Properties | 21 ++++++++++++++++--- 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createClouds.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createClouds.H index 2accb8e1c9..74a66b63e8 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createClouds.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createClouds.H @@ -1,5 +1,5 @@ Info<< "\nConstructing reacting cloud" << endl; -icoPoly8ThermoReactingCloud parcels +icoPoly8ThermoReactingMultiphaseCloud parcels ( "reactingCloud1", rho, diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C index bf0a16af28..0e626f3127 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C @@ -43,7 +43,7 @@ Description #include "fvCFD.H" #include "hReactionThermo.H" #include "turbulenceModel.H" -#include "BasicReactingCloud.H" +#include "BasicReactingMultiphaseCloud.H" #include "rhoChemistryModel.H" #include "chemistrySolver.H" #include "radiationModel.H" diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/reactingCloud1Properties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/reactingCloud1Properties index e488fffacc..c320e60ae1 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/reactingCloud1Properties @@ -27,10 +27,14 @@ PatchInteractionModel StandardWallInteraction; HeatTransferModel RanzMarshall; -CompositionModel SinglePhaseMixture; +CompositionModel SingleMixtureFraction; PhaseChangeModel LiquidEvaporation; +DevolatilisationModel none; + +SurfaceReactionModel none; + PostProcessingModel none; radiation off; @@ -55,6 +59,8 @@ constantProperties Tvap Tvap [ 0 0 0 1 0 ] 284; Tbp Tbp [ 0 0 0 1 0 ] 373; Pr Pr [ 0 0 0 0 0 ] 0.7; + LDevol LDevol [ 0 0 0 0 0 ] 0; + hRetentionCoeff hRetentionCoeff [ 0 0 0 0 0 ] 1; constantVolume false; } @@ -110,15 +116,24 @@ RanzMarshallCoeffs BirdCorrection off; } -SinglePhaseMixtureCoeffs +SingleMixtureFractionCoeffs { phases ( + gas + { + } liquid { - H2O 1; + H2O 1; + } + solid + { } ); + YGasTot0 0; + YLiquidTot0 1; + YSolidTot0 0; } LiquidEvaporationCoeffs diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties index ddb7eaf3a9..1dbbf94c3f 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties @@ -27,10 +27,14 @@ PatchInteractionModel StandardWallInteraction; HeatTransferModel RanzMarshall; -CompositionModel SinglePhaseMixture; +CompositionModel SingleMixtureFraction; PhaseChangeModel LiquidEvaporation; +DevolatilisationModel none; + +SurfaceReactionModel none; + PostProcessingModel PatchPostProcessing; radiation off; @@ -55,6 +59,8 @@ constantProperties Tvap Tvap [ 0 0 0 1 0 ] 273; Tbp Tbp [ 0 0 0 1 0 ] 373; Pr Pr [ 0 0 0 0 0 ] 0.7; + LDevol LDevol [ 0 0 0 0 0 ] 0; + hRetentionCoeff hRetentionCoeff [ 0 0 0 0 0 ] 1; constantVolume false; } @@ -132,15 +138,24 @@ RanzMarshallCoeffs BirdCorrection off; } -SinglePhaseMixtureCoeffs +SingleMixtureFractionCoeffs { phases ( + gas + { + } liquid { - H2O 1; + H2O 1; + } + solid + { } ); + YGasTot0 0; + YLiquidTot0 1; + YSolidTot0 0; } LiquidEvaporationCoeffs From 2bb9a4dd2026f3a82a7ccc134d5b7c7661648e8d Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 3 Feb 2010 18:36:49 +0000 Subject: [PATCH 02/20] ENH: Overhaul of time activated explicit sources - deprecated: - timeActivatedExplicitSource (old base type) - timeActivatedExplicitCellSource - timeActivatedExplicitMulticomponentPointSource - introduced timeActivatedExplicitSource - templated on primitive type - scalar, vector, tensor... - takes as input, either a cell set or list of points --- src/finiteVolume/Make/files | 5 - .../timeActivatedExplicitCellSource.C | 175 --------- .../timeActivatedExplicitCellSource.H | 143 ------- .../pointSourceProperties.C | 87 ----- .../pointSourceProperties.H | 158 -------- .../pointSourcePropertiesI.H | 99 ----- .../pointSourcePropertiesIO.C | 88 ----- ...tivatedExplicitMulticomponentPointSource.C | 292 -------------- ...tivatedExplicitMulticomponentPointSource.H | 185 --------- .../TimeActivatedExplicitSource.C | 347 +++++++++++++++++ .../TimeActivatedExplicitSource.H | 368 ++++++++++++++++++ .../TimeActivatedExplicitSourceI.H | 227 +++++++++++ .../TimeActivatedExplicitSourceIO.C | 102 +++++ .../TimeActivatedExplicitSourceList.C | 223 +++++++++++ .../TimeActivatedExplicitSourceList.H | 171 ++++++++ .../timeActivatedExplicitSource.C | 134 +------ .../timeActivatedExplicitSource.H | 157 ++------ 17 files changed, 1475 insertions(+), 1486 deletions(-) delete mode 100644 src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitCellSource/timeActivatedExplicitCellSource.C delete mode 100644 src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitCellSource/timeActivatedExplicitCellSource.H delete mode 100644 src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourceProperties.C delete mode 100644 src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourceProperties.H delete mode 100644 src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourcePropertiesI.H delete mode 100644 src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourcePropertiesIO.C delete mode 100644 src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/timeActivatedExplicitMulticomponentPointSource.C delete mode 100644 src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitMulticomponentPointSource/timeActivatedExplicitMulticomponentPointSource.H create mode 100644 src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSource.C create mode 100644 src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSource.H create mode 100644 src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSourceI.H create mode 100644 src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSourceIO.C create mode 100644 src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSourceList.C create mode 100644 src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSourceList.H diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 94c83312d3..e12c715250 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -341,10 +341,5 @@ $(SRF)/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVect fieldSources = $(general)/fieldSources $(fieldSources)/pressureGradientExplicitSource/pressureGradientExplicitSource.C $(fieldSources)/timeActivatedExplicitSource/timeActivatedExplicitSource.C -$(fieldSources)/timeActivatedExplicitCellSource/timeActivatedExplicitCellSource.C - -$(fieldSources)/timeActivatedExplicitMulticomponentPointSource/timeActivatedExplicitMulticomponentPointSource.C -$(fieldSources)/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourceProperties.C -$(fieldSources)/timeActivatedExplicitMulticomponentPointSource/pointSourceProperties/pointSourcePropertiesIO.C LIB = $(FOAM_LIBBIN)/libfiniteVolume diff --git a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitCellSource/timeActivatedExplicitCellSource.C b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitCellSource/timeActivatedExplicitCellSource.C deleted file mode 100644 index 624adadf67..0000000000 --- a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitCellSource/timeActivatedExplicitCellSource.C +++ /dev/null @@ -1,175 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "timeActivatedExplicitCellSource.H" -#include "volFields.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void Foam::timeActivatedExplicitCellSource::updateCellSet() -{ - cellSelector_->applyToSet(topoSetSource::NEW, selectedCellSet_); - - Info<< " " << name_ << ": selected " - << returnReduce(selectedCellSet_.size(), sumOp