CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

interFoam behavior in micro-dimensions

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 6, 2010, 01:34
Default
  #21
Member
 
Mohammad Zakerzadeh
Join Date: Dec 2009
Location: Aachen, Germany
Posts: 40
Rep Power: 16
moh1367 is on a distinguished road
Hi !

In my opinion, yes!
I check my velocity field and it seemed OK! The courant was about 0.4-0.8 at first and now it reduced so much. Do you resolve your case with very small DeltaT?

Sincerely
moh1367 is offline   Reply With Quote

Old   March 7, 2010, 01:17
Default
  #22
Member
 
Join Date: Dec 2009
Posts: 46
Rep Power: 16
openfoam1 is on a distinguished road
Quote:
Originally Posted by moh1367 View Post
Hi !

In my opinion, yes!
I check my velocity field and it seemed OK! The courant was about 0.4-0.8 at first and now it reduced so much. Do you resolve your case with very small DeltaT?

Sincerely
Hi
when i reduced the courant number from 0.25 to 0.005 ,, the currents completely disappeared ,, and the problem almost solved ,,

there is another question

i want to enter a boundary condition on the lower wall for alpha1 ,, i want to use alphaContactAngle boundary condition ,, i must enter the following:

1) static contact angle (theta0)
2) the leading and trailing edge dynamic contact angles (thetaA),(thetaR)
3) velocity scaling function for dynamic contact angle (uTheta)

is this important to enter (2) and (3) on my simulation, how can i find those values for water and a given solid

thanks very much ..
openfoam1 is offline   Reply With Quote

Old   March 7, 2010, 01:45
Default
  #23
Member
 
Mohammad Zakerzadeh
Join Date: Dec 2009
Location: Aachen, Germany
Posts: 40
Rep Power: 16
moh1367 is on a distinguished road
Hi openFoam!
I become very glad about your problem is solved now. you can see about the dynamic contact angle in one of the topic in the forum with this title"Dynamic contact angle". unfortunately I haven the link.
Sincerely
moh1367 is offline   Reply With Quote

Old   March 7, 2010, 07:46
Default
  #24
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18
phsieh2005 is on a distinguished road
Hi,

I am glad to hear that this problem was resolved by reducing delta t. But, I am surprised. What is your channel diameter? What is your surface tension coefficient?

Based on what I read about spurious currents, it can be reduced by some methods, but, they usually work only on very good hex quality meshes.

In my case, I usually have to run the case up to 1 sec - 2 sec. Such a small delta t (< 1e-8) is not practical to me because it will take weeks to complete, even on a cluster with 32 CPUs.

Also, I usually run my case with CFL <= 0.3.

Pei
phsieh2005 is offline   Reply With Quote

Old   March 13, 2010, 09:36
Default
  #25
Senior Member
 
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 17
kumar is on a distinguished road
Hello everybody,
I would like to share my experience on the CFL number limit of interFOAM solvers. I have been using lesInterFOAM to study the breakup of liquid shees in 2D. My nozzle thickness is 50 micrometers. And I have run simulations with a range of CFL numbers on the same geometry and same b.cs. My range of CFL numbers span from 0.2 to 0.005. And I also performed a linear stability analysis in Mathematica for verifying my results. Then I found out that the case with the largest CFL number is 0.2 overpredicted the dominant wavelength when compared to the linear stability analyis. Whereas the case with the lowest CFL number 0.005 predicted the dominant wavelength accurately wwhen compared to the linear stability analysis.

I got into this investigation after looking at the literature "Volume of Fluid methods for immiscible-fluid and free surface flows" Chemical Engineering Journal 141 (2008) 204-221. In this paper it has been specified that the inter-gamma schemes require very small time steps CFL < 0.01 for keeping a sharp interface. But there is no proof given for this condition.
But i think itbecomes infeasible to run simulations on such small time steps.

My question is is it possible to use higher CFL numbers by increasing the nGammaSubcycles. Any experiences on this matter will be appreciated. I am also studying the influence of nGammaSubcycles on the solution.

bye
with regards
K.Suresh kumar
kumar is offline   Reply With Quote

Old   March 16, 2010, 06:35
Default
  #26
New Member
 
Denis Semyonov
Join Date: Mar 2009
Posts: 14
Rep Power: 17
sundaero is on a distinguished road
Probably this tread
http://www.cfd-online.com/Forums/ope...-currents.html
might help those who experiencing high parasitic currents at microscale and as a result a very low time step.

In my case it was a solution.
sundaero is offline   Reply With Quote

Old   March 29, 2010, 13:52
Default
  #27
Senior Member
 
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 17
kumar is on a distinguished road
Hello everybody,
I studied the effect of ngammaSubcycles on the solution. I varied the ngamma Subcycles from 4, 10 ,16,20 while keeping all other parameters constant. The CFL no. was 0.2 and 0.5. There is no difference between these simulations. But i have read in the manual that higher CFL numbers can be used by increaasing this parameter andnot losing the accuracy. I thik this claim is not true.

Then I also modified the pEqn.H and the UEqn.H as specifed in the previous post by SundAERO, I saw that the modification of the surface tension term makes the solution a bit better, but in my case i do not see much improvement. I am still waiting for my simulation to finish and i already see that the simulation without this modification and with the modification are not so different. So i doubt that this modification really does not work for all cases. It always depends on the application that one is studying.

My next question is has anybody tried to use an implicitMULES solver with interFOAM for microdimensions problems. I am planning to compile the implicit MULES with interFOAM and change the fvSchemes files. I just wanted to know if somebody has already tried the implicitMULES solver and seen any improvement in their solution, any comments on comparison between the implicitMULES and explicitMULES solutions for interFOAM are welcome.

Anyhow i will update the findings once i run a implicit case.

bye
with regards
K.Suresh kumar
kumar is offline   Reply With Quote

Old   March 29, 2010, 17:02
Default
  #28
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18
phsieh2005 is on a distinguished road
Hi, kumar,

I ran 2 completely different cases. Both with and without the modifications.

In one case, the modification help, while in the other case, the modification did not help.

So, whether this modification helps or not is case dependent.

Someone told me that this modification was tested few years ago and the conclusion was the following:

it introduces a serious bias in the force
balance of the surface-tension and the results for capillary-rise etc. were
significantly less accurate.

Pei
phsieh2005 is offline   Reply With Quote

Old   April 1, 2010, 05:15
Default
  #29
Senior Member
 
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 17
kumar is on a distinguished road
Hello interFOAM guys

I am happy to inform that after trying every option in the box, i finally found some sucess with the CFL number issue atleast for my case.

I made an implicit solver for solving the alpha equation by calling the MULES::implicitSolve and had to do some more changes to make the solver work.

But the good news is that i already have some initial results from the implicit solver interFoam which i am running for a CFL no. of 0.25 and i see that they match with the case that i ran with the CFL-0.005. I am using the Euler scheem for time integration, in the implciit case which is first order. And the simulation itself is much faster.

So first of all i would thank the guys for making such a code , where i can change the solver as i want.

I would suggest the people who have the problem with the CFL number, where you need small CFL numbers to obtain a reasonably accurate result, you should give a try by implementing the MULES::implicit in interFoam and try it.

But it may work for your case or not. but it is worth giving a try.

bye
K.Suresh kumar
rasool_soofi likes this.
kumar is offline   Reply With Quote

Old   April 1, 2010, 17:15
Default
  #30
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18
phsieh2005 is on a distinguished road
Hi, kumar,

I am excited to hear your good news. I am wondering if you will be willing to share your revised interFoam solver so that I can test it on my case. Or, if you can post the changes you made.

Pei
phsieh2005 is offline   Reply With Quote

Old   April 2, 2010, 10:32
Default
  #31
Senior Member
 
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 17
kumar is on a distinguished road
Hello Pei,
I already got my simulaiton finsished , and i see that the results are much better, but i still have to validate it by extracting the dominant wave information because i am studying breakup of liquid sheets. But i can tell you that they are closer to the case that i ran with a CFL -0.005 with an MULES::explicitsolve. But this does not mean that they are correct unless i compare it with experiments, which i am trying to do.

Anyhow regarding the changes for the solver, here is what i did,

1) cp -riuv --parents --backup applications/solvers/multiphase/interFoam $WM_PROJECT_USER_DIR

2)then i go to the $WM_PROJECT_USER_DIR and change the name to implicit_interFOAM

3)mv interFoam.C implicit_interFoam.C
4)i delete the alphaEqn.H and alphaEqnSubcycle.H
5) I copy the files alphaEqn.H and alphaEqnSubcycle.H from interPhaseChangeFoam to the current directory.

6) Then i modify the alphaEqn.H file. The modofoed file is shown below

{
word alphaScheme("div(phi,alpha1)");
word alpharScheme("div(phirb,alpha1)");

surfaceScalarField phir("phir", phic*interface.nHatf());

for (int gCorr=0; gCorr<nAlphaCorr; gCorr++)
{
surfaceScalarField phiAlpha =
fvc::flux
(
phi,
alpha1,
alphaScheme
)
+ fvc::flux
(
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
alpha1,
alpharScheme
);

// Pair<tmp<volScalarField> > vDotAlphal =
// twoPhaseProperties->vDotAlphal();
// const volScalarField& vDotcAlphal = vDotAlphal[0]();
// const volScalarField& vDotvAlphal = vDotAlphal[1]();

// volScalarField Sp
// (
// IOobject
// (
// "Sp",
// runTime.timeName(),
// mesh
// ),
// vDotvAlphal - vDotcAlphal
// );

// volScalarField Su
// (
// IOobject
// (
// "Su",
// runTime.timeName(),
// mesh
// ),
// Divergence term is handled explicitly to be
// consistent with the explicit transport solution
// divU*alpha1
// + vDotcAlphal
// );

//MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
//MULES::explicitSolve(oneField(), alpha1, phi, phiAlpha, Sp, Su, 1, 0);
MULES::implicitSolve(oneField(), alpha1, phi, phiAlpha, zeroField(), zeroField(), 1, 0);

rhoPhi +=
(runTime.deltaT()/totalDeltaT)
*(phiAlpha*(rho1 - rho2) + phi*rho2);
}

Info<< "Liquid phase volume fraction = "
<< alpha1.weightedAverage(mesh.V()).value()
<< " Min(alpha1) = " << min(alpha1).value()
<< " Max(alpha1) = " << max(alpha1).value()
<< endl;
}
And then i compile by changing the Make/files.

But to tun the case sucessfully i had to add the following lines to my fvSolution file
{
alpha1
{
maxUnboundedness 1e-5;
CoCoeff 2;
maxIter 5;
nLimiterIter 2;

solver PBiCG;
preconditioner DILU;
tolerance 1e-12;
relTol 0.1;
};
which i took from the cavitating bullet tutorial. I still have to look in to the tolerance and relTol.

I also changed the ddt schemes in the fvSchemes by setting default Euler


bye
with regards
K.Suresh kumar
kumar is offline   Reply With Quote

Old   April 2, 2010, 10:47
Default
  #32
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 334
Rep Power: 18
phsieh2005 is on a distinguished road
Thanks kumar!

I will give it a try to see if this helps with my two different cases.

Pei
phsieh2005 is offline   Reply With Quote

Old   May 18, 2011, 09:01
Default
  #33
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16
Andrea_85 is on a distinguished road
Hi Kumar,
Have you got any news?. I'm trying to simulate a two fluid system in a microchannel (dimension of the order of micron). Using MULES::explicit i got delta t =1e-7 s and the simulation takes a lot of time. In my opinion, the problem is that at the interface the parasite velocity are too big (up to 0.5 m/s!! when the inlet velocity is 1e-4 m/s) and so the time step remains small (dt=Co*dx/U).
I tried to implement the MULES::implicit, following your suggestions. The time step is still of the order of 1e-7 s and the simulation is very slow. I'm using OF 1.7.1.
Any idea why i can not increase the time step as in your case?

Thanks

andrea
rasool_soofi likes this.
Andrea_85 is offline   Reply With Quote

Old   May 18, 2011, 09:21
Default
  #34
Senior Member
 
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 17
kumar is on a distinguished road
Hi Andrea,
I would first like to ask you, what method are you using for the time discretization, are you using Crank-Nicholson or Euler implicit.

My experience with using MULES::implicit was not satisfactory, so i did not use it for my further study.

Also do you use adjustimestep for your simulation.


regards
K.Suresh kumar
kumar is offline   Reply With Quote

Old   May 18, 2011, 09:39
Default
  #35
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16
Andrea_85 is on a distinguished road
Hi Kumar, thanks for the answer.
I'm using Euler scheme for ddt and yes, i'm also using adjustable time step.
I have not tried using a fix time step and force the solver to go faster, but i guess it would crash!

andrea
Andrea_85 is offline   Reply With Quote

Old   May 18, 2011, 11:24
Default
  #36
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16
Andrea_85 is on a distinguished road
Do you have any idea to speed up my simulation? How did you solve your problem with the CFL number?

I tried to run exactly the same case as before but now with the dimension of millimiters instead of micron. Everythink is ok, the simulation time is good using Co=0.3.

Any help is appreciated

andrea
Andrea_85 is offline   Reply With Quote

Old   August 27, 2022, 19:11
Default
  #37
New Member
 
navid toussi
Join Date: Nov 2015
Posts: 20
Rep Power: 10
navidmt is on a distinguished road
Quote:
Originally Posted by Andrea_85 View Post
Do you have any idea to speed up my simulation? How did you solve your problem with the CFL number?

I tried to run exactly the same case as before but now with the dimension of millimiters instead of micron. Everythink is ok, the simulation time is good using Co=0.3.

Any help is appreciated

andrea

Hi Andrea, I was wondering If you found any solution to increase the speed of the simulation. I am facing the same issue.
navidmt is offline   Reply With Quote

Old   August 8, 2023, 20:41
Default
  #38
Member
 
Santhosh
Join Date: Nov 2021
Posts: 44
Rep Power: 5
Santhosh91 is on a distinguished road
Hello All,


It is a very interesting thread (even thought old). I am also doing simulations using interFoam for rally low capillary numbers (10^(-5) - 10^(-4)).


The issue , is for me to respect the Brackbill condition (or Galusinski and Vigneaux criterion to take into account the viscosity) with my current meshing (1-2 micrometer/cell), I need to have a courant number of 0.005 at the very least.



However, this lead to excessive waiting time to get enough time steps. Did anyone find a solution to get accurate solutions (avoiding spurious currents) for low capillary numbers problems in interFoam without blowing up the computational time ?


Thanks for any hints or suggestions!




Sincerely,
Santhosh
Santhosh91 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
InterFoam stops after deltaT goes to 1e14 francesco_b OpenFOAM Running, Solving & CFD 9 July 25, 2020 07:36
Interfoam... free surface simulation urgent lostin4ever Main CFD Forum 4 October 12, 2010 09:29
Moving from simpleFoam to interFoam with alpha = 0 kjetil OpenFOAM Running, Solving & CFD 1 November 8, 2009 21:04
Open Channel Flow using InterFoam type solver sxhdhi OpenFOAM Running, Solving & CFD 3 May 5, 2009 22:58
Dimensions of laplacian in PISO loop kumar2 OpenFOAM Running, Solving & CFD 2 July 3, 2006 15:34


All times are GMT -4. The time now is 21:34.