필터 지우기
필터 지우기

Using PDEPE to model a hollow cylinder?

조회 수: 6 (최근 30일)
Roger Moss
Roger Moss 2020년 8월 24일
댓글: Bill Greene 2020년 8월 26일
I'm trying to model a chemical reaction within the thick wall of a long hollow cylinder. It is a 1D (x,t) PDE as a linked system of 2 or 3 parameters (temperature, reaction state, maybe pressure) with a heat transfer boundary condition on the inner or outer wall (and possibly both) and heat release within the material (which is porous and reacting with a gas).
I was meaning to use PDEPE but I see from the documentation that for intervals a<x<b that one can only set conditions at x=a or x=b, not both, and also that for a cylinderical geometry the solver only models solid cylinders with a=0.
is this correct? Is there a work-around or should I take a Method of Lines approach and use ODE45 instead? Or code my own solver from scratch?
Also, if I were able to use PDEPE, how could the function that sets [c, f, s] sum at the whole-mesh values of x to determine the system pressure? I've looked at the documentation example and this function seems to be called with scalar arguments, for one node at a time.
Thanks
Roger
  댓글 수: 3
Roger Moss
Roger Moss 2020년 8월 25일
Hi Bill
I looked at "doc pdepe". The first example is for heat transfer in a cylindrical rod. Under "Code boundary conditions" it says:
"Since this problem is in cylindrical coordinates (m = 1), pdepe automatically enforces the symmetry condition at x=0, so you do not need to specify a left boundary condition".
OK, that does not say a left boundary is always impossible, but then the comments in the function code:
function [pl,ql,pr,qr] = heatbc(xl,ul,xr,ur,t)
n = 2.404825557695773;
pl = 0; %ignored by solver since m=1
ql = 0; %ignored by solver since m=1
pr = ur-besselj(0,n)*exp(-n^2*t);
qr = 0;
end
suggest that pl and ql are always ignored in a cylindrical (m=1) model. Maybe that's not what was meant, but it is how I read it. It didn't say "ignored since r=0", for instance.
The same section also says: "For problems posed on the interval axb, the boundary conditions apply for all t and either x=a or x=b.". I read this as implying "either x=a or x=b not both".
Roger
Bill Greene
Bill Greene 2020년 8월 26일
If and , then the mathematics requires a symmetry condition at the center; pdepe is just sort of helping you out there. Since you have , that doesn't apply.
Beyond that, I suggest you edit your equation to include your equations along with boundary and initial conditions.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by