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
This commit is contained in:
@ -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
|
||||
|
||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "phaseTransferModel.H"
|
||||
#include "phasePair.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::phaseTransferModel> 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);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#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()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
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<phaseTransferModel> New
|
||||
(
|
||||
const dictionary& dict,
|
||||
const phasePair& pair
|
||||
);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- The mass transfer rate
|
||||
virtual tmp<volScalarField> dmdt() const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -366,6 +366,14 @@ Foam::BlendedInterfacialModel<ModelType>::D() const
|
||||
}
|
||||
|
||||
|
||||
template<class ModelType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::BlendedInterfacialModel<ModelType>::dmdt() const
|
||||
{
|
||||
return evaluate(&ModelType::dmdt, "dmdt", ModelType::dimDmdt, false);
|
||||
}
|
||||
|
||||
|
||||
template<class ModelType>
|
||||
bool Foam::BlendedInterfacialModel<ModelType>::writeData(Ostream& os) const
|
||||
{
|
||||
|
||||
@ -190,6 +190,9 @@ public:
|
||||
//- Return the blended diffusivity
|
||||
tmp<volScalarField> D() const;
|
||||
|
||||
//- Return the blended mass transfer rate
|
||||
tmp<volScalarField> dmdt() const;
|
||||
|
||||
//- Dummy write for regIOobject
|
||||
bool writeData(Ostream& os) const;
|
||||
};
|
||||
|
||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#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<class BasePhaseSystem>
|
||||
Foam::HeatAndMassTransferPhaseSystem<BasePhaseSystem>::
|
||||
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<class BasePhaseSystem>
|
||||
Foam::HeatAndMassTransferPhaseSystem<BasePhaseSystem>::
|
||||
~HeatAndMassTransferPhaseSystem()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
Foam::autoPtr<Foam::phaseSystem::heatTransferTable>
|
||||
Foam::HeatAndMassTransferPhaseSystem<BasePhaseSystem>::heatTransfer() const
|
||||
{
|
||||
autoPtr<phaseSystem::heatTransferTable> 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<class BasePhaseSystem>
|
||||
Foam::autoPtr<Foam::phaseSystem::massTransferTable>
|
||||
Foam::HeatAndMassTransferPhaseSystem<BasePhaseSystem>::massTransfer() const
|
||||
{
|
||||
// Create a mass transfer matrix for each species of each phase
|
||||
autoPtr<phaseSystem::massTransferTable> eqnsPtr
|
||||
(
|
||||
new phaseSystem::massTransferTable()
|
||||
);
|
||||
|
||||
phaseSystem::massTransferTable& eqns = eqnsPtr();
|
||||
|
||||
forAll(this->phaseModels_, phasei)
|
||||
{
|
||||
const phaseModel& phase = this->phaseModels_[phasei];
|
||||
|
||||
const PtrList<volScalarField>& Yi = phase.Y();
|
||||
|
||||
forAll(Yi, i)
|
||||
{
|
||||
eqns.insert
|
||||
(
|
||||
Yi[i].name(),
|
||||
new fvScalarMatrix(Yi[i], dimMass/dimTime)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return eqnsPtr;
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
void Foam::HeatAndMassTransferPhaseSystem<BasePhaseSystem>::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<class BasePhaseSystem>
|
||||
bool Foam::HeatAndMassTransferPhaseSystem<BasePhaseSystem>::read()
|
||||
{
|
||||
if (BasePhaseSystem::read())
|
||||
{
|
||||
bool readOK = true;
|
||||
|
||||
// Models ...
|
||||
|
||||
return readOK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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<BasePhaseSystem>::dmdts() const
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
Foam::autoPtr<Foam::phaseSystem::heatTransferTable>
|
||||
Foam::InterfaceCompositionPhaseChangePhaseSystem<BasePhaseSystem>::
|
||||
heatTransfer() const
|
||||
{
|
||||
autoPtr<phaseSystem::heatTransferTable> 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<class BasePhaseSystem>
|
||||
Foam::autoPtr<Foam::phaseSystem::massTransferTable>
|
||||
Foam::InterfaceCompositionPhaseChangePhaseSystem<BasePhaseSystem>::
|
||||
@ -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<class BasePhaseSystem>
|
||||
void Foam::InterfaceCompositionPhaseChangePhaseSystem<BasePhaseSystem>::
|
||||
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
|
||||
|
||||
@ -48,6 +48,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
class interfaceCompositionModel;
|
||||
class massTransferModel;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class InterfaceCompositionPhaseChangePhaseSystem Declaration
|
||||
@ -69,6 +70,13 @@ protected:
|
||||
phasePairKey::hash
|
||||
> interfaceCompositionModelTable;
|
||||
|
||||
typedef HashTable
|
||||
<
|
||||
Pair<autoPtr<BlendedInterfacialModel<massTransferModel>>>,
|
||||
phasePairKey,
|
||||
phasePairKey::hash
|
||||
> massTransferModelTable;
|
||||
|
||||
typedef HashPtrTable<volScalarField, phasePairKey, phasePairKey::hash>
|
||||
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<PtrList<volScalarField>> dmdts() const;
|
||||
|
||||
//- Return the heat transfer matrices
|
||||
virtual autoPtr<phaseSystem::heatTransferTable> heatTransfer() const;
|
||||
|
||||
//- Return the mass transfer matrices
|
||||
virtual autoPtr<phaseSystem::massTransferTable> massTransfer() const;
|
||||
|
||||
//- Correct the thermodynamics
|
||||
virtual void correctThermo();
|
||||
virtual void correctInterfaceThermo();
|
||||
|
||||
//- Read base phaseProperties dictionary
|
||||
virtual bool read();
|
||||
|
||||
@ -23,27 +23,34 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "HeatTransferPhaseSystem.H"
|
||||
#include "OneResistanceHeatTransferPhaseSystem.H"
|
||||
#include "fvmSup.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
Foam::HeatTransferPhaseSystem<BasePhaseSystem>::HeatTransferPhaseSystem
|
||||
Foam::OneResistanceHeatTransferPhaseSystem<BasePhaseSystem>::
|
||||
OneResistanceHeatTransferPhaseSystem
|
||||
(
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
BasePhaseSystem(mesh)
|
||||
{
|
||||
this->generatePairsAndSubModels("heatTransfer", heatTransferModels_);
|
||||
this->generatePairsAndSubModels
|
||||
(
|
||||
"heatTransfer",
|
||||
heatTransferModels_,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
Foam::HeatTransferPhaseSystem<BasePhaseSystem>::~HeatTransferPhaseSystem()
|
||||
Foam::OneResistanceHeatTransferPhaseSystem<BasePhaseSystem>::
|
||||
~OneResistanceHeatTransferPhaseSystem()
|
||||
{}
|
||||
|
||||
|
||||
@ -51,7 +58,8 @@ Foam::HeatTransferPhaseSystem<BasePhaseSystem>::~HeatTransferPhaseSystem()
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
Foam::autoPtr<Foam::phaseSystem::heatTransferTable>
|
||||
Foam::HeatTransferPhaseSystem<BasePhaseSystem>::heatTransfer() const
|
||||
Foam::OneResistanceHeatTransferPhaseSystem<BasePhaseSystem>::
|
||||
heatTransfer() const
|
||||
{
|
||||
autoPtr<phaseSystem::heatTransferTable> eqnsPtr
|
||||
(
|
||||
@ -71,6 +79,7 @@ Foam::HeatTransferPhaseSystem<BasePhaseSystem>::heatTransfer() const
|
||||
);
|
||||
}
|
||||
|
||||
// Heat transfer across the interface
|
||||
forAllConstIter
|
||||
(
|
||||
heatTransferModelTable,
|
||||
@ -96,25 +105,47 @@ Foam::HeatTransferPhaseSystem<BasePhaseSystem>::heatTransfer() const
|
||||
}
|
||||
}
|
||||
|
||||
return eqnsPtr;
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
Foam::autoPtr<Foam::phaseSystem::massTransferTable>
|
||||
Foam::HeatTransferPhaseSystem<BasePhaseSystem>::massTransfer() const
|
||||
{
|
||||
autoPtr<phaseSystem::massTransferTable> 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<class BasePhaseSystem>
|
||||
bool Foam::HeatTransferPhaseSystem<BasePhaseSystem>::read()
|
||||
bool Foam::OneResistanceHeatTransferPhaseSystem<BasePhaseSystem>::read()
|
||||
{
|
||||
if (BasePhaseSystem::read())
|
||||
{
|
||||
@ -22,18 +22,22 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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 modelType> class BlendedInterfacialModel;
|
||||
class heatTransferModel;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class HeatTransferPhaseSystem Declaration
|
||||
Class OneResistanceHeatTransferPhaseSystem Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
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<phaseSystem::heatTransferTable> heatTransfer() const;
|
||||
|
||||
//- Return the mass transfer matrices
|
||||
virtual autoPtr<phaseSystem::massTransferTable> massTransfer() const;
|
||||
|
||||
//- Read base phaseProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
@ -107,7 +108,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "HeatTransferPhaseSystem.C"
|
||||
#include "OneResistanceHeatTransferPhaseSystem.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "PhaseTransferPhaseSystem.H"
|
||||
#include "phaseTransferModel.H"
|
||||
#include "fvmSup.H"
|
||||
|
||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::PhaseTransferPhaseSystem<BasePhaseSystem>::rDmdt
|
||||
(
|
||||
const phasePairKey& key
|
||||
) const
|
||||
{
|
||||
if (!rDmdt_.found(key))
|
||||
{
|
||||
return phaseSystem::dmdt(key);
|
||||
}
|
||||
|
||||
const scalar rDmdtSign(Pair<word>::compare(rDmdt_.find(key).key(), key));
|
||||
|
||||
return rDmdtSign**rDmdt_[key];
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
Foam::PhaseTransferPhaseSystem<BasePhaseSystem>::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<class BasePhaseSystem>
|
||||
Foam::PhaseTransferPhaseSystem<BasePhaseSystem>::
|
||||
~PhaseTransferPhaseSystem()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::PhaseTransferPhaseSystem<BasePhaseSystem>::dmdt
|
||||
(
|
||||
const phasePairKey& key
|
||||
) const
|
||||
{
|
||||
return BasePhaseSystem::dmdt(key) + this->rDmdt(key);
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
Foam::Xfer<Foam::PtrList<Foam::volScalarField>>
|
||||
Foam::PhaseTransferPhaseSystem<BasePhaseSystem>::dmdts() const
|
||||
{
|
||||
PtrList<volScalarField> 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<class BasePhaseSystem>
|
||||
Foam::autoPtr<Foam::phaseSystem::massTransferTable>
|
||||
Foam::PhaseTransferPhaseSystem<BasePhaseSystem>::massTransfer() const
|
||||
{
|
||||
// Create a mass transfer matrix for each species of each phase
|
||||
autoPtr<phaseSystem::massTransferTable> eqnsPtr
|
||||
(
|
||||
new phaseSystem::massTransferTable()
|
||||
);
|
||||
|
||||
phaseSystem::massTransferTable& eqns = eqnsPtr();
|
||||
|
||||
forAll(this->phaseModels_, phasei)
|
||||
{
|
||||
const phaseModel& phase = this->phaseModels_[phasei];
|
||||
|
||||
const PtrList<volScalarField>& 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<volScalarField>& 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<class BasePhaseSystem>
|
||||
void Foam::PhaseTransferPhaseSystem<BasePhaseSystem>::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<class BasePhaseSystem>
|
||||
bool Foam::PhaseTransferPhaseSystem<BasePhaseSystem>::read()
|
||||
{
|
||||
if (BasePhaseSystem::read())
|
||||
{
|
||||
bool readOK = true;
|
||||
|
||||
// Models ...
|
||||
|
||||
return readOK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
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 modelType> class BlendedInterfacialModel;
|
||||
class phaseTransferModel;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class PhaseTransferPhaseSystem Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
class PhaseTransferPhaseSystem
|
||||
:
|
||||
public BasePhaseSystem
|
||||
{
|
||||
protected:
|
||||
|
||||
// Protected typedefs
|
||||
|
||||
typedef HashTable
|
||||
<
|
||||
autoPtr<BlendedInterfacialModel<phaseTransferModel>>,
|
||||
phasePairKey,
|
||||
phasePairKey::hash
|
||||
> phaseTransferModelTable;
|
||||
|
||||
typedef HashPtrTable<volScalarField, phasePairKey, phasePairKey::hash>
|
||||
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<volScalarField> 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<volScalarField> dmdt(const phasePairKey& key) const;
|
||||
|
||||
//- Return the mass transfer rates for each phase
|
||||
virtual Xfer<PtrList<volScalarField>> dmdts() const;
|
||||
|
||||
//- Return the mass transfer matrices
|
||||
virtual autoPtr<phaseSystem::massTransferTable> 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -166,45 +166,6 @@ Foam::PopulationBalancePhaseSystem<BasePhaseSystem>::dmdts() const
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
Foam::autoPtr<Foam::phaseSystem::massTransferTable>
|
||||
Foam::PopulationBalancePhaseSystem<BasePhaseSystem>::heatTransfer() const
|
||||
{
|
||||
autoPtr<phaseSystem::heatTransferTable> 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<class BasePhaseSystem>
|
||||
Foam::autoPtr<Foam::phaseSystem::massTransferTable>
|
||||
Foam::PopulationBalancePhaseSystem<BasePhaseSystem>::massTransfer() const
|
||||
|
||||
@ -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<PtrList<volScalarField>> dmdts() const;
|
||||
|
||||
//- Return the heat transfer matrices
|
||||
virtual autoPtr<phaseSystem::heatTransferTable> heatTransfer() const;
|
||||
|
||||
//- Return the mass transfer matrices
|
||||
virtual autoPtr<phaseSystem::massTransferTable> massTransfer() const;
|
||||
|
||||
|
||||
@ -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<BasePhaseSystem>::heatTransfer() const
|
||||
|
||||
phaseSystem::heatTransferTable& eqns = eqnsPtr();
|
||||
|
||||
// Source term due to mass transfer
|
||||
// Add boundary term
|
||||
forAllConstIter
|
||||
(
|
||||
phaseSystem::phasePairTable,
|
||||
@ -232,10 +232,7 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::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<BasePhaseSystem>::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<BasePhaseSystem>::massTransfer() const
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const phaseModel& phase = pair.phase1();
|
||||
const phaseModel& otherPhase = pair.phase2();
|
||||
|
||||
@ -336,195 +313,171 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::massTransfer() const
|
||||
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
void Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctThermo()
|
||||
void
|
||||
Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::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<volScalarField>
|
||||
(
|
||||
phase.mesh().foundObject<volScalarField>
|
||||
"alphat." + phase.name()
|
||||
)
|
||||
)
|
||||
{
|
||||
const volScalarField& alphat =
|
||||
phase.mesh().lookupObject<volScalarField>
|
||||
(
|
||||
"alphat." + phase.name()
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
const fvPatchList& patches = this->mesh().boundary();
|
||||
forAll(patches, patchi)
|
||||
{
|
||||
const volScalarField& alphat =
|
||||
phase.mesh().lookupObject<volScalarField>
|
||||
(
|
||||
"alphat." + phase.name()
|
||||
);
|
||||
const fvPatch& currPatch = patches[patchi];
|
||||
|
||||
const fvPatchList& patches = this->mesh().boundary();
|
||||
forAll(patches, patchi)
|
||||
if
|
||||
(
|
||||
isA<alphatPhaseChangeWallFunction>
|
||||
(
|
||||
alphat.boundaryField()[patchi]
|
||||
)
|
||||
)
|
||||
{
|
||||
const fvPatch& currPatch = patches[patchi];
|
||||
|
||||
if
|
||||
(
|
||||
isA<alphatPhaseChangeWallFunction>
|
||||
const alphatPhaseChangeWallFunction& PCpatch =
|
||||
refCast<const alphatPhaseChangeWallFunction>
|
||||
(
|
||||
alphat.boundaryField()[patchi]
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
phasePairKey key(phase.name(), otherPhase.name());
|
||||
|
||||
if (PCpatch.activePhasePair(key))
|
||||
{
|
||||
const alphatPhaseChangeWallFunction& PCpatch =
|
||||
refCast<const alphatPhaseChangeWallFunction>
|
||||
(
|
||||
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<word>::compare(pair, key)
|
||||
);
|
||||
|
||||
forAll(patchDmdt, facei)
|
||||
{
|
||||
wallBoilingActive = true;
|
||||
|
||||
const scalarField& patchDmdt =
|
||||
PCpatch.dmdt(key);
|
||||
const scalarField& patchMDotL =
|
||||
PCpatch.mDotL(key);
|
||||
|
||||
const scalar sign
|
||||
(
|
||||
Pair<word>::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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,8 +78,8 @@ protected:
|
||||
//- The saturation model used to evaluate Tsat = Tf
|
||||
autoPtr<saturationModel> 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<phaseSystem::massTransferTable> massTransfer() const;
|
||||
|
||||
//- Correct the thermodynamics
|
||||
virtual void correctThermo();
|
||||
//- Correct the interface thermodynamics
|
||||
virtual void correctInterfaceThermo();
|
||||
|
||||
//- Read base phaseProperties dictionary
|
||||
virtual bool read();
|
||||
|
||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#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<class BasePhaseSystem>
|
||||
Foam::TwoResistanceHeatTransferPhaseSystem<BasePhaseSystem>::
|
||||
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<class BasePhaseSystem>
|
||||
Foam::TwoResistanceHeatTransferPhaseSystem<BasePhaseSystem>::
|
||||
~TwoResistanceHeatTransferPhaseSystem()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
Foam::autoPtr<Foam::phaseSystem::heatTransferTable>
|
||||
Foam::TwoResistanceHeatTransferPhaseSystem<BasePhaseSystem>::
|
||||
heatTransfer() const
|
||||
{
|
||||
autoPtr<phaseSystem::heatTransferTable> 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<tmp<volScalarField>> 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<class BasePhaseSystem>
|
||||
void Foam::TwoResistanceHeatTransferPhaseSystem<BasePhaseSystem>::
|
||||
correctThermo()
|
||||
{
|
||||
phaseSystem::correctThermo();
|
||||
|
||||
correctInterfaceThermo();
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
void Foam::TwoResistanceHeatTransferPhaseSystem<BasePhaseSystem>::
|
||||
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<class BasePhaseSystem>
|
||||
bool Foam::TwoResistanceHeatTransferPhaseSystem<BasePhaseSystem>::read()
|
||||
{
|
||||
if (BasePhaseSystem::read())
|
||||
{
|
||||
bool readOK = true;
|
||||
|
||||
// Models ...
|
||||
|
||||
return readOK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -22,20 +22,25 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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 BasePhaseSystem>
|
||||
class HeatAndMassTransferPhaseSystem
|
||||
class TwoResistanceHeatTransferPhaseSystem
|
||||
:
|
||||
public BasePhaseSystem
|
||||
{
|
||||
@ -66,24 +70,11 @@ protected:
|
||||
|
||||
typedef HashTable
|
||||
<
|
||||
HashTable
|
||||
<
|
||||
autoPtr<BlendedInterfacialModel<heatTransferModel>>
|
||||
>,
|
||||
Pair<autoPtr<BlendedInterfacialModel<heatTransferModel>>>,
|
||||
phasePairKey,
|
||||
phasePairKey::hash
|
||||
> heatTransferModelTable;
|
||||
|
||||
typedef HashTable
|
||||
<
|
||||
HashTable
|
||||
<
|
||||
autoPtr<BlendedInterfacialModel<massTransferModel>>
|
||||
>,
|
||||
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<phaseSystem::heatTransferTable>
|
||||
heatTransfer() const;
|
||||
|
||||
//- Return the mass transfer matrices
|
||||
virtual autoPtr<phaseSystem::massTransferTable> massTransfer() const;
|
||||
virtual autoPtr<phaseSystem::heatTransferTable> 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
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -214,20 +214,22 @@ protected:
|
||||
autoPtr<BlendedInterfacialModel<modelType>>,
|
||||
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<class modelType>
|
||||
void generatePairsAndSubModels
|
||||
(
|
||||
const word& modelName,
|
||||
HashTable
|
||||
<
|
||||
HashTable<autoPtr<modelType>>,
|
||||
Pair<autoPtr<modelType>>,
|
||||
phasePairKey,
|
||||
phasePairKey::hash
|
||||
>& models
|
||||
>& models,
|
||||
const bool correctFixedFluxBCs = true
|
||||
);
|
||||
|
||||
//- Add the field to a phase-indexed list, with the given name,
|
||||
|
||||
@ -85,7 +85,8 @@ void Foam::phaseSystem::generatePairsAndSubModels
|
||||
autoPtr<BlendedInterfacialModel<modelType>>,
|
||||
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<autoPtr<modelType>>,
|
||||
Pair<autoPtr<modelType>>,
|
||||
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<autoPtr<modelType>>()
|
||||
Pair<autoPtr<modelType>>()
|
||||
);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<multiphaseSystem>
|
||||
OneResistanceHeatTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<multiphaseSystem>
|
||||
>
|
||||
>
|
||||
heatAndMomentumTransferMultiphaseSystem;
|
||||
basicMultiphaseSystem;
|
||||
|
||||
addNamedToRunTimeSelectionTable
|
||||
(
|
||||
multiphaseSystem,
|
||||
heatAndMomentumTransferMultiphaseSystem,
|
||||
basicMultiphaseSystem,
|
||||
dictionary,
|
||||
heatAndMomentumTransferMultiphaseSystem
|
||||
);
|
||||
|
||||
typedef
|
||||
HeatAndMassTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<multiphaseSystem>
|
||||
>
|
||||
heatAndMassTransferMultiphaseSystem;
|
||||
|
||||
addNamedToRunTimeSelectionTable
|
||||
(
|
||||
multiphaseSystem,
|
||||
heatAndMassTransferMultiphaseSystem,
|
||||
dictionary,
|
||||
heatAndMassTransferMultiphaseSystem
|
||||
basicMultiphaseSystem
|
||||
);
|
||||
|
||||
typedef
|
||||
InterfaceCompositionPhaseChangePhaseSystem
|
||||
<
|
||||
HeatAndMassTransferPhaseSystem
|
||||
PhaseTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<multiphaseSystem>
|
||||
TwoResistanceHeatTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<multiphaseSystem>
|
||||
>
|
||||
>
|
||||
>
|
||||
interfaceCompositionPhaseChangeMultiphaseSystem;
|
||||
@ -89,9 +81,12 @@ namespace Foam
|
||||
typedef
|
||||
ThermalPhaseChangePhaseSystem
|
||||
<
|
||||
HeatAndMassTransferPhaseSystem
|
||||
PhaseTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<multiphaseSystem>
|
||||
TwoResistanceHeatTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<multiphaseSystem>
|
||||
>
|
||||
>
|
||||
>
|
||||
thermalPhaseChangeMultiphaseSystem;
|
||||
@ -105,12 +100,14 @@ namespace Foam
|
||||
);
|
||||
|
||||
typedef
|
||||
|
||||
PopulationBalancePhaseSystem
|
||||
<
|
||||
HeatAndMassTransferPhaseSystem
|
||||
PhaseTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<multiphaseSystem>
|
||||
OneResistanceHeatTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<multiphaseSystem>
|
||||
>
|
||||
>
|
||||
>
|
||||
populationBalanceMultiphaseSystem;
|
||||
@ -128,9 +125,12 @@ namespace Foam
|
||||
<
|
||||
PopulationBalancePhaseSystem
|
||||
<
|
||||
HeatAndMassTransferPhaseSystem
|
||||
PhaseTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<multiphaseSystem>
|
||||
TwoResistanceHeatTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<multiphaseSystem>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
|
||||
@ -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<twoPhaseSystem>
|
||||
OneResistanceHeatTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<twoPhaseSystem>
|
||||
>
|
||||
>
|
||||
heatAndMomentumTransferTwoPhaseSystem;
|
||||
basicTwoPhaseSystem;
|
||||
|
||||
addNamedToRunTimeSelectionTable
|
||||
(
|
||||
twoPhaseSystem,
|
||||
heatAndMomentumTransferTwoPhaseSystem,
|
||||
basicTwoPhaseSystem,
|
||||
dictionary,
|
||||
heatAndMomentumTransferTwoPhaseSystem
|
||||
);
|
||||
|
||||
typedef
|
||||
HeatAndMassTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<twoPhaseSystem>
|
||||
>
|
||||
heatAndMassTransferTwoPhaseSystem;
|
||||
|
||||
addNamedToRunTimeSelectionTable
|
||||
(
|
||||
twoPhaseSystem,
|
||||
heatAndMassTransferTwoPhaseSystem,
|
||||
dictionary,
|
||||
heatAndMassTransferTwoPhaseSystem
|
||||
basicTwoPhaseSystem
|
||||
);
|
||||
|
||||
typedef
|
||||
InterfaceCompositionPhaseChangePhaseSystem
|
||||
<
|
||||
HeatAndMassTransferPhaseSystem
|
||||
PhaseTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<twoPhaseSystem>
|
||||
TwoResistanceHeatTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<twoPhaseSystem>
|
||||
>
|
||||
>
|
||||
>
|
||||
interfaceCompositionPhaseChangeTwoPhaseSystem;
|
||||
@ -89,10 +81,13 @@ namespace Foam
|
||||
typedef
|
||||
ThermalPhaseChangePhaseSystem
|
||||
<
|
||||
HeatAndMassTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<twoPhaseSystem>
|
||||
>
|
||||
PhaseTransferPhaseSystem
|
||||
<
|
||||
TwoResistanceHeatTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<twoPhaseSystem>
|
||||
>
|
||||
>
|
||||
>
|
||||
thermalPhaseChangeTwoPhaseSystem;
|
||||
|
||||
@ -107,9 +102,12 @@ namespace Foam
|
||||
typedef
|
||||
PopulationBalancePhaseSystem
|
||||
<
|
||||
HeatAndMassTransferPhaseSystem
|
||||
PhaseTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<twoPhaseSystem>
|
||||
OneResistanceHeatTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<twoPhaseSystem>
|
||||
>
|
||||
>
|
||||
>
|
||||
populationBalanceTwoPhaseSystem;
|
||||
@ -127,9 +125,12 @@ namespace Foam
|
||||
<
|
||||
PopulationBalancePhaseSystem
|
||||
<
|
||||
HeatAndMassTransferPhaseSystem
|
||||
PhaseTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<twoPhaseSystem>
|
||||
TwoResistanceHeatTransferPhaseSystem
|
||||
<
|
||||
MomentumTransferPhaseSystem<twoPhaseSystem>
|
||||
>
|
||||
>
|
||||
>
|
||||
>
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -141,16 +141,10 @@ drag
|
||||
virtualMass
|
||||
();
|
||||
|
||||
heatTransfer.air
|
||||
heatTransfer
|
||||
();
|
||||
|
||||
heatTransfer.water
|
||||
();
|
||||
|
||||
massTransfer.air
|
||||
();
|
||||
|
||||
massTransfer.water
|
||||
phaseTransfer
|
||||
();
|
||||
|
||||
lift
|
||||
|
||||
@ -135,16 +135,10 @@ drag
|
||||
virtualMass
|
||||
();
|
||||
|
||||
heatTransfer.air
|
||||
heatTransfer
|
||||
();
|
||||
|
||||
heatTransfer.water
|
||||
();
|
||||
|
||||
massTransfer.air
|
||||
();
|
||||
|
||||
massTransfer.water
|
||||
phaseTransfer
|
||||
();
|
||||
|
||||
lift
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
type heatAndMomentumTransferMultiphaseSystem;
|
||||
type basicMultiphaseSystem;
|
||||
|
||||
phases (air water solid);
|
||||
|
||||
@ -191,6 +191,9 @@ virtualMass
|
||||
heatTransfer
|
||||
();
|
||||
|
||||
phaseTransfer
|
||||
();
|
||||
|
||||
lift
|
||||
();
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
type heatAndMomentumTransferMultiphaseSystem;
|
||||
type basicMultiphaseSystem;
|
||||
|
||||
phases (air water);
|
||||
|
||||
@ -159,6 +159,9 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
();
|
||||
|
||||
lift
|
||||
();
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
type heatAndMomentumTransferMultiphaseSystem;
|
||||
type basicMultiphaseSystem;
|
||||
|
||||
phases (air1 air2 water);
|
||||
|
||||
@ -302,6 +302,9 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
();
|
||||
|
||||
lift
|
||||
();
|
||||
|
||||
|
||||
@ -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
|
||||
();
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
type heatAndMomentumTransferMultiphaseSystem;
|
||||
type basicMultiphaseSystem;
|
||||
|
||||
phases (water oil mercury air);
|
||||
|
||||
@ -456,6 +456,9 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
();
|
||||
|
||||
lift
|
||||
();
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
type heatAndMomentumTransferMultiphaseSystem;
|
||||
type basicMultiphaseSystem;
|
||||
|
||||
phases (air water solid);
|
||||
|
||||
@ -176,6 +176,9 @@ virtualMass
|
||||
heatTransfer
|
||||
();
|
||||
|
||||
phaseTransfer
|
||||
();
|
||||
|
||||
lift
|
||||
();
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
type heatAndMomentumTransferTwoPhaseSystem;
|
||||
type basicTwoPhaseSystem;
|
||||
|
||||
phases (air water);
|
||||
|
||||
@ -153,6 +153,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
type heatAndMomentumTransferTwoPhaseSystem;
|
||||
type basicTwoPhaseSystem;
|
||||
|
||||
phases (solids gas);
|
||||
|
||||
@ -100,6 +100,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
type heatAndMomentumTransferTwoPhaseSystem;
|
||||
type basicTwoPhaseSystem;
|
||||
|
||||
phases (air water);
|
||||
|
||||
@ -153,6 +153,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -196,6 +196,10 @@ massTransfer.liquid
|
||||
(
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -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
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
type heatAndMomentumTransferTwoPhaseSystem;
|
||||
type basicTwoPhaseSystem;
|
||||
|
||||
phases (particles air);
|
||||
|
||||
@ -95,6 +95,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
();
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
type heatAndMomentumTransferTwoPhaseSystem;
|
||||
type basicTwoPhaseSystem;
|
||||
|
||||
phases (air water);
|
||||
|
||||
@ -156,6 +156,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -207,6 +207,10 @@ massTransfer.liquid
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -216,6 +216,10 @@ massTransfer.liquid
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
type heatAndMomentumTransferTwoPhaseSystem;
|
||||
type basicTwoPhaseSystem;
|
||||
|
||||
phases (air water);
|
||||
|
||||
@ -176,6 +176,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
type heatAndMomentumTransferTwoPhaseSystem;
|
||||
type basicTwoPhaseSystem;
|
||||
|
||||
phases (particles air);
|
||||
|
||||
@ -97,6 +97,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
type heatAndMomentumTransferTwoPhaseSystem;
|
||||
type basicTwoPhaseSystem;
|
||||
|
||||
phases (air water);
|
||||
|
||||
@ -154,6 +154,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
type heatAndMomentumTransferTwoPhaseSystem;
|
||||
type basicTwoPhaseSystem;
|
||||
|
||||
phases (air water);
|
||||
|
||||
@ -153,6 +153,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -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
|
||||
|
||||
@ -136,6 +136,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -136,6 +136,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -88,6 +88,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -137,6 +137,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -157,6 +157,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -89,6 +89,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -137,6 +137,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
@ -136,6 +136,10 @@ heatTransfer
|
||||
}
|
||||
);
|
||||
|
||||
phaseTransfer
|
||||
(
|
||||
);
|
||||
|
||||
lift
|
||||
(
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user