Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Viscoelasticity and constitutive relations
Amith Balasubramanya
January 22, 2016
Amith balasubramanya Viscoelasticity January 22, 2016 1 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Presentation Outline
Introduction to viscoelasticity
Governing Equations
Constitutive Relations
High We problem and stability
viscoelasticFluidFoam
viscoelasticLaws
Case-Setup
Amith balasubramanya Viscoelasticity January 22, 2016 2 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Introduction
Materials that exhibit gradual deformation and recovery whensubjected to loading and unloading.
The response of such materials is dependent upon how quickly theload is applied or removed, the extent of deformation being dependentupon the rate at which the deformation-causing loads are applied.This time-dependent material behavior is called viscoelasticity.
viscoelasticity can be explained by a set of springs and dashpot asshown in the figure
Amith balasubramanya Viscoelasticity January 22, 2016 3 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Governing Equations
The continuity equation is given as:
∇.u = 0
The momentum equation is given as:
∂ρu
∂t+∇.(ρuu) = −∇p+∇τ
Stress tensor is split up as:
τ = τs + τp
Where τs is the solvent vicosity and τp is the polymeric part of we can callit newtonian and non-newtonian components
Amith balasubramanya Viscoelasticity January 22, 2016 4 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
τs = 2ηpkD
where;
D =1
2(∇u+∇uT )
τp is calculated from the solution of an appropriate constitutive equation
Amith balasubramanya Viscoelasticity January 22, 2016 5 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Some important relations to know
Upper Convected Derivative is given as:
Oτpk =
DτpkDt
− [∇u.τpk]− [∇u.τpk]T
whereDτpkDt is the material derivative of the extra stress tensor defined as:
DτpkDt
=∂τpk∂t
+ u · ∇τpk
The Gordon-Schowalter derivative of the polymer stress tensor are givenby:
�τpk =
DτpkDt
− [∇uT .τpk]− [τpk.∇u] + ηk(τpk.D +D.τpk)
Amith balasubramanya Viscoelasticity January 22, 2016 6 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Important Definitions to know are the following dimensionless numbers:
Weissenberg Number(We)
We = λ•γc
Deborah Number(De)De =
λtc
The figure represents exactly what causes the High We Problem:
Amith balasubramanya Viscoelasticity January 22, 2016 7 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
DEVSS
The momentum equation is written as:
∂u
∂t+∇.(ρuu)− (ηs + κ)∇.(∇u) = −∇p+∇.τp − κ∇.(∇u) (1)
Here κ is a positive number. Usually ηpk is chosen as κ. This is observedin all constitutive relations.
Amith balasubramanya Viscoelasticity January 22, 2016 8 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Constitutive Relations
Linear maxwell
τpk + λk∂τpk∂t
= 2ηpkD
Oldroyd-B
τpk + λkOτ = 2ηpkD
Both equations are derived from the Johnson-Segalman Equation.
Amith balasubramanya Viscoelasticity January 22, 2016 9 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Giesekus
τpk + λkOτ + αk
λkηpk
(τpk.τpk) = 2ηpkD
Leonov is a special case of Giesekus when αk =12 . the equation is
given as:
τpk + λkOτ +
1
2
λkηpk
(τpk.τpk) = 2ηpkD
Amith balasubramanya Viscoelasticity January 22, 2016 10 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
FENE-Finitely Extensible Non-Linear Elastic
FENE-P
(1 +
31−3/L2
k+ λk
ηpktr(τpk)
L2k
)τpk + λkOτpk = 2(
1
1− 3/L2k
)ηpkD
FENE-CR
(L2kλkηpktr(τpk)
L2k − 3
)τpk + λkOτpk = 2((
L2kλkηpktr(τpk)
L2k − 3
))ηpkD
Amith balasubramanya Viscoelasticity January 22, 2016 11 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
PTT- Phan Thein Tanner
LPTT
(1 +εpkτpkηpk
tr(τpk))τpk + λk�τpk = 2ηpkD
EPTTexp(
εpkτpkηpk
tr(τpk))τpk + λk�τpk = 2ηpkD
Amith balasubramanya Viscoelasticity January 22, 2016 12 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
POM-POM Models
τpk =ηpkλk
(3 ∧2pk Spk − δ)
OSpk + 2[D : Spk]Spk +
1
λk[Spk −
1
3δ]
D(∧pk)Dt
= ∧pk[D : Spk] +1
λsk[∧pk − 1];
The pom-pom model however has the following disadvantages: It tends topresent a discontinuous solution at high-shear rates, does not predict thesecond normal stress difference
Amith balasubramanya Viscoelasticity January 22, 2016 13 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
XPP-SE
Because of these disadvantages, new equations are developed as follows:Extended Pom-Pom Model-Single Equation(XPP-SE)
Oτpk + λ(τ)−1.τpk =
2ηpkD
λOBk
λ(τ)−1 =1
λOBk
[αkλOBk
ηpkτpk + f(τ)−1δ +
λOBk
ηpk(f(τ)−1)τ−1pk
Amith balasubramanya Viscoelasticity January 22, 2016 14 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
XPP-DE
Extended Pom-Pom Model-Double Equation(XPP-DE)
OSpk + 2[D : Spk]Spk+
1λOBk
∧2pk [3αk ∧4pk Spk.Spk+(1− αk − 3αk ∧4pk IS.S)Spk −
1−αk3 δ] = 0
D(∧pk)Dt
= ∧pk[D : Spk] +1
λsk[∧pk − 1];
OSpk + 2[D : Spk]Spk +
1
λk[Spk −
1
3δ]
Amith balasubramanya Viscoelasticity January 22, 2016 15 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
viscoelasticFluidFoam
The solvers can be accessed at :
cd $FOAM_SOLVERS\viscoelastic\viscoelasticFluidFoam
vi viscoelasticFLuidFoam.C
Transient solver for incompressible, laminar flow of viscoelastic fluids.
Amith balasubramanya Viscoelasticity January 22, 2016 16 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Algorithm
With the given initial fields of velocity u, stress τ and pressure p , theexplicit calculations of the pressure gradient and stress divergence arecarried out, and, subsequently, the momentum equation is solvedimplicitly for each component of the velocity vector, computing a newvelocity field estimate u∗.With the new velocity values u∗, the new pressure field p∗ isestimated and, subsequently, the correction of velocity is carried out,leading to a new velocity field u∗∗ which satisfies the continuityequation. In this step either SIMPLE or PISO algorithm can be usedto obtain p∗ and u∗∗, with the more accurate PISO being the bestoption for transient flows.With the corrected velocity field u∗∗ the new estimate τ∗ for the stresstensor field is calculated by solving the specified constitutive equation.Steps 1,2 and 3 may be repeated recursively within each time step inorder to generate more accurate solutions in transient flows. For this,u,p and τ are updated with u∗∗, p∗ and τ∗, respectively.
Amith balasubramanya Viscoelasticity January 22, 2016 17 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
viscoelasticFluidFoam.C
We begin from Line 66
// Pressure-velocity SIMPLE corrector loop
for (int corr = 0; corr < nCorr; corr++)
{
// Momentum predictor
tmp<fvVectorMatrix> UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- visco.divTau(U)
);
UEqn().relax();
Amith balasubramanya Viscoelasticity January 22, 2016 18 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
viscoelasticFluidFoam.C from Line 80
solve(UEqn() == -fvc::grad(p));
p.boundaryField().updateCoeffs();
volScalarField rUA = 1.0/UEqn().A();
U = rUA*UEqn().H();
UEqn.clear();
phi = fvc::interpolate(U) & mesh.Sf();
adjustPhi(phi, U, p);
// Store pressure fo runder-relaxation
p.storePrevIter();
Amith balasubramanya Viscoelasticity January 22, 2016 19 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
viscoelasticFluidFoam.C from Line 92
// Non-orthogonal pressure corrector loop
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::laplacian(rUA, p) == fvc::div(phi)
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
phi -= pEqn.flux();
}
}Amith balasubramanya Viscoelasticity January 22, 2016 20 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
viscoelasticFluidFoam.C from Line 111
// Explicitly relax pressure for momentum corrector
p.relax();
, // Momentum corrector
U -= rUA*fvc::grad(p);
U.correctBoundaryConditions();
visco.correct();
}
runTime.write();
Info<< "ExecutionTime = "
<< runTime.elapsedCpuTime()
<< " s\n\n" << endl;
Amith balasubramanya Viscoelasticity January 22, 2016 21 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Constitutive Relations OpenFOAM
The constitutive relations are located in:$FOAM_SRC/transportModels/viscoelastic/viscoelasticLaws
The following constitutive relations are found in OpenFOAM:
DCPP FENE-CR Feta-PTT Leonov Maxwell Oldroyd-B
viscoelasticLaw XPP_DE EPTT FENE-P Giesekus LPTT
multiMode S_MDCPP WhiteMetzner XPP_SE
Amith balasubramanya Viscoelasticity January 22, 2016 22 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Line 70 of Oldroyd.C
Foam::tmp<Foam::fvVectorMatrix>
Foam::Oldroyd_B::divTau(volVectorField& U) const
{
dimensionedScalar etaPEff = etaP_;
return
(
fvc::div(tau_/rho_, "div(tau)")
- fvc::laplacian(etaPEff/rho_, U, "laplacian(etaPEff,U)")
+ fvm::laplacian( (etaPEff + etaS_)/rho_, U, "laplacian(etaPEff+etaS,U)")
);
}
Amith balasubramanya Viscoelasticity January 22, 2016 23 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
The equation that is represented using this is:
∇. τpρ− ηp
ρ∇.(∇U) +
ηs + ηpρ∇.(∇U)
This value is calculated and used in viscoelasticFluidFoam.C
Amith balasubramanya Viscoelasticity January 22, 2016 24 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Line 84 of Oldroyd.C
void Foam::Oldroyd_B::correct()
{
// Velocity gradient tensor
volTensorField L = fvc::grad(U());
// Convected derivate term
volTensorField C = tau_ & L;
// Twice the rate of deformation tensor
volSymmTensorField twoD = twoSymm(L);
Amith balasubramanya Viscoelasticity January 22, 2016 25 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
These are represented as:
L = ∇uC = τpk.∇u
twoSymm(C) = C + CT = [τpk.∇u] + [τpk.∇u]T
Mathematical Operator OpenFOAM implementationDτpkDt fvm::ddt(tau_)+fvm::div(phi(),tau_)
2ηpkD etaP_/lambda_*twoD
[τ.∇U ] + [τ.∇U ]T twoSymm(c)1λkτpk fvm::Sp(1/lambda_,tau_)
Amith balasubramanya Viscoelasticity January 22, 2016 26 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Implementing your own constitutive relation
Let us implement the LCM model. The equation is given as:
τpk + λk4τpk = 2ηpkD
where,4τpk is the Lower Convected Derivate given by:
4τpk =
DτpkDt
+ [∇u.τpk] + [τpk.∇uT ]
Amith balasubramanya Viscoelasticity January 22, 2016 27 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Now, we need to copy Oldroyd-B and make a copy of it and create adirectory structure. This is done by:
cd $WM_PROJECT_DIR
cp -r --parents src/transportModels/viscoelastic/
viscoelasticLaws/Oldroyd_B $WM_PROJECT_USER_DIR
cd $WM_PROJECT_USER_DIR/src/transportModels/viscoelastic/
viscoelasticLaws
Now rename Oldroyd-B as LCM
mv Oldroyd_B LCM
Amith balasubramanya Viscoelasticity January 22, 2016 28 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
We need to create a Make directory in
cd $WM_PROJECT_USER_DIR/src/transportModels/viscoelastic/
Type mkdir Make
First, we create Make/files, add the following lines:
echo "viscoelasticLaws/LCM/LCM.C
LIB= \$(FOAM_USER_LIBBIN)/libmyviscoelasticModels"
> Make/files
Amith balasubramanya Viscoelasticity January 22, 2016 29 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
First, we create Make/options, add the following lines:
echo "EXE_INC = \\
-I\$(LIB_SRC)/finiteVolume/lnInclude \\
-I\$(LIB_SRC)/transportModels/viscoelastic/lnInclude
LIB_LIBS =" > Make/options
Now we need to rename the .C and .H files in our constitutiverelations
cd viscoelasticLaws/LCM
mv Oldroyd_B.C LCM.C
mv Oldroyd_B.H LCM.H
rm Oldroyd_B.dep
Amith balasubramanya Viscoelasticity January 22, 2016 30 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
In LCM.C and LCM.H, change all occurances of Oldroyd_Bto LCM sothat we have a new class name:
sed -i s/Oldroyd_B/LCM/g LCM.C
sed -i s/Oldroyd_B/LCM/g LCM.H
Now, we edit the .C file of the new constitutive relation according toequation . If we go to LCM.C, from line 96 to 104, replace theequation as follows:
fvSymmTensorMatrix tauEqn
(
fvm::ddt(tau_)
+ fvm::div(phi(), tau_)
==
etaP_/lambda_*twoD
- twoSymm(C)
- fvm::Sp(1/lambda_, tau_)
);
Amith balasubramanya Viscoelasticity January 22, 2016 31 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
In case of an unsteady simulation, DEVSS causes additional diffusion.So to remove the stabilizing scheme, we edit line 73 as:dimensionedScalar etaPEff = etaP_;
The final step is to compile
cd ..
cd ..
wmake libso
Amith balasubramanya Viscoelasticity January 22, 2016 32 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Setup
Copy the tutorial Oldroyd-B to your home directory. This is done by:
cp -r $FOAM_TUTORIALS/viscoelastic/viscoelasticFluidFoam/
Oldroyd_B $FOAM_RUN
cd $FOAM_RUN/Oldroyd B
Amith balasubramanya Viscoelasticity January 22, 2016 33 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
The Simulation is governed by some important definitions:
Re =2ρuhη0
Where,e is the Reynold’s Number, u is the averagevelocity at the downstream section, η0 = (ηs + ηp)
De =uh Where λ is the relaxation time
the parameters used in the simulation are: ηs = 0.0067, ηp = 0.0017,ρ = 1050 and = 0.008
Amith balasubramanya Viscoelasticity January 22, 2016 34 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Create the mesh using blockMesh
The geometry used is a 4:1 planar contraction which is the standardtest geometry for polymeric fluids. The diameter upstream is2H = 0.0254 m and downstream is 2h = 0.00064m.
Amith balasubramanya Viscoelasticity January 22, 2016 35 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Boundary Conditions
In the 0 directory, u has the following boundary conditions
boundaryField
{
inlet
{
type fixedValue;
value uniform (0.58 0 0);
}
fixedWalls
{
type fixedValue;
value uniform (0 0 0);
}
outlet
{
type zeroGradient;
}
}
Amith balasubramanya Viscoelasticity January 22, 2016 36 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
The boundary conditions for p and tau is the same as the tutorial.
N1 and N2 are the normal stress differences that are calculated usingthe stressDifferences utility. This is done after solving for alltime-steps.
Change the properties in the Constant\viscoelasticproperties
rheology
{
type Oldroyd-B;
rho rho [1 -3 0 0 0 0 0] 1050;
etaS etaS [1 -1 -1 0 0 0 0]0.0067;
etaP etaP [1 -1 -1 0 0 0 0]0.0017;
lambda lambda [0 0 1 0 0 0 0] 0.008;
}
Amith balasubramanya Viscoelasticity January 22, 2016 37 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Check the controldict file in the System directory
application viscoelasticFluidFoam;
startFrom startTime;
startTime 0.0;
stopAt endTime;
endTime 0.1;
deltaT 1e-3;
writeControl adjustableRunTime;
writeInterval 0.01;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
graphFormat raw;
runTimeModifiable yes;
adjustTimeStep on;
maxCo 0.5;
maxDeltaT 0.1;
Amith balasubramanya Viscoelasticity January 22, 2016 38 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Run the solver using viscoelasticFluidFoam >& log &
Calculate N1 and N2 using stressDiffrences
Calculate the components of shear stress usingstressSymmComponents
Amith balasubramanya Viscoelasticity January 22, 2016 39 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
2 4 6 80.000e+00 8.975e+00
U Magnitude
Velocity after 1 sec
Amith balasubramanya Viscoelasticity January 22, 2016 40 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
5e+4 1e+5 1.5e+5-1.593e-01 2.098e+05
tauxx
τxx after 1 sec
Amith balasubramanya Viscoelasticity January 22, 2016 41 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
-75000 -5e+4 -25000-1.038e+05 5.560e+02
tauxy
τxy after 1 sec
Amith balasubramanya Viscoelasticity January 22, 2016 42 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
2e+4 3e+4 4e+4 6e+4-1.785e-01 7.314e+04
tauyy
τyy after 1 sec
Amith balasubramanya Viscoelasticity January 22, 2016 43 / 44
Presentation Outline Introduction Governing Equations Constitutive Relations Implementing constitutive relation
Future Work
Simulate with geometries like Y-bifurcations, T-bifurcations, thosethat resemble arterial geometries.
Oldroyd-B though stable doesn’t take into account Shear-thinning. Ageneralized Oldroyd-Model(Anand) should be implemented inOpenFOAM
Once 2D geometries are successful, a 3D model should be simulated.
Introduce a clot and try simulating.
Amith balasubramanya Viscoelasticity January 22, 2016 44 / 44