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-2023 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  //- Switch for optional Bingham plastic handling
116  // Set by the presence of the sigmay entry
117  bool BinghamPlastic_;
118 
119  //- Optional Bingham plastic yield stress [m^2/s^2]
120  dimensionedScalar sigmay_;
121 
122  //- Structural parameter
123  // 0 = freestream value (most liquid)
124  // 1 = fully built (most solid)
125  volScalarField lambda_;
126 
127  //- The non-Newtonian viscosity field
128  volScalarField nu_;
129 
130 
131  // Private Member Functions
132 
133  //- Calculates and returns the viscosity from the current lambda
134  tmp<volScalarField> calcNu
135  (
136  const volScalarField& strainRate
137  ) const;
138 
139  //- Returns the current strain rate from the velocity field
140  tmp<volScalarField> strainRate() const;
141 
142 
143 public:
144 
145  typedef typename BasicMomentumTransportModel::alphaField alphaField;
146  typedef typename BasicMomentumTransportModel::rhoField rhoField;
147 
148 
149  //- Runtime type information
150  TypeName("lambdaThixotropic");
151 
152 
153  // Constructors
154 
155  //- Construct from components
157  (
158  const alphaField& alpha,
159  const rhoField& rho,
160  const volVectorField& U,
161  const surfaceScalarField& alphaRhoPhi,
162  const surfaceScalarField& phi,
163  const viscosity& viscosity
164  );
165 
166 
167  //- Destructor
168  virtual ~lambdaThixotropic()
169  {}
170 
171 
172  // Member Functions
173 
174  //- Read momentumTransport dictionary
175  virtual bool read();
176 
177  //- Return the effective viscosity
178  // i.e. the lambdaThixotropic viscosity
179  virtual tmp<volScalarField> nuEff() const;
180 
181  //- Return the effective viscosity on patch
182  virtual tmp<scalarField> nuEff(const label patchi) const;
183 
184  //- The lambdaThixotropic viscosity is not predicted
185  virtual void predict()
186  {}
187 
188  //- Correct the lambdaThixotropic viscosity
189  virtual void correct();
190 };
191 
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 } // End namespace laminarModels
196 } // End namespace Foam
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 #ifdef NoRepository
201  #include "lambdaThixotropic.C"
202 #endif
203 
204 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205 
206 #endif
207 
208 // ************************************************************************* //
Generic GeometricField class.
BasicMomentumTransportModel::alphaField alphaField
virtual void correct()
Correct the lambdaThixotropic viscosity.
virtual void predict()
The lambdaThixotropic viscosity is not predicted.
TypeName("lambdaThixotropic")
Runtime type information.
virtual tmp< volScalarField > nuEff() const
Return the effective viscosity.
lambdaThixotropic(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct from components.
virtual bool read()
Read momentumTransport dictionary.
BasicMomentumTransportModel::rhoField rhoField
A class for managing temporary objects.
Definition: tmp.H:55
Abstract base class for all fluid physical properties.
Definition: viscosity.H:50
label patchi
U
Definition: pEqn.H:72
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Namespace for OpenFOAM.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
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