mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
viscosityModels::Casson: New viscosity model
Description
An incompressible Casson non-Newtonian viscosity model.
References:
\verbatim
Casson, N. (1959).
Rheology of disperse systems.
In Proceedings of a Conference Organized by the
British Society of Rheology.
Pergamon Press, New York.
Fournier, R. L. (2011).
Basic transport phenomena in biomedical engineering.
CRC Press.
\endverbatim
Contributed by Sergey Sindeev
This commit is contained in:
@ -5,6 +5,7 @@ viscosityModels/powerLaw/powerLaw.C
|
|||||||
viscosityModels/CrossPowerLaw/CrossPowerLaw.C
|
viscosityModels/CrossPowerLaw/CrossPowerLaw.C
|
||||||
viscosityModels/BirdCarreau/BirdCarreau.C
|
viscosityModels/BirdCarreau/BirdCarreau.C
|
||||||
viscosityModels/HerschelBulkley/HerschelBulkley.C
|
viscosityModels/HerschelBulkley/HerschelBulkley.C
|
||||||
|
viscosityModels/Casson/Casson.C
|
||||||
|
|
||||||
transportModel/transportModel.C
|
transportModel/transportModel.C
|
||||||
singlePhaseTransportModel/singlePhaseTransportModel.C
|
singlePhaseTransportModel/singlePhaseTransportModel.C
|
||||||
|
|||||||
@ -0,0 +1,126 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "Casson.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "surfaceFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace viscosityModels
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(Casson, 0);
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
viscosityModel,
|
||||||
|
Casson,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::viscosityModels::Casson::calcNu() const
|
||||||
|
{
|
||||||
|
return max
|
||||||
|
(
|
||||||
|
nuMin_,
|
||||||
|
min
|
||||||
|
(
|
||||||
|
nuMax_,
|
||||||
|
sqr
|
||||||
|
(
|
||||||
|
sqrt
|
||||||
|
(
|
||||||
|
tau0_
|
||||||
|
/max
|
||||||
|
(
|
||||||
|
strainRate(),
|
||||||
|
dimensionedScalar("VSMALL", dimless/dimTime, VSMALL)
|
||||||
|
)
|
||||||
|
) + sqrt(m_)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::viscosityModels::Casson::Casson
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const dictionary& viscosityProperties,
|
||||||
|
const volVectorField& U,
|
||||||
|
const surfaceScalarField& phi
|
||||||
|
)
|
||||||
|
:
|
||||||
|
viscosityModel(name, viscosityProperties, U, phi),
|
||||||
|
CassonCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
|
||||||
|
m_(CassonCoeffs_.lookup("m")),
|
||||||
|
tau0_(CassonCoeffs_.lookup("tau0")),
|
||||||
|
nuMin_(CassonCoeffs_.lookup("nuMin")),
|
||||||
|
nuMax_(CassonCoeffs_.lookup("nuMax")),
|
||||||
|
nu_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"nu",
|
||||||
|
U_.time().timeName(),
|
||||||
|
U_.db(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
calcNu()
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
bool Foam::viscosityModels::Casson::read
|
||||||
|
(
|
||||||
|
const dictionary& viscosityProperties
|
||||||
|
)
|
||||||
|
{
|
||||||
|
viscosityModel::read(viscosityProperties);
|
||||||
|
|
||||||
|
CassonCoeffs_ = viscosityProperties.subDict(typeName + "Coeffs");
|
||||||
|
|
||||||
|
CassonCoeffs_.lookup("m") >> m_;
|
||||||
|
CassonCoeffs_.lookup("tau0") >> tau0_;
|
||||||
|
CassonCoeffs_.lookup("nuMin_") >> nuMin_;
|
||||||
|
CassonCoeffs_.lookup("nuMax_") >> nuMax_;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,146 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::viscosityModels::Casson
|
||||||
|
|
||||||
|
Description
|
||||||
|
An incompressible Casson non-Newtonian viscosity model.
|
||||||
|
|
||||||
|
References:
|
||||||
|
\verbatim
|
||||||
|
Casson, N. (1959).
|
||||||
|
Rheology of disperse systems.
|
||||||
|
In Proceedings of a Conference Organized by the
|
||||||
|
British Society of Rheology.
|
||||||
|
Pergamon Press, New York.
|
||||||
|
|
||||||
|
Fournier, R. L. (2011).
|
||||||
|
Basic transport phenomena in biomedical engineering.
|
||||||
|
CRC Press.
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
Casson.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef Casson_H
|
||||||
|
#define Casson_H
|
||||||
|
|
||||||
|
#include "viscosityModel.H"
|
||||||
|
#include "dimensionedScalar.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace viscosityModels
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class Casson Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class Casson
|
||||||
|
:
|
||||||
|
public viscosityModel
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
dictionary CassonCoeffs_;
|
||||||
|
|
||||||
|
dimensionedScalar m_;
|
||||||
|
dimensionedScalar tau0_;
|
||||||
|
dimensionedScalar nuMin_;
|
||||||
|
dimensionedScalar nuMax_;
|
||||||
|
|
||||||
|
volScalarField nu_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Calculate and return the laminar viscosity
|
||||||
|
tmp<volScalarField> calcNu() const;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("Casson");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
Casson
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const dictionary& viscosityProperties,
|
||||||
|
const volVectorField& U,
|
||||||
|
const surfaceScalarField& phi
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~Casson()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return the laminar viscosity
|
||||||
|
virtual tmp<volScalarField> nu() const
|
||||||
|
{
|
||||||
|
return nu_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return the laminar viscosity for patch
|
||||||
|
virtual tmp<scalarField> nu(const label patchi) const
|
||||||
|
{
|
||||||
|
return nu_.boundaryField()[patchi];
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Correct the laminar viscosity
|
||||||
|
virtual void correct()
|
||||||
|
{
|
||||||
|
nu_ = calcNu();
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Read transportProperties dictionary
|
||||||
|
virtual bool read(const dictionary& viscosityProperties);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace viscosityModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user