Solving rate equations by using ode45.

8 ビュー (過去 30 日間)
Stefan Mark Jensen
Stefan Mark Jensen 2017 年 11 月 29 日
編集済み: Torsten 2017 年 11 月 30 日
Hi Guys
Iam currently working on two-photon confocal microscopy. But iam having a hard time solving the absorption rate equations for both one-and two-photon absorption of a gaussian beam on a x,z-grid for specified times after excitation. It be should relatively easy using ode45, but i just can't get it to work properly. The problem are without a dout related to my poor matlab experience. I hope someone can help :)
The rate equations are as follows:
dI_OPA/dz=-alpha*(1-R)*I_OPA (also known as Lambert-Beers law)
dn_OPA/dt=(alpha/(hbar*omega_OPA))*I_OPA (Number of excitations per time)
dI_TPA/dz=-beta*(1-R)*I_TPA^2
dn_TPA/dt=(beta/(2*hbar*omega_TPA))*I_TPA^2
I have solved the first equation for dI_OPA/dz yielding the following picture with the following code. _________________________________________________________________
%% Calculation of Gaussian, initial intensity value %%
% Beam radius of approximated Gaussian laser beam in GaN at 400nm.
wz_400=w0_400.*(1+((lambda_400.*zv)./(pi.*w0_400*n400_GaN)).^2);
% Calculation of Gaussian in xz-plane at 400 nm.
Ixz_400=((2.*P_ex)./(pi.*wz_400.^2)).*exp((-2.*(xv-xv(1)).^2)./(wz_400.^2));
[z_OPA I_OPA]=ode45(@IOPA_difeq,zv,Ixz_400); % One photon absorption
_________________________________________________________________
function df = IOPA_difeq(z,I_OPA)
%Constants
alpha_GaN=3.5*10^3.*(1./10^-2); % [1/m] One photon absorption, Muth el at. 1997.
n400_GaN=2.56; % Refractive index at 400 nm excitation.
n_air=1; % Refractive index of air.
R_400=(n_air-n400_GaN)./(n_air+n400_GaN); % Fresnel reflection coefficient at 400 nm.
% Differential equation for depth dependent intensity.
df=-alpha_GaN.*(1-R_400).*I_OPA;
__________________________________________________________
But how due i code the second function of dn_OPA/dt to be solved with ode45 in which the solution of I_OPA are used as values for a specific set of times (tspan) ?
Best regards SMJ

回答 (1 件)

Torsten
Torsten 2017 年 11 月 30 日
編集済み: Torsten 2017 年 11 月 30 日
Use "dsolve" instead of "ode45". Your complete system has a simple analytical solution.
Best wishes
Torsten.

カテゴリ

Help Center および File ExchangePhysics についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by