Repository navigation
Point types documentation and FDD calculation - #616
Conversation
|
I just merged #624, so that should hopefully fix the failing windows test. Rerunning the tests for this PR now. |
fhagemann
left a comment
There was a problem hiding this comment.
Looks good. Two minor comments and still the open question whether we want to keep calling it get_fdd or something else.
Based on the fact that we also call it get_active_volume or calculate_capacitance, I might be slightly in favor to avoid using the abbreviation fdd but call it get_full_depletion_depth. Thoughts?
|
In the last commit I changed |
fhagemann
left a comment
There was a problem hiding this comment.
Just pushed the last changes. I will wait and see that the tests pass and then continue with merging this :)
A new manual page is added to document the PointTypes behaviour. The six bit flags, their combined values, how they are used by
is_depleted,get_active_volume, andestimate_depletion_voltageto exclude the inactive layer, howmark_inactivelayer_bits!propagates the inactive layer flag outward from the doped contact, and a detailed description of how the newget_FDDfunction extracts the two contours and computes the FDD thickness.Example plots show the inner contour overlaid on the point-type map and a heat-map of FDD thickness across the detector cross-section.

The new function
get_FDD, computes the Full Depletion Depth (FDD), the thickness of the inactive lithium-doped layer. For each inner contour point it returns the coordinates of the transition between the inactive layer and the active bulk (r_inner/z_inner), the coordinates of the nearest point on the doped contact surface (r_outer/z_outer), and the perpendicular thickness of the inactive layer.When the impurity model is
PtypePNJunctionImpurityDensityorThermalDiffusionLithiumDensity, the thickness is computed analytically viaConstructiveSolidGeometry.distance_to_surface, giving exact perpendicular distances for any surface orientation (vertical, horizontal, or diagonal). For other models it falls back to the Euclidean distance to the nearest contact-surface grid tick. Both Cylindrical and Cartesian variants are implemented.The outer contour (r_outer/z_outer) is collected from grid ticks that carry
inactive_contact_bitdirectly, which lie on the contact surface itself since SSD places grid ticks at contact boundaries. This means that for axis-aligned surfaces the Euclidean distance between inner and outer contour points equals the analytical thickness exactly; for diagonal surfaces (e.g. a cone face) a small residual difference remains because the nearest contact tick is not the exact perpendicular foot.A helper function
_dist_to_inactive_contactis added to extract the distance_to_contact from the impurity density model, or return nothing to trigger the Euclidean fallback. Tests for get_FDD are added totest_depletion.jl