fvModels::filmToVoFTransfer,VoFtoFilmTransfer: New collaborating fvModels to transfer phase between VoF and film
These two new fvModels operate between a film and a VoF region to transfer film to the corresponding VoF phase when the film is thick enough to be resolved by the VoF solver or from the VoF phase to the film when the near-wall resolution is too low and it is better to treat it as a wall film. This functionality is equivalent to the VoFPatchTransfer fvModel developed for the old film implementation but coded in a much more general manner with implicit treatment of the mass loss from the film or VoF region for better numerical stability and robustness. The simple tutorials/modules/CHT/VoFToFilm case is provided to demonstrate a film being deposited on a surface as the plate is withdrawn from a liquid. It is an updated version of the tutorials/modules/compressibleVoF/plateFilm case.
This commit is contained in:
@ -3,5 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
wclean libso filmCompressibleMomentumTransportModels
|
||||
wclean
|
||||
wclean libso fvModels/filmVoFTransfer
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -6,5 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
wmake $targetType filmCompressibleMomentumTransportModels
|
||||
wmake $targetType
|
||||
wmake $targetType fvModels/filmVoFTransfer
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -5,8 +5,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
filmToVoFTransfer.C
|
||||
VoFtoFilmTransfer.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libfilmVoFTransfer
|
||||
@ -0,0 +1,29 @@
|
||||
EXE_INC = -ggdb3 \
|
||||
-I$(FOAM_SOLVERS)/modules/isothermalFilm/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/modules/isothermalFilm/filmCompressibleMomentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \
|
||||
\
|
||||
-I$(FOAM_SOLVERS)/modules/compressibleVoF/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/modules/twoPhaseVoFSolver/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/modules/VoFSolver/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/modules/fluidSolver/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/VoF \
|
||||
-I$(LIB_SRC)/twoPhaseModels/interfaceCompression/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/compressibleTwoPhases/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/thermophysicalTransportModel/lnInclude \
|
||||
\
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
|
||||
LIB_LIBS = \
|
||||
-lisothermalFilm \
|
||||
-lcompressibleVoF
|
||||
@ -0,0 +1,428 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2023 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 "VoFtoFilmTransfer.H"
|
||||
#include "filmToVoFTransfer.H"
|
||||
#include "mappedPatchBase.H"
|
||||
#include "fvmSup.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(VoFtoFilmTransfer, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
fvModel,
|
||||
VoFtoFilmTransfer,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fv::VoFtoFilmTransfer::VoFtoFilmTransfer
|
||||
(
|
||||
const word& sourceName,
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fvModel(sourceName, modelType, mesh, dict),
|
||||
VoF_(mesh.lookupObject<solvers::compressibleVoF>(solver::typeName)),
|
||||
filmPatchName_(dict.lookup("filmPatch")),
|
||||
filmPatchi_(mesh.boundaryMesh().findPatchID(filmPatchName_)),
|
||||
phaseName_(dict.lookup("phase")),
|
||||
thermo_
|
||||
(
|
||||
phaseName_ == VoF_.mixture.phase1Name()
|
||||
? VoF_.mixture.thermo1()
|
||||
: VoF_.mixture.thermo2()
|
||||
),
|
||||
alpha_
|
||||
(
|
||||
phaseName_ == VoF_.mixture.phase1Name()
|
||||
? VoF_.mixture.alpha1()
|
||||
: VoF_.mixture.alpha2()
|
||||
),
|
||||
curTimeIndex_(-1),
|
||||
deltaFactorToFilm_
|
||||
(
|
||||
dict.lookupOrDefault<scalar>("deltaFactorToFilm", 0.5)
|
||||
),
|
||||
alphaToFilm_
|
||||
(
|
||||
dict.lookupOrDefault<scalar>("alphaToFilm", 0.1)
|
||||
),
|
||||
transferRateCoeff_
|
||||
(
|
||||
dict.lookupOrDefault<scalar>("transferRateCoeff", 0.1)
|
||||
),
|
||||
transferRate_
|
||||
(
|
||||
volScalarField::Internal::New
|
||||
(
|
||||
"transferRate",
|
||||
mesh,
|
||||
dimensionedScalar(dimless/dimTime, 0)
|
||||
)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wordList Foam::fv::VoFtoFilmTransfer::addSupFields() const
|
||||
{
|
||||
return wordList
|
||||
(
|
||||
{
|
||||
alpha_.name(),
|
||||
thermo_.rho()().name(),
|
||||
thermo_.he().name(),
|
||||
VoF_.U.name()
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFtoFilmTransfer::correct()
|
||||
{
|
||||
if (curTimeIndex_ == mesh().time().timeIndex())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
curTimeIndex_ = mesh().time().timeIndex();
|
||||
|
||||
|
||||
const scalar deltaT = mesh().time().deltaTValue();
|
||||
|
||||
const polyPatch& VoFFilmPatch = mesh().boundaryMesh()[filmPatchi_];
|
||||
|
||||
|
||||
// VoF properties
|
||||
|
||||
const scalarField& alpha = alpha_.boundaryField()[filmPatchi_];
|
||||
|
||||
const scalarField& deltaCoeffs =
|
||||
mesh().boundary()[filmPatchi_].deltaCoeffs();
|
||||
|
||||
const labelList& faceCells = mesh().boundary()[filmPatchi_].faceCells();
|
||||
|
||||
|
||||
// Film properties
|
||||
|
||||
const mappedPatchBase& VoFFilmPatchMap = refCast<const mappedPatchBase>
|
||||
(
|
||||
VoFFilmPatch
|
||||
);
|
||||
|
||||
const solvers::isothermalFilm& film_
|
||||
(
|
||||
VoFFilmPatchMap.nbrMesh().lookupObject<solvers::isothermalFilm>
|
||||
(
|
||||
solver::typeName
|
||||
)
|
||||
);
|
||||
|
||||
const label filmVoFPatchi = VoFFilmPatchMap.nbrPolyPatch().index();
|
||||
|
||||
const scalarField delta
|
||||
(
|
||||
VoFFilmPatchMap.fromNeigbour
|
||||
(
|
||||
film_.delta.boundaryField()[filmVoFPatchi]
|
||||
)
|
||||
);
|
||||
|
||||
transferRate_ = Zero;
|
||||
|
||||
forAll(faceCells, facei)
|
||||
{
|
||||
const label celli = faceCells[facei];
|
||||
|
||||
if
|
||||
(
|
||||
alpha[facei] > 0
|
||||
&& delta[facei] < 2*deltaFactorToFilm_/deltaCoeffs[facei]
|
||||
&& alpha[facei] < alphaToFilm_
|
||||
)
|
||||
{
|
||||
transferRate_[celli] = -transferRateCoeff_/deltaT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class TransferRateFunc>
|
||||
Foam::tmp<Foam::VolInternalField<Type>>
|
||||
inline Foam::fv::VoFtoFilmTransfer::filmToVoFTransferRate
|
||||
(
|
||||
TransferRateFunc transferRateFunc,
|
||||
const dimensionSet& dimProp
|
||||
) const
|
||||
{
|
||||
const mappedPatchBase& VoFFilmPatchMap = refCast<const mappedPatchBase>
|
||||
(
|
||||
mesh().boundaryMesh()[filmPatchi_]
|
||||
);
|
||||
|
||||
const Foam::fvModels& fvModels
|
||||
(
|
||||
fvModels::New
|
||||
(
|
||||
refCast<const fvMesh>(VoFFilmPatchMap.nbrMesh())
|
||||
)
|
||||
);
|
||||
|
||||
const filmToVoFTransfer* filmToVoFPtr = nullptr;
|
||||
|
||||
forAll(fvModels, i)
|
||||
{
|
||||
if (isType<filmToVoFTransfer>(fvModels[i]))
|
||||
{
|
||||
filmToVoFPtr = &refCast<const filmToVoFTransfer>(fvModels[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!filmToVoFPtr)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Cannot find filmToVoFTransfer fvModel for the film region "
|
||||
<< VoFFilmPatchMap.nbrMesh().name()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
tmp<VolInternalField<Type>> tSu
|
||||
(
|
||||
VolInternalField<Type>::New
|
||||
(
|
||||
"Su",
|
||||
mesh(),
|
||||
dimensioned<Type>(dimProp/dimTime, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
UIndirectList<Type>(tSu.ref(), mesh().boundary()[filmPatchi_].faceCells()) =
|
||||
VoFFilmPatchMap.fromNeigbour
|
||||
(
|
||||
(filmToVoFPtr->*transferRateFunc)()
|
||||
);
|
||||
|
||||
return tSu/mesh().V();
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFtoFilmTransfer::addSup
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< type() << ": applying source to " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
if (fieldName == alpha_.name())
|
||||
{
|
||||
eqn +=
|
||||
filmToVoFTransferRate<scalar>
|
||||
(
|
||||
&filmToVoFTransfer::transferRate,
|
||||
dimVolume
|
||||
)
|
||||
+ fvm::Sp(transferRate_, eqn.psi());
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Support for field " << fieldName << " is not implemented"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFtoFilmTransfer::addSup
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< type() << ": applying source to " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
if (fieldName == thermo_.rho()().name())
|
||||
{
|
||||
eqn +=
|
||||
filmToVoFTransferRate<scalar>
|
||||
(
|
||||
&filmToVoFTransfer::rhoTransferRate,
|
||||
dimMass
|
||||
)
|
||||
+ fvm::Sp(alpha()*transferRate_, eqn.psi());
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Support for field " << fieldName << " is not implemented"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFtoFilmTransfer::addSup
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< type() << ": applying source to " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
if (fieldName == thermo_.he().name())
|
||||
{
|
||||
eqn +=
|
||||
filmToVoFTransferRate<scalar>
|
||||
(
|
||||
&filmToVoFTransfer::heTransferRate,
|
||||
dimEnergy
|
||||
)
|
||||
+ fvm::Sp(alpha()*rho()*transferRate_, eqn.psi());
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Support for field " << fieldName << " is not implemented"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFtoFilmTransfer::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< type() << ": applying source to " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
eqn +=
|
||||
filmToVoFTransferRate<vector>
|
||||
(
|
||||
&filmToVoFTransfer::UTransferRate,
|
||||
dimMass*dimVelocity
|
||||
)
|
||||
+ fvm::Sp(alpha_()*thermo_.rho()()*transferRate_, eqn.psi());
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class FieldType>
|
||||
inline Foam::tmp<Foam::Field<Type>> Foam::fv::VoFtoFilmTransfer::TransferRate
|
||||
(
|
||||
const FieldType& f
|
||||
) const
|
||||
{
|
||||
const labelList& faceCells = mesh().boundary()[filmPatchi_].faceCells();
|
||||
|
||||
return tmp<Field<Type>>
|
||||
(
|
||||
new Field<Type>
|
||||
(
|
||||
UIndirectList<Type>
|
||||
(
|
||||
-alpha_()*transferRate_*mesh().V()*f,
|
||||
faceCells
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::fv::VoFtoFilmTransfer::rhoTransferRate() const
|
||||
{
|
||||
return TransferRate<scalar>(thermo_.rho()());
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::fv::VoFtoFilmTransfer::heTransferRate() const
|
||||
{
|
||||
return TransferRate<scalar>(thermo_.rho()()*thermo_.he()());
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::vectorField>
|
||||
Foam::fv::VoFtoFilmTransfer::UTransferRate() const
|
||||
{
|
||||
return TransferRate<vector>(thermo_.rho()()*VoF_.U());
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFtoFilmTransfer::topoChange(const polyTopoChangeMap&)
|
||||
{
|
||||
transferRate_.setSize(mesh().nCells());
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFtoFilmTransfer::mapMesh(const polyMeshMap& map)
|
||||
{
|
||||
transferRate_.setSize(mesh().nCells());
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFtoFilmTransfer::distribute(const polyDistributionMap&)
|
||||
{
|
||||
transferRate_.setSize(mesh().nCells());
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fv::VoFtoFilmTransfer::movePoints()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,244 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2023 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::fv::VoFtoFilmTransfer
|
||||
|
||||
Description
|
||||
Film<->VoF transfer model
|
||||
|
||||
Usage
|
||||
Example usage:
|
||||
\verbatim
|
||||
VoFtoFilmTransfer
|
||||
{
|
||||
type VoFtoFilmTransfer;
|
||||
phase water;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
VoFtoFilmTransfer.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef VoFtoFilmTransfer_H
|
||||
#define VoFtoFilmTransfer_H
|
||||
|
||||
#include "fvModel.H"
|
||||
#include "compressibleVoF.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class VoFtoFilmTransfer Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class VoFtoFilmTransfer
|
||||
:
|
||||
public fvModel
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- The VoF model
|
||||
const solvers::compressibleVoF& VoF_;
|
||||
|
||||
//- Film patch name
|
||||
word filmPatchName_;
|
||||
|
||||
const label filmPatchi_;
|
||||
|
||||
//- The name of the transferred phase
|
||||
word phaseName_;
|
||||
|
||||
//- Reference to the transferred phase thermo
|
||||
const rhoThermo& thermo_;
|
||||
|
||||
//- Reference to the transferred phase volume fraction
|
||||
const volScalarField& alpha_;
|
||||
|
||||
//- Current time index (used for updating)
|
||||
mutable label curTimeIndex_;
|
||||
|
||||
//- Factor of the cell height below which the VoF may be transferred
|
||||
// to the film
|
||||
scalar deltaFactorToFilm_;
|
||||
|
||||
//- VoF limit below which the VoF may be transferred to the film
|
||||
scalar alphaToFilm_;
|
||||
|
||||
//- Transfer rate coefficient
|
||||
scalar transferRateCoeff_;
|
||||
|
||||
volScalarField::Internal transferRate_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Return the transfer rate from the film transferRateFunc
|
||||
template<class Type, class TransferRateFunc>
|
||||
inline tmp<VolInternalField<Type>> filmToVoFTransferRate
|
||||
(
|
||||
TransferRateFunc transferRateFunc,
|
||||
const dimensionSet& dimProp
|
||||
) const;
|
||||
|
||||
//- Return the transfer rate of field f
|
||||
template<class Type, class FieldType>
|
||||
inline tmp<Field<Type>> TransferRate(const FieldType& f) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("VoFtoFilmTransfer");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from explicit source name and mesh
|
||||
VoFtoFilmTransfer
|
||||
(
|
||||
const word& sourceName,
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
//- Disallow default bitwise copy construction
|
||||
VoFtoFilmTransfer
|
||||
(
|
||||
const VoFtoFilmTransfer&
|
||||
) = delete;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
label filmPatchIndex() const
|
||||
{
|
||||
return filmPatchi_;
|
||||
}
|
||||
|
||||
const volScalarField& alpha() const
|
||||
{
|
||||
return alpha_;
|
||||
}
|
||||
|
||||
|
||||
// Checks
|
||||
|
||||
//- Return the list of fields for which the option adds source term
|
||||
// to the transport equation
|
||||
virtual wordList addSupFields() const;
|
||||
|
||||
|
||||
// Correct
|
||||
|
||||
//- Solve the film and update the sources
|
||||
virtual void correct();
|
||||
|
||||
|
||||
// Add explicit and implicit contributions to compressible equation
|
||||
|
||||
//- Add implicit contribution to phase-fraction equation
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const;
|
||||
|
||||
//- Add implicit contribution to phase density equation
|
||||
virtual void addSup
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const;
|
||||
|
||||
//- Add implicit contribution to phase energy equation
|
||||
virtual void addSup
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const;
|
||||
|
||||
//- Add implicit contribution to mixture momentum equation
|
||||
virtual void addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const word& fieldName
|
||||
) const;
|
||||
|
||||
|
||||
// Transfer to film
|
||||
|
||||
//- Return the mass transfer rate
|
||||
tmp<scalarField> rhoTransferRate() const;
|
||||
|
||||
//- Return the energy transfer rate
|
||||
tmp<scalarField> heTransferRate() const;
|
||||
|
||||
//- Return the momentum transfer rate
|
||||
tmp<vectorField> UTransferRate() const;
|
||||
|
||||
|
||||
// Mesh changes
|
||||
|
||||
//- Update topology using the given map
|
||||
virtual void topoChange(const polyTopoChangeMap&);
|
||||
|
||||
//- Update from another mesh using the given map
|
||||
virtual void mapMesh(const polyMeshMap&);
|
||||
|
||||
//- Redistribute or update using the given distribution map
|
||||
virtual void distribute(const polyDistributionMap&);
|
||||
|
||||
//- Update for mesh motion
|
||||
virtual bool movePoints();
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const VoFtoFilmTransfer&) = delete;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,399 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2023 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 "filmToVoFTransfer.H"
|
||||
#include "VoFtoFilmTransfer.H"
|
||||
#include "mappedPatchBase.H"
|
||||
#include "compressibleVoF.H"
|
||||
#include "fvmSup.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(filmToVoFTransfer, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
fvModel,
|
||||
filmToVoFTransfer,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fv::filmToVoFTransfer::filmToVoFTransfer
|
||||
(
|
||||
const word& sourceName,
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fvModel(sourceName, modelType, mesh, dict),
|
||||
film_(mesh.lookupObject<solvers::isothermalFilm>(solver::typeName)),
|
||||
curTimeIndex_(-1),
|
||||
deltaFactorToVoF_
|
||||
(
|
||||
dict.lookupOrDefault<scalar>("deltaFactorToVoF", 1.0)
|
||||
),
|
||||
alphaToVoF_
|
||||
(
|
||||
dict.lookupOrDefault<scalar>("alphaToVoF", 0.5)
|
||||
),
|
||||
transferRateCoeff_
|
||||
(
|
||||
dict.lookupOrDefault<scalar>("transferRateCoeff", 0.1)
|
||||
),
|
||||
transferRate_
|
||||
(
|
||||
volScalarField::Internal::New
|
||||
(
|
||||
"transferRate",
|
||||
mesh,
|
||||
dimensionedScalar(dimless/dimTime, 0)
|
||||
)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wordList Foam::fv::filmToVoFTransfer::addSupFields() const
|
||||
{
|
||||
return wordList
|
||||
(
|
||||
{
|
||||
film_.alpha.name(),
|
||||
film_.thermo.he().name(),
|
||||
film_.U.name()
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmToVoFTransfer::correct()
|
||||
{
|
||||
if (curTimeIndex_ == mesh().time().timeIndex())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
curTimeIndex_ = mesh().time().timeIndex();
|
||||
|
||||
const scalar deltaT = mesh().time().deltaTValue();
|
||||
|
||||
|
||||
// Film properties
|
||||
|
||||
const labelList& faceCells = film_.surfacePatch().faceCells();
|
||||
const scalarField& delta = film_.delta();
|
||||
|
||||
|
||||
// VoF properties
|
||||
|
||||
const solvers::compressibleVoF& VoF_
|
||||
(
|
||||
film_.surfacePatchMap().nbrMesh().lookupObject<solvers::compressibleVoF>
|
||||
(
|
||||
solver::typeName
|
||||
)
|
||||
);
|
||||
|
||||
const label patchiVoF = film_.surfacePatchMap().nbrPolyPatch().index();
|
||||
|
||||
const VoFtoFilmTransfer& VoFtoFilm
|
||||
(
|
||||
refCast<VoFtoFilmTransfer>(VoF_.fvModels()[0])
|
||||
);
|
||||
|
||||
const scalarField alphaVoF
|
||||
(
|
||||
film_.surfacePatchMap().fromNeigbour
|
||||
(
|
||||
VoFtoFilm.alpha().boundaryField()[patchiVoF]
|
||||
)
|
||||
);
|
||||
|
||||
const scalarField deltaCoeffsVoF
|
||||
(
|
||||
film_.surfacePatchMap().fromNeigbour
|
||||
(
|
||||
VoF_.mesh.boundary()[patchiVoF].deltaCoeffs()
|
||||
)
|
||||
);
|
||||
|
||||
// Reset the transfer rate
|
||||
transferRate_ = Zero;
|
||||
|
||||
forAll(faceCells, facei)
|
||||
{
|
||||
const label celli = faceCells[facei];
|
||||
|
||||
if
|
||||
(
|
||||
delta[celli] > 2*deltaFactorToVoF_/deltaCoeffsVoF[facei]
|
||||
|| alphaVoF[facei] > alphaToVoF_
|
||||
)
|
||||
{
|
||||
transferRate_[celli] = -transferRateCoeff_/deltaT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class TransferRateFunc>
|
||||
Foam::tmp<Foam::VolInternalField<Type>>
|
||||
inline Foam::fv::filmToVoFTransfer::VoFToFilmTransferRate
|
||||
(
|
||||
TransferRateFunc transferRateFunc,
|
||||
const dimensionSet& dimProp
|
||||
) const
|
||||
{
|
||||
const Foam::fvModels& fvModels
|
||||
(
|
||||
fvModels::New
|
||||
(
|
||||
refCast<const fvMesh>(film_.surfacePatchMap().nbrMesh())
|
||||
)
|
||||
);
|
||||
|
||||
const VoFtoFilmTransfer* VoFtoFilmPtr = nullptr;
|
||||
|
||||
forAll(fvModels, i)
|
||||
{
|
||||
if (isType<VoFtoFilmTransfer>(fvModels[i]))
|
||||
{
|
||||
const VoFtoFilmTransfer& VoFtoFilm
|
||||
(
|
||||
refCast<const VoFtoFilmTransfer>(fvModels[i])
|
||||
);
|
||||
|
||||
if
|
||||
(
|
||||
VoFtoFilm.filmPatchIndex()
|
||||
== film_.surfacePatchMap().nbrPolyPatch().index()
|
||||
)
|
||||
{
|
||||
VoFtoFilmPtr = &VoFtoFilm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!VoFtoFilmPtr)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Cannot find VoFtoFilmTransfer fvModel for this film "
|
||||
"in VoF region " << film_.surfacePatchMap().nbrMesh().name()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
tmp<VolInternalField<Type>> tSu
|
||||
(
|
||||
VolInternalField<Type>::New
|
||||
(
|
||||
"Su",
|
||||
mesh(),
|
||||
dimensioned<Type>(dimProp/dimTime, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
UIndirectList<Type>(tSu.ref(), film_.surfacePatch().faceCells()) =
|
||||
film_.surfacePatchMap().fromNeigbour
|
||||
(
|
||||
(VoFtoFilmPtr->*transferRateFunc)()
|
||||
);
|
||||
|
||||
return tSu/mesh().V();
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmToVoFTransfer::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< type() << ": applying source to " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
if (fieldName == film_.alpha.name())
|
||||
{
|
||||
eqn +=
|
||||
VoFToFilmTransferRate<scalar>
|
||||
(
|
||||
&VoFtoFilmTransfer::rhoTransferRate,
|
||||
dimMass
|
||||
)
|
||||
+ fvm::Sp(transferRate_*rho(), eqn.psi());
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Support for field " << fieldName << " is not implemented"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmToVoFTransfer::addSup
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< type() << ": applying source to " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
if (fieldName == film_.thermo.he().name())
|
||||
{
|
||||
eqn +=
|
||||
VoFToFilmTransferRate<scalar>
|
||||
(
|
||||
&VoFtoFilmTransfer::heTransferRate,
|
||||
dimEnergy
|
||||
)
|
||||
+ fvm::Sp(alpha()*rho()*transferRate_, eqn.psi());
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Support for field " << fieldName << " is not implemented"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmToVoFTransfer::addSup
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< type() << ": applying source to " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
eqn +=
|
||||
VoFToFilmTransferRate<vector>
|
||||
(
|
||||
&VoFtoFilmTransfer::UTransferRate,
|
||||
dimMass*dimVelocity
|
||||
)
|
||||
+ fvm::Sp(alpha()*rho()*transferRate_, eqn.psi());
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class FieldType>
|
||||
inline Foam::tmp<Foam::Field<Type>> Foam::fv::filmToVoFTransfer::TransferRate
|
||||
(
|
||||
const FieldType& f
|
||||
) const
|
||||
{
|
||||
const labelList& faceCells = film_.surfacePatch().faceCells();
|
||||
|
||||
return tmp<Field<Type>>
|
||||
(
|
||||
new Field<Type>
|
||||
(
|
||||
UIndirectList<Type>
|
||||
(
|
||||
-film_.alpha()*transferRate_*mesh().V()*f,
|
||||
faceCells
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::fv::filmToVoFTransfer::transferRate() const
|
||||
{
|
||||
return TransferRate<scalar>(oneField());
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::fv::filmToVoFTransfer::rhoTransferRate() const
|
||||
{
|
||||
return TransferRate<scalar>(film_.thermo.rho()());
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::fv::filmToVoFTransfer::heTransferRate() const
|
||||
{
|
||||
return TransferRate<scalar>(film_.thermo.rho()()*film_.thermo.he()());
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::vectorField>
|
||||
Foam::fv::filmToVoFTransfer::UTransferRate() const
|
||||
{
|
||||
return TransferRate<vector>(film_.thermo.rho()()*film_.U());
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmToVoFTransfer::topoChange(const polyTopoChangeMap&)
|
||||
{
|
||||
transferRate_.setSize(mesh().nCells());
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmToVoFTransfer::mapMesh(const polyMeshMap& map)
|
||||
{
|
||||
transferRate_.setSize(mesh().nCells());
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmToVoFTransfer::distribute(const polyDistributionMap&)
|
||||
{
|
||||
transferRate_.setSize(mesh().nCells());
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fv::filmToVoFTransfer::movePoints()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,216 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2023 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::fv::filmToVoFTransfer
|
||||
|
||||
Description
|
||||
Film<->VoF transfer model
|
||||
|
||||
Usage
|
||||
Example usage:
|
||||
\verbatim
|
||||
filmToVoFTransfer
|
||||
{
|
||||
type filmToVoFTransfer;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
filmToVoFTransfer.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef filmToVoFTransfer_H
|
||||
#define filmToVoFTransfer_H
|
||||
|
||||
#include "fvModel.H"
|
||||
#include "isothermalFilm.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class filmToVoFTransfer Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class filmToVoFTransfer
|
||||
:
|
||||
public fvModel
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- The film model
|
||||
const solvers::isothermalFilm& film_;
|
||||
|
||||
//- Current time index (used for updating)
|
||||
mutable label curTimeIndex_;
|
||||
|
||||
//- Factor of the cell height above which the film is transferred
|
||||
// to the VoF
|
||||
scalar deltaFactorToVoF_;
|
||||
|
||||
//- VoF limit above which all of the film is transferred to the VoF
|
||||
scalar alphaToVoF_;
|
||||
|
||||
//- Transfer rate coefficient
|
||||
scalar transferRateCoeff_;
|
||||
|
||||
//- Cached transfer rate
|
||||
volScalarField::Internal transferRate_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Return the transfer rate from the VoF transferRateFunc
|
||||
template<class Type, class TransferRateFunc>
|
||||
inline tmp<VolInternalField<Type>> VoFToFilmTransferRate
|
||||
(
|
||||
TransferRateFunc transferRateFunc,
|
||||
const dimensionSet& dimProp
|
||||
) const;
|
||||
|
||||
//- Return the transfer rate of field f
|
||||
template<class Type, class FieldType>
|
||||
inline tmp<Field<Type>> TransferRate(const FieldType& f) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("filmToVoFTransfer");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from explicit source name and mesh
|
||||
filmToVoFTransfer
|
||||
(
|
||||
const word& sourceName,
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
//- Disallow default bitwise copy construction
|
||||
filmToVoFTransfer
|
||||
(
|
||||
const filmToVoFTransfer&
|
||||
) = delete;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Checks
|
||||
|
||||
//- Return the list of fields for which the option adds source term
|
||||
// to the transport equation
|
||||
virtual wordList addSupFields() const;
|
||||
|
||||
|
||||
// Correct
|
||||
|
||||
//- Solve the film and update the sources
|
||||
virtual void correct();
|
||||
|
||||
|
||||
// Add explicit and implicit contributions to compressible equation
|
||||
|
||||
//- Add explicit contribution to phase continuity
|
||||
virtual void addSup
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const;
|
||||
|
||||
//- Add explicit contribution to phase energy equation
|
||||
virtual void addSup
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const;
|
||||
|
||||
//- Add implicit contribution to mixture momentum equation
|
||||
virtual void addSup
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
const word& fieldName
|
||||
) const;
|
||||
|
||||
|
||||
// Transfer to VoF
|
||||
|
||||
//- Return the volume transfer rate
|
||||
tmp<scalarField> transferRate() const;
|
||||
|
||||
//- Return the mass transfer rate
|
||||
tmp<scalarField> rhoTransferRate() const;
|
||||
|
||||
//- Return the energy transfer rate
|
||||
tmp<scalarField> heTransferRate() const;
|
||||
|
||||
//- Return the momentum transfer rate
|
||||
tmp<vectorField> UTransferRate() const;
|
||||
|
||||
|
||||
// Mesh changes
|
||||
|
||||
//- Update topology using the given map
|
||||
virtual void topoChange(const polyTopoChangeMap&);
|
||||
|
||||
//- Update from another mesh using the given map
|
||||
virtual void mapMesh(const polyMeshMap&);
|
||||
|
||||
//- Redistribute or update using the given distribution map
|
||||
virtual void distribute(const polyDistributionMap&);
|
||||
|
||||
//- Update for mesh motion
|
||||
virtual bool movePoints();
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const filmToVoFTransfer&) = delete;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
43
tutorials/modules/CHT/VoFToFilm/0/VoF/T
Normal file
43
tutorials/modules/CHT/VoFToFilm/0/VoF/T
Normal file
@ -0,0 +1,43 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
film
|
||||
{
|
||||
type coupledTemperature;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
53
tutorials/modules/CHT/VoFToFilm/0/VoF/T.air
Normal file
53
tutorials/modules/CHT/VoFToFilm/0/VoF/T.air
Normal file
@ -0,0 +1,53 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/VoF";
|
||||
object T.air;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
film
|
||||
{
|
||||
type calculated;
|
||||
value uniform 300;
|
||||
}
|
||||
vessel
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type calculated;
|
||||
value uniform 300;
|
||||
}
|
||||
atmosphere
|
||||
{
|
||||
type calculated;
|
||||
value uniform 300;
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
53
tutorials/modules/CHT/VoFToFilm/0/VoF/T.liquid
Normal file
53
tutorials/modules/CHT/VoFToFilm/0/VoF/T.liquid
Normal file
@ -0,0 +1,53 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/VoF";
|
||||
object T.liquid;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
film
|
||||
{
|
||||
type calculated;
|
||||
value uniform 300;
|
||||
}
|
||||
vessel
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type calculated;
|
||||
value uniform 300;
|
||||
}
|
||||
atmosphere
|
||||
{
|
||||
type calculated;
|
||||
value uniform 300;
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
46
tutorials/modules/CHT/VoFToFilm/0/VoF/U
Normal file
46
tutorials/modules/CHT/VoFToFilm/0/VoF/U
Normal file
@ -0,0 +1,46 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
film
|
||||
{
|
||||
type mappedValue;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type flowRateOutletVelocity;
|
||||
volumetricFlowRate 2e-6;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
41
tutorials/modules/CHT/VoFToFilm/0/VoF/alpha.liquid.orig
Normal file
41
tutorials/modules/CHT/VoFToFilm/0/VoF/alpha.liquid.orig
Normal file
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alpha.liquid;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
film
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
43
tutorials/modules/CHT/VoFToFilm/0/VoF/p
Normal file
43
tutorials/modules/CHT/VoFToFilm/0/VoF/p
Normal file
@ -0,0 +1,43 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
film
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
41
tutorials/modules/CHT/VoFToFilm/0/VoF/p_rgh
Normal file
41
tutorials/modules/CHT/VoFToFilm/0/VoF/p_rgh
Normal file
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p_rgh;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
film
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type prghTotalPressure;
|
||||
p0 $internalField;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
50
tutorials/modules/CHT/VoFToFilm/0/film/T
Normal file
50
tutorials/modules/CHT/VoFToFilm/0/film/T
Normal file
@ -0,0 +1,50 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
wall
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
surface
|
||||
{
|
||||
type coupledTemperature;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
48
tutorials/modules/CHT/VoFToFilm/0/film/U
Normal file
48
tutorials/modules/CHT/VoFToFilm/0/film/U
Normal file
@ -0,0 +1,48 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
wall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
|
||||
surface
|
||||
{
|
||||
type filmSurfaceVelocity;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
48
tutorials/modules/CHT/VoFToFilm/0/film/delta
Normal file
48
tutorials/modules/CHT/VoFToFilm/0/film/delta
Normal file
@ -0,0 +1,48 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object delta;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
surface
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
47
tutorials/modules/CHT/VoFToFilm/0/film/p
Normal file
47
tutorials/modules/CHT/VoFToFilm/0/film/p
Normal file
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
surface
|
||||
{
|
||||
type mappedFilmPressure;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
12
tutorials/modules/CHT/VoFToFilm/Allclean
Executable file
12
tutorials/modules/CHT/VoFToFilm/Allclean
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
|
||||
rm -rf constant/VoF/polyMesh
|
||||
rm -rf constant/film/polyMesh
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
18
tutorials/modules/CHT/VoFToFilm/Allrun
Executable file
18
tutorials/modules/CHT/VoFToFilm/Allrun
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication -s VoF blockMesh -region VoF
|
||||
runApplication -s film blockMesh -region film
|
||||
|
||||
runApplication setFields -region VoF
|
||||
|
||||
printf "\n%s\n" "Creating files for paraview post-processing"
|
||||
paraFoam -touchAll
|
||||
echo
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
32
tutorials/modules/CHT/VoFToFilm/constant/VoF/fvModels
Normal file
32
tutorials/modules/CHT/VoFToFilm/constant/VoF/fvModels
Normal file
@ -0,0 +1,32 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object fvModels;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
VoFToFilmTransfer
|
||||
{
|
||||
type VoFtoFilmTransfer;
|
||||
|
||||
libs ("libfilmVoFTransfer.so");
|
||||
|
||||
filmPatch film;
|
||||
phase liquid;
|
||||
|
||||
deltaFactorToFilm 0.9;
|
||||
alphaToFilm 0.86;
|
||||
|
||||
transferRateCoeff 0.1;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
21
tutorials/modules/CHT/VoFToFilm/constant/VoF/g
Normal file
21
tutorials/modules/CHT/VoFToFilm/constant/VoF/g
Normal file
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class uniformDimensionedVectorField;
|
||||
location "constant";
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value (0 -9.81 0);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,20 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object momentumTransport;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
23
tutorials/modules/CHT/VoFToFilm/constant/VoF/phaseProperties
Normal file
23
tutorials/modules/CHT/VoFToFilm/constant/VoF/phaseProperties
Normal file
@ -0,0 +1,23 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object phaseProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
phases (liquid air);
|
||||
|
||||
pMin 10000;
|
||||
|
||||
sigma 0.0309;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,51 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object physicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
transport const;
|
||||
thermo hConst;
|
||||
equationOfState rhoConst;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
molWeight 28.9;
|
||||
}
|
||||
equationOfState
|
||||
{
|
||||
rho 1.2;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cp 1007;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
{
|
||||
mu 1.84e-05;
|
||||
Pr 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,31 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object physicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
properties liquid;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
H2O;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
29
tutorials/modules/CHT/VoFToFilm/constant/film/fvModels
Normal file
29
tutorials/modules/CHT/VoFToFilm/constant/film/fvModels
Normal file
@ -0,0 +1,29 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object fvModels;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
filmToVoFTransfer
|
||||
{
|
||||
type filmToVoFTransfer;
|
||||
|
||||
libs ("libfilmVoFTransfer.so");
|
||||
|
||||
deltaFactorToVoF 1.5;
|
||||
alphaToVoF 0.9;
|
||||
|
||||
transferRateCoeff 0.1;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
21
tutorials/modules/CHT/VoFToFilm/constant/film/g
Normal file
21
tutorials/modules/CHT/VoFToFilm/constant/film/g
Normal file
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class uniformDimensionedVectorField;
|
||||
location "constant";
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value (0 -9.81 0);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,20 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object momentumTransport;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,39 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object physicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
properties liquid;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
H2O;
|
||||
}
|
||||
|
||||
sigma
|
||||
{
|
||||
type constant;
|
||||
sigma 0.07;
|
||||
}
|
||||
|
||||
deltaWet 1e-8;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,71 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object SurfaceFilmProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
regionName plate;
|
||||
|
||||
phase liquid;
|
||||
|
||||
viscosity
|
||||
{
|
||||
model Newtonian;
|
||||
}
|
||||
|
||||
sigma 0.07;
|
||||
|
||||
deltaWet 1e-12;
|
||||
|
||||
hydrophilic no;
|
||||
|
||||
transfer
|
||||
{
|
||||
VoFPatchTransfer
|
||||
{
|
||||
deltaFactorToVoF 1.5;
|
||||
alphaToVoF 0.9;
|
||||
|
||||
deltaFactorToFilm 0.9;
|
||||
alphaToFilm 0.86;
|
||||
|
||||
transferRateCoeff 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
momentumTransport
|
||||
{
|
||||
model laminar;
|
||||
Cf 0.001;
|
||||
}
|
||||
|
||||
upperSurfaceModels
|
||||
{
|
||||
heatTransfer
|
||||
{
|
||||
model constant;
|
||||
c0 1;
|
||||
}
|
||||
}
|
||||
|
||||
lowerSurfaceModels
|
||||
{
|
||||
heatTransfer
|
||||
{
|
||||
model constant;
|
||||
c0 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
113
tutorials/modules/CHT/VoFToFilm/system/VoF/blockMeshDict
Normal file
113
tutorials/modules/CHT/VoFToFilm/system/VoF/blockMeshDict
Normal file
@ -0,0 +1,113 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 0.001;
|
||||
|
||||
w 50;
|
||||
h 100;
|
||||
|
||||
wCells 80;
|
||||
hCells 80;
|
||||
|
||||
wGrading
|
||||
(
|
||||
(0.1 1 1)
|
||||
(0.9 2.25 10)
|
||||
);
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 -1)
|
||||
($w 0 -1)
|
||||
(0 $h -1)
|
||||
($w $h -1)
|
||||
|
||||
(0 0 0)
|
||||
($w 0 0)
|
||||
(0 $h 0)
|
||||
($w $h 0)
|
||||
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 3 2 4 5 7 6)
|
||||
($wCells $hCells 1)
|
||||
simpleGrading ($wGrading 1 1)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
film
|
||||
{
|
||||
type mappedExtrudedWall;
|
||||
neighbourRegion film;
|
||||
neighbourPatch surface;
|
||||
transformType none;
|
||||
|
||||
faces
|
||||
(
|
||||
(0 2 6 4)
|
||||
);
|
||||
}
|
||||
|
||||
vessel
|
||||
{
|
||||
type symmetryPlane;
|
||||
faces
|
||||
(
|
||||
(1 3 7 5)
|
||||
);
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 1 5 4)
|
||||
);
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(2 3 7 6)
|
||||
);
|
||||
}
|
||||
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(0 2 3 1)
|
||||
);
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(4 5 7 6)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object extrudeToRegionMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
region film;
|
||||
|
||||
patches (film);
|
||||
|
||||
extrudeModel linearDirection;
|
||||
|
||||
adaptMesh no;
|
||||
|
||||
patchTypes (mappedExtrudedWall);
|
||||
patchNames (film);
|
||||
|
||||
regionPatchTypes (filmWall);
|
||||
regionPatchNames (wall);
|
||||
|
||||
regionOppositePatchTypes (mappedFilmSurface);
|
||||
regionOppositePatchNames (surface);
|
||||
|
||||
nLayers 1;
|
||||
|
||||
expansionRatio 1;
|
||||
|
||||
linearNormalCoeffs
|
||||
{
|
||||
thickness 0.001;
|
||||
}
|
||||
|
||||
linearDirectionCoeffs
|
||||
{
|
||||
direction (1 0 0);
|
||||
thickness 0.001;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
58
tutorials/modules/CHT/VoFToFilm/system/VoF/fvSchemes
Normal file
58
tutorials/modules/CHT/VoFToFilm/system/VoF/fvSchemes
Normal file
@ -0,0 +1,58 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
div(phi,alpha) Gauss interfaceCompression vanLeer 1;
|
||||
|
||||
div(rhoPhi,U) Gauss linearUpwindV grad(U);
|
||||
|
||||
div(alphaRhoPhi,e) Gauss linearUpwind grad(e);
|
||||
div(alphaRhoPhi,T) Gauss upwind;
|
||||
|
||||
div(phi,p) Gauss upwind;
|
||||
div(rhoPhi,K) Gauss upwind;
|
||||
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
89
tutorials/modules/CHT/VoFToFilm/system/VoF/fvSolution
Normal file
89
tutorials/modules/CHT/VoFToFilm/system/VoF/fvSolution
Normal file
@ -0,0 +1,89 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
"alpha.liquid.*"
|
||||
{
|
||||
nAlphaCorr 2;
|
||||
nAlphaSubCycles 1;
|
||||
|
||||
MULESCorr yes;
|
||||
nLimiterIter 5;
|
||||
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-8;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"pcorr.*"
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-5;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-9;
|
||||
relTol 0.05;
|
||||
}
|
||||
|
||||
p_rghFinal
|
||||
{
|
||||
$p_rgh;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"U.*"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(T|k|B|nuTilda|sigma).*"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-8;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor no;
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
equations
|
||||
{
|
||||
".*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
35
tutorials/modules/CHT/VoFToFilm/system/VoF/setFieldsDict
Normal file
35
tutorials/modules/CHT/VoFToFilm/system/VoF/setFieldsDict
Normal file
@ -0,0 +1,35 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object setFieldsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.liquid 0
|
||||
);
|
||||
|
||||
regions
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box (0 0 -1) (1 0.08 1);
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.liquid 1
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
60
tutorials/modules/CHT/VoFToFilm/system/controlDict
Normal file
60
tutorials/modules/CHT/VoFToFilm/system/controlDict
Normal file
@ -0,0 +1,60 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application foamMultiRun;
|
||||
|
||||
regionSolvers
|
||||
{
|
||||
film film;
|
||||
VoF compressibleVoF;
|
||||
}
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 5;
|
||||
|
||||
deltaT 1e-3;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 10;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep no;
|
||||
|
||||
maxCo 1;
|
||||
maxAlphaCo 1;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
// ************************************************************************* //
|
||||
115
tutorials/modules/CHT/VoFToFilm/system/film/blockMeshDict
Normal file
115
tutorials/modules/CHT/VoFToFilm/system/film/blockMeshDict
Normal file
@ -0,0 +1,115 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 0.001;
|
||||
|
||||
w 1;
|
||||
h 100;
|
||||
|
||||
wCells 1;
|
||||
hCells 80;
|
||||
|
||||
wGrading 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 -1)
|
||||
($w 0 -1)
|
||||
(0 $h -1)
|
||||
($w $h -1)
|
||||
|
||||
(0 0 0)
|
||||
($w 0 0)
|
||||
(0 $h 0)
|
||||
($w $h 0)
|
||||
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 3 2 4 5 7 6)
|
||||
($wCells $hCells 1)
|
||||
simpleGrading ($wGrading 1 1)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
wall
|
||||
{
|
||||
type filmWall;
|
||||
|
||||
neighbourRegion VoF;
|
||||
neighbourPatch film;
|
||||
|
||||
faces
|
||||
(
|
||||
(0 2 6 4)
|
||||
);
|
||||
}
|
||||
|
||||
surface
|
||||
{
|
||||
type mappedFilmSurface;
|
||||
|
||||
neighbourRegion VoF;
|
||||
neighbourPatch film;
|
||||
oppositePatch wall;
|
||||
transformType none;
|
||||
|
||||
faces
|
||||
(
|
||||
(1 3 7 5)
|
||||
);
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 1 5 4)
|
||||
);
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(2 3 7 6)
|
||||
);
|
||||
}
|
||||
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(0 2 3 1)
|
||||
);
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(4 5 7 6)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
47
tutorials/modules/CHT/VoFToFilm/system/film/fvSchemes
Normal file
47
tutorials/modules/CHT/VoFToFilm/system/film/fvSchemes
Normal file
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default filmGauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
div(phid,alpha) Gauss upwind; // vanLeer;
|
||||
div(alphaRhoPhi,U) Gauss upwind;
|
||||
div(alphaRhoPhi,e) Gauss upwind;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear orthogonal;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default orthogonal;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
55
tutorials/modules/CHT/VoFToFilm/system/film/fvSolution
Normal file
55
tutorials/modules/CHT/VoFToFilm/system/film/fvSolution
Normal file
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
"alpha.*"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
|
||||
tolerance 1e-10;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|e).*"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
|
||||
tolerance 1e-10;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor yes;
|
||||
nOuterCorrectors 2;
|
||||
nCorrectors 1;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
equations
|
||||
{
|
||||
".*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
21
tutorials/modules/CHT/VoFToFilm/system/fvSolution
Normal file
21
tutorials/modules/CHT/VoFToFilm/system/fvSolution
Normal file
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
nOuterCorrectors 1;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user