## 2-D Flow line Model

Extension of Elmer in computational glaciology
andrewdnolan
Posts: 9
Joined: 26 Oct 2020, 18:33
Antispam: Yes

### 2-D Flow line Model

Hello,

I am trying to adapt the code from the "Toy flow-line model" tutorial for my own glacier of interest. I have surface and bed profile that I'd like to use to generate a 2-D mesh. Using the .geo file from "Toy flow-line model" tutorial as template and an edited version of the "Makegeo.py" file from the "Tête Rousse" tutorial, I can successfully create a 2-D mesh. I am able to recreate the results of "Toy flow-line model" tutorial with my mesh generation producer, so I at least know I am on the right track. I have attached a zipped folder with a minimum working example (MWE) using the "Toy flow-line model" data.

Now, when I try to adapt this code for my own surface and bed profile, I get get multiple warnings/errors raised. Mainly "ERROR:: ElementMetric: Degenerate Elements." I have also attached a zipped folder of a MWE for this input data. Here is a sample of the stdout from the model run:

Code: Select all

`````` StructuredMeshMapper:  Active coordinate mapping time:    1.0729999999999906E-003
FlowdepthSolver: Memory allocation done.
FlowdepthSolver: Gradient of  -0.1000E+01 applied
FlowdepthSolver: Free surface variable will be calculated
ERROR:: ElementMetric: Degenerate 2D element: 3653
ElementMetric: Body Id: 1 DetG:   0.000E+00
ElementMetric: Node: 1 Coord:   3.594E+02   1.841E+03   0.000E+00
ElementMetric: Node: 2 Coord:   3.438E+02   1.838E+03   0.000E+00
ElementMetric: Node: 3 Coord:   3.438E+02   1.838E+03   0.000E+00
ElementMetric: Node: 4 Coord:   3.594E+02   1.841E+03   0.000E+00
ElementMetric: Node: 2 dCoord:  -1.563E+01  -2.380E+00   0.000E+00
ElementMetric: Node: 3 dCoord:  -1.563E+01  -2.380E+00   0.000E+00
ElementMetric: Node: 4 dCoord:   0.000E+00   0.000E+00   0.000E+00
ERROR:: ElementMetric: Degenerate 2D element: 3653
ElementMetric: Body Id: 1 DetG:   0.000E+00
ElementMetric: Node: 1 Coord:   3.594E+02   1.841E+03   0.000E+00
ElementMetric: Node: 2 Coord:   3.438E+02   1.838E+03   0.000E+00
ElementMetric: Node: 3 Coord:   3.438E+02   1.838E+03   0.000E+00
ElementMetric: Node: 4 Coord:   3.594E+02   1.841E+03   0.000E+00
ElementMetric: Node: 2 dCoord:  -1.563E+01  -2.380E+00   0.000E+00
ElementMetric: Node: 3 dCoord:  -1.563E+01  -2.380E+00   0.000E+00
ElementMetric: Node: 4 dCoord:   0.000E+00   0.000E+00   0.000E+00 ``````

The full .log file of the stdout is too large to attach (>5MB), but if you get it by running the MWE. Why is it that this approach works for the "Toy flow-line model" data but errors are raised for my input data? I've tried smoothing my input data so there are no sharp changes in the bed, but still run into the same problem.

Also, why is the mesh in the "Toy flow-line model" in the X-Y plane? Should it not be X-Z?

Thanks for the help,
Andrew
Attachments
TestGmsh.tar
SouthGlacier.tar
gagliar
Posts: 77
Joined: 04 Sep 2009, 16:34
Location: LGGE - Grenoble
Contact:

### Re: 2-D Flow line Model

Hello,

The problem is that you have zero thickness at the front of the glacier and that you should take care that the mesh has a minimum height by setting

Code: Select all

``````Minimum Mesh Height = Real 1.0
Correct Surface = Logical True
``````
in the Solver section of StructuredMeshMapper.

Moreover, for a 2d flow line problem, you don't really need to build an initial mesh that follow the geometry of the surface and bed elevation of the glacier. A rectangle mesh of height 1 and with the length of the glacier will be automatically extruded before the simulation (by StructuredMeshMapper). The Makegeo.py script is dedicated to 3d problems and produces a 2d footprint which is vertically extruded within the sif (again by StructuredMeshMapper).

Using the south_glacier.grd file should work (ElmerGrid 1 2 south_gracier.grd to produce the mesh).

Code: Select all

``````***** ElmerGrid input file for structured grid generation *****
Version = 210903
Coordinate System = Cartesian 2D
Subcell Divisions in 2D = 1 1
Subcell Limits 1 = 0.0  6.00000000e+03
Subcell Limits 2 = 0.0 1.0
Material Structure in 2D
1
End
Materials Interval = 1 1
Boundary Definitions
! type     out      int
1        -1        1        1
3        -2        1        1
2        -3        1        1
4        -4        1        1
End
Numbering = Horizontal
Coordinate Ratios = 1
Element Innernodes = False
Element Degree = 1
Triangles = False
Element Divisions 1 = 200
Element Divisions 2 = 10
``````

Regards,
Olivier
andrewdnolan
Posts: 9
Joined: 26 Oct 2020, 18:33
Antispam: Yes

### Re: 2-D Flow line Model

Hello,

Sorry about the slow reply. This was very helpful and did the trick.

Thanks for the timely reply!

Best,
Andrew