lambdaThixotropic.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::laminarModels::lambdaThixotropic
26 
27 Description
28  Thixotropic viscosity momentum transport model based on the evolution of
29  the structural parameter \f$ \lambda \f$:
30 
31  \f[
32  \frac{D\lambda}{Dt} = a(1 - \lambda)^b - c \lambda \dot{\gamma}^d
33  \f]
34 
35  The viscosity is then calculated using the expression
36 
37  \f[
38  \nu = \frac{\nu_{\infty}}{{1 - K \lambda}^2}
39  \f]
40 
41  Where the parameter K is given by:
42 
43  \f[
44  K = 1 - \sqrt{\frac{\nu_{\infty}}{\nu_{0}}}
45  \f]
46 
47  Here:
48  \vartable
49  \lambda | structural parameter
50  a | model coefficient
51  b | model coefficient
52  c | model coefficient
53  d | model coefficient
54  \dot{\gamma} | stress rate [1/s]
55  \nu_{0} | limiting viscosity when \f$ \lambda = 1 \f$
56  \nu_{\infty} | limiting viscosity when \f$ \lambda = 0 \f$
57  \endvartable
58 
59  Reference:
60  \verbatim
61  Barnes H A, 1997. Thixotropy - a review. J. Non-Newtonian Fluid
62  Mech 70, pp 1-33
63  \endverbatim
64 
65 SourceFiles
66  lambdaThixotropic.C
67 
68 \*---------------------------------------------------------------------------*/
69 
70 #ifndef lambdaThixotropic_H
71 #define lambdaThixotropic_H
72 
73 #include "laminarModel.H"
74 #include "linearViscousStress.H"
75 
76 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77 
78 namespace Foam
79 {
80 namespace laminarModels
81 {
82 
83 /*---------------------------------------------------------------------------*\
84  Class lambdaThixotropic Declaration
85 \*---------------------------------------------------------------------------*/
86 
87 template<class BasicMomentumTransportModel>
88 class lambdaThixotropic
89 :
90  public linearViscousStress<laminarModel<BasicMomentumTransportModel>>
91 {
92  // Private data
93 
94  //- Model a coefficient
96 
97  //- Model b coefficient
99 
100  //- Model d coefficient
102 
103  //- Model c coefficient (read after d since dims depend on d value)
105 
106  //- Limiting viscosity when lambda = 1
107  dimensionedScalar nu0_;
108 
109  //- Limiting viscosity when lambda = 0
110  dimensionedScalar nuInf_;
111 
112  //- Model coefficient
114 
115  //- Structural parameter
116  // 0 = freestream value (most liquid)
117  // 1 = fully built (most solid)
118  volScalarField lambda_;
120  //- The non-Newtonian viscosity field
121  volScalarField nu_;
122 
123 
124  // Private Member Functions
125 
126  //- Calculates and returns the viscosity from the current lambda
127  tmp<volScalarField> calcNu() const;
128 
129  //- Returns the current strain rate from the velocity field
130  tmp<volScalarField::Internal> strainRate() const;
131 
132 
133 public:
134 
135  typedef typename BasicMomentumTransportModel::alphaField alphaField;
136  typedef typename BasicMomentumTransportModel::rhoField rhoField;
137 
138 
139  //- Runtime type information
140  TypeName("lambdaThixotropic");
141 
142 
143  // Constructors
144 
145  //- Construct from components
147  (
148  const alphaField& alpha,
149  const rhoField& rho,
150  const volVectorField& U,
151  const surfaceScalarField& alphaRhoPhi,
152  const surfaceScalarField& phi,
153  const viscosity& viscosity
154  );
155 
156 
157  //- Destructor
158  virtual ~lambdaThixotropic()
159  {}
160 
161 
162  // Member Functions
163 
164  //- Read momentumTransport dictionary
165  virtual bool read();
167  //- Return the effective viscosity
168  // i.e. the lambdaThixotropic viscosity
169  virtual tmp<volScalarField> nuEff() const;
170 
171  //- Return the effective viscosity on patch
172  virtual tmp<scalarField> nuEff(const label patchi) const;
173 
174  //- Correct the lambdaThixotropic viscosity
175  virtual void correct();
176 };
177 
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 } // End namespace laminarModels
182 } // End namespace Foam
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 #ifdef NoRepository
187  #include "lambdaThixotropic.C"
188 #endif
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 #endif
193 
194 // ************************************************************************* //
virtual void correct()
Correct the lambdaThixotropic viscosity.
U
Definition: pEqn.H:72
BasicMomentumTransportModel::alphaField alphaField
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:58
TypeName("lambdaThixotropic")
Runtime type information.
phi
Definition: correctPhi.H:3
Abstract base class for all fluid physical properties.
Definition: viscosity.H:49
label patchi
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual bool read()
Read momentumTransport dictionary.
A class for managing temporary objects.
Definition: PtrList.H:53
virtual tmp< volScalarField > nuEff() const
Return the effective viscosity.
BasicMomentumTransportModel::rhoField rhoField
lambdaThixotropic(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct from components.
Namespace for OpenFOAM.