Group Abstract Group Abstract

Message Boards Message Boards

Solve 1D heat equation with a non-initial/boundary condition?

Posted 6 years ago

I've been trying different ways to Use NDSolve for my calculation: Heat Equation

in which I'm trying to find the constant k (rho and Cp are known). Anyway I've tried I get the error: "Boundary condition is not specified on a single edge of the boundary of the computational domain."

When not including the the problematic condition I got an "Interpolation Function" but still wasn't able to retrieve k (using Solve or FindRoot). Here's my code:

ClearAll["Global'*"]
rho=2200; cp=700; ay=1/(rho*cp);

pde =( D[T[t,x,k], {x, 2}] )*ay*k == D[T[t, x,k], t];
bc = { T[t, 0,k] == 373 , T[0, x,k] == 303, T[120,1,k]==338};

 sol=NDSolve[{pde, bc},T,{x,0,1},{t,0,120},{k,0,100}] 

Boundary Condition Error

Any Help would be greatly appreciated.

POSTED BY: C H
3 Replies
POSTED BY: Hans Dolhaine
Posted 6 years ago

Thank you for the response! Could you please elaborate on how you've reached the function Erfc?

POSTED BY: C H

The solution for the heat equation can be written

fT = TT0 + (Tinfi - TT0) Erfc[x/(2 Sqrt[a t])]

D[fT, t] - a D[fT, x, x] // Simplify

In your case

fT = 30 + (100 - 30) Erfc[x/(2 Sqrt[a t])]

Make a Plot of fT as function of x after 120 secs ( t -> 120 ) for variable a and find that for a = 0.0092 your condition is fulfilled:

Manipulate[
 Plot[Evaluate[fT /. {a -> aa, t -> 120}], {x, 0, 4}, 
  PlotRange -> {0, 100}, Epilog -> {PointSize[.02], Point[{1, 65}]}],
 {aa, 0.001, 0.1}]

I hope this helps. My best wishes for the new year.

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