Skip to content

Implement core optical-fiber physics calculations - #11

Draft
CodingBunny06 wants to merge 2 commits into
mainfrom
copilot/add-core-fiber-calculations
Draft

CodingBunny06 wants to merge 2 commits into
mainfrom
copilot/add-core-fiber-calculations

Conversation

@CodingBunny06

@CodingBunny06 CodingBunny06 commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Implement scientifically correct core fiber calculations with documented units, angle conventions, and strict physical-input validation.

  • Physics
    • Add numerical aperture: sqrt(n_core² - n_cladding²).
    • Add critical angle in radians.
    • Add air-medium acceptance angle in radians.
    • Add total internal reflection detection using incidence angles measured from the interface normal.
  • Validation
    • Reject invalid types, booleans, non-finite values, invalid refractive-index ordering, and out-of-range angles.
    • Treat equality with the critical angle as the TIR boundary, not TIR.
  • Tests
    • Cover analytical reference values, normal and boundary cases, TIR/non-TIR behavior, and invalid inputs.
na = calculate_numerical_aperture(1.5, 1.4)
critical = calculate_critical_angle(1.5, 1.4)
acceptance = calculate_acceptance_angle(1.5, 1.4)
tir = is_total_internal_reflection(1.3, critical)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@CodingBunny06 CodingBunny06 changed the title [WIP] Implement core fiber calculations for physics engine Implement core optical-fiber physics calculations Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#1 — Physics Engine: Core Fiber Calculations

2 participants