CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

parasitic currents

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

Like Tree22Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   April 24, 2012, 05:50
Default
  #21
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 6
lindstroem is on a distinguished road
I found it here:

http://www.sciencedirect.com/science...21999112001830
lindstroem is offline   Reply With Quote

Old   April 24, 2012, 05:58
Default
  #22
New Member
 
Ali Q Raeini
Join Date: Feb 2010
Posts: 21
Rep Power: 7
aliqasemi is on a distinguished road
Quote:
Originally Posted by akidess View Post
You linked to your email instead of doi.
sorry, apparently the forum don't like the copy and paste approach !

fixed
aliqasemi is offline   Reply With Quote

Old   May 2, 2012, 05:17
Default
  #23
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
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.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology
akidess is offline   Reply With Quote

Old   May 2, 2012, 11:18
Default
  #24
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 272
Rep Power: 9
phsieh2005 is on a distinguished road
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
phsieh2005 is offline   Reply With Quote

Old   May 2, 2012, 12:08
Default
  #25
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 275
Rep Power: 7
Andrea_85 is on a distinguished road
Hi,

just write

hg clone https://code.google.com/p/interfoamssf/

in a shell and you can download it.

best


andrea
zhernadi and mm.abdollahzadeh like this.
Andrea_85 is offline   Reply With Quote

Old   May 2, 2012, 12:16
Default
  #26
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 272
Rep Power: 9
phsieh2005 is on a distinguished road
Thanks a lot Andrea!

Pei-Ying
phsieh2005 is offline   Reply With Quote

Old   May 5, 2012, 13:22
Default
  #27
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 272
Rep Power: 9
phsieh2005 is on a distinguished road
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
phsieh2005 is offline   Reply With Quote

Old   May 6, 2012, 04:32
Default
  #28
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
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.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology
akidess is offline   Reply With Quote

Old   May 6, 2012, 16:30
Default
  #29
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 272
Rep Power: 9
phsieh2005 is on a distinguished road
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
phsieh2005 is offline   Reply With Quote

Old   May 7, 2012, 02:47
Default
  #30
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
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.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology
akidess is offline   Reply With Quote

Old   May 7, 2012, 10:58
Default
  #31
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 272
Rep Power: 9
phsieh2005 is on a distinguished road
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
phsieh2005 is offline   Reply With Quote

Old   May 7, 2012, 11:13
Default
  #32
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 6
lindstroem is on a distinguished road
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 11:28.
lindstroem is offline   Reply With Quote

Old   May 7, 2012, 11:56
Default
  #33
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
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.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology
akidess is offline   Reply With Quote

Old   May 8, 2012, 05:53
Default
  #34
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 6
lindstroem is on a distinguished road
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
lindstroem is offline   Reply With Quote

Old   May 8, 2012, 06:32
Default
  #35
Member
 
Robert Castilla
Join Date: Apr 2009
Location: Spain
Posts: 80
Rep Power: 8
rcastilla is on a distinguished road
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 06:51.
rcastilla is offline   Reply With Quote

Old   May 8, 2012, 07:18
Default
  #36
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
Quote:
Originally Posted by lindstroem View Post
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
In Eq. 15 you have sqrt(a*(1-a)), which is undefined for a=0 and a=1. I used the two extra terms to make sure the factor would become zero for 0,1, but it's probably not necessary.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology
akidess is offline   Reply With Quote

Old   May 8, 2012, 07:31
Default
  #37
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
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.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology
akidess is offline   Reply With Quote

Old   May 8, 2012, 07:36
Default
  #38
Senior Member
 
Join Date: Nov 2010
Posts: 113
Rep Power: 6
lindstroem is on a distinguished road
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
lindstroem is offline   Reply With Quote

Old   May 8, 2012, 08:05
Default
  #39
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
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.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology

Last edited by akidess; May 8, 2012 at 08:28.
akidess is offline   Reply With Quote

Old   May 8, 2012, 08:32
Default
  #40
Member
 
Robert Castilla
Join Date: Apr 2009
Location: Spain
Posts: 80
Rep Power: 8
rcastilla is on a distinguished road
Quote:
Originally Posted by akidess View Post
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
Hi,

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
rcastilla is offline   Reply With Quote

Reply

Tags
capillary flows, interfoam, parasitic currents

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to monitor free surface elevation vs time in OF? ozgur OpenFOAM Post-Processing 55 October 31, 2013 10:33
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


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