Group Abstract Group Abstract

Message Boards Message Boards

Setting derivative boundary conditions in NDSolve

GROUPS:
Hi, all
I'm testing mathematica for 30 days. I've several questions: the first one: Is here the right place to do that? If not, please tell me, where I can do that!

Actually I test PDE solutions ( transient heat conduction). Has anyone an idea, why the following PDE example from the Help Documentation works
NDSolve[{D[u[t, x], t] == D[u[t, x], x, x],  u[0, x] == 0,
  u[t, 0] == Sin[t],  u[t, 5] == 0},                 u, {t, 0,
  10}, {x, 0, 5}]

while the following example ( I've changed one boundary condition- I hope, that was the only change- ) doesn't:
NDSolve[{D[u[t, x], t] == D[u[t, x], x, x], u[0, x] == 0,
  u[t, 0] == Sin[ t],    D[u[t, 5], x] == 0}, u, {t, 0, 10}, {x, 0,
  5}]

what is my mistake?

hopefully, later on I want solve the following problem:

a one dimensional bar (constant heat conductivity, density, heat capacity) is heated ( or cooled) at one end with a given, time dependent fluidtemperature distribution (as a function or at discrete times with interpolation). The heat transfer coefficient is assumed to be constant.
The other end of the bar is assumed to be isolated( dT/dx=0)

After my first insights in mathematica examples, I think this could be done with mathematica and in an CDF document ( with or without mathematica?) with the following options:
changing the material coefficients ( perhaps from mathematica databases or a own one)
changing the given, time dependent fluidtemperature distribution
and, at top: changing the initial and the possible boundary conditions ( I've seen a comparable CDF document: beam deflection with different boundary conditions)
choosing between different solution presentations:
3D plot ( temperature distribution as function of space and time)
2d plot temperature vs bar length ( at different times)
table form temperature vs bar length ( at different times)
maybe, that this example is too complicated for a newbie?
but anyway, thank you so much for any help!

Peter
POSTED BY: Peter Bischet
Answer
1 year ago
The mistake is that this:
D[u[t, 5], x] == 0
evaluates to True, because u[t,5] does not depend on x anymore and so the derivative is zero.

To write what you want to achieve, first take the derivative of u[t,x] and then replace x with zero:
(D[u[t, x], x] /. x -> 0)

The whole NDSolve expression then becomes:
NDSolve[{
D[u[t, x], t] == D[u[t, x], x, x],
u[0, x] == 0,
u[t, 0] == Sin[t],
(D[u[t, x], x] /. x -> 0) == 0},
u, {t, 0, 10}, {x, 0, 5}]
POSTED BY: Arnoud Buzing
Answer
1 year ago
Hi Arnoud,
thank you so much for your help. It works fine!
Peter
POSTED BY: Peter Bischet
Answer
1 year ago
Good to hear. I've updated the post title from 'newbie questions' to something more descriptive. Thank you for using Mathematica. Let us know if you have other questions we can help you with.
POSTED BY: Arnoud Buzing
Answer
1 year ago
Hi Arnoud,
I will purchase the program, but before I've some questions. I've got some emails from your company. Should I ask my questions there or at your contact option in my test version. I've found no way to contact you. I think this place here is the wrong one for my general questions. Do you have my email adress?   Please delete this answer here, because it doesn't belong to the mathematical problem. Thank you!
Peter
POSTED BY: Peter Bischet
Answer
1 year ago
If you have technical questions about Mathematica and its functionality during your trial period, the best place to ask those would be Wolfram Technical Support (support@wolfram.com). When emailing them, please including your license number or activation key along with a description of the problem and maybe notebook with an example of it.
POSTED BY: Sean Clarke
Answer
1 year ago