CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Gerris or Openfoam?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 14, 2012, 03:04
Default Gerris or Openfoam?
  #1
Member
 
HouKen
Join Date: Jul 2011
Posts: 67
Rep Power: 14
houkensjtu is on a distinguished road
Hi there!
I have been writing code to simulate two-phase flow in microchannel. After struggling for 2 years now I finally finished my thesis. To be honest writing code is hard for me and there remain a bunch of problems in my code.
I start to consider using opensource code for several reasons:

1. I am not clever enough to study all the computational technique, coding tricks and test them by myself. It cost me too much time to debug my code which has almost nothing to do with physical phenomena. Opensource code is well coded by professional which is surely far more capable and reliable.

2. Opensource is "hackable". I can hack into any part of it if I want to customize or modify sth. Also user community will offer me useful information if I stuck.

And now I have my question, which to use? My problem can be briefly described as below:

1. Laminar (maybe in the future I will consider for turbulence)
2. Two-phase (usually I focus on single bubble behavior, now I am using VOF in my code)
3. Surface tension (I applied CSF model but under microscale, "parasite current" is a problem)
4. Phase change (expansion of bubbles)
5. I want the code to be "hackable", which means friendly to people who want to change or modify something by themselves

I am not familiar with openfoam or gerris. I know that Openfoam is very strong, and gerris is rather new and capable in dealing with surface tension. Which one will you guys recommend???
houkensjtu is offline   Reply With Quote

Old   July 15, 2012, 03:51
Default
  #2
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 17
ata is on a distinguished road
Hi
I recommend OpenFOAM because of its capabilities and supports in forums.
ata is offline   Reply With Quote

Old   July 16, 2012, 00:01
Default
  #3
Member
 
HouKen
Join Date: Jul 2011
Posts: 67
Rep Power: 14
houkensjtu is on a distinguished road
Quote:
Originally Posted by ata View Post
Hi
I recommend OpenFOAM because of its capabilities and supports in forums.
Thank you for your suggestion!
I am considering to try both of them and then decide... Gerris seems to be very potential in the future...
houkensjtu is offline   Reply With Quote

Old   August 29, 2012, 17:04
Default
  #4
New Member
 
Pharg Mandadapu
Join Date: Jul 2011
Posts: 16
Rep Power: 14
pharg_yrartibra is on a distinguished road
Hi houkensjtu,

I'm interested in knowing why you think that Gerris seems more potential for the future? Does it have some feature that OpenFOAM doesn't have? Thanks.
pharg_yrartibra is offline   Reply With Quote

Old   September 2, 2012, 09:36
Default
  #5
Senior Member
 
Join Date: Aug 2011
Posts: 272
Rep Power: 15
leflix is on a distinguished road
Quote:
Originally Posted by pharg_yrartibra View Post
Hi houkensjtu,

I'm interested in knowing why you think that Gerris seems more potential for the future? Does it have some feature that OpenFOAM doesn't have? Thanks.
I'm really following the comment of pharg_yrartibra. I do not see what Gerris can do that Openfoam couldn't do.
And I'm more confident in the growing of openfoam in the future compared to the one of Gerris.
leflix is offline   Reply With Quote

Old   September 2, 2012, 09:41
Default
  #6
Senior Member
 
Join Date: Aug 2011
Posts: 272
Rep Power: 15
leflix is on a distinguished road
Quote:
Originally Posted by houkensjtu View Post
Hi there!
I have been writing code to simulate two-phase flow in microchannel. After struggling for 2 years now I finally finished my thesis. To be honest writing code is hard for me and there remain a bunch of problems in my code.
I start to consider using opensource code for several reasons:
Hi Hounkensjtu

what you say is true, however what you gained in developping your own code is an invaluable experience in CFD. And even if you turn now for open source codes, you have definitely increased your understanding level of CFD and stuffs which matter.
leflix is offline   Reply With Quote

Old   September 2, 2012, 21:27
Default
  #7
Member
 
HouKen
Join Date: Jul 2011
Posts: 67
Rep Power: 14
houkensjtu is on a distinguished road
Quote:
Originally Posted by leflix View Post
Hi Hounkensjtu

what you say is true, however what you gained in developping your own code is an invaluable experience in CFD. And even if you turn now for open source codes, you have definitely increased your understanding level of CFD and stuffs which matter.
Thank you for your comment!
Yes I do feel developing my own code increased my understanding in CFD. Also my professor suggest me to continue coding, but the issue here is, though it's possible to develop some low-level solver (following text book like Patankar or Versteeg), things become quite difficult when it comes to more complex model like phase-change. The reason why i think so, (actually i have never really code my own phase-change model) is that there will be no text book to follow. Most literature discussing about these models only focus on physical or mathematical properties, but not on coding tech.
what will you suggest to do ?
houkensjtu is offline   Reply With Quote

Old   September 3, 2012, 04:58
Default
  #8
Member
 
Francesco Capuano
Join Date: May 2010
Posts: 81
Rep Power: 15
francesco_capuano is on a distinguished road
Hi houkensjtu,

I've been making some basic comparisons for a simple two-phase problem between OpenFOAM and Gerris with the VOF approach. The results show that the current VOF implementation of OpenFOAM is quite inaccurate with respect to Gerris (see also http://www.uni-ulm.de/fileadmin/webs...s/CLSVOF.pdf); I can email you some pictures of my results, if you want.

If your problems deal with simple, laminar flows, I would definitely go for Gerris. You should also consider that, in the current release, OpenFOAM does not support 2-D adaptive mesh refinement (although it does for 3-D), which, as you might know, is a fundamental feature for a good tracking of the interface. On the other hand, if you have to simulate flows of growing complexity (e.g. turbulence, phase change, etc.), then OpenFOAM is your best bet, especially if you manage to implement a coupled VOF / Level set method (see the above presentation).

Regards,
Francesco
francesco_capuano is offline   Reply With Quote

Old   September 3, 2012, 09:40
Default
  #9
Senior Member
 
Join Date: Aug 2011
Posts: 272
Rep Power: 15
leflix is on a distinguished road
Quote:
Originally Posted by houkensjtu View Post
but the issue here is, though it's possible to develop some low-level solver (following text book like Patankar or Versteeg), things become quite difficult when it comes to more complex model like phase-change. The reason why i think so, (actually i have never really code my own phase-change model) is that there will be no text book to follow. Most literature discussing about these models only focus on physical or mathematical properties, but not on coding tech.
what will you suggest to do ?
First of all I would like to mention that every codes available on the market, open source codes or comercial ones for most of them come from research codes developped by students like you.
With time, they are improved with some additional new features (compressible, turbulence models, physical models , heat transfer, combustion, two-phase flow, numerical schemes, moving grids, etc...) according the will and the needs of each researcher.
After sveral years (between 10 and 20 years) one obtains codes like OpenFoam, Star-CD, Fluent etc....

The material for undertsanding the models is all the litterature in CFD that you can find in scientific journals.

The first think is to have a good and efficient Navier-Stokes solver in which you are very confident and which works fine.
Then you start to add some new models...
If you are interested in two-phase flows then start to really master VOF method, understand in details how it works, collect and read papers on this topic and when you feel ready start to code it.
You can either find some open source codes like Sola VOF, Gerris,... wich are available on internet and then you can inspire from it.

The other alternative is to use directly an open source code like Gerris , Openfoam which treat this problem.
I have indeed heard that VOF implementation in Gerris was really good. I don't know about Openfoam. I have just seen that dambreak problem was treated as tutorial case in Openfoam. But I guess we can trust Francesco who have tested the both apparently.
leflix is offline   Reply With Quote

Old   September 3, 2012, 10:43
Default
  #10
New Member
 
Pharg Mandadapu
Join Date: Jul 2011
Posts: 16
Rep Power: 14
pharg_yrartibra is on a distinguished road
Quote:
Originally Posted by francesco_capuano View Post
I've been making some basic comparisons for a simple two-phase problem between OpenFOAM and Gerris with the VOF approach. The results show that the current VOF implementation of OpenFOAM is quite inaccurate with respect to Gerris (see also http://www.uni-ulm.de/fileadmin/webs...s/CLSVOF.pdf); I can email you some pictures of my results, if you want.
The link in your post is broken, this seems be be the working one... http://www.uni-ulm.de/fileadmin/webs...les/CLSVOF.pdf. So, what VOF implementations are there in OpenFOAM and in Gerris, respectively? I just know that InterFOAM uses something called MULES, which is completely algebraic and apparently supposed to work quite well (better than CICSAM), but maybe InterFOAM is not what you are using. On the other hand PLIC (Youngs' scheme), which is geometric, is supposed to give slighty more accurate results, and if Gerris is using that, then maybe you are right.
pharg_yrartibra is offline   Reply With Quote

Old   September 3, 2012, 21:27
Default
  #11
Member
 
HouKen
Join Date: Jul 2011
Posts: 67
Rep Power: 14
houkensjtu is on a distinguished road
Quote:
Originally Posted by francesco_capuano View Post
Hi houkensjtu,

I've been making some basic comparisons for a simple two-phase problem between OpenFOAM and Gerris with the VOF approach. The results show that the current VOF implementation of OpenFOAM is quite inaccurate with respect to Gerris (see also http://www.uni-ulm.de/fileadmin/webs...s/CLSVOF.pdf); I can email you some pictures of my results, if you want.

If your problems deal with simple, laminar flows, I would definitely go for Gerris. You should also consider that, in the current release, OpenFOAM does not support 2-D adaptive mesh refinement (although it does for 3-D), which, as you might know, is a fundamental feature for a good tracking of the interface. On the other hand, if you have to simulate flows of growing complexity (e.g. turbulence, phase change, etc.), then OpenFOAM is your best bet, especially if you manage to implement a coupled VOF / Level set method (see the above presentation).

Regards,
Francesco
Helpful info!
Yeah I noticed that Gerris supports adaptive mesh refinement which is really smart and that's one of the important reason I thought it's more potential than OpenFOAM.
I'm really new to both Gerris and OpenFOAM, so I have no idea in how they work in phase-change model. Do you have any idea?
One more thing I noticed is: I followed OpenFOAM tutorial's lid-driven cavity case, also I made a same mesh, same time step case in Gerris. Results are similar but Gerris was much much more slower than OpenFOAM. I am wondering why it happens.
Finally my email add: houkensjtu@gmail.com, i am very interesting in comparison result between these two codes. THX!
houkensjtu is offline   Reply With Quote

Old   September 5, 2012, 21:16
Default
  #12
Member
 
HouKen
Join Date: Jul 2011
Posts: 67
Rep Power: 14
houkensjtu is on a distinguished road
Quote:
Originally Posted by leflix View Post
First of all I would like to mention that every codes available on the market, open source codes or comercial ones for most of them come from research codes developped by students like you.
With time, they are improved with some additional new features (compressible, turbulence models, physical models , heat transfer, combustion, two-phase flow, numerical schemes, moving grids, etc...) according the will and the needs of each researcher.
After sveral years (between 10 and 20 years) one obtains codes like OpenFoam, Star-CD, Fluent etc....

The material for undertsanding the models is all the litterature in CFD that you can find in scientific journals.

The first think is to have a good and efficient Navier-Stokes solver in which you are very confident and which works fine.
Then you start to add some new models...
If you are interested in two-phase flows then start to really master VOF method, understand in details how it works, collect and read papers on this topic and when you feel ready start to code it.
You can either find some open source codes like Sola VOF, Gerris,... wich are available on internet and then you can inspire from it.

The other alternative is to use directly an open source code like Gerris , Openfoam which treat this problem.
I have indeed heard that VOF implementation in Gerris was really good. I don't know about Openfoam. I have just seen that dambreak problem was treated as tutorial case in Openfoam. But I guess we can trust Francesco who have tested the both apparently.
Good idea! Also in my opinion it will be important to learn available code like gerris or OpenFOAM--how can one create his own code without learning other people's work! That's also one of the reason I decided to turn to opensource code, at least for a while, not only to use, but also for learning.
houkensjtu is offline   Reply With Quote

Old   September 6, 2012, 05:26
Default
  #13
Member
 
Francesco Capuano
Join Date: May 2010
Posts: 81
Rep Power: 15
francesco_capuano is on a distinguished road
Quote:
Originally Posted by houkensjtu View Post
Helpful info!
Yeah I noticed that Gerris supports adaptive mesh refinement which is really smart and that's one of the important reason I thought it's more potential than OpenFOAM.
I'm really new to both Gerris and OpenFOAM, so I have no idea in how they work in phase-change model. Do you have any idea?
One more thing I noticed is: I followed OpenFOAM tutorial's lid-driven cavity case, also I made a same mesh, same time step case in Gerris. Results are similar but Gerris was much much more slower than OpenFOAM. I am wondering why it happens.
Finally my email add: houkensjtu@gmail.com, i am very interesting in comparison result between these two codes. THX!
In my opinion, the comparison between the two codes can be briefly summarized as follows: OpenFOAM is a general, multipurpose code, while Gerris has been developed specifically for multiphase flows. About phase-change: as to my knowledge, neither OpenFOAM nor Gerris can simulate phase-change in an Eulerian framework. If you wish to do that with OpenFOAM, you should start from an Eulerian, two-phase solver (e.g. bubbleFoam, interFoam, etc.) and do your own implementation. Some useful suggestions are given in:

http://www.cfd-online.com/Forums/ope...hange-vof.html

Nevertheless I know that OpenFOAM has some phase-change models which can be used in Lagrangian solvers (e.g. sprayFoam).

Regarding the question of performances, in OpenFOAM almost all solvers use efficient segregated algorithms (SIMPLE, PISO, PIMPLE...), which in my experience work incredibly fast, especially for incompressible flows. I don't know much about the Gerris numerical algorithm (you can find all the details in Popinet's paper: http://gfs.sourceforge.net/wiki/index.php/Bibliography), but I know that it is second-order in space and time: have you checked that in OpenFOAM you also used such numerical schemes?

I'll send you an email with the comparison as soon as I can.

Regards,
Francesco
francesco_capuano is offline   Reply With Quote

Old   October 18, 2012, 21:37
Default
  #14
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
I would be interested in the comparison too :-)
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   October 19, 2012, 05:39
Default
  #15
Member
 
Francesco Capuano
Join Date: May 2010
Posts: 81
Rep Power: 15
francesco_capuano is on a distinguished road
Quote:
Originally Posted by alberto View Post
I would be interested in the comparison too :-)
The case setup is described in

A Orazzo, G Coppola, L de Luca, "Single-wave Kelvin-Helmoltz instability in nonparallel channel flow", Atomization and Sprays 21 (9), 775-785

and the article presents some results obtained with the codes GERRIS and SURFER. I have reproduced the test in OpenFOAM by using interFoam with a 2nd order accurate scheme in space and time on a fixed uniform mesh 800x400. I am attaching the solution after 8e-3 seconds, We = 1e5.

t8e-3.png

The elongated wave provided by OpenFOAM is clearly distorted and reproduced inaccurately with respect to the other two solvers. Such a problem is also shown in the link I gave some posts above.

Regards,
Francesco
francesco_capuano is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Issues with OpenFoam sanjibdsharma OpenFOAM 0 August 14, 2009 08:41
Critical errors during OpenFoam installation in OpenSuse 11.0 amscosta OpenFOAM 5 May 1, 2009 14:06
Problem installing OpenFOAM 1.5 installation on RHEL 4. vwsj84 OpenFOAM Installation 4 April 23, 2009 04:48
2009 OpenFOAM Summer School in Zagreb, Croatia hjasak OpenFOAM Announcements from Other Sources 0 March 27, 2009 12:08
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07


All times are GMT -4. The time now is 12:37.