CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

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

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

Like Tree6Likes
  • 2 Post By magjohan
  • 2 Post By magjohan
  • 1 Post By fredo490
  • 1 Post By fredo490

Reply
 
LinkBack Thread Tools Display Modes
Old   February 15, 2012, 09:42
Lightbulb simpleFOAM: Instability problems, divergens etc... Tips (Need your input too)
  #1
New Member
 
Johan Magnusson
Join Date: Oct 2010
Posts: 14
Rep Power: 6
magjohan is on a distinguished road
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. Pre-run 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!
s.m and immortality like this.
magjohan is offline   Reply With Quote

Old   May 31, 2013, 03:31
Default
  #2
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5
s.m is on a distinguished road
Quote:
Originally Posted by magjohan View Post
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. Pre-run 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!
hi Johan,
what about initializing p and U with running the potentialFoam first? is it good?
s.m is offline   Reply With Quote

Old   May 31, 2013, 03:55
Default
  #3
New Member
 
Johan Magnusson
Join Date: Oct 2010
Posts: 14
Rep Power: 6
magjohan is on a distinguished road
Hi!

Running potentialFoam first is a good way to initialize and stabilize a simulation!
s.m and CarCin like this.
magjohan is offline   Reply With Quote

Old   May 31, 2013, 04:09
Default
  #4
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5
s.m is on a distinguished road
Quote:
Originally Posted by magjohan View Post
Hi!

Running potentialFoam first is a good way to initialize and stabilize a simulation!
is potentialFoam for inviscid fluid?
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?
s.m is offline   Reply With Quote

Old   June 2, 2013, 13:32
Default
  #5
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 233
Rep Power: 7
fredo490 is on a distinguished road
Quote:
Originally Posted by s.m View Post
1) is potentialFoam for inviscid fluid?
2) is it true that we use it for viscous fluid?
3) if is it true, we should change only the e.g simpleFoam in control to potentialFoam, doen't need to do anything else?
1) yes, it is inviscid
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.
s.m likes this.
fredo490 is offline   Reply With Quote

Old   June 2, 2013, 14:48
Default
  #6
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5
s.m is on a distinguished road
Quote:
Originally Posted by fredo490 View Post
1) yes, it is inviscid
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.
Hi Dear HECKMANN;
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
s.m is offline   Reply With Quote

Old   June 2, 2013, 14:52
Default
  #7
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 233
Rep Power: 7
fredo490 is on a distinguished road
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.
fredo490 is offline   Reply With Quote

Old   June 2, 2013, 14:53
Default
  #8
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 233
Rep Power: 7
fredo490 is on a distinguished road
Or simply take the control folder of the tutorial to run the solver.
fredo490 is offline   Reply With Quote

Old   June 3, 2013, 02:21
Default
  #9
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5
s.m is on a distinguished road
Quote:
Originally Posted by fredo490 View Post
Or simply take the control folder of the tutorial to run the solver.
Hi Dear HECKMANN,
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.03849e-06, No Iterations 8
GAMG: Solving for p, Initial residual = 2.46715e-05, Final residual = 6.65703e-08, No Iterations 6
continuity error = 0.00015572
Interpolated U error = 1.32414e-05
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

Attached Files
File Type: txt controlDict.txt (2.3 KB, 8 views)
File Type: txt fvSchemes.txt (3.2 KB, 6 views)
File Type: txt fvSolution.txt (2.2 KB, 5 views)
File Type: txt RASProperties.txt (989 Bytes, 3 views)
File Type: gz 0.tar.gz (1.1 KB, 4 views)
s.m is offline   Reply With Quote

Old   June 3, 2013, 03:14
Default
  #10
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 233
Rep Power: 7
fredo490 is on a distinguished road
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.
s.m likes this.
fredo490 is offline   Reply With Quote

Old   June 3, 2013, 03:37
Default
  #11
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5
s.m is on a distinguished road
Quote:
Originally Posted by fredo490 View Post
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.
yes, thank you very much
Best Regards.
s.m is offline   Reply With Quote

Reply

Tags
divergence, rasproperties, simplefoam, stability

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
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


All times are GMT -4. The time now is 12:22.