필터 지우기
필터 지우기

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개)

카테고리

Help CenterFile Exchange에서 PDE Solvers에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by