|
[Sponsors] |
|
August 28, 2015, 10:33 |
Conservation of kinetic energy
|
#1 |
Senior Member
Join Date: May 2012
Posts: 548
Rep Power: 15 |
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?) |
|
August 28, 2015, 11:18 |
|
#2 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,776
Rep Power: 71 |
Quote:
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 |
||
August 28, 2015, 11:54 |
|
#3 | |
Senior Member
Join Date: May 2012
Posts: 548
Rep Power: 15 |
Quote:
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). |
||
August 28, 2015, 12:05 |
|
#4 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,776
Rep Power: 71 |
Quote:
but the FTCS scheme is unconditionally unstable in the inviscid problem!! |
||
August 28, 2015, 12:12 |
|
#5 |
Senior Member
Join Date: May 2012
Posts: 548
Rep Power: 15 |
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).
|
|
August 28, 2015, 12:14 |
|
#6 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,776
Rep Power: 71 |
Quote:
but there is no meaning in testing an unstable method ...... |
||
August 28, 2015, 12:22 |
|
#7 |
Senior Member
Join Date: May 2012
Posts: 548
Rep Power: 15 |
||
August 28, 2015, 12:25 |
|
#8 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,776
Rep Power: 71 |
Quote:
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) |
||
August 28, 2015, 12:33 |
|
#9 | |
Senior Member
Join Date: May 2012
Posts: 548
Rep Power: 15 |
Quote:
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). |
||
August 28, 2015, 12:32 |
|
#10 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,676
Rep Power: 66 |
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. |
|
August 28, 2015, 12:37 |
|
#11 | |
Senior Member
Join Date: May 2012
Posts: 548
Rep Power: 15 |
Quote:
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. |
||
August 28, 2015, 12:42 |
|
#12 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,776
Rep Power: 71 |
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. |
|
August 28, 2015, 13:01 |
|
#13 | |
Senior Member
Join Date: May 2012
Posts: 548
Rep Power: 15 |
Quote:
|
||
August 28, 2015, 13:12 |
|
#14 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,776
Rep Power: 71 |
you could check further test-cases as I did in Int. J. Numer. Meth. Fluids 2007; 53:11271172.
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 |
|
August 28, 2015, 12:06 |
|
#15 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,676
Rep Power: 66 |
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). |
|
August 28, 2015, 12:14 |
|
#16 | |
Senior Member
Join Date: May 2012
Posts: 548
Rep Power: 15 |
Quote:
|
||
|
|
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 |