GlaDS channels with an extruded mesh

Extension of Elmer in computational glaciology
Post Reply
SamuelC
Posts: 4
Joined: 01 Sep 2017, 17:48
Antispam: Yes

GlaDS channels with an extruded mesh

Post by SamuelC » 01 Sep 2017, 18:15

I'm working on a 2D mesh that's being internally-extruded in Elmer using MeshExtrude to a 3D mesh, and getting it to work with channels in the GlaDS hydrology solvers. Initially, this returns a 'Matrix Not Associated' error for GlaDSchannelSolver, as the mesh extrusion doesn't retain the edges properly, meaning no EdgeIndexes are set, meaning InitialPermutation returns a 0 for GlaDSchannelSolver, so no matrix is created.

I've solved this on my install with the following modifications:
At line 11138 of MeshUtils (in MeshExtrude) to make sure the edges flag is turned on if they are required

Code: Select all

NeedEdges = ASSOCIATED(Mesh_in % Edges)
At line 2882 of MeshUtils (in SetMeshFaceEdgeDOFs) to set EdgeBDOFs to a non-0 value (there's probably a much more sensible way of doing this)

Code: Select all

ELSE
Edge % BDOFs = MAX(1, Edge % BDOFs)
At line 2935 of MeshUtils (in SetMeshEdgeFaceDOFs) to ensure AssignLocalNumber is called for non-P elements (and replicated at line 2948 for the right side)

Code: Select all

ELSE
CALL AssignLocalNumberSC(Element, Element % BoundaryInfo % Left, Mesh)
'AssignLocalNumberSC' is just the AssignLocalNumber subroutine with all the lines stopping it working on non-P elements commented out. I did the same thing on the 'getElementBoundaryMap' and 'getFaceEdgeMap' subroutines to get those to work.

These changes fix the issue and don't seem to break anything else, but I'm aware there's probably a better way of doing them....

gagliar
Posts: 55
Joined: 04 Sep 2009, 16:34
Location: LGGE - Grenoble
Contact:

Re: GlaDS channels with an extruded mesh

Post by gagliar » 04 Sep 2017, 09:19

Dear Samuel,

Thanks for the report. The point would be to test the same case with a "true" 3d mesh to see if the problems are arising because of the internal extrusion or because of the 3d mesh not well accounted for in the GlaDS solvers. Would it be possible for you to make such test?

Regards,
Olivier

SamuelC
Posts: 4
Joined: 01 Sep 2017, 17:48
Antispam: Yes

Re: GlaDS channels with an extruded mesh

Post by SamuelC » 04 Sep 2017, 13:51

Hi Olivier

If you've got a 3D mesh available, sure - I've always done stuff using the internal extrusion feature, so I'm not entirely sure how to make a 3D mesh outside of Elmer. But, if your tests using an already-3D mesh worked and mine using internal extrusion didn't, seems likely that it's the internal extrusion causing the problems, rather than the 3D-ness in and of itself.

Samuel

rgladstone
Posts: 61
Joined: 15 Apr 2013, 16:23
Antispam: Yes

Re: GlaDS channels with an extruded mesh

Post by rgladstone » 12 Oct 2017, 15:50

Hi, I missed this post when it was first posted, but just in case this is still relevant:

At some point I implemented an option to preserve basal boundary ids when extruding (I think I didn't quite do it properly and Fab later fixed it), i.e. 202 elements can keep their boundary IDs and the corresponding 404 vertical boundaries get new IDs.

I also implemented an option to dump an internally extruded mesh to file (possibly only in serial, I don't recall), either immediately after extrusion or after structured mesh mapping.

If either of these things are useful to you let me know. They can be activated by keyword if I recall correctly, and I can look this up.

Rupert

rgladstone
Posts: 61
Joined: 15 Apr 2013, 16:23
Antispam: Yes

Re: GlaDS channels with an extruded mesh

Post by rgladstone » 12 Oct 2017, 15:53

Seems I documented the extruded mesh dumping:

http://elmerice.elmerfem.org/wiki/doku. ... cturedmesh

SamuelC
Posts: 4
Joined: 01 Sep 2017, 17:48
Antispam: Yes

Re: GlaDS channels with an extruded mesh

Post by SamuelC » 28 Nov 2017, 12:41

As an update on where we are with this, at the recent Advanced Elmer/Ice Workshop, Olivier and I tested internally and externally-extruded meshes and confirmed that the issue was that edge element weren't being re-created on the internally-extruded mesh after extrusion. Externally-extruded meshes work fine, though.

We talked through the changes to the source code detailed in the previous posts with Thomas and looks as if they should be implemented in the distribution fairly soon.

Rupert: what was the keyword you were using to preserve the basal boundary IDs? We could test that as well to see if that solves the problem as well.

Samuel

tzwinger
Site Admin
Posts: 82
Joined: 24 Aug 2009, 12:20
Contact:

Re: GlaDS channels with an extruded mesh

Post by tzwinger » 28 Nov 2017, 13:32

With some guessing on not specific information, the latest version of elmerice-branch should contain the needed functionality. So, please, test it and give feedback.

The keyword you were asking from Rupert is

Code: Select all

Preserve Baseline = Logical True
But to my knowledge really only puts the 1D (2D was wrong) elements on the boundary.

Regards,

Thomas
Last edited by tzwinger on 28 Nov 2017, 13:52, edited 1 time in total.

rgladstone
Posts: 61
Joined: 15 Apr 2013, 16:23
Antispam: Yes

Re: GlaDS channels with an extruded mesh

Post by rgladstone » 28 Nov 2017, 13:34

There is a note about it here:
http://elmerice.elmerfem.org/wiki/doku. ... cturedmesh

So it should be like this:
Preserve Baseline = Logical True

But this just labels the 1D elements around the boundary of the footprint. If I understood right you need all edges labelled within the lower surface, so I don't think this would help you. It sounds like the extrude mesh subroutine needs updating.

Post Reply