# Guard ring around a circular electrode

**URL:** <https://root-forum.cern.ch/t/guard-ring-around-a-circular-electrode/57623>\
**Category:** Garfield++\
**Created:** [December 21, 2023, 2:48pm UTC](https://root-forum.cern.ch/t/guard-ring-around-a-circular-electrode/57623 "2023-12-21T14:48:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@Sebastien](https://root-forum.cern.ch/u/Sebastien)\
**Post date:** [December 21, 2023, 2:48pm UTC](https://root-forum.cern.ch/t/guard-ring-around-a-circular-electrode/57623/1 "2023-12-21T14:48:48Z")

</div>

Hi all, I’m trying to define a guard ring around a circular electrode using Garfield and nebem, and obviously i don’t understand something. I thought this was possible by defining a series of flat cylinders representing the different materials, something like that:

MediumConductor Cu;  
MediumPlastic Kp;  
Kp.SetDielectricConstant(4.0);

GeometrySimple geo;  
…

SolidTube Insul1(0,0, 0,ChamberRadius,ElectrodeThickness/2);  
Insul1.SetSectors(4);  
SolidTube Guard(0,0, 0,ChamberRadius-0.1,ElectrodeThickness/2);  
Guard.SetSectors(4);  
SolidTube Insul2(0,0, 0,ChamberRadius-0.2,ElectrodeThickness/2);  
Insul2.SetBottomLid(false);  
Insul2.SetTopLid(false);  
Insul2.SetSectors(4);  
SolidTube Anode(0,0, 0,ChamberRadius-0.3,ElectrodeThickness/2);  
Anode.SetSectors(4);  
Anode.SetLabel(“s”); // set it as the electrode

// set potentials  
Insul1.SetBoundaryDielectric();  
Guard.SetBoundaryPotential(AnodeVoltage);  
Insul2.SetBoundaryPotential(AnodeVoltage); // or SetBoundaryDielectric()? but does not make sense in contact of conductors…?  
Anode.SetBoundaryPotential(AnodeVoltage);

// add components to the geometry  
geo.AddSolid(&Insul1, &Kp);  
geo.AddSolid(&Guard, &Cu);  
geo.AddSolid(&Insul2, &Kp);  
geo.AddSolid(&Anode, &Cu);

But it does not work at all: first nebem fails to initialize if all the elements have the same thicknesses, so i have to increase the inner ones. Also the field lines don’t “avoid” the kapton as I would expect. I guess I don’t understand how to set the boundary conditions between the dielectric and the conductor materials.

Thanks in advance for your help 🙂

---

<div class="post-metadata">

**Author:** ![mczurylo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mczurylo/32/33269_2.png) [@mczurylo](https://root-forum.cern.ch/u/mczurylo)\
**Post date:** [December 21, 2023, 2:58pm UTC](https://root-forum.cern.ch/t/guard-ring-around-a-circular-electrode/57623/2 "2023-12-21T14:58:12Z")

</div>

Hi @Sebastien,

thank you for reaching out on the forum. Maybe @hschindl could take a look?

Cheers,  
Marta

---

<div class="post-metadata">

**Author:** ![Sebastien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@Sebastien](https://root-forum.cern.ch/u/Sebastien)\
**Post date:** [December 21, 2023, 3:05pm UTC](https://root-forum.cern.ch/t/guard-ring-around-a-circular-electrode/57623/3 "2023-12-21T15:05:50Z")

</div>

ok thanks 🙂 meanwhile i noticed that the nebem initialization does not fail using the same thicknesses if i increase the nmax parameter from SetMinMaxNumberOfElements() (in my case, going from 15 to 16 works, no idea why!)

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [December 21, 2023, 4:04pm UTC](https://root-forum.cern.ch/t/guard-ring-around-a-circular-electrode/57623/4 "2023-12-21T16:04:05Z")

</div>

Hi Sebastien,  
I’m not 100% sure I understand the geometry. Do you have a simple sketch (hand-drawn would be fine)?

---

<div class="post-metadata">

**Author:** ![Sebastien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@Sebastien](https://root-forum.cern.ch/u/Sebastien)\
**Post date:** [December 21, 2023, 4:13pm UTC](https://root-forum.cern.ch/t/guard-ring-around-a-circular-electrode/57623/5 "2023-12-21T16:13:38Z")

</div>

![image](https://root-forum.cern.ch/uploads/default/original/3X/a/d/ad77b3174f80d6413c1b928e805f1ae933307fba.png)

---

<div class="post-metadata">

**Author:** ![Sebastien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@Sebastien](https://root-forum.cern.ch/u/Sebastien)\
**Post date:** [December 21, 2023, 4:16pm UTC](https://root-forum.cern.ch/t/guard-ring-around-a-circular-electrode/57623/6 "2023-12-21T16:16:50Z")

</div>

I mean something like that 🙂 (i did not represent the cylinder wall) Of course in the code I sent, the anode and guard ring are within the foil which is not realistic, but my main issue is how to simulate in Garfield/nebem a metallic ring in contact with an insulator 🙂 I hope it is more clear!

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [December 21, 2023, 4:49pm UTC](https://root-forum.cern.ch/t/guard-ring-around-a-circular-electrode/57623/7 "2023-12-21T16:49:06Z")

</div>

Ah, I see 😉 The `ComponentNeBem3d` class looks for touching surfaces (and identify/eliminate overlaps) but does not check for intersections of solids. What _should_ work is putting the anode disk and guard ring on top of the foil disk. Then the surface areas where the guard ring or anode touch the foil should be assigned fixed-voltage boundary conditions (i. e. the potential of the anode and guard ring, respectively). And for the remaining surfaces of the foil, dielectric-dielectric boundary conditions will be used. Can you give it a try? If it doesn’t work let me know…

---

<div class="post-metadata">

**Author:** ![Sebastien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@Sebastien](https://root-forum.cern.ch/u/Sebastien)\
**Post date:** [December 22, 2023, 6:55am UTC](https://root-forum.cern.ch/t/guard-ring-around-a-circular-electrode/57623/8 "2023-12-22T06:55:55Z")

</div>

Thanks for your answer 🙂 This is what i wanted to do initially, but i could not find a way to make a _ring_ (i.e with a given thickness) using the available geometry templates. This is why I then tried with several cylinders in each other. Is there a possibility to make such a ring?  
Thanks again!

---

<div class="post-metadata">

**Author:** ![Sebastien](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@Sebastien](https://root-forum.cern.ch/u/Sebastien)\
**Post date:** [December 22, 2023, 7:54am UTC](https://root-forum.cern.ch/t/guard-ring-around-a-circular-electrode/57623/9 "2023-12-22T07:54:01Z")

</div>

So, doing what you propose (means, so far, under the assumption that the ring is infinitely thin) the situation is indeed much better in terms of potential and field maps. In particular, the weighting field map shows no oscillation anymore on top of the anode.  
So my only issue left is the thickness of the guard ring. I guess if there is no way to do it with the current version of the code, I can live with a thin one 🙂

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [January 5, 2024, 7:54am UTC](https://root-forum.cern.ch/t/guard-ring-around-a-circular-electrode/57623/10 "2024-01-05T07:54:23Z")

</div>

Closed on January 5, 2024, 7:54am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
