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 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  typedef typename BasicMomentumTransportModel::transportModel transportModel;
138 
139 
140  //- Runtime type information
141  TypeName("lambdaThixotropic");
142 
143 
144  // Constructors
145 
146  //- Construct from components
148  (
149  const alphaField& alpha,
150  const rhoField& rho,
151  const volVectorField& U,
152  const surfaceScalarField& alphaRhoPhi,
153  const surfaceScalarField& phi,
154  const transportModel& transport
155  );
156 
157 
158  //- Destructor
159  virtual ~lambdaThixotropic()
160  {}
161 
162 
163  // Member Functions
164 
165  //- Read momentumTransport dictionary
166  virtual bool read();
168  //- Return the effective viscosity
169  // i.e. the lambdaThixotropic viscosity
170  virtual tmp<volScalarField> nuEff() const;
171 
172  //- Return the effective viscosity on patch
173  virtual tmp<scalarField> nuEff(const label patchi) const;
174 
175  //- Correct the lambdaThixotropic viscosity
176  virtual void correct();
177 };
178 
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 } // End namespace laminarModels
183 } // End namespace Foam
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #ifdef NoRepository
188  #include "lambdaThixotropic.C"
189 #endif
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #endif
194 
195 // ************************************************************************* //
virtual void correct()
Correct the lambdaThixotropic viscosity.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
BasicMomentumTransportModel::alphaField alphaField
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
lambdaThixotropic(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport)
Construct from components.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
TypeName("lambdaThixotropic")
Runtime type information.
phi
Definition: correctPhi.H:3
BasicMomentumTransportModel::transportModel transportModel
label patchi
U
Definition: pEqn.H:72
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
Namespace for OpenFOAM.