mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Spray - usability updates to break-up models - mantis #993
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -64,11 +64,12 @@ Foam::BreakupModel<CloudType>::BreakupModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
const word& type,
|
||||
bool solveOscillationEq
|
||||
)
|
||||
:
|
||||
SubModelBase<CloudType>(owner, dict, typeName, type),
|
||||
solveOscillationEq_(this->coeffDict().lookup("solveOscillationEq")),
|
||||
solveOscillationEq_(solveOscillationEq),
|
||||
y0_(0.0),
|
||||
yDot0_(0.0),
|
||||
TABComega_(0.0),
|
||||
@ -77,14 +78,12 @@ Foam::BreakupModel<CloudType>::BreakupModel
|
||||
{
|
||||
if (solveOscillationEq_)
|
||||
{
|
||||
const dictionary TABcoeffsDict(dict.subDict("TABCoeffs"));
|
||||
y0_ = TABcoeffsDict.template lookupOrDefault<scalar>("y0", 0.0);
|
||||
yDot0_ = TABcoeffsDict.template lookupOrDefault<scalar>("yDot0", 0.0);
|
||||
TABComega_ =
|
||||
TABcoeffsDict.template lookupOrDefault<scalar>("Comega", 8.0);
|
||||
TABCmu_ = TABcoeffsDict.template lookupOrDefault<scalar>("Cmu", 10.0);
|
||||
TABWeCrit_ =
|
||||
TABcoeffsDict.template lookupOrDefault<scalar>("WeCrit", 12.0);
|
||||
const dictionary coeffs(dict.subDict("TABCoeffs"));
|
||||
y0_ = coeffs.template lookupOrDefault<scalar>("y0", 0.0);
|
||||
yDot0_ = coeffs.template lookupOrDefault<scalar>("yDot0", 0.0);
|
||||
TABComega_ = coeffs.template lookupOrDefault<scalar>("Comega", 8.0);
|
||||
TABCmu_ = coeffs.template lookupOrDefault<scalar>("Cmu", 10.0);
|
||||
TABWeCrit_ = coeffs.template lookupOrDefault<scalar>("WeCrit", 12.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -97,7 +97,8 @@ public:
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
const word& type,
|
||||
bool solveOscillationEq = false
|
||||
);
|
||||
|
||||
//- Construct copy
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -34,36 +34,21 @@ Foam::ETAB<CloudType>::ETAB
|
||||
CloudType& owner
|
||||
)
|
||||
:
|
||||
BreakupModel<CloudType>(dict, owner, typeName),
|
||||
Cmu_(10.0),
|
||||
Comega_(8.0),
|
||||
BreakupModel<CloudType>(dict, owner, typeName, true),
|
||||
k1_(0.2),
|
||||
k2_(0.2),
|
||||
WeCrit_(12.0),
|
||||
WeTransition_(100.0),
|
||||
AWe_(0.0)
|
||||
{
|
||||
if (!this->defaultCoeffs(true))
|
||||
{
|
||||
this->coeffDict().lookup("Cmu") >> Cmu_;
|
||||
this->coeffDict().lookup("Comega") >> Comega_;
|
||||
this->coeffDict().lookup("k1") >> k1_;
|
||||
this->coeffDict().lookup("k2") >> k2_;
|
||||
this->coeffDict().lookup("WeCrit") >> WeCrit_;
|
||||
this->coeffDict().lookup("WeTransition") >> WeTransition_;
|
||||
}
|
||||
|
||||
scalar k21 = k2_/k1_;
|
||||
AWe_ = (k21*sqrt(WeTransition_) - 1.0)/pow4(WeTransition_);
|
||||
|
||||
if (!BreakupModel<CloudType>::solveOscillationEq_)
|
||||
{
|
||||
Info<< "Warning: solveOscillationEq is set to "
|
||||
<< BreakupModel<CloudType>::solveOscillationEq_ << nl
|
||||
<< " Setting it to true in order for the ETAB model to work."
|
||||
<< endl;
|
||||
BreakupModel<CloudType>::solveOscillationEq_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -71,11 +56,8 @@ template<class CloudType>
|
||||
Foam::ETAB<CloudType>::ETAB(const ETAB<CloudType>& bum)
|
||||
:
|
||||
BreakupModel<CloudType>(bum),
|
||||
Cmu_(bum.Cmu_),
|
||||
Comega_(bum.Comega_),
|
||||
k1_(bum.k1_),
|
||||
k2_(bum.k2_),
|
||||
WeCrit_(bum.WeCrit_),
|
||||
WeTransition_(bum.WeTransition_),
|
||||
AWe_(bum.AWe_)
|
||||
{}
|
||||
@ -123,10 +105,10 @@ bool Foam::ETAB<CloudType>::update
|
||||
scalar semiMass = nParticle*pow3(d);
|
||||
|
||||
// inverse of characteristic viscous damping time
|
||||
scalar rtd = 0.5*Cmu_*mu/(rho*r2);
|
||||
scalar rtd = 0.5*this->TABCmu_*mu/(rho*r2);
|
||||
|
||||
// oscillation frequency (squared)
|
||||
scalar omega2 = Comega_*sigma/(rho*r3) - rtd*rtd;
|
||||
scalar omega2 = this->TABComega_*sigma/(rho*r3) - rtd*rtd;
|
||||
|
||||
if (omega2 > 0)
|
||||
{
|
||||
@ -134,7 +116,7 @@ bool Foam::ETAB<CloudType>::update
|
||||
scalar romega = 1.0/omega;
|
||||
|
||||
scalar We = rhoc*sqr(Urmag)*r/sigma;
|
||||
scalar Wetmp = We/WeCrit_;
|
||||
scalar Wetmp = We/this->TABWeCrit_;
|
||||
|
||||
scalar y1 = y - Wetmp;
|
||||
scalar y2 = yDot*romega;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -71,13 +71,8 @@ private:
|
||||
|
||||
// Model constants
|
||||
|
||||
// Cmu_ and Comega_ are the same as in the TAB model
|
||||
scalar Cmu_;
|
||||
scalar Comega_;
|
||||
|
||||
scalar k1_;
|
||||
scalar k2_;
|
||||
scalar WeCrit_;
|
||||
scalar WeTransition_;
|
||||
scalar AWe_;
|
||||
|
||||
|
||||
@ -34,10 +34,7 @@ Foam::TAB<CloudType>::TAB
|
||||
CloudType& owner
|
||||
)
|
||||
:
|
||||
BreakupModel<CloudType>(dict, owner, typeName),
|
||||
Cmu_(BreakupModel<CloudType>::TABCmu_),
|
||||
Comega_(BreakupModel<CloudType>::TABComega_),
|
||||
WeCrit_(BreakupModel<CloudType>::TABWeCrit_),
|
||||
BreakupModel<CloudType>(dict, owner, typeName, true),
|
||||
SMDCalcMethod_(this->coeffDict().lookup("SMDCalculationMethod"))
|
||||
{
|
||||
// calculate the inverse function of the Rossin-Rammler Distribution
|
||||
@ -52,16 +49,6 @@ Foam::TAB<CloudType>::TAB
|
||||
(1.0 - exp(-xx)*(1.0 + xx + sqr(xx)/2.0 + pow3(xx)/6.0))*rrd100;
|
||||
}
|
||||
|
||||
if (!BreakupModel<CloudType>::solveOscillationEq_)
|
||||
{
|
||||
WarningIn("Foam::TAB<CloudType>::TAB(const dictionary&, CloudType&)")
|
||||
<< "solveOscillationEq is set to "
|
||||
<< BreakupModel<CloudType>::solveOscillationEq_ << nl
|
||||
<< " Setting it to true in order for the TAB model to work."
|
||||
<< endl;
|
||||
BreakupModel<CloudType>::solveOscillationEq_ = true;
|
||||
}
|
||||
|
||||
if (SMDCalcMethod_ == "method1")
|
||||
{
|
||||
SMDMethod_ = method1;
|
||||
@ -84,9 +71,6 @@ template<class CloudType>
|
||||
Foam::TAB<CloudType>::TAB(const TAB<CloudType>& bum)
|
||||
:
|
||||
BreakupModel<CloudType>(bum),
|
||||
Cmu_(bum.Cmu_),
|
||||
Comega_(bum.Comega_),
|
||||
WeCrit_(bum.WeCrit_),
|
||||
SMDCalcMethod_(bum.SMDCalcMethod_)
|
||||
{}
|
||||
|
||||
@ -135,16 +119,16 @@ bool Foam::TAB<CloudType>::update
|
||||
scalar semiMass = nParticle*pow3(d);
|
||||
|
||||
// inverse of characteristic viscous damping time
|
||||
scalar rtd = 0.5*Cmu_*mu/(rho*r2);
|
||||
scalar rtd = 0.5*this->TABCmu_*mu/(rho*r2);
|
||||
|
||||
// oscillation frequency (squared)
|
||||
scalar omega2 = Comega_*sigma/(rho*r3) - rtd*rtd;
|
||||
scalar omega2 = this->TABComega_*sigma/(rho*r3) - rtd*rtd;
|
||||
|
||||
if (omega2 > 0)
|
||||
{
|
||||
scalar omega = sqrt(omega2);
|
||||
scalar We = rhoc*sqr(Urmag)*r/sigma;
|
||||
scalar Wetmp = We/WeCrit_;
|
||||
scalar Wetmp = We/this->TABWeCrit_;
|
||||
|
||||
scalar y1 = y - Wetmp;
|
||||
scalar y2 = yDot/omega;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -83,9 +83,6 @@ private:
|
||||
|
||||
// Model constants
|
||||
|
||||
scalar Cmu_;
|
||||
scalar Comega_;
|
||||
scalar WeCrit_;
|
||||
word SMDCalcMethod_;
|
||||
SMDMethods SMDMethod_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user