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
179 stars 65 forks source link

adding high-fidelity option to meshgen for meshing hardened shorelines/coastal structures #264

Closed WPringle closed 5 months ago

krober10nd commented 2 years ago

Looks like there was a formatting issue with meshgen.m and it shows up as 1000 lines changed...

krober10nd commented 2 years ago

Keep in mind, this approach is set up to work for a single domain. You'll need to create a nested function inside mesh1d to correctly handle the multiscale case.

Also keep in mind the pseudo deltaT for the 1d mesh generation problem should be pretty small or otherwise it goes numerically unstable.

krober10nd commented 5 months ago

Moving this along a bit.

...
mshopts = meshgen('ef',fh,'bou',gdat);
mshopts.plot()

The only changes the user needs to make are adding the high_fidelity numerical flag 1 to the geodata class constructor they want to employ the automatic generation of point and edge constraints.

gdat = geodata('shp',coastline,'bbox',bbox,'h0',min_el,'high_fidelity',1);
Screenshot 2024-02-10 at 8 23 37 PM

Constraints are displayed during meshing as blue points.

Screenshot 2024-02-10 at 8 37 29 PM
WPringle commented 5 months ago

TestJBAY.m not passing (Example_5b_JBAY_w_weirs.m). On further inspection appears weirs are not appearing correctly: Projection branch result zoom-in:

image

This branch result zoom-in:

image

Can work out what changed wrt to the weir stuff?

krober10nd commented 5 months ago

I have restored a mesh improvement strategy that improves the element qualities nearby the weirs. This will be auto deactivated when using the high fidelity mode. The JBAY test produced a difference of 6% in total number of nodes from the test value but the more important part is the weirs were correctly meshed.

WPringle commented 5 months ago

@krober10nd It looks good to me, can you do the approval and merging and new version release?