Skip to content

Revisit convergence of SOR algorithm for large grids and undepleted detectors #530

@fhagemann

Description

@fhagemann

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"))
end

the weighting potential of undepleted region has value of 1 as expected:
image
image
image
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:
image
while the weighting potential for contact 2 looks normal:
image

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:
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtestsAdd tests to increase code coverage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions