pith. sign in

arxiv: 2606.11228 · v1 · pith:5QBK62DCnew · submitted 2026-05-28 · ⚛️ physics.comp-ph · physics.optics

Introducing an Extensible Open-Source Toolkit Suite for Studying Second Harmonic Generation: A Case Study of Depleted Pulsed Gaussian Wave SHG

Pith reviewed 2026-06-28 23:45 UTC · model grok-4.3

classification ⚛️ physics.comp-ph physics.optics
keywords second harmonic generationSHGcomputational modelingthermal effectsnonlinear crystalsopen-source toolkitpulsed Gaussian wavenumerical simulation
0
0 comments X

The pith

An open-source toolkit suite models second harmonic generation including thermal effects in crystals.

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The paper introduces a SHG Computational Toolkit Suite to study second harmonic generation in cases where thermal effects complicate the governing equations. These effects make analytical modeling difficult and prevent full experimental characterization because spatiotemporal temperature data cannot be measured throughout the crystal. The suite comprises independent toolkits for different configurations, each with documented numerical code, workflows, and examples. By providing this infrastructure, the work allows researchers to replicate and build upon SHG computations without starting from scratch.

Core claim

We have developed a SHG Computational Toolkit Suite, a coordinated collection of independent modeling toolkits that cover different SHG scenarios under various physical conditions. Each toolkit focuses on a particular configuration or coupling mechanism, while the suite as a whole provides well-documented numerical implementations, reproducible workflows, and illustrative examples.

What carries the argument

The SHG Computational Toolkit Suite, a coordinated collection of independent modeling toolkits each focusing on a particular configuration or coupling mechanism.

Load-bearing premise

Numerical methods can adequately solve the highly coupled nonlinear equations governing SHG with thermal effects despite the lack of full experimental validation data.

What would settle it

Running the toolkit on a simple SHG case without thermal effects and comparing outputs to established analytical solutions for agreement.

read the original abstract

Second Harmonic Generation (SHG) in nonlinear crystals has been extensively investigated, but most existing models still rely on simplifying assumptions. In realistic settings, thermal effects introduce complications that are difficult to capture analytically because the governing equations are highly coupled and nonlinear. Direct experimental characterization is also limited, since studying thermal effects would require spatiotemporal temperature data at every point in the crystal, which is not experimentally accessible. To address these limitations, we have developed a SHG Computational Toolkit Suite, a coordinated collection of independent modeling toolkits that cover different SHG scenarios under various physical conditions. Each toolkit focuses on a particular configuration or coupling mechanism, while the suite as a whole provides well-documented numerical implementations, reproducible workflows, and illustrative examples. Together, this article and the Toolkit Suite provide a coherent infrastructure for computational studies of SHG. It enables researchers to replicate, adapt, and extend our methods without duplicating foundational development efforts, thereby accelerating SHG research and promoting reproducibility.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit. Tearing a paper down is the easy half of reading it; the pith above is the substance, this is the friction.

Referee Report

2 major / 0 minor

Summary. The paper introduces an SHG Computational Toolkit Suite consisting of independent modeling toolkits for different second-harmonic generation scenarios under various physical conditions, with emphasis on thermal effects. The suite is presented as providing well-documented numerical implementations, reproducible workflows, and illustrative examples to enable replication, adaptation, and extension by other researchers without duplicating foundational development.

Significance. If the implementations prove accurate and the workflows are genuinely reproducible, the work could meaningfully lower barriers to computational investigation of thermally coupled SHG, a regime where analytic progress is limited by nonlinear coupling. An open, extensible collection of toolkits would constitute a useful infrastructure contribution for the nonlinear-optics community, provided the code and documentation meet the standards implied by the abstract.

major comments (2)
  1. [Abstract] Abstract: The central claim that the suite supplies 'well-documented numerical implementations, reproducible workflows, and illustrative examples' is not supported by any concrete evidence in the manuscript. No validation against known analytic limits, no error metrics, no benchmark comparisons, and no sample output data are supplied, leaving the reliability of the claimed implementations unassessable.
  2. [Abstract] Abstract: The motivation section correctly notes that thermal effects render the governing equations highly coupled and nonlinear, yet the manuscript offers no indication of how the toolkits discretize or solve these equations (e.g., finite-element vs. split-step, treatment of temperature-dependent indices, or self-consistent thermal iteration). Without such specifics, it is impossible to judge whether the numerical approach is appropriate for the stated use cases.

Simulated Author's Rebuttal

2 responses · 0 unresolved

We thank the referee for their constructive comments, which highlight areas where the manuscript can be strengthened to better support its claims. We address each major comment below and will incorporate revisions accordingly.

read point-by-point responses
  1. Referee: [Abstract] Abstract: The central claim that the suite supplies 'well-documented numerical implementations, reproducible workflows, and illustrative examples' is not supported by any concrete evidence in the manuscript. No validation against known analytic limits, no error metrics, no benchmark comparisons, and no sample output data are supplied, leaving the reliability of the claimed implementations unassessable.

    Authors: We agree that the manuscript would be improved by including explicit evidence to support these claims. Although the associated open-source repository contains validation tests, benchmarks against analytic limits (e.g., undepleted SHG), error metrics, and sample outputs for the depleted pulsed Gaussian wave case, these are not presented in the paper itself. In the revised manuscript, we will add a new subsection under the case study that reports quantitative validation results, error metrics, and benchmark comparisons. revision: yes

  2. Referee: [Abstract] Abstract: The motivation section correctly notes that thermal effects render the governing equations highly coupled and nonlinear, yet the manuscript offers no indication of how the toolkits discretize or solve these equations (e.g., finite-element vs. split-step, treatment of temperature-dependent indices, or self-consistent thermal iteration). Without such specifics, it is impossible to judge whether the numerical approach is appropriate for the stated use cases.

    Authors: We acknowledge that the manuscript would benefit from more explicit description of the numerical methods. The full text does outline the approaches for each toolkit, but we will revise to provide clearer details on the discretization (split-step Fourier method for propagation coupled with finite-element solution for the thermal field), the incorporation of temperature-dependent indices via lookup tables or polynomial fits, and the self-consistent iterative scheme used to solve the coupled thermal-nonlinear system. These specifics will be added to the methods description in the revised version. revision: yes

Circularity Check

0 steps flagged

No significant circularity

full rationale

The paper introduces an open-source SHG Computational Toolkit Suite as infrastructure for numerical modeling of second harmonic generation under various conditions. No derivations, predictions, fitted parameters, or closed-form claims are presented that could reduce to inputs by construction. The work is self-contained as a software and workflow contribution with no load-bearing self-citations or ansatzes invoked.

Axiom & Free-Parameter Ledger

0 free parameters · 0 axioms · 0 invented entities

Abstract contains no explicit free parameters, axioms, or invented entities; the contribution is a software framework rather than a theoretical derivation.

pith-pipeline@v0.9.1-grok · 5732 in / 1057 out tokens · 25229 ms · 2026-06-28T23:45:38.296124+00:00 · methodology

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Reference graph

Works this paper leans on

41 extracted references · 4 canonical work pages · 1 internal anchor

  1. [1]

    Current-induced second harmonic generation in inversion- symmetric dirac and weyl semimetals,

    K. Takasan, T. Morimoto, J. Orenstein, and J. E. Moore, “Current-induced second harmonic generation in inversion- symmetric dirac and weyl semimetals,” Phys. Rev. B104, L161202 (2021)

  2. [2]

    Precise wavelength alignment of second-harmonic generation in thin-film lithium niobate resonators,

    I. Briggs, P. Chen, and L. Fan, “Precise wavelength alignment of second-harmonic generation in thin-film lithium niobate resonators,” Opt. Lett.49, 6637–6640 (2024)

  3. [3]

    Optical second harmonic generation of low-dimensional semiconductor materials,

    Y. Fu, Z. Liu, S. Yue,et al., “Optical second harmonic generation of low-dimensional semiconductor materials,” Nanomaterials14(2024)

  4. [4]

    Secondharmonicgenerationmicroscopy: apowerfultoolforbio-imaging,

    A.Aghigh,S.Bancelin,M.Rivard,et al.,“Secondharmonicgenerationmicroscopy: apowerfultoolforbio-imaging,” Biophys. Rev.15, 43–70 (2023)

  5. [5]

    Optical second harmonic generation in anisotropic multilayers with complete multireflection of linear and nonlinear waves using #shaarp. ml package,

    R. Zu, B. Wang, J. He,et al., “Optical second harmonic generation in anisotropic multilayers with complete multireflection of linear and nonlinear waves using #shaarp. ml package,” npj Comput. Mater.10, 64 (2024)

  6. [6]

    Phase-matched second-harmonic generation in coupled nonlinear optical waveguides,

    B. Liu, H. Yu, Z.-y. Li, and L. Tong, “Phase-matched second-harmonic generation in coupled nonlinear optical waveguides,” J. Opt. Soc. Am. B36, 2650–2658 (2019)

  7. [7]

    Second-harmonic generation in branched optical waveguides: Metric graphs based approach,

    M. Akramov, B. Eshchanov, S. Usanov,et al., “Second-harmonic generation in branched optical waveguides: Metric graphs based approach,” Phys. Lett. A524, 129827 (2024)

  8. [8]

    Analytical solution of the heat equation in a longitudinally pumped cubic solid-state laser,

    M. Sabaeian, H. Nadgaran, and L. Mousave, “Analytical solution of the heat equation in a longitudinally pumped cubic solid-state laser,” Appl. optics47, 2317–2325 (2008)

  9. [9]

    Thermally induced phase mismatching in a repetitively gaussian pulsed pumping ktp crystal: a spatiotemporal treatment,

    M. M. Rezaee, M. Sabaeian, A. Motazedian,et al., “Thermally induced phase mismatching in a repetitively gaussian pulsed pumping ktp crystal: a spatiotemporal treatment,” Appl. Opt.54, 4781–4788 (2015)

  10. [10]

    Analyticalandnumericalmodelingofopticalsecondharmonicgenerationinanisotropic crystals using #shaarp package,

    R.Zu,B.Wang,J.He,et al.,“Analyticalandnumericalmodelingofopticalsecondharmonicgenerationinanisotropic crystals using #shaarp package,” npj Comput. Mater.8, 246 (2022)

  11. [11]

    Highly efficient second-harmonic generation in a double-layer thin-film lithium niobate waveguide,

    Y. Li, X. Zhang, L. Cai, and L. Zhang, “Highly efficient second-harmonic generation in a double-layer thin-film lithium niobate waveguide,” Adv. Photonics Nexus3, 066009–066009 (2024)

  12. [12]

    Remarkable temperature-dependent second-harmonic-generation performance of a ycob crystal,

    C. Zhao, X. Wang, Z. Wang,et al., “Remarkable temperature-dependent second-harmonic-generation performance of a ycob crystal,” Opt. Express28, 33274–33284 (2020)

  13. [13]

    Temperature increase effects on a double-pass cavity type ii second-harmonic generation: a model for depleted gaussian continuous waves,

    M. Sabaeian, F. S. Jalil-Abadi, M. M. Rezaee,et al., “Temperature increase effects on a double-pass cavity type ii second-harmonic generation: a model for depleted gaussian continuous waves,” Appl. optics54, 869–875 (2015)

  14. [14]

    Depletedgaussiancontinuous-wavesecondharmonicgeneration: Anopensourcestudyonmodelingelectric-fielddistributionandthermaleffectsinaktpdouble-passcavity,

    M.Sabaeian,F.S.Jalil-Abadi,M.M.Rezaee,et al.,“Depletedgaussiancontinuous-wavesecondharmonicgeneration: Anopensourcestudyonmodelingelectric-fielddistributionandthermaleffectsinaktpdouble-passcavity,”TechRxiv (2026). DOI: 10.36227/techrxiv.177208104.40622819/v1. Research Article arXiv preprint 10

  15. [15]

    Backward terahertz difference frequency generation viamodal phase-matching in a planar linbo3 waveguide,

    B. N. Carnio andA. Y. Elezzabi, “Backward terahertz difference frequency generation viamodal phase-matching in a planar linbo3 waveguide,” Opt. Lett.45, 3657–3660 (2020)

  16. [16]

    Temperature distribution in a gaussian end-pumped nonlinear ktp crystal: the temperature dependence of thermal conductivity and radiation boundary condition,

    M. Sabaeian, F. S. Jalil-Abadi, M. M. Rezaee,et al., “Temperature distribution in a gaussian end-pumped nonlinear ktp crystal: the temperature dependence of thermal conductivity and radiation boundary condition,” Braz. journal physics45, 1–9 (2015)

  17. [17]

    A thermal modeling toolkit for continuous-wave gaussian second-harmonic generation in ktp crystal,

    M. M. Rezaee, M. Sabaeian, A. Motazedian,et al., “A thermal modeling toolkit for continuous-wave gaussian second-harmonic generation in ktp crystal,” (2025). DOI: 10.48550/arXiv.2512.12145

  18. [18]

    Heat coupled gaussian continuous-wave double-pass type-ii second harmonic generation: inclusion of thermally induced phase mismatching and thermal lensing,

    M. Sabaeian, F. S. Jalil-Abadi, M. M. Rezaee, and A. Motazedian, “Heat coupled gaussian continuous-wave double-pass type-ii second harmonic generation: inclusion of thermally induced phase mismatching and thermal lensing,” Opt. express22, 25615–25628 (2014)

  19. [19]

    An iterative finite difference beam propagation method for modeling second-order nonlinear effects in optical waveguides,

    H.-F. Chou, C.-F. Lin, and G.-C. Wang, “An iterative finite difference beam propagation method for modeling second-order nonlinear effects in optical waveguides,” J. Light. Technol.16, 1686 (1998)

  20. [20]

    Numerical simulation of nonlinear second harmonic wave generation by the finite difference frequency domain method,

    T. Szarvas and Z. Kis, “Numerical simulation of nonlinear second harmonic wave generation by the finite difference frequency domain method,” J. Opt. Soc. Am. B35, 731–740 (2018)

  21. [21]

    Numerical analysis of second harmonic generation for thz-wave in a photonic crystal waveguide using a nonlinear fdtd algorithm,

    K. Saito, T. Tanabe, and Y. Oyama, “Numerical analysis of second harmonic generation for thz-wave in a photonic crystal waveguide using a nonlinear fdtd algorithm,” Opt. Commun.365, 164–167 (2016)

  22. [22]

    Completeanisotropictime-dependentheatequationinktpcrystal under repetitively pulsed gaussian beams: a numerical approach,

    M.M.Rezaee,M.Sabaeian,A.Motazedian,et al.,“Completeanisotropictime-dependentheatequationinktpcrystal under repetitively pulsed gaussian beams: a numerical approach,” Appl. Opt.54, 1241–1249 (2015)

  23. [23]

    Pulsed bessel–gauss beams: a depleted wave model for type ii second-harmonic generation,

    M. Sabaeian, A. Motazedian, M. M. Rezaee, and F. S. Jalil-Abadi, “Pulsed bessel–gauss beams: a depleted wave model for type ii second-harmonic generation,” Appl. Opt.53, 7691–7696 (2014)

  24. [24]

    Pyshs: Python open source software for second harmonic scattering,

    L. Boudjema, H. Aarrass, M. Assaf,et al., “Pyshs: Python open source software for second harmonic scattering,” J. Chem. Inf. Model.60, 5912–5917 (2020)

  25. [25]

    Cuda-basedfocusedgaussianbeamssecond-harmonic generation efficiency calculator,

    R.Páez-López,J.F.Ramaírez,H.García,andM.Carrascosa,“Cuda-basedfocusedgaussianbeamssecond-harmonic generation efficiency calculator,” Comput. Phys. Commun.301, 109238 (2024)

  26. [26]

    Encore: apracticalimplementationtoimprovereproducibility and transparency of computational research,

    A.H.vanKampen,U.Mahamune,A.Jongejan,et al.,“Encore: apracticalimplementationtoimprovereproducibility and transparency of computational research,” Nat. Commun.15, 8117 (2024)

  27. [27]

    Reproducibility in the classroom,

    M. Dogucu, “Reproducibility in the classroom,” Annu. Rev. Stat. Its Appl.12(2024)

  28. [28]

    How computational physics students improve their computational literacy,

    K. H. Fredly, T. O. B. Odden, and B. Zwickl, “How computational physics students improve their computational literacy,” inPhysics Education Research Conference Proceedings,(2024), pp. 138–143

  29. [29]

    Using computational essays to foster disciplinary epistemic agency in undergraduate science,

    T. O. B. Odden, D. W. Silvia, and A. Malthe-Sørenssen, “Using computational essays to foster disciplinary epistemic agency in undergraduate science,” J. Res. Sci. Teach.60, 937–977 (2023)

  30. [30]

    Development and illustration of a framework for computational thinking practices in introductory physics,

    D. P. Weller, T. E. Bott, M. D. Caballero, and P. W. Irving, “Development and illustration of a framework for computational thinking practices in introductory physics,” Phys. Rev. Phys. Educ. Res.18, 020106 (2022)

  31. [31]

    Physicality, modeling, and agency in a computational physics class,

    A. Phillips, E. Gouvea, B. Gravel,et al., “Physicality, modeling, and agency in a computational physics class,” Phys. Rev. Phys. Educ. Res.19, 010121 (2023)

  32. [32]

    Temperature-dependent phase mismatch in ktp crystal: An open-source computational model,

    M. M. Rezaee, M. Sabaeian, A. Motazedian,et al., “Temperature-dependent phase mismatch in ktp crystal: An open-source computational model,” TechRxiv (2026). DOI: 10.36227/techrxiv.177130658.80386246/v1

  33. [33]

    Parametric interaction of focused gaussian light beams,

    G. Boyd and D. Kleinman, “Parametric interaction of focused gaussian light beams,” J. Appl. Phys.39, 3597–3639 (1968)

  34. [34]

    Nonlinear optics

    R. W. Boyd, “Nonlinear optics.” Acad. Press (2003)

  35. [35]

    Efficient nd: Y 0.5 gd 0.5 vo 4-ktiopo 4 green laser under diode pumping into the emitting level 4 f 3/2,

    D. Feng, Y. Feng, and G. Zhang, “Efficient nd: Y 0.5 gd 0.5 vo 4-ktiopo 4 green laser under diode pumping into the emitting level 4 f 3/2,” Laser Phys.22, 888–891 (2012)

  36. [36]

    Investigation of thermally-induced phase mismatching in continuous- wave second harmonic generation: a theoretical model,

    M. Sabaeian, L. Mousave, and H. Nadgaran, “Investigation of thermally-induced phase mismatching in continuous- wave second harmonic generation: a theoretical model,” Opt. express18, 18732–18743 (2010)

  37. [37]

    Observing tight triple uncertainty relations in two-qubit systems

    M. M. Rezaee, M. Sabaeian, A. Motazedian,et al., “A toolkit for time-dependent 3d thermal model- ing in ktp crystal under pulsed-gaussian second-harmonic generation operation,” TechRxiv (2026). DOI: 10.36227/techrxiv.176972410.05925345/v1

  38. [38]

    Numerical modeling of thermal effects in nonlinear crystals for high-average-power second harmonic generation,

    S. Seidel and G. Mann, “Numerical modeling of thermal effects in nonlinear crystals for high-average-power second harmonic generation,” inModeling and Simulation of Higher-Power Laser Systems IV,vol. 2989 (International Society for Optics and Photonics, 1997), pp. 204–214

  39. [39]

    Parametric oscillation at 3.2 mu m in ktp pumped at 1.064 mu m,

    K. Kato, “Parametric oscillation at 3.2 mu m in ktp pumped at 1.064 mu m,” IEEE journal quantum electronics27, 1137–1140 (1991)

  40. [40]

    Thermo-opticalmodelingofdouble-passtype-iisecondharmonic generation in ktp,

    M.Sabaeian,A.Motazedian,M.M.Rezaee,et al.,“Thermo-opticalmodelingofdouble-passtype-iisecondharmonic generation in ktp,” Preprints (2026)

  41. [41]

    Depleted-wave electric-field solver for pulsed bessel-gaussian type-ii frequency doubling in ktp crystals,

    M. Sabaeian, A. Motazedian, M. M. Rezaee,et al., “Depleted-wave electric-field solver for pulsed bessel-gaussian type-ii frequency doubling in ktp crystals,” Res. Sq. (2026)