using bvp5c evaluate velocity and temperature at specific points

조회 수: 2 (최근 30일)
Syed Mohiuddin
Syed Mohiuddin 2025년 3월 20일
댓글: Syed Mohiuddin 2025년 3월 21일
I need to find the value of and at -1,-0.4,0,0.4,1, approximate the solution upto 5 decimal places
How should I find these in program. Please help me in this regard
The program is written for these equations
Program is given below
close all
clc
n = -1;
b1= 0.5;
b2 = 0.5;
GR1 = 10;
GR2 = 10;
A1 = 0.5;
P = 0.5;
m = 0.3;
Br = 0;
G1 = 1;
G3 = 1;
G4 = 1;
dydx=@(x,y)[y(4);
y(5);
y(6);
b1.*y(4).*y(5)-(1+b1.*y(2)).*(GR1.*G1.*y(2)+GR2.*G1.*y(3)-G3.*P);
b2.*y(5).^2-Br.*G4.*y(4).^2-(b2-b1).*y(2).*Br.*G4.*y(4).^2+b2.*b1.*Br.*G4.*y(2).^2.*y(4).^2;
A1.*y(3)];
BC = @(ya,yb)[ya(1);yb(1);ya(2)-(1+n);yb(2)-1.0;ya(3)-(1+m);yb(3)-1.0];
yinit = [0.01;0.01;0.01;0.01;0.01;0.01];
solint = bvpinit(linspace(-1,1,50),yinit);
S = bvp5c(dydx,BC,solint);

채택된 답변

Torsten
Torsten 2025년 3월 20일
yeval = deval(S,[-1,-0.4,0,0.4,1]);
veval = yeval(1,:)
thetaeval = yeval(2,:)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Boundary Value Problems에 대해 자세히 알아보기

태그

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by