Hello all,
I am trying to use saveline in a simulation, but I've been having issues. The simulation is from a FEMM to Elmer procedure I am trying to create. More information here:
https://www.elmerfem.org/forum/viewtopic.php?t=8094
The results from the saveline for this case is very, very, weird. I've tried to replicate the issue in another case, but it worked fine. All simulation files are here:
https://github.com/gforti84/ElmerFiles/ ... in/debug_7
My case:
Pavel PMSM case:
Saveline issue
-
- Site Admin
- Posts: 4843
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Saveline issue
Hi
Didn't run, just looked the sif files.
It seems that the initial mesh has only one parents for the internal boundary elements. These cause then some issues when the mesh needs to be made discontinuous on the interface. Where does the mesh come from? Based on your comments on the sif file it seems that the 2nd side then gets the no-parents boundary elements when they are split and when SaveLine tries to evaluate the stuff it faces issues. All but nodal elements require the parent element for evalution.
Generally it would be nicer to create two distinct objects to start with. Sometimes you have access to a mesh that does not allow the discontnuity so it needs to be generated in this rather dirty way.
I have more or less forgotton the way how to do coordinate transformation for SaveLine. I think this is generic way to ask Solvers to jump to a different coordinate system. I could imagine that that edge element evaluation could go south. Btw there seems to be a test case "SaveCircle" too.
If you don't do coordinate transformation do think work then? How about if you reduce the radius. Being exactly at the interface is always more difficult than to interpolate mid elements.
-Peter
Didn't run, just looked the sif files.
It seems that the initial mesh has only one parents for the internal boundary elements. These cause then some issues when the mesh needs to be made discontinuous on the interface. Where does the mesh come from? Based on your comments on the sif file it seems that the 2nd side then gets the no-parents boundary elements when they are split and when SaveLine tries to evaluate the stuff it faces issues. All but nodal elements require the parent element for evalution.
Generally it would be nicer to create two distinct objects to start with. Sometimes you have access to a mesh that does not allow the discontnuity so it needs to be generated in this rather dirty way.
I have more or less forgotton the way how to do coordinate transformation for SaveLine. I think this is generic way to ask Solvers to jump to a different coordinate system. I could imagine that that edge element evaluation could go south. Btw there seems to be a test case "SaveCircle" too.
If you don't do coordinate transformation do think work then? How about if you reduce the radius. Being exactly at the interface is always more difficult than to interpolate mid elements.
-Peter
Re: Saveline issue
Hello Peter,
Thank for the response. The mesh came from converting triangle mesh to elmer mesh (FEMM to Elmer FEM). I am trying to create a tutorial to add to elmer-elmag repository.
This is discussed here:
https://github.com/gforti84/ElmerFiles/ ... in/share_1
I've also added more save line examples in the git folder:
https://github.com/gforti84/ElmerFiles/ ... in/debug_7
Thank for the response. The mesh came from converting triangle mesh to elmer mesh (FEMM to Elmer FEM). I am trying to create a tutorial to add to elmer-elmag repository.
This is discussed here:
https://github.com/gforti84/ElmerFiles/ ... in/share_1
I've also added more save line examples in the git folder:
https://github.com/gforti84/ElmerFiles/ ... in/debug_7
-
- Posts: 2404
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Saveline issue
Curious why the Discontinuous Target Bodies(1) = 10 is 10
when boundary elements 2 touch body 12 and 13?
Boundary Condition 2
! Based on Pavel PMSM example
! Also: https://github.com/ElmerCSC/elmerfem/tr ... ubleMortar
! Tried different settings without success
Target Boundaries(1) = 2
Name = "Sliding"
Discontinuous Boundary = Logical True
! Save Line = Logical True -> ERROR:: SaveLine: Parent not associated!
! Without this -> ERROR:: CreateDiscontMesh: Alternative strategy requires all parent elements!
Discontinuous Target Bodies(1) = 10
Mortar BC = 3
Rotational Projector = Logical True
Galerkin Projector = Logical True
End
when boundary elements 2 touch body 12 and 13?
Boundary Condition 2
! Based on Pavel PMSM example
! Also: https://github.com/ElmerCSC/elmerfem/tr ... ubleMortar
! Tried different settings without success
Target Boundaries(1) = 2
Name = "Sliding"
Discontinuous Boundary = Logical True
! Save Line = Logical True -> ERROR:: SaveLine: Parent not associated!
! Without this -> ERROR:: CreateDiscontMesh: Alternative strategy requires all parent elements!
Discontinuous Target Bodies(1) = 10
Mortar BC = 3
Rotational Projector = Logical True
Galerkin Projector = Logical True
End
-
- Posts: 2404
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Saveline issue
It is the coordinate transformation causing the issue, if you do not use the coordinate transformation in save line, the results look reasonable.
Re: Saveline issue
Hello Kevin,
Thanks for the help.
For this setting, it can be 10 or 11, which are the definitions for stator or rotor air-gaps:
Anyway, for this example, you can run the steady state simulation which does not have this discontinuity in the "dirty way" (case file : case_pmsm_std.sif). Results are weird the same.
If you don't perform the coordinate transformation, results are similar to FEMM (which uses first order elements, but has a smoothing function. This is why the FEMM curves are more smooth).
About the coordinate transformation, it somehow works in the other example.
Anyway. I am trying to set this example the way someone would bring the simulation from FEMM. There, you can not have two contours, two arc segments over each other like in Elmer.
Thanks for the help.
For this setting, it can be 10 or 11, which are the definitions for stator or rotor air-gaps:
Code: Select all
Body 10
Target Bodies(1) = 13
Name = "Stator air gap"
Equation = 1
Material = 1
End
Body 11
Target Bodies(1) = 12
Name = "Rotor air gap"
Equation = 1
Material = 1
Body Force = 1
End
If you don't perform the coordinate transformation, results are similar to FEMM (which uses first order elements, but has a smoothing function. This is why the FEMM curves are more smooth).
About the coordinate transformation, it somehow works in the other example.
Anyway. I am trying to set this example the way someone would bring the simulation from FEMM. There, you can not have two contours, two arc segments over each other like in Elmer.