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-2024 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  //- Residual alpha
123  // Used to stabilise the solution of the lambda equation
124  // where the phase-fraction is below this value
125  // Defaults to 1e-6
126  dimensionedScalar residualAlpha_;
127 
128  //- Structural parameter
129  // 0 = freestream value (most liquid)
130  // 1 = fully built (most solid)
131  volScalarField lambda_;
132 
133  //- The non-Newtonian viscosity field
134  volScalarField nu_;
135 
136 
137  // Private Member Functions
138 
139  //- Calculates and returns the viscosity from the current lambda
140  tmp<volScalarField> calcNu
141  (
142  const volScalarField& strainRate
143  ) const;
144 
145  //- Returns the current strain rate from the velocity field
146  tmp<volScalarField> strainRate() const;
147 
148 
149 public:
150 
151  typedef typename BasicMomentumTransportModel::alphaField alphaField;
152  typedef typename BasicMomentumTransportModel::rhoField rhoField;
153 
154 
155  //- Runtime type information
156  TypeName("lambdaThixotropic");
157 
158 
159  // Constructors
160 
161  //- Construct from components
163  (
164  const alphaField& alpha,
165  const rhoField& rho,
166  const volVectorField& U,
167  const surfaceScalarField& alphaRhoPhi,
168  const surfaceScalarField& phi,
169  const viscosity& viscosity
170  );
171 
172 
173  //- Destructor
174  virtual ~lambdaThixotropic()
175  {}
176 
177 
178  // Member Functions
179 
180  //- Read momentumTransport dictionary
181  virtual bool read();
182 
183  //- Return the effective viscosity
184  // i.e. the lambdaThixotropic viscosity
185  virtual tmp<volScalarField> nuEff() const;
186 
187  //- Return the effective viscosity on patch
188  virtual tmp<scalarField> nuEff(const label patchi) const;
189 
190  //- The lambdaThixotropic viscosity is not predicted
191  virtual void predict()
192  {}
193 
194  //- Correct the lambdaThixotropic viscosity
195  virtual void correct();
196 };
197 
198 
199 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200 
201 } // End namespace laminarModels
202 } // End namespace Foam
203 
204 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205 
206 #ifdef NoRepository
207  #include "lambdaThixotropic.C"
208 #endif
209 
210 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 
212 #endif
213 
214 // ************************************************************************* //
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.
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
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.