Matlab code for boundary condition

조회 수: 3 (최근 30일)
Salai Mathiselvi Salai Mathiselvi
What is the matlab code for below the boundary conditon?
(i) x=0, y=0
(ii) x=0, dy/dx +dz/dx =0
(iii) t=0, x=infinity, y=1, z=c
  댓글 수: 4
Torsten
Torsten 2019년 6월 27일
What is the difference between y'(x,t) and y'(t) ?
Same for z.
According to which independent variable do you differntiate when you write y', y'', z', z'' ?
Torsten
Torsten 2019년 6월 27일
편집: Torsten 2019년 6월 27일
Salai Mathiselvi Salai Mathiselvi's comment moved here:
d^2y/dx^2-y^2*dy/dx+a*z-c*y-dy/dt=0,
d^2z/dx^2-y^2*dz/dx+a*z-c*y-dz/dt=0
Boundary condition
(i) x=0, y=0
(ii) x=0, dy/dx +dz/dx =0
(iii) t=0, x=infinity, y=1, z=b
What is the matlab code for this equation?

댓글을 달려면 로그인하십시오.

답변 (1개)

Torsten
Torsten 2019년 6월 27일
So you mean
at x=0, you have y = 0 and dy/dx + dz/dx
at x=infinity, you have y=1 and z = b
and at t = 0, you have
y = 1, z = b
for all x in [0;infinity] ?
If you have numerical values for a, b and c, read the documentation of "pdepe".
It will show you how to write the MATLAB code for your equations.
  댓글 수: 3
Torsten
Torsten 2019년 6월 27일
편집: Torsten 2019년 6월 27일
  1. m = 2 is wrong.
  2. You didn't include the terms -y^2*dy/dx and -y^2*dz/dx in the equations.
  3. Your boundary conditions settings are all wrong.
To include the boundary condition dy/dx + dz/dx = 0 at x=0 for "pdepe", you will have to rewrite your system of equations in terms of y and u:=y+z. This leads to
d^2y/dx^2-y^2*dy/dx+a*(u-y)-c*y-dy/dt=0,
d^2u/dx^2-y^2*du/dx-du/dt = 0
Best wishes
Torsten.
Salai Mathiselvi Salai Mathiselvi
Thank you very much sir. Your anwer was very helpful my work.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by