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

Conservation of kinetic energy

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 1 Post By Simbelmynė
  • 1 Post By LuckyTran
  • 1 Post By FMDenaro

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 28, 2015, 10:33
Default Conservation of kinetic energy
  #1
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Hey,

I am doing a kinetic energy conservation test for my colocated code and have a question regarding the setup.

Mesh: 33x33

I use periodic boundary conditions with a Taylor vortex initial condition.

The kinetic energy is dissipated if the initial velocities are too high, but if I make sure that they are low then there is no dissipation of kinetic energy.

What may be the cause of this? (some Peclét number violation?)
utkunun likes this.
Simbelmynė is offline   Reply With Quote

Old   August 28, 2015, 11:18
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,763
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Simbelmynė View Post
Hey,

I am doing a kinetic energy conservation test for my colocated code and have a question regarding the setup.

Mesh: 33x33

I use periodic boundary conditions with a Taylor vortex initial condition.

The kinetic energy is dissipated if the initial velocities are too high, but if I make sure that they are low then there is no dissipation of kinetic energy.

What may be the cause of this? (some Peclét number violation?)

The conservation of kinetic energy is a constraint valid in the inviscid limit, thus no other Peclet number than infinity you have ...
Running the Euler equations does not mean you have no numerical viscosity in your method, therefore the magnitude of dissipation can depend on the mesh size.

Please, give more details of what you are doing
FMDenaro is offline   Reply With Quote

Old   August 28, 2015, 11:54
Default
  #3
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
The conservation of kinetic energy is a constraint valid in the inviscid limit, thus no other Peclet number than infinity you have ...
Running the Euler equations does not mean you have no numerical viscosity in your method, therefore the magnitude of dissipation can depend on the mesh size.

Please, give more details of what you are doing
Of course you are correct about the Peclét number!

I have a coarse 2d grid and I prescribe periodic boundary conditions and an initial Taylor vortex field. I set the viscosity to zero and use CD for the convective derivatives. Time-stepping is a simple explicit Euler (so very small time-steps are used).

I notice that the magnitude of the initial field have an impact on the kinetic energy conservation of the method. I have not tested finer grids, but the kinetic conservation properties are very good for small values of the initial field (k/k0 less than 1e-7 for a 1 second simulation).
Simbelmynė is offline   Reply With Quote

Old   August 28, 2015, 12:05
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,763
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Simbelmynė View Post
Of course you are correct about the Peclét number!

I have a coarse 2d grid and I prescribe periodic boundary conditions and an initial Taylor vortex field. I set the viscosity to zero and use CD for the convective derivatives. Time-stepping is a simple explicit Euler (so very small time-steps are used).

I notice that the magnitude of the initial field have an impact on the kinetic energy conservation of the method. I have not tested finer grids, but the kinetic conservation properties are very good for small values of the initial field (k/k0 less than 1e-7 for a 1 second simulation).

but the FTCS scheme is unconditionally unstable in the inviscid problem!!
FMDenaro is offline   Reply With Quote

Old   August 28, 2015, 12:06
Default
  #5
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,665
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
This sounds like numerical diffusion.

Setting viscosity to 0 will eliminate physical/molecular diffusion but you will still have numerical diffusion. Numerical diffusion is hard to limit for these types of problems even with a fine grid, since in Fluent you are limited to a few discretization schemes (2nd order in time, and 2nd upwind or central in space). To control numerical diffusion better, you need either a really fine grid able to resolve all the gradients or use a higher order scheme (4th order, etc).
LuckyTran is offline   Reply With Quote

Old   August 28, 2015, 12:12
Default
  #6
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
but the FTCS scheme is unconditionally unstable in the inviscid problem!!
OK, so I just ran a 1000 seconds simulation to test the stability. Works fine. The kinetic energy is growing slowly and end up with 1.3% difference (I was forced to use a time-step that is two orders of magnitude larger than what I would like to use, but for this test I think it is sufficient).
Simbelmynė is offline   Reply With Quote

Old   August 28, 2015, 12:14
Default
  #7
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,763
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Simbelmynė View Post
OK, so I just ran a 1000 seconds simulation to test the stability. Works fine. The kinetic energy is growing slowly and end up with 1.3% difference (I was forced to use a time-step that is two orders of magnitude larger than what I would like to use, but for this test I think it is sufficient).

but there is no meaning in testing an unstable method ......
FMDenaro is offline   Reply With Quote

Old   August 28, 2015, 12:14
Default
  #8
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
This sounds like numerical diffusion.

Setting viscosity to 0 will eliminate physical/molecular diffusion but you will still have numerical diffusion. Numerical diffusion is hard to limit for these types of problems even with a fine grid, since in Fluent you are limited to a few discretization schemes (2nd order in time, and 2nd upwind or central in space). To control numerical diffusion better, you need either a really fine grid able to resolve all the gradients or use a higher order scheme (4th order, etc).
I have a 4th order CD implemented as well, but I have not compared the results directly to the 2nd order CD. However, it is very clear that the impact is far less than if I modify the magnitude of the initial field.
Simbelmynė is offline   Reply With Quote

Old   August 28, 2015, 12:22
Default
  #9
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
but there is no meaning in testing an unstable method ......
So you mean that this might be the cause of my observations? I just ran the same simulation with Upwind and the kinetic energy is dissipated a lot (although it is decreasing now instead of increasing).
Simbelmynė is offline   Reply With Quote

Old   August 28, 2015, 12:25
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,763
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Simbelmynė View Post
So you mean that this might be the cause of my observations? I just ran the same simulation with Upwind and the kinetic energy is dissipated a lot (although it is decreasing now instead of increasing).

upwind is stable (c<1) and is ok testing it, but I don't see correct using any unstable method even for few time steps (actually, it is useful but for students that experiment what the numerical instability is)
FMDenaro is offline   Reply With Quote

Old   August 28, 2015, 12:32
Default
  #11
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,665
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
I am not familiar with how you are characterizing the rate of dissipation of kinetic energy. Are we talking about numerical diffusion or something else?

But, numerical diffusion is proportional to the gradients. With higher initial velocity, the gradients are greater and this would obviously result in "more" numerical diffusion. If you want to see the same result with higher velocity, you would need to increase the size of your domain so that the new combination of the velocity and length scale result in the same velocity gradient.

The 1st order upwind scheme is infamously high in numerical diffusion (which also improves stability) so that is no surprise. The FTCS scheme is unstable w/o numerical diffusion, the presence of numerical diffusion can make it stable. The fact that your solution was not unstable after 1000 s is basically proof that there is numerical diffusion in your problem setup.
Simbelmynė likes this.
LuckyTran is offline   Reply With Quote

Old   August 28, 2015, 12:33
Default
  #12
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
upwind is stable (c<1) and is ok testing it, but I don't see correct using any unstable method even for few time steps (actually, it is useful but for students that experiment what the numerical instability is)
Yes, well the simulation did not blow up with the CD even though I took 1e6 time-steps and it produces results that are much better compared to the upwind case.

A blend between UD and CD produces approx 8% decrease in kinetic energy after 1000 seconds @ dt=1e-3.

A CD produces approx 1% increase in kinetic energy for the same case (a 4th order CD slightly less).
Simbelmynė is offline   Reply With Quote

Old   August 28, 2015, 12:37
Default
  #13
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
I am not familiar with how you are characterizing the rate of dissipation of kinetic energy. Are we talking about numerical diffusion or something else?

But, numerical diffusion is proportional to the gradients. With higher initial velocity, the gradients are greater and this would obviously result in "more" numerical diffusion. If you want to see the same result with higher velocity, you would need to increase the size of your domain so that the new combination of the velocity and length scale result in the same velocity gradient.

The 1st order upwind scheme is infamously high in numerical diffusion (which also improves stability) so that is no surprise. The FTCS scheme is unstable w/o numerical diffusion, the presence of numerical diffusion can make it stable. The fact that your solution was not unstable after 1000 s is basically proof that there is numerical diffusion in your problem setup.
I am taking the total kinetic energy in the domain, k, divided by the initial total kinetic energy in the domain, k0.

Perhaps I go about this problem in the wrong way. How would you suggest to test the kinetic energy conservation properties of a method. Any other suggestions would be most welcome.
Simbelmynė is offline   Reply With Quote

Old   August 28, 2015, 12:42
Default
  #14
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,763
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
the numerical instability is a process that can be slow, especially if you used a very low time step....

Your test setting with Taylor is good, you have simply to use stable schemes and checking the integral of the kinetic energy in time with the same initial condition but for refined grids.
FMDenaro is offline   Reply With Quote

Old   August 28, 2015, 13:01
Default
  #15
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
the numerical instability is a process that can be slow, especially if you used a very low time step....

Your test setting with Taylor is good, you have simply to use stable schemes and checking the integral of the kinetic energy in time with the same initial condition but for refined grids.
OK, I just ran a 65x65 (up from the 33x33) and there is a sizable improvement in the Upwind solution. What constitutes as a good solution? I have a paper that claims the Rhie-Chow interpolation method produces poor solutions in terms of kinetic energy conservation. However, their test case is for 1 second and it shows that Rhie-Chow dissipates less than 0.03% in that time-span. In what situations will this be a problem (long simulations using LES?)?
Simbelmynė is offline   Reply With Quote

Old   August 28, 2015, 13:12
Default
  #16
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,763
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
you could check further test-cases as I did in Int. J. Numer. Meth. Fluids 2007; 53:1127–1172.

the LES equation provided a velocity field that is no longer v(x,t) but v_f(x,t). The equation for the energy field v_f.v_f shows that such quantity is no longer conserved
Simbelmynė likes this.
FMDenaro is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
How to exploit SGS kinetic energy with Smagorinsky model in LES babakflame OpenFOAM Programming & Development 3 December 14, 2014 06:58
A question about filtered kinetic energy 8cold8hot Main CFD Forum 0 November 2, 2014 01:56
How to view subgrid kinetic energy Craig FLUENT 3 September 8, 2012 11:34
Kinetic Energy Conservation longamon OpenFOAM Running, Solving & CFD 1 May 28, 2011 02:08
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 15:45


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