フィルターのクリア

SOLVING PDE using MATLAB

1 回表示 (過去 30 日間)
Mr.DDWW
Mr.DDWW 2022 年 3 月 30 日
コメント済み: Torsten 2022 年 3 月 30 日
clc;clear all;close all;
L = 1;
x = linspace(0,L,75);
t = linspace(0,1,75);
m = 0;
sol = pdepe(m,@heatpde,@heatic,@heatbc,x,t);
sol1=sol;
figure(1)
surf(x,t,sol1);
xlabel('y/b');
zlabel('(T-T_0)/(T_1-T_0)');
title('Temperature Distribution in Finite Slab, Nu=1'); grid on;
function [c,f,s] = heatpde(x,t,u,dudx)
c = 1;
f = dudx;
s = 0;
end
function u0 = heatic(x)
u0 = 1;
end
function [pl,ql,pr,qr] = heatbc(xl,ul,xr,ur,t)
Nu = 1.0;
pl = 0;
ql = 1;
pr = Nu*ur;
qr = 1;
end
Can someone please verify if the plot as well as the method is correct ? I am trying to solve the pde in images using matlab
  1 件のコメント
Torsten
Torsten 2022 年 3 月 30 日
The code looks fine for me.

サインインしてコメントする。

回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by