-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
bugSomething isn't workingSomething isn't workingtestsAdd tests to increase code coverageAdd tests to increase code coverage
Description
Discussed in #528
Originally posted by JunwenDiao August 26, 2025
By having different values of max_tick_distance, the weighting potential calculation for undepleted region behaves unexpectively:
to use the ICPC example file as an example:
sim = Simulation(SSD_examples[:InvertedCoaxInCryostat])
sim.detector = SolidStateDetector(sim.detector, contact_id = 2, contact_potential = 500u"V")by using
calculate_electric_potential!(sim, device_array_type = CuArray, refinement_limits = [0.2, 0.1, 0.05, 0.01], verbose = false, depletion_handling = true,grid = Grid(sim, max_tick_distance = 0.5u"mm"))and
for contact in sim.detector.contacts
calculate_weighting_potential!(sim, contact.id, device_array_type = CuArray, refinement_limits = [0.2, 0.1, 0.05, 0.01], verbose = false, depletion_handling = true, grid = Grid(sim,max_tick_distance = 0.5u"mm"))
endthe weighting potential of undepleted region has value of 1 as expected:



but if I change the value of max_tick_distance to 0.1mm, the weighting potential for contact 1 is no longer having the whole undepleted region with value of 1:

while the weighting potential for contact 2 looks normal:

It seems like there is a threshold for what that is going to happen, and the weighting potential changes a lot with different max_tick_distance. A comparison with max_tick_distance being 2mm and 2.1mm:


Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtestsAdd tests to increase code coverageAdd tests to increase code coverage