|
[Sponsors] |
April 24, 2012, 06:50 |
|
#21 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
||
April 24, 2012, 06:58 |
|
#22 |
New Member
Ali Q Raeini
Join Date: Feb 2010
Posts: 24
Rep Power: 16 |
||
May 2, 2012, 06:17 |
|
#23 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
I implemented an open source version of the solver based on Ali's paper: http://code.google.com/p/interfoamssf/
It's still buggy (the time step has to be constant, and the dambreak results are not good yet), but I decided to release it to speed up development. Contributors are very welcome. - Anton
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
May 2, 2012, 12:18 |
|
#24 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18 |
Hi, Anton,
I am wondering if you are willing to share your revised solver so that I can test it out? Thanks! Pei-Ying phsieh2005@yahoo.com |
|
May 2, 2012, 13:08 |
|
#25 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 17 |
Hi,
just write hg clone https://code.google.com/p/interfoamssf/ in a shell and you can download it. best andrea |
|
May 2, 2012, 13:16 |
|
#26 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18 |
Thanks a lot Andrea!
Pei-Ying |
|
May 5, 2012, 14:22 |
|
#27 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18 |
hi,
I am wondering if anyone has successfully compiled the interfoamssf code. I got the following error: SOURCE=interFoam.C ; wmakeScheduler g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/home/phsieh/OpenFOAM/OpenFOAM-2.1.x/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle -I/home/phsieh/OpenFOAM/OpenFOAM-2.1.x/src/transportModels/incompressible/lnInclude -I/home/phsieh/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude -I/home/phsieh/OpenFOAM/OpenFOAM-2.1.x/src/transportModels -I./interfaceProperties/lnInclude -IlnInclude -I. -I/home/phsieh/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/phsieh/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64Gcc46DPOpt/interFoam.o interFoam.C: In function ‘int main(int, char**)’: interFoam.C:93:21: error: ‘class Foam:impleControl’ has no member named ‘start’ interFoam.C:93:62: error: no ‘operator++(int)’ declared for postfix ‘++’ [-fpermissive] interFoam.C:152:42: error: ‘class Foam:impleControl’ has no member named ‘nCorr’ In file included from interFoam.C:154:0: pEqn.H:41:69: error: no matching function for call to ‘Foam:impleControl::finalInnerIter(int&, int&)’ pEqn.H:41:69: note: candidate is: /home/phsieh/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/pimpleControlI.H:80:13: note: bool Foam:impleControl::finalInnerIter() const /home/phsieh/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/pimpleControlI.H:80:13: note: candidate expects 0 arguments, 2 provided /home/phsieh/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable] make: *** [Make/linux64Gcc46DPOpt/interFoam.o] Error 1 phsieh@hillsdale:~/OpenFOAM/phsieh-2.1.x/solvers/interfoamssf --------------------------------------------------- I compiled this under OpenFOAM-2.1.x (latest git pull) on OpenSUSE 12.1 64 bit. Thanks! Pei-Ying |
|
May 6, 2012, 05:32 |
|
#28 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
I'm using OF-2.0.x. The PIMPLE controls have changed a bit in version 2.1.x.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
May 6, 2012, 17:30 |
|
#29 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18 |
HI, Anton,
Thanks for the reply! Under OpenFOAM-2.1.x, I copied pimpleControl.C pimpleControl.H, and pimpleControlII.H (these 3 codes were copied from OpenFOAM-2.0.x source) into interfoamssf folder, and the solver compiled without any error. However, when I ran the damBreak test case, I got several errors. I then, added ----------------------- "alpha." { solver smoothSolver; smoother GaussSeidel; tolerance 1e-11; relTol 0; nSweeps 1; maxIter 100; nLimiterIter 20; maxUnboundedness 1; CoCoeff 0.5; } ---------------------- into fvSolution, and default Gauss linear; under divSchemes in fvSchemes. The case then ran upto time - 0.4. But, when I plotted alpha1 using paraFoam, the liquid/air interface did not even move. So, there is something wrong. Any suggestion? Once I can get the dambreak test case to run correctly, I am planning to run something with more complex geometry and not so nice-quality cells. Pei-Ying |
|
May 7, 2012, 03:47 |
|
#30 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
I changed some things in the solver but didn't update the test case yet. For dynamic cases such as damBreak, change the Cpc coefficient to 0.5 in interFoam.C. Then the interface will move in a way that makes sense, but ironically there is too much smearing. At some point I'll also push a static testcase to the repository.
Cheers, Anton
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
May 7, 2012, 11:58 |
|
#31 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18 |
Hi, Anton,
Thanks for the reply! I changed Cpc to 0.5 from 0.98, but, still got the same problem - interface did not move at all. However, the code that I got several days ago seemed to get more reasonable results. I am using OpenFOAM-2.1.x. Pei-Ying |
|
May 7, 2012, 12:13 |
|
#32 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
Hi All,
i ran the solver on of 2.0.0 - i had to edit the fvSolution and fvSchemes as Pei-Ying did. When i run the dambreak scenario up to t = 5, and cpc=0.98 the water does not move, but the velocity profile looks kind of weird. I'll start digging through your code.. EDIT: If I use CPC=0.5 it does not change anything at all... Greetings ifssfvelo.jpg Last edited by lindstroem; May 7, 2012 at 12:28. |
|
May 7, 2012, 12:56 |
|
#33 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
This is what it looks like for me (animated gif):
http://dl.dropbox.com/u/1261220/dambreak.gif I'll push some more changes tomorrow. - Anton
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
May 8, 2012, 06:53 |
|
#34 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
Hi Anton,
one question to your implementation: In the interfaceProperties.C on line 129, you define "factor". If I understood it right, the first part is the sqrt of Eq. 15, but what about the two other terms there? I couldn't find the connection to the paper... regards |
|
May 8, 2012, 07:32 |
|
#35 |
Senior Member
Robert Castilla
Join Date: Apr 2009
Location: Spain
Posts: 110
Rep Power: 17 |
I have have made some changes in pimple calls in interFoam.C in order to compile it with OF2.1.0:
in line 93: while (pimple.loop() || cycle<3) in line 153: for (int corr=0; corr<pimple.nCorrPISO(); corr++) and also in pEqn.H, line 42: mesh.solver(p.select(pimple.finalInnerIter())) Also, I had to edit fvSolution and fvSchemes as Pei-Ying's post, and add the solvers for pcFinal and UFinal. The damBreak testcase works fine. Regards Robert Last edited by rcastilla; May 8, 2012 at 07:51. |
|
May 8, 2012, 08:18 |
|
#36 | |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Quote:
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
||
May 8, 2012, 08:31 |
|
#37 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
I pushed updates to the code and the dambreak testcase, and added the static droplet testcase. The code now writes the surface tension force to file, and I believe it's sign in the static droplet testcase is wrong, but I'm not sure why. Also, the magnitude of spurious currents does not reduce to the levels of the reference paper in this test case...
Would any one of the OF-2.1.x users with a google account take the time to create a public clone for others to use? - Anton
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
May 8, 2012, 08:36 |
|
#38 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
Ok thanks for the information..
maybe some critical works to the publication - it would be interesting what you think. To be very polemic, one could say, that he just interpolates and averages until the high velocities vanish?! I can't see a proof, that this is still "exact" what he does with the equations.. Has anyone tried (of those who get reasonable results) to set Cpc = 0 to get the original CSF formulation and compared it to the origianl interFoam solver? Edit: With the new update, the dambreak works fine as well, so I'll give it a try regards |
|
May 8, 2012, 09:05 |
|
#39 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
I just realized sqrt(0) actually does work, so the factor here really does become unnecessary unless you want to reuse the result of 'w'. [edit] Problems also can arise when minimal unboundedness of alpha1 makes the term under the square root negative.
About your comments: Smoothing before calculating the curvature is known to be beneficial and has already been proposed by Brackbill. Separating the capillary pressure is only mentioned in the paper in conjunction with the filtering (which I haven't implemented yet), but just like the separation of rho*g I can imagine it to be beneficial for the numerics.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. Last edited by akidess; May 8, 2012 at 09:28. |
|
May 8, 2012, 09:32 |
|
#40 | |
Senior Member
Robert Castilla
Join Date: Apr 2009
Location: Spain
Posts: 110
Rep Power: 17 |
Quote:
I have created a clone of the code and modified the interFoam.C and pEqn.H to make it compatible with OF 2.1.0. Also I have modified the dambreak testcase. Robert |
||
Tags |
capillary flows, interfoam, parasitic currents |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to monitor free surface elevation vs time in OF? | ozgur | OpenFOAM Post-Processing | 56 | September 14, 2015 09:11 |
parasitic currents | Pei-Ying Hsieh | Main CFD Forum | 0 | January 13, 2009 20:58 |
Parasitic currents reduction | hsieh | OpenFOAM Running, Solving & CFD | 0 | January 13, 2009 16:44 |
Parasitic currents reduction | hsieh | OpenFOAM Running, Solving & CFD | 0 | January 13, 2009 16:37 |
Modelling ocean currents of the past Earth | pgm | Main CFD Forum | 3 | March 2, 2005 09:45 |