CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   cannot set exact 'endtime' in controlDict when using a steady state solver (https://www.cfd-online.com/Forums/openfoam-solving/204440-cannot-set-exact-endtime-controldict-when-using-steady-state-solver.html)

minecraftgp July 23, 2018 18:16

cannot set exact 'endtime' in controlDict when using a steady state solver
 
Hi everyone
I am new to openFoam and I am doing simulation on CO2 diffusion in a room. I want to know the distribution of CO2 concentration in the room after 1 hour and For time saving I used a steady state solver.

I firstly set 3600 for the 'endtime' and 10 for 'delTaT' in controlDict for the simulation. Then I doubled both the 'endtime' and 'delTaT' and do the simulation again and I got the exact same results for the two modeling!

It seems that in the steady state simulation only endTime/delTaT make sense since it control the iterations of the modeling. And I guess set 3600 for the 'endtime' doesnt mean the endtime in modeling is 1 hour?

What should I do if I want to set the exact endtime using a steady state solver?

pete20r2 July 23, 2018 21:46

It's a steady state solver mate, the time means nothing.
Set your deltaT to 1 so at least you can use it as an iteration counter.

minecraftgp July 23, 2018 22:24

Quote:

Originally Posted by pete20r2 (Post 700198)
It's a steady state solver mate, the time means nothing.
Set your deltaT to 1 so at least you can use it as an iteration counter.

Hi Peter, thanks for your reply!

I do set the deltaT to 1 for the simulation but I just have no clue about the result. I think what I get for each folder (1,2,3...) is the room condition after (1,2,3...) iterations, like you said, an iteration counter. But what i really want is to know the time interval for each iteration, or the room condition after xxx seconds.

Basicly you are saying that the concept of time is not exist in steady state modeling? So does it mean that we could only use a trasient solver to implement exact time control?

I tried trasient solver but it is really time consuming since I need to set a very small delTaT to limit courant number under 1. So.. are there any other ways to do that?

pete20r2 July 23, 2018 22:51

Quote:

Originally Posted by minecraftgp (Post 700199)
Hi Peter, thanks for your reply!

I do set the deltaT to 1 for the simulation but I just have no clue about the result. I think what I get for each folder (1,2,3...) is the room condition after (1,2,3...) iterations, like you said, an iteration counter. But what i really want is to know the time interval for each iteration, or the room condition after xxx seconds.

Basicly you are saying that the concept of time is not exist in steady state modeling? So does it mean that we could only use a trasient solver to implement exact time control?

I tried trasient solver but it is really time consuming since I need to set a very small delTaT to limit courant number under 1. So.. are there any other ways to do that?

You are correct, think of the steady state solver as the result if you were to leave the room for a very long time. If it's working properly, there should not be any development of the fields and the residuals should drop to some low number (1e-3 or less depending on your needs).

A transient solver is what you need if you want to watch the fields develop over time.
There are some things you can do to speed it up but it will always be more time consuming than steady state.
1. Use geometric simplification
Can you run in 2d and get a meaningful result?
Is the case axisymmetric?
Is the case mirrored?
2. Coarsen you mesh and refine only where needed.
3. Use wall functions
4. You can run CFL > 1 with implicit schemes at the cost of accuracy

RobertHB July 24, 2018 05:13

Quote:

Originally Posted by pete20r2 (Post 700200)
[...] and the residuals should drop to some low number (1e-3 or less depending on your needs).

In many cases a residual of 1e-3 will not be the steady-state of your simulation. Try aiming for at least 1e-4, better for 1e-6 [1].


We did not talk about the solver in use here. From my experience, if you only want to solve the diffusion of a species, try using scalarTransportFoam. It usually runs pretty quickly.


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