I am getting an error "Spatial discretization has failed" while solving a 1D pde using pdepe for spherical coordinates

1 vue (au cours des 30 derniers jours)
I want to solve a pde for diffusion of species inside a spherical bacterial cell from its SURFACE.
The boundary conditions are as below: at r=0, dC/dr=0 for all t>0; and at r=R, C=1200 for all t>0; [--> **No convection from outside environment to the cell surface is involved, only diffusion is taking place from the cell surface to the inside of the cell]
I have written Boundary conditon as below for pdepe:
function [pl,ql,pr,qr] = PDEBC(xl,ul,xr,ur,t)
global K Ce De D
pl = 0;
ql = 1;
pr = (ur-1200);
qr = 0;
Following error occurs: Spatial discretization has failed
However, everything goes fine if I take convective and diffusive transport together into consideration, with BC: @ r=R, DdC/dr=K(C-1200)
I request the community to please help me.
Thanks in advance.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by