Commit f3433b3a authored by mattijs's avatar mattijs
Browse files

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

parents f9d4a778 25817d95
......@@ -25,7 +25,7 @@ Application
thermoFoam
Description
Evolves the thermodynamics on a forzen flow field
Evolves the thermodynamics on a frozen flow field
\*---------------------------------------------------------------------------*/
......
......@@ -213,25 +213,21 @@ void Foam::doxygenXmlParser::skipForward
) const
{
// recurse to move forward in 'is' until come across <blockName>
// fast-forward until we reach a '<'
char c;
while (is.get(c) && c != '<')
{}
string entryName = "";
while (is.get(c) && c != '>')
{
entryName = entryName + c;
}
char c;
if (entryName == blockName)
{
return;
}
else
while (is.good() && (entryName != blockName))
{
skipForward(is, blockName);
entryName = "";
// fast-forward until we reach a '<'
while (is.get(c) && c != '<')
{}
while (is.get(c) && c != '>')
{
entryName = entryName + c;
}
}
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -31,9 +31,9 @@ Description
This boundary condition provides an oscillating condition in terms of
amplitude and frequency.
/f[
\f[
x_p = (1 + a sin(\pi f t))x_{ref} + x_o
/f]
\f]
where
......
......@@ -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_;
......
......@@ -165,8 +165,6 @@ bool Foam::ReitzKHRT<CloudType>::update
if ((tc > 0) || (lambdaRT < d) )
{
tc += dt;
scalar multiplier = d/lambdaRT;
d = cbrt(d3/multiplier);
}
// characteristic RT breakup time
......
......@@ -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_;
......
......@@ -250,6 +250,17 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::radiation::radiationModel::ST
const Foam::radiation::absorptionEmissionModel&
Foam::radiation::radiationModel::absorptionEmission() const
{
if (!absorptionEmission_.valid())
{
FatalErrorIn
(
"const Foam::radiation::absorptionEmissionModel&"
"Foam::radiation::radiationModel::absorptionEmission() const"
)
<< "Requested radiation absorptionEmission model, but model is "
<< "not activate" << abort(FatalError);
}
return absorptionEmission_();
}
......
......@@ -231,7 +231,7 @@ public:
volScalarField& T
) const;
//- Access to absorptionEmissionModel
//- Access to absorptionEmission model
const absorptionEmissionModel& absorptionEmission() const;
};
......
......@@ -59,7 +59,6 @@ $(v2WallFunctions)/v2WallFunction/v2WallFunctionFvPatchScalarField.C
derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C
derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C
derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.C
derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C
backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -62,7 +62,7 @@ Description
\table
Property | Description | Required | Default value
z | vertical co-ordinate [m] | yes |
z | vertical direction of z-axis | yes |
kappa | Karman's constanat | no | 0.41
Uref | reference velocity [m/s] | yes |
Href | reference height [m] | yes |
......@@ -75,7 +75,7 @@ Description
myPatch
{
type atmBoundaryLayerInletEpsilon;
z 1.0;
z (0 1 0);
kappa 0.41;
Uref 1.0;
Href 0.0;
......
turbulenceModel.C
laminar/laminar.C
derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C
derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C
LIB = $(FOAM_LIBBIN)/libincompressibleTurbulenceModel
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -69,7 +69,7 @@ Description
\table
Property | Description | Required | Default value
n | flow direction | yes |
z | vertical co-ordinate [m] | yes |
z | vertical direction of z-axis | yes |
kappa | Karman's constanat | no | 0.41
Uref | reference velocity [m/s] | yes |
Href | reference height [m] | yes |
......@@ -83,7 +83,7 @@ Description
{
type atmBoundaryLayerInletVelocity;
n (0 1 0);
z 1.0;
z (0 1 0);
kappa 0.41;
Uref 1.0;
Href 0.0;
......@@ -135,7 +135,7 @@ class atmBoundaryLayerInletVelocityFvPatchVectorField
//- Direction of the z-coordinate
vector z_;
//- Surface roughness lenght
//- Surface roughness length
scalarField z0_;
//- Von Karman constant
......
......@@ -63,7 +63,6 @@ constantProperties
epsilon0 1;
f0 0.5;
Pr 0.7;
constantVolume false;
}
......
......@@ -63,7 +63,6 @@ constantProperties
epsilon0 1;
f0 0.5;
Pr 0.7;
constantVolume false;
}
......
......@@ -63,7 +63,6 @@ constantProperties
epsilon0 1;
f0 0.5;
Pr 0.7;
constantVolume false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment