0% found this document useful (0 votes)
127 views

Rutin Persamaan Diferensial Parsial MATLAB

This document discusses using MATLAB to solve partial differential equations (PDEs) describing heat conduction problems. It provides examples of 1D heat conduction PDEs along with initial and boundary conditions. The routines pdepe, pdpb, nw, and nb are coding examples in MATLAB to numerically solve the PDEs using finite elements. The code is executed to simulate and plot the temperature distribution over time of a plastic sheet initially at 25°C placed between plates at 120°C.

Uploaded by

Alamsyah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
127 views

Rutin Persamaan Diferensial Parsial MATLAB

This document discusses using MATLAB to solve partial differential equations (PDEs) describing heat conduction problems. It provides examples of 1D heat conduction PDEs along with initial and boundary conditions. The routines pdepe, pdpb, nw, and nb are coding examples in MATLAB to numerically solve the PDEs using finite elements. The code is executed to simulate and plot the temperature distribution over time of a plastic sheet initially at 25°C placed between plates at 120°C.

Uploaded by

Alamsyah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Rutin Persamaan Diferensial

Parsial MATLAB
Oleh
Teguh Kurniawan, Ph.D
Jurusan Teknik Kimia
Universitas Sultan Ageng Tirtayasa
Persamaan Diferensial Parsial (1-D) Dinamik

Suku Dinamik Suku dispersi Suku konveksi

Contoh
1. The PDEs hold for t0 ≤ t ≤ tf and a ≤ x ≤ b.
2. The spatial interval [a, b] must be finite.
3. m can be 0, 1, or 2, corresponding to slab, cylindrical,
or spherical symmetry, respectively. If m > 0, then a ≥ 0 must
also hold.
4. The coefficient f(x,t,u,∂u∂x) is a flux term and s(x,t,u,∂u∂x) is a
source term.
5. The flux term must depend on the partial derivative ∂u/∂x.
Contoh
kasus10
Sebuah lembaran plastik dengan tebal 1 cm mula-mula
bertemperatur 25 oC diletakan diantara pelat yang
bertemperatur 120 oC. Diketahui massa jenis plastik 900
kg/m3, konduktivitas termal 0.13 W/moC, dan kalor jenis
1670 J/kgoC . Pemodelan matematis untuk kasus konduksi
tak tunak adalah sbb:
 2T T k
 2  
cp
x t
Dengan metode numeris evaluasi temperatur rata-rata
plastik 10 menit kemudian?
Nilai batas dan Nilai awal
 2T T
 2 
x t
T  0, t   1200 C
Nilai batas dan
T  1, t   120 C
0
Nilai Awal
T  x  0 :1, 0   250 C
k (0.13)
 =  8.6494x10 8 m 2 / s
 c p (900)(1670)
 5.1896x102 cm 2 / menit
Rutin MATLAB
• sol = pdepe(m,pdefun,icfun,bcfun,xmesh,tspan)

Where
•m is the symmetry constant.
•pdefun defines the equations being solved.
•icfun defines the initial conditions.
•bcfun defines the boundary conditions.
•xmesh is a vector of spatial values for x.
•tspan is a vector of time values for t.
Nilai batas
Koding MATLAB
Nilai batas
function [pL,qL,pR,qR] = nb(xL,uL,xR,uR,t)
pL = uL-120;
qL = 0;
Persamaan diferensial parsial pR = uR - 120;
qR = 0;
function [c,f,s] = pdpb(x,t,u,dudx) end
k=0.13%W/(m.K)
rho=900%kg/m3 Eksekusi
cp=1670%J/(kg.oC) L = 1;%tebal plastik cm
alpha=(k/rho/cp)*1e4*60%cm2/menit x = linspace(0,L,20);
c = 1/alpha; t = linspace(0,10,20);
f = dudx; m=0
s = 0; sol = pdepe(m,@pdpb,@nw,@nb,x,t)
end
colormap hot
Nilai awal imagesc(x,t,sol)
function u0 = nw(x) colorbar
u0 = 25; xlabel('Distance x')
end ylabel('Time t')
Plot

You might also like