how to write equation in matlab for E(t-tp) where the E is E(t) but introduce a tp delay time.
7 views (last 30 days)
ti = 0;
tf = 2.50E-9;
[T,Y]= ode45(@(t,y) rate_eq(t,y),tspan,y0);
title('photon density ');
function dy = rate_eq(t,y)
dy = zeros(2,1);
I = 0.3;
te = 2E-9; %carrier lifetime (recombination life time)
tp = 2E-12; %photon lifetime
r = 0.3; % optical confinement factor
a = 2.5E-20; % gain coefficent
B=10E-10; %radiative recombination time
c=3*10^8; % velocity of light
e = 1.602E-19; % e = electron charge
ug= 3.6; % refractive index
n0 = 1E24; % carier density at transparancy
dy(1) = (I/e) - (y(1)/V.*te) - (r*c*a*((y(1)/V)-n0)/ug)*y(2);
dy(2) = (r*c*a*((y(1)/V)-n0)/ug)*y(2)- y(2)/tp + B*y(1)/V ;
in this the y(2) is P(t) what if i want to write the P(t-tp) where the tp is delayed time and tp =12E-12, how will these program modify.
Torsten on 7 Oct 2022
Edited: Torsten on 7 Oct 2022
You will need to make a change in the unit of time in your equations such that the delay time is in the order of 1 - it's not possible to handle a delay of 12E-12 by any ode integrator.
Furthermore, ode45 is not suited to solve delay differential equations. You will have to use dde23 instead.