Simulating pipeline behaviour using ODEs simplified from PDEs

Hi, I am working on my Final Year Project,which is related to the leakage detection system, and I am required to run simulation of pipeline using the theoretical partial differential equations.
I have simplified the PDEs to ordinary differential equations, and I would like to run the simulation in MATLAB, the simplified ODEs are shown as below,
P(i,j+1) - 0.5*c1*v(i+1,j+1) + 0.5*c1*v(1,j+1) = P(i,j) + 0.5*c1*v(i+1,j) - 0.5*c1*v(i,j)
c1 = -rou*(a^2)*(deltaT/deltaX)
v(i,j+1) + 0.5*c2*P(i+1,j+1) + 0.5*c2*P(1,j+1) = v(i,j) + 0.5*c2*P(i+1,j) - 0.5*c2*P(i,j)
c2=(1/rou)*(deltaT/deltaX)
while rou, a, deltaT and deltaX are constant.
Could anyone please give me advice to put the equations in MATLAB and run the simulation? Thanks!

Answers (0)

Products

Asked:

on 2 May 2013

Community Treasure Hunt

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

Start Hunting!