trixi-framework / trixi-framework/Trixi.jl

How do we want to implement mesh stretching (for the cubed sphere mesh)?

Open
#978 4 comments 0 reactions 0 assignees View on GitHub
discussion enhancement
Dominant language
Julia
Stars
731
Forks
166
Avg merge
2d 18h
Merged PRs (30d)
25

Description

While the `P4estMesh` supports local mesh refinement and AMR, this can be problematic for complex simulations like the baroclinic instability. There, well-balanced errors make the simulation on a vertically non-conforming mesh unusable. Unfortunately, the `P4estMesh` doesn't support only horizontal refinement (yet?).

A simple way to avoid the problem of non-conforming meshes is to stretch the cubed sphere mesh smoothly towards the area that is to refine. A mapping for this is described [here](https://doi.org/10.1175/JCLI-D-15-0389.1). [This mapping is also used by FV3](https://www.gfdl.noaa.gov/fv3/fv3-grids/), the dynamical core of the Global Forecast System by the National Weather Service of the United States.
![image](https://user-images.githubusercontent.com/44124897/141644685-334bd996-f60d-4658-bb65-2d1248722955.png)

I already implemented this feature for Trixi:
![image](https://user-images.githubusercontent.com/44124897/141644701-4b061823-1dc7-4a83-8224-982efd9ffa6e.png)
![image](https://user-images.githubusercontent.com/44124897/141644703-9f9f9782-5d30-4b2a-812e-ba06774599d7.png)

However, now there's the question of how to include this feature in the API. Do we want to write this mapping into the `P4estMesh` constructor for cubed spheres and add a kwarg to set the stretching factor? Or do we want to allow passing arbitrary functions to transform the cubed sphere? In this case, do we want to add this option to the HOHQMesh constructor as well?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.