Point types documentation and FDD calculation#616
Open
claudiaalvgar wants to merge 4 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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