
[Sponsors] 
March 6, 2010, 01:34 

#21 
Member
Mohammad Zakerzadeh
Join Date: Dec 2009
Location: Aachen, Germany
Posts: 40
Rep Power: 9 
Sponsored Links
In my opinion, yes! I check my velocity field and it seemed OK! The courant was about 0.40.8 at first and now it reduced so much. Do you resolve your case with very small DeltaT? Sincerely 

Sponsored Links 
March 7, 2010, 01:17 

#22  
Member
Join Date: Dec 2009
Posts: 46
Rep Power: 9 
Quote:
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 .. 

March 7, 2010, 01:45 

#23 
Member
Mohammad Zakerzadeh
Join Date: Dec 2009
Location: Aachen, Germany
Posts: 40
Rep Power: 9 
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 

March 7, 2010, 07:46 

#24 
Senior Member
PeiYing Hsieh
Join Date: Mar 2009
Posts: 314
Rep Power: 11 
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 (< 1e8) 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 

March 13, 2010, 09:36 

#25 
Senior Member
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 10 
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 immisciblefluid and free surface flows" Chemical Engineering Journal 141 (2008) 204221. In this paper it has been specified that the intergamma 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 

March 16, 2010, 06:35 

#26 
New Member
Denis Semyonov
Join Date: Mar 2009
Posts: 13
Rep Power: 10 
Probably this tread
http://www.cfdonline.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. 

March 29, 2010, 12:52 

#27 
Senior Member
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 10 
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 

March 29, 2010, 16:02 

#28 
Senior Member
PeiYing Hsieh
Join Date: Mar 2009
Posts: 314
Rep Power: 11 
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 surfacetension and the results for capillaryrise etc. were significantly less accurate. Pei 

April 1, 2010, 04:15 

#29 
Senior Member
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 10 
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 CFL0.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 

April 1, 2010, 16:15 

#30 
Senior Member
PeiYing Hsieh
Join Date: Mar 2009
Posts: 314
Rep Power: 11 
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 

April 2, 2010, 09:32 

#31 
Senior Member
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 10 
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 1e5; CoCoeff 2; maxIter 5; nLimiterIter 2; solver PBiCG; preconditioner DILU; tolerance 1e12; 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 

April 2, 2010, 09:47 

#32 
Senior Member
PeiYing Hsieh
Join Date: Mar 2009
Posts: 314
Rep Power: 11 
Thanks kumar!
I will give it a try to see if this helps with my two different cases. Pei 

May 18, 2011, 08:01 

#33 
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 312
Rep Power: 9 
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 =1e7 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 1e4 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 1e7 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 

May 18, 2011, 08:21 

#34 
Senior Member
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 10 
Hi Andrea,
I would first like to ask you, what method are you using for the time discretization, are you using CrankNicholson 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 

May 18, 2011, 08:39 

#35 
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 312
Rep Power: 9 
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 

May 18, 2011, 10:24 

#36 
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 312
Rep Power: 9 
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 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
InterFoam stops after deltaT goes to 1e14  francesco_b  OpenFOAM Running, Solving & CFD  8  July 31, 2013 02:29 
Interfoam... free surface simulation urgent  lostin4ever  Main CFD Forum  4  October 12, 2010 08: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 21:58 
Dimensions of laplacian in PISO loop  kumar2  OpenFOAM Running, Solving & CFD  2  July 3, 2006 14:34 
Sponsored Links 