thavamaran
Member level 4
Hi guys, I am a newbee to this forum. But I am kind of familiar with matlab. Recently I have solved my laser rate equation with Euler method.
But the result is not satisfying and thorough research proves that Euler method is not that precise compared to Runge-Kutta method. So im planning to use ODE45.
But my equation is this:
dN/dt = (Id/edwl)-(N/tc)-(BN^2)-(CN^3)-(G(N-Nt)/(1+epsi*S))*S
dS/dt=(CMF*G(N-Nt)/(1+epsi*S))*S+(BN^2)-(S/tp)
here, dN/dt is the carrier density and dS/dt is the photon density.
-Id is input bias current
-e electron charge
-d, w and l is the thickness,width and length, so boundary is the length.
-N is the initial condition of carrier density
-rest of the values are constant and not important.
-S is the initial condition of photon density
So, to solve ODE numerically, we need initial condition and boundary condition where N and S are the initial condition and l is the length of my laser which will be the boundary condition.
I really dont know how to apply this into ODE45 function.
The time of every integration step I did in Euler method was as following:
N(i+1)=N(i)+dN/dt(i)*tDFB;
S(i+1)=S(i)+dS/dt(i)*tDFB;
where tDFB is the propagation time in the laser which i calculated by taking the group velocity, Vg and length of the laser l. tDFB is 3.7ps.
Please guide me on this. Just direct me to the right path. thank you.
But the result is not satisfying and thorough research proves that Euler method is not that precise compared to Runge-Kutta method. So im planning to use ODE45.
But my equation is this:
dN/dt = (Id/edwl)-(N/tc)-(BN^2)-(CN^3)-(G(N-Nt)/(1+epsi*S))*S
dS/dt=(CMF*G(N-Nt)/(1+epsi*S))*S+(BN^2)-(S/tp)
here, dN/dt is the carrier density and dS/dt is the photon density.
-Id is input bias current
-e electron charge
-d, w and l is the thickness,width and length, so boundary is the length.
-N is the initial condition of carrier density
-rest of the values are constant and not important.
-S is the initial condition of photon density
So, to solve ODE numerically, we need initial condition and boundary condition where N and S are the initial condition and l is the length of my laser which will be the boundary condition.
I really dont know how to apply this into ODE45 function.
The time of every integration step I did in Euler method was as following:
N(i+1)=N(i)+dN/dt(i)*tDFB;
S(i+1)=S(i)+dS/dt(i)*tDFB;
where tDFB is the propagation time in the laser which i calculated by taking the group velocity, Vg and length of the laser l. tDFB is 3.7ps.
Please guide me on this. Just direct me to the right path. thank you.