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 Center および File ExchangeBoundary Value Problems についてさらに検索

タグ

製品


リリース

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by