
[Sponsors] 
September 25, 2008, 10:37 
Hello,
I compared nonNewton

#1 
Member
florian
Join Date: Mar 2009
Location: Mannheim  Vincennes  Valenciennes, Deutchland  France
Posts: 34
Rep Power: 10 
Hello,
I compared nonNewtonian results. The pressure is not the same with 1.4.1 and with 1.5 version of OpenFoam. When I take n=1 => newtonian flow the results are the same. It due to the strainRate calculation. First I had these lines in BirdCarreau in the fonction calcNu() Info << "max(strainRate): " << max(strainRate()).value() << " min(strainRate): " << min(strainRate()).value() << endl; During the caluclation OpenFoam prints line like this one. max(strainRate): 2027.15 min(strainRate): 1.46869 when I calculate : max(strainRate)1.4.1/max(strainRate)1.5=1,414.. min(strainRate)1.4.1/min(strainRate)1.5=1,414.. And sqrt(2)=1,4142 I searched where is the definition of strainRate. I found it in viscosityModel.C in OpenFoam 1.4.1 return mag(fvc::grad(U_)); in OpenFoam 1.5 return mag(symm(fvc::grad(U_))); This is not the same Can someone help me ? Florian 

October 9, 2008, 05:03 
Hi,
I am a beginner. I hav

#2 
New Member
zhiwei liu
Join Date: Mar 2009
Posts: 22
Rep Power: 10 
Hi,
I am a beginner. I have some quesitons with Cross PowerLaw,I want to check the problem, But I do not know how to print strainRate(mag(fvc::grad(U_))),can you tell me ? Thanks! 

October 10, 2008, 09:02 
if you add
Info
<< "max(

#3 
Member
florian
Join Date: Mar 2009
Location: Mannheim  Vincennes  Valenciennes, Deutchland  France
Posts: 34
Rep Power: 10 
if you add
Info << "max(strainRate): " << max(strainRate()).value() << " min(strainRate): " << min(strainRate()).value() << endl; in the powerlow.C file it will print the max and min value of the strainRate. 

November 18, 2008, 04:46 
Hello;
I am also trying to

#4 
New Member
Bercan Siyahhan
Join Date: Mar 2009
Posts: 1
Rep Power: 0 
Hello;
I am also trying to use a nonNewtonian model, and I was also looking at the definition of strain rate, and my question is what U_ stands for? Thanks. 

November 19, 2008, 04:22 
In Viscosities Model all const

#5 
Member
florian
Join Date: Mar 2009
Location: Mannheim  Vincennes  Valenciennes, Deutchland  France
Posts: 34
Rep Power: 10 
In Viscosities Model all constants are imported with a "_"
if you look in the "Member Functions" part of a viscosity model k_(powerLawCoeffs_.lookup("k")), n_(powerLawCoeffs_.lookup("n")), nuMin_(powerLawCoeffs_.lookup("nuMin")), nuMax_(powerLawCoeffs_.lookup("nuMax")), I think U_=U 

November 19, 2008, 05:40 
Hi Florian,
Indeed the defi

#6 
New Member
Kerstin Heinen
Join Date: Mar 2009
Location: Ludwigshafen, Germany
Posts: 27
Rep Power: 10 
Hi Florian,
Indeed the definition of strain rate is not the same. The more general definiton used for strain rate in rheology books fpr 3D flows is strain rate = sqrt( 2* (D:D) ) And D = 1/2 * (grad(U) + grad(U).T) This "D" is the deformation gradient tensor (the symmetric part of the velocity gradient tensor). The velocity gradient Tensor L= grad(U).T can be decomposed in a symmetric part and unsymmetric part. And the unsymmetric part is called rotation velocity tensor. The unsymmetric part doesn't contribute to fluid volume deformation. This is the reason why D is usually preferred. You can calculate both definitons and if I didn't make something wrong now after one page of tensor calculations, I get the following (with the definition of mag(T) according ProgrammersGuide) [ mag(symm(grad(U)))]^2 = [ mag(grad(U))] ^2 + 2* dUy/dx*dUx/dy + 2* dUz/dx*dUx/dz + 2* dUz/dy*dUy/dz Ux, Uy and Uz are the components of velocity vector in each direction... So indeed this is different. So I would prefer the definition I have given above because this is the widest spread in rheology books. But I didn't look up what Fluent or CFX use so far...but who cares what Ansys does? ;) And a rheologist would say, that calculation of a scalar strain rate for a 3D complex flow and using a model fitted to a measurement in simple shear flow is dangerous...but I think it's the best choice available... Kerstin 

November 19, 2008, 06:26 
I started working with OpenFoa

#7 
Senior Member
ehsan
Join Date: Mar 2009
Posts: 109
Rep Power: 10 
I started working with OpenFoam. Doing so, a question arose for me, as I write here:
For compressible rarefied flow, it is suggested to use rhocentralFoam routine. I like to know whether it can solve very low Mach flow? I see the examples of this routine are mostly high Mach number flows. Does it an all speed flow solver? Sincerely, Ehsan 

November 20, 2008, 05:00 
Kerstin => Thanks
ehsan =>

#8 
Member
florian
Join Date: Mar 2009
Location: Mannheim  Vincennes  Valenciennes, Deutchland  France
Posts: 34
Rep Power: 10 
Kerstin => Thanks
ehsan => I advise you to post your question in a new topic. Or to use the search Utility and post your question in a topic which is about rhocentralFoam. The subject of this topic is "StrainRate definition 1.4.1 vs 1.5" Florian 

November 20, 2008, 10:09 
My mistake.
The common defi

#9 
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 14 
My mistake.
The common definition for shear rate in fluid mechanics is indeed: sr = sqrt(0.5 * D:D), where D = grad(U) + grad(U).T() In OpenFOAM, skew(T) = 0.5*(T + T^t) and mag(T) = sqrt(T:T), so sr = sqrt(0.5 * 4* skew(U):skew(U)) sr = sqrt(2) * mag(skew(U)) The current implementation is incorrect. I will submit a bug report. Thanks for catching it! 

November 20, 2008, 12:14 
skew(T) = 0.5*(T  T^t)
symm(

#10 
Member
florian
Join Date: Mar 2009
Location: Mannheim  Vincennes  Valenciennes, Deutchland  France
Posts: 34
Rep Power: 10 
skew(T) = 0.5*(T  T^t)
symm(T) = 0.5*(T + T^t) with T = grad(U) I think the good definition is : sr = sqrt(2) * mag(symm(fvc::grad(U))) Florian 

December 6, 2010, 09:08 
glopal change in shear rate for 1.7.x

#11 
Member
Jon Elvar Wallevik
Join Date: Nov 2010
Location: Reykjavik, ICELAND
Posts: 83
Rep Power: 12 
Hello there
Just an additional comment to the above I am using OF 1.7.x and I have made a "glopal" change to the shear rate. What I did is as follows: (of course replace my username with yours in path, if you want to repeat) cd /home/jonelvar/OpenFOAM/OpenFOAM1.7.x/src/transportModels/incompressible/viscosityModels/viscosityModel gedit viscosityModel.C Change... return mag(symm(fvc::grad(U_))); ...to... return sqrt(2.0)*mag(symm(fvc::grad(U_))); cd /home/jonelvar/OpenFOAM/OpenFOAM1.7.x/src/transportModels/incompressible/ wmake libso Hope this is of help 

August 16, 2014, 18:19 

#12 
Senior Member
Join Date: Jan 2013
Posts: 314
Rep Power: 7 
Dear Eugene,
In OpenFOAM, how to calculate the principal compressive strain rate? I would like to extract this quantity but did not find it in the OpenFOAM classes? Thank you very much if you can give me some hints. OFFO 

August 18, 2014, 01:40 

#13 
Member
Jon Elvar Wallevik
Join Date: Nov 2010
Location: Reykjavik, ICELAND
Posts: 83
Rep Power: 12 
Dear OFFO
I recently published a paper in which I derivatived the above equation for shear rate (see Section 3.1). It applies for incompressible material only. As I understand from your post, you want to do the same for compressible material? If so, you could follow the steps done in this paper and see where it gets you. You might have to implement it your self into OpenFOAM. the paper is... JE Wallevik, Effect of the hydrodynamic pressure on shaft torque for a 4blades vane rheometer, International Journal of Heat and Fluid Flow, 2014 Cheers J. 

November 16, 2015, 11:20 

#14  
Member
Christa
Join Date: Apr 2011
Posts: 50
Rep Power: 8 
Quote:
On a related note, how stable would a solution be if I used an integral in the viscosity equation? i.e. if I just wanted to set he shear strain equal to the integral of shear rate in dt? 

November 16, 2015, 14:04 

#15 
Member
Jon Elvar Wallevik
Join Date: Nov 2010
Location: Reykjavik, ICELAND
Posts: 83
Rep Power: 12 
hello christa
This is possible, just use the correct solver (i.e. a nonNewtonian solver) as a template when programming your new OF solver. Regarding your integration thingi, I have done this and published in Wallevik, J.E., Thixotropic investigation on cement paste: Experimental and numerical approach. J. NonNewtonian Fluid Mech. 132 (2005) 8699. At least in my case, integration did not pose any stability problems. But you have to be careful about memory footprint which can be huge. In my phd (in the old days), I did overcome this and wrote about it in my thesis, see p.171, download: http://ntnu.divaportal.org/smash/re...=1&dswid=1320 A Fortran code is available in http://www.vvpf.net/download.html (note, download version 1.0) Please note that I am following British Standard BS 5168:1975 "Glossary of rheological terms", so I use the term "shear rate" and not "shear strain" or "strain rate", see more about this issue in... Wallevik, J.E. (2014), Effect of the hydrodynamic pressure on shaft torque for a 4blades vane rheometer, International Journal of Heat and Fluid Flow, DOI: 10.1016/j.ijheatfluidflow.2014.06.001. http://www.sciencedirect.com/science...42727X14000812 cheers J. 

November 17, 2015, 09:22 

#16  
Member
Christa
Join Date: Apr 2011
Posts: 50
Rep Power: 8 
Quote:
Thanks for your reply. I had a look through your excellent thesis, but I think there is a confusion about what I am after (which is the story of all my searches so far). What I am looking for is not the shear rate (let me call this gamma dot), but the shear strain, which I'll call gamma. From the paper I have been looking at (I am trying to replicate the work of another paper using OF) I understand gamma to be the integral of gamma dot in time (essentially it's a fluid version of deformation, delatl/L, and is unitless), which is why I asked if I can create a viscosity model in OF where I can use the existing shear rate (sr()) and integrate in time to calculate the gamma value I am after. Or maybe the strain is calculated by OF already, in which case I would be grateful if someone could point me to the file where this calculation happens, as I cannot find it. I hope this is clearer now? 

November 17, 2015, 11:01 

#17 
Member
Jon Elvar Wallevik
Join Date: Nov 2010
Location: Reykjavik, ICELAND
Posts: 83
Rep Power: 12 
Hi there again,
I see what you mean. I am pretty sure that this is not in OF. You have to program it your self I just send you the paper you asked, and it might be a use after all, for your problem. If you look at Eq. (8) in the paper (see also eq 9.3 p. 210 in the phd thesis), you have a Gamma which I am using. What I am working on is fading memory. But you could let it have full memory (alpha = 1) and put I = shear rate (i.e. dotgamma) and you would be calculating deformation. In the FORTRAN source code this is named Gamma (in viscous.f90). Anyway, if you do use this approach, memory (as in RAM) can be a problem very quickly, but the integration trick in my phd thesis I mentioned above can solve this. J. 

November 17, 2015, 13:08 

#18 
Member
Christa
Join Date: Apr 2011
Posts: 50
Rep Power: 8 
Again thanks a lot. I had not reached that part with the fading memory.
I saw the trick with the exponentials that you used though, looks quite clever. I was thinking something a lot simpler (and probably not as accurate), like storing the deformation value of t' and then adding the newly calculated deformation to it. Something along the lines of: gamma(t) = gamma(t')+gamma_dot(t')*deltaT_ I can see however, that if I don't do this properly it can result in massive memory leaks. However, you really have set me in the right direction with respect to the rheological model. Now to implement it all in C++ ... Many thanks again! 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
sub function CEL definition  harry  CFX  1  March 15, 2009 22:08 
what is GGI definition in CFX?  NITIN DEWANGAN  CFX  1  August 7, 2008 22:48 
Mesh definition  Ogbeni  CFX  0  November 22, 2005 18:49 
b.c. definition  john  FLUENT  0  June 5, 2004 10:00 
definition of u* for y+<10  Robert Spall  FLUENT  0  May 29, 2003 11:40 