CHLNDDEV / OceanMesh2D

A two-dimensional triangular mesh generator with pre- and post-processing utilities written in pure MATLAB (no toolboxes required) designed specifically to build models that solve shallow-water equations or wave equations in a coastal environment (ADCIRC, FVCOM, WaveWatch3, SWAN, SCHISM, Telemac, etc.).
https://github.com/sponsors/krober10nd
GNU General Public License v3.0
178 stars 64 forks source link

Need for rapid changes in grid resolution #290

Closed hb-9797 closed 11 months ago

hb-9797 commented 1 year ago

My model, which requires a rapid change in grid resolution where the slope is steeper,

i.e. where the resolution can be higher at shallower depths and greater at deeper depths.

Can this be achieved where the slope changes very quickly? Is this related to the GRADE parameter? Thank you for your reply!

krober10nd commented 1 year ago

Hi, Yes, this is achievable via the "slope" mesh sizing function by altering the parameter, you can make steeper gradients contain finer mesh resolution and vice versa.

The maximum rate of change of resolution however is determined via grade mesh sizing parameter. Setting a value higher will enable faster element transitions but negatively impact mesh quality and potentially distort the bed when bathymetry is interpolated onto the nodes.

You can also supply depth bounds to the grade parameter to use certain values at certain depths; however, this is not compatible with the multi scale meshing technique.

What is your application?

hb-9797 commented 1 year ago

Thanks for the reply, my research area is around the island of Taiwan, where the slope of the seafloor topography is very steep in the part near the Kuroshio, and I need the horizontal grid size to change very quickly to accommodate the rapid changes in topography, sacrificing grid quality if necessary to achieve the goal.

hb-9797 commented 1 year ago

Hi, Yes, this is achievable via the "slope" mesh sizing function by altering the parameter, you can make steeper gradients contain finer mesh resolution and vice versa.

The maximum rate of change of resolution however is determined via grade mesh sizing parameter. Setting a value higher will enable faster element transitions but negatively impact mesh quality and potentially distort the bed when bathymetry is interpolated onto the nodes.

You can also supply depth bounds to the grade parameter to use certain values at certain depths; however, this is not compatible with the multi scale meshing technique.

What is your application?

To add to this, the characteristics of my marine model require a high resolution grid at shallow water depths and a much greater grid resolution at deeper water depths, which requires a rapid change in grid resolution. I had previously adjusted the 'grade' to 0.8, but it would produce spurious cold water masses near some other islands. I am not sure that oceanmesh2D can achieve what I want. I look forward to your reply!

krober10nd commented 1 year ago

The purpose of the sizing function is precisely what you describe and has been extensively documented in papers and working notes. There have dozens of applications around the world including areas with steep shelf breaks.

Without any code, examples, and in inputs there’s not much anyone can do to help you.