CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   viscoelastic fluid abbreviations (http://www.cfd-online.com/Forums/openfoam/107685-viscoelastic-fluid-abbreviations.html)

Tushar@cfd October 4, 2012 02:43

viscoelastic fluid abbreviations
 
Hello Everybody,

I am stuck with the terms:

"// Twice the rate of deformation tensor
volSymmTensorField twoD = twoSymm(L);

// Stress transport equation
fvSymmTensorMatrix tauEqn
(
fvm::ddt(tau_)
+ fvm::div(phi(), tau_)
==
etaP_/lambda_*twoD
+ twoSymm(C)
- fvm::Sp(1/lambda_, tau_)
);

- I do know the term, it is: rate of deformation of stress and is expressed as: 1/2 * (grad(U) + grad(U).T).

-Does any one know from where, I will get the OpenFOAM coding of this term "twoSymm(L)" in of OF directory?

-I want to see the code definition of it and from which file it is compiled in the OF.

----
Thanks in Advance.

JonW October 4, 2012 07:21

general viscoelastic material model - OpenFOAM-1.6-ext
 
dear Tushar Chourushi, it appears that you want to do a general viscoleastic simulation. This is a very difficult subject, both theoretically as well as numerically and there are lot of instability issues surrounding it. My recommendation is use rather OpenFOAM-1.6-ext. There is a general viscoelastic solver there.
It is more difficult to install the OF-ext version relative to the standard OF version, so my second recommendation is use ubuntu 12.04. I just recently installed it on one of mine Ubuntu server 12.04.1 (64bit) machines without problems. My third recommendation is, use lot of time to prepare, both for the installation of OF-ext as well in learning on the viscoelastic solver. Just jumping into this and expecting things to go you way is most certainly a killer. Be patient in your difficult work ahead.
good luck,
Jon

Tushar@cfd October 4, 2012 07:33

Dear Jon
 
Thanks for your suggestion, I have already installed the viscoelasticFoam on my machine. I wanted to see how the equations are written in openFOAM as compared to the constitutive equation for different models?
That too.. I was having problem with the term which I have mentioned in my earlier thread, as I was not able to co-relate it with the theory.

Anyways, Thanks for your help.

---
Regards,
Tushar

JonW October 4, 2012 08:27

about twoSymm(L)
 
hi again,
I dont think there is any twoSymm(L) used in the code. But if you look at the

~/OpenFOAM/OpenFOAM-2.1.x/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModel.C
there is a component,...
sqrt(2.0)*mag(symm(fvc::grad(U_)));
..., which calculates the shear rate.
thus the rate of deformation tensor 1/2 * (grad(U) + grad(U).T) is "symm(fvc::grad(U_))"
The mag(symm(fvc::grad(U_))); would be its double dot, square root.

Any you can see a bit by searching for "shear rate"
J.

Tushar@cfd January 4, 2013 23:41

Thanks Jon,

Actually I wasn't talking about the available code with OpenFOAM, I was looking at the extended source code of OpenFOAM. There I found that variable, anyways thanks for your help.
I got the answer while exploring the forum.

desert_1250 February 25, 2014 02:30

shear rate
 
Hi foamers
How can i extract shear rate from my results using viscoelasticFluidFoam?
tnx

JonW February 25, 2014 19:38

shear rate
 
Quote:

Originally Posted by desert_1250 (Post 476612)
Hi foamers
How can i extract shear rate from my results using viscoelasticFluidFoam?
tnx

Hi there, I am not sure what you are looking for here. But if you want to write the shear rate down for each time step, then:

(1) in "createFields.H" add the following:
------------------------------------------------
volScalarField shearRate
(
IOobject
(
"shearRate",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("shearRate", dimensionSet(0,0,-1,0,0,0,0), scalar(0.0))
);
------------------------------------------------



(2) in viscoelasticFluidFoam.C

before "runTime.write();" add the following
------------------------------------------------
dimensionedScalar sqrtOfTwo("sqrtOfTwo", dimless, 1.4142135623730950488);
shearRate = sqrtOfTwo*mag(symm(fvc::grad(U)));
------------------------------------------------

The runTime.write(); thingi will write the shear rate automatically.


One note, now I am assuming that you accept that the shear rate is "sqrtOfTwo*mag(symm(fvc::grad(U)));"
It is so for incompressible fluid that comply to the Generalized Newtonian Model (GNM), e.g. Bingham viscoplastic model, power law fluid or Newtonian fluid. But viscoelasticity is not GNM. If you are in trouble, then you can just call this
"Magnitude of the rate-of-strain tensor" like I did in
Wallevik, J.E., Minimizing end-effects in the coaxial cylinders viscometer: Viscoplastic flow inside the ConTec BML Viscometer 3. J. Non-Newtonian Fluid Mech. 155 (2008) 116-123.

Hope this helps
cheers
Jon

desert_1250 February 26, 2014 00:59

Quote:

Originally Posted by JonW (Post 476801)
Hi there, I am not sure what you are looking for here. But if you want to write the shear rate down for each time step, then:

(1) in "createFields.H" add the following:
------------------------------------------------
volScalarField shearRate
(
IOobject
(
"shearRate",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("shearRate", dimensionSet(0,0,-1,0,0,0,0), scalar(0.0))
);
------------------------------------------------



(2) in viscoelasticFluidFoam.C

before "runTime.write();" add the following
------------------------------------------------
dimensionedScalar sqrtOfTwo("sqrtOfTwo", dimless, 1.4142135623730950488);
shearRate = sqrtOfTwo*mag(symm(fvc::grad(U)));
------------------------------------------------

The runTime.write(); thingi will write the shear rate automatically.


One note, now I am assuming that you accept that the shear rate is "sqrtOfTwo*mag(symm(fvc::grad(U)));"
It is so for incompressible fluid that comply to the Generalized Newtonian Model (GNM), e.g. Bingham viscoplastic model, power law fluid or Newtonian fluid. But viscoelasticity is not GNM. If you are in trouble, then you can just call this
"Magnitude of the rate-of-strain tensor" like I did in
Wallevik, J.E., Minimizing end-effects in the coaxial cylinders viscometer: Viscoplastic flow inside the ConTec BML Viscometer 3. J. Non-Newtonian Fluid Mech. 155 (2008) 116-123.

Hope this helps
cheers
Jon


Dear Jan,
I exerted and compiled the code succesefully, now i have shear rate at every time writing.

thankful for your quick and valuable reply.
Kind Regards/ Rasoul


All times are GMT -4. The time now is 10:28.