Merging Meshes / Multiple Bodies

The graphical user interface of Elmer
rschaefer
Posts: 6
Joined: 28 Feb 2018, 20:19
Antispam: Yes

Merging Meshes / Multiple Bodies

Post by rschaefer » 28 Feb 2018, 20:26

Dear Elmer-community,

First of all, the context: I'd like to use Elmer for static electrical field calculations for a particle physics detector. I started with GMSH and created my detector in SINGLE parts (basically a tube with wires in it). The reason why I chose single parts were my geometric constraints. Since the wires are very thin compared to their length, the meshing didn't go properly when I constructed the wole detector in GMSH. So I did it 1-by-1.

Now I want to import this in Elmer to make the field calculations. I managed to "unite" all wires into a single mesh. These should be kept at a constant potential (e.g. .30V). However, the tube, which corresponds to the detector casing, should be at a different potential (e.g. 0V).

Now my problem is: If I unite the mesh of "all wires" and the "casing" mesh, I only get one body in ElmerGUI - so I can't apply different potentials. Are there different ways of uniting or adding two meshes? Preferrably in a way, that the wires are "body 1" and the casing is "body 2"?

Cheers,
Robert

mzenker
Posts: 1807
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Merging Meshes / Multiple Bodies

Post by mzenker » 28 Feb 2018, 20:33

Hi,

Elmer's capability to treat meshes being limited, I would try to make the mesh ready with an external mesher. You could post your problem on the gmsh mailing list, or try if you can solve it with another mesher, e.g. Salomé.
Concerning the potential, I would impose it on the boundaries. Your mesh should have the surfaces limiting your geometry as boundaries where you can set the potential as boundary condition.

HTH,
Matthias

raback
Site Admin
Posts: 3326
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Merging Meshes / Multiple Bodies

Post by raback » 05 Mar 2018, 16:19

Hi,

try

Code: Select all

ElmerGrid 2 2 wires -bulktype 1 10 1  ! make bodies [1,10] to 1
ElmerGrid 2 2 casing -bulktype 1 10 2 ! make bodies [1,10] to 2
ElmerGrid 2 2 wires -in casing -out finalmesh -unite -merge 1.0e-10
I would be concerned that your united mesh is not conforming and then the merging does not work.

-Peter

rschaefer
Posts: 6
Joined: 28 Feb 2018, 20:19
Antispam: Yes

Re: Merging Meshes / Multiple Bodies

Post by rschaefer » 16 Mar 2018, 16:15

Dear Peter,

thanks for your reply. I tried it, and it worked.

Basically what I would like is the electrostatic field of: a -30V - potential on the 4 wires and a 0V - potential on the mantle.
Since I assume that the electrical field calculation is a very simple task, is there a tutorial how to do it?

Best regards,
Robert

rschaefer
Posts: 6
Joined: 28 Feb 2018, 20:19
Antispam: Yes

Re: Merging Meshes / Multiple Bodies

Post by rschaefer » 16 Mar 2018, 16:24

Sorry, I forgot a sketch of the layout. See the attachment.
Attachments
IC.pdf
(12.49 KiB) Downloaded 60 times

raback
Site Admin
Posts: 3326
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Merging Meshes / Multiple Bodies

Post by raback » 16 Mar 2018, 16:35

Hi

Try to add this to your sif,

Code: Select all

Solver 2
  Equation = ComputeFlux
  Procedure = "FluxSolver" "FluxSolver"

  Calculate Grad = Logical True 
  Target Variable = String Potential

  Linear System Solver = "Iterative"
  Linear System Iterative Method = "cg"
  Linear System Preconditioning = ILU0
  Linear System Residual Output = 10
  Linear System Max Iterations = Integer 1000
  Linear System Convergence Tolerance = 1.0e-10
End
and modify

Code: Select all

Active Solvers(2) = 1 2 
-Peter

rschaefer
Posts: 6
Joined: 28 Feb 2018, 20:19
Antispam: Yes

Re: Merging Meshes / Multiple Bodies

Post by rschaefer » 16 Mar 2018, 17:35

Hi Peter,

thanks for the hint. Well in my sif file, your second suggestion is implemented by default.

Also, regarding your first suggestion, there is already a "solver 2" part in my sif. Would you like me to just replace the default part with yours or additionally place it in my sif.

Also, regarding the mesh, when I add the boundary conditions (= potentials of the surfaces) to my surfaces, there is a strange connection, see the image/attachment.
The inner red surface (lower left) should be on -30V and the outer larger surface should be at 0V - is there a method to decouple this?


Cheers,
Robert
Attachments
pic1.png
pic1.png (455.5 KiB) Viewed 874 times

raback
Site Admin
Posts: 3326
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Merging Meshes / Multiple Bodies

Post by raback » 18 Mar 2018, 21:57

Hi Robert

Even the GUI has tool to separate BCs by feature angle. You could use that.

To be on the safe side, do you have any mesh between the outer cylinder and the wire at the center? In finite elements the whole volume must be meshed.

-Peter

rschaefer
Posts: 6
Joined: 28 Feb 2018, 20:19
Antispam: Yes

Re: Merging Meshes / Multiple Bodies

Post by rschaefer » 21 Mar 2018, 13:32

Hi Peter,

thanks for the info. I don't have a mesh between the outer cylinder and the inner wires. I'll put in something and come back to you.

Cheers,
Robert

rschaefer
Posts: 6
Joined: 28 Feb 2018, 20:19
Antispam: Yes

Re: Merging Meshes / Multiple Bodies

Post by rschaefer » 03 May 2018, 12:20

Hi Peter,

well I managed to implement your hint, as well as splitting/uniting the surfaces accodingly. However for the assignment of the materials I only have one "body" available, where I need 3 (the casing made from Al, the wires made from Cu and the "inner part" made from air). Is there a possibility to generate a body (maybe from a selection of surfaces)?

Cheers,
Robert

Post Reply