main_freeconvection.m

来自「Free Convection Past a Vertical Flat Pla」· M 代码 · 共 78 行

M
78
字号
% Author: Housam Binous

% Free Convection Past a Vertical Flat Plate

% National Institute of Applied Sciences and Technology, Tunis, TUNISIA

% Email: binoushousam@yahoo.com

global Pr

% Prandtl number is Pr

% figure 1 gives velocity profile

% figure 2 gives temperature profile

% we find the boundary conditions at the surface using
% the outer fluid conditions thanks to fsolve
% a, the solution of fsolve, gives these surface boundary conditions

Pr=1

options=optimset('TolFun',1e-6,'TolX',1e-6);
a=fsolve(@derivation,[0.5 -0.6],options);

a

x0=[0 0 a(1) 1 a(2)];
[t,Y]=ode15s(@freeconv,[0 5],x0);
figure(1);
plot(t,Y(:,2),'r')
hold on
figure(2);
plot(t,Y(:,4),'r')
hold on

Pr=100

options=optimset('TolFun',1e-6,'TolX',1e-6);
a=fsolve(@derivation,[0.25 -2.0],options);

a

x0=[0 0 a(1) 1 a(2)];
[t,Y]=ode15s(@freeconv,[0 5],x0);
figure(1);
plot(t,Y(:,2),'b')
figure(2);
plot(t,Y(:,4),'b')

Pr=10

options=optimset('TolFun',1e-6,'TolX',1e-6);
a=fsolve(@derivation,[1 -1],options);

a

x0=[0 0 a(1) 1 a(2)];
[t,Y]=ode15s(@freeconv,[0 5],x0);
figure(1);
plot(t,Y(:,2),'g')
figure(2);
plot(t,Y(:,4),'g')

Pr=0.01

options=optimset('TolFun',1e-6,'TolX',1e-6);
a=fsolve(@derivation1,[1 -0.05],options);

a

x0=[0 0 a(1) 1 a(2)];
[t,Y]=ode15s(@freeconv,[0 5],x0);
figure(1);
plot(t,Y(:,2),'y')
figure(2);
plot(t,Y(:,4),'y')

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?