Azzera filtri
Azzera filtri

Using PDEPE to model a hollow cylinder?

6 visualizzazioni (ultimi 30 giorni)
Roger Moss
Roger Moss il 24 Ago 2020
Commentato: Bill Greene il 26 Ago 2020
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 Commenti
Roger Moss
Roger Moss il 25 Ago 2020
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 il 26 Ago 2020
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.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Chemistry in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by