MATLAB Solving ODE/PDE's in Matlab: Advice for Using pde Function

  • Thread starter Thread starter n0_3sc
  • Start date Start date
  • Tags Tags
    Matlab
AI Thread Summary
The discussion focuses on solving two partial differential equations (PDEs) in MATLAB using the pde function. The first equation describes how I(t,z) varies with respect to z, while the second relates to N(t,z) over time. The user clarifies that they know the function I(t) and its boundary condition I(t,0) = I(t), which helps in determining I(t,z). A suitable boundary condition for N(t,z) is proposed as N(t=-∞, z) = 0, which is necessary for MATLAB to process the PDEs effectively. The conversation emphasizes the importance of understanding boundary conditions when working with PDEs in MATLAB.
n0_3sc
Messages
238
Reaction score
1
I have two PDE's. One in terms of dz and the other in terms of dt:

\frac{dI(t,z)}{dz}=aI(t,z) + bI^2(t,z) - cN(t,z)I(t,z)
and
\frac{dN(t,z)}{dt}=dI^2(t,z) - eN(t,z)

I know the function:
I(t)

I'd like advice on how to attempt this problem on MATLAB using the pde function. (Matlab's examples are too complex to follow).
 
Physics news on Phys.org
I might be able to help given that I know at least a little about diff eq.s in matlab, but first:

you say you know I(t), but in your equations I appears as a function of two variables. And if you know THAT function, then what's the use of the first equation?
 
Because I know I(t) the first equation determines how I(t) varies with z thus giving I(t,z).

I should also mention letters on the rhs "a,b,c,d,e" are constants.
 
I'm still not quite getting it. When you say that you know I(t), do you mean that you know I(t,0) or something like that?
 
Yeah sorry it can be a bit confusing when solving a pde in this way.

Here's what I(t) is:
I(t) = I_{max}exp(\frac{-t^2}{T})

I(t,0) = I(t).

The first ODE modifies I(t) as it varies with z giving I(t,z).
 
Aha. Okay, got it, thanks. Do you have a similar boundary condition for N(t,z)? I don't think MATLAB can do much with it if not.
 
Sure, I can think of this one as being a suitable condition:

N(t=-\infty,z) = 0
 

Similar threads

Replies
4
Views
1K
Replies
6
Views
4K
Replies
1
Views
2K
Replies
5
Views
2K
Replies
3
Views
2K
Replies
4
Views
2K
Replies
2
Views
2K
Back
Top