# Viscoelastic Fluid Flows using OpenFOAM The solver viscoelasticFluidFoam

 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 6, 2009, 05:42 #61 Member   Join Date: Jul 2009 Posts: 63 Rep Power: 9 ok jovani good luck we would wait i am training to calculate the gisekus with fluent to look if i would sty working with openfoam or to change to fluent bcz it is possible to put all viscoelastic behavor in UDFś in fluent cu and good luck

 November 27, 2009, 08:54 Stress on rigid boundaries #62 New Member   Christian Kröner Join Date: Nov 2009 Location: Bonn Posts: 7 Rep Power: 8 Hello Foamers, i have one question on the boundary conditions for the stress tensor. In the tutorial for Oldroyd-B the stress tensor is set to zero gradient on walls. Is that correct? In the article "A finite difference technique for simulating unsteady viscoelastic free surface flows" from Tome, et. all inJournal of Non-Newtonian Fluid Mechanics,106,2-3,61-106 from 2002 they use finite differences technique but they calculate the boundary values by introducing the change of variables S=e^(-1/We)t*S_tilde where S is the non-Newtonian contribution to the extra-stress tensor. For example for a rigid boundary parallel to the x-axis, they obtain: S_tilde_yy=0, S_tilde_xy(t+dt)=e^((-1/We)dt)*S_xy(t)+(1-lambda2/lambda1)du/dy(t*)*[1-e^((-1/We)dt)] S_tilde_xx(t+dt)=e^((-1/We)dt)*S_xx(t)+dt*[du/dy(t)*e^((-1/We)dt)*S_xy(t)+du/dy(t+dt)*S_xy(t+dt)] on the boundary where t* is something between t and t+dt. Any comments? christian

 November 27, 2009, 15:47 #63 Senior Member   Antonio Martins Join Date: Mar 2009 Location: Porto, Porto, Portugal Posts: 112 Rep Power: 9 Dear Christian, We sure have a point with your question. In reality, the zero gradient is physically incorrect at the wall, as it is there that the tension gradient is the largest. I am also trying to use the solver viscoelasticFluidFoam, and comparing its predictions with analytical solutions for simple systems, and I am having problems with them. Regards, António Martins

November 27, 2009, 16:04
Difficulties in using ViscoelasticFluidFoam
#64
Senior Member

Antonio Martins
Join Date: Mar 2009
Location: Porto, Porto, Portugal
Posts: 112
Rep Power: 9
Hi foamers,

Besides the question of the boundary conditions in the walls for the extra tension, which I think zero gradient are incorrect but may work in many cases, especially when the flow is steady state, I am having troubles with viscoelasticFluidFoam to model flow considering a zero solvent viscosity.

In particular, even for small De numbers the code blows. An example of a test case is included in this message.

Also, when I perform simulations considering the viscosity of the solvent, I do not observe a good agreement between the theoretical and analytical solutions of

Cruz D. O. A. and Pinho F. T. 2007. Fully-developed pipe and channel flows of multimode viscoelastic fluids. J. Non-Newt. Fluid Mech. 141, 85-98

Cruz D. O. A., Pinho F. T. and Oliveira P. J. 2005. Analytical solution for fully developed flow of some viscoelastic liquids with a Newtonian solvent contribution. J. Non-Newt. Fluid Mech.132, 28-35

I am doing more tests in the solver to check if my simulations did not had the time to converge, or if there is a problem in the data processing. However, it seems that I am doing everything right, the problem is with the solver.

I will keep everybody updated about this matter. I will also making some attempts to improve viscoelasticFluidFoam and to see what is going on.

Regards,

António Martins
Attached Files
 CaseStudy1.zip (6.2 KB, 81 views)

 November 27, 2009, 17:58 #65 Member   Join Date: Jul 2009 Posts: 63 Rep Power: 9 viscoelastic flow simlation is very hard and difficult the method was used form jovani is the DEVSS and this seems to be very good because there is a lot of benchmark in the literature, offcurse there would be problems in the BC and other things but it is not only for openFOAM a problem it is also for Fluent a big problem to solve viscoelastic very prices this problems are mathematicly nature and not only on openFOAM you can read there for guente et fortin and Armstron and so on see there for jovani his master theses but i think it would be very good if you do some graphs form the theorietical and numerical method so we can see that

 November 27, 2009, 22:36 Viscoelastic Fluid Flows using OpenFOAM The solver viscoelasticFluidFoam #66 Senior Member     ata kamyabi Join Date: Aug 2009 Location: Kerman Posts: 322 Rep Power: 10 Hello foamers May be it is not good question but I don't know if some analytical solution exist on some simple viscoelastic problems what kind of boundary condition they have? Why you don't use those boundary conditions? And What is DEVSS? I'll be glad if any one answers me. Best regards Ata

 November 28, 2009, 06:36 #67 Senior Member   Hrvoje Jasak Join Date: Mar 2009 Location: London, England Posts: 1,783 Rep Power: 22 There ARE test solutions and comparisons for this. Jovani has come from a lab that does a lot of experimental work, and he did a sufficient amount of validation for me (as a co-supervisor) to know that models behave correctly. We are now running 3 PhD projects in the lab to use up as much experemental data as possible. DEVSS is a solution method that couples the stress with the momentum equation, but that comment is actually wrong. Jovani and I came up with a special new compling trick (well, two-step) that works much better. It involves using the inverse of the velocity gradient tensor and coupling that acounts for relaxation effects. Both tricks make the solver mure robust and it will "eat DEVSS for breakfast" Please consult Jovani's Thesis and papers for details; I think you can find the basics in one of my presentations as well, where I am showing Jovani's work. Enjoy, Hrv __________________ Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk

 November 28, 2009, 10:30 Well poseness #68 Senior Member     ata kamyabi Join Date: Aug 2009 Location: Kerman Posts: 322 Rep Power: 10 Hi Antonio Is the problem well posed but numerical solutions are wrong? May be problem is ill posed. Is well posedness examined yet? Best regards Ata

November 28, 2009, 13:26
#69
Member

Join Date: Jul 2009
Posts: 63
Rep Power: 9
Quote:
 Originally Posted by hjasak There ARE test solutions and comparisons for this. Jovani has come from a lab that does a lot of experimental work, and he did a sufficient amount of validation for me (as a co-supervisor) to know that models behave correctly. We are now running 3 PhD projects in the lab to use up as much experemental data as possible. DEVSS is a solution method that couples the stress with the momentum equation, but that comment is actually wrong. Jovani and I came up with a special new compling trick (well, two-step) that works much better. It involves using the inverse of the velocity gradient tensor and coupling that acounts for relaxation effects. Both tricks make the solver mure robust and it will "eat DEVSS for breakfast" Please consult Jovani's Thesis and papers for details; I think you can find the basics in one of my presentations as well, where I am showing Jovani's work. Enjoy, Hrv

hello

http://www.lume.ufrgs.br/bitstream/h...pdf?sequence=1

page 46 there is the DEVSS presentaed and on the prasentation of jovani (it is a blue präesntation in egnlsich) there is on the page 18 (we used the DEVSS methodlogy....)

the first idea is to do a viscoelastic part and solvent viscosity (like rajagopalan and armstong 1990) and then more then this to the EVSS like Armstrong and then to the DEVSS like guente and fortin 1995 after that

there is an idea form Matallah 1998 to keep the velocity gradient save !!

and i look to the code of viscoelasticFluidFoam it is the same like DVESS and like MATALLAH to keep the velocity gradient in save !? could you plieace tell me if i am worng or if i oversight some thing????

December 3, 2009, 14:42
#70
Senior Member

Antonio Martins
Join Date: Mar 2009
Location: Porto, Porto, Portugal
Posts: 112
Rep Power: 9
Hi foamers,

Considering my previous posts, I continue to have problems in getting solutions with the code viscoelasticFluidFoam. I looks like the code is very sensitive to the physical parameters one inputs. I was running it with for a case with values of both viscosities, for a simple channel. I have uploaded the case study I am doing in this post, so anyone help me in identifying what I am possibly. In this particular situation, the time step gets to values in the order of 10^-9, and takes a gigantic amount of time. It is clearly not working well.

Also, concerning the comments of Tajoooko, if I also understood the code correctly, only the EVSS method is implemented in the released viscoelasticFluidFoam. I am using the OpenFoam 1.5 dev version of begginning of August. According to the information in subversion server, I am updated, as last chance was 4 months ago. In the server http://powerlab.fsb.hr the openFoam dev version is older. However, there is a slax version of 14 of Setember. Does it contain a newer version of viscoelasticFluidFoam?

Is there any new version of the solver, and if so, where I can get it?

Regards,

António Martins
Attached Files
 channelcase.zip (31.3 KB, 44 views)

 December 3, 2009, 19:49 #71 Member   Jovani L. Favero Join Date: Mar 2009 Location: Rio de Janeiro, RJ, Brazil Posts: 45 Rep Power: 10 First thank you Hrvoje!! EVSS is very different, once is needed a change on the constitutive equation (in my master thesis is very clear this point). And more, I tested the EVSS methodology too (I have an old solver with this implementation), but really what you have in hands today with viscoelasticFluidFoam is much higher. I think Hrvoje's answer is enough about coupling questions. About the boundary condition for stress on fixed walls, zeroGradient works well in OF (I used this in my simulations and results in my thesis). The suggestion by Christian is derived of approximations for constitutive model to take an analytical solution on the wall and I believe this work well too and also I think results from this is the same is obtained with zeroGradient (this in steady-state flow, anybody want test this?), but a point is that boundary condition is for unsteady flow and for compare results an appropriate simulation must be done to take well account the transient results. See viscoelasticFluidFoam post to transient results. About the last case by Antonio: I made some modifications on this case and then simulate this without problems, once this is not a difficult case compared with abrupt contraction geometries, tauxx need to have a parabolic profile, .... What modifications: In fvSolution: tolerance 1e-15; Why??? Is not needed nNonOrthogonalCorrectors, nCorrectors = 2 is enough and I used the commented linear solvers. Co=0.8, some improvements in the mesh!!! .... Results for a vertical cut plane in the middle of the geometry: tau: tau.jpg U: U.jpg Results for unsteady answer in the middle of the geometry: U: Ut.jpg tau: taut.jpg Of course these transient results was obtained using solution relaxation and as commented before .... , I use only to check the solution. Enjoy, Jovani

 December 4, 2009, 15:31 Question about simulation details of my test case #72 Senior Member   Antonio Martins Join Date: Mar 2009 Location: Porto, Porto, Portugal Posts: 112 Rep Power: 9 Jovani, Thanks for taking the time to solve the last case I upload. I compared the predictions of your solver with the analytical solution contained in the paper Cruz D. O. A., Pinho F. T. and Oliveira P. J. 2005. Analytical solution for fully developed flow of some viscoelastic liquids with a Newtonian solvent contribution. J. Non-Newt. Fluid Mech.132, 28-35 (pdf copy available at http://paginas.fe.up.pt/~ceft/publications_frame.html). and the agreement is quite good, confirming that your solver is good. In your message you stated that you ran the case with some changes, in particular what improvments you made in the mesh? Can you send me the mesh you used? Besides that, I have used the other linear solvers, to compare the results of your version with my version that was developed in OpenFoam 1.5, following some ideas put forward by Kristin Heinen in this Forum. Maybe that was the reason why your solver did not converge, but, as you said you changed the mesh, I am not completely sure. The very low convergence criteria used is to ensure convergence, according to the experience with my solver, and the nNonOrthogonalCorrectors are really not necessary. By the way, have tried to other case I uploaded, where I considered a null solvent viscosity. Did not worked also with your solver, and in this case I used the linear solvers that are used in the tutorial files. António Martins

 December 4, 2009, 18:50 #73 Member   Jovani L. Favero Join Date: Mar 2009 Location: Rio de Janeiro, RJ, Brazil Posts: 45 Rep Power: 10 António, Your etaS in last case is small and take it to be zero do not will give problems!! I think your convergences problems is the sum of various things in simulation case definition. Your refinement in the inlet is not necessary to take a developed profile along the channel. See the attached. I made it very fast and this can be improved more, but sincerely I think this is enough to be compared with analytical solutions. Another thing, your linear solvers must work good too, but not with that tolerance value!! channelcase.tar.gz Enjoy, Jovani

 December 9, 2009, 12:30 #74 Senior Member   Antonio Martins Join Date: Mar 2009 Location: Porto, Porto, Portugal Posts: 112 Rep Power: 9 Jovani, Thanks for your reply. Your results were O.K. They are helping me understand what it is wrong with my version of the solver. By the way, did you used paraview to get the graphics, or the sample utility. I am trying to use the later to no avail. António Martins

 December 14, 2009, 12:47 #75 Member   Jovani L. Favero Join Date: Mar 2009 Location: Rio de Janeiro, RJ, Brazil Posts: 45 Rep Power: 10 Hello António, Good!! I used paraview to cut plane results, but sample utility is better to good graphics for publication. For unsteady answer I used the probe utility. Best, Jovani

 February 5, 2010, 02:52 please help #76 Member   mohsen kh Join Date: Nov 2009 Posts: 41 Rep Power: 7 Hi jovani How are you? I am an amateur and I want to simulate viscoelastic fluids flow, But I am completely confused with OpenFOAM. And a lot of questions arise for me working with this software. Would you possibly answer some of my questions? 1.For implementing a new model (like LPPT) is it sufficient to write a new application in (OpenFOAM/applications) or it is necessary to modify OpenFOAM/src and/or lib and/or etc. 2.I have read a good file of you (a powerpoint file) about implementing viscoelastic models to the OpenFOAM but I could not understand completely. Could you possibly send me one or more new application file which you have made it by yourself (a viscoelastic model for instance like one in that .ppt file). I do need your help. Please help. That’s for my master thesis. Best wishes Mohsen – m.kh.599@gmail.com

 February 5, 2010, 04:25 Viscoelastic Fluid Flows using OpenFOAM The solver viscoelasticFluidFoam #77 Senior Member     ata kamyabi Join Date: Aug 2009 Location: Kerman Posts: 322 Rep Power: 10 Hi mohsen I have some files that may help you. If you want I can give them to you. Ata

 February 5, 2010, 08:21 hi #78 Member   mohsen kh Join Date: Nov 2009 Posts: 41 Rep Power: 7 Dear ata please send me them. I look forward to receive them. best wishes

 February 5, 2010, 09:17 Viscoelastic Fluid Flows using OpenFOAM The solver viscoelasticFluidFoam #79 Senior Member     ata kamyabi Join Date: Aug 2009 Location: Kerman Posts: 322 Rep Power: 10 Hi Mohsen I hope you are well. Because they are so much and big take them from me tomorrow at university. Best regards

 February 5, 2010, 23:00 #80 Member   Jovani L. Favero Join Date: Mar 2009 Location: Rio de Janeiro, RJ, Brazil Posts: 45 Rep Power: 10 Hello Mohsen, Include a new model is simple. See what Ata have to help you and remember: To include a new model the only place you need make changes is on ~/OpenFOAM/OpenFOAM-1.5-dev/src/transportModels/viscoelastic Then: 1) Go to ~/OpenFOAM/OpenFOAM-1.5-dev/src/transportModels/viscoelastic/viscoelasticLaws/ 2) Make a copy of one of those models (into that same directory) and rename in accordance with your model (the directory, the files and the name of the class into the files .H and .C). You will see the rule comparing two of that models. 3) Put your model equation into the Model::correct() function. Taking out the changes is needed to class adjustment here is the place where really will have anything new because the new model!! 4) In the directory /viscoelastic/Make edit the file "files" adding your new model in the same way is made for all the others models. 5) Now on /src/transportModels execute the scrip Allwmake to compile the library with your new model. If there is no implementation mistakes when finishes you can simulate your case. 6) Is good make a backup of the directory you will changes, then you can restore if any problem occur. This is the easy way. The correct way is work no directly in the OF system structure, but if you have a backup.... Best regards, Jovani

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post sinah OpenFOAM Running, Solving & CFD 10 November 25, 2010 12:02 Valdemir G. Ferreira Main CFD Forum 6 December 18, 2009 07:14 vulda OpenFOAM Running, Solving & CFD 1 March 17, 2008 08:32 Sumeshen Main CFD Forum 0 March 14, 2008 09:29 joel davison Main CFD Forum 0 November 6, 2001 06:09

All times are GMT -4. The time now is 01:14.