Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pseudo geometry for tests #254

Closed
4 changes: 2 additions & 2 deletions docs/src/tutorial_lit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plot(sim.detector, size = (700, 700))
#md savefig("tutorial_det.svg"); nothing # hide
#md # [![tutorial_det](tutorial_det.svg)](tutorial_det.pdf)

# One can also have a look at how the initial conditions look like on the grid (its starts with a very coarse grid):
# One can also have a look at how the initial conditions look like on the grid (it starts with a very coarse grid):

apply_initial_state!(sim, ElectricPotential) # optional
plot(
Expand Down Expand Up @@ -116,7 +116,7 @@ plot_electric_fieldlines!(sim, full_det = true, φ = 0.0)
charge_drift_model = ADLChargeDriftModel()
sim.detector = SolidStateDetector(sim.detector, charge_drift_model)

# Now, let's create an "random" multi-site event:
# Now, let's create a "random" multi-site event:

starting_positions = [ CylindricalPoint{T}( 0.020, deg2rad(10), 0.015 ),
CylindricalPoint{T}( 0.015, deg2rad(20), 0.045 ),
Expand Down
180 changes: 180 additions & 0 deletions examples/example_config_files/test_geometry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
name: Geometry for Tests
units:
length: mm
angle: deg
potential: V
temperature: K
grid:
coordinates: cartesian
axes:
x:
from: -10
to: 10
boundaries: reflecting
y:
from: -10
to: 10
boundaries: reflecting
z:
from: -10
to: 10
boundaries: reflecting
medium: vacuum
detectors:
- semiconductor:
material: HPGe
temperature: 78
impurity_density:
name: linear
x:
init: 0
gradient: 0
y:
init: 0
gradient: 0
z:
init: 0
gradient: 0
charge_drift_model:
include: ADLChargeDriftModel/drift_velocity_config.yaml
geometry:
union:
#Semiconductor
- box:
widths: [20, 20, 18]
origin:
x: 0
y: 0
z: 0
#Box volume primitives
- union:
- intersection:
- box:
hX: 1.5
hY: 1.5
hZ: 1.5
origin:
x: 7.5
y: 7.5
z: -5.5
- difference:
- box:
widths: [3, 3, 3]
origin:
x: 8
y: 8
z: -6
- box:
x:
from: 7
to: 9
y:
from: 7
to: 9
z:
from: -7
to: -5

- box:
halfwidths: [1.5, 1.5, 1.5]
origin:
x: 7.5
y: 7.5
z: -1
rotate:
Z: 20
#Cone volume primitives
- union:
- cone:
r:
bottom:
from: 0
to: 3
top:
from: 0
to: 0
phi:
from: 0.0
to: 360
h: 3.0
origin: [6,-6,2]
- tube:
r:
from: 1
to: 3
phi:
from: 0
to: 180
z: 3
origin: [6,-6,5]
rotation:
M: [1, 0, 0, 0, 0, -1, 0, 1, 0]
#Ellipsoid volume primitives
- sphere:
r: 3
origin: [6,-6,-6]
rotation:
M: [1, 0, 0, 0, 0, -1, 0, 1, 0]
#Prism volume primitives
- union:
- HexagonalPrism:
r: 3
h: 3
origin: [-5,-5,-6]
rotation:
M: [1, 0, 0, 0, 0, -1, 0, 1, 0]
- PentagonalPrism:
r: 3
z: 3
origin: [-5,-5,-2]
- QuadranglePrism:
r: 3
z: 3
origin: [-5,-5,2]
- TriangularPrism:
r: 3
z: 3
origin: [-5,-5,6]
#Torus volume primitives
- union:
- torus:
r_torus: 3
r_tube: 2
theta:
from: 0
to: 180
origin: [-3,3,-3]

- torus:
r_torus: 4
r_tube: 1
origin: [-3,3,3]
rotation:
M: [1, 0, 0, 0, 0, -1, 0, 1, 0]


contacts:
- name: Top Contact
material: HPGe
potential: 3000
id: 1
geometry:
box:
widths: [20, 20, 1]
origin:
x: 0
y: 0
z: 9.5
- name: Bottom Contact
material: HPGe
potential: 0
id: 2
geometry:
box:
widths: [20, 20, 1]
origin:
x: 0
y: 0
z: -9.5


1 change: 1 addition & 0 deletions src/examples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ const SSD_examples = Dict{Symbol,String}([
:InfiniteCoaxialCapacitorCartesianCoords => joinpath(get_path_to_example_config_files(), "infinite_coaxial_capacitor_cartesian_coords.yaml"),
:Hexagon => joinpath(get_path_to_example_config_files(), "minimum_hexagon_config.yaml"),
:CoaxialTorus => joinpath(get_path_to_example_config_files(), "public_coaxial_torus_config.yaml"),
:TestDetector => joinpath(get_path_to_example_config_files(), "test_geometry.yaml"),
])
Loading