CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   How to pause a transient simulation and resume without time step advancement? (http://www.cfd-online.com/Forums/main/86554-how-pause-transient-simulation-resume-without-time-step-advancement.html)

aleisia March 25, 2011 16:33

How to pause a transient simulation and resume without time step advancement?
 
I want to check transient simulation or reset some under-relaxation factors during the process, how to pause and make the necessary changes and resume the calculation without time step advancement(i.e. keeping at the same time step)?
Thanks!

ghost82 September 17, 2011 04:01

Hi, I'm searching the same info..noone knows?

ghost82 September 17, 2011 04:36

I think it is not possible to pause a transient simulation without losing the timestep, but here is a workarond:

- Cancel (pause) the simulation and do the modifications you have to do; this will cause the loss of the time step.
- Set the time step to a lower value than the default one and make the simulation converge once. You will have data referred to a time near the one you lose (t+small time step=about t).
-On the second iteration cancel (pause the simulation) and re-set the time step to your default one (t+small time step+deltat=about t+deltat).

Hope this helps.

Daniele

leflix September 17, 2011 08:27

Hi,

Actually I really don't understand where is your problem !!
Every well programmed and efficient code has the facility to restart from a previously stored solution at a given time step.
Once the solution is stored, you can modify the parameters you want, time step, underrelaxation factors, reynolds number,.... what ever you want.
You can even refine the mesh, if you are able to interpolate the stored solution on the new mesh before to restart.

Isn't it what you need ? But perhaps, I have not well understood your real problem

hosseinhgf December 5, 2011 07:30

I have this problem with fluent.

arjun December 5, 2011 08:47

Quote:

Originally Posted by leflix (Post 324503)
Hi,

Actually I really don't understand where is your problem !!
Every well programmed and efficient code has the facility to restart from a previously stored solution at a given time step.
Once the solution is stored, you can modify the parameters you want, time step, underrelaxation factors, reynolds number,.... what ever you want.
You can even refine the mesh, if you are able to interpolate the stored solution on the new mesh before to restart.

Isn't it what you need ? But perhaps, I have not well understood your real problem


In my knowledge there is only ONE code that could stop the calculation and start without any sort of hitch is the one that I wrote for my company. All the other codes including fluent and startccm+ can not do clean restart.

leflix December 10, 2011 19:14

Quote:

Originally Posted by arjun (Post 334669)
In my knowledge there is only ONE code that could stop the calculation and start without any sort of hitch is the one that I wrote for my company. All the other codes including fluent and startccm+ can not do clean restart.

Oh come on Arjun !!!!
there is nothing simpler than that !! every undergraduate student I have can do this !!!! lol
And I can't imagine that fluent or starCD ask people to pay 5000 $ /year for a licence without being able to perform a proper restart !!

arjun December 10, 2011 19:44

Quote:

Originally Posted by leflix (Post 335403)
Oh come on Arjun !!!!
there is nothing simpler than that !! every undergraduate student I have can do this !!!! lol
And I can't imagine that fluent or starCD ask people to pay 5000 $ /year for a licence without being able to perform a proper restart !!

It is true fluent and starCCM+ can not do proper restart. In fact , this is one of the issue we have discussed few times with CD Adapco and they have yet to improve. On 14th dec at user conference at osaka again this is going to be one of the point of discussion.

Here is the reason why can not do proper restart. The problem is that they dump all the variables in restart file but mass fluxes at cell faces are not written. When you restart these fluxes are calculated prior to iterations. There is Rhie chow term in flux which is supposed to be 0 ideally. But in reality this is not zero and is not available at restart time. This is why when you restart continuity residual fluctuates . Some times this fluctuation is significant ( and usually not very significant and not noticable. ).

To do a perfect restart solver needs to construct mass fluxes and these rhie chow contribution properly. Both fluent and starccm can not do it now. May be after this meeting cd adapco will improve in coming versions.

leflix December 10, 2011 19:50

ok fine !!!! I see your point ! It's true that we must pay attention to this point . It's hard to believe that Fluent or Simple missed this point ! Ok I will ask them to reembourse me since ten years of licence fees !!! lol

arjun December 10, 2011 19:56

Quote:

Originally Posted by leflix (Post 335405)
ok fine !!!! I see your point ! It's true that we must pay attention to this point . It's hard to believe that Fluent or Simple missed this point ! Ok I will ask them to reembourse me since ten years of licence fees !!! lol


It is not that they missed the point, it may very well be deliberate. We dump all the fluxes in restart file and this increase the size of file considerably. So for fluent and ccm part it is reasonable this to assume that rhie chow terms are 0, after all near convergence theoretically they are 0. And if simulation is not near convergence there is no point in perfect restart. (they write restart data in sim and .dat files which may be written at some frequency and could be a very large number of them).


We handled the problem of large restart file by adopting different scheme than ccm and fluent. They could also give user an option to chose schemes of restart. So that if it matters to someone they could chose different way of writing restart files.

leflix December 10, 2011 19:58

for which compagny or code are you working for ?

arjun December 10, 2011 20:02

Quote:

Originally Posted by leflix (Post 335407)
for which compagny or code are you working for ?


I will PM that.

arjun January 2, 2012 22:45

Update
 
Here is an update.

Had discussion with mr. Peric about restart problem with starCCM+ (discussion was about lots of things but restart was one of them).

He said that he has not observed the problem but if it exists it may be down to the issue that restart file is written in some precision and read into another precision. It seems starccm+ is mixed precision solver so there is a possibility of this.

He (Mr. Peric) also said that mass fluxes are written in restart file and thus restart shall not be a problem.

In the end, next release of starcmm+ MIGHT (notice the word) be fully double precision and users shall not worry. It will be taken care of.

cfdnewbie January 3, 2012 14:48

Quote:

Originally Posted by arjun (Post 337611)
Here is an update.
He said that he has not observed the problem but if it exists it may be down to the issue that restart file is written in some precision and read into another precision. It seems starccm+ is mixed precision solver so there is a possibility of this.

Just out of curiosity: is this variable order of accuracy often used in commercial CFD software? I had read about it (on a tentative level in terms of Exascale computing), but wasn't aware that it is already in use....

it feels like one should be very careful when and how to use it, and that it could only be implemented by the "core" people that know their code very well....

cheers!

arjun January 3, 2012 19:20

Quote:

Originally Posted by cfdnewbie (Post 337711)
Just out of curiosity: is this variable order of accuracy often used in commercial CFD software? I had read about it (on a tentative level in terms of Exascale computing), but wasn't aware that it is already in use....

Yes yes, it is like that. Some variables are set to single precision and some of them are double precision. But it is not often used in commercial solvers (at least this is what I think). For example Fluent gives user an option to chose from single precision and double precision so it is definitely out.

About starccm+ it seems they will also move to completely double precision. Or at least this is what i got impression from. During the discussion i mentioned how sometimes mixed precision solver would diverge and for the same case double precision version would work and Mr. Peric agreed about it.



Quote:

Originally Posted by cfdnewbie (Post 337711)

it feels like one should be very careful when and how to use it, and that it could only be implemented by the "core" people that know their code very well....

cheers!

The problem comes when the code is used by myriad of other people who use them with various problems, some of them these 'core' people could not envisage.

duri January 4, 2012 13:35

Hi Arjun,

Fluxes are calculated from the previous iteration. So it is possible to calculate all fluxes when we restart the run. Why this is not possible?

Quote:

Originally Posted by arjun (Post 335404)
There is Rhie chow term in flux which is supposed to be 0 ideally. But in reality this is not zero and is not available at restart time.

What additional data is required to calculate Rhie chow flux which is not available in last iteration?. Could you explain it.

leflix January 4, 2012 17:52

Quote:

Originally Posted by duri (Post 337874)
Hi Arjun,

Fluxes are calculated from the previous iteration. So it is possible to calculate all fluxes when we restart the run. Why this is not possible?



What additional data is required to calculate Rhie chow flux which is not available in last iteration?. Could you explain it.


I fully agree with Duri ! I really don't see where is the problem? If you have stored the velocity and the pressure, then you can recompute the mass flux including Rhie and Chow interpolation.
What did we miss Arjun?

arjun January 5, 2012 09:11

Quote:

Originally Posted by leflix (Post 337905)
I fully agree with Duri ! I really don't see where is the problem? If you have stored the velocity and the pressure, then you can recompute the mass flux including Rhie and Chow interpolation.
What did we miss Arjun?


There are two things:

1. If the question is that whether you can reconstruct the flux from velocity and pressure ONLY, then the answer is NO.

The thing you guys missed is the variable called Ap or momentum matrix diagonal coefficient. It (actually three of them) is also needed in Rhie Chow terms.

So the question is whether to store AP and then reconstruct the fluxes or just store the fluxes and do not run extra functions to reconstruct the fluxes.

2. In ideal world, storing three APs would do the job in reconstructing fluxes but in real world, fluxes are calculated in two steps
(a) unbalanced fluxes are calculated and pressure correction is solved.
(b) unbalanced fluxes are corrected based on pressure correction's gradients. These gradients of pressure corrections are often treated to avoid velocity shoot ups. So in this case, the mass flux calculated can not be exactly calculated from Vel, AP and pressure alone. (This is usually not mentioned in manuals so you would have to take my word on it. You can disagree with it if you wish).

leflix January 5, 2012 11:13

Quote:

Originally Posted by arjun (Post 337973)

The thing you guys missed is the variable called Ap or momentum matrix diagonal coefficient. It (actually three of them) is also needed in Rhie Chow terms.
....
2. In ideal world, storing three APs would do the job in reconstructing fluxes but in real world, fluxes are calculated in two steps

Ok I see what you mean Arjun ! But in any case you can always recompute AP too if you don't want to store it.
Ap is computed from the sum of AK ( K stands for E, W, N, S , B, T the neighbours coefficients ) from density and time step)
AK's are computed from mass flux (i.e velocity) and metric (surface, distance, normal, volume associated to each control volume)

So it is always possible to recompute everything exactly the same way you do when you start your computation from rest (U=V=W=0 and P=0 )
The only difference would be that velocity and pressure would be different from zero this time and will have the values taht you should have stored.

To me it's really not an issue...

arjun January 5, 2012 18:02

Quote:

Originally Posted by leflix (Post 337994)
Ok I see what you mean Arjun ! But in any case you can always recompute AP too if you don't want to store it.
Ap is computed from the sum of AK ( K stands for E, W, N, S , B, T the neighbours coefficients ) from density and time step)
AK's are computed from mass flux (i.e velocity) and metric (surface, distance, normal, volume associated to each control volume)

..

These Ak's need mass fluxes as you pointed out and the mass fluxes need Rhie chow. Which is what we want to compute from Ak. So it is catch 22. For Ak need Fluxes AND for Fluxes need Ak.


All times are GMT -4. The time now is 10:32.