Spikes in the TKE budget (calculated by KTH Toolbox)

205 views
Skip to first unread message

KK LuLu

unread,
Oct 8, 2023, 10:12:49 AM10/8/23
to Nek5000
Hi Neks,
      Now for my case study, I use the KTH Toolbox to calculate the TKE budget, which is a linear combination of tensor terms. After performing spatial averaging (First, perform interpolation using the 'hpts' subroutine, and then process it in MATLAB), I obtained the following plot :
tke.jpg
You can see that the curve is not particularly smooth (especially below z=0.5). I suspect these spikes (non-physical oscillations in the data) are caused by discontinuities in the derivatives. So, I projected this plot onto a grid and obtained this image:
tkemesh.png
The red line represents the grid boundaries for each layer along the z-direction.

Now I'm very puzzled by this issue. In fact, what we expected was to obtain a smooth curve. Besides, I found through inspecting the underlying code that the STAT module of the KTH Toolbox does not appear to use the 'opdssum' subroutine to ensure the continuity of boundary values. Could this be the root cause of the issue? If that's the case, how should I modify it?

Do you guys have any thoughts on this issue? Thanks! :)

Kan

Philipp Schlatter

unread,
Oct 8, 2023, 10:37:45 AM10/8/23
to nek...@googlegroups.com
Hi,
I am not sure I understand the plots. What exactly are the red lines,
different elements? How did you obtain the blue line, but interpolation
onto a finer mesh? How is the resolution of your case in terms of plus
unit (i.e. are you having a well-resolved case)?

Regarding dssum: indeed, that would make the values to be identical over
the element boundaries, but it would not affect the points just inside
the elements. So we prefer to not use dssum for the statistics to have
the potential discontinuities as a sign of (spatial) convergence.

Philipp

On 2023-10-08 16:12, KK LuLu wrote:
> Hi Neks,
>       Now for my case study, I use the KTH Toolbox to calculate the TKE
> budget, which is a linear combination of tensor terms. After performing
> spatial averaging (First, perform interpolation using the '*hpts*'
> subroutine, and then process it in MATLAB), I obtained the following plot :
> tke.jpg
> You can see that the curve is not particularly smooth (especially below
> z=0.5). I suspect these spikes (non-physical oscillations in the data)
> are caused by discontinuities in the derivatives. So, I projected this
> plot onto a grid and obtained this image:
> tkemesh.png
> The red line represents the grid boundaries for each layer along the
> z-direction.
>
> Now I'm very puzzled by this issue. In fact, what we expected was to
> obtain a smooth curve. Besides, I found through inspecting the
> underlying code that the STAT module of the *KTH Toolbox* does not
> appear to use the '*opdssum*' subroutine to ensure the continuity of
> boundary values. Could this be the root cause of the issue? If that's
> the case, how should I modify it?
>
> Do you guys have any thoughts on this issue? Thanks! :)
>
> Kan
>
> --
> You received this message because you are subscribed to the Google
> Groups "Nek5000" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to nek5000+u...@googlegroups.com
> <mailto:nek5000+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nek5000/b58440e4-a5f7-4ed3-a074-fc11b0be7a51n%40googlegroups.com
> <https://groups.google.com/d/msgid/nek5000/b58440e4-a5f7-4ed3-a074-fc11b0be7a51n%40googlegroups.com?utm_medium=email&utm_source=footer>.

KK LuLu

unread,
Oct 9, 2023, 2:16:38 AM10/9/23
to Nek5000
Hi Neks,
     According to  Professor Philip's question, now I am going to make some additions.
     The red line represents the grid distribution in the Z direction(which means elements (the original grid without GLL points)).
     The blue line represents the distribution of TKE budget along the Z-axis after performing space-time averaging.

      To get the TKE budget, I follow the relevant content in this article (https://publications.anl.gov/anlpubs/2017/03/133610.pdf).
      First, I followed the example file in 'phill_PSTAT3D'. Then, I performed addition and subtraction on the relevant terms of the TKE Budget mentioned in the above-mentioned paper. Then for the new field file, I use hpts to get the interpolation and output it into txt file. Finally I use MATLAB to get the plot. In MATLAB, I spatially averaged each plane and obtained a distribution plot along the Z-axis.
       Honestly, my case is currently stuck at this point because the TKE budget is a critical analysis point. Next, I plan to migrate the flow field to another set of grids and repeat the previous operations. The new grid should avoid overlapping with the GLL points of the original grid. However, I'm not sure if this will be effective. Do you guys have any thoughts on this issue?
       Here is my SIZE file:
SIZE.png

Kan

chanl...@gmail.com

unread,
Oct 9, 2023, 6:16:55 PM10/9/23
to Nek5000
Hello Kan,

Nek5000 is only C0 continuous and not necessarily C1 (derivatives) continuous. If your simulation is underresolved, you will see these `spikes' in your simulations.

A colleague recently investigated this in the following publication for a turbulent channel flow


Perhaps try increasing your viscosity or use a finer grid to check if you still have these `spikes' in your simulations.

Kind regards,
Leon

danielem...@gmail.com

unread,
Oct 10, 2023, 4:14:46 PM10/10/23
to Nek5000
Dear Kan,

As a follow-up comment: eventually, it's really just a matter of resolution and local (or global) filtering does not help.
You can play a bit in the post-processing, but I would rather use the spikes to point out the under-resolved regions, as Philipp suggested.
We did some (many) tests in the context of non-conforming interfaces (AMR), also at higher Re, if you want to take a look here
Anyway,  the main outcome was to increase the resolution, taking care of the aspect ratio of the elements.


Sincerely,
Daniele

KK LuLu

unread,
Oct 11, 2023, 1:00:19 PM10/11/23
to Nek5000
Dear Neks,
      Thank you very much for your suggestions! I will begin by reading the document above and addressing the issue based on your recommendations. I will then share any subsequent results with everyone!  :)

Kan

Reply all
Reply to author
Forward
0 new messages