CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   simpleFOAM: Instability problems, divergens etc... Tips (Need your input too) (http://www.cfd-online.com/Forums/openfoam-solving/97353-simplefoam-instability-problems-divergens-etc-tips-need-your-input-too.html)

magjohan February 15, 2012 09:42

simpleFOAM: Instability problems, divergens etc... Tips (Need your input too)
 
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! :rolleyes:


Cheers!

s.m May 31, 2013 02:31

Quote:

Originally Posted by magjohan (Post 344588)
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! :rolleyes:


Cheers!

hi Johan,
what about initializing p and U with running the potentialFoam first? is it good?

magjohan May 31, 2013 02:55

Hi!

Running potentialFoam first is a good way to initialize and stabilize a simulation!

s.m May 31, 2013 03:09

Quote:

Originally Posted by magjohan (Post 431124)
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?

fredo490 June 2, 2013 12:32

Quote:

Originally Posted by s.m (Post 431127)
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 June 2, 2013 13:48

Quote:

Originally Posted by fredo490 (Post 431482)
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:)

fredo490 June 2, 2013 13:52

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 June 2, 2013 13:53

Or simply take the control folder of the tutorial to run the solver.

s.m June 3, 2013 01:21

5 Attachment(s)
Quote:

Originally Posted by fredo490 (Post 431493)
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:)


fredo490 June 3, 2013 02:14

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 June 3, 2013 02:37

Quote:

Originally Posted by fredo490 (Post 431556)
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.

masoudsh June 20, 2016 16:10

Hi

I have this problem too
--> FOAM FATAL ERROR:
No valid model for viscous stress calculation.

From function forces::devRhoReff()

can anybody help me?

thanks
masoud


All times are GMT -4. The time now is 00:56.