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 Tree37Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   June 12, 2012, 06:05
Default
  #121
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 303
Rep Power: 9
Andrea_85 is on a distinguished road
Hi anton,
i think i do not understand well your first question. what do you mean with "start filtering"?. I would first define

grad(pc)-(grad(pc) dot ns)ns

at the cell centers, then i would interpolate it to face centers and dot product with "nf". We get a surfaceScalarField define at the face centers that can be multiplied with Cfc (which is a constant) and deltasf/(mag(deltasf+eps)) which is also a surfaceScalarField. Once fcf_filtered is calculated, fcf can be updated using (21).
I would put the filtering just after the capillary pressure equation in interFoamSSF.C

I think eps is used just to avoid division by zero. I would put some small numbers such as 1e-6/1e-8.

Since neither fcf nor grad(pc) change in PISO loop i would put the filtering of capillary fluxes just before UEqn.H and just after the previous filtering. I would define the total capillary flux phi_c as it is defined in pag.9, then i would apply the filtering and i would use directly phi_c in Ueqn.H and pEqn.H, instead of using fcf and grad(pc) separeted.

i am very sorry but i am preparing for a conference and i have no time to put my hands in the code now. i'll be back in 2 weeks


best

andrea
Mahmoud_aboukhedr likes this.
Andrea_85 is offline   Reply With Quote

Old   June 12, 2012, 06:49
Default
  #122
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,164
Rep Power: 20
akidess will become famous soon enough
Quote:
Originally Posted by Andrea_85 View Post
[...] and deltasf/(mag(deltasf+eps)) which is also a surfaceScalarField. Once fcf_filtered is calculated, fcf can be updated using (21).
In my opinion this term is problematic, because it can lead to filtering normal to the interface if the curvature is small, see my previous post.

Quote:
Originally Posted by Andrea_85 View Post
I think eps is used just to avoid division by zero. I would put some small numbers such as 1e-6/1e-8.
Indeed, it's function is to avoid div0, but it's value is not unimportant in my opinion. In the end we compute "fcf = fcf - filter", and filter will get very large if deltasf is zero (because then we have 1/eps)! For now I've also opted for 1e-6 though.

Quote:
Originally Posted by Andrea_85 View Post
i am very sorry but i am preparing for a conference and i have no time to put my hands in the code now. i'll be back in 2 weeks
No worries, I'm grateful for the input you've provided. Enjoy the conference!

- Anton

P.S. I'll post some code later today.
Mahmoud_aboukhedr likes this.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Join the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oHPxcPqde7HtA2
akidess is offline   Reply With Quote

Old   June 12, 2012, 07:11
Default
  #123
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,164
Rep Power: 20
akidess will become famous soon enough
Filtering code is now online: http://code.google.com/r/akidess-interfoamfsf/
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Join the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oHPxcPqde7HtA2
akidess is offline   Reply With Quote

Old   June 13, 2012, 03:20
Default
  #124
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,164
Rep Power: 20
akidess will become famous soon enough
Results on the moving droplet case with filtering improved, but are nowhere as good as the reference :/
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Join the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oHPxcPqde7HtA2
akidess is offline   Reply With Quote

Old   June 13, 2012, 06:13
Default
  #125
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 303
Rep Power: 9
Andrea_85 is on a distinguished road
just a small comment, at pag.9 they say that fcf_average is the average of capillary forces over all faces where they are non-zero. Does cmptAv account for that?

best

andrea
Andrea_85 is offline   Reply With Quote

Old   June 13, 2012, 09:10
Default
  #126
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,164
Rep Power: 20
akidess will become famous soon enough
I believe so. Btw, using the filtering algorithm as published on the repo, even the static droplet testcase doesn't work any more. After deactivating the filtering of fcf (but keeping it on phic) the static droplet case works again, so there's a problem with the computation of fcf_filter.
Mahmoud_aboukhedr likes this.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Join the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oHPxcPqde7HtA2
akidess is offline   Reply With Quote

Old   August 1, 2012, 10:51
Default InterFoam: parasitic currents
  #127
New Member
 
M K Singh
Join Date: Sep 2009
Posts: 19
Rep Power: 9
mksingh is on a distinguished road
Dear Anton and Andrea,
Very nice discussion about parasitic currents. I am wondering if all the issues have been solved regarding spurious velocities at interfaces in interFoam. I am using OpenFoam 2.1.x to solve a 2-D ladle draining from the bottom (water +air system). The initial condition is shown in Figure attached (t=0 s). I am getting very strange results, please see the attached pictures for t=100,120, 170 s. As you can see that after certain time (t>100s) the liquid level remains constatnt and a strange waves are appearing at the inteface. I am doubting that is it effect of spurious velocities generated at intefcae? My boundary conditions are as follows:
=====================================
Valid fields:
volVectorField U
volScalarField p_rgh
volScalarField alpha1

patch: SENOUTLET
scalar p_rgh totalPressure
scalar alpha1 inletOutlet
vector U pressureInletOutletVelocity

wall: SENWALL
scalar p_rgh buoyantPressure
scalar alpha1 zeroGradient
vector U fixedValue

empty: SYM4
scalar p_rgh empty
scalar alpha1 empty
vector U empty

empty: SYM3
scalar p_rgh empty
scalar alpha1 empty
vector U empty

empty: SYM2
scalar p_rgh empty
scalar alpha1 empty
vector U empty

empty: SYM1
scalar p_rgh empty
scalar alpha1 empty
vector U empty

patch: TW
scalar p_rgh totalPressure
scalar alpha1 inletOutlet
vector U pressureInletOutletVelocity

wall: BW
scalar p_rgh buoyantPressure
scalar alpha1 zeroGradient
vector U fixedValue

wall: SW
scalar p_rgh buoyantPressure
scalar alpha1 zeroGradient
vector U fixedValue

======================================
Any suggestion in this regard? As suggested on forum, Now I have changed cAlpha=1 to see the effect of this on my result.
Thanks in advance.
M K Singh
Attached Images
File Type: jpg init_ladle_draining.jpg (14.6 KB, 83 views)
File Type: jpg ladle_t000100.jpg (44.6 KB, 115 views)
File Type: jpg ladle_t000120.jpg (42.6 KB, 90 views)
File Type: jpg ladle_t000170.jpg (41.5 KB, 102 views)
mksingh is offline   Reply With Quote

Old   August 1, 2012, 17:53
Default
  #128
New Member
 
Ali Q Raeini
Join Date: Feb 2010
Posts: 21
Rep Power: 8
aliqasemi is on a distinguished road
Dear Singh,

I was also used to get some non-physical velocities near the wall boundaries, much higher than the usual spurious velocities. You can call them whatever you like!
No, I think the filtering stuff are not still implemented in the interFoam code shipped with official openfoam, but you can check the links above. By the way, I am also going to release my code with a tutorial case as soon I find the time to clean it up, maybe in a few months time.

Bests, Ali
aliqasemi is offline   Reply With Quote

Old   August 3, 2012, 04:38
Thumbs up
  #129
Senior Member
 
Eelco van Vliet
Join Date: Mar 2009
Location: The Netherlands
Posts: 123
Rep Power: 10
eelcovv is on a distinguished road
Hi Ali

I just saw the paper of yours in J Comp Physics on this solver. Very nice work! Would be great if you would make your code public, I am sure a lot of us would like to use it. Are you going to post it on the forum? Would a 'pre-release' be possible?

Regards
Eelco
eelcovv is offline   Reply With Quote

Old   August 3, 2012, 06:09
Default Solution of my problem (emptying ladle)
  #130
New Member
 
M K Singh
Join Date: Sep 2009
Posts: 19
Rep Power: 9
mksingh is on a distinguished road
Quote:
Originally Posted by mksingh View Post
Dear Anton and Andrea,
Very nice discussion about parasitic currents. I am wondering if all the issues have been solved regarding spurious velocities at interfaces in interFoam. I am using OpenFoam 2.1.x to solve a 2-D ladle draining from the bottom (water +air system). The initial condition is shown in Figure attached (t=0 s). I am getting very strange results, please see the attached pictures for t=100,120, 170 s. As you can see that after certain time (t>100s) the liquid level remains constatnt and a strange waves are appearing at the inteface. I am doubting that is it effect of spurious velocities generated at intefcae? My boundary conditions are as follows:
=====================================
Valid fields:
volVectorField U
volScalarField p_rgh
volScalarField alpha1

patch: SENOUTLET
scalar p_rgh totalPressure
scalar alpha1 inletOutlet
vector U pressureInletOutletVelocity

wall: SENWALL
scalar p_rgh buoyantPressure
scalar alpha1 zeroGradient
vector U fixedValue

empty: SYM4
scalar p_rgh empty
scalar alpha1 empty
vector U empty

empty: SYM3
scalar p_rgh empty
scalar alpha1 empty
vector U empty

empty: SYM2
scalar p_rgh empty
scalar alpha1 empty
vector U empty

empty: SYM1
scalar p_rgh empty
scalar alpha1 empty
vector U empty

patch: TW
scalar p_rgh totalPressure
scalar alpha1 inletOutlet
vector U pressureInletOutletVelocity

wall: BW
scalar p_rgh buoyantPressure
scalar alpha1 zeroGradient
vector U fixedValue

wall: SW
scalar p_rgh buoyantPressure
scalar alpha1 zeroGradient
vector U fixedValue

======================================
Any suggestion in this regard? As suggested on forum, Now I have changed cAlpha=1 to see the effect of this on my result.
Thanks in advance.
M K Singh
=================
I have found solution to my problem why my interface was getting stagnant at certain point. After analysing my simulation, I realized that my inteface was getting stagnant exactly at zero position (y=0, vertical direction, note my middle of domian is at (0,0,0)), see picture for t=10, 50,90 s. My guess is that during presure (rho*g*h) caluculation as interface reaches at y=0 the pressure is becoming zero which is leading to stagnant inteface!! However, this needs more explaination, may be some numerical experts can provide better argument.
To solve the issue, I transformed my domain so that y=0 lies outside the domain, basically my all the domain lies in positive quadrant. This strategy has solved my problem, see attached pictures for t=10,60 s.
If someone has more input in this regard, please share.
Thanks.
M K Singh
PS: note that ladle_translation is picture where domain has been translated
Attached Images
File Type: jpg ladle_t000010.jpg (33.3 KB, 85 views)
File Type: jpg ladle_t000050.jpg (40.1 KB, 76 views)
File Type: jpg ladle_t000090.jpg (32.9 KB, 68 views)
File Type: jpg ladle_translation_t000010.jpg (26.6 KB, 68 views)
File Type: jpg ladle_translation_t000060.jpg (35.4 KB, 71 views)

Last edited by mksingh; August 3, 2012 at 06:15. Reason: clarity
mksingh is offline   Reply With Quote

Old   February 20, 2013, 06:03
Default
  #131
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 303
Rep Power: 9
Andrea_85 is on a distinguished road
Hi interFoamers,

Someone has advanced with the implementation of interFoamSSF? I finally have some time to spend on it but i'm still confused about filtering stuff.

best

andrea
Andrea_85 is offline   Reply With Quote

Old   May 16, 2013, 03:02
Default
  #132
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,164
Rep Power: 20
akidess will become famous soon enough
Ali Raeini has released some code now: http://www.cfd-online.com/Forums/ope...tml#post427813
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Join the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oHPxcPqde7HtA2
akidess is offline   Reply With Quote

Old   January 7, 2015, 16:45
Default parasitic velocities in capillary flow
  #133
New Member
 
Christoph Gmelin
Join Date: Jan 2015
Posts: 1
Rep Power: 0
Christoph_G is on a distinguished road
Hi,
I'm trying to simulate a capillary two-phase flow (water/Oil), where small droplets pass a junction with a sudden expansion (see first picture). U =0.05m/s, tube diameter = 0.5mm.
My original-settings are the same as in the dam-break tutorial and I'm still using interfoam.
Everything is Ok, until the droplets reach the expansion-zone. Then large Courant numbers occur in combination with high velocities at the interface of the first droplet (see red dot at picture 2).
In my opinion the complete case is only almost stable (it's a very fragile equilibrium) an when the flow becomes a little more unstable due to its deceleration spurious currents occur.
To resolve the situation I tried the following things (everything without success):
reduce courant No.
set cAlpha to 0
use finer grids at the wall
finer grid in the expansion zone
reduce time step
more Alpha subcycles
...
Surprisingly the unchanged dam-break settings still obtain the best results. In all other cases the parasitic velocities arise much earlier.
Has anybody more Ideas how to get this problem fixed??

My last idea was to test the interfoamssf-solver (https://code.google.com/p/interfoamssf/) but I'm not very familiar with C-programming and compiling.

My second question is: How can I compile the interfoamssf source code without destroying the rest of my FOAM-installation?

Thanks,
Christoph
Attached Images
File Type: jpg 2.jpg (19.9 KB, 45 views)
File Type: jpg 5.jpg (48.3 KB, 49 views)
Christoph_G 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 56 September 14, 2015 08: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


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