Capacitance matrix calculation

The graphical user interface of Elmer
Post Reply
sam
Posts: 3
Joined: 25 May 2018, 15:22
Antispam: Yes

Capacitance matrix calculation

Post by sam » 25 May 2018, 20:25

Hello everyone,

Apologies in advance if what I'm about to ask has been asked before and if this post would be more suitable in another category.

What I'm trying to do:
Ultimately, I'd like to use Elmer to calculate the capacitance matrix for 17 electrodes within an ionisation chamber. I've attached the .step file that I created in Freecad.

What I've done so far:
Firstly, I followed the tutorial relevant to this problem (2 balls inside a larger ball), and the results matched those given in the instructions. I planned to generate the mesh for the chamber by exporting the .step file from freecad, create the mesh with gmsh, convert with Elmergrid and then load into Elmer. I therefore tried to replicate the '2 balls in a larger ball' calculation by making a similar geometry in freecad and following the steps that I intended to take to get to the capacitance matrix, closely following the steps in the tutorial after I had created the mesh. A screen shot of the geometry in the GUI with the convergence and results is attached for the case where I followed the tutorial exactly and where I tried to replicate it using freecad. Unfortunately, the results are very different. The problem obviously lies somewhere within the creation of the step file and meshing in gmsh. My exact procedure is:

1) draw three spheres in freecad, one enlosing the other two, which are separated.
2) selecting these shapes in the 'model' tab, and then export as a .step
3) open the .step in gmsh and choosing: mesh -> 3D -> optimise 3D -> refine by splitting.
4) save mesh.
5) Elmergrid 14 2 mymesh.msh -autoclean

There is a problem somewhere in here, and I suspect that it is something to do with the number of bodies - in my attempt at the problem, I apply the Equation to 3 bodies whereas in the tutorial example, you only apply the equation to 1 body. Please could someone define exactly what a body is? I'm not sure as to how 3 distinct spheres can be treated as one 'body' in the tutorial example.

Any suggestions as to where I've gone wrong and what I might to do solve this would be very much appreciated!!

Thanks in advance,
Sam.
Attachments
simpleGeometry.step
(421.64 KiB) Downloaded 8 times
twoBallsTutorial.png
(461.12 KiB) Not downloaded yet
twoballsReplica.png
(386.97 KiB) Not downloaded yet

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

Re: Capacitance matrix calculation

Post by raback » 25 May 2018, 20:38

Hi

You don't need to mesh the inside of the balls as they are at constant potential. You only need the air (body 1) and BCs for each ball.

-Peter

sam
Posts: 3
Joined: 25 May 2018, 15:22
Antispam: Yes

Re: Capacitance matrix calculation

Post by sam » 26 May 2018, 17:02

Hi Peter,

Thank you very much for your prompt reply! As far as I understand it now, there is one body which is the air - all the space between the boundaries created by the shapes within the larger shape. That means that when I create the freecad .step file, I should not add objects inside a larger object, but I should extrude parts of the larger shape to create the surfaces that I want. Is that correct?

Many thanks,
Sam.

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

Re: Capacitance matrix calculation

Post by raback » 26 May 2018, 19:31

Hi

I would think that you make the choice not to mesh the inside of the balls in Gmsh. Just don't create a volume and it won't be meshed.

-Peter

sam
Posts: 3
Joined: 25 May 2018, 15:22
Antispam: Yes

Re: Capacitance matrix calculation

Post by sam » 28 May 2018, 01:05

Hi Peter,

I managed to get my attempt at the problem with the two balls to work correctly by producing a body in freecad by cutting out the volumes inside the larger enclosing surface and then meshing using gmsh; the potential from the inner spheres look believeable and the results are similar to the ones in the tutorial. Thanks for your help with that!

I have a couple more questions if I may:

1) I tried to use the geometry of the chamber that I attached in a previous post to solve for the capacitance matrix. There is a symmetry to the problem, with an anode segmented into 3x5 smaller rectangular sections and a grid that has been approximated to a plane and is positioned next to the anode. You would expect that the elements of the matrix corresponding to the coupling of the grid and anode sections on the corners to be the same for example, and the same for the other geometrically equivallent anode sections. There is a large (~20%) difference however. Do you think that this could be a meshing issue?

2) I would like to clarify that the capacitance matrix that Elmer produces is what I think it is. My understanding of the elements of the capacitance matrix is that for each electrode i (including a counducting outer electrode (not set to BC at infinity)) are sequentially set at unit potential and all the others, j, are set to ground. The flux through each electrode represents the the charge on that electrode and so the element C_i,j is the electric flux through conductor j when conductor i is set at unit potential. Please correct me if this is not what the capacitance matrix that Elmer produces means. I have tried calculating the matrix for a parallel plate capacitor (I have three capacitance bodies, the two plates and a large cube for the enlcosing conducting surface) - the results are of the correct magnitude. The thing is that the diagaonal elements of the matrix should be positive and the off diagonal elements should be negative (if following my understanding of the matrix). In the results for the parallel plate cap, one of the diagonal elements is negative and all of the off-diagonal elements are positive. Do you know why this could be?

I hope that this makes some sense.

Many thanks,
Sam.

Post Reply