`estimate_depletion_voltage` returns unreasonable value with wrong sign for segmented detectors
fhagemann opened this issue · 5 comments
If we add an impurity density to the example segmented :BEGe
detector, the result of estimate_depletion_voltage
is kind of odd..
using SolidStateDetectors
T = Float32
sim = Simulation{T}(SSD_examples[:BEGe])
sim.detector = SolidStateDetector(sim.detector, SolidStateDetectors.ConstantImpurityDensity{T}(1e16)) # 1e10 cm^-3
calculate_electric_potential!(sim, depletion_handling = true, refinement_limits = [0.2,0.1,0.05,0.03,0.01])
estimate_depletion_voltage(sim)
-537625.5f0 V
I would expect something positive of the order of +2000V
here (?)...
Usually, the detector would be biased with a positive potential at the point contact, so I am a bit puzzled why this method returns something negative (despite being such a huge number)...
I am aware of the keyword, but the bias_voltage_contact_id
is determined automatically as the one contact where a non-zero potential is applied. This should be the core contact of the segmented :BEGe
detector here.
I guess the problem here is something else and I will try to explain them using some conceptional plots.
For a true coaxial detector, if you apply no potential to the contacts, the electric potential will peak somewhere in the detector due to the contribution from ionized impurities. In this example case, the maximum potential is reached somewhere in the center of the detector, resulting in electrons being attracted to neither of the contacts and the detector not being able to operate:
The idea of the algorithm to determine the depletion voltage is to apply a potential such that the local maximum is shifted towards one of the contacts:
In this example case, this happens at a potential of -21V applied to the contact on the right.
However, you can also (theoretically in this calculation) apply a positive potential to the contact on the right and also achieve that the maximum of the electric potential moves towards one of the contacts:
In this example case, this happens at a potential of +57V applied to the contact on the right.
SolidStateDetectors.jl/src/Simulation/DepletionVoltage.jl
Lines 131 to 134 in 7d79ad0
It looks to me like the current algorithm tries out both of the things at the same time and returns the value with the higher absolute value (so here +57V). I wouldn't be surprised if you could theoretically deplete the example segmented :BEGe detector with -537625V, but I guess there is a second solution at around +2000V that also does the thing.
It might make sense to only return the solution with the same sign as the one initially applied to the contact, then?
I just looked into it and it seems to be some numerical issue at the contacts.
Some values become Inf
...
With the inverted coax it seems to work if you switch the impurity density I think.
Any quick thoughts on how to resolve this?
I am not quite sure..
If I use the 5th contact as the contact where the bias voltage is applied (modify config file) I get reasonable values.
I think the reason might be because we divide through the values of the weighting potential.
For contact 1 it is almost 0 a bit away from the point contact.
This seems to be unstable resulting in too high values.
If I also apply the HV to the point contact of the IVC the method also fails...