
[Sponsors] 
simpleFOAM: Instability problems, divergens etc... Tips (Need your input too) 

LinkBack  Thread Tools  Display Modes 
February 15, 2012, 09:42 
simpleFOAM: Instability problems, divergens etc... Tips (Need your input too)

#1 
New Member
Johan Magnusson
Join Date: Oct 2010
Posts: 14
Rep Power: 6 
Okey, I've been working with the simpleFoam solver for a while now with a lot of problems but I think i've found some basic steps to get a simulation stable.
1. Be sure you are using the correct BCs. 2. Check BCs again (they are almost always the problem). 3. Be sure you are using the correct schemes (do you need bounded or not), most of the time its enough with original settings. 4. Prerun the simulation about 100 iterations with turbulence OFF (constant/RASProperties). 5. Copy the missing fields from 0/ folder to 100/ folder (R, nuTilda etc). 6. Turn on turbilence. 7. Simulate! This helps me a lot and gives me good results quick without troubles with divergence of epsilon and k etc (I've scripted this now). It would in addition to this be very good if we could help each other to come up with tips&tricks to get the solutions stable. Mostly to be able to compete with solvers such and Fluent, CFX! Cheers! 

May 31, 2013, 03:31 

#2  
Senior Member
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5 
Quote:
what about initializing p and U with running the potentialFoam first? is it good? 

May 31, 2013, 03:55 

#3 
New Member
Johan Magnusson
Join Date: Oct 2010
Posts: 14
Rep Power: 6 
Hi!
Running potentialFoam first is a good way to initialize and stabilize a simulation! 

May 31, 2013, 04:09 

#4  
Senior Member
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5 
Quote:
is it true that we use it for viscous fluid? if is it true, we should change only the e.g simpleFoam in control to potentialFoam, doen't need to do anything else? 

June 2, 2013, 13:32 

#5  
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 233
Rep Power: 7 
Quote:
2) why not ? We just want to get a first rough solution of the flow in order to simplify the convergence. It is used to "guess" (with a negligible computation cost) the global flow behavior. Therefore the solver (simpeFoam here) can easily find the actual solution (because the initial solution given by potentialFoam is closer to the reality than a uniform initialization). 3) it is a way to do it. You can run it in a separate case or in your simpleFoam case by adding the suitable control variables. 

June 2, 2013, 14:48 

#6  
Senior Member
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5 
Quote:
i use the the 0,constant and the system folder that i have used for running the simpleFoam, but i just write the potentialFoam instead of simpleFoam in the controlDict. but running this new case with potentialFoam give me the below error, > FOAM FATAL ERROR: No valid model for viscous stress calculation. From function forces::devRhoReff() in file forces/forces.C at line 113. FOAM exiting do you know how should i run the potentialFoam? i want it for initializing. thank you very much 

June 2, 2013, 14:52 

#7 
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 233
Rep Power: 7 
It looks like you compute the forces (drag and lift) and it bugs because it would like to get the pressure and viscous force over your model but as potential foam is inviscid, there is no viscous force.
Go to your control file and quote / comment. The Parr about forces. 

June 2, 2013, 14:53 

#8 
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 233
Rep Power: 7 
Or simply take the control folder of the tutorial to run the solver.


June 3, 2013, 02:21 

#9  
Senior Member
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5 
Quote:
thank you very much for your guidance. i deactivated the force function that it was written in controlDict, and then run the potentialFoam, but it ended after 11s. it didn't do eny iteration. Create time Create mesh for time = 0 Reading field p Reading field U Calculating potential flow GAMG: Solving for p, Initial residual = 1, Final residual = 0.00063372, No Iterations 13 GAMG: Solving for p, Initial residual = 0.00128126, Final residual = 1.03849e06, No Iterations 8 GAMG: Solving for p, Initial residual = 2.46715e05, Final residual = 6.65703e08, No Iterations 6 continuity error = 0.00015572 Interpolated U error = 1.32414e05 ExecutionTime = 10.93 s ClockTime = 11 s End i attach my files of system folder, would you please take look on them and tell me where is my fault? thank you very much 

June 3, 2013, 03:14 

#10 
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 233
Rep Power: 7 
potentialFoam only write the velocity (in the 0 folder), not the pressure. If you also want the pressure, you need to use the command "potentialFoam writep" (or something like that). It doesn't make any new folder, the data are written in the "0" folder so don't forget to backup your original "0" folder.


June 3, 2013, 03:37 

#11  
Senior Member
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5 
Quote:
Best Regards. 

Tags 
divergence, rasproperties, simplefoam, stability 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Problems with the RSM in simpleFoam  sberg  OpenFOAM Running, Solving & CFD  10  February 25, 2014 20:39 
SimpleFoam convergence problems  brahim  OpenFOAM Running, Solving & CFD  19  May 31, 2013 11:55 
how can i give input for radiation problems  balaji  FLUENT  2  April 2, 2008 15:45 
SimpleFoam convergence problems  schnitzlein  OpenFOAM Running, Solving & CFD  6  June 24, 2005 10:51 
Problems of numerical instability because of high gradients  Xiangyang Ye  Main CFD Forum  4  September 28, 1998 04:48 