射法自然对流边值问题

问题描述

我正在尝试解决边界值问题的一个特殊情况,即自然对流的边界层方程:

enter image description here

感谢这个论坛的贡献者@LutzLehmann,这组方程是通过使用 scipy 库中的函数 solve_bvp 求解的。

不幸的是,我没有在这些特定的边界条件下获得正确的结果:

enter image description here

在这种情况下,求解器的初始猜测似乎不起作用,我想知道什么更适合。

代码如下:

import numpy as np
from scipy.integrate import solve_bvp
import matplotlib.pyplot as plt


Pr = 5

def odesys(t,u):
    F,dF,ddF,θ,dθ = u
    return [dF,θ-0.25/Pr*(2*dF*dF-3*F*ddF),dθ,0.75*F*dθ]

def bcs(u0,u1): return [u0[0],u0[1],u1[1],u0[3]-1,u1[3]]

x = np.linspace(0,8,25)
u = [x*x,np.exp(-x),0*x+1,1-x,0*x-1]

res = solve_bvp(odesys,bcs,x,u,tol=1e-5)

print(res.message)

plt.subplot(2,1,1)
plt.plot(res.x,res.y[3],color='#801010',label='$\Delta T$')
plt.legend()
plt.grid()

plt.subplot(2,2)
plt.plot(res.x,res.y[1],'-',color='C0',label="$F'$")
plt.legend()
plt.grid()

这是获得的错误图:

enter image description here

有人可以为这个问题提出一个更好的初始案例来帮助我吗?

感谢您的帮助,

PS:对于命题:

u = [0.5*x*x*np.exp(-x),x*np.exp(-x),-np.exp(-x)]

我明白了:

enter image description here

与文献相比,我期待这个结果(其中 g 是方程组中的 theta):

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)