CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   convergence for transient/steady state simulation (https://www.cfd-online.com/Forums/cfx/21495-convergence-transient-steady-state-simulation.html)

Gab August 2, 2005 10:51

convergence for transient/steady state simulation
 
Hi, all

I am currently doing transient calculations because it's difficult to converge with steady state simulation for a multiphase modelling. If I run the problem as steady state, the best RMS I reach is 10^-2. After switching to transient model, it's very easy to reach 10^-5.

I have couple of questions here,

1. Can someone explain how to judge the convergence for a transient simulation? Should I run till RMS does not change significantly or just need to reach a certain RMS value as in steady state simulation

2. How can I check gas hold in my reactor in CFX-post with transient solution? Should I use a average value of many steps or simply just use the final step solution?

3. Theoritically, is it always correct to use transient solution to assist with convergence? I found it always very easy to meet the convergence criteria with transient simulation and the computation time does not increase.

I would appreciate your any input for my questions.

Best regards!

Gab


Glenn Horrocks August 2, 2005 18:57

Re: convergence for transient/steady state simulat
 
Hi,

To answer your questions: 1) The guide as to convergence level for transient simulations is the same as for steady state, in terms of RMS/MAX residuals and imbalances (if appropriate).

2) and 3) When you use a transient simulation to get what you believe is a steady state answer, what you are doing is physically advancing the flow in real time and letting the flow settle itself out. If the flow really is steady state then the simulation should steady out and every timestep is the same. If the flow is transient, then you will need to do some sort of averaging - if the flow is oscillatory (eg a vortex street) then averaging over a cycle or two should be OK, but if it is chaotic (eg LES simulation) you will need to do some homework and determine what is the longest important timescale and make sure you include that. Obviously if the final flow is transient you cannot use the final timestep flowfield alone to represent the "averaged" flowfield, but you need some sort or average over an appropriate timescale.

You will almost always get individual timesteps to converge when you use a transient simulation - you just need to get the time steps small enough. However, to get a useful answer you will usually need to do many timesteps until the result does not change between timesteps.

Regards, Glenn Horrocks

Gab August 2, 2005 20:04

Re: convergence for transient/steady state simulat
 
Hello, Glenn

Thank you very much for the answers.

In my case, I use the the transient flow fields(met the convergence level) as initial condition for tracer test simulation. Unfortunitely the tracer curve does not go smoothly. As from your comments, I think I may need to either run my transient solution for more steps till getting a stable solution, or use avergerage flow fields.

So, are there some easy tools in CFX-post or cfx-pre to get a average flow field over one or several steps?

Best regards!

Gab

Glenn Horrocks August 3, 2005 18:22

Re: convergence for transient/steady state simulat
 
Hi,

In CFX-Pre under the output options panel have a look at the "transient statistics" tab. That can give various statistical values, and using monitor points you can output values.

I don't know of anyway to generate an averaged flow field to view in CFX-Post, however. You could generate one using fortran or some post-processing I guess.

Regards, Glenn Horrocks

Gab August 4, 2005 11:45

Re: convergence for transient/steady state simulat
 
Thanks, Glenn

Best regards!

Gab

juliom May 28, 2012 14:59

Dear all. I know this is a very old post, but I was reading the post and I found it very interesting.
I have a question, and I think that you have hada too.
Why when we have a steady problem convergence, people should say: he run it in transient and that`s it!!!
Why does it happen?
I know about the time marching method of ansys, but theoretically what is happeng withing the solver!!
thanks!!!

ghorrocks May 28, 2012 18:46

Quote:

Why when we have a steady problem convergence, people should say: he run it in transient and that`s it!!!
Not at all. Going to transient simulations is the option of last resort. This FAQ describes a more complete list of options: http://www.cfd-online.com/Wiki/Ansys...gence_criteria


If a flow is indeed transient then the steady state solver will have a hard time converging as there is no steady state solution. Then obviously you need to run transient to obtain convergence. But failure to converge in steady state can be caused by many factors other than this, so do not assume that all convergence issues are solved by transient simulations.

juliom May 29, 2012 07:58

Thanks Glenn
But, when should we run it in transient???
Are "wiggles" a symptom, or reason to run problems in transient?

ghorrocks May 29, 2012 08:00

This is all explained in the FAQ I linked to previously.

MuhammadK June 8, 2012 01:35

Quote:

Originally Posted by Glenn Horrocks
;72801
Hi,

To answer your questions: 1) The guide as to convergence level for transient simulations is the same as for steady state, in terms of RMS/MAX residuals and imbalances (if appropriate).

2) and 3) When you use a transient simulation to get what you believe is a steady state answer, what you are doing is physically advancing the flow in real time and letting the flow settle itself out. If the flow really is steady state then the simulation should steady out and every timestep is the same. If the flow is transient, then you will need to do some sort of averaging - if the flow is oscillatory (eg a vortex street) then averaging over a cycle or two should be OK, but if it is chaotic (eg LES simulation) you will need to do some homework and determine what is the longest important timescale and make sure you include that. Obviously if the final flow is transient you cannot use the final timestep flowfield alone to represent the "averaged" flowfield, but you need some sort or average over an appropriate timescale.

You will almost always get individual timesteps to converge when you use a transient simulation - you just need to get the time steps small enough. However, to get a useful answer you will usually need to do many timesteps until the result does not change between timesteps.

Regards, Glenn Horrocks

Hi Glenn,

I had run my simulation, its a model structure inside a wind tunnel. It didn't converge, and I had a run with transient analysis. However, after running for a few days, it does not converge. What I had was;
total time = 2[s]
timesteps = 0.005 [s]

What could be possible source(s) of error?

Thanks.

Muhammad

ghorrocks June 8, 2012 01:42

My post from seven years ago tells you exactly what to do - you need smaller time steps (assuming the basic setup of the simulation is correct).

Mina_Shahi August 14, 2012 04:33

Quote:

Originally Posted by ghorrocks (Post 365373)
My post from seven years ago tells you exactly what to do - you need smaller time steps (assuming the basic setup of the simulation is correct).


Hi Glenn

I am simulating a mixing flow inside a chamber (with rectangular cross section) I used SST turbulence model for steady state simulation. and i used two king of mesh : structural and unstructured.
With the structural mesh i didn't have any problem in convergence , the residual decreased very smoothly while for the unstructured mesh it decreased to some level and then it start oscillating. so i changed the discritzation method from high resolution to upwind (after 100 iteration) and also changed the time step to very big value , then it converged to 1e-5. (while still had oscillation) . but My results show that the velocity profile in some sections are not symmetric with respect to the centerline and also the mass concentration of spices. i don't know what is the reason or how to explain these asymmetric results!!!
the results obtained from structured mesh are symmetric and changing the size of element didn't change the flow field that much.

I will appreciate any help from you.

Thank you
Mina

ghorrocks August 14, 2012 07:55

Can you post some images of what you are seeing?

Mina_Shahi August 14, 2012 08:26

2 Attachment(s)
Quote:

Originally Posted by ghorrocks (Post 377018)
Can you post some images of what you are seeing?


Attachment 15161

Attachment 15160


after 100 iteration you can see a sudden change this is because of changing from upwind to high resolution scheme . as i mentioned with high resolution i didn't have convergence so i first start with upwind and then switch to high resolution and then increased the time step.

thank you

Mina_Shahi August 14, 2012 08:29

1 Attachment(s)
Quote:

Originally Posted by Mina_Shahi (Post 377028)
Attachment 15161

Attachment 15160


after 100 iteration you can see a sudden change this is because of changing from upwind to high resolution scheme . as i mentioned with high resolution i didn't have convergence so i first start with upwind and then switch to high resolution and then increased the time step.

thank you

Attachment 15162

this figure shows the convergence of model by using structured mesh

Mina_Shahi August 14, 2012 08:55

1 Attachment(s)
Dear Glenn

the graph i showed is relatet to the coarser mesh, but you can see assymetric behaviour for finer mesh as well you can see in this attached graph comparing the velocity profile for three different mesh sizes.

the assymetric behaviour is more clear for coarse mesh but it can be also seen for two other meshes as well.

Attachment 15164

ghorrocks August 14, 2012 19:12

It appears your unstructured mesh is of a low enough quality that is making convergence harder than the structured mesh (which appears to have a higher mesh quality). This is also leading to other problems such as a non-physical assymetry.

juliom August 14, 2012 19:27

Dear Mina,
Sometime it is not because of the mesh quality. I have had very good unstructured mesh, (Quality above 0.4 and skeness under 0.65).
With this quality of mesh it is almost sure you can get congervence with easy physics, but, regardless I do I have had never gotten convergence with some simualtions, for example, vertical separator, usign just air as "test".
There are a lot of information about this topic! and I would liek to know the real Why!!!
Regards
Julio M

Mina_Shahi August 15, 2012 04:04

1 Attachment(s)
Quote:

Originally Posted by ghorrocks (Post 377119)
It appears your unstructured mesh is of a low enough quality that is making convergence harder than the structured mesh (which appears to have a higher mesh quality). This is also leading to other problems such as a non-physical assymetry.

Thanks for the answer,
But i don't think that it is just because of quality. the flow in really is unstable due to acoustic and if you monitor pressure inside the chamber you will see pressure velocity and ... are osculating. actually my geometry is a combustion chamber and and we have mixing of ch4 and air. and in this condition (special mass flow of air and ch4) we have unstable flame. so we have to also use combustion model but first i wanted to model the cold flow to see the effect of mesh.
this is pressure inside the chamber obtained from experiment:

Attachment 15184


what i want to say is that this flow (even cold flow without combustion) is unstable, so i think this oscillation in residual of steady state calculation may come from that!!!!! but then the question is why it is not that clear in structured mesh. What do you think?

ghorrocks August 15, 2012 07:54

Can you post an image of what you are modelling and your CCL?

Mina_Shahi August 15, 2012 08:18

2 Attachment(s)
Quote:

Originally Posted by ghorrocks (Post 377195)
Can you post an image of what you are modelling and your CCL?


this is the geometry i am dealing with:


Attachment 15194

Attachment 15193


i have two inlets: one is for ch4 (mass flow rate is defined) and one is for air (velocity is given)
i have outlet which is zero pressure
and finally nonslip adiabatic walls

the turbulence model is SST

ghorrocks August 15, 2012 18:38

Your mesh does not look very good quality. You have massive jumps in element size and terrible aspect ratios. This mesh is going to give very inaccurate results. I would not trust any results from that mesh.

juliom August 15, 2012 21:55

Dear Mina,
Can you share with us your mesh information, Quality, skewness etc.
I agree with Glenn, you have some jumps which will led you to some numerical problems.
Regards

Mina_Shahi August 16, 2012 03:21

Quote:

Originally Posted by ghorrocks (Post 377276)
Your mesh does not look very good quality. You have massive jumps in element size and terrible aspect ratios. This mesh is going to give very inaccurate results. I would not trust any results from that mesh.

what can i do? i have very narrow space 3 mm and over there i need some elements, or in the fulel inlet i have 1 mm dimension , which i need some elements there ...

on the other hand if i want to keep the same dimension in other region then the mesh will be huge ...


and according to CFX solver when it first check the mesh : Aspect ratio is OK (17) (WITH CAPITAL LETTER WHICH MEANS IT IS VERY GOOD) Expansion factor is ok (15)(with small letter which means acceptable), orthogonality angle is ok (37)(with small letter which means acceptable) but for the unstructured mesh orthogonality angle is (!) (which means has problem)

and i don't know how to fix problem with orthogonality factor.

about skewness the min value (1e-5) and the average (0.2) are ok but the max is 0.99 which should be a bit less. (in unstructured mesh)

Mina_Shahi August 16, 2012 04:22

1 Attachment(s)
Attachment 15203


this shows that the quality of my mesh is ok at least for structured case.

ghorrocks August 16, 2012 07:52

Quote:

this shows that the quality of my mesh is ok at least for structured case.
:) If only it were that simple.....

Trust me, your structured mesh is terrible and it is making your results rubbish.

The CFX OK/ok/! categories are just guides and are not applicable to all simulations. Some simulations require high quality meshes, some are tolerant of lower quality meshes. Also these simple metrics do not capture all types of poor mesh quality.

Quote:

what can i do? i have very narrow space 3 mm and over there i need some elements, or in the fulel inlet i have 1 mm dimension , which i need some elements there ...
Generating a quality mesh in difficult geometries is one of the very challenging (and often underestimated) skills required for a good CFD analysis. Practise, experience, training and lots of experimenting is requierd to generate quality meshes.

Can you post an image of the unstructured mesh?

juliom August 16, 2012 08:00

Dear Mina, I don usually use the information from CFX solver. What I do is, I use the quality report from ICEM CFX.
From your case, I see one important thing, your skewness is to high. As I told you before. I have worked with unstructured mesh and I have gotten very good meshes with skewness bellow of 0.65, but in your case is 0.99. I think CFX recommends until 0.8. As Glenn said, I would not trust in the results you are getting from the solver

Mina_Shahi August 16, 2012 08:02

1 Attachment(s)
Quote:

Originally Posted by ghorrocks (Post 377355)
:) If only it were that simple.....

Trust me, your structured mesh is terrible and it is making your results rubbish.

The CFX OK/ok/! categories are just guides and are not applicable to all simulations. Some simulations require high quality meshes, some are tolerant of lower quality meshes. Also these simple metrics do not capture all types of poor mesh quality.



Generating a quality mesh in difficult geometries is one of the very challenging (and often underestimated) skills required for a good CFD analysis. Practise, experience, training and lots of experimenting is requierd to generate quality meshes.

Can you post an image of the unstructured mesh?


Sure , but probably you would say the same for this one :)
becasue i already knew that the results by using this mesh are very bad

Attachment 15209

Mina_Shahi August 16, 2012 08:07

Quote:

Originally Posted by juliom (Post 377356)
Dear Mina, I don usually use the information from CFX solver. What I do is, I use the quality report from ICEM CFX.
From your case, I see one important thing, your skewness is to high. As I told you before. I have worked with unstructured mesh and I have gotten very good meshes with skewness bellow of 0.65, but in your case is 0.99. I think CFX recommends until 0.8. As Glenn said, I would not trust in the results you are getting from the solver

yes i know the maximum skewness is high for unstructured mesh, but not for structured grid. and ok ok Ok is what CFX solver gives me for structured.
for unstructured as i told before it shows (!)

ghorrocks August 16, 2012 18:27

Quote:

Sure , but probably you would say the same for this one
At that scale I cannot see anything wrong with it. But you need to look closer to be sure.

What I am looking for is the size of adjacent elements - there should be no large jump in element size, and the aspect ratioes should be reasonable - and any high aspect ratio element should be aligned with the flow.

From this view the unstructured mesh appears to have better transitions from fine to coarse mesh, and the aspect ratios of the elements is better. But you would need to look closer to be sure.

Mina_Shahi August 19, 2012 11:11

Quote:

Originally Posted by ghorrocks (Post 377424)
At that scale I cannot see anything wrong with it. But you need to look closer to be sure.

What I am looking for is the size of adjacent elements - there should be no large jump in element size, and the aspect ratioes should be reasonable - and any high aspect ratio element should be aligned with the flow.

From this view the unstructured mesh appears to have better transitions from fine to coarse mesh, and the aspect ratios of the elements is better. But you would need to look closer to be sure.

Hi

i understood when i use inflation layer high-skewed cells and quality of mesh decreases while without inflation layer the quality is very good skewness is very low and ...
but without inflation i i am not able to resolve boundary layer, what do u suggest then?


another thing : i tried to use different mesh method i had skewness bellow of 0.65, orthogonality quality of higher than 0.4, the other parameters are also ok, no big jump (uniform mesh but not very fine) ...
it converged very fast no oscilation in convergence this time ,BUT still i have asymmetric velocity !!!!!!! what can be the reason then????? I used coarse but rather uniform mesh with all parameter in the good range. i didn't expect exact result but not asymmetric !!!

ghorrocks August 19, 2012 19:15

Quote:

i understood when i use inflation layer high-skewed cells and quality of mesh decreases while without inflation layer the quality is very good skewness is very low and ...
but without inflation i i am not able to resolve boundary layer, what do u suggest then?
Inflation is very important to accurately model boundary layers in mid to high Re flows. This will often give you high aspect ratio elements, but providing they are aligned with the wall (and thus the flow) they are OK. But even still, try to keep under an aspect ratio of about 100. Some flows can handle higher than this, some less - do a sensitivity analysis to determine in your case.

It is not impossible that the assymetric solution may well be correct. Do you have data which shows what the flow should look like?

Mina_Shahi August 20, 2012 02:35

Quote:

Originally Posted by ghorrocks (Post 377707)
Inflation is very important to accurately model boundary layers in mid to high Re flows. This will often give you high aspect ratio elements, but providing they are aligned with the wall (and thus the flow) they are OK. But even still, try to keep under an aspect ratio of about 100. Some flows can handle higher than this, some less - do a sensitivity analysis to determine in your case.

It is not impossible that the assymetric solution may well be correct. Do you have data which shows what the flow should look like?

Thank you for the answer,

in the case of hot flow (with combustion) yrs but when it is cold no i don't think so :(

ghorrocks August 20, 2012 02:59

Inflation layers are important if your flow has thin boundary layers which contribute significantly to the results. That boundary layer could be thermal or could be momentum. In a cold flow the thermal boundary layer is not important, but the momentum boundary layer might be. I cannot judge this based on the information you have supplied so far.

Mina_Shahi August 20, 2012 03:08

Quote:

Originally Posted by ghorrocks (Post 377728)
Inflation layers are important if your flow has thin boundary layers which contribute significantly to the results. That boundary layer could be thermal or could be momentum. In a cold flow the thermal boundary layer is not important, but the momentum boundary layer might be. I cannot judge this based on the information you have supplied so far.

Yes that is true

what i meant from last post was that in the case of hot flow in reality we have unstable condition and flow may be asymmetric as well but in the case of cold flow i am not sure

i know having inflation layer is very important but taking them to account decrease the quality of mesh and i don't know how to fix this problem

ghorrocks August 20, 2012 06:07

OK, as long as you see that it is quite possible the cold simulation is asymetric.

As for your second sentence, my post #26 said
Quote:

Generating a quality mesh in difficult geometries is one of the very challenging (and often underestimated) skills required for a good CFD analysis. Practise, experience, training and lots of experimenting is requierd to generate quality meshes.
So all I can say is do all the meshing tutorials and training you can. Then try all the options on the mesher of relevance to see what they do, and run benchmark problems to find what is important for your mesh. There really is no other way, you just have to learn the tool to produce good meshes in complex geometries.

Mina_Shahi August 20, 2012 12:55

Quote:

Originally Posted by ghorrocks (Post 377757)
OK, as long as you see that it is quite possible the cold simulation is asymetric.

As for your second sentence, my post #26 said


So all I can say is do all the meshing tutorials and training you can. Then try all the options on the mesher of relevance to see what they do, and run benchmark problems to find what is important for your mesh. There really is no other way, you just have to learn the tool to produce good meshes in complex geometries.


I hope i can get better results , thanks for all your answers


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