Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.1K Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Error with Numerical Solution of PDE

Posted 10 years ago

I have the following code

Needs["DifferentialEquations 'InterpolatingFunctionAnatomy ' ]

pde = D[C[x, t], t] == D[C[x, t], x, x] - (1.5*C[x, t])/(.01 + C[x, t])

soln = NDSolve[{pde, C[x, 0] == 0, C[0, t] == if[0 < t <= 10, .0089, 0], C[.01, t] == if[0 < t <= 10, 6658.125, 0]}, C, {x, 0, .01}, {t, 0, 1}]

with the following output:

NDSolve::ibcinc: Warning: boundary and initial conditions are inconsistent. >>

NDSolve::ndnum: Encountered non-numerical value for a derivative at t == 0.`. >>

Can somebody explain this error to me?

POSTED BY: J FM
2 Replies

You wrote "if".

The function is "If". Built in symbols are always capitalized.

The error message is complaining that initial conditions don't make sense. This is because you are using "if" instead of "If".

POSTED BY: Sean Clarke

Your equation is nonlinear. Perhaps NDSolve for PDE is only designed for linear equations, at the moment.

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