Skip to content

Computational model of Depleted Pulsed Gaussian Second Harmonic Generation (SHG) in Type II configuration, where the interaction occurs between fundamental beams with orthogonal polarizations (ordinary and extraordinary) in KTP crystal. The model assumes ideal conditions and neglects thermal absorption effects.

License

Notifications You must be signed in to change notification settings

Second-Harmonic-Generation/SHG-PW-G-Ideal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧰 How to Use This Template

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!

SHG Logo

SHG-PW-G-Ideal

Term Definition
SHG Second Harmonic Generation
PW Pulsed Wave
G Gaussian

 

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

 


Table of Contents

       

1. About this repository

This repository contains the computational implementation for the case study on depleted pulsed Gaussian wave Second Harmonic Generation (SHG) presented in the research article "Introducing an Extensible Open-Source Toolkit Suite for Studying Second Harmonic Generation: A Case Study of Depleted Pulsed Gaussian Wave SHG".

1.1. Case Study Overview

This implementation models pulsed Gaussian second harmonic waves (SHW) generated under a Type II SHG configuration. The model employs three coupled equations that describe the fundamental beams (ordinary and extraordinary polarizations) and the second-harmonic wave, solved numerically using the Finite Difference Method (FDM). The case study assumes ideal coupling conditions in KTP crystal and neglects thermal absorption effects.

1.2. Model Characteristics

The computational model addresses depleted, pulsed Gaussian wave SHG with the following features. The model employs a Type II SHG Configuration that models the interaction between fundamental beams with orthogonal polarizations (ordinary and extraordinary) in KTP crystal. It assumes ideal coupling conditions and neglects thermal absorption effects. The model exploits azimuthal symmetry of the pump profile using a cylindrical coordinate system. For numerical solutions, it employs the Finite Difference Method (FDM) with backward FDM for temporal derivatives, forward FDM for spatial derivatives along the crystal axis, and central FDM for radial derivatives. The model captures both spatial and temporal evolution of the fields throughout the crystal through spatiotemporal modeling.

1.3. Physical Parameters

The model is configured for KTP (potassium titanyl phosphate) crystal with the following parameters. The crystal has a length of 2 cm and a radius of 2 mm. The fundamental wavelength is 1064 nm, and the second harmonic wavelength is 532 nm. The pulse duration is 50 μs with a pulse repetition frequency of 4000 Hz. The pulse energy is set to 0.45 J (configurable), and the beam spot size is 80 μm.

1.4. Model Capabilities

This implementation enables researchers to study energy conversion between fundamental waves and second harmonic waves, analyze spatiotemporal evolution of field intensities along the crystal, investigate the effects of pulse energy on conversion efficiency, explore radial and longitudinal field profiles, and model depleted SHG regimes where the constant-beam approximation is no longer valid. The model demonstrates that energy conversion between fundamental and second harmonic waves occurs over relatively short distances (approximately 5 mm) compared to the crystal length, making a depleted formalism essential for accurate modeling.

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_045_f_4000_Np_1_tp_5…   <-- Elec1 field radial profile
│       E_045_f_4000_Np_1_tp_5…   <-- Elec1 field temporal profile
│       E_045_f_4000_Np_1_tp_5…   <-- Elec1 field axial profile
│       E_045_f_4000_Np_1_tp_5…   <-- Elec2 field radial profile
│       E_045_f_4000_Np_1_tp_5…   <-- Elec2 field temporal profile
│       E_045_f_4000_Np_1_tp_5…   <-- Elec2 field axial profile
│       E_045_f_4000_Np_1_tp_5…   <-- Elec3 field radial profile
│       E_045_f_4000_Np_1_tp_5…   <-- Elec3 field temporal profile
│       E_045_f_4000_Np_1_tp_5…   <-- Elec3 field axial profile
│       E_045_f_4000_Np_1_tp_5…   <-- Psi2 maximum values per pulse
│       E_045_f_4000_Np_1_tp_5…   <-- Psi3 maximum values per pulse
│       E_045_f_4000_Np_1_tp_5…   <-- Best time index per pulse
│
+---src                           <-- Contains source code
│       Code_SHG_PW_G_Ideal.f90   <-- Fortran finite difference solver
│
│       LICENSE                   <-- Project license information
│       README.md                 <-- Project overview and documentation
│

2. Getting Started

2.1. Prerequisites

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
  • Git (for cloning the repository)
  • Text Editor or IDE (VS Code, Cursor, or any Fortran-compatible editor)
  • Terminal/Command Line Interface

2.2. Quick Start

Follow these steps to get the project running:

  1. Clone the Repository

    git clone https://github.com/Second-Harmonic-Generation/SHG-PW-G-Ideal.git
    cd SHG-PW-G-Ideal
  2. Navigate to Source Directory

    cd src
  3. Compile the Fortran Code

    # Using gfortran
    gfortran -o Code_SHG_PW_G_Ideal Code_SHG_PW_G_Ideal.f90
    
    # Or using Intel Fortran (ifort)
    ifort -o Code_SHG_PW_G_Ideal Code_SHG_PW_G_Ideal.f90
  4. Run the Simulation

    ./Code_SHG_PW_G_Ideal

    Note: The program may prompt for user input. You can modify the input parameters directly in the source code to set default values.

  5. View Results

    • The program generates output files with the format: E_[Energy]_f_[Frequency]_Np_[Pulses]_tp_[PulseWidth]_[FieldType].plt
    • These files contain field intensity data in Tecplot format
    • Files are saved in the project root directory (or can be configured to save in results/ folder)
    • You can analyze the results using data visualization tools that support Tecplot format
  6. 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 (energy, frequency, number of pulses, pulse width) can be modified directly in the Fortran source code (Code_SHG_PW_G_Ideal.f90) to explore different scenarios and configurations.

3. How to Cite Us

Please refer to the citation folder for accurate citations. It contains essential guidelines for accurate referencing, ensuring accurate acknowledgement of our work.

4. Contact Information

For questions not addressed in the resources above, please connect with Mostafa Rezaee on LinkedIn for personalized assistance.

About

Computational model of Depleted Pulsed Gaussian Second Harmonic Generation (SHG) in Type II configuration, where the interaction occurs between fundamental beams with orthogonal polarizations (ordinary and extraordinary) in KTP crystal. The model assumes ideal conditions and neglects thermal absorption effects.

Topics

Resources

License

Stars

Watchers

Forks