Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev

This commit is contained in:
OpenFOAM-admin
2011-06-15 15:19:53 +01:00
7 changed files with 76 additions and 42 deletions

View File

@ -90,6 +90,21 @@ const Foam::dictionary& Foam::SubModelBase<CloudType>::coeffDict() const
} }
template<class CloudType>
bool Foam::SubModelBase<CloudType>::defaultCoeffs(const bool printMsg) const
{
bool def = coeffDict_.lookupOrDefault<bool>("defaultCoeffs", false);
if (printMsg && def)
{
Info<< incrIndent;
Info<< indent << "Employing default coefficients" << endl;
Info<< decrIndent;
}
return def;
}
template<class CloudType> template<class CloudType>
CloudType& Foam::SubModelBase<CloudType>::owner() CloudType& Foam::SubModelBase<CloudType>::owner()
{ {
@ -105,7 +120,7 @@ bool Foam::SubModelBase<CloudType>::active() const
template<class CloudType> template<class CloudType>
void Foam::SubModelBase<CloudType>::cacheFields(const bool) void Foam::SubModelBase<CloudType>::cacheFields(const bool)
{ {
// do nothing // do nothing
} }

View File

@ -63,11 +63,10 @@ protected:
//- Reference to the cloud dictionary //- Reference to the cloud dictionary
const dictionary& dict_; const dictionary& dict_;
//- Reference to the coefficients dictionary //- Coefficients dictionary
const dictionary& coeffDict_; const dictionary& coeffDict_;
public: public:
// Constructors // Constructors
@ -108,6 +107,9 @@ public:
//- Return const access to the coefficients dictionary //- Return const access to the coefficients dictionary
const dictionary& coeffDict() const; const dictionary& coeffDict() const;
//- Returns true if defaultCoeffs is true and outputs on printMsg
bool defaultCoeffs(const bool printMsg) const;
//- Return the model 'active' status - default active = true //- Return the model 'active' status - default active = true
virtual bool active() const; virtual bool active() const;

View File

@ -35,24 +35,24 @@ Foam::ETAB<CloudType>::ETAB
) )
: :
BreakupModel<CloudType>(dict, owner, typeName), BreakupModel<CloudType>(dict, owner, typeName),
Cmu_(this->coeffDict().template lookupOrDefault<scalar>("Cmu", 10.0)), Cmu_(10.0),
Comega_(this->coeffDict().template lookupOrDefault<scalar>("Comega", 8.0)), Comega_(8.0),
k1_(this->coeffDict().template lookupOrDefault<scalar>("k1", 0.2)), k1_(0.2),
k2_(this->coeffDict().template lookupOrDefault<scalar>("k2", 0.2)), k2_(0.2),
WeCrit_ WeCrit_(12.0),
( WeTransition_(100.0),
this->coeffDict().template lookupOrDefault<scalar>("WeCrit", 12.0)
),
WeTransition_
(
this->coeffDict().template lookupOrDefault<scalar>
(
"WeTransition",
100.0
)
),
AWe_(0.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_; scalar k21 = k2_/k1_;
AWe_ = (k21*sqrt(WeTransition_) - 1.0)/pow4(WeTransition_); AWe_ = (k21*sqrt(WeTransition_) - 1.0)/pow4(WeTransition_);

View File

@ -35,9 +35,15 @@ Foam::PilchErdman<CloudType>::PilchErdman
) )
: :
BreakupModel<CloudType>(dict, owner, typeName), BreakupModel<CloudType>(dict, owner, typeName),
B1_(this->coeffDict().template lookupOrDefault<scalar>("B1", 0.375)), B1_(0.375),
B2_(this->coeffDict().template lookupOrDefault<scalar>("B2", 0.236)) B2_(0.236)
{} {
if (!this->defaultCoeffs(true))
{
this->coeffDict().lookup("B1") >> B1_;
this->coeffDict().lookup("B2") >> B2_;
}
}
template <class CloudType> template <class CloudType>

View File

@ -35,11 +35,19 @@ Foam::ReitzDiwakar<CloudType>::ReitzDiwakar
) )
: :
BreakupModel<CloudType>(dict, owner, typeName), BreakupModel<CloudType>(dict, owner, typeName),
Cbag_(this->coeffDict().template lookupOrDefault<scalar>("Cbag", 6.0)), Cbag_(6.0),
Cb_(this->coeffDict().template lookupOrDefault<scalar>("Cb", 0.785)), Cb_(0.785),
Cstrip_(this->coeffDict().template lookupOrDefault<scalar>("Cstrip", 0.5)), Cstrip_(0.5),
Cs_(this->coeffDict().template lookupOrDefault<scalar>("Cs", 10.0)) Cs_(10.0)
{} {
if (!this->defaultCoeffs(true))
{
this->coeffDict().lookup("Cbag") >> Cbag_;
this->coeffDict().lookup("Cb") >> Cb_;
this->coeffDict().lookup("Cstrip") >> Cstrip_;
this->coeffDict().lookup("Cs") >> Cs_;
}
}
template <class CloudType> template <class CloudType>

View File

@ -35,20 +35,23 @@ Foam::ReitzKHRT<CloudType>::ReitzKHRT
) )
: :
BreakupModel<CloudType>(dict, owner, typeName), BreakupModel<CloudType>(dict, owner, typeName),
b0_(this->coeffDict().template lookupOrDefault<scalar>("B0", 0.61)), b0_(0.61),
b1_(this->coeffDict().template lookupOrDefault<scalar>("B1", 40.0)), b1_(40.0),
cTau_(this->coeffDict().template lookupOrDefault<scalar>("Ctau", 1.0)), cTau_(1.0),
cRT_(this->coeffDict().template lookupOrDefault<scalar>("CRT", 0.1)), cRT_(0.1),
msLimit_ msLimit_(0.03),
( weberLimit_(6.0)
this->coeffDict().template lookupOrDefault<scalar> {
( if (!this->defaultCoeffs(true))
"msLimit", {
0.03 this->coeffDict().lookup("B0") >> b0_;
) this->coeffDict().lookup("B1") >> b1_;
), this->coeffDict().lookup("Ctau") >> cTau_;
weberLimit_(readScalar(this->coeffDict().lookup("WeberLimit"))) this->coeffDict().lookup("CRT") >> cRT_;
{} this->coeffDict().lookup("msLimit") >> msLimit_;
this->coeffDict().lookup("WeberLimit") >> weberLimit_;
}
}
template <class CloudType> template <class CloudType>

View File

@ -142,7 +142,7 @@ bool Foam::SHF<CloudType>::update
{ {
bool addChild = false; bool addChild = false;
scalar d03 = pow(d, 3); scalar d03 = pow3(d);
scalar rhopi6 = rho*constant::mathematical::pi/6.0; scalar rhopi6 = rho*constant::mathematical::pi/6.0;
scalar mass0 = nParticle*rhopi6*d03; scalar mass0 = nParticle*rhopi6*d03;
scalar mass = mass0; scalar mass = mass0;