isothermalFilm/fvModels/filmCloudTransfer: New models to transfer Lagrangian parcels to film
The parcel transfer occurs from the cloudFilmTransfer surfaceFilmModel specified
in the <fluid> region constant/<fluid>/cloudProperties dictionary:
.
.
.
libs ("libfilmCloudTransfer.so");
.
.
.
surfaceFilmModel cloudFilmTransfer;
and the film filmCloudTransfer specified in the <film> region
constant/<film>/fvModels dictionary:
.
.
.
filmCloudTransfer
{
type filmCloudTransfer;
libs ("libfilmCloudTransfer.so");
}
For an example of cloud->film->VoF transfer see the
tutorials/modules/multiRegion/film/cylinder tutorial case.
Note that parcel transfer from film to Lagrangian cloud is not yet supported,
this will be added soon.
This commit is contained in:
@ -36,6 +36,7 @@ void Foam::solvers::film::thermophysicalPredictor()
|
||||
fvScalarMatrix heEqn
|
||||
(
|
||||
fvm::ddt(alpha, rho, he) + fvm::div(alphaRhoPhi, he)
|
||||
- fvm::Sp(contErr(), he)
|
||||
+ thermophysicalTransport->divq(he)
|
||||
==
|
||||
fvModels().source(alpha, rho, he)
|
||||
@ -50,6 +51,9 @@ void Foam::solvers::film::thermophysicalPredictor()
|
||||
fvConstraints().constrain(he);
|
||||
|
||||
thermo_.correct();
|
||||
|
||||
Info<< max(alpha) << " " << min(alpha) << endl;
|
||||
Info<< max(thermo.T()) << " " << min(thermo.T()) << endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7,5 +7,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
wmake $targetType filmCompressibleMomentumTransportModels
|
||||
wmake $targetType
|
||||
wmake $targetType fvModels/filmVoFTransfer
|
||||
wmake $targetType fvModels/filmCloudTransfer
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -66,7 +66,7 @@ void Foam::solvers::isothermalFilm::correctAlpha()
|
||||
|
||||
const surfaceScalarField alphaf
|
||||
(
|
||||
constrainedField(max(fvc::interpolate(alpha), scalar(0)))
|
||||
constrainedField(fvc::interpolate(alpha))
|
||||
);
|
||||
|
||||
const surfaceScalarField alpharAUf
|
||||
@ -76,7 +76,7 @@ void Foam::solvers::isothermalFilm::correctAlpha()
|
||||
|
||||
const surfaceScalarField phig("phig", phip + pbByAlphaGradRhof*alphaf);
|
||||
|
||||
phi = constrainPhiHbyA(fvc::flux(HbyA) - alpharAUf*phig, U, alpha);
|
||||
phi = constrainedField(fvc::flux(HbyA) - alpharAUf*phig);
|
||||
|
||||
const surfaceScalarField phid("phid", rhof*phi);
|
||||
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
filmCloudTransfer.C
|
||||
|
||||
cloudFilmTransfer/CloudFilmTransfer/CloudFilmTransferBase.C
|
||||
cloudFilmTransfer/makeThermoParcelCloudFilmTransfer.C
|
||||
cloudFilmTransfer/makeReactingParcelCloudFilmTransfer.C
|
||||
cloudFilmTransfer/makeReactingMultiphaseParcelCloudFilmTransfer.C
|
||||
cloudFilmTransfer/makeSprayParcelCloudFilmTransfer.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libfilmCloudTransfer
|
||||
@ -0,0 +1,22 @@
|
||||
EXE_INC = \
|
||||
-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)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \
|
||||
\
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/multicomponentThermo/lnInclude \
|
||||
\
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
|
||||
LIB_LIBS = \
|
||||
-lisothermalFilm \
|
||||
-llagrangian \
|
||||
-llagrangianParcel
|
||||
@ -0,0 +1,743 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-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 "CloudFilmTransfer.H"
|
||||
#include "filmCloudTransfer.H"
|
||||
#include "mappedPatchBase.H"
|
||||
#include "ThermoCloud.H"
|
||||
#include "meshTools.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
using namespace Foam::constant::mathematical;
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::vector Foam::CloudFilmTransfer<CloudType>::splashDirection
|
||||
(
|
||||
const vector& tanVec1,
|
||||
const vector& tanVec2,
|
||||
const vector& nf
|
||||
) const
|
||||
{
|
||||
// Azimuthal angle [rad]
|
||||
const scalar phiSi = twoPi*rndGen_.sample01<scalar>();
|
||||
|
||||
// Ejection angle [rad]
|
||||
const scalar thetaSi = pi/180.0*(rndGen_.sample01<scalar>()*(50 - 5) + 5);
|
||||
|
||||
// Direction vector of new parcel
|
||||
const scalar alpha = sin(thetaSi);
|
||||
const scalar dcorr = cos(thetaSi);
|
||||
const vector normal = alpha*(tanVec1*cos(phiSi) + tanVec2*sin(phiSi));
|
||||
vector dirVec = dcorr*nf;
|
||||
dirVec += normal;
|
||||
|
||||
return dirVec/mag(dirVec);
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CloudFilmTransfer<CloudType>::absorbInteraction
|
||||
(
|
||||
fv::filmCloudTransfer& filmCloudTransfer,
|
||||
const parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const label facei,
|
||||
const scalar mass,
|
||||
bool& keepParticle
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "Parcel " << p.origId() << " absorbInteraction" << endl;
|
||||
}
|
||||
|
||||
const fluidThermo& carrierThermo =
|
||||
static_cast<const ThermoCloud<CloudType>&>(this->owner())
|
||||
.carrierThermo();
|
||||
|
||||
const parcelThermo& thermo =
|
||||
static_cast<const ThermoCloud<CloudType>&>(this->owner()).thermo();
|
||||
|
||||
// Patch face normal
|
||||
const vector& nf = pp.faceNormals()[facei];
|
||||
|
||||
// Patch velocity
|
||||
const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
|
||||
|
||||
// Relative parcel velocity
|
||||
const vector Urel = p.U() - Up;
|
||||
|
||||
// Parcel normal velocity
|
||||
const vector Un = nf*(Urel & nf);
|
||||
|
||||
// Parcel tangential velocity
|
||||
const vector Ut = Urel - Un;
|
||||
|
||||
const liquidProperties& liq = thermo.liquids().properties()[0];
|
||||
|
||||
// Local pressure
|
||||
const scalar pc = carrierThermo.p()[p.cell()];
|
||||
|
||||
filmCloudTransfer.parcelFromCloud
|
||||
(
|
||||
facei,
|
||||
mass, // mass
|
||||
mass*Ut, // tangential momentum
|
||||
mass*mag(Un), // impingement pressure
|
||||
mass*liq.Hs(pc, p.T()) // energy
|
||||
);
|
||||
|
||||
this->nParcelsTransferred()++;
|
||||
|
||||
keepParticle = false;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CloudFilmTransfer<CloudType>::bounceInteraction
|
||||
(
|
||||
parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const label facei,
|
||||
bool& keepParticle
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "Parcel " << p.origId() << " bounceInteraction" << endl;
|
||||
}
|
||||
|
||||
// Patch face normal
|
||||
const vector& nf = pp.faceNormals()[facei];
|
||||
|
||||
// Patch velocity
|
||||
const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
|
||||
|
||||
// Relative parcel velocity
|
||||
const vector Urel = p.U() - Up;
|
||||
|
||||
// Flip parcel normal velocity component
|
||||
p.U() -= 2.0*nf*(Urel & nf);
|
||||
|
||||
keepParticle = true;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CloudFilmTransfer<CloudType>::drySplashInteraction
|
||||
(
|
||||
fv::filmCloudTransfer& filmCloudTransfer,
|
||||
const parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const label facei,
|
||||
bool& keepParticle
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "Parcel " << p.origId() << " drySplashInteraction" << endl;
|
||||
}
|
||||
|
||||
const fluidThermo& carrierThermo =
|
||||
static_cast<const ThermoCloud<CloudType>&>(this->owner())
|
||||
.carrierThermo();
|
||||
|
||||
const parcelThermo& thermo =
|
||||
static_cast<const ThermoCloud<CloudType>&>(this->owner()).thermo();
|
||||
|
||||
const liquidProperties& liq = thermo.liquids().properties()[0];
|
||||
|
||||
// Patch face velocity and normal
|
||||
const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
|
||||
const vector& nf = pp.faceNormals()[facei];
|
||||
|
||||
// Local pressure
|
||||
const scalar pc = carrierThermo.p()[p.cell()];
|
||||
|
||||
// Retrieve parcel properties
|
||||
const scalar m = p.mass()*p.nParticle();
|
||||
const scalar rho = p.rho();
|
||||
const scalar d = p.d();
|
||||
const scalar sigma = liq.sigma(pc, p.T());
|
||||
const scalar mu = liq.mu(pc, p.T());
|
||||
const vector Urel = p.U() - Up;
|
||||
const vector Un = nf*(Urel & nf);
|
||||
|
||||
// Laplace number
|
||||
const scalar La = rho*sigma*d/sqr(mu);
|
||||
|
||||
// Weber number
|
||||
const scalar We = rho*magSqr(Un)*d/sigma;
|
||||
|
||||
// Critical Weber number
|
||||
const scalar Wec = Adry_*pow(La, -0.183);
|
||||
|
||||
if (We < Wec) // Adhesion - assume absorb
|
||||
{
|
||||
absorbInteraction(filmCloudTransfer, p, pp, facei, m, keepParticle);
|
||||
}
|
||||
else // Splash
|
||||
{
|
||||
// Ratio of incident mass to splashing mass
|
||||
const scalar mRatio = 0.2 + 0.6*rndGen_.sample01<scalar>();
|
||||
splashInteraction
|
||||
(
|
||||
filmCloudTransfer,
|
||||
p,
|
||||
pp,
|
||||
facei,
|
||||
mRatio,
|
||||
We,
|
||||
Wec,
|
||||
sigma,
|
||||
keepParticle
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CloudFilmTransfer<CloudType>::wetSplashInteraction
|
||||
(
|
||||
fv::filmCloudTransfer& filmCloudTransfer,
|
||||
parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const label facei,
|
||||
bool& keepParticle
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "Parcel " << p.origId() << " wetSplashInteraction" << endl;
|
||||
}
|
||||
|
||||
const fluidThermo& carrierThermo =
|
||||
static_cast<const ThermoCloud<CloudType>&>(this->owner())
|
||||
.carrierThermo();
|
||||
|
||||
const parcelThermo& thermo =
|
||||
static_cast<const ThermoCloud<CloudType>&>(this->owner()).thermo();
|
||||
|
||||
const liquidProperties& liq = thermo.liquids().properties()[0];
|
||||
|
||||
// Patch face velocity and normal
|
||||
const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
|
||||
const vector& nf = pp.faceNormals()[facei];
|
||||
|
||||
// Local pressure
|
||||
const scalar pc = carrierThermo.p()[p.cell()];
|
||||
|
||||
// Retrieve parcel properties
|
||||
const scalar m = p.mass()*p.nParticle();
|
||||
const scalar rho = p.rho();
|
||||
const scalar d = p.d();
|
||||
vector& U = p.U();
|
||||
const scalar sigma = liq.sigma(pc, p.T());
|
||||
const scalar mu = liq.mu(pc, p.T());
|
||||
const vector Urel = p.U() - Up;
|
||||
const vector Un = nf*(Urel & nf);
|
||||
const vector Ut = Urel - Un;
|
||||
|
||||
// Laplace number
|
||||
const scalar La = rho*sigma*d/sqr(mu);
|
||||
|
||||
// Weber number
|
||||
const scalar We = rho*magSqr(Un)*d/sigma;
|
||||
|
||||
// Critical Weber number
|
||||
const scalar Wec = Awet_*pow(La, -0.183);
|
||||
|
||||
if (We < 2) // Adhesion - assume absorb
|
||||
{
|
||||
absorbInteraction(filmCloudTransfer, p, pp, facei, m, keepParticle);
|
||||
}
|
||||
else if ((We >= 2) && (We < 20)) // Bounce
|
||||
{
|
||||
// Incident angle of impingement
|
||||
const scalar theta = pi/2 - acos(U/mag(U) & nf);
|
||||
|
||||
// Restitution coefficient
|
||||
const scalar epsilon = 0.993 - theta*(1.76 - theta*(1.56 - theta*0.49));
|
||||
|
||||
// Update parcel velocity
|
||||
U = -epsilon*(Un) + 5.0/7.0*(Ut);
|
||||
|
||||
keepParticle = true;
|
||||
return;
|
||||
}
|
||||
else if ((We >= 20) && (We < Wec)) // Spread - assume absorb
|
||||
{
|
||||
absorbInteraction(filmCloudTransfer, p, pp, facei, m, keepParticle);
|
||||
}
|
||||
else // Splash
|
||||
{
|
||||
// Ratio of incident mass to splashing mass
|
||||
// splash mass can be > incident mass due to film entrainment
|
||||
const scalar mRatio = 0.2 + 0.9*rndGen_.sample01<scalar>();
|
||||
splashInteraction
|
||||
(
|
||||
filmCloudTransfer,
|
||||
p,
|
||||
pp,
|
||||
facei,
|
||||
mRatio,
|
||||
We,
|
||||
Wec,
|
||||
sigma,
|
||||
keepParticle
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CloudFilmTransfer<CloudType>::splashInteraction
|
||||
(
|
||||
fv::filmCloudTransfer& filmCloudTransfer,
|
||||
const parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const label facei,
|
||||
const scalar mRatio,
|
||||
const scalar We,
|
||||
const scalar Wec,
|
||||
const scalar sigma,
|
||||
bool& keepParticle
|
||||
)
|
||||
{
|
||||
// Patch face velocity and normal
|
||||
const fvMesh& mesh = this->owner().mesh();
|
||||
const vector& Up = this->owner().U().boundaryField()[pp.index()][facei];
|
||||
const vector& nf = pp.faceNormals()[facei];
|
||||
|
||||
// Determine direction vectors tangential to patch normal
|
||||
const vector tanVec1 = normalised(perpendicular(nf));
|
||||
const vector tanVec2 = nf^tanVec1;
|
||||
|
||||
// Retrieve parcel properties
|
||||
const scalar np = p.nParticle();
|
||||
const scalar m = p.mass()*np;
|
||||
const scalar d = p.d();
|
||||
const vector Urel = p.U() - Up;
|
||||
const vector Un = nf*(Urel & nf);
|
||||
const vector Ut = Urel - Un;
|
||||
const vector& posC = mesh.C()[p.cell()];
|
||||
const vector& posCf = mesh.Cf().boundaryField()[pp.index()][facei];
|
||||
|
||||
// Total mass of (all) splashed parcels
|
||||
const scalar mSplash = m*mRatio;
|
||||
|
||||
// Number of splashed particles per incoming particle
|
||||
const scalar Ns = 5.0*(We/Wec - 1.0);
|
||||
|
||||
// Average diameter of splashed particles
|
||||
const scalar dBarSplash = 1/cbrt(6.0)*cbrt(mRatio/Ns)*d + rootVSmall;
|
||||
|
||||
// Cumulative diameter splash distribution
|
||||
const scalar dMax = 0.9*cbrt(mRatio)*d;
|
||||
const scalar dMin = 0.1*dMax;
|
||||
const scalar K = exp(-dMin/dBarSplash) - exp(-dMax/dBarSplash);
|
||||
|
||||
// Surface energy of secondary parcels [J]
|
||||
scalar ESigmaSec = 0;
|
||||
|
||||
// Sample splash distribution to determine secondary parcel diameters
|
||||
scalarList dNew(parcelsPerSplash_);
|
||||
scalarList npNew(parcelsPerSplash_);
|
||||
forAll(dNew, i)
|
||||
{
|
||||
const scalar y = rndGen_.sample01<scalar>();
|
||||
dNew[i] = -dBarSplash*log(exp(-dMin/dBarSplash) - y*K);
|
||||
npNew[i] = mRatio*np*pow3(d)/pow3(dNew[i])/parcelsPerSplash_;
|
||||
ESigmaSec += npNew[i]*sigma*p.areaS(dNew[i]);
|
||||
}
|
||||
|
||||
// Incident kinetic energy [J]
|
||||
const scalar EKIn = 0.5*m*magSqr(Un);
|
||||
|
||||
// Incident surface energy [J]
|
||||
const scalar ESigmaIn = np*sigma*p.areaS(d);
|
||||
|
||||
// Dissipative energy
|
||||
const scalar Ed = max(0.8*EKIn, np*Wec/12*pi*sigma*sqr(d));
|
||||
|
||||
// Total energy [J]
|
||||
const scalar EKs = EKIn + ESigmaIn - ESigmaSec - Ed;
|
||||
|
||||
// Switch to absorb if insufficient energy for splash
|
||||
if (EKs <= 0)
|
||||
{
|
||||
absorbInteraction(filmCloudTransfer, p, pp, facei, m, keepParticle);
|
||||
return;
|
||||
}
|
||||
|
||||
// Helper variables to calculate magUns0
|
||||
const scalar logD = log(d);
|
||||
const scalar coeff2 = log(dNew[0]) - logD + rootVSmall;
|
||||
scalar coeff1 = 0.0;
|
||||
forAll(dNew, i)
|
||||
{
|
||||
coeff1 += sqr(log(dNew[i]) - logD);
|
||||
}
|
||||
|
||||
// Magnitude of the normal velocity of the first splashed parcel
|
||||
const scalar magUns0 =
|
||||
sqrt(2.0*parcelsPerSplash_*EKs/mSplash/(1.0 + coeff1/sqr(coeff2)));
|
||||
|
||||
// Set splashed parcel properties
|
||||
forAll(dNew, i)
|
||||
{
|
||||
const vector dirVec = splashDirection(tanVec1, tanVec2, -nf);
|
||||
|
||||
// Create a new parcel by copying source parcel
|
||||
parcelType* pPtr = new parcelType(p);
|
||||
|
||||
pPtr->origId() = pPtr->getNewParticleID();
|
||||
|
||||
pPtr->origProc() = Pstream::myProcNo();
|
||||
|
||||
if (splashParcelType_ >= 0)
|
||||
{
|
||||
pPtr->typeId() = splashParcelType_;
|
||||
}
|
||||
|
||||
// Perturb new parcels towards the owner cell centre
|
||||
pPtr->track(mesh, 0.5*rndGen_.sample01<scalar>()*(posC - posCf), 0);
|
||||
|
||||
pPtr->nParticle() = npNew[i];
|
||||
|
||||
pPtr->d() = dNew[i];
|
||||
|
||||
pPtr->U() = dirVec*(mag(Cf_*Ut) + magUns0*(log(dNew[i]) - logD)/coeff2);
|
||||
|
||||
// Apply correction to velocity for 2-D cases
|
||||
meshTools::constrainDirection(mesh, mesh.solutionD(), pPtr->U());
|
||||
|
||||
// Add the new parcel
|
||||
this->owner().addParticle(pPtr);
|
||||
|
||||
nParcelsSplashed_++;
|
||||
}
|
||||
|
||||
// Transfer remaining part of parcel to film 0 - splashMass can be -ve
|
||||
// if entraining from the film
|
||||
const scalar mDash = m - mSplash;
|
||||
absorbInteraction(filmCloudTransfer, p, pp, facei, mDash, keepParticle);
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::UPtrList<Foam::fv::filmCloudTransfer>&
|
||||
Foam::CloudFilmTransfer<CloudType>::filmTransferPtrs() const
|
||||
{
|
||||
if (filmTransfers_.empty())
|
||||
{
|
||||
const polyBoundaryMesh& patches = this->owner().mesh().boundaryMesh();
|
||||
|
||||
label nFilms = 0;
|
||||
|
||||
forAll(patches, patchi)
|
||||
{
|
||||
if (isA<mappedPatchBase>(patches[patchi]))
|
||||
{
|
||||
const mappedPatchBase& mpb =
|
||||
refCast<const mappedPatchBase>(patches[patchi]);
|
||||
|
||||
Foam::fvModels& fvModels
|
||||
(
|
||||
fvModels::New
|
||||
(
|
||||
refCast<const fvMesh>(mpb.nbrMesh())
|
||||
)
|
||||
);
|
||||
|
||||
fv::filmCloudTransfer* filmCloudPtr = nullptr;
|
||||
|
||||
forAll(fvModels, i)
|
||||
{
|
||||
if (isType<fv::filmCloudTransfer>(fvModels[i]))
|
||||
{
|
||||
filmCloudPtr =
|
||||
&refCast<fv::filmCloudTransfer>(fvModels[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (filmCloudPtr)
|
||||
{
|
||||
Info<< "Found filmCloudTransfer fvModel "
|
||||
"for the film region " << mpb.nbrMesh().name()
|
||||
<< endl;
|
||||
|
||||
filmTransfers_.resize(nFilms + 1);
|
||||
filmPatches_.resize(nFilms + 1);
|
||||
|
||||
filmTransfers_.set(nFilms, filmCloudPtr);
|
||||
filmPatches_[nFilms] = patchi;
|
||||
|
||||
nFilms++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return filmTransfers_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
const Foam::labelList& Foam::CloudFilmTransfer<CloudType>::filmPatches() const
|
||||
{
|
||||
// Ensure filmPatches_ has been initialise
|
||||
filmTransferPtrs();
|
||||
|
||||
return filmPatches_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CloudFilmTransfer<CloudType>::cacheFilmFields(const label filmi)
|
||||
{
|
||||
// Film->Cloud transfer Not implemented yet
|
||||
|
||||
fv::filmCloudTransfer& filmCloudTransfer = filmTransferPtrs()[filmi];
|
||||
|
||||
filmCloudTransfer.resetFromCloudFields();
|
||||
|
||||
this->massParcelPatch_.setSize
|
||||
(
|
||||
this->owner().mesh().boundary()[filmPatches_[filmi]].size(),
|
||||
0.0
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CloudFilmTransfer<CloudType>::setParcelProperties
|
||||
(
|
||||
parcelType& p,
|
||||
const label filmFacei
|
||||
) const
|
||||
{
|
||||
// Set parcel properties
|
||||
const scalar vol =
|
||||
mathematical::pi/6.0*pow3(this->diameterParcelPatch_[filmFacei]);
|
||||
p.d() = this->diameterParcelPatch_[filmFacei];
|
||||
p.U() = UFilmPatch_[filmFacei];
|
||||
p.rho() = rhoFilmPatch_[filmFacei];
|
||||
|
||||
p.nParticle() = this->massParcelPatch_[filmFacei]/p.rho()/vol;
|
||||
|
||||
if (this->ejectedParcelType_ >= 0)
|
||||
{
|
||||
p.typeId() = this->ejectedParcelType_;
|
||||
}
|
||||
|
||||
// Set parcel properties
|
||||
p.T() = TFilmPatch_[filmFacei];
|
||||
p.Cp() = CpFilmPatch_[filmFacei];
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::CloudFilmTransfer<CloudType>::CloudFilmTransfer
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
)
|
||||
:
|
||||
SurfaceFilmModel<CloudType>(dict, owner, typeName),
|
||||
rndGen_(owner.rndGen()),
|
||||
UFilmPatch_(0),
|
||||
rhoFilmPatch_(0),
|
||||
TFilmPatch_(0),
|
||||
CpFilmPatch_(0),
|
||||
interactionType_
|
||||
(
|
||||
interactionTypeNames_.read(this->coeffDict().lookup("interactionType"))
|
||||
),
|
||||
deltaWet_(0.0),
|
||||
splashParcelType_(0),
|
||||
parcelsPerSplash_(0),
|
||||
Adry_(0.0),
|
||||
Awet_(0.0),
|
||||
Cf_(0.0),
|
||||
nParcelsSplashed_(0)
|
||||
{
|
||||
Info<< " Applying " << interactionTypeNames_[interactionType_]
|
||||
<< " interaction model" << endl;
|
||||
|
||||
if (interactionType_ == interactionType::splashBai)
|
||||
{
|
||||
this->coeffDict().lookup("deltaWet") >> deltaWet_;
|
||||
splashParcelType_ =
|
||||
this->coeffDict().lookupOrDefault("splashParcelType", -1);
|
||||
parcelsPerSplash_ =
|
||||
this->coeffDict().lookupOrDefault("parcelsPerSplash", 2);
|
||||
this->coeffDict().lookup("Adry") >> Adry_;
|
||||
this->coeffDict().lookup("Awet") >> Awet_;
|
||||
this->coeffDict().lookup("Cf") >> Cf_;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::CloudFilmTransfer<CloudType>::CloudFilmTransfer
|
||||
(
|
||||
const CloudFilmTransfer<CloudType>& sfm
|
||||
)
|
||||
:
|
||||
SurfaceFilmModel<CloudType>(sfm),
|
||||
rndGen_(sfm.rndGen_),
|
||||
UFilmPatch_(sfm.UFilmPatch_),
|
||||
rhoFilmPatch_(sfm.rhoFilmPatch_),
|
||||
TFilmPatch_(sfm.TFilmPatch_),
|
||||
CpFilmPatch_(sfm.CpFilmPatch_),
|
||||
interactionType_(sfm.interactionType_),
|
||||
deltaWet_(sfm.deltaWet_),
|
||||
splashParcelType_(sfm.splashParcelType_),
|
||||
parcelsPerSplash_(sfm.parcelsPerSplash_),
|
||||
Adry_(sfm.Adry_),
|
||||
Awet_(sfm.Awet_),
|
||||
Cf_(sfm.Cf_),
|
||||
nParcelsSplashed_(sfm.nParcelsSplashed_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::CloudFilmTransfer<CloudType>::~CloudFilmTransfer()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
bool Foam::CloudFilmTransfer<CloudType>::transferParcel
|
||||
(
|
||||
parcelType& p,
|
||||
const polyPatch& pp,
|
||||
bool& keepParticle
|
||||
)
|
||||
{
|
||||
const label patchi = pp.index();
|
||||
|
||||
forAll(this->filmTransferPtrs(), filmi)
|
||||
{
|
||||
if (patchi == filmPatches_[filmi])
|
||||
{
|
||||
fv::filmCloudTransfer& filmCloudTransfer =
|
||||
filmTransferPtrs()[filmi];
|
||||
|
||||
const label facei = pp.whichFace(p.face());
|
||||
|
||||
switch (interactionType_)
|
||||
{
|
||||
case interactionType::bounce:
|
||||
{
|
||||
bounceInteraction(p, pp, facei, keepParticle);
|
||||
break;
|
||||
}
|
||||
case interactionType::absorb:
|
||||
{
|
||||
absorbInteraction
|
||||
(
|
||||
filmCloudTransfer,
|
||||
p,
|
||||
pp,
|
||||
facei,
|
||||
p.nParticle()*p.mass(),
|
||||
keepParticle
|
||||
);
|
||||
break;
|
||||
}
|
||||
case interactionType::splashBai:
|
||||
{
|
||||
if (this->deltaFilmPatch_[facei] < deltaWet_)
|
||||
{
|
||||
drySplashInteraction
|
||||
(
|
||||
filmCloudTransfer,
|
||||
p,
|
||||
pp,
|
||||
facei,
|
||||
keepParticle
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
wetSplashInteraction
|
||||
(
|
||||
filmCloudTransfer,
|
||||
p,
|
||||
pp,
|
||||
facei,
|
||||
keepParticle
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown interaction type enumeration"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
// Transfer parcel/parcel interactions complete
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Parcel not interacting with film
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CloudFilmTransfer<CloudType>::info(Ostream& os)
|
||||
{
|
||||
SurfaceFilmModel<CloudType>::info(os);
|
||||
|
||||
label nSplash0 = this->template getModelProperty<label>("nParcelsSplashed");
|
||||
label nSplashTotal =
|
||||
nSplash0 + returnReduce(nParcelsSplashed_, sumOp<label>());
|
||||
|
||||
os << " New film splash parcels = " << nSplashTotal << endl;
|
||||
|
||||
if (this->writeTime())
|
||||
{
|
||||
this->setModelProperty("nParcelsSplashed", nSplashTotal);
|
||||
nParcelsSplashed_ = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,319 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-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::CloudFilmTransfer
|
||||
|
||||
Description
|
||||
Thermo parcel surface film model.
|
||||
|
||||
Responsible for:
|
||||
- injecting parcels from the film model into the cloud, e.g. for dripping
|
||||
- parcel interaction with the film, e.g absorb, bounce, splash
|
||||
|
||||
Splash model references:
|
||||
|
||||
Bai and Gosman, `Mathematical modelling of wall films formed by
|
||||
impinging sprays', SAE 960626, 1996
|
||||
|
||||
Bai et al, `Modelling of gasoline spray impingement', Atom. Sprays,
|
||||
vol 12, pp 1-27, 2002
|
||||
|
||||
|
||||
SourceFiles
|
||||
CloudFilmTransfer.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef CloudFilmTransfer_H
|
||||
#define CloudFilmTransfer_H
|
||||
|
||||
#include "SurfaceFilmModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
class Random;
|
||||
|
||||
namespace fv
|
||||
{
|
||||
class filmCloudTransfer;
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class CloudFilmTransferBase Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class CloudFilmTransferBase
|
||||
{
|
||||
public:
|
||||
|
||||
//- Interaction types
|
||||
enum class interactionType
|
||||
{
|
||||
absorb,
|
||||
bounce,
|
||||
splashBai
|
||||
};
|
||||
|
||||
//- Interaction type names
|
||||
static const NamedEnum<interactionType, 3> interactionTypeNames_;
|
||||
};
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class CloudFilmTransfer Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class CloudType>
|
||||
class CloudFilmTransfer
|
||||
:
|
||||
public SurfaceFilmModel<CloudType>,
|
||||
public CloudFilmTransferBase
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Return pointers to the film transfer fvModels
|
||||
UPtrList<fv::filmCloudTransfer>& filmTransferPtrs() const;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Data
|
||||
|
||||
//- Convenience typedef to the cloud's parcel type
|
||||
typedef typename CloudType::parcelType parcelType;
|
||||
|
||||
//- Reference to the cloud random number generator
|
||||
Random& rndGen_;
|
||||
|
||||
|
||||
// Film models
|
||||
|
||||
//- Pointers to the films
|
||||
mutable UPtrList<fv::filmCloudTransfer> filmTransfers_;
|
||||
|
||||
//- List of film patches
|
||||
mutable labelList filmPatches_;
|
||||
|
||||
|
||||
// Cached injector fields per film patch
|
||||
|
||||
//- Film velocity / patch face
|
||||
vectorField UFilmPatch_;
|
||||
|
||||
//- Film density / patch face
|
||||
scalarField rhoFilmPatch_;
|
||||
|
||||
//- Film temperature / patch face
|
||||
scalarField TFilmPatch_;
|
||||
|
||||
//- Film specific heat capacity / patch face
|
||||
scalarField CpFilmPatch_;
|
||||
|
||||
|
||||
// Interaction model data
|
||||
|
||||
//- Interaction type enumeration
|
||||
interactionType interactionType_;
|
||||
|
||||
//- Film thickness beyond which patch is assumed to be wet
|
||||
scalar deltaWet_;
|
||||
|
||||
//- Splash parcel type label - id assigned to identify parcel for
|
||||
// post-processing. If not specified, defaults to originating cloud
|
||||
// type
|
||||
label splashParcelType_;
|
||||
|
||||
//- Number of new parcels resulting from splash event
|
||||
label parcelsPerSplash_;
|
||||
|
||||
|
||||
// Surface roughness coefficient typically in the range 1300 - 5200
|
||||
// and decreases with increasing surface roughness
|
||||
|
||||
//- Dry surface roughness coefficient
|
||||
// = 2630 for dry interaction (ref. Bai)
|
||||
scalar Adry_;
|
||||
|
||||
//- Wet surface roughness coefficient
|
||||
// = 1320 for wet interaction (ref. Bai)
|
||||
scalar Awet_;
|
||||
|
||||
|
||||
//- Skin friction typically in the range 0.6 < Cf < 0.8
|
||||
scalar Cf_;
|
||||
|
||||
//- Counter for number of new splash parcels
|
||||
label nParcelsSplashed_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Return splashed parcel direction
|
||||
vector splashDirection
|
||||
(
|
||||
const vector& tanVec1,
|
||||
const vector& tanVec2,
|
||||
const vector& nf
|
||||
) const;
|
||||
|
||||
|
||||
// Interaction models
|
||||
|
||||
//- Absorb parcel into film
|
||||
void absorbInteraction
|
||||
(
|
||||
fv::filmCloudTransfer&,
|
||||
const parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const label facei,
|
||||
const scalar mass,
|
||||
bool& keepParticle
|
||||
);
|
||||
|
||||
//- Bounce parcel (flip parcel normal velocity)
|
||||
void bounceInteraction
|
||||
(
|
||||
parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const label facei,
|
||||
bool& keepParticle
|
||||
) const;
|
||||
|
||||
//- Parcel interaction with dry surface
|
||||
void drySplashInteraction
|
||||
(
|
||||
fv::filmCloudTransfer&,
|
||||
const parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const label facei,
|
||||
bool& keepParticle
|
||||
);
|
||||
|
||||
//- Parcel interaction with wetted surface
|
||||
void wetSplashInteraction
|
||||
(
|
||||
fv::filmCloudTransfer&,
|
||||
parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const label facei,
|
||||
bool& keepParticle
|
||||
);
|
||||
|
||||
//- Bai parcel splash interaction model
|
||||
void splashInteraction
|
||||
(
|
||||
fv::filmCloudTransfer&,
|
||||
const parcelType& p,
|
||||
const polyPatch& pp,
|
||||
const label facei,
|
||||
const scalar mRatio,
|
||||
const scalar We,
|
||||
const scalar Wec,
|
||||
const scalar sigma,
|
||||
bool& keepParticle
|
||||
);
|
||||
|
||||
//- Return pointers to the films
|
||||
virtual const labelList& filmPatches() const;
|
||||
|
||||
//- Cache the film fields in preparation for injection
|
||||
virtual void cacheFilmFields(const label filmi);
|
||||
|
||||
//- Set the individual parcel properties
|
||||
virtual void setParcelProperties
|
||||
(
|
||||
parcelType& p,
|
||||
const label filmFacei
|
||||
) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("cloudFilmTransfer");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
CloudFilmTransfer(const dictionary& dict, CloudType& owner);
|
||||
|
||||
//- Construct copy
|
||||
CloudFilmTransfer(const CloudFilmTransfer<CloudType>& sfm);
|
||||
|
||||
//- Construct and return a clone using supplied owner cloud
|
||||
virtual autoPtr<SurfaceFilmModel<CloudType>> clone() const
|
||||
{
|
||||
return autoPtr<SurfaceFilmModel<CloudType>>
|
||||
(
|
||||
new CloudFilmTransfer<CloudType>(*this)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~CloudFilmTransfer();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Evaluation
|
||||
|
||||
//- Transfer parcel from cloud to film
|
||||
// Returns true if parcel is to be transferred
|
||||
virtual bool transferParcel
|
||||
(
|
||||
parcelType& p,
|
||||
const polyPatch& pp,
|
||||
bool& keepParticle
|
||||
);
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write film info to stream
|
||||
virtual void info(Ostream& os);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "CloudFilmTransfer.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,48 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2022-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 "CloudFilmTransfer.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
template<>
|
||||
const char* NamedEnum
|
||||
<
|
||||
CloudFilmTransferBase::interactionType,
|
||||
3
|
||||
>::names[] = {"absorb", "bounce", "splashBai"};
|
||||
}
|
||||
|
||||
|
||||
const Foam::NamedEnum
|
||||
<
|
||||
Foam::CloudFilmTransferBase::interactionType,
|
||||
3
|
||||
> Foam::CloudFilmTransferBase::interactionTypeNames_;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,33 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "reactingMultiphaseCloud.H"
|
||||
#include "CloudFilmTransfer.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeSurfaceFilmModelType(CloudFilmTransfer, reactingMultiphaseCloud);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,33 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "reactingCloud.H"
|
||||
#include "CloudFilmTransfer.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeSurfaceFilmModelType(CloudFilmTransfer, reactingCloud);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,33 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "sprayCloud.H"
|
||||
#include "CloudFilmTransfer.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeSurfaceFilmModelType(CloudFilmTransfer, sprayCloud);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,33 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "thermoCloud.H"
|
||||
#include "CloudFilmTransfer.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeSurfaceFilmModelType(CloudFilmTransfer, thermoCloud);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,284 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "filmCloudTransfer.H"
|
||||
#include "mappedPatchBase.H"
|
||||
#include "fvmSup.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(filmCloudTransfer, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
fvModel,
|
||||
filmCloudTransfer,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fv::filmCloudTransfer::filmCloudTransfer
|
||||
(
|
||||
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)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wordList Foam::fv::filmCloudTransfer::addSupFields() const
|
||||
{
|
||||
return wordList
|
||||
{
|
||||
"pi",
|
||||
film_.alpha.name(),
|
||||
film_.thermo.he().name(),
|
||||
film_.U.name()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmCloudTransfer::correct()
|
||||
{
|
||||
if (curTimeIndex_ == mesh().time().timeIndex())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
curTimeIndex_ = mesh().time().timeIndex();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::VolInternalField<Type>>
|
||||
inline Foam::fv::filmCloudTransfer::CloudToFilmTransferRate
|
||||
(
|
||||
const Field<Type>& prop,
|
||||
const dimensionSet& dimProp
|
||||
) const
|
||||
{
|
||||
tmp<VolInternalField<Type>> tSu
|
||||
(
|
||||
VolInternalField<Type>::New
|
||||
(
|
||||
"Su",
|
||||
mesh(),
|
||||
dimensioned<Type>(dimProp/dimVolume/dimTime, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
if (prop.size())
|
||||
{
|
||||
const fvMesh& cloudMesh =
|
||||
refCast<const fvMesh>(film_.surfacePatchMap().nbrMesh());
|
||||
|
||||
const label cloudPatchi =
|
||||
film_.surfacePatchMap().nbrPolyPatch().index();
|
||||
|
||||
UIndirectList<Type>(tSu.ref(), film_.surfacePatch().faceCells()) =
|
||||
film_.surfacePatchMap().fromNeighbour
|
||||
(
|
||||
prop/cloudMesh.boundary()[cloudPatchi].magSf()
|
||||
);
|
||||
|
||||
tSu.ref().field() /= film_.VbyA;
|
||||
tSu.ref().field() /= mesh().time().deltaTValue();
|
||||
}
|
||||
|
||||
return tSu;
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmCloudTransfer::addSup
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< type() << ": applying source to " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
// Droplet impingement pressure
|
||||
if (fieldName == "pi")
|
||||
{
|
||||
eqn +=
|
||||
CloudToFilmTransferRate<scalar>
|
||||
(
|
||||
pressureFromCloud_,
|
||||
dimPressure*dimVolume
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Support for field " << fieldName << " is not implemented"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmCloudTransfer::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 += CloudToFilmTransferRate<scalar>(massFromCloud_, dimMass);
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Support for field " << fieldName << " is not implemented"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmCloudTransfer::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 += CloudToFilmTransferRate<scalar>(energyFromCloud_, dimEnergy);
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Support for field " << fieldName << " is not implemented"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmCloudTransfer::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 += CloudToFilmTransferRate<vector>(momentumFromCloud_, dimMomentum);
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmCloudTransfer::resetFromCloudFields()
|
||||
{
|
||||
const fvMesh& cloudMesh =
|
||||
refCast<const fvMesh>(film_.surfacePatchMap().nbrMesh());
|
||||
const label cloudPatchi = film_.surfacePatchMap().nbrPolyPatch().index();
|
||||
const label nCloudPatchFaces = cloudMesh.boundary()[cloudPatchi].size();
|
||||
|
||||
if (massFromCloud_.size() != nCloudPatchFaces)
|
||||
{
|
||||
massFromCloud_.setSize(nCloudPatchFaces);
|
||||
momentumFromCloud_.setSize(nCloudPatchFaces);
|
||||
pressureFromCloud_.setSize(nCloudPatchFaces);
|
||||
energyFromCloud_.setSize(nCloudPatchFaces);
|
||||
}
|
||||
|
||||
massFromCloud_ = 0;
|
||||
momentumFromCloud_ = Zero;
|
||||
pressureFromCloud_ = 0;
|
||||
energyFromCloud_ = 0;
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmCloudTransfer::parcelFromCloud
|
||||
(
|
||||
const label facei,
|
||||
const scalar mass,
|
||||
const vector& momentum,
|
||||
const scalar pressure,
|
||||
const scalar energy
|
||||
)
|
||||
{
|
||||
massFromCloud_[facei] += mass;
|
||||
momentumFromCloud_[facei] += momentum;
|
||||
pressureFromCloud_[facei] += pressure;
|
||||
energyFromCloud_[facei] += energy;
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmCloudTransfer::topoChange(const polyTopoChangeMap&)
|
||||
{}
|
||||
|
||||
|
||||
void Foam::fv::filmCloudTransfer::mapMesh(const polyMeshMap& map)
|
||||
{}
|
||||
|
||||
|
||||
void Foam::fv::filmCloudTransfer::distribute(const polyDistributionMap&)
|
||||
{}
|
||||
|
||||
|
||||
bool Foam::fv::filmCloudTransfer::movePoints()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,212 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::filmCloudTransfer
|
||||
|
||||
Description
|
||||
Film<->cloud transfer model
|
||||
|
||||
Usage
|
||||
Example usage:
|
||||
\verbatim
|
||||
filmCloudTransfer
|
||||
{
|
||||
type filmCloudTransfer;
|
||||
|
||||
libs ("libfilmCloudTransfer.so");
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
filmCloudTransfer.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef filmCloudTransfer_H
|
||||
#define filmCloudTransfer_H
|
||||
|
||||
#include "fvModel.H"
|
||||
#include "isothermalFilm.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class filmCloudTransfer Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class filmCloudTransfer
|
||||
:
|
||||
public fvModel
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- The film model
|
||||
const solvers::isothermalFilm& film_;
|
||||
|
||||
//- Current time index (used for updating)
|
||||
mutable label curTimeIndex_;
|
||||
|
||||
scalarField massFromCloud_;
|
||||
vectorField momentumFromCloud_;
|
||||
scalarField pressureFromCloud_;
|
||||
scalarField energyFromCloud_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
template<class Type>
|
||||
tmp<VolInternalField<Type>>
|
||||
inline CloudToFilmTransferRate
|
||||
(
|
||||
const Field<Type>& prop,
|
||||
const dimensionSet& dimProp
|
||||
) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("filmCloudTransfer");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from explicit source name and mesh
|
||||
filmCloudTransfer
|
||||
(
|
||||
const word& sourceName,
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
//- Disallow default bitwise copy construction
|
||||
filmCloudTransfer
|
||||
(
|
||||
const filmCloudTransfer&
|
||||
) = 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 droplet impingement contribution to pressure field
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
) const;
|
||||
|
||||
//- 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 from cloud
|
||||
|
||||
void resetFromCloudFields();
|
||||
|
||||
void parcelFromCloud
|
||||
(
|
||||
const label facei,
|
||||
const scalar mass,
|
||||
const vector& momentum,
|
||||
const scalar pressure,
|
||||
const scalar energy
|
||||
);
|
||||
|
||||
|
||||
// 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 filmCloudTransfer&) = delete;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace fv
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,4 +1,4 @@
|
||||
filmToVoFTransfer.C
|
||||
VoFtoFilmTransfer.C
|
||||
filmVoFTransfer.C
|
||||
VoFFilmTransfer.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libfilmVoFTransfer
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
EXE_INC = -ggdb3 \
|
||||
EXE_INC = \
|
||||
-I$(FOAM_SOLVERS)/modules/isothermalFilm/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/modules/isothermalFilm/filmCompressibleMomentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
|
||||
@ -23,8 +23,8 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "VoFtoFilmTransfer.H"
|
||||
#include "filmToVoFTransfer.H"
|
||||
#include "VoFFilmTransfer.H"
|
||||
#include "filmVoFTransfer.H"
|
||||
#include "mappedPatchBase.H"
|
||||
#include "fvmSup.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
@ -35,12 +35,12 @@ namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(VoFtoFilmTransfer, 0);
|
||||
defineTypeNameAndDebug(VoFFilmTransfer, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
fvModel,
|
||||
VoFtoFilmTransfer,
|
||||
VoFFilmTransfer,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
@ -49,7 +49,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fv::VoFtoFilmTransfer::VoFtoFilmTransfer
|
||||
Foam::fv::VoFFilmTransfer::VoFFilmTransfer
|
||||
(
|
||||
const word& sourceName,
|
||||
const word& modelType,
|
||||
@ -101,21 +101,19 @@ Foam::fv::VoFtoFilmTransfer::VoFtoFilmTransfer
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wordList Foam::fv::VoFtoFilmTransfer::addSupFields() const
|
||||
Foam::wordList Foam::fv::VoFFilmTransfer::addSupFields() const
|
||||
{
|
||||
return wordList
|
||||
(
|
||||
{
|
||||
alpha_.name(),
|
||||
thermo_.rho()().name(),
|
||||
thermo_.he().name(),
|
||||
VoF_.U.name()
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFtoFilmTransfer::correct()
|
||||
void Foam::fv::VoFFilmTransfer::correct()
|
||||
{
|
||||
if (curTimeIndex_ == mesh().time().timeIndex())
|
||||
{
|
||||
@ -186,7 +184,7 @@ void Foam::fv::VoFtoFilmTransfer::correct()
|
||||
|
||||
template<class Type, class TransferRateFunc>
|
||||
Foam::tmp<Foam::VolInternalField<Type>>
|
||||
inline Foam::fv::VoFtoFilmTransfer::filmToVoFTransferRate
|
||||
inline Foam::fv::VoFFilmTransfer::filmVoFTransferRate
|
||||
(
|
||||
TransferRateFunc transferRateFunc,
|
||||
const dimensionSet& dimProp
|
||||
@ -205,20 +203,20 @@ inline Foam::fv::VoFtoFilmTransfer::filmToVoFTransferRate
|
||||
)
|
||||
);
|
||||
|
||||
const filmToVoFTransfer* filmToVoFPtr = nullptr;
|
||||
const filmVoFTransfer* filmVoFPtr = nullptr;
|
||||
|
||||
forAll(fvModels, i)
|
||||
{
|
||||
if (isType<filmToVoFTransfer>(fvModels[i]))
|
||||
if (isType<filmVoFTransfer>(fvModels[i]))
|
||||
{
|
||||
filmToVoFPtr = &refCast<const filmToVoFTransfer>(fvModels[i]);
|
||||
filmVoFPtr = &refCast<const filmVoFTransfer>(fvModels[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!filmToVoFPtr)
|
||||
if (!filmVoFPtr)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Cannot find filmToVoFTransfer fvModel for the film region "
|
||||
<< "Cannot find filmVoFTransfer fvModel for the film region "
|
||||
<< VoFFilmPatchMap.nbrMesh().name()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
@ -236,14 +234,14 @@ inline Foam::fv::VoFtoFilmTransfer::filmToVoFTransferRate
|
||||
UIndirectList<Type>(tSu.ref(), mesh().boundary()[filmPatchi_].faceCells()) =
|
||||
VoFFilmPatchMap.fromNeighbour
|
||||
(
|
||||
(filmToVoFPtr->*transferRateFunc)()
|
||||
(filmVoFPtr->*transferRateFunc)()
|
||||
);
|
||||
|
||||
return tSu/mesh().V();
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFtoFilmTransfer::addSup
|
||||
void Foam::fv::VoFFilmTransfer::addSup
|
||||
(
|
||||
fvMatrix<scalar>& eqn,
|
||||
const word& fieldName
|
||||
@ -257,9 +255,9 @@ void Foam::fv::VoFtoFilmTransfer::addSup
|
||||
if (fieldName == alpha_.name())
|
||||
{
|
||||
eqn +=
|
||||
filmToVoFTransferRate<scalar>
|
||||
filmVoFTransferRate<scalar>
|
||||
(
|
||||
&filmToVoFTransfer::transferRate,
|
||||
&filmVoFTransfer::transferRate,
|
||||
dimVolume
|
||||
)
|
||||
+ fvm::Sp(transferRate_, eqn.psi());
|
||||
@ -273,7 +271,7 @@ void Foam::fv::VoFtoFilmTransfer::addSup
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFtoFilmTransfer::addSup
|
||||
void Foam::fv::VoFFilmTransfer::addSup
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
fvMatrix<scalar>& eqn,
|
||||
@ -288,9 +286,9 @@ void Foam::fv::VoFtoFilmTransfer::addSup
|
||||
if (fieldName == thermo_.rho()().name())
|
||||
{
|
||||
eqn +=
|
||||
filmToVoFTransferRate<scalar>
|
||||
filmVoFTransferRate<scalar>
|
||||
(
|
||||
&filmToVoFTransfer::rhoTransferRate,
|
||||
&filmVoFTransfer::rhoTransferRate,
|
||||
dimMass
|
||||
)
|
||||
+ fvm::Sp(alpha()*transferRate_, eqn.psi());
|
||||
@ -304,7 +302,7 @@ void Foam::fv::VoFtoFilmTransfer::addSup
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFtoFilmTransfer::addSup
|
||||
void Foam::fv::VoFFilmTransfer::addSup
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
@ -320,9 +318,9 @@ void Foam::fv::VoFtoFilmTransfer::addSup
|
||||
if (fieldName == thermo_.he().name())
|
||||
{
|
||||
eqn +=
|
||||
filmToVoFTransferRate<scalar>
|
||||
filmVoFTransferRate<scalar>
|
||||
(
|
||||
&filmToVoFTransfer::heTransferRate,
|
||||
&filmVoFTransfer::heTransferRate,
|
||||
dimEnergy
|
||||
)
|
||||
+ fvm::Sp(alpha()*rho()*transferRate_, eqn.psi());
|
||||
@ -336,7 +334,7 @@ void Foam::fv::VoFtoFilmTransfer::addSup
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFtoFilmTransfer::addSup
|
||||
void Foam::fv::VoFFilmTransfer::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<vector>& eqn,
|
||||
@ -349,9 +347,9 @@ void Foam::fv::VoFtoFilmTransfer::addSup
|
||||
}
|
||||
|
||||
eqn +=
|
||||
filmToVoFTransferRate<vector>
|
||||
filmVoFTransferRate<vector>
|
||||
(
|
||||
&filmToVoFTransfer::UTransferRate,
|
||||
&filmVoFTransfer::UTransferRate,
|
||||
dimMass*dimVelocity
|
||||
)
|
||||
+ fvm::Sp(alpha_()*thermo_.rho()()*transferRate_, eqn.psi());
|
||||
@ -359,7 +357,7 @@ void Foam::fv::VoFtoFilmTransfer::addSup
|
||||
|
||||
|
||||
template<class Type, class FieldType>
|
||||
inline Foam::tmp<Foam::Field<Type>> Foam::fv::VoFtoFilmTransfer::TransferRate
|
||||
inline Foam::tmp<Foam::Field<Type>> Foam::fv::VoFFilmTransfer::TransferRate
|
||||
(
|
||||
const FieldType& f
|
||||
) const
|
||||
@ -381,45 +379,45 @@ inline Foam::tmp<Foam::Field<Type>> Foam::fv::VoFtoFilmTransfer::TransferRate
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::fv::VoFtoFilmTransfer::rhoTransferRate() const
|
||||
Foam::fv::VoFFilmTransfer::rhoTransferRate() const
|
||||
{
|
||||
return TransferRate<scalar>(thermo_.rho()());
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::fv::VoFtoFilmTransfer::heTransferRate() const
|
||||
Foam::fv::VoFFilmTransfer::heTransferRate() const
|
||||
{
|
||||
return TransferRate<scalar>(thermo_.rho()()*thermo_.he()());
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::vectorField>
|
||||
Foam::fv::VoFtoFilmTransfer::UTransferRate() const
|
||||
Foam::fv::VoFFilmTransfer::UTransferRate() const
|
||||
{
|
||||
return TransferRate<vector>(thermo_.rho()()*VoF_.U());
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFtoFilmTransfer::topoChange(const polyTopoChangeMap&)
|
||||
void Foam::fv::VoFFilmTransfer::topoChange(const polyTopoChangeMap&)
|
||||
{
|
||||
transferRate_.setSize(mesh().nCells());
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFtoFilmTransfer::mapMesh(const polyMeshMap& map)
|
||||
void Foam::fv::VoFFilmTransfer::mapMesh(const polyMeshMap& map)
|
||||
{
|
||||
transferRate_.setSize(mesh().nCells());
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFtoFilmTransfer::distribute(const polyDistributionMap&)
|
||||
void Foam::fv::VoFFilmTransfer::distribute(const polyDistributionMap&)
|
||||
{
|
||||
transferRate_.setSize(mesh().nCells());
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fv::VoFtoFilmTransfer::movePoints()
|
||||
bool Foam::fv::VoFFilmTransfer::movePoints()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::fv::VoFtoFilmTransfer
|
||||
Foam::fv::VoFFilmTransfer
|
||||
|
||||
Description
|
||||
Film<->VoF transfer model
|
||||
@ -30,20 +30,29 @@ Description
|
||||
Usage
|
||||
Example usage:
|
||||
\verbatim
|
||||
VoFtoFilmTransfer
|
||||
VoFFilmTransfer
|
||||
{
|
||||
type VoFtoFilmTransfer;
|
||||
phase water;
|
||||
type VoFFilmTransfer;
|
||||
|
||||
libs ("libfilmVoFTransfer.so");
|
||||
|
||||
filmPatch film;
|
||||
phase liquid;
|
||||
|
||||
deltaFactorToFilm 0.9;
|
||||
alphaToFilm 0.86;
|
||||
|
||||
transferRateCoeff 0.1;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
VoFtoFilmTransfer.C
|
||||
VoFFilmTransfer.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef VoFtoFilmTransfer_H
|
||||
#define VoFtoFilmTransfer_H
|
||||
#ifndef VoFFilmTransfer_H
|
||||
#define VoFFilmTransfer_H
|
||||
|
||||
#include "fvModel.H"
|
||||
#include "compressibleVoF.H"
|
||||
@ -56,10 +65,10 @@ namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class VoFtoFilmTransfer Declaration
|
||||
Class VoFFilmTransfer Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class VoFtoFilmTransfer
|
||||
class VoFFilmTransfer
|
||||
:
|
||||
public fvModel
|
||||
{
|
||||
@ -102,7 +111,7 @@ class VoFtoFilmTransfer
|
||||
|
||||
//- Return the transfer rate from the film transferRateFunc
|
||||
template<class Type, class TransferRateFunc>
|
||||
inline tmp<VolInternalField<Type>> filmToVoFTransferRate
|
||||
inline tmp<VolInternalField<Type>> filmVoFTransferRate
|
||||
(
|
||||
TransferRateFunc transferRateFunc,
|
||||
const dimensionSet& dimProp
|
||||
@ -116,13 +125,13 @@ class VoFtoFilmTransfer
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("VoFtoFilmTransfer");
|
||||
TypeName("VoFFilmTransfer");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from explicit source name and mesh
|
||||
VoFtoFilmTransfer
|
||||
VoFFilmTransfer
|
||||
(
|
||||
const word& sourceName,
|
||||
const word& modelType,
|
||||
@ -131,9 +140,9 @@ public:
|
||||
);
|
||||
|
||||
//- Disallow default bitwise copy construction
|
||||
VoFtoFilmTransfer
|
||||
VoFFilmTransfer
|
||||
(
|
||||
const VoFtoFilmTransfer&
|
||||
const VoFFilmTransfer&
|
||||
) = delete;
|
||||
|
||||
|
||||
@ -228,7 +237,7 @@ public:
|
||||
// Member Operators
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const VoFtoFilmTransfer&) = delete;
|
||||
void operator=(const VoFFilmTransfer&) = delete;
|
||||
};
|
||||
|
||||
|
||||
@ -23,8 +23,8 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "filmToVoFTransfer.H"
|
||||
#include "VoFtoFilmTransfer.H"
|
||||
#include "filmVoFTransfer.H"
|
||||
#include "VoFFilmTransfer.H"
|
||||
#include "mappedPatchBase.H"
|
||||
#include "compressibleVoF.H"
|
||||
#include "fvmSup.H"
|
||||
@ -36,12 +36,12 @@ namespace Foam
|
||||
{
|
||||
namespace fv
|
||||
{
|
||||
defineTypeNameAndDebug(filmToVoFTransfer, 0);
|
||||
defineTypeNameAndDebug(filmVoFTransfer, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
fvModel,
|
||||
filmToVoFTransfer,
|
||||
filmVoFTransfer,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
@ -50,7 +50,7 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fv::filmToVoFTransfer::filmToVoFTransfer
|
||||
Foam::fv::filmVoFTransfer::filmVoFTransfer
|
||||
(
|
||||
const word& sourceName,
|
||||
const word& modelType,
|
||||
@ -87,20 +87,18 @@ Foam::fv::filmToVoFTransfer::filmToVoFTransfer
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::wordList Foam::fv::filmToVoFTransfer::addSupFields() const
|
||||
Foam::wordList Foam::fv::filmVoFTransfer::addSupFields() const
|
||||
{
|
||||
return wordList
|
||||
(
|
||||
{
|
||||
film_.alpha.name(),
|
||||
film_.thermo.he().name(),
|
||||
film_.U.name()
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmToVoFTransfer::correct()
|
||||
void Foam::fv::filmVoFTransfer::correct()
|
||||
{
|
||||
if (curTimeIndex_ == mesh().time().timeIndex())
|
||||
{
|
||||
@ -130,13 +128,13 @@ void Foam::fv::filmToVoFTransfer::correct()
|
||||
|
||||
const label patchiVoF = film_.surfacePatchMap().nbrPolyPatch().index();
|
||||
|
||||
const VoFtoFilmTransfer& VoFtoFilm(this->VoFtoFilm(VoF_.fvModels()));
|
||||
const VoFFilmTransfer& VoFFilm(this->VoFFilm(VoF_.fvModels()));
|
||||
|
||||
const scalarField alphaVoF
|
||||
(
|
||||
film_.surfacePatchMap().fromNeighbour
|
||||
(
|
||||
VoFtoFilm.alpha().boundaryField()[patchiVoF]
|
||||
VoFFilm.alpha().boundaryField()[patchiVoF]
|
||||
)
|
||||
);
|
||||
|
||||
@ -167,48 +165,48 @@ void Foam::fv::filmToVoFTransfer::correct()
|
||||
}
|
||||
|
||||
|
||||
const Foam::fv::VoFtoFilmTransfer& Foam::fv::filmToVoFTransfer::VoFtoFilm
|
||||
const Foam::fv::VoFFilmTransfer& Foam::fv::filmVoFTransfer::VoFFilm
|
||||
(
|
||||
const Foam::fvModels& fvModels
|
||||
) const
|
||||
{
|
||||
const VoFtoFilmTransfer* VoFtoFilmPtr = nullptr;
|
||||
const VoFFilmTransfer* VoFFilmPtr = nullptr;
|
||||
|
||||
forAll(fvModels, i)
|
||||
{
|
||||
if (isType<VoFtoFilmTransfer>(fvModels[i]))
|
||||
if (isType<VoFFilmTransfer>(fvModels[i]))
|
||||
{
|
||||
const VoFtoFilmTransfer& VoFtoFilm
|
||||
const VoFFilmTransfer& VoFFilm
|
||||
(
|
||||
refCast<const VoFtoFilmTransfer>(fvModels[i])
|
||||
refCast<const VoFFilmTransfer>(fvModels[i])
|
||||
);
|
||||
|
||||
if
|
||||
(
|
||||
VoFtoFilm.filmPatchIndex()
|
||||
VoFFilm.filmPatchIndex()
|
||||
== film_.surfacePatchMap().nbrPolyPatch().index()
|
||||
)
|
||||
{
|
||||
VoFtoFilmPtr = &VoFtoFilm;
|
||||
VoFFilmPtr = &VoFFilm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!VoFtoFilmPtr)
|
||||
if (!VoFFilmPtr)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Cannot find VoFtoFilmTransfer fvModel for this film "
|
||||
<< "Cannot find VoFFilmTransfer fvModel for this film "
|
||||
"in VoF region " << film_.surfacePatchMap().nbrMesh().name()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return *VoFtoFilmPtr;
|
||||
return *VoFFilmPtr;
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class TransferRateFunc>
|
||||
Foam::tmp<Foam::VolInternalField<Type>>
|
||||
inline Foam::fv::filmToVoFTransfer::VoFToFilmTransferRate
|
||||
inline Foam::fv::filmVoFTransfer::VoFToFilmTransferRate
|
||||
(
|
||||
TransferRateFunc transferRateFunc,
|
||||
const dimensionSet& dimProp
|
||||
@ -235,14 +233,14 @@ inline Foam::fv::filmToVoFTransfer::VoFToFilmTransferRate
|
||||
UIndirectList<Type>(tSu.ref(), film_.surfacePatch().faceCells()) =
|
||||
film_.surfacePatchMap().fromNeighbour
|
||||
(
|
||||
(VoFtoFilm(fvModels).*transferRateFunc)()
|
||||
(VoFFilm(fvModels).*transferRateFunc)()
|
||||
);
|
||||
|
||||
return tSu/mesh().V();
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmToVoFTransfer::addSup
|
||||
void Foam::fv::filmVoFTransfer::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<scalar>& eqn,
|
||||
@ -259,7 +257,7 @@ void Foam::fv::filmToVoFTransfer::addSup
|
||||
eqn +=
|
||||
VoFToFilmTransferRate<scalar>
|
||||
(
|
||||
&VoFtoFilmTransfer::rhoTransferRate,
|
||||
&VoFFilmTransfer::rhoTransferRate,
|
||||
dimMass
|
||||
)
|
||||
+ fvm::Sp(transferRate_*rho(), eqn.psi());
|
||||
@ -273,7 +271,7 @@ void Foam::fv::filmToVoFTransfer::addSup
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmToVoFTransfer::addSup
|
||||
void Foam::fv::filmVoFTransfer::addSup
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
@ -291,7 +289,7 @@ void Foam::fv::filmToVoFTransfer::addSup
|
||||
eqn +=
|
||||
VoFToFilmTransferRate<scalar>
|
||||
(
|
||||
&VoFtoFilmTransfer::heTransferRate,
|
||||
&VoFFilmTransfer::heTransferRate,
|
||||
dimEnergy
|
||||
)
|
||||
+ fvm::Sp(alpha()*rho()*transferRate_, eqn.psi());
|
||||
@ -305,7 +303,7 @@ void Foam::fv::filmToVoFTransfer::addSup
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmToVoFTransfer::addSup
|
||||
void Foam::fv::filmVoFTransfer::addSup
|
||||
(
|
||||
const volScalarField& alpha,
|
||||
const volScalarField& rho,
|
||||
@ -321,15 +319,15 @@ void Foam::fv::filmToVoFTransfer::addSup
|
||||
eqn +=
|
||||
VoFToFilmTransferRate<vector>
|
||||
(
|
||||
&VoFtoFilmTransfer::UTransferRate,
|
||||
dimMass*dimVelocity
|
||||
&VoFFilmTransfer::UTransferRate,
|
||||
dimMomentum
|
||||
)
|
||||
+ fvm::Sp(alpha()*rho()*transferRate_, eqn.psi());
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class FieldType>
|
||||
inline Foam::tmp<Foam::Field<Type>> Foam::fv::filmToVoFTransfer::TransferRate
|
||||
inline Foam::tmp<Foam::Field<Type>> Foam::fv::filmVoFTransfer::TransferRate
|
||||
(
|
||||
const FieldType& f
|
||||
) const
|
||||
@ -351,52 +349,52 @@ inline Foam::tmp<Foam::Field<Type>> Foam::fv::filmToVoFTransfer::TransferRate
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::fv::filmToVoFTransfer::transferRate() const
|
||||
Foam::fv::filmVoFTransfer::transferRate() const
|
||||
{
|
||||
return TransferRate<scalar>(oneField());
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::fv::filmToVoFTransfer::rhoTransferRate() const
|
||||
Foam::fv::filmVoFTransfer::rhoTransferRate() const
|
||||
{
|
||||
return TransferRate<scalar>(film_.thermo.rho()());
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::fv::filmToVoFTransfer::heTransferRate() const
|
||||
Foam::fv::filmVoFTransfer::heTransferRate() const
|
||||
{
|
||||
return TransferRate<scalar>(film_.thermo.rho()()*film_.thermo.he()());
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::vectorField>
|
||||
Foam::fv::filmToVoFTransfer::UTransferRate() const
|
||||
Foam::fv::filmVoFTransfer::UTransferRate() const
|
||||
{
|
||||
return TransferRate<vector>(film_.thermo.rho()()*film_.U());
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmToVoFTransfer::topoChange(const polyTopoChangeMap&)
|
||||
void Foam::fv::filmVoFTransfer::topoChange(const polyTopoChangeMap&)
|
||||
{
|
||||
transferRate_.setSize(mesh().nCells());
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmToVoFTransfer::mapMesh(const polyMeshMap& map)
|
||||
void Foam::fv::filmVoFTransfer::mapMesh(const polyMeshMap& map)
|
||||
{
|
||||
transferRate_.setSize(mesh().nCells());
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::filmToVoFTransfer::distribute(const polyDistributionMap&)
|
||||
void Foam::fv::filmVoFTransfer::distribute(const polyDistributionMap&)
|
||||
{
|
||||
transferRate_.setSize(mesh().nCells());
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fv::filmToVoFTransfer::movePoints()
|
||||
bool Foam::fv::filmVoFTransfer::movePoints()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::fv::filmToVoFTransfer
|
||||
Foam::fv::filmVoFTransfer
|
||||
|
||||
Description
|
||||
Film<->VoF transfer model
|
||||
@ -30,19 +30,26 @@ Description
|
||||
Usage
|
||||
Example usage:
|
||||
\verbatim
|
||||
filmToVoFTransfer
|
||||
filmVoFTransfer
|
||||
{
|
||||
type filmToVoFTransfer;
|
||||
type filmVoFTransfer;
|
||||
|
||||
libs ("libfilmVoFTransfer.so");
|
||||
|
||||
deltaFactorToVoF 1.5;
|
||||
alphaToVoF 0.9;
|
||||
|
||||
transferRateCoeff 0.1;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
filmToVoFTransfer.C
|
||||
filmVoFTransfer.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef filmToVoFTransfer_H
|
||||
#define filmToVoFTransfer_H
|
||||
#ifndef filmVoFTransfer_H
|
||||
#define filmVoFTransfer_H
|
||||
|
||||
#include "fvModel.H"
|
||||
#include "isothermalFilm.H"
|
||||
@ -54,13 +61,13 @@ namespace Foam
|
||||
namespace fv
|
||||
{
|
||||
|
||||
class VoFtoFilmTransfer;
|
||||
class VoFFilmTransfer;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class filmToVoFTransfer Declaration
|
||||
Class filmVoFTransfer Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class filmToVoFTransfer
|
||||
class filmVoFTransfer
|
||||
:
|
||||
public fvModel
|
||||
{
|
||||
@ -88,7 +95,7 @@ class filmToVoFTransfer
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
const VoFtoFilmTransfer& VoFtoFilm(const fvModels&) const;
|
||||
const VoFFilmTransfer& VoFFilm(const fvModels&) const;
|
||||
|
||||
//- Return the transfer rate from the VoF transferRateFunc
|
||||
template<class Type, class TransferRateFunc>
|
||||
@ -106,13 +113,13 @@ class filmToVoFTransfer
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("filmToVoFTransfer");
|
||||
TypeName("filmVoFTransfer");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from explicit source name and mesh
|
||||
filmToVoFTransfer
|
||||
filmVoFTransfer
|
||||
(
|
||||
const word& sourceName,
|
||||
const word& modelType,
|
||||
@ -121,9 +128,9 @@ public:
|
||||
);
|
||||
|
||||
//- Disallow default bitwise copy construction
|
||||
filmToVoFTransfer
|
||||
filmVoFTransfer
|
||||
(
|
||||
const filmToVoFTransfer&
|
||||
const filmVoFTransfer&
|
||||
) = delete;
|
||||
|
||||
|
||||
@ -204,7 +211,7 @@ public:
|
||||
// Member Operators
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const filmToVoFTransfer&) = delete;
|
||||
void operator=(const filmVoFTransfer&) = delete;
|
||||
};
|
||||
|
||||
|
||||
@ -79,17 +79,13 @@ void Foam::solvers::isothermalFilm::continuityErrors()
|
||||
{
|
||||
const dimensionedScalar mass = fvc::domainIntegrate(rho()*delta()*magSf);
|
||||
|
||||
correctContinuityError();
|
||||
|
||||
if (mass.value() > small)
|
||||
{
|
||||
const volScalarField::Internal contErr
|
||||
(
|
||||
fvc::ddt(alpha, rho)()() + fvc::div(alphaRhoPhi)()()
|
||||
- (fvModels().source(rho, alpha) & alpha)()()
|
||||
);
|
||||
|
||||
const volScalarField::Internal massContErr
|
||||
(
|
||||
runTime.deltaT()*magSf*contErr
|
||||
runTime.deltaT()*magSf*contErr()
|
||||
);
|
||||
|
||||
const scalar sumLocalContErr =
|
||||
@ -199,8 +195,8 @@ bool Foam::solvers::isothermalFilm::initFilmMesh()
|
||||
|
||||
nHat.correctBoundaryConditions();
|
||||
|
||||
VbyA.primitiveFieldRef() = mesh.V()/magSf;
|
||||
VbyA.correctBoundaryConditions();
|
||||
VbyA_.primitiveFieldRef() = mesh.V()/magSf;
|
||||
VbyA_.correctBoundaryConditions();
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -275,7 +271,7 @@ Foam::solvers::isothermalFilm::isothermalFilm
|
||||
dimensionedScalar(dimArea, 0)
|
||||
),
|
||||
|
||||
VbyA
|
||||
VbyA_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -313,7 +309,7 @@ Foam::solvers::isothermalFilm::isothermalFilm
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
delta_/VbyA,
|
||||
delta_/VbyA_,
|
||||
alphaTypes()
|
||||
),
|
||||
|
||||
@ -386,6 +382,7 @@ Foam::solvers::isothermalFilm::isothermalFilm
|
||||
)
|
||||
),
|
||||
|
||||
VbyA(VbyA_),
|
||||
delta(delta_),
|
||||
alpha(alpha_),
|
||||
thermo(thermo_),
|
||||
|
||||
@ -118,7 +118,7 @@ protected:
|
||||
volScalarField::Internal magSf;
|
||||
|
||||
//- Film cell volume/wall face area
|
||||
volScalarField VbyA;
|
||||
volScalarField VbyA_;
|
||||
|
||||
//- Bool returned by initFilmMesh()
|
||||
bool initialised_;
|
||||
@ -173,6 +173,9 @@ protected:
|
||||
// shared between the momentum predictor and pressure corrector
|
||||
tmp<fvVectorMatrix> tUEqn;
|
||||
|
||||
//- Continuity error
|
||||
tmp<volScalarField::Internal> contErr;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@ -206,7 +209,10 @@ private:
|
||||
//- Correct the cached Courant number
|
||||
void correctCoNum();
|
||||
|
||||
//- Calculate and print the continuity errors
|
||||
// Calculate the continuity error caused by limiting alpha
|
||||
void correctContinuityError();
|
||||
|
||||
//- Print the continuity errors
|
||||
void continuityErrors();
|
||||
|
||||
//- Construct the explicit film volume-fraction prediction equation
|
||||
@ -257,6 +263,9 @@ public:
|
||||
|
||||
// Public Data
|
||||
|
||||
//- Film cell volume/wall face area
|
||||
const volScalarField& VbyA;
|
||||
|
||||
//- Film thickness
|
||||
const volScalarField& delta;
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ Foam::solvers::isothermalFilm::pbByAlphaRhof() const
|
||||
{
|
||||
return fvc::interpolate
|
||||
(
|
||||
max(nHat & -g, dimensionedScalar(g.dimensions(), 0))*VbyA
|
||||
max(nHat & g, dimensionedScalar(g.dimensions(), 0))*VbyA
|
||||
);
|
||||
}
|
||||
|
||||
@ -69,6 +69,9 @@ Foam::solvers::isothermalFilm::pe() const
|
||||
// Update the pressure, mapping from the fluid region as required
|
||||
p.correctBoundaryConditions();
|
||||
|
||||
// Add the droplet impingement pressure
|
||||
p.ref() += mesh.time().deltaT()*fvModels().source(p, "pi")().Su();
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
@ -83,6 +86,7 @@ void Foam::solvers::isothermalFilm::momentumPredictor()
|
||||
tUEqn =
|
||||
(
|
||||
fvm::ddt(alpha, rho, U) + fvm::div(alphaRhoPhi, U)
|
||||
- fvm::Sp(contErr(), U)
|
||||
+ momentumTransport->divDevTau(U)
|
||||
==
|
||||
contactForce(sigma)
|
||||
|
||||
@ -24,6 +24,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "isothermalFilm.H"
|
||||
#include "fvcDdt.H"
|
||||
#include "fvcDiv.H"
|
||||
#include "fvmDdt.H"
|
||||
|
||||
@ -46,14 +47,31 @@ void Foam::solvers::isothermalFilm::predictAlpha()
|
||||
|
||||
fvConstraints().constrain(alpha_);
|
||||
|
||||
// Remove potential unboundedness in alpha caused by div(alphaRhoPhi)
|
||||
alpha_.max(0);
|
||||
|
||||
// Calculate the continuity error caused by limiting alpha
|
||||
// Reset to ~0 following the alpha corrector
|
||||
correctContinuityError();
|
||||
|
||||
// Update film thickness
|
||||
correctDelta();
|
||||
}
|
||||
|
||||
|
||||
void Foam::solvers::isothermalFilm::correctContinuityError()
|
||||
{
|
||||
contErr =
|
||||
(
|
||||
fvc::ddt(rho, alpha)()() + fvc::div(alphaRhoPhi)()()
|
||||
- (fvModels().source(rho, alpha) & alpha)()()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void Foam::solvers::isothermalFilm::correctDelta()
|
||||
{
|
||||
delta_ = max(alpha, scalar(0))*VbyA;
|
||||
delta_ = alpha*VbyA;
|
||||
delta_.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
@ -165,6 +165,7 @@ const Foam::dimensionSet Foam::dimVolume(pow3(dimLength));
|
||||
const Foam::dimensionSet Foam::dimVol(dimVolume);
|
||||
|
||||
const Foam::dimensionSet Foam::dimVelocity(dimLength/dimTime);
|
||||
const Foam::dimensionSet Foam::dimMomentum(dimMass*dimVelocity);
|
||||
const Foam::dimensionSet Foam::dimAcceleration(dimVelocity/dimTime);
|
||||
|
||||
const Foam::dimensionSet Foam::dimDensity(dimMass/dimVolume);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -62,6 +62,7 @@ extern const dimensionSet dimVolume;
|
||||
extern const dimensionSet dimVol;
|
||||
|
||||
extern const dimensionSet dimVelocity;
|
||||
extern const dimensionSet dimMomentum;
|
||||
extern const dimensionSet dimAcceleration;
|
||||
|
||||
extern const dimensionSet dimDensity;
|
||||
|
||||
@ -381,7 +381,6 @@ void Foam::momentumSurfaceFilm::solveAlpha
|
||||
const surfaceScalarField phiu
|
||||
(
|
||||
"phiu",
|
||||
(
|
||||
constrainFilmField
|
||||
(
|
||||
(
|
||||
@ -391,13 +390,16 @@ void Foam::momentumSurfaceFilm::solveAlpha
|
||||
- rhof*(g() & mesh().Sf()),
|
||||
0
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
const surfaceScalarField phid
|
||||
(
|
||||
"phid",
|
||||
rhof*constrainPhiHbyA(fvc::flux(HbyA) - alpharAUf*phiu, U_, alpha_)
|
||||
constrainFilmField
|
||||
(
|
||||
rhof*(fvc::flux(HbyA) - alpharAUf*phiu),
|
||||
0
|
||||
)
|
||||
);
|
||||
|
||||
const surfaceScalarField ddrhorAUrhogf
|
||||
|
||||
@ -14,9 +14,9 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
VoFToFilmTransfer
|
||||
VoFFilmTransfer
|
||||
{
|
||||
type VoFtoFilmTransfer;
|
||||
type VoFFilmTransfer;
|
||||
|
||||
libs ("libfilmVoFTransfer.so");
|
||||
|
||||
|
||||
@ -14,9 +14,9 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
filmToVoFTransfer
|
||||
filmVoFTransfer
|
||||
{
|
||||
type filmToVoFTransfer;
|
||||
type filmVoFTransfer;
|
||||
|
||||
libs ("libfilmVoFTransfer.so");
|
||||
|
||||
|
||||
42
tutorials/modules/multiRegion/film/cylinderVoF/0/VoF/T
Normal file
42
tutorials/modules/multiRegion/film/cylinderVoF/0/VoF/T
Normal file
@ -0,0 +1,42 @@
|
||||
/*--------------------------------*- 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";
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
film
|
||||
{
|
||||
type coupledTemperature;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
"(sides|frontAndBack)"
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
46
tutorials/modules/multiRegion/film/cylinderVoF/0/VoF/T.air
Normal file
46
tutorials/modules/multiRegion/film/cylinderVoF/0/VoF/T.air
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 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;
|
||||
}
|
||||
sides
|
||||
{
|
||||
type calculated;
|
||||
value uniform 300;
|
||||
}
|
||||
top
|
||||
{
|
||||
type calculated;
|
||||
value uniform 300;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type calculated;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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 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;
|
||||
}
|
||||
sides
|
||||
{
|
||||
type calculated;
|
||||
value uniform 300;
|
||||
}
|
||||
top
|
||||
{
|
||||
type calculated;
|
||||
value uniform 300;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type calculated;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
42
tutorials/modules/multiRegion/film/cylinderVoF/0/VoF/U
Normal file
42
tutorials/modules/multiRegion/film/cylinderVoF/0/VoF/U
Normal file
@ -0,0 +1,42 @@
|
||||
/*--------------------------------*- 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;
|
||||
}
|
||||
|
||||
"(sides|frontAndBack)"
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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 volScalarField;
|
||||
location "0";
|
||||
object alpha.liquid;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
film
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
"(sides|frontAndBack)"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
42
tutorials/modules/multiRegion/film/cylinderVoF/0/VoF/p
Normal file
42
tutorials/modules/multiRegion/film/cylinderVoF/0/VoF/p
Normal file
@ -0,0 +1,42 @@
|
||||
/*--------------------------------*- 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";
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 100000;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
film
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
"(sides|frontAndBack)"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
40
tutorials/modules/multiRegion/film/cylinderVoF/0/VoF/p_rgh
Normal file
40
tutorials/modules/multiRegion/film/cylinderVoF/0/VoF/p_rgh
Normal file
@ -0,0 +1,40 @@
|
||||
/*--------------------------------*- 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";
|
||||
object p_rgh;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 100000;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
film
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
}
|
||||
|
||||
"(sides|frontAndBack)"
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type prghTotalPressure;
|
||||
p0 $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
46
tutorials/modules/multiRegion/film/cylinderVoF/0/film/T
Normal file
46
tutorials/modules/multiRegion/film/cylinderVoF/0/film/T
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 volScalarField;
|
||||
location "0/film";
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
surface
|
||||
{
|
||||
type coupledTemperature;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
47
tutorials/modules/multiRegion/film/cylinderVoF/0/film/U
Normal file
47
tutorials/modules/multiRegion/film/cylinderVoF/0/film/U
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 volVectorField;
|
||||
location "0/film";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
surface
|
||||
{
|
||||
type filmSurfaceVelocity;
|
||||
Cs 0.005;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
53
tutorials/modules/multiRegion/film/cylinderVoF/0/film/delta
Normal file
53
tutorials/modules/multiRegion/film/cylinderVoF/0/film/delta
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/film";
|
||||
object delta;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
surface
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type filmContactAngle;
|
||||
|
||||
contactAngle
|
||||
{
|
||||
type constant;
|
||||
theta0 70;
|
||||
}
|
||||
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
45
tutorials/modules/multiRegion/film/cylinderVoF/0/film/p
Normal file
45
tutorials/modules/multiRegion/film/cylinderVoF/0/film/p
Normal file
@ -0,0 +1,45 @@
|
||||
/*--------------------------------*- 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
|
||||
{
|
||||
surface
|
||||
{
|
||||
type mappedFilmPressure;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
sides
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
32
tutorials/modules/multiRegion/film/cylinderVoF/Allrun
Executable file
32
tutorials/modules/multiRegion/film/cylinderVoF/Allrun
Executable file
@ -0,0 +1,32 @@
|
||||
#!/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 -dict system/film/blockMeshDict
|
||||
runApplication extrudeMesh -region film
|
||||
|
||||
runApplication -s VoF foamDictionary -set \
|
||||
"entry0/film/type=mappedExtrudedWall, \
|
||||
entry0/film/neighbourRegion=film, \
|
||||
entry0/film/neighbourPatch=surface, \
|
||||
entry0/film/transformType=none" \
|
||||
constant/VoF/polyMesh/boundary
|
||||
|
||||
runApplication -s film foamDictionary -set \
|
||||
"entry0/surface/type=mappedFilmSurface, \
|
||||
entry0/surface/neighbourRegion=VoF, \
|
||||
entry0/surface/neighbourPatch=film, \
|
||||
entry0/surface/oppositePatch=wall, \
|
||||
entry0/surface/transformType=none" \
|
||||
constant/film/polyMesh/boundary
|
||||
|
||||
printf "\n%s\n" "Creating files for paraview post-processing"
|
||||
paraFoam -touchAll
|
||||
echo
|
||||
|
||||
# runApplication $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -0,0 +1,133 @@
|
||||
/*--------------------------------*- 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 cloudProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
type thermoCloud;
|
||||
|
||||
libs ("libfilmCloudTransfer.so");
|
||||
|
||||
solution
|
||||
{
|
||||
coupled no;
|
||||
transient yes;
|
||||
cellValueSourceCorrection no;
|
||||
maxCo 0.3;
|
||||
|
||||
sourceTerms
|
||||
{
|
||||
schemes
|
||||
{
|
||||
rho explicit 1;
|
||||
U explicit 1;
|
||||
Yi explicit 1;
|
||||
h explicit 1;
|
||||
radiation explicit 1;
|
||||
}
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
rho.air cell;
|
||||
U cellPoint;
|
||||
mu.air cell;
|
||||
T.air cell;
|
||||
Cp.air cell;
|
||||
kappa.air cell;
|
||||
p cell;
|
||||
}
|
||||
|
||||
integrationSchemes
|
||||
{
|
||||
U Euler;
|
||||
T analytical;
|
||||
}
|
||||
}
|
||||
|
||||
constantProperties
|
||||
{
|
||||
rho0 1000;
|
||||
T0 300;
|
||||
Cp0 4187;
|
||||
|
||||
constantVolume false;
|
||||
}
|
||||
|
||||
subModels
|
||||
{
|
||||
particleForces
|
||||
{
|
||||
sphereDrag;
|
||||
gravity;
|
||||
}
|
||||
|
||||
injectionModels
|
||||
{
|
||||
model1
|
||||
{
|
||||
type thermoLookupTableInjection;
|
||||
massTotal 100;
|
||||
parcelBasisType mass;
|
||||
SOI 0;
|
||||
inputFile "parcelInjectionProperties";
|
||||
duration 20.0;
|
||||
parcelsPerSecond 100;
|
||||
randomise true;
|
||||
}
|
||||
}
|
||||
|
||||
dispersionModel none;
|
||||
|
||||
patchInteractionModel standardWallInteraction;
|
||||
|
||||
heatTransferModel none;
|
||||
|
||||
compositionModel singlePhaseMixture;
|
||||
|
||||
phaseChangeModel none;
|
||||
|
||||
stochasticCollisionModel none;
|
||||
|
||||
surfaceFilmModel cloudFilmTransfer;
|
||||
|
||||
radiation off;
|
||||
|
||||
standardWallInteractionCoeffs
|
||||
{
|
||||
type rebound;
|
||||
}
|
||||
|
||||
singlePhaseMixtureCoeffs
|
||||
{
|
||||
phases
|
||||
(
|
||||
liquid
|
||||
{
|
||||
H2O 1;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
cloudFilmTransferCoeffs
|
||||
{
|
||||
interactionType absorb;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
cloudFunctions
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,42 @@
|
||||
/*--------------------------------*- 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;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
VoFClouds
|
||||
{
|
||||
type VoFClouds;
|
||||
|
||||
libs ("libVoFClouds.so");
|
||||
|
||||
phase liquid;
|
||||
carrierPhase air;
|
||||
}
|
||||
|
||||
VoFFilmTransfer
|
||||
{
|
||||
type VoFFilmTransfer;
|
||||
|
||||
libs ("libfilmVoFTransfer.so");
|
||||
|
||||
filmPatch film;
|
||||
phase liquid;
|
||||
|
||||
deltaFactorToFilm 0;
|
||||
alphaToFilm 0;
|
||||
|
||||
transferRateCoeff 0.1;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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,24 @@
|
||||
/*--------------------------------*- 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 scalarListList;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// (x y z) (u v w) d rho mDot T Cp (Y0..Y2)
|
||||
(
|
||||
(0 1.95 -0.2) (0 -5 0) 0.001 1000 0.002 300 4200
|
||||
(0 1.95 0) (0 -5 0) 0.001 1000 0.002 300 4200
|
||||
(0 1.95 0.2) (0 -5 0) 0.001 1000 0.002 300 4200
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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;
|
||||
location "constant";
|
||||
object physicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
phases (liquid air);
|
||||
|
||||
sigma 0.0309;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,59 @@
|
||||
/*--------------------------------*- 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;
|
||||
}
|
||||
}
|
||||
|
||||
solids
|
||||
{
|
||||
};
|
||||
|
||||
liquids
|
||||
{
|
||||
H2O;
|
||||
};
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,72 @@
|
||||
species
|
||||
(
|
||||
O2
|
||||
H2O
|
||||
N2
|
||||
);
|
||||
|
||||
O2
|
||||
{
|
||||
specie
|
||||
{
|
||||
molWeight 31.9988;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Tlow 200;
|
||||
Thigh 5000;
|
||||
Tcommon 1000;
|
||||
highCpCoeffs ( 3.69758 0.00061352 -1.25884e-07 1.77528e-11 -1.13644e-15 -1233.93 3.18917 );
|
||||
lowCpCoeffs ( 3.21294 0.00112749 -5.75615e-07 1.31388e-09 -8.76855e-13 -1005.25 6.03474 );
|
||||
}
|
||||
transport
|
||||
{
|
||||
As 1.67212e-06;
|
||||
Ts 170.672;
|
||||
}
|
||||
}
|
||||
|
||||
H2O
|
||||
{
|
||||
specie
|
||||
{
|
||||
molWeight 18.0153;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Tlow 200;
|
||||
Thigh 5000;
|
||||
Tcommon 1000;
|
||||
highCpCoeffs ( 2.67215 0.00305629 -8.73026e-07 1.201e-10 -6.39162e-15 -29899.2 6.86282 );
|
||||
lowCpCoeffs ( 3.38684 0.00347498 -6.3547e-06 6.96858e-09 -2.50659e-12 -30208.1 2.59023 );
|
||||
}
|
||||
transport
|
||||
{
|
||||
As 1.67212e-06;
|
||||
Ts 170.672;
|
||||
}
|
||||
}
|
||||
|
||||
N2
|
||||
{
|
||||
specie
|
||||
{
|
||||
molWeight 28.0134;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Tlow 200;
|
||||
Thigh 5000;
|
||||
Tcommon 1000;
|
||||
highCpCoeffs ( 2.92664 0.00148798 -5.68476e-07 1.0097e-10 -6.75335e-15 -922.798 5.98053 );
|
||||
lowCpCoeffs ( 3.29868 0.00140824 -3.96322e-06 5.64152e-09 -2.44486e-12 -1020.9 3.95037 );
|
||||
}
|
||||
transport
|
||||
{
|
||||
As 1.67212e-06;
|
||||
Ts 170.672;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,76 @@
|
||||
/*--------------------------------*- 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 film;
|
||||
|
||||
phase liquid;
|
||||
|
||||
viscosity
|
||||
{
|
||||
model Newtonian;
|
||||
}
|
||||
|
||||
sigma 0.07;
|
||||
|
||||
deltaWet 1e-4;
|
||||
|
||||
hydrophilic no;
|
||||
|
||||
transfer
|
||||
{
|
||||
VoFPatchTransfer
|
||||
{
|
||||
deltaFactorToVoF 0.2;
|
||||
alphaToVoF 0.2;
|
||||
|
||||
deltaFactorToFilm 0;
|
||||
alphaToFilm 0;
|
||||
|
||||
transferRateCoeff 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
momentumTransport
|
||||
{
|
||||
model laminar;
|
||||
Cf 0.005;
|
||||
}
|
||||
|
||||
forces
|
||||
{
|
||||
thermocapillary;
|
||||
}
|
||||
|
||||
upperSurfaceModels
|
||||
{
|
||||
heatTransfer
|
||||
{
|
||||
model constant;
|
||||
c0 1e-8;
|
||||
}
|
||||
}
|
||||
|
||||
lowerSurfaceModels
|
||||
{
|
||||
heatTransfer
|
||||
{
|
||||
model constant;
|
||||
c0 1e-8;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,36 @@
|
||||
/*--------------------------------*- 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;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
filmCloudTransfer
|
||||
{
|
||||
type filmCloudTransfer;
|
||||
|
||||
libs ("libfilmCloudTransfer.so");
|
||||
}
|
||||
|
||||
filmVoFTransfer
|
||||
{
|
||||
type filmVoFTransfer;
|
||||
|
||||
libs ("libfilmVoFTransfer.so");
|
||||
|
||||
deltaFactorToVoF 0.3;
|
||||
alphaToVoF 0.3;
|
||||
|
||||
transferRateCoeff 0.1;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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-4;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,143 @@
|
||||
/*--------------------------------*- 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 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0.5 0 -0.5)
|
||||
(1 0 -0.5)
|
||||
(2 0 -0.5)
|
||||
(2 0.707107 -0.5)
|
||||
(0.707107 0.707107 -0.5)
|
||||
(0.353553 0.353553 -0.5)
|
||||
(2 2 -0.5)
|
||||
(0.707107 2 -0.5)
|
||||
(0 2 -0.5)
|
||||
(0 1 -0.5)
|
||||
(0 0.5 -0.5)
|
||||
(-0.5 0 -0.5)
|
||||
(-1 0 -0.5)
|
||||
(-2 0 -0.5)
|
||||
(-2 0.707107 -0.5)
|
||||
(-0.707107 0.707107 -0.5)
|
||||
(-0.353553 0.353553 -0.5)
|
||||
(-2 2 -0.5)
|
||||
(-0.707107 2 -0.5)
|
||||
(0.5 0 0.5)
|
||||
(1 0 0.5)
|
||||
(2 0 0.5)
|
||||
(2 0.707107 0.5)
|
||||
(0.707107 0.707107 0.5)
|
||||
(0.353553 0.353553 0.5)
|
||||
(2 2 0.5)
|
||||
(0.707107 2 0.5)
|
||||
(0 2 0.5)
|
||||
(0 1 0.5)
|
||||
(0 0.5 0.5)
|
||||
(-0.5 0 0.5)
|
||||
(-1 0 0.5)
|
||||
(-2 0 0.5)
|
||||
(-2 0.707107 0.5)
|
||||
(-0.707107 0.707107 0.5)
|
||||
(-0.353553 0.353553 0.5)
|
||||
(-2 2 0.5)
|
||||
(-0.707107 2 0.5)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (5 4 9 10 24 23 28 29) (10 10 11) simpleGrading (1 1 1)
|
||||
hex (0 1 4 5 19 20 23 24) (10 10 11) simpleGrading (1 1 1)
|
||||
hex (1 2 3 4 20 21 22 23) (20 10 11) simpleGrading (1 1 1)
|
||||
hex (4 3 6 7 23 22 25 26) (20 20 11) simpleGrading (1 1 1)
|
||||
hex (9 4 7 8 28 23 26 27) (10 20 11) simpleGrading (1 1 1)
|
||||
hex (15 16 10 9 34 35 29 28) (10 10 11) simpleGrading (1 1 1)
|
||||
hex (12 11 16 15 31 30 35 34) (10 10 11) simpleGrading (1 1 1)
|
||||
hex (13 12 15 14 32 31 34 33) (20 10 11) simpleGrading (1 1 1)
|
||||
hex (14 15 18 17 33 34 37 36) (20 20 11) simpleGrading (1 1 1)
|
||||
hex (15 9 8 18 34 28 27 37) (10 20 11) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
arc 0 5 (0.469846 0.17101 -0.5)
|
||||
arc 5 10 (0.17101 0.469846 -0.5)
|
||||
arc 1 4 (0.939693 0.34202 -0.5)
|
||||
arc 4 9 (0.34202 0.939693 -0.5)
|
||||
arc 19 24 (0.469846 0.17101 0.5)
|
||||
arc 24 29 (0.17101 0.469846 0.5)
|
||||
arc 20 23 (0.939693 0.34202 0.5)
|
||||
arc 23 28 (0.34202 0.939693 0.5)
|
||||
arc 11 16 (-0.469846 0.17101 -0.5)
|
||||
arc 16 10 (-0.17101 0.469846 -0.5)
|
||||
arc 12 15 (-0.939693 0.34202 -0.5)
|
||||
arc 15 9 (-0.34202 0.939693 -0.5)
|
||||
arc 30 35 (-0.469846 0.17101 0.5)
|
||||
arc 35 29 (-0.17101 0.469846 0.5)
|
||||
arc 31 34 (-0.939693 0.34202 0.5)
|
||||
arc 34 28 (-0.34202 0.939693 0.5)
|
||||
);
|
||||
|
||||
defaultPatch
|
||||
{
|
||||
name frontAndBack;
|
||||
type wall;
|
||||
}
|
||||
|
||||
boundary
|
||||
(
|
||||
film
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 1 20 19)
|
||||
(1 2 21 20)
|
||||
(12 11 30 31)
|
||||
(13 12 31 32)
|
||||
|
||||
(5 0 19 24)
|
||||
(10 5 24 29)
|
||||
(16 10 29 35)
|
||||
(11 16 35 30)
|
||||
);
|
||||
}
|
||||
sides
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(2 3 22 21)
|
||||
(3 6 25 22)
|
||||
(14 13 32 33)
|
||||
(17 14 33 36)
|
||||
);
|
||||
}
|
||||
top
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(6 7 26 25)
|
||||
(7 8 27 26)
|
||||
(8 18 37 27)
|
||||
(18 17 36 37)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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 decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method metis;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (1 1 1);
|
||||
order xyz;
|
||||
}
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
processorWeights ( 1 1 1 1 );
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "";
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots ( );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
VoF compressibleVoF;
|
||||
film film;
|
||||
}
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 20;
|
||||
|
||||
deltaT 1e-02;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.2;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 10;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
maxCo 0.3;
|
||||
maxAlphaCo 1;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,36 @@
|
||||
/*--------------------------------*- 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;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
sourceCase "$FOAM_CASE";
|
||||
constructFrom patch;
|
||||
|
||||
sourcePatches (surface);
|
||||
exposedPatchName wall;
|
||||
|
||||
extrudeModel linearNormal;
|
||||
|
||||
nLayers 1;
|
||||
|
||||
expansionRatio 1;
|
||||
|
||||
flipNormals yes;
|
||||
mergeFaces no;
|
||||
|
||||
linearNormalCoeffs
|
||||
{
|
||||
thickness 0.01;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,143 @@
|
||||
/*--------------------------------*- 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 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0.5 0 -0.5)
|
||||
(1 0 -0.5)
|
||||
(2 0 -0.5)
|
||||
(2 0.707107 -0.5)
|
||||
(0.707107 0.707107 -0.5)
|
||||
(0.353553 0.353553 -0.5)
|
||||
(2 2 -0.5)
|
||||
(0.707107 2 -0.5)
|
||||
(0 2 -0.5)
|
||||
(0 1 -0.5)
|
||||
(0 0.5 -0.5)
|
||||
(-0.5 0 -0.5)
|
||||
(-1 0 -0.5)
|
||||
(-2 0 -0.5)
|
||||
(-2 0.707107 -0.5)
|
||||
(-0.707107 0.707107 -0.5)
|
||||
(-0.353553 0.353553 -0.5)
|
||||
(-2 2 -0.5)
|
||||
(-0.707107 2 -0.5)
|
||||
(0.5 0 0.5)
|
||||
(1 0 0.5)
|
||||
(2 0 0.5)
|
||||
(2 0.707107 0.5)
|
||||
(0.707107 0.707107 0.5)
|
||||
(0.353553 0.353553 0.5)
|
||||
(2 2 0.5)
|
||||
(0.707107 2 0.5)
|
||||
(0 2 0.5)
|
||||
(0 1 0.5)
|
||||
(0 0.5 0.5)
|
||||
(-0.5 0 0.5)
|
||||
(-1 0 0.5)
|
||||
(-2 0 0.5)
|
||||
(-2 0.707107 0.5)
|
||||
(-0.707107 0.707107 0.5)
|
||||
(-0.353553 0.353553 0.5)
|
||||
(-2 2 0.5)
|
||||
(-0.707107 2 0.5)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (5 4 9 10 24 23 28 29) (10 10 11) simpleGrading (1 1 1)
|
||||
hex (0 1 4 5 19 20 23 24) (10 10 11) simpleGrading (1 1 1)
|
||||
hex (1 2 3 4 20 21 22 23) (20 10 11) simpleGrading (1 1 1)
|
||||
hex (4 3 6 7 23 22 25 26) (20 20 11) simpleGrading (1 1 1)
|
||||
hex (9 4 7 8 28 23 26 27) (10 20 11) simpleGrading (1 1 1)
|
||||
hex (15 16 10 9 34 35 29 28) (10 10 11) simpleGrading (1 1 1)
|
||||
hex (12 11 16 15 31 30 35 34) (10 10 11) simpleGrading (1 1 1)
|
||||
hex (13 12 15 14 32 31 34 33) (20 10 11) simpleGrading (1 1 1)
|
||||
hex (14 15 18 17 33 34 37 36) (20 20 11) simpleGrading (1 1 1)
|
||||
hex (15 9 8 18 34 28 27 37) (10 20 11) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
arc 0 5 (0.469846 0.17101 -0.5)
|
||||
arc 5 10 (0.17101 0.469846 -0.5)
|
||||
arc 1 4 (0.939693 0.34202 -0.5)
|
||||
arc 4 9 (0.34202 0.939693 -0.5)
|
||||
arc 19 24 (0.469846 0.17101 0.5)
|
||||
arc 24 29 (0.17101 0.469846 0.5)
|
||||
arc 20 23 (0.939693 0.34202 0.5)
|
||||
arc 23 28 (0.34202 0.939693 0.5)
|
||||
arc 11 16 (-0.469846 0.17101 -0.5)
|
||||
arc 16 10 (-0.17101 0.469846 -0.5)
|
||||
arc 12 15 (-0.939693 0.34202 -0.5)
|
||||
arc 15 9 (-0.34202 0.939693 -0.5)
|
||||
arc 30 35 (-0.469846 0.17101 0.5)
|
||||
arc 35 29 (-0.17101 0.469846 0.5)
|
||||
arc 31 34 (-0.939693 0.34202 0.5)
|
||||
arc 34 28 (-0.34202 0.939693 0.5)
|
||||
);
|
||||
|
||||
defaultPatch
|
||||
{
|
||||
name frontAndBack;
|
||||
type patch;
|
||||
}
|
||||
|
||||
boundary
|
||||
(
|
||||
surface
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 1 20 19)
|
||||
(1 2 21 20)
|
||||
(12 11 30 31)
|
||||
(13 12 31 32)
|
||||
|
||||
(5 0 19 24)
|
||||
(10 5 24 29)
|
||||
(16 10 29 35)
|
||||
(11 16 35 30)
|
||||
);
|
||||
}
|
||||
sides
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(2 3 22 21)
|
||||
(3 6 25 22)
|
||||
(14 13 32 33)
|
||||
(17 14 33 36)
|
||||
);
|
||||
}
|
||||
wall
|
||||
{
|
||||
type filmWall;
|
||||
faces
|
||||
(
|
||||
(6 7 26 25)
|
||||
(7 8 27 26)
|
||||
(8 18 37 27)
|
||||
(18 17 36 37)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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/film";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
div(phid,alpha) Gauss upwind;
|
||||
div(alphaRhoPhi,U) Gauss upwind;
|
||||
div(alphaRhoPhi,e) Gauss upwind;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear uncorrected;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default uncorrected;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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/film";
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- 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;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
divSchemes
|
||||
{
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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