IsosurfaceSolver

Numerical methods and mathematical models of Elmer
m_nadimii
Posts: 14
Joined: 07 Mar 2023, 17:03
Antispam: Yes

IsosurfaceSolver

Post by m_nadimii »

Hello,

I want to use IsosurfaceSolver after the simulation is done. The first simulation which is statcurrentsolver works fine but IsosurfaceSolver gives me error.

Code: Select all

Solver 3
  Exec Solver = After Simulation
  Equation = "Isosurface"
  Procedure = "Isosurface" "IsosurfaceSolver"
  Output Directory = isosurface
  IsoSurface Variable = Potential
  IsoSurface Values(1) = 0.5
  Variable 1 = Potential
End
and the error that I got is:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x7fda0a023ad0 in ???
#1 0x7fda0a022c35 in ???
#2 0x7fda09c4251f in ???
at ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
#3 0x7fda0a7830ab in __meshutils_MOD_findmeshedges3d
at /home/mohi/Software/elmerfem/fem/src/MeshUtils.F90:18200
#4 0x7fd9f5250b85 in isosurfacesolver_
at /home/mohi/Software/elmerfem/fem/src/modules/Isosurface.F90:346
#5 0x7fda0a6b4c2c in __mainutils_MOD_singlesolver
at /home/mohi/Software/elmerfem/fem/src/MainUtils.F90:5309
In paraview I could use Isovolume filter. Is there any clue why here It doesn't work?
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: IsosurfaceSolver

Post by raback »

Hi

It seems that it has problems finding the edges in the 3D mesh. Do not really know why. A minimalistic test case could help.

-Peter
m_nadimii
Posts: 14
Joined: 07 Mar 2023, 17:03
Antispam: Yes

Re: IsosurfaceSolver

Post by m_nadimii »

Hi,
I have attached the sif file and mesh for the previously mentioned issue. I still couldn't figure it out what the problem is. although it works in paraview.
this is the error that I get.
IsosurfaceSolver: Found 753 potential elements

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0 0x7f0dabc23960 in ???
#1 0x7f0dabc22ac5 in ???
#2 0x7f0dab84251f in ???
at ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
#3 0x7f0dac3b5008 in __meshutils_MOD_findmeshedges3d
at /build/elmerfem-csc-MowBid/elmerfem-csc-9.0-0ppa0/fem/src/MeshUtils.F90:20364
#4 0x7f0da801fb89 in isosurfacesolver_
at /build/elmerfem-csc-MowBid/elmerfem-csc-9.0-0ppa0/fem/src/modules/Isosurface.F90:349
#5 0x7f0dac2dd467 in __mainutils_MOD_singlesolver
at /build/elmerfem-csc-MowBid/elmerfem-csc-9.0-0ppa0/fem/src/MainUtils.F90:5256
#6 0x7f0dac2f2fee in __mainutils_MOD_solveractivate
at /build/elmerfem-csc-MowBid/elmerfem-csc-9.0-0ppa0/fem/src/MainUtils.F90:5531
#7 0x7f0dac58c946 in execsimulation
at /build/elmerfem-csc-MowBid/elmerfem-csc-9.0-0ppa0/fem/src/ElmerSolver.F90:3394
#8 0x7f0dac593808 in elmersolver_
at /build/elmerfem-csc-MowBid/elmerfem-csc-9.0-0ppa0/fem/src/ElmerSolver.F90:662
#9 0x564fb23723f0 in solver
at /build/elmerfem-csc-MowBid/elmerfem-csc-9.0-0ppa0/fem/src/Solver.F90:57
#10 0x564fb237215e in main
at /build/elmerfem-csc-MowBid/elmerfem-csc-9.0-0ppa0/fem/src/Solver.F90:34
Segmentation fault (core dumped)
Attachments
case.sif
(2.61 KiB) Downloaded 30 times
gmsh_simple.geo
(1.56 KiB) Downloaded 27 times
Rich_B
Posts: 423
Joined: 24 Aug 2009, 20:18

Re: IsosurfaceSolver

Post by Rich_B »

Hello,

Increase output level from 5 to 32, and the last three lines of the solver log become:
IsosurfaceSolver: Found 670 potential elements
IsosurfaceSolver: Creating mesh edges
FindMeshEdges3D: Finding mesh edges in 3D mesh
Creating a mesh and loading into ElmerGUI, shows 3 bodies.
bodies_2_and_3.png
bodies_2_and_3.png (77.95 KiB) Viewed 548 times
body_3_by_itself_not_connected.png
body_3_by_itself_not_connected.png (61.07 KiB) Viewed 548 times
Body 2 looks like it is in the middle of Body 3, and Body 3 has two disconnected pieces. What happens if Body 3 is split into two bodies, one on each side of Body 2?

Rich.
kevinarden
Posts: 2317
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: IsosurfaceSolver

Post by kevinarden »

Is it intentional that Body 2 and 3 are not part of any equation and are therefore not part of the solution?
m_nadimii
Posts: 14
Joined: 07 Mar 2023, 17:03
Antispam: Yes

Re: IsosurfaceSolver

Post by m_nadimii »

It is a simplified version of my geometry.
I divided the geometry into two separate bodies, but the error still persist.
The answer to your question, yeah it is intentional. because it doesn't affect the solution. although I tried adding the equation to all bodies, but still I got this error.
In paraview, with contouring I can get what I'm looking for. But I'm not sure what am I doing wrong here.
test.png
(34.65 KiB) Not downloaded yet
Attachments
case.sif
(2.67 KiB) Downloaded 22 times
gmsh_s.geo
(1.63 KiB) Downloaded 27 times
Rich_B
Posts: 423
Joined: 24 Aug 2009, 20:18

Re: IsosurfaceSolver

Post by Rich_B »

Hello,

Since your gmsh model is in millimeters, one should add 'Coordinate Scaling = 0.001' to the Simulation section.

Adding that command allows Isosurface solver to finish without a seg fault, but with a different warning message:
WARNING:: IsosurfaceSolver: No potential elements found for isosurface solver!
Not sure where to go from here.

Rich.
kevinarden
Posts: 2317
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: IsosurfaceSolver

Post by kevinarden »

Scaling may have changed the value to look for
kevinarden
Posts: 2317
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: IsosurfaceSolver

Post by kevinarden »

The peak potential is 0.00293 after scaling so there is nothing found at 0.5. Changing the value to 0.002 finds 359 elements but the error returns.
m_nadimii
Posts: 14
Joined: 07 Mar 2023, 17:03
Antispam: Yes

Re: IsosurfaceSolver

Post by m_nadimii »

yeah if the threshold value isn't defined correctly it says that it didn't find anything.
but when the threshold is defined correctly the error returns.
Post Reply