max_tick_distance affecting weighting potential calculation #528
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Are you changing And I assume everything is running with |
Beta Was this translation helpful? Give feedback.
-
So, I can reproduce this using |
Beta Was this translation helpful? Give feedback.
-
A quick check revealed the following: When using For apply_initial_state!(sim, WeightingPotential, 1, Grid(sim; max_tick_distance)))
plot(sim.weighting_potentials[1]) ![]() SolidStateDetectors.update_till_convergence!( sim, WeightingPotential, 1, 1e-7, depletion_handling = true, max_distance = 0.1u"mm")
plot(sim.weighting_potentials[1]) ![]() Now, when increasing this ( calculate_weighting_potential!(sim, 1,
max_n_iterations = -1, n_iterations_between_checks = 500_000,
refinement_limits = [0.2, 0.01], depletion_handling = true, max_distance = 0.1u"mm") ![]() To me, this means that the implementation of "convergence" would need to be revisited, as it seems like the algorithm is finding convergence too early, even if it did not yet relax to its final solution. |
Beta Was this translation helpful? Give feedback.
A quick check revealed the following:
in the initial state of the weighting potential, all grid points except for the contact grid points are set to 0.
Then, we calculate the weighting potential using the SOR algorithm "into the bulk".
For the undepleted region, this apparently needs WAY more iteration steps if the
max_tick_distance
is set very small and therefore there are many grid points in the undepleted region.When using
calculate_electric_potential!
orcalculate_weighting_potential!
, the maximum number of iterations is50_000
, and every500
steps it checks whether it converges to1e-7
(there was a typo in the docstring, that should be fixed by #531).For
max_tick_distance = 0.1u"mm"
: