From: thfrommelt on 16 Sep 2009 05:46 I experienced some difficulties with solving a 1D thermal conduction problem with my old Mathematica (V4 for Students): - spec. heat 1094J/kgK, density 354kg/m, thermal conductivity 0.05 W/ mK - domain length: 2mm - Dirichlet boundary condition: temperature at both ends is risen at a heating rate of 10K/min starting with room temperature - Starting condition: Room temperature 293.15K in the whole domain I used the following command: solution = NDSolve[{1094*354*D[T[x, t], t] == 0.05 D[T[x, t], x, x], T[x, 0] == 293.15, T[0, t] == 293.15 + 10/60*t, T[2 10^-3, t] == 293.15 + 10/60*t}, T, {x, 0, 2 10^-3}, {t, 0, 1980}, StartingStepSize -> {0.00001, 0.01}] A plot after 10 sek with Plot[T[x, 10] /. solution, {x, 0, 2 10^-3}, PlotPoints -> 20, PlotRange -> All] produces nonsense (see picture at http://www.thomas-frommelt.de/images/26910_WLF.jpg). Boundary conditions are obviously respected but the thermal conduction close to the right boundary is invalid. Meanwhile, I know that this error does not occur in Mathematica V6. I tried several options to achieve a correct solution in V4 as well: DifferenceOrder, MaxStepSize, AccuracyGoal, MaxSteps, WorkingPrecision - always the same result. Has anyone an idea? Thanks in advance Thomas
From: DrMajorBob on 17 Sep 2009 06:20 It looks good (a smooth U-shaped curve) in version 7. Bobby On Wed, 16 Sep 2009 04:46:42 -0500, thfrommelt(a)web.de <thfrommelt(a)web.de> wrote: > I experienced some difficulties with solving a 1D thermal conduction > problem with my old Mathematica (V4 for Students): > - spec. heat 1094J/kgK, density 354kg/m, thermal conductivity 0.05 W/ > mK > - domain length: 2mm > - Dirichlet boundary condition: temperature at both ends is risen at a > heating rate of 10K/min starting with room temperature > - Starting condition: Room temperature 293.15K in the whole domain > > I used the following command: > > solution = > NDSolve[{1094*354*D[T[x, t], t] == 0.05 D[T[x, t], x, x], > T[x, 0] == 293.15, > T[0, t] == 293.15 + 10/60*t, > T[2 10^-3, t] == 293.15 + 10/60*t}, > T, {x, 0, 2 10^-3}, {t, 0, 1980}, StartingStepSize -> {0.00001, > 0.01}] > > A plot after 10 sek with > Plot[T[x, 10] /. solution, {x, 0, 2 10^-3}, PlotPoints -> 20, > PlotRange -> All] > > produces nonsense (see picture at > http://www.thomas-frommelt.de/images/26910_WLF.jpg). > Boundary conditions are obviously respected but the thermal conduction > close to the right boundary is invalid. > > Meanwhile, I know that this error does not occur in Mathematica V6. I > tried several options to achieve a correct solution in V4 as well: > DifferenceOrder, MaxStepSize, AccuracyGoal, MaxSteps, WorkingPrecision > - always the same result. Has anyone an idea? > > Thanks in advance > > Thomas > -- DrMajorBob(a)yahoo.com
|
Pages: 1 Prev: Speed up calculating the pair correlation function for 2D point data Next: PlotRange |