Adaptive Mesh Refinement

Numerical methods and mathematical models of Elmer
Post Reply
mrbenson75
Posts: 7
Joined: 04 Apr 2020, 15:31
Antispam: Yes

Adaptive Mesh Refinement

Post by mrbenson75 »

Hello,

I try to use the Adaptive Mesh Refinement on a simple 2D HeatSolve equation.
1 - I can't understand why the ep file doest not contain the adapted mesh instead of the original mesh.
2 - After the AMR, i'd liketo work on this "new" mesh for the following solvers like FluxSolver.
3 - Moreover when it comes to "Adaptive Mesh Save=True", i notice in the ep file contains missing boundary tag in the groupall section.

Best regards.
Attachments
case.zip
(5.67 KiB) Downloaded 192 times
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Adaptive Mesh Refinement

Post by kevinarden »

Setting Adaptive Mesh Save = True worked for me if i sat max iterations to something higher than 1. I used paraview vtu file not ep.
I changed steady state max iterations to something more than 1 or else it would just do the first iteration on the first mesh and quit.
Simulation Type = Steady state
Steady State Max Iterations = 20
Attachments
iteration19.png
(168.95 KiB) Not downloaded yet
mrbenson75
Posts: 7
Joined: 04 Apr 2020, 15:31
Antispam: Yes

Re: Adaptive Mesh Refinement

Post by mrbenson75 »

Hello,
I correct as you with a Steady State Max Iterations greater that 1 but the refinenemt stage is still "empty"

Code: Select all

RefineMesh: ----------- M E S H   R E F I N E M E N T --------------
RefineMesh: ----------- E N D   M E S H   R E F I N E M E N T --------------
Can you provide me your sif ?

Best regards.
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Adaptive Mesh Refinement

Post by kevinarden »

case.sif
(3.83 KiB) Downloaded 269 times
This is the sif I used.
mrbenson75
Posts: 7
Joined: 04 Apr 2020, 15:31
Antispam: Yes

Re: Adaptive Mesh Refinement

Post by mrbenson75 »

Hello,

Thanks, now i get the adapted mesh as you in the vtu files in the RefinedMeshX folder. But there is a strange results, in the lower left part the temperature must be 293.15 in the all vertical line...seems a tag in not wright in the adapted mesh ?
Best regards.
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Adaptive Mesh Refinement

Post by kevinarden »

You can use load mesh in ElmerGUI to load each refined mesh and view it. It makes new boundaries base on your boundary definitions in case.sif. That is you only end up with 4, it combines the target boundaries.

The lower left part is BC 2, originally 13,14 and it is set at 296.15 in case.sif.
mrbenson75
Posts: 7
Joined: 04 Apr 2020, 15:31
Antispam: Yes

Re: Adaptive Mesh Refinement

Post by mrbenson75 »

Hello,

1 - I checked and some boundary elements are missing in the adapted meshes. Some divided line's triangle do not have tags. Why do the tags are not the same as the original ?
2 - The AMR is very slow to converge, is it normal ?

Best regards.
Gary R
Posts: 162
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: Adaptive Mesh Refinement

Post by Gary R »

I am having trouble with adaptive meshing. I just reinstalled Elmer from the PPA system. The version is 8.4. I tried to use the Adaptive settings in the GUI but nothing is printed to the case.sif file. This has been a problem for a long time. I had hoped that it would be fixed by now. I manually edited the case.sif file to include the proper entries.

Code: Select all

 Adaptive Mesh Refinement = True
  Adaptive Remesh = False
  Adaptive Save Mesh = True
! Adaptive Error Limit = 1.0e-5
!Adaptive Max Change = 1.0e-4
This didn't work either. I must be doing something wrong but don't know what. I've included my .sif file and a .unv file for anyone wishing to run the actual simulation. I have left the mesh very course and was depending on the Adaptive process to refine it as needed.

OS Debian 10
KDE Desktop

Gary R.
Attachments
case2.sif
(2.11 KiB) Downloaded 163 times
Waveguide2DSurface_2.unv
(32.58 KiB) Downloaded 151 times
mika
Posts: 230
Joined: 15 Sep 2009, 07:44

Re: Adaptive Mesh Refinement

Post by mika »

Hi,

Elmer supports mesh adaptivity very selectively, and the Helmholtz solver has not been modified to handle adaptivity. I checked that only the following solver codes read the keyword "Adaptive Mesh Refinement":

modules/HeatSolve.F90
modules/StatElecSolve.F90
modules/FlowSolve.F90
modules/ElasticSolve.F90
modules/StressSolve.F90

This is a limitation of code, one should program error indicators to make this functional with the Helmholtz model.

-- Mika
Post Reply