Message Boards Message Boards

Solve the following problem with boundary condition using version 11.01.?

Posted 7 years ago

I get error messages when attempting to solve this problem It is easily solved if the conduction term (D[c[z, r], z, z]) and the corresponding boundary condition ( (D[c[z, r], z] /. z -> 1) == 0 )are removed ,however it needs the conduction term in the system I want to simulate

eqns = {
   (1 - r^2) r D[c[z, r], z] == 
    0.1 (r D[c[z, r], r, r] + D[c[z, r], r] + D[c[z, r], z, z]) - 
     0.01 c[z, r],
   c[0, r] == 0, (D[c[z, r], r] /. r -> 10^-6) == 0, 
   c[z, 0.999] == 1 - Exp[-1000 z^2],
   (D[c[z, r], z] /. z -> 1) == 0};
u = NDSolveValue[eqns, c, {z, 0, 1}, {r, 10^-6, 0.999}]

Plot3D[u[z, r], {z, 0, 1}, {r, 10^-6, 0.999}, PlotRange -> {0, 1}]
POSTED BY: claygruesbeck
5 Replies
Posted 7 years ago

The solution to this problem is given in Mathematica Stack Exchange, see HERE.

POSTED BY: claygruesbeck
Posted 7 years ago

Thank you for your tips Bill

POSTED BY: claygruesbeck
Posted 7 years ago

Does the problem persist with this modification

eqns = {(1-r^2) r D[c[z,r],z]==1/10(r D[c[z,r],r,r]+D[c[z,r],r]+D[c[z,r],z,z])-1/100 c[z,r],c[0,r]==0,
   (D[c[z, r], r] /. r -> 0) == 0, c[z, 1] == 1, (D[c[z, r], z] /. z -> 1) == 0};
u = NDSolveValue[eqns, c, {z, 0, 1}, {r, 0, 1}]

No. That doesn't appear to work either. And neither does this

eqns = {(1-r^2) r D[c[z,r],z]==1/10(r D[c[z,r],r,r]+D[c[z,r],r]+D[c[z,r],z,z])-1/100 c[z,r], c[0,r]==0,
   Derivative[0, 1][c][z, 0] == 0, c[z, 1] == 1, Derivative[1, 0][c][1, r] == 0};
u = NDSolveValue[eqns, c, {z, 0, 1}, {r, 0, 1}]

So I've exhausted my tips. Sorry. Hopefully someone better will be able to see what you need to do.

POSTED BY: Bill Simpson
Posted 7 years ago

Thank you Bill, in version 11, I get the following messages when I evaluate the same code.

CoefficientArrays::poly: (c^(0,1))[z,1/1000000] is not a polynomial.
DirichletCondition[(c^(0,1))[z,1/1000000]==0,r==1.*10^-6] needs to be \
linear
POSTED BY: claygruesbeck
Posted 7 years ago

At least in version 10.1, if I start a fresh MMA session and immediately evaluate this

eqns = {(1-r^2) r D[c[z,r],z]==0.1(r D[c[z,r],r,r]+D[c[z,r],r]+D[c[z,r],z,z])-0.01 c[z,r],
   c[0,r] == 0,
   (D[c[z, r], r] /. r -> 10^-6) == 0, 
   c[z, 0.999] == 1 - Exp[-1000 z^2],
   (D[c[z, r], z] /. z -> 1) == 0};
u = NDSolveValue[eqns, c, {z, 0, 1}, {r, 10^-6, 0.999}];
Plot3D[u[z, r], {z, 0, 1}, {r, 10^-6, 0.999}, PlotRange -> {0, 1}]

then without warning or error it displays

g1

POSTED BY: Bill Simpson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract