From 85a9e17dd5caa05a20e14802c9967eeef9262f6f Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Tue, 3 Apr 2018 09:30:11 +0100 Subject: [PATCH] reactingEulerFoam: Added phase transfer structure An additional layer has been added into the phase system hierarchy which facilitates the application of phase transfer modelling. These are models which exchange mass between phases without the thermal coupling that would be required to represent phase change. They can be thought of as representation changes; e.g., between two phases representing different droplet sizes of the same physical fluid. To facilitate this, the heat transfer phase systems have been modified and renamed and now both support mass transfer. The two sided version is only required for derivations which support phase change. The following changes to case settings have been made: - The simplest instantiated phase systems have been renamed to basicTwoPhaseSystem and basicMultiphaseSystem. The heatAndMomentumTransfer*System entries in constant/phaseProperties files will need updating accordingly. - A phaseTransfer sub-model entry will be required in the constant/phaseProperties file. This can be an empty list. - The massTransfer switch in thermal phase change cases has been renamed phaseTransfer, so as not to be confused with the mass transfer models used by interface composition cases. This work was supported by Georg Skillas and Zhen Li, at Evonik --- .../interfacialModels/Make/files | 3 + .../newPhaseTransferModel.C | 59 +++ .../phaseTransferModel/phaseTransferModel.C | 61 ++++ .../phaseTransferModel/phaseTransferModel.H | 127 +++++++ .../BlendedInterfacialModel.C | 8 + .../BlendedInterfacialModel.H | 3 + .../HeatAndMassTransferPhaseSystem.C | 324 ----------------- ...terfaceCompositionPhaseChangePhaseSystem.C | 157 ++++---- ...terfaceCompositionPhaseChangePhaseSystem.H | 16 +- .../OneResistanceHeatTransferPhaseSystem.C} | 65 +++- .../OneResistanceHeatTransferPhaseSystem.H} | 27 +- .../PhaseTransferPhaseSystem.C | 244 +++++++++++++ .../PhaseTransferPhaseSystem.H | 135 +++++++ .../PopulationBalancePhaseSystem.C | 39 -- .../PopulationBalancePhaseSystem.H | 8 +- .../ThermalPhaseChangePhaseSystem.C | 303 +++++++--------- .../ThermalPhaseChangePhaseSystem.H | 8 +- .../TwoResistanceHeatTransferPhaseSystem.C | 339 ++++++++++++++++++ .../TwoResistanceHeatTransferPhaseSystem.H} | 57 ++- .../phasePair/phasePair/phasePair.H | 10 + .../phasePair/phasePair/phasePairI.H | 27 ++ .../phaseSystems/phaseSystem/phaseSystem.H | 10 +- .../phaseSystem/phaseSystemTemplates.C | 41 ++- .../multiphaseSystem/multiphaseSystems.C | 62 ++-- .../twoPhaseSystem/twoPhaseSystems.C | 65 ++-- .../binaryBreakup/constant/phaseProperties | 22 +- .../breakup/constant/phaseProperties | 22 +- .../coalescence/constant/phaseProperties | 22 +- .../constant/phaseProperties | 22 +- .../drift/constant/phaseProperties | 10 +- .../negativeDrift/constant/phaseProperties | 10 +- .../constant/phaseProperties | 7 +- .../constant/phaseProperties | 10 +- .../laminar/bed/constant/phaseProperties | 5 +- .../bubbleColumn/constant/phaseProperties | 5 +- .../constant/phaseProperties | 5 +- .../constant/phaseProperties | 93 ++--- .../mixerVessel2D/constant/phaseProperties | 5 +- .../trickleBed/constant/phaseProperties | 5 +- .../LES/bubbleColumn/constant/phaseProperties | 6 +- .../RAS/LBend/constant/phaseProperties | 6 +- .../RAS/bubbleColumn/constant/phaseProperties | 6 +- .../constant/phaseProperties | 4 + .../constant/phaseProperties | 31 +- .../RAS/fluidisedBed/constant/phaseProperties | 6 +- .../RAS/wallBoiling/constant/phaseProperties | 7 +- .../wallBoiling1D/constant/phaseProperties | 10 +- .../wallBoilingIATE/constant/phaseProperties | 7 +- .../constant/phaseProperties | 7 +- .../bubbleColumn/constant/phaseProperties | 6 +- .../constant/phaseProperties | 4 + .../constant/phaseProperties | 4 + .../bubbleColumnIATE/constant/phaseProperties | 6 +- .../fluidisedBed/constant/phaseProperties | 6 +- .../injection/constant/phaseProperties | 6 +- .../mixerVessel2D/constant/phaseProperties | 6 +- .../steamInjection/constant/phaseProperties | 7 +- .../LES/bubbleColumn/constant/phaseProperties | 4 + .../RAS/bubbleColumn/constant/phaseProperties | 4 + .../RAS/fluidisedBed/constant/phaseProperties | 4 + .../bubbleColumn/constant/phaseProperties | 4 + .../bubbleColumnIATE/constant/phaseProperties | 4 + .../fluidisedBed/constant/phaseProperties | 4 + .../injection/constant/phaseProperties | 4 + .../mixerVessel2D/constant/phaseProperties | 4 + 65 files changed, 1583 insertions(+), 1025 deletions(-) create mode 100644 applications/solvers/multiphase/reactingEulerFoam/interfacialModels/phaseTransferModels/phaseTransferModel/newPhaseTransferModel.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.H delete mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C rename applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/{HeatTransferPhaseSystem/HeatTransferPhaseSystem.C => OneResistanceHeatTransferPhaseSystem/OneResistanceHeatTransferPhaseSystem.C} (67%) rename applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/{HeatTransferPhaseSystem/HeatTransferPhaseSystem.H => OneResistanceHeatTransferPhaseSystem/OneResistanceHeatTransferPhaseSystem.H} (82%) create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/TwoResistanceHeatTransferPhaseSystem/TwoResistanceHeatTransferPhaseSystem.C rename applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/{HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.H => TwoResistanceHeatTransferPhaseSystem/TwoResistanceHeatTransferPhaseSystem.H} (68%) diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/Make/files b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/Make/files index 3cf1a5d3cf..16066c1750 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/Make/files +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/Make/files @@ -74,4 +74,7 @@ wallDampingModels/linear/linearWallDamping.C wallDampingModels/cosine/cosineWallDamping.C wallDampingModels/sine/sineWallDamping.C +phaseTransferModels/phaseTransferModel/phaseTransferModel.C +phaseTransferModels/phaseTransferModel/newPhaseTransferModel.C + LIB = $(FOAM_LIBBIN)/libreactingEulerianInterfacialModels diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/phaseTransferModels/phaseTransferModel/newPhaseTransferModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/phaseTransferModels/phaseTransferModel/newPhaseTransferModel.C new file mode 100644 index 0000000000..e2949076f0 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/phaseTransferModels/phaseTransferModel/newPhaseTransferModel.C @@ -0,0 +1,59 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "phaseTransferModel.H" +#include "phasePair.H" + +// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // + +Foam::autoPtr Foam::phaseTransferModel::New +( + const dictionary& dict, + const phasePair& pair +) +{ + word phaseTransferModelType(dict.lookup("type")); + + Info<< "Selecting phaseTransferModel for " + << pair << ": " << phaseTransferModelType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(phaseTransferModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorInFunction + << "Unknown phaseTransferModelType type " + << phaseTransferModelType << endl << endl + << "Valid phaseTransferModel types are : " << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + return cstrIter()(dict, pair); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.C new file mode 100644 index 0000000000..54a9b20b59 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.C @@ -0,0 +1,61 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "phaseTransferModel.H" +#include "phasePair.H" +#include "BlendedInterfacialModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(phaseTransferModel, 0); + defineBlendedInterfacialModelTypeNameAndDebug(phaseTransferModel, 0); + defineRunTimeSelectionTable(phaseTransferModel, dictionary); +} + +const Foam::dimensionSet Foam::phaseTransferModel::dimDmdt = + Foam::dimDensity/Foam::dimTime; + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::phaseTransferModel::phaseTransferModel +( + const dictionary& dict, + const phasePair& pair +) +: + pair_(pair) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::phaseTransferModel::~phaseTransferModel() +{} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.H new file mode 100644 index 0000000000..ff24b0397e --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.H @@ -0,0 +1,127 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::phaseTransferModel + +Description + +SourceFiles + phaseTransferModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef phaseTransferModel_H +#define phaseTransferModel_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "volFields.H" +#include "dictionary.H" +#include "runTimeSelectionTables.H" + +namespace Foam +{ + +class phasePair; + +/*---------------------------------------------------------------------------*\ + Class phaseTransferModel Declaration +\*---------------------------------------------------------------------------*/ + +class phaseTransferModel +{ +protected: + + // Protected data + + //- Phase pair + const phasePair& pair_; + + +public: + + //- Runtime type information + TypeName("phaseTransferModel"); + + + // Declare runtime construction + + declareRunTimeSelectionTable + ( + autoPtr, + phaseTransferModel, + dictionary, + ( + const dictionary& dict, + const phasePair& pair + ), + (dict, pair) + ); + + + // Static data members + + //- Mass transfer rate dimensions + static const dimensionSet dimDmdt; + + + // Constructors + + //- Construct from a dictionary and a phase pair + phaseTransferModel + ( + const dictionary& dict, + const phasePair& pair + ); + + + //- Destructor + virtual ~phaseTransferModel(); + + + // Selectors + + static autoPtr New + ( + const dictionary& dict, + const phasePair& pair + ); + + + // Member Functions + + //- The mass transfer rate + virtual tmp dmdt() const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C index b567e3927b..5f1b9463d9 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C @@ -366,6 +366,14 @@ Foam::BlendedInterfacialModel::D() const } +template +Foam::tmp +Foam::BlendedInterfacialModel::dmdt() const +{ + return evaluate(&ModelType::dmdt, "dmdt", ModelType::dimDmdt, false); +} + + template bool Foam::BlendedInterfacialModel::writeData(Ostream& os) const { diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.H index be3dc21bcc..1c5e78ea9a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.H @@ -190,6 +190,9 @@ public: //- Return the blended diffusivity tmp D() const; + //- Return the blended mass transfer rate + tmp dmdt() const; + //- Dummy write for regIOobject bool writeData(Ostream& os) const; }; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C deleted file mode 100644 index f6328ddaa0..0000000000 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C +++ /dev/null @@ -1,324 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "HeatAndMassTransferPhaseSystem.H" - -#include "BlendedInterfacialModel.H" -#include "heatTransferModel.H" -#include "massTransferModel.H" - -#include "HashPtrTable.H" - -#include "fvcDiv.H" -#include "fvmSup.H" -#include "fvMatrix.H" -#include "zeroGradientFvPatchFields.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::HeatAndMassTransferPhaseSystem:: -HeatAndMassTransferPhaseSystem -( - const fvMesh& mesh -) -: - BasePhaseSystem(mesh) -{ - this->generatePairsAndSubModels - ( - "heatTransfer", - heatTransferModels_ - ); - - this->generatePairsAndSubModels - ( - "massTransfer", - massTransferModels_ - ); - - forAllConstIter - ( - phaseSystem::phasePairTable, - this->phasePairs_, - phasePairIter - ) - { - const phasePair& pair(phasePairIter()); - - if (pair.ordered()) - { - continue; - } - - if - ( - heatTransferModels_.found(pair) - && heatTransferModels_[pair][pair.first()].valid() - && heatTransferModels_[pair][pair.second()].valid() - ) - { - - volScalarField H1(heatTransferModels_[pair][pair.first()]->K()); - volScalarField H2(heatTransferModels_[pair][pair.second()]->K()); - - Tf_.insert - ( - pair, - new volScalarField - ( - IOobject - ( - IOobject::groupName("Tf", pair.name()), - this->mesh().time().timeName(), - this->mesh(), - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - ( - H1*pair.phase1().thermo().T() - + H2*pair.phase2().thermo().T() - ) - /max - ( - H1 + H2, - dimensionedScalar - ( - "small", - heatTransferModel::dimK, - small - ) - ), - zeroGradientFvPatchScalarField::typeName - ) - ); - - Tf_[pair]->correctBoundaryConditions(); - } - } -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::HeatAndMassTransferPhaseSystem:: -~HeatAndMassTransferPhaseSystem() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -template -Foam::autoPtr -Foam::HeatAndMassTransferPhaseSystem::heatTransfer() const -{ - autoPtr eqnsPtr - ( - new phaseSystem::heatTransferTable() - ); - - phaseSystem::heatTransferTable& eqns = eqnsPtr(); - - forAll(this->phaseModels_, phasei) - { - const phaseModel& phase = this->phaseModels_[phasei]; - - eqns.insert - ( - phase.name(), - new fvScalarMatrix(phase.thermo().he(), dimEnergy/dimTime) - ); - } - - // Heat transfer with the interface - forAllConstIter - ( - heatTransferModelTable, - heatTransferModels_, - heatTransferModelIter - ) - { - if - ( - heatTransferModels_.found(heatTransferModelIter.key()) - ) - { - const phasePair& pair - ( - this->phasePairs_[heatTransferModelIter.key()] - ); - - const volScalarField& Tf(*Tf_[pair]); - - const volScalarField K1 - ( - heatTransferModelIter()[pair.first()]->K() - ); - const volScalarField K2 - ( - heatTransferModelIter()[pair.second()]->K() - ); - const volScalarField KEff - ( - K1*K2 - /max - ( - K1 + K2, - dimensionedScalar("small", heatTransferModel::dimK, small) - ) - ); - - const volScalarField* K = &K1; - const volScalarField* otherK = &K2; - - forAllConstIter(phasePair, pair, iter) - { - const phaseModel& phase = iter(); - - const volScalarField& he(phase.thermo().he()); - volScalarField Cpv(phase.thermo().Cpv()); - - *eqns[phase.name()] += - (*K)*(Tf - phase.thermo().T()) - + KEff/Cpv*he - fvm::Sp(KEff/Cpv, he); - - Swap(K, otherK); - } - } - } - - return eqnsPtr; -} - -template -Foam::autoPtr -Foam::HeatAndMassTransferPhaseSystem::massTransfer() const -{ - // Create a mass transfer matrix for each species of each phase - autoPtr eqnsPtr - ( - new phaseSystem::massTransferTable() - ); - - phaseSystem::massTransferTable& eqns = eqnsPtr(); - - forAll(this->phaseModels_, phasei) - { - const phaseModel& phase = this->phaseModels_[phasei]; - - const PtrList& Yi = phase.Y(); - - forAll(Yi, i) - { - eqns.insert - ( - Yi[i].name(), - new fvScalarMatrix(Yi[i], dimMass/dimTime) - ); - } - } - - return eqnsPtr; -} - - -template -void Foam::HeatAndMassTransferPhaseSystem::correctThermo() -{ - phaseSystem::correctThermo(); - - forAllConstIter - ( - phaseSystem::phasePairTable, - this->phasePairs_, - phasePairIter - ) - { - if - ( - this->heatTransferModels_.found(phasePairIter.key()) - ) - { - const phasePair& pair(phasePairIter()); - - if (pair.ordered()) - { - continue; - } - - const phaseModel& phase1 = pair.phase1(); - const phaseModel& phase2 = pair.phase2(); - - const volScalarField& T1(phase1.thermo().T()); - const volScalarField& T2(phase2.thermo().T()); - - volScalarField& Tf(*this->Tf_[pair]); - - volScalarField H1 - ( - this->heatTransferModels_[pair][pair.first()]->K() - ); - - volScalarField H2 - ( - this->heatTransferModels_[pair][pair.second()]->K() - ); - - // Limit the H[12] to avoid /0 - H1.max(small); - H2.max(small); - - Tf = (H1*T1 + H2*T2)/(H1 + H2); - - Info<< "Tf." << pair.name() - << ": min = " << min(Tf.primitiveField()) - << ", mean = " << average(Tf.primitiveField()) - << ", max = " << max(Tf.primitiveField()) - << endl; - } - } -} - - -template -bool Foam::HeatAndMassTransferPhaseSystem::read() -{ - if (BasePhaseSystem::read()) - { - bool readOK = true; - - // Models ... - - return readOK; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C index 2c4b995117..73f53829e8 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C @@ -25,6 +25,7 @@ License #include "InterfaceCompositionPhaseChangePhaseSystem.H" #include "interfaceCompositionModel.H" +#include "massTransferModel.H" // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // @@ -65,6 +66,68 @@ InterfaceCompositionPhaseChangePhaseSystem interfaceCompositionModels_ ); + this->generatePairsAndSubModels + ( + "massTransfer", + massTransferModels_, + false + ); + + // Check that models have been specified in the correct combinations + forAllConstIter + ( + interfaceCompositionModelTable, + interfaceCompositionModels_, + interfaceCompositionModelIter + ) + { + const phasePair& pair = + this->phasePairs_[interfaceCompositionModelIter.key()]; + + if (!pair.ordered()) + { + FatalErrorInFunction + << "An interfacial composition model is specified for the " + << "unordered " << pair << " pair. Composition models only " + << "apply to ordered pairs. A entry for an " + << phasePairKey("A", "B", true) << " pair means a model for " + << "the A side of the A-B interface; i.e., \"A in the presence " + << "of B\"" + << exit(FatalError); + } + + const phasePairKey key(pair.phase1().name(), pair.phase2().name()); + + if (!massTransferModels_[key][pair.index(pair.phase1())].valid()) + { + FatalErrorInFunction + << "A species transfer model for the " << pair.phase1().name() + << " side of the " << key << " pair is not specified. This is " + << "required by the corresponding interface composition model." + << exit(FatalError); + } + } + forAllConstIter + ( + massTransferModelTable, + massTransferModels_, + massTransferModelIter + ) + { + const phasePair& pair = + this->phasePairs_[massTransferModelIter.key()]; + + if (!this->heatTransferModels_.found(pair)) + { + FatalErrorInFunction + << "A Heat transfer model for " << pair << " pair is not " + << "specified. This is required by the corresponding species " + << "transfer model" + << exit(FatalError); + } + } + + // Generate mass transfer fields, set to zero forAllConstIter ( phaseSystem::phasePairTable, @@ -157,66 +220,6 @@ Foam::InterfaceCompositionPhaseChangePhaseSystem::dmdts() const } -template -Foam::autoPtr -Foam::InterfaceCompositionPhaseChangePhaseSystem:: -heatTransfer() const -{ - autoPtr eqnsPtr = - BasePhaseSystem::heatTransfer(); - - phaseSystem::heatTransferTable& eqns = eqnsPtr(); - - // Source term due to mass transfer - forAllConstIter - ( - phaseSystem::phasePairTable, - this->phasePairs_, - phasePairIter - ) - { - if - ( - this->heatTransferModels_.found(phasePairIter.key()) - ) - { - const phasePair& pair(phasePairIter()); - - if (pair.ordered()) - { - continue; - } - - const phaseModel& phase1 = pair.phase1(); - const phaseModel& phase2 = pair.phase2(); - - const volScalarField& he1(phase1.thermo().he()); - const volScalarField& he2(phase2.thermo().he()); - - const volScalarField K1(phase1.K()); - const volScalarField K2(phase2.K()); - - const volScalarField dmdt(this->dmdt(pair)); - const volScalarField dmdt21(posPart(dmdt)); - const volScalarField dmdt12(negPart(dmdt)); - const volScalarField& Tf(*this->Tf_[pair]); - - *eqns[phase1.name()] += - dmdt21*(phase1.thermo().he(phase1.thermo().p(), Tf)) - - fvm::Sp(dmdt21, he1) - + dmdt21*(K2 - K1); - - *eqns[phase2.name()] -= - dmdt12*(phase2.thermo().he(phase2.thermo().p(), Tf)) - - fvm::Sp(dmdt12, he2) - + dmdt12*(K1 - K2); - } - } - - return eqnsPtr; -} - - template Foam::autoPtr Foam::InterfaceCompositionPhaseChangePhaseSystem:: @@ -262,10 +265,8 @@ massTransfer() const interfaceCompositionModelIter() ); - const phasePair& pair - ( - this->phasePairs_[interfaceCompositionModelIter.key()] - ); + const phasePair& pair = + this->phasePairs_[interfaceCompositionModelIter.key()]; const phaseModel& phase = pair.phase1(); const phaseModel& otherPhase = pair.phase2(); const phasePairKey key(phase.name(), otherPhase.name()); @@ -279,7 +280,7 @@ massTransfer() const const volScalarField K ( - this->massTransferModels_[key][phase.name()]->K() + massTransferModels_[key][pair.index(phase)]->K() ); forAllConstIter @@ -335,10 +336,8 @@ massTransfer() const template void Foam::InterfaceCompositionPhaseChangePhaseSystem:: -correctThermo() +correctInterfaceThermo() { - phaseSystem::correctThermo(); - // This loop solves for the interface temperatures, Tf, and updates the // interface composition models. // @@ -353,23 +352,19 @@ correctThermo() forAllConstIter ( - phaseSystem::phasePairTable, - this->phasePairs_, - phasePairIter + massTransferModelTable, + massTransferModels_, + massTransferModelIter ) { - const phasePair& pair(phasePairIter()); - - if (pair.ordered()) - { - continue; - } + const phasePair& pair = + this->phasePairs_[massTransferModelIter.key()]; const phasePairKey key12(pair.first(), pair.second(), true); const phasePairKey key21(pair.second(), pair.first(), true); - volScalarField H1(this->heatTransferModels_[pair][pair.first()]->K()); - volScalarField H2(this->heatTransferModels_[pair][pair.second()]->K()); + volScalarField H1(this->heatTransferModels_[pair].first()->K()); + volScalarField H2(this->heatTransferModels_[pair].second()->K()); dimensionedScalar HSmall("small", heatTransferModel::dimK, small); volScalarField mDotL @@ -402,7 +397,7 @@ correctThermo() { this->interfaceCompositionModels_[key12]->addMDotL ( - this->massTransferModels_[pair][pair.first()]->K(), + massTransferModelIter().first()->K(), Tf, mDotL, mDotLPrime @@ -412,7 +407,7 @@ correctThermo() { this->interfaceCompositionModels_[key21]->addMDotL ( - this->massTransferModels_[pair][pair.second()]->K(), + massTransferModelIter().second()->K(), Tf, mDotL, mDotLPrime diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.H index bc9e9831fa..a940263a21 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.H @@ -48,6 +48,7 @@ namespace Foam { class interfaceCompositionModel; +class massTransferModel; /*---------------------------------------------------------------------------*\ Class InterfaceCompositionPhaseChangePhaseSystem Declaration @@ -69,6 +70,13 @@ protected: phasePairKey::hash > interfaceCompositionModelTable; + typedef HashTable + < + Pair>>, + phasePairKey, + phasePairKey::hash + > massTransferModelTable; + typedef HashPtrTable iDmdtTable; @@ -77,6 +85,9 @@ protected: // Sub Models + //- Mass transfer models + massTransferModelTable massTransferModels_; + //- Interface composition models interfaceCompositionModelTable interfaceCompositionModels_; @@ -113,14 +124,11 @@ public: //- Return the mass transfer rates for each phase virtual Xfer> dmdts() const; - //- Return the heat transfer matrices - virtual autoPtr heatTransfer() const; - //- Return the mass transfer matrices virtual autoPtr massTransfer() const; //- Correct the thermodynamics - virtual void correctThermo(); + virtual void correctInterfaceThermo(); //- Read base phaseProperties dictionary virtual bool read(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/OneResistanceHeatTransferPhaseSystem/OneResistanceHeatTransferPhaseSystem.C similarity index 67% rename from applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C rename to applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/OneResistanceHeatTransferPhaseSystem/OneResistanceHeatTransferPhaseSystem.C index c80c29079c..aea2a11ed7 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/OneResistanceHeatTransferPhaseSystem/OneResistanceHeatTransferPhaseSystem.C @@ -23,27 +23,34 @@ License \*---------------------------------------------------------------------------*/ -#include "HeatTransferPhaseSystem.H" +#include "OneResistanceHeatTransferPhaseSystem.H" #include "fvmSup.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::HeatTransferPhaseSystem::HeatTransferPhaseSystem +Foam::OneResistanceHeatTransferPhaseSystem:: +OneResistanceHeatTransferPhaseSystem ( const fvMesh& mesh ) : BasePhaseSystem(mesh) { - this->generatePairsAndSubModels("heatTransfer", heatTransferModels_); + this->generatePairsAndSubModels + ( + "heatTransfer", + heatTransferModels_, + false + ); } // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template -Foam::HeatTransferPhaseSystem::~HeatTransferPhaseSystem() +Foam::OneResistanceHeatTransferPhaseSystem:: +~OneResistanceHeatTransferPhaseSystem() {} @@ -51,7 +58,8 @@ Foam::HeatTransferPhaseSystem::~HeatTransferPhaseSystem() template Foam::autoPtr -Foam::HeatTransferPhaseSystem::heatTransfer() const +Foam::OneResistanceHeatTransferPhaseSystem:: +heatTransfer() const { autoPtr eqnsPtr ( @@ -71,6 +79,7 @@ Foam::HeatTransferPhaseSystem::heatTransfer() const ); } + // Heat transfer across the interface forAllConstIter ( heatTransferModelTable, @@ -96,25 +105,47 @@ Foam::HeatTransferPhaseSystem::heatTransfer() const } } - return eqnsPtr; -} - - -template -Foam::autoPtr -Foam::HeatTransferPhaseSystem::massTransfer() const -{ - autoPtr eqnsPtr + // Source term due to mass transfer + forAllConstIter ( - new phaseSystem::massTransferTable() - ); + phaseSystem::phasePairTable, + this->phasePairs_, + phasePairIter + ) + { + const phasePair& pair(phasePairIter()); + + if (pair.ordered()) + { + continue; + } + + const phaseModel& phase1 = pair.phase1(); + const phaseModel& phase2 = pair.phase2(); + + const volScalarField& he1(phase1.thermo().he()); + const volScalarField& he2(phase2.thermo().he()); + + const volScalarField K1(phase1.K()); + const volScalarField K2(phase2.K()); + + const volScalarField dmdt(this->dmdt(pair)); + const volScalarField dmdt21(posPart(dmdt)); + const volScalarField dmdt12(negPart(dmdt)); + + *eqns[phase1.name()] += + dmdt21*he2 - fvm::Sp(dmdt21, he1) + dmdt21*(K2 - K1); + + *eqns[phase2.name()] -= + dmdt12*he1 - fvm::Sp(dmdt12, he2) + dmdt12*(K1 - K2); + } return eqnsPtr; } template -bool Foam::HeatTransferPhaseSystem::read() +bool Foam::OneResistanceHeatTransferPhaseSystem::read() { if (BasePhaseSystem::read()) { diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/OneResistanceHeatTransferPhaseSystem/OneResistanceHeatTransferPhaseSystem.H similarity index 82% rename from applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.H rename to applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/OneResistanceHeatTransferPhaseSystem/OneResistanceHeatTransferPhaseSystem.H index 664d16f15e..0f52b0dc73 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/OneResistanceHeatTransferPhaseSystem/OneResistanceHeatTransferPhaseSystem.H @@ -22,18 +22,22 @@ License along with OpenFOAM. If not, see . Class - Foam::HeatTransferPhaseSystem + Foam::OneResistanceHeatTransferPhaseSystem Description - Class which models interfacial heat transfer between a number of phases. + Class which models interfacial heat transfer between a number of phases. A + single heat transfer model is used for each interface. + +See also + TwoResistanceHeatTransferPhaseSystem SourceFiles - HeatTransferPhaseSystem.C + OneResistanceHeatTransferPhaseSystem.C \*---------------------------------------------------------------------------*/ -#ifndef HeatTransferPhaseSystem_H -#define HeatTransferPhaseSystem_H +#ifndef OneResistanceHeatTransferPhaseSystem_H +#define OneResistanceHeatTransferPhaseSystem_H #include "phaseSystem.H" @@ -47,11 +51,11 @@ template class BlendedInterfacialModel; class heatTransferModel; /*---------------------------------------------------------------------------*\ - Class HeatTransferPhaseSystem Declaration + Class OneResistanceHeatTransferPhaseSystem Declaration \*---------------------------------------------------------------------------*/ template -class HeatTransferPhaseSystem +class OneResistanceHeatTransferPhaseSystem : public BasePhaseSystem { @@ -80,11 +84,11 @@ public: // Constructors //- Construct from fvMesh - HeatTransferPhaseSystem(const fvMesh&); + OneResistanceHeatTransferPhaseSystem(const fvMesh&); //- Destructor - virtual ~HeatTransferPhaseSystem(); + virtual ~OneResistanceHeatTransferPhaseSystem(); // Member Functions @@ -92,9 +96,6 @@ public: //- Return the heat transfer matrices virtual autoPtr heatTransfer() const; - //- Return the mass transfer matrices - virtual autoPtr massTransfer() const; - //- Read base phaseProperties dictionary virtual bool read(); }; @@ -107,7 +108,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository - #include "HeatTransferPhaseSystem.C" + #include "OneResistanceHeatTransferPhaseSystem.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.C new file mode 100644 index 0000000000..9d66b4d2bc --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.C @@ -0,0 +1,244 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "PhaseTransferPhaseSystem.H" +#include "phaseTransferModel.H" +#include "fvmSup.H" + +// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // + +template +Foam::tmp +Foam::PhaseTransferPhaseSystem::rDmdt +( + const phasePairKey& key +) const +{ + if (!rDmdt_.found(key)) + { + return phaseSystem::dmdt(key); + } + + const scalar rDmdtSign(Pair::compare(rDmdt_.find(key).key(), key)); + + return rDmdtSign**rDmdt_[key]; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::PhaseTransferPhaseSystem::PhaseTransferPhaseSystem +( + const fvMesh& mesh +) +: + BasePhaseSystem(mesh) +{ + this->generatePairsAndSubModels + ( + "phaseTransfer", + phaseTransferModels_, + false + ); + + forAllConstIter + ( + phaseTransferModelTable, + phaseTransferModels_, + phaseTransferModelIter + ) + { + this->rDmdt_.insert + ( + phaseTransferModelIter.key(), + phaseSystem::dmdt(phaseTransferModelIter.key()).ptr() + ); + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template +Foam::PhaseTransferPhaseSystem:: +~PhaseTransferPhaseSystem() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +template +Foam::tmp +Foam::PhaseTransferPhaseSystem::dmdt +( + const phasePairKey& key +) const +{ + return BasePhaseSystem::dmdt(key) + this->rDmdt(key); +} + + +template +Foam::Xfer> +Foam::PhaseTransferPhaseSystem::dmdts() const +{ + PtrList dmdts(BasePhaseSystem::dmdts()); + + forAllConstIter(rDmdtTable, rDmdt_, rDmdtIter) + { + const phasePair& pair = this->phasePairs_[rDmdtIter.key()]; + const volScalarField& rDmdt = *rDmdtIter(); + + this->addField(pair.phase1(), "dmdt", rDmdt, dmdts); + this->addField(pair.phase2(), "dmdt", - rDmdt, dmdts); + } + + return dmdts.xfer(); +} + + +template +Foam::autoPtr +Foam::PhaseTransferPhaseSystem::massTransfer() const +{ + // Create a mass transfer matrix for each species of each phase + autoPtr eqnsPtr + ( + new phaseSystem::massTransferTable() + ); + + phaseSystem::massTransferTable& eqns = eqnsPtr(); + + forAll(this->phaseModels_, phasei) + { + const phaseModel& phase = this->phaseModels_[phasei]; + + const PtrList& Yi = phase.Y(); + + forAll(Yi, i) + { + eqns.insert + ( + Yi[i].name(), + new fvScalarMatrix(Yi[i], dimMass/dimTime) + ); + } + } + + // Mass transfer across the interface + forAllConstIter + ( + phaseTransferModelTable, + phaseTransferModels_, + phaseTransferModelIter + ) + { + const phasePair& pair(this->phasePairs_[phaseTransferModelIter.key()]); + + const phaseModel& phase = pair.phase1(); + const phaseModel& otherPhase = pair.phase2(); + + const volScalarField dmdt(this->rDmdt(pair)); + const volScalarField dmdt12(posPart(dmdt)); + const volScalarField dmdt21(negPart(dmdt)); + + const PtrList& Yi = phase.Y(); + + forAll(Yi, i) + { + const word name + ( + IOobject::groupName(Yi[i].member(), phase.name()) + ); + + const word otherName + ( + IOobject::groupName(Yi[i].member(), otherPhase.name()) + ); + + *eqns[name] += + dmdt21*eqns[otherName]->psi() + - fvm::Sp(dmdt21, eqns[name]->psi()); + + *eqns[otherName] -= + dmdt12*eqns[name]->psi() + - fvm::Sp(dmdt12, eqns[otherName]->psi()); + } + + } + + return eqnsPtr; +} + + +template +void Foam::PhaseTransferPhaseSystem::correct() +{ + BasePhaseSystem::correct(); + + forAllConstIter + ( + phaseTransferModelTable, + phaseTransferModels_, + phaseTransferModelIter + ) + { + *rDmdt_[phaseTransferModelIter.key()] = + dimensionedScalar("zero", dimDensity/dimTime, 0); + } + + forAllConstIter + ( + phaseTransferModelTable, + phaseTransferModels_, + phaseTransferModelIter + ) + { + *rDmdt_[phaseTransferModelIter.key()] += + phaseTransferModelIter()->dmdt(); + } +} + + +template +bool Foam::PhaseTransferPhaseSystem::read() +{ + if (BasePhaseSystem::read()) + { + bool readOK = true; + + // Models ... + + return readOK; + } + else + { + return false; + } +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.H new file mode 100644 index 0000000000..ee6acd896d --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PhaseTransferPhaseSystem/PhaseTransferPhaseSystem.H @@ -0,0 +1,135 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::MassTransferTransferPhaseSystem + +Description + Class which models non-thermally-coupled mass transfers; i.e., + representation changes, rather than phase changes. + +SourceFiles + PhaseTransferPhaseSystem.C + +\*---------------------------------------------------------------------------*/ + +#ifndef PhaseTransferPhaseSystem_H +#define PhaseTransferPhaseSystem_H + +#include "phaseSystem.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class blendingMethod; +template class BlendedInterfacialModel; +class phaseTransferModel; + +/*---------------------------------------------------------------------------*\ + Class PhaseTransferPhaseSystem Declaration +\*---------------------------------------------------------------------------*/ + +template +class PhaseTransferPhaseSystem +: + public BasePhaseSystem +{ +protected: + + // Protected typedefs + + typedef HashTable + < + autoPtr>, + phasePairKey, + phasePairKey::hash + > phaseTransferModelTable; + + typedef HashPtrTable + rDmdtTable; + + + // Protected data + + // Sub Models + + //- Mass transfer models + phaseTransferModelTable phaseTransferModels_; + + //- Mass transfer rates + rDmdtTable rDmdt_; + + // Protected member functions + + //- Return the representation mass transfer rate + virtual tmp rDmdt(const phasePairKey& key) const; + + +public: + + // Constructors + + //- Construct from fvMesh + PhaseTransferPhaseSystem(const fvMesh&); + + + //- Destructor + virtual ~PhaseTransferPhaseSystem(); + + + // Member Functions + + //- Return the mass transfer rate for a pair + virtual tmp dmdt(const phasePairKey& key) const; + + //- Return the mass transfer rates for each phase + virtual Xfer> dmdts() const; + + //- Return the mass transfer matrices + virtual autoPtr massTransfer() const; + + //- Correct the mass transfer rates + virtual void correct(); + + //- Read base phaseProperties dictionary + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "PhaseTransferPhaseSystem.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.C index e84f1fcc83..f7f464d02e 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.C @@ -166,45 +166,6 @@ Foam::PopulationBalancePhaseSystem::dmdts() const } -template -Foam::autoPtr -Foam::PopulationBalancePhaseSystem::heatTransfer() const -{ - autoPtr eqnsPtr = - BasePhaseSystem::heatTransfer(); - - phaseSystem::heatTransferTable& eqns = eqnsPtr(); - - // Source term due to mass trasfer - forAllConstIter - ( - phaseSystem::phasePairTable, - this->phasePairs_, - phasePairIter - ) - { - const phasePair& pair(phasePairIter()); - - if (pair.ordered()) - { - continue; - } - - const volScalarField& he1(pair.phase1().thermo().he()); - const volScalarField& he2(pair.phase2().thermo().he()); - - const volScalarField dmdt(this->pDmdt(pair)); - const volScalarField dmdt21(posPart(dmdt)); - const volScalarField dmdt12(negPart(dmdt)); - - *eqns[pair.phase1().name()] += dmdt21*he2 - fvm::Sp(dmdt21, he1); - *eqns[pair.phase2().name()] -= dmdt12*he1 - fvm::Sp(dmdt12, he2); - } - - return eqnsPtr; -} - - template Foam::autoPtr Foam::PopulationBalancePhaseSystem::massTransfer() const diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.H index f03a860b85..c8e7f5fe5e 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.H @@ -38,10 +38,7 @@ SourceFiles #ifndef PopulationBalancePhaseSystem_H #define PopulationBalancePhaseSystem_H -#include "HeatAndMassTransferPhaseSystem.H" -#include "saturationModel.H" -#include "Switch.H" - +#include "phaseSystem.H" #include "populationBalanceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -101,9 +98,6 @@ public: //- Return the mass transfer rates for each phase virtual Xfer> dmdts() const; - //- Return the heat transfer matrices - virtual autoPtr heatTransfer() const; - //- Return the mass transfer matrices virtual autoPtr massTransfer() const; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C index c0149414eb..dbe044c810 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C @@ -81,7 +81,7 @@ ThermalPhaseChangePhaseSystem ( saturationModel::New(this->subDict("saturationModel"), mesh) ), - massTransfer_(this->lookup("massTransfer")) + phaseChange_(this->lookup("phaseChange")) { forAllConstIter @@ -224,7 +224,7 @@ Foam::ThermalPhaseChangePhaseSystem::heatTransfer() const phaseSystem::heatTransferTable& eqns = eqnsPtr(); - // Source term due to mass transfer + // Add boundary term forAllConstIter ( phaseSystem::phasePairTable, @@ -232,10 +232,7 @@ Foam::ThermalPhaseChangePhaseSystem::heatTransfer() const phasePairIter ) { - if - ( - this->heatTransferModels_.found(phasePairIter.key()) - ) + if (this->wMDotL_.found(phasePairIter.key())) { const phasePair& pair(phasePairIter()); @@ -247,27 +244,6 @@ Foam::ThermalPhaseChangePhaseSystem::heatTransfer() const const phaseModel& phase1 = pair.phase1(); const phaseModel& phase2 = pair.phase2(); - const volScalarField& he1(phase1.thermo().he()); - const volScalarField& he2(phase2.thermo().he()); - - const volScalarField& K1(phase1.K()); - const volScalarField& K2(phase2.K()); - - const volScalarField dmdt(this->dmdt(pair)); - const volScalarField dmdt21(posPart(dmdt)); - const volScalarField dmdt12(negPart(dmdt)); - const volScalarField& Tf(*this->Tf_[pair]); - - *eqns[phase1.name()] += - dmdt21*(phase1.thermo().he(phase1.thermo().p(), Tf)) - - fvm::Sp(dmdt21, he1) - + dmdt21*(K2 - K1); - - *eqns[phase2.name()] -= - dmdt12*(phase2.thermo().he(phase2.thermo().p(), Tf)) - - fvm::Sp(dmdt12, he2) - + dmdt12*(K1 - K2); - *eqns[phase1.name()] += negPart(*this->wMDotL_[pair]); *eqns[phase2.name()] -= posPart(*this->wMDotL_[pair]); } @@ -299,6 +275,7 @@ Foam::ThermalPhaseChangePhaseSystem::massTransfer() const { continue; } + const phaseModel& phase = pair.phase1(); const phaseModel& otherPhase = pair.phase2(); @@ -336,195 +313,171 @@ Foam::ThermalPhaseChangePhaseSystem::massTransfer() const template -void Foam::ThermalPhaseChangePhaseSystem::correctThermo() +void +Foam::ThermalPhaseChangePhaseSystem::correctInterfaceThermo() { typedef compressible::alphatPhaseChangeWallFunctionFvPatchScalarField alphatPhaseChangeWallFunction; - phaseSystem::correctThermo(); - forAllConstIter ( - phaseSystem::phasePairTable, - this->phasePairs_, - phasePairIter + typename BasePhaseSystem::heatTransferModelTable, + this->heatTransferModels_, + heatTransferModelIter ) { - if + const phasePair& pair ( - this->heatTransferModels_.found(phasePairIter.key()) - ) + this->phasePairs_[heatTransferModelIter.key()] + ); + + const phaseModel& phase1 = pair.phase1(); + const phaseModel& phase2 = pair.phase2(); + + const volScalarField& T1(phase1.thermo().T()); + const volScalarField& T2(phase2.thermo().T()); + + const volScalarField& he1(phase1.thermo().he()); + const volScalarField& he2(phase2.thermo().he()); + + volScalarField& iDmdt(*this->iDmdt_[pair]); + volScalarField& Tf(*this->Tf_[pair]); + + volScalarField hef1(phase1.thermo().he(phase1.thermo().p(), Tf)); + volScalarField hef2(phase2.thermo().he(phase2.thermo().p(), Tf)); + + volScalarField L + ( + (neg0(iDmdt)*hef2 + pos(iDmdt)*he2) + - (pos0(iDmdt)*hef1 + neg(iDmdt)*he1) + ); + + volScalarField iDmdtNew(iDmdt); + + if (phaseChange_) { - const phasePair& pair(phasePairIter()); + volScalarField H1(heatTransferModelIter().first()->K(0)); + volScalarField H2(heatTransferModelIter().second()->K(0)); - if (pair.ordered()) - { - continue; - } + Tf = saturationModel_->Tsat(phase1.thermo().p()); - const phaseModel& phase1 = pair.phase1(); - const phaseModel& phase2 = pair.phase2(); + iDmdtNew = (H1*(Tf - T1) + H2*(Tf - T2))/L; + } + else + { + iDmdtNew == dimensionedScalar("0", iDmdt.dimensions(), 0); + } - const volScalarField& T1(phase1.thermo().T()); - const volScalarField& T2(phase2.thermo().T()); + volScalarField H1(heatTransferModelIter().first()->K()); + volScalarField H2(heatTransferModelIter().second()->K()); - const volScalarField& he1(phase1.thermo().he()); - const volScalarField& he2(phase2.thermo().he()); + // Limit the H[12] to avoid /0 + H1.max(small); + H2.max(small); - volScalarField& iDmdt(*this->iDmdt_[pair]); - volScalarField& Tf(*this->Tf_[pair]); + Tf = (H1*T1 + H2*T2 + iDmdtNew*L)/(H1 + H2); - volScalarField hef1(phase1.thermo().he(phase1.thermo().p(), Tf)); - volScalarField hef2(phase2.thermo().he(phase2.thermo().p(), Tf)); + Info<< "Tf." << pair.name() + << ": min = " << min(Tf.primitiveField()) + << ", mean = " << average(Tf.primitiveField()) + << ", max = " << max(Tf.primitiveField()) + << endl; - volScalarField L - ( - (neg0(iDmdt)*hef2 + pos(iDmdt)*he2) - - (pos0(iDmdt)*hef1 + neg(iDmdt)*he1) - ); + scalar iDmdtRelax(this->mesh().fieldRelaxationFactor("iDmdt")); + iDmdt = (1 - iDmdtRelax)*iDmdt + iDmdtRelax*iDmdtNew; - volScalarField iDmdtNew(iDmdt); - - if (massTransfer_ ) - { - volScalarField H1 - ( - this->heatTransferModels_[pair][pair.first()]->K(0) - ); - - volScalarField H2 - ( - this->heatTransferModels_[pair][pair.second()]->K(0) - ); - - Tf = saturationModel_->Tsat(phase1.thermo().p()); - - iDmdtNew = - (H1*(Tf - T1) + H2*(Tf - T2))/L; - } - else - { - iDmdtNew == dimensionedScalar("0", iDmdt.dimensions(), 0); - } - - volScalarField H1 - ( - this->heatTransferModels_[pair][pair.first()]->K() - ); - - volScalarField H2 - ( - this->heatTransferModels_[pair][pair.second()]->K() - ); - - // Limit the H[12] to avoid /0 - H1.max(small); - H2.max(small); - - Tf = (H1*T1 + H2*T2 + iDmdtNew*L)/(H1 + H2); - - Info<< "Tf." << pair.name() - << ": min = " << min(Tf.primitiveField()) - << ", mean = " << average(Tf.primitiveField()) - << ", max = " << max(Tf.primitiveField()) + if (phaseChange_) + { + Info<< "iDmdt." << pair.name() + << ": min = " << min(iDmdt.primitiveField()) + << ", mean = " << average(iDmdt.primitiveField()) + << ", max = " << max(iDmdt.primitiveField()) + << ", integral = " << fvc::domainIntegrate(iDmdt).value() << endl; + } - scalar iDmdtRelax(this->mesh().fieldRelaxationFactor("iDmdt")); - iDmdt = (1 - iDmdtRelax)*iDmdt + iDmdtRelax*iDmdtNew; + volScalarField& wDmdt(*this->wDmdt_[pair]); + volScalarField& wMDotL(*this->wMDotL_[pair]); + wDmdt *= 0; + wMDotL *= 0; - if (massTransfer_ ) - { - Info<< "iDmdt." << pair.name() - << ": min = " << min(iDmdt.primitiveField()) - << ", mean = " << average(iDmdt.primitiveField()) - << ", max = " << max(iDmdt.primitiveField()) - << ", integral = " << fvc::domainIntegrate(iDmdt).value() - << endl; - } + bool wallBoilingActive = false; - volScalarField& wDmdt(*this->wDmdt_[pair]); - volScalarField& wMDotL(*this->wMDotL_[pair]); - wDmdt *= 0; - wMDotL *= 0; + forAllConstIter(phasePair, pair, iter) + { + const phaseModel& phase = iter(); + const phaseModel& otherPhase = iter.otherPhase(); - bool wallBoilingActive = false; - - forAllConstIter(phasePair, pair, iter) - { - const phaseModel& phase = iter(); - const phaseModel& otherPhase = iter.otherPhase(); - - if + if + ( + phase.mesh().foundObject ( - phase.mesh().foundObject + "alphat." + phase.name() + ) + ) + { + const volScalarField& alphat = + phase.mesh().lookupObject ( "alphat." + phase.name() - ) - ) + ); + + const fvPatchList& patches = this->mesh().boundary(); + forAll(patches, patchi) { - const volScalarField& alphat = - phase.mesh().lookupObject - ( - "alphat." + phase.name() - ); + const fvPatch& currPatch = patches[patchi]; - const fvPatchList& patches = this->mesh().boundary(); - forAll(patches, patchi) + if + ( + isA + ( + alphat.boundaryField()[patchi] + ) + ) { - const fvPatch& currPatch = patches[patchi]; - - if - ( - isA + const alphatPhaseChangeWallFunction& PCpatch = + refCast ( alphat.boundaryField()[patchi] - ) - ) + ); + + phasePairKey key(phase.name(), otherPhase.name()); + + if (PCpatch.activePhasePair(key)) { - const alphatPhaseChangeWallFunction& PCpatch = - refCast - ( - alphat.boundaryField()[patchi] - ); + wallBoilingActive = true; - phasePairKey key(phase.name(), otherPhase.name()); + const scalarField& patchDmdt = + PCpatch.dmdt(key); + const scalarField& patchMDotL = + PCpatch.mDotL(key); - if (PCpatch.activePhasePair(key)) + const scalar sign + ( + Pair::compare(pair, key) + ); + + forAll(patchDmdt, facei) { - wallBoilingActive = true; - - const scalarField& patchDmdt = - PCpatch.dmdt(key); - const scalarField& patchMDotL = - PCpatch.mDotL(key); - - const scalar sign - ( - Pair::compare(pair, key) - ); - - forAll(patchDmdt, facei) - { - const label faceCelli = - currPatch.faceCells()[facei]; - wDmdt[faceCelli] -= sign*patchDmdt[facei]; - wMDotL[faceCelli] -= sign*patchMDotL[facei]; - } + const label faceCelli = + currPatch.faceCells()[facei]; + wDmdt[faceCelli] -= sign*patchDmdt[facei]; + wMDotL[faceCelli] -= sign*patchMDotL[facei]; } } } } } + } - if (wallBoilingActive) - { - Info<< "wDmdt." << pair.name() - << ": min = " << min(wDmdt.primitiveField()) - << ", mean = " << average(wDmdt.primitiveField()) - << ", max = " << max(wDmdt.primitiveField()) - << ", integral = " << fvc::domainIntegrate(wDmdt).value() - << endl; - } + if (wallBoilingActive) + { + Info<< "wDmdt." << pair.name() + << ": min = " << min(wDmdt.primitiveField()) + << ", mean = " << average(wDmdt.primitiveField()) + << ", max = " << max(wDmdt.primitiveField()) + << ", integral = " << fvc::domainIntegrate(wDmdt).value() + << endl; } } } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.H index fef8a26807..dccd2e2471 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.H @@ -78,8 +78,8 @@ protected: //- The saturation model used to evaluate Tsat = Tf autoPtr saturationModel_; - // Mass transfer enabled - Switch massTransfer_; + // Phase change enabled + Switch phaseChange_; //- Interfacial Mass transfer rate iDmdtTable iDmdt_; @@ -129,8 +129,8 @@ public: //- Return the mass transfer matrices virtual autoPtr massTransfer() const; - //- Correct the thermodynamics - virtual void correctThermo(); + //- Correct the interface thermodynamics + virtual void correctInterfaceThermo(); //- Read base phaseProperties dictionary virtual bool read(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/TwoResistanceHeatTransferPhaseSystem/TwoResistanceHeatTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/TwoResistanceHeatTransferPhaseSystem/TwoResistanceHeatTransferPhaseSystem.C new file mode 100644 index 0000000000..878806b3fe --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/TwoResistanceHeatTransferPhaseSystem/TwoResistanceHeatTransferPhaseSystem.C @@ -0,0 +1,339 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "TwoResistanceHeatTransferPhaseSystem.H" + +#include "BlendedInterfacialModel.H" +#include "heatTransferModel.H" + +#include "HashPtrTable.H" + +#include "fvcDiv.H" +#include "fvmSup.H" +#include "fvMatrix.H" +#include "zeroGradientFvPatchFields.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::TwoResistanceHeatTransferPhaseSystem:: +TwoResistanceHeatTransferPhaseSystem +( + const fvMesh& mesh +) +: + BasePhaseSystem(mesh) +{ + this->generatePairsAndSubModels + ( + "heatTransfer", + heatTransferModels_, + false + ); + + // Check that models have been specified on both sides of the interfaces + forAllConstIter + ( + heatTransferModelTable, + heatTransferModels_, + heatTransferModelIter + ) + { + const phasePair& pair = this->phasePairs_[heatTransferModelIter.key()]; + + if (!heatTransferModels_[pair].first().valid()) + { + FatalErrorInFunction + << "A heat transfer model for the " << pair.phase1().name() + << " side of the " << pair << " pair is not specified" + << exit(FatalError); + } + if (!heatTransferModels_[pair].second().valid()) + { + FatalErrorInFunction + << "A heat transfer model for the " << pair.phase2().name() + << " side of the " << pair << " pair is not specified" + << exit(FatalError); + } + } + + // Calculate initial Tf-s as if there is no mass transfer + forAllConstIter + ( + heatTransferModelTable, + heatTransferModels_, + heatTransferModelIter + ) + { + const phasePair& pair = this->phasePairs_[heatTransferModelIter.key()]; + + const phaseModel& phase1 = pair.phase1(); + const phaseModel& phase2 = pair.phase2(); + + const volScalarField& T1(phase1.thermo().T()); + const volScalarField& T2(phase2.thermo().T()); + + volScalarField H1(heatTransferModels_[pair].first()->K()); + volScalarField H2(heatTransferModels_[pair].second()->K()); + dimensionedScalar HSmall("small", heatTransferModel::dimK, small); + + Tf_.insert + ( + pair, + new volScalarField + ( + IOobject + ( + IOobject::groupName("Tf", pair.name()), + this->mesh().time().timeName(), + this->mesh(), + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + (H1*T1 + H2*T2)/max(H1 + H2, HSmall) + ) + ); + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template +Foam::TwoResistanceHeatTransferPhaseSystem:: +~TwoResistanceHeatTransferPhaseSystem() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +template +Foam::autoPtr +Foam::TwoResistanceHeatTransferPhaseSystem:: +heatTransfer() const +{ + autoPtr eqnsPtr + ( + new phaseSystem::heatTransferTable() + ); + + phaseSystem::heatTransferTable& eqns = eqnsPtr(); + + forAll(this->phaseModels_, phasei) + { + const phaseModel& phase = this->phaseModels_[phasei]; + + eqns.insert + ( + phase.name(), + new fvScalarMatrix(phase.thermo().he(), dimEnergy/dimTime) + ); + } + + // Heat transfer with the interface + forAllConstIter + ( + heatTransferModelTable, + heatTransferModels_, + heatTransferModelIter + ) + { + const phasePair& pair + ( + this->phasePairs_[heatTransferModelIter.key()] + ); + + const volScalarField& Tf(*Tf_[pair]); + + const Pair> Ks + ( + heatTransferModelIter().first()->K(), + heatTransferModelIter().second()->K() + ); + + const volScalarField KEff + ( + Ks.first()()*Ks.second()() + /max + ( + Ks.first()() + Ks.second()(), + dimensionedScalar("small", heatTransferModel::dimK, small) + ) + ); + + forAllConstIter(phasePair, pair, iter) + { + const phaseModel& phase = iter(); + + const volScalarField& he(phase.thermo().he()); + const volScalarField Cpv(phase.thermo().Cpv()); + + *eqns[phase.name()] += + Ks[iter.index()]*(Tf - phase.thermo().T()) + + KEff/Cpv*he - fvm::Sp(KEff/Cpv, he); + } + } + + // Source term due to mass transfer + forAllConstIter + ( + phaseSystem::phasePairTable, + this->phasePairs_, + phasePairIter + ) + { + const phasePair& pair(phasePairIter()); + + if (pair.ordered()) + { + continue; + } + + const phaseModel& phase1 = pair.phase1(); + const phaseModel& phase2 = pair.phase2(); + + const volScalarField& he1(phase1.thermo().he()); + const volScalarField& he2(phase2.thermo().he()); + + const volScalarField K1(phase1.K()); + const volScalarField K2(phase2.K()); + + const volScalarField dmdt(this->dmdt(pair)); + const volScalarField dmdt21(posPart(dmdt)); + const volScalarField dmdt12(negPart(dmdt)); + + *eqns[phase1.name()] += - fvm::Sp(dmdt21, he1) + dmdt21*(K2 - K1); + + *eqns[phase2.name()] -= - fvm::Sp(dmdt12, he2) + dmdt12*(K1 - K2); + + if (this->heatTransferModels_.found(phasePairIter.key())) + { + const volScalarField& Tf(*Tf_[pair]); + + *eqns[phase1.name()] += + dmdt21*phase1.thermo().he(phase1.thermo().p(), Tf); + + *eqns[phase2.name()] -= + dmdt12*phase2.thermo().he(phase2.thermo().p(), Tf); + } + else + { + *eqns[phase1.name()] += dmdt21*he2; + + *eqns[phase2.name()] -= dmdt12*he1; + } + } + + return eqnsPtr; +} + + +template +void Foam::TwoResistanceHeatTransferPhaseSystem:: +correctThermo() +{ + phaseSystem::correctThermo(); + + correctInterfaceThermo(); +} + + +template +void Foam::TwoResistanceHeatTransferPhaseSystem:: +correctInterfaceThermo() +{ + forAllConstIter + ( + heatTransferModelTable, + heatTransferModels_, + heatTransferModelIter + ) + { + const phasePair& pair + ( + this->phasePairs_[heatTransferModelIter.key()] + ); + + const phaseModel& phase1 = pair.phase1(); + const phaseModel& phase2 = pair.phase2(); + + const volScalarField& p(phase1.thermo().p()); + + const volScalarField& T1(phase1.thermo().T()); + const volScalarField& T2(phase2.thermo().T()); + + volScalarField& Tf(*this->Tf_[pair]); + + const volScalarField L + ( + phase1.thermo().he(p, Tf) - phase2.thermo().he(p, Tf) + ); + + const volScalarField dmdt(this->dmdt(pair)); + + volScalarField H1 + ( + this->heatTransferModels_[pair].first()->K() + ); + + volScalarField H2 + ( + this->heatTransferModels_[pair].second()->K() + ); + + // Limit the H[12] to avoid /0 + H1.max(small); + H2.max(small); + + Tf = (H1*T1 + H2*T2 + dmdt*L)/(H1 + H2); + + Info<< "Tf." << pair.name() + << ": min = " << min(Tf.primitiveField()) + << ", mean = " << average(Tf.primitiveField()) + << ", max = " << max(Tf.primitiveField()) + << endl; + } +} + + +template +bool Foam::TwoResistanceHeatTransferPhaseSystem::read() +{ + if (BasePhaseSystem::read()) + { + bool readOK = true; + + // Models ... + + return readOK; + } + else + { + return false; + } +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/TwoResistanceHeatTransferPhaseSystem/TwoResistanceHeatTransferPhaseSystem.H similarity index 68% rename from applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.H rename to applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/TwoResistanceHeatTransferPhaseSystem/TwoResistanceHeatTransferPhaseSystem.H index 5917ce9764..3bef3dc923 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/TwoResistanceHeatTransferPhaseSystem/TwoResistanceHeatTransferPhaseSystem.H @@ -22,20 +22,25 @@ License along with OpenFOAM. If not, see . Class - Foam::HeatAndMassTransferPhaseSystem + Foam::TwoResistanceHeatTransferPhaseSystem Description - Base class to support interfacial heat and mass transfer between a number - of phases. Can be used on its own to simulate flows without mass transfer - with two-resistance interfacial heat trasnfer. + Class which models interfacial heat transfer between a number of phases. + Two heat transfer models are stored at each interface, one for each phase. + This permits definition of an interface temperature with which heat transfer + occurs. It also allows derived systems to define other thermodynamic + properties at the interface and therefore represent phase changes. + +See also + OneResistanceHeatTransferPhaseSystem SourceFiles - HeatAndMassTransferPhaseSystem.C + TwoResistanceHeatTransferPhaseSystem.C \*---------------------------------------------------------------------------*/ -#ifndef HeatAndMassTransferPhaseSystem_H -#define HeatAndMassTransferPhaseSystem_H +#ifndef TwoResistanceHeatTransferPhaseSystem_H +#define TwoResistanceHeatTransferPhaseSystem_H #include "phaseSystem.H" @@ -49,14 +54,13 @@ class BlendedInterfacialModel; class blendingMethod; class heatTransferModel; -class massTransferModel; /*---------------------------------------------------------------------------*\ - Class HeatAndMassTransferPhaseSystem Declaration + Class TwoResistanceHeatTransferPhaseSystem Declaration \*---------------------------------------------------------------------------*/ template -class HeatAndMassTransferPhaseSystem +class TwoResistanceHeatTransferPhaseSystem : public BasePhaseSystem { @@ -66,24 +70,11 @@ protected: typedef HashTable < - HashTable - < - autoPtr> - >, + Pair>>, phasePairKey, phasePairKey::hash > heatTransferModelTable; - typedef HashTable - < - HashTable - < - autoPtr> - >, - phasePairKey, - phasePairKey::hash - > massTransferModelTable; - // Protected data @@ -95,34 +86,30 @@ protected: //- Heat transfer models heatTransferModelTable heatTransferModels_; - //- Mass transfer models - massTransferModelTable massTransferModels_; - public: // Constructors //- Construct from fvMesh - HeatAndMassTransferPhaseSystem(const fvMesh&); + TwoResistanceHeatTransferPhaseSystem(const fvMesh&); //- Destructor - virtual ~HeatAndMassTransferPhaseSystem(); + virtual ~TwoResistanceHeatTransferPhaseSystem(); // Member Functions //- Return the heat transfer matrices - virtual autoPtr - heatTransfer() const; - - //- Return the mass transfer matrices - virtual autoPtr massTransfer() const; + virtual autoPtr heatTransfer() const; //- Correct the thermodynamics virtual void correctThermo(); + //- Correct the interface thermodynamics + virtual void correctInterfaceThermo(); + //- Read base phaseProperties dictionary virtual bool read(); }; @@ -135,7 +122,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository - #include "HeatAndMassTransferPhaseSystem.C" + #include "TwoResistanceHeatTransferPhaseSystem.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/phasePair/phasePair.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/phasePair/phasePair.H index 423bba0f26..06f0328f0f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/phasePair/phasePair.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/phasePair/phasePair.H @@ -164,6 +164,10 @@ public: // the given phase inline const phaseModel& otherPhase(const phaseModel& phase) const; + //- Return the index of the given phase. Generates a FatalError if + // this phasePair does not contain the given phase + inline label index(const phaseModel& phase) const; + //- Return gravitation acceleration inline const uniformDimensionedVectorField& g() const; @@ -192,6 +196,12 @@ public: inline explicit const_iterator(const phasePair&); + // Access + + //- Return the current index + inline label index() const; + + // Member operators inline bool operator==(const const_iterator&) const; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/phasePair/phasePairI.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/phasePair/phasePairI.H index 5a1373f45e..683edd650a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/phasePair/phasePairI.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phasePair/phasePair/phasePairI.H @@ -67,6 +67,27 @@ inline const Foam::phaseModel& Foam::phasePair::otherPhase } +inline Foam::label Foam::phasePair::index(const phaseModel& phase) const +{ + if (&phase1_ == &phase) + { + return 0; + } + else if (&phase2_ == &phase) + { + return 1; + } + else + { + FatalErrorInFunction + << "this phasePair does not contain phase " << phase.name() + << exit(FatalError); + + return -1; + } +} + + inline const Foam::uniformDimensionedVectorField& Foam::phasePair::g() const { return g_; @@ -92,6 +113,12 @@ inline Foam::phasePair::const_iterator::const_iterator(const phasePair& pair) {} +inline Foam::label Foam::phasePair::const_iterator::index() const +{ + return index_; +} + + inline bool Foam::phasePair::const_iterator::operator== ( const const_iterator& iter diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H index a466ab05a8..6800084644 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.H @@ -214,20 +214,22 @@ protected: autoPtr>, phasePairKey, phasePairKey::hash - >& models + >& models, + const bool correctFixedFluxBCs = true ); - //- Generate pairs and per-phase sub-model tables + //- Generate pairs and two-sided sub-model tables template void generatePairsAndSubModels ( const word& modelName, HashTable < - HashTable>, + Pair>, phasePairKey, phasePairKey::hash - >& models + >& models, + const bool correctFixedFluxBCs = true ); //- Add the field to a phase-indexed list, with the given name, diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C index 8d835991e8..16d352b8ea 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C @@ -85,7 +85,8 @@ void Foam::phaseSystem::generatePairsAndSubModels autoPtr>, phasePairKey, phasePairKey::hash - >& models + >& models, + const bool correctFixedFluxBCs ) { typedef @@ -127,7 +128,8 @@ void Foam::phaseSystem::generatePairsAndSubModels blending, tempModels.found(key ) ? tempModels[key ] : noModel, tempModels.found(key1In2) ? tempModels[key1In2] : noModel, - tempModels.found(key2In1) ? tempModels[key2In1] : noModel + tempModels.found(key2In1) ? tempModels[key2In1] : noModel, + correctFixedFluxBCs ) ) ); @@ -157,10 +159,11 @@ void Foam::phaseSystem::generatePairsAndSubModels const word& modelName, HashTable < - HashTable>, + Pair>, phasePairKey, phasePairKey::hash - >& models + >& models, + const bool correctFixedFluxBCs ) { typedef @@ -169,31 +172,41 @@ void Foam::phaseSystem::generatePairsAndSubModels forAll(phaseModels_, phasei) { + const phaseModel& phase = phaseModels_[phasei]; + modelTypeTable tempModels; generatePairsAndSubModels ( - IOobject::groupName(modelName, phaseModels_[phasei].name()), - tempModels + IOobject::groupName(modelName, phase.name()), + tempModels, + correctFixedFluxBCs ); - forAllConstIter(typename modelTypeTable, tempModels, tempModelIter) + forAllIter(typename modelTypeTable, tempModels, tempModelIter) { - const phasePairKey key(tempModelIter.key()); + const phasePairKey& key(tempModelIter.key()); if (!models.found(key)) { models.insert ( key, - HashTable>() + Pair>() ); } - models[tempModelIter.key()].insert - ( - phaseModels_[phasei].name(), - *tempModelIter - ); + const phasePair& pair = phasePairs_[key]; + + if (!pair.contains(phase)) + { + FatalErrorInFunction + << "A two-sided " << modelType::typeName << " was " + << "specified for the " << phase.name() << " side of the " + << pair << " pair, but that phase is not part of that pair." + << exit(FatalError); + } + + models[key][pair.index(phase)] = tempModelIter().ptr(); } } } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystems.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystems.C index 9d1e750e09..1b68ee8e47 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystems.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystems.C @@ -28,8 +28,9 @@ License #include "phaseSystem.H" #include "multiphaseSystem.H" #include "MomentumTransferPhaseSystem.H" -#include "HeatTransferPhaseSystem.H" -#include "HeatAndMassTransferPhaseSystem.H" +#include "OneResistanceHeatTransferPhaseSystem.H" +#include "TwoResistanceHeatTransferPhaseSystem.H" +#include "PhaseTransferPhaseSystem.H" #include "PopulationBalancePhaseSystem.H" #include "InterfaceCompositionPhaseChangePhaseSystem.H" #include "ThermalPhaseChangePhaseSystem.H" @@ -39,41 +40,32 @@ License namespace Foam { typedef - HeatTransferPhaseSystem + PhaseTransferPhaseSystem < - MomentumTransferPhaseSystem + OneResistanceHeatTransferPhaseSystem + < + MomentumTransferPhaseSystem + > > - heatAndMomentumTransferMultiphaseSystem; + basicMultiphaseSystem; addNamedToRunTimeSelectionTable ( multiphaseSystem, - heatAndMomentumTransferMultiphaseSystem, + basicMultiphaseSystem, dictionary, - heatAndMomentumTransferMultiphaseSystem - ); - - typedef - HeatAndMassTransferPhaseSystem - < - MomentumTransferPhaseSystem - > - heatAndMassTransferMultiphaseSystem; - - addNamedToRunTimeSelectionTable - ( - multiphaseSystem, - heatAndMassTransferMultiphaseSystem, - dictionary, - heatAndMassTransferMultiphaseSystem + basicMultiphaseSystem ); typedef InterfaceCompositionPhaseChangePhaseSystem < - HeatAndMassTransferPhaseSystem + PhaseTransferPhaseSystem < - MomentumTransferPhaseSystem + TwoResistanceHeatTransferPhaseSystem + < + MomentumTransferPhaseSystem + > > > interfaceCompositionPhaseChangeMultiphaseSystem; @@ -89,9 +81,12 @@ namespace Foam typedef ThermalPhaseChangePhaseSystem < - HeatAndMassTransferPhaseSystem + PhaseTransferPhaseSystem < - MomentumTransferPhaseSystem + TwoResistanceHeatTransferPhaseSystem + < + MomentumTransferPhaseSystem + > > > thermalPhaseChangeMultiphaseSystem; @@ -105,12 +100,14 @@ namespace Foam ); typedef - PopulationBalancePhaseSystem < - HeatAndMassTransferPhaseSystem + PhaseTransferPhaseSystem < - MomentumTransferPhaseSystem + OneResistanceHeatTransferPhaseSystem + < + MomentumTransferPhaseSystem + > > > populationBalanceMultiphaseSystem; @@ -128,9 +125,12 @@ namespace Foam < PopulationBalancePhaseSystem < - HeatAndMassTransferPhaseSystem + PhaseTransferPhaseSystem < - MomentumTransferPhaseSystem + TwoResistanceHeatTransferPhaseSystem + < + MomentumTransferPhaseSystem + > > > > diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystems.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystems.C index 10cdd1b420..7d49fd0c2c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystems.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystems.C @@ -28,8 +28,9 @@ License #include "phaseSystem.H" #include "twoPhaseSystem.H" #include "MomentumTransferPhaseSystem.H" -#include "HeatTransferPhaseSystem.H" -#include "HeatAndMassTransferPhaseSystem.H" +#include "OneResistanceHeatTransferPhaseSystem.H" +#include "TwoResistanceHeatTransferPhaseSystem.H" +#include "PhaseTransferPhaseSystem.H" #include "PopulationBalancePhaseSystem.H" #include "InterfaceCompositionPhaseChangePhaseSystem.H" #include "ThermalPhaseChangePhaseSystem.H" @@ -39,41 +40,32 @@ License namespace Foam { typedef - HeatTransferPhaseSystem + PhaseTransferPhaseSystem < - MomentumTransferPhaseSystem + OneResistanceHeatTransferPhaseSystem + < + MomentumTransferPhaseSystem + > > - heatAndMomentumTransferTwoPhaseSystem; + basicTwoPhaseSystem; addNamedToRunTimeSelectionTable ( twoPhaseSystem, - heatAndMomentumTransferTwoPhaseSystem, + basicTwoPhaseSystem, dictionary, - heatAndMomentumTransferTwoPhaseSystem - ); - - typedef - HeatAndMassTransferPhaseSystem - < - MomentumTransferPhaseSystem - > - heatAndMassTransferTwoPhaseSystem; - - addNamedToRunTimeSelectionTable - ( - twoPhaseSystem, - heatAndMassTransferTwoPhaseSystem, - dictionary, - heatAndMassTransferTwoPhaseSystem + basicTwoPhaseSystem ); typedef InterfaceCompositionPhaseChangePhaseSystem < - HeatAndMassTransferPhaseSystem + PhaseTransferPhaseSystem < - MomentumTransferPhaseSystem + TwoResistanceHeatTransferPhaseSystem + < + MomentumTransferPhaseSystem + > > > interfaceCompositionPhaseChangeTwoPhaseSystem; @@ -89,10 +81,13 @@ namespace Foam typedef ThermalPhaseChangePhaseSystem < - HeatAndMassTransferPhaseSystem - < - MomentumTransferPhaseSystem - > + PhaseTransferPhaseSystem + < + TwoResistanceHeatTransferPhaseSystem + < + MomentumTransferPhaseSystem + > + > > thermalPhaseChangeTwoPhaseSystem; @@ -107,9 +102,12 @@ namespace Foam typedef PopulationBalancePhaseSystem < - HeatAndMassTransferPhaseSystem + PhaseTransferPhaseSystem < - MomentumTransferPhaseSystem + OneResistanceHeatTransferPhaseSystem + < + MomentumTransferPhaseSystem + > > > populationBalanceTwoPhaseSystem; @@ -127,9 +125,12 @@ namespace Foam < PopulationBalancePhaseSystem < - HeatAndMassTransferPhaseSystem + PhaseTransferPhaseSystem < - MomentumTransferPhaseSystem + TwoResistanceHeatTransferPhaseSystem + < + MomentumTransferPhaseSystem + > > > > diff --git a/test/multiphase/reactingMultiphaseEulerFoam/populationBalanceModeling/binaryBreakup/constant/phaseProperties b/test/multiphase/reactingMultiphaseEulerFoam/populationBalanceModeling/binaryBreakup/constant/phaseProperties index 8ecbc1b6cf..94adfd76f8 100644 --- a/test/multiphase/reactingMultiphaseEulerFoam/populationBalanceModeling/binaryBreakup/constant/phaseProperties +++ b/test/multiphase/reactingMultiphaseEulerFoam/populationBalanceModeling/binaryBreakup/constant/phaseProperties @@ -168,28 +168,10 @@ drag virtualMass (); -heatTransfer.air1 +heatTransfer (); -heatTransfer.air2 -(); - -heatTransfer.air3 -(); - -heatTransfer.water -(); - -massTransfer.air1 -(); - -massTransfer.air2 -(); - -massTransfer.air3 -(); - -massTransfer.water +phaseTransfer (); lift diff --git a/test/multiphase/reactingMultiphaseEulerFoam/populationBalanceModeling/breakup/constant/phaseProperties b/test/multiphase/reactingMultiphaseEulerFoam/populationBalanceModeling/breakup/constant/phaseProperties index 5ec6f774c7..24c2a5b780 100644 --- a/test/multiphase/reactingMultiphaseEulerFoam/populationBalanceModeling/breakup/constant/phaseProperties +++ b/test/multiphase/reactingMultiphaseEulerFoam/populationBalanceModeling/breakup/constant/phaseProperties @@ -169,28 +169,10 @@ drag virtualMass (); -heatTransfer.air1 +heatTransfer (); -heatTransfer.air2 -(); - -heatTransfer.air3 -(); - -heatTransfer.water -(); - -massTransfer.air1 -(); - -massTransfer.air2 -(); - -massTransfer.air3 -(); - -massTransfer.water +phaseTransfer (); lift diff --git a/test/multiphase/reactingMultiphaseEulerFoam/populationBalanceModeling/coalescence/constant/phaseProperties b/test/multiphase/reactingMultiphaseEulerFoam/populationBalanceModeling/coalescence/constant/phaseProperties index e6b4288c8b..d6ca9e0b23 100644 --- a/test/multiphase/reactingMultiphaseEulerFoam/populationBalanceModeling/coalescence/constant/phaseProperties +++ b/test/multiphase/reactingMultiphaseEulerFoam/populationBalanceModeling/coalescence/constant/phaseProperties @@ -210,28 +210,10 @@ drag virtualMass (); -heatTransfer.air1 +heatTransfer (); -heatTransfer.air2 -(); - -heatTransfer.air3 -(); - -heatTransfer.water -(); - -massTransfer.air1 -(); - -massTransfer.air2 -(); - -massTransfer.air3 -(); - -massTransfer.water +phaseTransfer (); lift diff --git a/test/multiphase/reactingMultiphaseEulerFoam/populationBalanceModeling/simultaneousCoalescenceAndBreakup/constant/phaseProperties b/test/multiphase/reactingMultiphaseEulerFoam/populationBalanceModeling/simultaneousCoalescenceAndBreakup/constant/phaseProperties index a43d0afd93..dc2d97f54a 100644 --- a/test/multiphase/reactingMultiphaseEulerFoam/populationBalanceModeling/simultaneousCoalescenceAndBreakup/constant/phaseProperties +++ b/test/multiphase/reactingMultiphaseEulerFoam/populationBalanceModeling/simultaneousCoalescenceAndBreakup/constant/phaseProperties @@ -174,28 +174,10 @@ drag virtualMass (); -heatTransfer.air1 +heatTransfer (); -heatTransfer.air2 -(); - -heatTransfer.air3 -(); - -heatTransfer.water -(); - -massTransfer.air1 -(); - -massTransfer.air2 -(); - -massTransfer.air3 -(); - -massTransfer.water +phaseTransfer (); lift diff --git a/test/multiphase/reactingTwoPhaseEulerFoam/populationBalanceModeling/drift/constant/phaseProperties b/test/multiphase/reactingTwoPhaseEulerFoam/populationBalanceModeling/drift/constant/phaseProperties index 7dfd21d74a..00292d2a88 100644 --- a/test/multiphase/reactingTwoPhaseEulerFoam/populationBalanceModeling/drift/constant/phaseProperties +++ b/test/multiphase/reactingTwoPhaseEulerFoam/populationBalanceModeling/drift/constant/phaseProperties @@ -141,16 +141,10 @@ drag virtualMass (); -heatTransfer.air +heatTransfer (); -heatTransfer.water -(); - -massTransfer.air -(); - -massTransfer.water +phaseTransfer (); lift diff --git a/test/multiphase/reactingTwoPhaseEulerFoam/populationBalanceModeling/negativeDrift/constant/phaseProperties b/test/multiphase/reactingTwoPhaseEulerFoam/populationBalanceModeling/negativeDrift/constant/phaseProperties index 14e2b7db72..babadfb29a 100644 --- a/test/multiphase/reactingTwoPhaseEulerFoam/populationBalanceModeling/negativeDrift/constant/phaseProperties +++ b/test/multiphase/reactingTwoPhaseEulerFoam/populationBalanceModeling/negativeDrift/constant/phaseProperties @@ -135,16 +135,10 @@ drag virtualMass (); -heatTransfer.air +heatTransfer (); -heatTransfer.water -(); - -massTransfer.air -(); - -massTransfer.water +phaseTransfer (); lift diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/constant/phaseProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/constant/phaseProperties index 698ff57934..490294524e 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/constant/phaseProperties +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/constant/phaseProperties @@ -19,7 +19,7 @@ type thermalPhaseChangeMultiphaseSystem; phases (gas liquid); -massTransfer on; +phaseChange on; gas { @@ -143,10 +143,7 @@ heatTransfer.liquid } ); -massTransfer.gas -(); - -massTransfer.liquid +phaseTransfer (); lift diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/constant/phaseProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/constant/phaseProperties index b9f16eaf5e..c7577b2162 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/constant/phaseProperties +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/constant/phaseProperties @@ -19,7 +19,7 @@ type thermalPhaseChangeMultiphaseSystem; phases (gas gas2 liquid); -massTransfer on; +phaseChange on; gas { @@ -203,13 +203,7 @@ heatTransfer.liquid } ); -massTransfer.gas -(); - -massTransfer.gas2 -(); - -massTransfer.liquid +phaseTransfer (); lift diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bed/constant/phaseProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bed/constant/phaseProperties index 301afa9ae6..fb719a6941 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bed/constant/phaseProperties +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bed/constant/phaseProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -type heatAndMomentumTransferMultiphaseSystem; +type basicMultiphaseSystem; phases (air water solid); @@ -191,6 +191,9 @@ virtualMass heatTransfer (); +phaseTransfer +(); + lift (); diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties index a7e648285f..b9d6c15e48 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -type heatAndMomentumTransferMultiphaseSystem; +type basicMultiphaseSystem; phases (air water); @@ -159,6 +159,9 @@ heatTransfer } ); +phaseTransfer +(); + lift (); diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/constant/phaseProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/constant/phaseProperties index 4653dff1a5..4ac33c9f13 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/constant/phaseProperties +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/constant/phaseProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -type heatAndMomentumTransferMultiphaseSystem; +type basicMultiphaseSystem; phases (air1 air2 water); @@ -302,6 +302,9 @@ heatTransfer } ); +phaseTransfer +(); + lift (); diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/constant/phaseProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/constant/phaseProperties index f376397ecc..df9a58f72c 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/constant/phaseProperties +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/constant/phaseProperties @@ -334,97 +334,48 @@ virtualMass } ); -heatTransfer.air1 +heatTransfer ( (air1 in water) { - type spherical; - residualAlpha 1e-3; + type RanzMarshall; + residualAlpha 1e-4; } (water in air1) { - type RanzMarshall; - residualAlpha 1e-3; - } - - (air1 in air2) - { - type spherical; - residualAlpha 1e-3; - } - - (air2 in air1) - { - type spherical; - residualAlpha 1e-3; - } -); - -heatTransfer.air2 -( - (air2 in water) - { - type spherical; - residualAlpha 1e-3; - } - - (water in air2) - { - type RanzMarshall; - residualAlpha 1e-3; - } - - (air1 in air2) - { - type spherical; - residualAlpha 1e-3; - } - - (air2 in air1) - { - type spherical; - residualAlpha 1e-3; - } -); - -heatTransfer.water -( - (air1 in water) - { - type RanzMarshall; - residualAlpha 1e-3; - } - - (water in air1) - { - type spherical; - residualAlpha 1e-3; + type RanzMarshall; + residualAlpha 1e-4; } (air2 in water) { - type RanzMarshall; - residualAlpha 1e-3; + type RanzMarshall; + residualAlpha 1e-4; } (water in air2) { - type spherical; - residualAlpha 1e-3; + type RanzMarshall; + residualAlpha 1e-4; + } + + (air1 in air2) + { + type RanzMarshall; + residualAlpha 1e-4; + } + + (air2 in air1) + { + type RanzMarshall; + residualAlpha 1e-4; } ); -massTransfer.air1 +phaseTransfer (); -massTransfer.air2 -(); - -massTransfer.water -(); - - lift (); diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties index 1a63c74cbd..6ab28d87c9 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -type heatAndMomentumTransferMultiphaseSystem; +type basicMultiphaseSystem; phases (water oil mercury air); @@ -456,6 +456,9 @@ heatTransfer } ); +phaseTransfer +(); + lift (); diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/trickleBed/constant/phaseProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/trickleBed/constant/phaseProperties index a34d27b991..4e6e5032be 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/trickleBed/constant/phaseProperties +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/trickleBed/constant/phaseProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -type heatAndMomentumTransferMultiphaseSystem; +type basicMultiphaseSystem; phases (air water solid); @@ -176,6 +176,9 @@ virtualMass heatTransfer (); +phaseTransfer +(); + lift (); diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/LES/bubbleColumn/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/LES/bubbleColumn/constant/phaseProperties index 2e2cdb3ce0..495b7548ab 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/LES/bubbleColumn/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/LES/bubbleColumn/constant/phaseProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -type heatAndMomentumTransferTwoPhaseSystem; +type basicTwoPhaseSystem; phases (air water); @@ -153,6 +153,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/LBend/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/LBend/constant/phaseProperties index d53b4d7196..32267f044b 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/LBend/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/LBend/constant/phaseProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -type heatAndMomentumTransferTwoPhaseSystem; +type basicTwoPhaseSystem; phases (solids gas); @@ -100,6 +100,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumn/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumn/constant/phaseProperties index 2e2cdb3ce0..495b7548ab 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumn/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumn/constant/phaseProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -type heatAndMomentumTransferTwoPhaseSystem; +type basicTwoPhaseSystem; phases (air water); @@ -153,6 +153,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/constant/phaseProperties index 0dcc5e83d3..1cbcbc71c6 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting/constant/phaseProperties @@ -196,6 +196,10 @@ massTransfer.liquid ( ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/constant/phaseProperties index 15ffaf76f0..37c9b4d49b 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/constant/phaseProperties @@ -201,41 +201,22 @@ virtualMass } ); -heatTransfer.air +heatTransfer ( (air in water) { - type spherical; - residualAlpha 1e-3; + type RanzMarshall; + residualAlpha 1e-4; } (water in air) { - type RanzMarshall; - residualAlpha 1e-3; + type RanzMarshall; + residualAlpha 1e-4; } ); -heatTransfer.water -( - (air in water) - { - type RanzMarshall; - residualAlpha 1e-3; - } - - (water in air) - { - type spherical; - residualAlpha 1e-3; - } -); - -massTransfer.air -( -); - -massTransfer.water +phaseTransfer ( ); diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/fluidisedBed/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/fluidisedBed/constant/phaseProperties index 39a5e3d5df..bf53d2f369 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/fluidisedBed/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/fluidisedBed/constant/phaseProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -type heatAndMomentumTransferTwoPhaseSystem; +type basicTwoPhaseSystem; phases (particles air); @@ -95,6 +95,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/constant/phaseProperties index 22004881b3..99a9ddc93a 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/constant/phaseProperties @@ -19,7 +19,7 @@ type thermalPhaseChangeTwoPhaseSystem; phases (gas liquid); -massTransfer on; +phaseChange on; gas { @@ -126,10 +126,7 @@ heatTransfer.liquid } ); -massTransfer.gas -(); - -massTransfer.liquid +phaseTransfer (); lift diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/constant/phaseProperties index 9a67ecb950..d2f05c458a 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/constant/phaseProperties @@ -19,7 +19,7 @@ type thermalPhaseChangeTwoPhaseSystem; phases (gas liquid); -massTransfer on; +phaseChange on; gas { @@ -118,11 +118,9 @@ heatTransfer.liquid } ); -massTransfer.gas -(); - -massTransfer.liquid -(); +phaseTransfer +( +); lift (); diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/constant/phaseProperties index da182023be..17fff560b2 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/constant/phaseProperties @@ -19,7 +19,7 @@ type thermalPhaseChangeTwoPhaseSystem; phases (gas liquid); -massTransfer on; +phaseChange on; gas { @@ -169,10 +169,7 @@ heatTransfer.liquid } ); -massTransfer.gas -(); - -massTransfer.liquid +phaseTransfer (); lift diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/phaseProperties index a5ee44680b..f80721020d 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/phaseProperties @@ -19,7 +19,7 @@ type thermalPhaseChangePopulationBalanceTwoPhaseSystem; phases (gas liquid); -massTransfer on; +phaseChange on; populationBalances (bubbles); @@ -188,10 +188,7 @@ heatTransfer.liquid } ); -massTransfer.gas -(); - -massTransfer.liquid +phaseTransfer (); lift diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties index 92508e67a0..e79e79b7ba 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -type heatAndMomentumTransferTwoPhaseSystem; +type basicTwoPhaseSystem; phases (air water); @@ -156,6 +156,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/constant/phaseProperties index 91f7bf3a38..98af514eee 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporating/constant/phaseProperties @@ -207,6 +207,10 @@ massTransfer.liquid } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporatingDissolving/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporatingDissolving/constant/phaseProperties index 17a75c8bbd..10a402fc08 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporatingDissolving/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporatingDissolving/constant/phaseProperties @@ -216,6 +216,10 @@ massTransfer.liquid } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnIATE/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnIATE/constant/phaseProperties index 2e3ef53685..4b33cc7407 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnIATE/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/bubbleColumnIATE/constant/phaseProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -type heatAndMomentumTransferTwoPhaseSystem; +type basicTwoPhaseSystem; phases (air water); @@ -176,6 +176,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/fluidisedBed/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/fluidisedBed/constant/phaseProperties index 140b966aee..98588881ae 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/fluidisedBed/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/fluidisedBed/constant/phaseProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -type heatAndMomentumTransferTwoPhaseSystem; +type basicTwoPhaseSystem; phases (particles air); @@ -97,6 +97,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/injection/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/injection/constant/phaseProperties index 1412341ada..2ed64632d1 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/injection/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/injection/constant/phaseProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -type heatAndMomentumTransferTwoPhaseSystem; +type basicTwoPhaseSystem; phases (air water); @@ -154,6 +154,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties index 02325b51fa..303d5b4a8c 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -type heatAndMomentumTransferTwoPhaseSystem; +type basicTwoPhaseSystem; phases (air water); @@ -153,6 +153,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/steamInjection/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/steamInjection/constant/phaseProperties index 5d6b10626e..6164a30b13 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/steamInjection/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/steamInjection/constant/phaseProperties @@ -19,7 +19,7 @@ type thermalPhaseChangeTwoPhaseSystem; phases (steam water); -massTransfer on; +phaseChange on; steam { @@ -126,10 +126,7 @@ heatTransfer.water } ); -massTransfer.steam -(); - -massTransfer.water +phaseTransfer (); lift diff --git a/tutorials/multiphase/twoPhaseEulerFoam/LES/bubbleColumn/constant/phaseProperties b/tutorials/multiphase/twoPhaseEulerFoam/LES/bubbleColumn/constant/phaseProperties index 34551827f4..f4713a115f 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/LES/bubbleColumn/constant/phaseProperties +++ b/tutorials/multiphase/twoPhaseEulerFoam/LES/bubbleColumn/constant/phaseProperties @@ -136,6 +136,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/twoPhaseEulerFoam/RAS/bubbleColumn/constant/phaseProperties b/tutorials/multiphase/twoPhaseEulerFoam/RAS/bubbleColumn/constant/phaseProperties index 34551827f4..f4713a115f 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/RAS/bubbleColumn/constant/phaseProperties +++ b/tutorials/multiphase/twoPhaseEulerFoam/RAS/bubbleColumn/constant/phaseProperties @@ -136,6 +136,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/twoPhaseEulerFoam/RAS/fluidisedBed/constant/phaseProperties b/tutorials/multiphase/twoPhaseEulerFoam/RAS/fluidisedBed/constant/phaseProperties index 18e714aec4..5d7265a419 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/RAS/fluidisedBed/constant/phaseProperties +++ b/tutorials/multiphase/twoPhaseEulerFoam/RAS/fluidisedBed/constant/phaseProperties @@ -88,6 +88,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties b/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties index c96162d7cf..1dd33cd572 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties +++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties @@ -137,6 +137,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumnIATE/constant/phaseProperties b/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumnIATE/constant/phaseProperties index e74028c4b0..2c53b52aef 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumnIATE/constant/phaseProperties +++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/bubbleColumnIATE/constant/phaseProperties @@ -157,6 +157,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/constant/phaseProperties b/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/constant/phaseProperties index e0ec9c1cd4..5a40180612 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/constant/phaseProperties +++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/constant/phaseProperties @@ -89,6 +89,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/injection/constant/phaseProperties b/tutorials/multiphase/twoPhaseEulerFoam/laminar/injection/constant/phaseProperties index ab168c846a..f4507a5786 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/injection/constant/phaseProperties +++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/injection/constant/phaseProperties @@ -137,6 +137,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( ); diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties b/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties index 808de74ee0..d656a5ced0 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties +++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties @@ -136,6 +136,10 @@ heatTransfer } ); +phaseTransfer +( +); + lift ( );