Improve mesh generation
Opened this issue · 0 comments
perrette commented
Currently the mesh is define from three skeleton lines (middle
, left
, right
, downstream looking), by drawing orthogonal segments to the central line at regular intervals, and finding the intersection points with the side lines. This is a very crude approach which has a number of inconvenient:
- the central line should be smooth enough, otherwise the mesh will be seriously distorted
- a numerical integration over the resulting mesh does not ensure conservation of mass, or whatever physically meaningful quantity
- the central line should actually be enough to generate the mesh...
Ideas for solutions
- introduce a GUI option to smooth the lines before generating the mesh, say using second-order splines with 3 or 5 neighbors.
- looking into better meshing algorithms...
- In particular, it would be neat to just have to define the glacier mouth (cross-flow) and have the mesh generated from there. The algorithm should involve a smoothing or correction part for the velocity field (e.g. making it divergence free), so that it is not too sensitive to errors.
- do not need straight lines as cross-sections. Flow convergence at narrowing sections should result in slightly bent cross-sections with middle point pointing upstream.