Zoomed-in field calculations #283
Replies: 5 comments
-
You can also set "reflecting", "periodic" and "fixed" as boundary conditions. Right now, "fixed" means that a potential of 0 is assumed at the boundaries. |
Beta Was this translation helpful? Give feedback.
-
Alright, I can try to see where that brings us. Is an unevenly spaced grid also an option? Meaning a higher grid density near the surface versus the bulk, something like a logarithmic grid maybe. |
Beta Was this translation helpful? Give feedback.
-
Yes, you can define your own grid and pass it to I guess the easiest way to do it would be something like T = Float32
sim = Simulation{T}(SSD_examples[:CGD])
calculate_electric_potential!(sim,
max_refinements = 0,
max_n_iterations = 10,
init_grid_spacing = T.((0.01, 0.01, 0.01)),
)
g = sim.electric_potential.grid
ax1, ax2, ax3 = g.axes
user_additional_ticks_ax1 = T[0.002123] # here add your ticks of interest
user_additional_ticks_ax2 = T[0.003123] # here add your ticks of interest
user_additional_ticks_ax3 = T[0.004123] # here add your ticks of interest
user_ax1 = typeof(ax1)(ax1.interval, sort(vcat(ax1.ticks, user_additional_ticks_ax1)))
user_ax2 = typeof(ax2)(ax2.interval, sort(vcat(ax2.ticks, user_additional_ticks_ax2)))
user_ax3 = typeof(ax3)(ax3.interval, sort(vcat(ax3.ticks, user_additional_ticks_ax3)))
user_g = typeof(g)((user_ax1, user_ax2, user_ax3))
calculate_electric_potential!(sim, grid = user_g) But be aware that convergence is really slow when voxels are extremely streched (not cubic like). |
Beta Was this translation helpful? Give feedback.
-
I noticed in your example that the ticks are still constant, although they differ for x,y,z. This would reduce the computational load to one dimension instead of 3, but will still spend the vast majority of it calculating in a region with little to no variation. Is there a way to make axes with non-constant ticks? Looking at the source code for DiscreteAxis.jl, it seems like everything is based on Intervals, which might make this hard? |
Beta Was this translation helpful? Give feedback.
-
You parse an interval and a vector of ticks to it like I did in my example: user_ax1 = typeof(ax1)(ax1.interval, sort(vcat(ax1.ticks, user_additional_ticks_ax1)))
|
Beta Was this translation helpful? Give feedback.
-
Hello,
We'd like to simulate a small part of the geometry of our Silicon detectors close to pixel edges, where we have substantial variation in the impurity density profile. Since the physical dimension of this region is very small compared to the total geometry, performing a regular simulation with extremely high grid density is not feasible. How would one best go about this in your code? I'm aware only of setting the boundary conditions to be set at infinity, is anything else included right now?
Thank you,
Leendert
Beta Was this translation helpful? Give feedback.
All reactions