用Dirichlet和Neumann边界条件求解二阶微分方程

发布于 2025-02-02 21:01:25 字数 1103 浏览 4 评论 0原文

热方程式的傅立叶定律

               

我想解决一个孤立的电加热杆的

               

:具有dirichlet边界条件的条件

               

和neumann边界的条件,其中

               

x

  • 的长度坐标为
  • 杆的长度是杆k的长度
  • 是杆的长度是材料(假定常数)
  • 是每单位长度的内部热量产生
  • Q的热量Q热负载
  • T l 是右侧的环境温度

以求解微分方程

eqn : 'diff(T, x, 2) + Q / k = 0;
sol : ode2(eqn, T, x);

Q 的形式

               

但是,在使用边界条件使用边界条件时

bc2(sol, x=0, 'diff(T, x)=-q/k, x=L, T=TL);

:我得到错误的答案

               

,而我期望看到的是

               

,如果您能帮助我知道问题是什么以及如何解决它,我将不胜感激。

I want to solve the Fourier’s law for the heat equation

               

of an isolated electrically heated rod:

               

with a Dirichlet boundary condition of

               

and a Neumann boundary condition of

               

where

  • x is the length coordinate
  • L is the length of the rod
  • K is the thermal conductivity of the material (assumed constant)
  • Q is the internal heat generation per unit length
  • q heat load from the left side
  • TL is the ambient temperature on the right side

To solve the differential equation I used the

eqn : 'diff(T, x, 2) + Q / k = 0;
sol : ode2(eqn, T, x);

giving the correct general form of

               

however when applying the boundary conditions using:

bc2(sol, x=0, 'diff(T, x)=-q/k, x=L, T=TL);

I get the wrong answer of

               

while what I expected to see was

               

I would appreciate it if you could help me know what is the problem and how I can resolve it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凑诗 2025-02-09 21:01:25

在这种特定情况下,由于neumann边界条件发生在x = 0中,因此我可以使用它

ic2(sol, x=L, T=TL, 'diff(T, x)=-q/k);

来获得正确的结果:

               

In this specific case, because the Neumann boundary condition happened in the x = 0 I could use the

ic2(sol, x=L, T=TL, 'diff(T, x)=-q/k);

to get the correct result:

               
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文