How to solve below PDE based model using finite difference scheme.
Afficher commentaires plus anciens
I want to solve a PDE system which is given by

with initial conditions

I want to apply finite difference method to solve the above system for f and g.
We discretize f(t,a,x) as f(i,j,k) and same goes for function "g" as well. If we apply forward finite difference scheme, then both the partial derivative becomes

I know if I start with intial condition then we can solve this. From initial condition we have f(1,j,k)=f(0,a,x) and g(1,j,k)=g(0,a,x) in our hand, putting both in main equation we can get f(2,j,k) and g(2,j,k), but I don't how to handle those integral terms given in both equations . Please Can anyone with PDE background help me.
Any idea about this will help me a lot.
9 commentaires
Torsten
le 17 Mar 2023
And what is the a-x-domain over which you want to solve your equations ?
Bill Greene
le 18 Mar 2023
Then why are the integrals from 0 to 40 in your equation definition?
Nikhil
le 18 Mar 2023
Torsten
le 18 Mar 2023
May I ask where these equations stem from ?
Is it an artificial problem or does it have a physical background ?
Bill Greene
le 19 Mar 2023
One rather fundamental problem you have is that your initial conditions are inconsistent.
For example, just consider the point t=0, a=0, x=0.
Nikhil
le 20 Mar 2023
Nikhil
le 20 Mar 2023
Nikhil
le 20 Mar 2023
Réponses (1)
Take a grid (ai,xj) over your rectangular region with
0 = a1 < a2 < ... < an = 60
0 = x1 < x2 < ... < xm = 40
Approximate the integrals using the trapezoidal rule by using the values in the grid points.
Then you get a system of 2*(n*m) ordinary differential equations for f and g in the grid points that can be solved using ode15s.
I couldn't classify your problem into a certain category (it's not a PDE as you claim). So I don't know if the method I suggested will work. If you have literature about numerical methods to solve such systems (this is the reason I asked for the application), you should study it first before wildly beginning to produce MATLAB code.
3 commentaires
Bill Greene
le 20 Mar 2023
Yes, I think that is a very good approach. The trapz function should make it straightforward to calculate the four required integrals.
Nikhil
le 21 Mar 2023
I don't understand the problem.
You are given f(t,ai,xj) for 1<= i<= n and 1<=j<=m from the integrator. Now you want to evaluate the integral for a certain index pair (I,J) at (t,aI,xJ) with 1<=I<=n and 1<=J<=m
Thus it's approximately
exp(-(xJ-x(1))^2)*f(t,aI,x(1))/sqrt(pi) * dx/2 +
(exp(-(xJ-x(2))^2)*f(t,aI,x(2))/sqrt(pi) + exp(-(xJ-x(3))^2)*f(t,aI,x(3))/sqrt(pi) + ... + exp(-(xJ-x(m-1))^2)*f(t,aI,x(m-1))/sqrt(pi)) * dx +
exp(-(xJ-x(m))^2)*f(t,aI,x(m))/sqrt(pi) * dx/2
Catégories
En savoir plus sur Mathematics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!