How to plot residuals in Windows?

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Luciano Garelli
Posts: 280
Joined: Fri Dec 04, 2015 1:42 pm

Re: How to plot residuals in Windows?

Post by Luciano Garelli »

Hello,

From yours xml files I saw that you are running 16000 iterations using a variable time step in space and in time with CFD=1 and Fo=10, so if you refine the mesh the, solution that you are showing in the last two figures doesn't correspond to the same "instant", because you change the cell size. So, try to run more iterations and check the thermal heat flux through the boundaries. Also, you can try to increase the CFD ~ 5 and Fo ~ 50

Regards,

Luciano
xingjian
Posts: 55
Joined: Thu Apr 06, 2017 12:34 pm

Re: How to plot residuals in Windows?

Post by xingjian »

Hello Luciano,

Thank you very much, because the temperature has been stable, it has not changed with the time step. so I thought the calculation of 16000 steps is enough, and I thought they are the same 'instant'.

After your reminder, I understand. But I can not calculate more steps, and this will waste too much time. I will I will follow what you said, I will increase the CFL=5, and Fo=50.

I will upload the results in two days.

For checking the thermal heat flux, is it the input thermal flux of boundary condition? When we are post-processing in SALOME.

Thank you again

Best Regards

XING Jian
xingjian
Posts: 55
Joined: Thu Apr 06, 2017 12:34 pm

Re: How to plot residuals in Windows?

Post by xingjian »

Hello,

The result I calculated with Max CFL=5 and Max Fo=50 is too bad. So I reconsidered this question carefully.

CFL=U*Dt/Dx with U is with U is characteristic velocity, Dx is characteristic length.
Fo=v*Dt/Dx^2 with v is viscosity, Dx is characteristic length.

I am not very clear about the characteristic velocity and characteristic length.

In the BPG-4-Numerical-Parameters.pdf, it said that: where a time step Dt is specified from the flow characteristic and from the size of the Dx.

So the characteristic length Dx is the length of the cell, and characteristic velocity U is the velocity at this cell?

If I want to calculate the Maximum CFL number, I need to use the velocity of the fastest region, and I need to use the smallest cell length to calculate, for me is the bottom of the boundary layer.

So Max CFL=2.3*10^5*Dt

For Fo, viscosity is constant:
So Max Fo=2*10^3*Dt

For most case, CFL number is around 1 ~ 5, so I chose Dt = 1*10^-5, Max CFL =2.3, Max Fo=0.02.

So I entered Max CFL = 3, Max Fo = 0.1.

I wonder if that’s right?

Thank you very much

Best Regards

XING Jian
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: How to plot residuals in Windows?

Post by Yvan Fournier »

Hello,

This seems right, but I did not run the GUI to check. When in doubt, I prefer to postprocess/visualize the CFL field. This also helps you see whether a too high CFL might be in an important region or not, and in some cases how adjusting the mesh refinement in different areas may help.

Best regards,

Yvan
wenhao
Posts: 7
Joined: Tue Nov 27, 2018 2:26 pm

Re: How to plot residuals in Windows?

Post by wenhao »

Dear xingjian,

I would like to seek your help on how you plot these probe_Temp file in which by setting x is the time step while y is the temperature?

Thank you.
Regards,

Hao
Post Reply