CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Euler equation reaches different steady-state solution with different time stepping

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 9, 2024, 11:40
Question Euler equation reaches different steady-state solution with different time stepping
  #1
New Member
 
Join Date: Jul 2024
Posts: 6
Rep Power: 2
cfduser999 is on a distinguished road
Hi everyone,

I'm currently solving the Euler equation with the Lax method with matlab to see the transient behaviour of my gas parameters. Previous to this I have solved the steady-state Euler equation (both 1d) to know the steady-state solution.

After fullfiting the CFL condition, with the Courant number ~0.33, I can well reproduce the steady-state solution, but if I keep reducing the time-stepping, I will reach another steay-state solution, which also looks more weird. This confuses me profundly, cause I think smaller time-stepping should produce the same steady-state solution, just with higher resolution. Can anyone help?
cfduser999 is offline   Reply With Quote

Old   July 9, 2024, 12:54
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by cfduser999 View Post
Hi everyone,

I'm currently solving the Euler equation with the Lax method with matlab to see the transient behaviour of my gas parameters. Previous to this I have solved the steady-state Euler equation (both 1d) to know the steady-state solution.

After fullfiting the CFL condition, with the Courant number ~0.33, I can well reproduce the steady-state solution, but if I keep reducing the time-stepping, I will reach another steay-state solution, which also looks more weird. This confuses me profundly, cause I think smaller time-stepping should produce the same steady-state solution, just with higher resolution. Can anyone help?



Could you better detail your flow problem? Is your scheme fully explicit?

In principle, the solution should show convergence at constant CFL, that is reducing both the time ans the space step. Reducing only the the time step could highlight the remaining part of the local truncation error due to the spatial discretization.
Post the figures of your solution.
FMDenaro is offline   Reply With Quote

Old   July 10, 2024, 03:16
Default
  #3
New Member
 
Join Date: Jul 2024
Posts: 6
Rep Power: 2
cfduser999 is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Could you better detail your flow problem? Is your scheme fully explicit?

In principle, the solution should show convergence at constant CFL, that is reducing both the time ans the space step. Reducing only the the time step could highlight the remaining part of the local truncation error due to the spatial discretization.
Post the figures of your solution.
Thank you for your reply. It's just a simple gas flow through a cylinder tube with known boundary conditions, and is fully explicit.

Then does it mean the solution would change with different Courant number? In that case, how do I know which is the right solution?
cfduser999 is offline   Reply With Quote

Old   July 10, 2024, 03:20
Default
  #4
New Member
 
Join Date: Jul 2024
Posts: 6
Rep Power: 2
cfduser999 is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Could you better detail your flow problem? Is your scheme fully explicit?

In principle, the solution should show convergence at constant CFL, that is reducing both the time ans the space step. Reducing only the the time step could highlight the remaining part of the local truncation error due to the spatial discretization.
Post the figures of your solution.
And can you please point me to some references regarding that "reducing only the time step could highlight the remaining part of the local truncation error due to the spatial discretization"? Thank you in advance.
cfduser999 is offline   Reply With Quote

Old   July 10, 2024, 04:50
Default
  #5
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by cfduser999 View Post
And can you please point me to some references regarding that "reducing only the time step could highlight the remaining part of the local truncation error due to the spatial discretization"? Thank you in advance.
What you are asking is something that is the basis of any CFD student. What is your background? You will find this topic in any CFD textbook, just study the modified differential equation.
FMDenaro is offline   Reply With Quote

Old   July 10, 2024, 04:53
Default
  #6
New Member
 
Join Date: Jul 2024
Posts: 6
Rep Power: 2
cfduser999 is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
What you are asking is something that is the basis of any CFD student. What is your background? You will find this topic in any CFD textbook, just study the modified differential equation.
Thank you for your reply.

I studied physics but not in the direction of gas/fluid dynamics, I will check some CFD textbook.
cfduser999 is offline   Reply With Quote

Old   July 10, 2024, 05:00
Default
  #7
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by cfduser999 View Post
And can you please point me to some references regarding that "reducing only the time step could highlight the remaining part of the local truncation error due to the spatial discretization"? Thank you in advance.
You can prove it very quickly

The Courant number is low with coarse grids. If you have a very coarse grid the Courant number becomes very very low and you fool yourself. Now you have a spatial discretization error that remains even for stupidly small timesteps. This is why we tell people to always do sensitivity studies and validate their tools for each specific new problem. The simplicity of the problem doesn't mean that common errors that plague numerical codes don't exist, actually it makes it even easier to find them. Stable does not necessarily mean accurate.
LuckyTran is offline   Reply With Quote

Old   July 10, 2024, 05:41
Default
  #8
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by cfduser999 View Post
Thank you for your reply.

I studied physics but not in the direction of gas/fluid dynamics, I will check some CFD textbook.
I see, there are several textbook where you can study the modified equation, for example Anderson or Hirsch
FMDenaro is offline   Reply With Quote

Old   July 10, 2024, 06:08
Default
  #9
New Member
 
Join Date: Jul 2024
Posts: 6
Rep Power: 2
cfduser999 is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
You can prove it very quickly

The Courant number is low with coarse grids. If you have a very coarse grid the Courant number becomes very very low and you fool yourself. Now you have a spatial discretization error that remains even for stupidly small timesteps. This is why we tell people to always do sensitivity studies and validate their tools for each specific new problem. The simplicity of the problem doesn't mean that common errors that plague numerical codes don't exist, actually it makes it even easier to find them. Stable does not necessarily mean accurate.
I understood, reducing the time step without reducing the spatial step increases essentially the global error. Thank you very much!
cfduser999 is offline   Reply With Quote

Old   July 10, 2024, 06:13
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Just as an example the first order upwind for the linear wave equation produces a modified equation like this


df/dt+u*df/dx= 0.5*dx*(1-c)*d^2f/dx^2 + ...


you can see what happens when c is reduced and dx is fixed.
FMDenaro is offline   Reply With Quote

Old   July 10, 2024, 06:38
Default
  #11
New Member
 
Join Date: Jul 2024
Posts: 6
Rep Power: 2
cfduser999 is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Just as an example the first order upwind for the linear wave equation produces a modified equation like this


df/dt+u*df/dx= 0.5*dx*(1-c)*d^2f/dx^2 + ...


you can see what happens when c is reduced and dx is fixed.
Understood, the dissipation would become huge. Thank you very much!
cfduser999 is offline   Reply With Quote

Reply

Tags
cfd, courant number, lax method, time step


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference steady state / unsteady dnl_xr OpenFOAM Pre-Processing 1 March 9, 2024 10:25
Setting the height of the stream in the free channel kevinmccartin CFX 12 October 13, 2022 22:43
Simulation time for steady state solution using transient solver spelletier Main CFD Forum 1 June 26, 2019 05:08
dynamic Mesh is faster than MRF???? sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 08:47
About the difference between steady and unsteady problems Lisa Main CFD Forum 11 July 5, 2000 15:37


All times are GMT -4. The time now is 13:09.