Message Boards Message Boards

Why ContourPlot3D does not work when solving the transient 3D heat equation

Posted 1 year ago

Dear Community,

I try to solve the transient heat conduction equation on a 3D cuboid with different boundary conditions. The NDSolve solution seems to be OK, but when I try to plot some 3D isotherms at a certain time with ContourPlot3D, it does not do anything. What do I miss here?

Tx for the kind help in advance.
best regards
Andras

P.S.: notebook attached.

Attachments:
POSTED BY: agilicz
2 Replies
Posted 1 year ago

Dear Rohit,

Many many tx.

Best regards,

Andras

POSTED BY: agilicz

Hi Andras,

Evaluate tfun, it is of the form

{{temp -> InterpolatingFunction[...]}}

which is not a form that ContourPlot3D accepts so it returns unevaluated. One option is to replace NDSolve with NDSolveValue. I specified values for MaxRecursion and PlotPoints so the plot is generated in a reasonable time for testing.

tfun  = NDSolveValue[pde, temp, { t , 0. , 600. }, { x , y , z} \[Element] \[CapitalOmega] ]
ContourPlot3D[
  tfun[x, y, z, 40.],
  {x, y, z} \[Element] \[CapitalOmega],
  RegionFunction -> Function[{x, y, z}, x < 25. || y > 90. || z < 20. ],
  Contours -> {306., 308., 310., 312.},
  PlotPoints -> 10,
  MaxRecursion -> 0]

enter image description here

POSTED BY: Rohit Namjoshi
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