CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   WENO 5 extension to curvilinear grids (https://www.cfd-online.com/Forums/main/195491-weno-5-extension-curvilinear-grids.html)

fjavi90 November 8, 2017 15:41

WENO 5 extension to curvilinear grids
 
Hello everyone,

I have successfully implemented a finite-difference WENO5 2D compressible flow solver for the Euler equations in cartesian coordinates, but I'm having trouble with the generalization to curvilinear body-fitted grids.

I was given a compact finite-difference solver that works fine in curvilinear grids, so my guess is that the problem may be in:
  • the flux splitting procedure (currently using global Lax-Friedrichs).
  • the WENO5 scheme itself and has to do either with the eigenvalues, eigenvectors (Roe matrices) or the aplication of the metrics and jacobian of the transformation (although the metrics and jacobian are correctly calculated).

I read several articles on the matter such as this or this, but I cannot understand precisely the procedure they are using.

Any help about the generalization of the global LxF splitting and/or WENO5 would be appreciated.

Thank you.

t.teschner November 11, 2017 05:54

you'd be surprised, it is not that difficult. In-fact, if you use a curve-linear solver, you don't need to change your WENO5 subroutine, it will still be used the same way for curve-linear grids. The only difference is in the discretisation of the governing equation. Lets take the divergence of the velocity field (continuity equation), for example. we have (ignoring density), in cartesian form

\nabla \cdot \textbf{U} = \frac{\partial u}{\partial x} + \frac{\partial v}{\partial y}.

Now to extend that to curve-linear coordinate systems, you simply need to do the coordinate transformation into a new, cartesian coordinate system, usually denoted by the new directions \xi and \eta so that we have now (using the chain rule)

\nabla \cdot \textbf{U} = \frac{\partial u}{\partial \xi} \frac{\partial \xi}{\partial x} + \frac{\partial u}{\partial \eta} \frac{\partial \eta}{\partial x} + \frac{\partial v}{\partial \xi}\frac{\partial \xi}{\partial y} + \frac{\partial v}{\partial \eta}\frac{\partial \eta}{\partial y} = \xi_x \frac{\partial u}{\partial \xi} + \eta_x \frac{\partial u}{\partial \eta} + \xi_y \frac{\partial v}{\partial \xi} + \eta_y \frac{\partial v}{\partial \eta}.

Since your derivatives of u and v are now evaluate on the new, transformed (cartesian) grid with direction of \xi and \eta, you can use your WENO5 subroutine just like you would when using a cartesian grid. the only difficulty arises now how you get your so called metric coefficients, i.e.: \xi_x , \xi_y , \eta_x , \eta_y (note here that the subscript just means that the derivative with respect to the subscript is taken, see also equation above).

The answer takes a bit longer and there are a couple of good books which explain that rather well (you actually have to take the so called inverse transformation, i.e. your metric coefficients are x_\xi , y_\xi , x_\eta , y_\eta which changes the above equation slightly (you'll end up with the jacobian of the system)). Don't worry if that seems confusing at the moment. Have a look at "Anderson, Computational Fluid Dynamics, The basics with applications (Chapter 5 (theory) and Chapter 8 (example calculation using curve linear grids) )" and "Hoffman, Chiang, Computational Fluid Dynamics for Engineers, Vol. 1 (Chapter 9)". Both are excellent references and I was able to write my own curve-linear code after consulting those two references.

fjavi90 November 12, 2017 08:19

Thank you very much for your reply, t.teschner. I will have a look at those books.

mprinkey November 14, 2017 03:54

This is all true. Just be sure that your grid mapping is smooth, say from a full-domain conformal mapping. It should be at least several times differentiable. You should recognize that the WENO smoothness metrics are based on the assumption of evenly spaced samples. If the grid spacing changes in an non-smooth way, the effect of the mesh stretching will not be "felt" by the smoothness indicators, so the WENO stencils will be weighted based on incorrect data. The same is true for normal linear finite differences as well, but the potential for out-sized errors are introduced with the nonlinear behavior of WENO or limiters, etc.

t.teschner November 14, 2017 14:14

good point, did not consider that. thanks for adding that!

praveen November 16, 2017 23:28

A very recent preprint on the same topic

https://arxiv.org/abs/1711.06212

fjavi90 November 23, 2017 13:35

Thank you very much for all your answers. I am still putting the pieces together, but I am on the correct path.

On a related note, I hope it is not off-topic, I am interested on implementing a slightly different slip wall boundary condition.

Many authors mirror the flow values (i.e. density, tangent velocity and pressure) across the wall boundary (which is placed on an interface midway between nodes) and negate the normal velocity. Is there a way to make the wall boundary fall on a node instead of on an interface using WENO? The reasoning behind this is to be able to compare the results of a problem with a Finite Difference code having the nodes placed on the same coordinates.


All times are GMT -4. The time now is 10:50.