Add geometric validation for electrode termination in charge drift#505
Add geometric validation for electrode termination in charge drift#505fhagemann merged 2 commits intoJuliaPhysics:mainfrom
Conversation
|
Thank you for this initiative! |
Sorry for the late reply. Below are some test code and results. Test single event :Initial position of an event is set at the center of the gap (0, 1.5, 2.8), with 500 keV energy deposition. Considering the charge cloud, it is set to 500 charges using nbcc = NBodyChargeCloud(pos, Edep, 500, number_of_shells = 2). Theoretically, the collected charge should be 500*1e3/2.95 = 169491.525 The following figures show the histogram distribution of the x-coordinates at the end positions of charges (holes here) before and after code modification. The red dashed lines (x=0.25, x=-0.25) represent the electrode boundaries. Speed Test for 1000 events:Set 1000 events in the gap center (x=0.0) and directly under the contact (x=1.5) respectively , with y fixed at 1.5 and z uniformly sampled between 0.5 and 13.5. In the gap center, Under the contact, Therefore, after code modification, the simulation time for events under the contact remains nearly the same, while in the gap region, it increased about 48.5% (604.02 seconds). However, this increase is related to the number of charges in the charge cloud (which is 500 in this case). |
|
I see, so for events that might be affected by this issue, there seems to be a significant increase in runtime. |
|
I added a keyword |
|
If that's fine for everyone, I would merge and release this still as |




Problem
Charge carriers incorrectly terminated when point_types flagged positions as
CD_ELECTRODEdue to grid discretization, even though they hadn't reached actual electrode geometry.(see#474)
Solution
Added
crossing_pos in det.contactsvalidation in_check_and_update_position!():Only terminate when charge actually reaches electrode geometry
Reclassify failed cases as
CD_FLOATING_BOUNDARYto continue surface drift