BirdCarreau.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "BirdCarreau.H"
00028 #include "addToRunTimeSelectionTable.H"
00029 #include "surfaceFields.H"
00030
00031
00032
00033 namespace Foam
00034 {
00035 namespace viscosityModels
00036 {
00037 defineTypeNameAndDebug(BirdCarreau, 0);
00038 addToRunTimeSelectionTable
00039 (
00040 viscosityModel,
00041 BirdCarreau,
00042 dictionary
00043 );
00044 }
00045 }
00046
00047
00048
00049
00050 Foam::tmp<Foam::volScalarField>
00051 Foam::viscosityModels::BirdCarreau::calcNu() const
00052 {
00053 return
00054 nuInf_
00055 + (nu0_ - nuInf_)
00056 *pow(scalar(1) + sqr(k_*strainRate()), (n_ - 1.0)/2.0);
00057 }
00058
00059
00060
00061
00062 Foam::viscosityModels::BirdCarreau::BirdCarreau
00063 (
00064 const word& name,
00065 const dictionary& viscosityProperties,
00066 const volVectorField& U,
00067 const surfaceScalarField& phi
00068 )
00069 :
00070 viscosityModel(name, viscosityProperties, U, phi),
00071 BirdCarreauCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
00072 nu0_(BirdCarreauCoeffs_.lookup("nu0")),
00073 nuInf_(BirdCarreauCoeffs_.lookup("nuInf")),
00074 k_(BirdCarreauCoeffs_.lookup("k")),
00075 n_(BirdCarreauCoeffs_.lookup("n")),
00076 nu_
00077 (
00078 IOobject
00079 (
00080 "nu",
00081 U_.time().timeName(),
00082 U_.db(),
00083 IOobject::NO_READ,
00084 IOobject::AUTO_WRITE
00085 ),
00086 calcNu()
00087 )
00088 {}
00089
00090
00091
00092
00093 bool Foam::viscosityModels::BirdCarreau::read
00094 (
00095 const dictionary& viscosityProperties
00096 )
00097 {
00098 viscosityModel::read(viscosityProperties);
00099
00100 BirdCarreauCoeffs_ = viscosityProperties.subDict(typeName + "Coeffs");
00101
00102 BirdCarreauCoeffs_.lookup("nu0") >> nu0_;
00103 BirdCarreauCoeffs_.lookup("nuInf") >> nuInf_;
00104 BirdCarreauCoeffs_.lookup("k") >> k_;
00105 BirdCarreauCoeffs_.lookup("n") >> n_;
00106
00107 return true;
00108 }
00109
00110
00111
Copyright © 2000-2009 OpenCFD Ltd