Bird-Carreau extended to Bird-Carreau-Yasuda by the addition of the "a" coefficient

"a" defaults to 2 (Bird-Carreau)
This commit is contained in:
Henry
2013-05-07 12:17:43 +01:00
parent 5414fd3058
commit b6b6bbef89
2 changed files with 20 additions and 3 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -52,7 +52,7 @@ Foam::viscosityModels::BirdCarreau::calcNu() const
return return
nuInf_ nuInf_
+ (nu0_ - nuInf_) + (nu0_ - nuInf_)
*pow(scalar(1) + sqr(k_*strainRate()), (n_ - 1.0)/2.0); *pow(scalar(1) + pow(k_*strainRate(), a_), (n_ - 1.0)/a_);
} }
@ -72,6 +72,14 @@ Foam::viscosityModels::BirdCarreau::BirdCarreau
nuInf_(BirdCarreauCoeffs_.lookup("nuInf")), nuInf_(BirdCarreauCoeffs_.lookup("nuInf")),
k_(BirdCarreauCoeffs_.lookup("k")), k_(BirdCarreauCoeffs_.lookup("k")),
n_(BirdCarreauCoeffs_.lookup("n")), n_(BirdCarreauCoeffs_.lookup("n")),
a_
(
BirdCarreauCoeffs_.lookupOrDefault
(
"a",
dimensionedScalar("a", dimless, 2)
)
),
nu_ nu_
( (
IOobject IOobject
@ -102,6 +110,11 @@ bool Foam::viscosityModels::BirdCarreau::read
BirdCarreauCoeffs_.lookup("nuInf") >> nuInf_; BirdCarreauCoeffs_.lookup("nuInf") >> nuInf_;
BirdCarreauCoeffs_.lookup("k") >> k_; BirdCarreauCoeffs_.lookup("k") >> k_;
BirdCarreauCoeffs_.lookup("n") >> n_; BirdCarreauCoeffs_.lookup("n") >> n_;
a_ = BirdCarreauCoeffs_.lookupOrDefault
(
"a",
dimensionedScalar("a", dimless, 2)
);
return true; return true;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -27,6 +27,9 @@ Class
Description Description
An incompressible Bird-Carreau non-Newtonian viscosity model. An incompressible Bird-Carreau non-Newtonian viscosity model.
The Bird-Carreau-Yasuda form is also supported if the optional "a"
coefficient is specified. "a" defaults to 2 for the Bird-Carreau model.
SourceFiles SourceFiles
BirdCarreau.C BirdCarreau.C
@ -62,6 +65,7 @@ class BirdCarreau
dimensionedScalar nuInf_; dimensionedScalar nuInf_;
dimensionedScalar k_; dimensionedScalar k_;
dimensionedScalar n_; dimensionedScalar n_;
dimensionedScalar a_;
volScalarField nu_; volScalarField nu_;