24
Detector Simulation in Garfield++ with Open-Source Finite Element Electrostatics Collaborators (LLNL): Adam Bernstein, Mike Heffner, Peter Sorensen, Melinda Sweany Josh Renner UC Berkeley / LBNL RD51 Mini-Week, WG4 June 15, 2012

Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Detector Simulation in Garfield++ with Open-Source Finite Element

Electrostatics

Collaborators (LLNL): Adam Bernstein, Mike Heffner, Peter Sorensen, Melinda Sweany

Josh RennerUC Berkeley / LBNL

RD51 Mini-Week, WG4June 15, 2012

Page 2: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 2

Background:

● Garfield and Garfield++ support simulations of electron/ion drift in finite-element fields

● We describe a process by which the open-source tools Gmsh (http://geuz.org/gmsh) and Elmer (http://www.csc.fi/english/pages/elmer) can be used with Garfield to perform such simulations

● This effort started at LLNL in simulations the Negative Ion TPC (discussed later).

● See accompanying writeup and code:http://garfieldpp.web.cern.ch/garfieldpp/examples/elmer/

Page 3: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 3

Background:

● Overview of Procedure

Create Geometry and Mesh (Gmsh)

Solve for Potential(Elmer)

Simulation(Garfield++)

Convert Mesh Import Field Map

Page 4: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 4

Geometry:

● Gmsh - parameterized geometry inputx=0; y=0; z=0; d=1;

p1 = newp; Point(p1) = {x,y,z};p2 = newp; Point(p2) = {x+d,y,z};p3 = newp; Point(p3) = {x,y+d,z};...

l1 = newl; Line(l1) = {p1, p2};l2 = newl; Line(l2) = {p2, p3};l3 = newl; Line(l3) = {p3, p1};...

lp = newll; Line Loop(lp) = {l1, l2, l3};s = news; Plane Surface(s) = {lp};...

s_loop = newsl; Surface Loop(s_loop) → = {s1, s2, s3, s4, s5, s6};vol = newv; Volume(vol) = {s_loop};...

➔ Define parameters

➔ Create points

➔ Connect with lines

➔ Define surfaces

➔ Define volumes

Page 5: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 5

Geometry:

● Potentials and materials

➔ Physical surfaces specify areas to be assigned specific potentials

➔ Physical volumes specify materials to be assigned a dielectric constant

physv_dielectric = n_physv; Physical Volume(physv_dielectric) = {vol_inner};

physs_top_plate = n_physs; Physical Surface(physs_top_plate) = {s_top_plate};physs_bottom_plate = n_physs; Physical Surface(physs_bottom_plate) = {s_bottom_plate};

Page 6: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 6

Mesh:

● Mesh geometry with Gmsh

➔ Sizes of mesh elements can be varied at each point➔ Any region in which the field will be calculated must be meshed➔ Later convert to Elmer format for electrostatics calculation➔ Note: Gmsh can also import geometries from CAD programs, though

this may complicate meshing and assignment of potentials/materials

Page 7: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 7

Electrostatics:

● Elmer called with an input file:

➔ Specify solver and options

Boundary Condition 1 Target Boundaries = 1 Potential = 0End...

Solver 1 Equation = Stat Elec Solver Variable = Potential Variable DOFs = 1...

➔ Specify boundary conditions

* Physical surface identifier

➔ Specify dielectric constants

Body 1 Equation = 1 Material = 1End

Material 1 Relative Permittivity = 1End...

* Physical volume identifier

Page 8: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 8

Simulation/visualization:

● Results of the calculation imported into Garfield++, along with Elmer-formatted meshComponentElmer * elm = new ComponentElmer( "sample_map/mesh.header", // Mesh "sample_map/mesh.elements", "sample_map/mesh.nodes", "sample_map/dielectrics.dat", // List of dielectrics "sample_map/sample_map.result", // Elmer results "cm"); // Units

● Assign a drift mediumelm->SetMedium(0,gasArCO2);

Ready for simulation

Page 9: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 9

Simulation/visualization:

● ViewFEMesh class

➔Draws finite elements according to fill and color options

➔Can draw drift lines produced in simulations with ViewDrift

➔Can be drawn over a plot made by ViewField

Page 10: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 10

Simulation/visualization:

● ViewFEMesh + ViewField: contours for a LEM

Page 11: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 11

Simulation/visualization:

● ViewFEMesh + ViewDrift: avalanche in a LEM

Page 12: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 12

Application: Negative Ion TPC*

● Drift ionization in the form of negative ions

● Advantages include reduced diffusion and potentially intrinsic energy resolution (electrons are counted one by one)

● Garfield++ and finite element used to simulate and understand LEM-based readout process

1. C. J. Martoff et. al. Nucl. Instr. Meth. A 440, 355 (2000).2. For further analysis, see D. Nygren. J. Phys. Conf. Series 65 (2007) 012003.3. P. Sorensen et. al. arXiv:1205.6427v1. (http://dx.doi.org/10.1016/j.nima.2012.05.078)

* References:

Page 13: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 13

E

Incident particle deposits energy through ionization

Gaseous Medium

Application: Negative Ion TPC

Page 14: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 14

E

Incident particle deposits energy through ionization

Electrons are drifted until they attach to impurities to form negative ions

Application: Negative Ion TPC

Page 15: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 15

E

Incident particle deposits energy through ionization

Electrons are drifted until they attach to impurities to form negative ions

Application: Negative Ion TPC

Page 16: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 16

E

Incident particle deposits energy through ionization

Electrons are drifted until they attach to impurities to form negative ions

These ions are drifted to a plane...

Application: Negative Ion TPC

Page 17: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 17

E

Incident particle deposits energy through ionization

Electrons are drifted until they attach to impurities to form negative ions

These ions are drifted to a plane... where each has its electron removed by the high field in a LEM

Application: Negative Ion TPC

Page 18: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 18

E

Incident particle deposits energy through ionization

Electrons are drifted until they attach to impurities to form negative ions

These ions are drifted to a plane... where each has its electron removed by the high field in a LEM

This electron multiplies in the high field yielding one detectable signal for each ion

Application: Negative Ion TPC

Page 19: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

19

Application: Negative Ion TPC

● Avalanche in the presence of detachment

➔ Place electrons according to a calculated detachment distribution

➔ Drift and mark first ionization in avalanche

➔ Uses Garfield++ class: AvalancheMicroscopic

➔ Similar calculation presented in [1]

[1] P. Sorensen et. al. arXiv:1205.6427v1.

Detachment Distribution

Josh Renner, RD51 Mini-Week WG4, 06/15/12

Page 20: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 20

Application: Negative Ion TPC

● LEM gain curve modified due to variation in avalanche start location (expect exponential)

From Sorensen et. al. arxiv 1205.6427v1

➔ Effectively simulates avalanches initiated by negative ions

➔ Uses AvalancheMC➔ Deviation from

exponential due to detachment

➔ Used modified Townsend coefficient (enlarged by 19%) to match gain of LEM

Page 21: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 21

Other Finite Element Examples

● Negative Ion TPC detector geometry

Cathode

Driftrings

Supports

Metal disc (in place of LEM)

Page 22: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 22

Other Finite Element Examples

● Single-wire alternate to LEM readout

Dielectric

Copper

Thin wire

Electric potential (V)

Page 23: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 23

Summary

● Finite element tools➔ Geometry (Gmsh), Electrostatics (Elmer),

Simulation/visualization (Garfield++)➔ Open-source➔ Parameterized geometry input: adjustments in

dimensions can be made quickly

● Possible improvements to consider➔ Initial geometry input and large changes require

significant effort➔ Difficult to mesh geometries with large variations in

dimensions (may require a very large mesh)

Page 24: Detector Simulation in Garfield++ with Open-Source Finite ... · Josh Renner, RD51 Mini-Week WG4, 06/15/12 6 Mesh: Mesh geometry with Gmsh Sizes of mesh elements can be varied at

Josh Renner, RD51 Mini-Week WG4, 06/15/12 24

Acknowledgements

● LLNL Negative Ion Group

● Garfield++ team; especially Heinrich Schindler and Rob Veenhof

● LBNL Xenon Group and NEXT Collaboration; especially Azriel Goldschmidt

● DOE NNSA Stewardship Science Graduate Fellowship