Boundary conditions in PDE Solver (pdepe)

3 views (last 30 days)
Brian May
Brian May on 10 Aug 2018
Commented: Bill Greene on 11 Aug 2018
I try to solve the heat equations following the example given here , but I do not understand how the boundary conditions are applied:
function [pl,ql,pr,qr] = pdex1bc(xl,ul,xr,ur,t)
pl = ul;
ql = 0;
pr = pi * exp(-t);
qr = 1;
For example, how the above code should be altered for the following cases:
1. u(0,t) = 5, u(L,t) = 100 // finite
2. u(0,t) = 5, u(∞, t) = 100 // semi-infinite
3. u_x(0,t) = 5, u_x(L,t) = 0 // finite slab, one side at constant flux, one side insulated

Answers (0)

Tags

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!