Click the green "Use this template" button at the top of the page, then choose "Create a new repository".
This will create your own copy of this project, which you can modify freely — no need to fork!
| Term | Definition |
|---|---|
| SHG | Second Harmonic Generation |
| PW | Pulsed Wave |
| G | Gaussian |
Article title:
Complete Anisotropic Time-Dependent Heat Equation in KTP Crystal under Repetitively Pulsed Gaussian Beams: A Numerical Approach
Table of Contents
This repository contains the toolkit and computational tools used in the research article "Complete Anisotropic Time-Dependent Heat Equation in KTP Crystal under Repetitively Pulsed Gaussian Beams: A Numerical Approach" (Applied Optics, 2015), including source code, numerical solvers, and reproducibility assets.
This toolkit provides computational tools for analyzing transient temperature distribution in cylindrical nonlinear potassium titanyl phosphate (KTP) crystals under repetitively pulsed Gaussian pumping sources. The toolkit implements a thorough and detailed solution for the time-dependent heat equation using advanced modeling features that are often neglected in simpler approaches:
- Temperature-dependent thermal conductivity of KTP crystal
- Convective and radiative boundary conditions at crystal surfaces
- Finite Difference Method (FDM) for numerical calculations
The research demonstrates that the radiation term has a negligible effect and can be safely ignored, while the temperature dependence of thermal conductivity is more influential. Ignoring temperature-dependent thermal conductivity introduces significant errors into the modeling. The toolkit shows the time evolution of temperature as the crystal is pumped with a train of successive Gaussian pulses until reaching thermal equilibrium. These tools improve modeling accuracy for thermal lensing, phase mismatching, and efficiency reduction in nonlinear optical systems, particularly in second harmonic generation applications.
Folder PATH listing
+---citation <-- Contains citation materials and papers
│ 1_Heat-Equation_Continu… <-- Heat equation analytical paper
│ 2_Heat-Equation_Continu… <-- Heat equation continuous wave paper
│ 3_Heat-Equation_Pulsed-… <-- Heat equation pulsed wave paper
│ 4_Phase-Mismatch_Pulsed… <-- Phase mismatch pulsed wave paper
│ 5_Ideal_Continuous-Wave… <-- Ideal continuous wave paper
│ 6_Ideal_Pulsed-Wave_Be… <-- Ideal pulsed wave Bessel paper
│ 7_Coupled_Continuous-Wa… <-- Coupled continuous wave paper
│ README.md <-- Citation guidelines and information
│
+---images <-- Contains project images and logos
│ SHG-banner.png <-- SHG project banner
│
+---results <-- Numerical simulation results
│ E_009_f_500_Np_10_tp_50… <-- Thermal conductivity radial data
│ E_009_f_500_Np_10_tp_50… <-- Thermal conductivity transverse data
│ E_009_f_500_Np_10_tp_50… <-- Thermal conductivity axial data
│ E_009_f_500_Np_10_tp_50… <-- Temperature radial data
│ E_009_f_500_Np_10_tp_50… <-- Temperature transverse data
│ E_009_f_500_Np_10_tp_50… <-- Temperature axial data
│
+---src <-- Contains source code
│ Code_SHG_PW_G_Heat-Equ… <-- Fortran finite difference solver
│
│ Article_SHG-PW-G-Heat-… <-- Main research paper PDF
│ CITATION.cff <-- Citation metadata file
│ LICENSE <-- Project license information
│ README.md <-- Project overview and documentation
│
To run this project, you will need the following software and tools:
- Fortran Compiler (gfortran, Intel Fortran, or similar)
- For Ubuntu/Debian:
sudo apt-get install gfortran - For macOS:
brew install gfortran - For Windows: Install MinGW-w64 or Intel Fortran Compiler
- For Ubuntu/Debian:
- Git (for cloning the repository)
- Text Editor or IDE (VS Code, Cursor, or any Fortran-compatible editor)
- Terminal/Command Line Interface
Follow these steps to get the project running:
-
Clone the Repository
git clone https://github.com/your-username/SHG-PW-G-Heat-Equation.git cd SHG-PW-G-Heat-Equation -
Navigate to Source Directory
cd src -
Compile the Fortran Code
gfortran -o heat_equation_solver Code_SHG_PW_G_Heat-Equation.f90
-
Run the Simulation
./heat_equation_solver
-
View Results
- The program will generate output files in the
results/directory - These files contain temperature distribution data and thermal conductivity data
- You can analyze the results using your preferred data analysis tools
- The program will generate output files in the
-
Optional: Development Environment
- Open the project in VS Code or Cursor for better code editing experience
- Install Fortran language extensions for syntax highlighting and debugging
- Use the integrated terminal for compilation and execution
Note: The simulation parameters can be modified directly in the Fortran source code (Code_SHG_PW_G_Heat-Equation.f90) to explore different scenarios and crystal configurations.
Please refer to the citation folder for accurate citations. It contains essential guidelines for accurate referencing, ensuring accurate acknowledgement of our work.
For questions not addressed in the resources above, please connect with Mostafa Rezaee on LinkedIn for personalized assistance.
