have a wave equation:(adsbygoogle = window.adsbygoogle || []).push({});

(∂^2 p)/〖∂z〗^2 -1/c^2 (∂^2 p)/〖∂t〗^2

In my case, (fields propagation within a semiconductor laser)

Which can be factored into forward propagating photon density:

(∂p^+)/∂t+C_g (∂p^+)/∂z=C_g Gp^++〖1/2 βR〗_sp

And backward propagation wave (photon density):

〖∂p〗^-/∂t-C_g (∂p^-)/∂t=C_g Gp^-+〖1/2 βR〗_sp

The photons are due to direct modulation of a laser, with the carrier density given by:

∂n/∂t=J/qd-n/τ_nr -〖R_sp-C〗_g G(p^++p^-)

I applied method of lines to discritizze the spatial variable, using backward difference to Forward photon and forward difference to backward photon density to obtain a system of first order ODEs, I then applied first order Finite differences for the time variable to obtain the following equations:

Equation 1

(p^+ (t+1,z)-p^+ (t,z))/Δt+C_g (p^+ (t,z)-p^+ (t-1,z))/Δz=C_g.G〖(n(t,z) ).p〗^++〖1/2 β.R〗_sp (n(t,z))

Equation 2

(p^- (t+1,z)-p^- (t,z))/Δt-C_g (p^- (t,z)-p^- (t,z+1))/Δz=C_g.G〖(n(t,z) ).(p〗^++〖1/2 β.R〗_sp (n(t,z))

Equation 3

(n(t,z)-n(t-1,z))/Δt=J(t,z)/qd-n(t,z)/τ_nr - R_sp (n(t,z) )G〖(n(t,z) )-〖1/2 C〗_g G〖(n(t,z) ) 〖.(p〗〗^+ (t,z)+p〗^- (t,z)+p^+ (t,z-1)+p^- (t,z-1) )

I now want to solve these using MATLAB

Can any body help with any recipe, particularly the best algorithm or code to solve such a scenario varying in both time and space?

I have attached a word document with better readable equations

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Laser Travelling wave rate equations solved numerically

**Physics Forums | Science Articles, Homework Help, Discussion**