$g = g(\eta)$.
$$2g^{\prime\prime\prime} + gg^{\prime\prime} = 0,$$
$$g^{\prime}(0) = 0,$$ $$g(0) = 0,$$ $$h(\infty)=1.$$
Let $h=g^{\prime}$ and $k=h^{\prime}$.
This set of equations has boundary conditions: $$h(0) = 0,$$ $$g(0) = 0,$$ $$h(\infty) = 1.$$
Solve with a shooting method. * Guess $k(0)$, shoot for $h(\infty)=1$. * Then $u(\eta)/U_{\infty} = h(\eta)$. * Also, $\eta = y/\delta$, where $\delta = \sqrt{L\nu/U_{\infty}}$. * So, $u = u(y)$.
import numpy as np
from scipy.optimize import fsolve
from scipy.integrate import odeint
import matplotlib.pyplot as plt
%matplotlib inline
def odeRHS(y,r):
k = y[0]
h = y[1]
g = y[2]
kprime = -0.5*g*k
hprime = k
gprime = h
return np.array([kprime, hprime, gprime])
def F_shooting(k0):
y0 = np.array([k0[0], 0.0, 0.0])
eta = np.array([0.0, 10])
y = odeint(odeRHS, y0, eta)
return y[-1,1] - 1.0
#-------------- Find k0
k0g = 0.0
k0 = fsolve(F_shooting, k0g)[0]
print(f"k0 ={k0}")
#-------------- Now solve ODE with given Tr0
eta = np.linspace(0,10,100)
y0 = np.array([k0, 0.0, 0.0])
y = odeint(odeRHS,y0,eta)
h = y[:,1]
#-------------- Plot the result
plt.rc("font", size=14)
plt.plot(h,eta)
plt.ylabel(r'$y/\delta$')
plt.xlabel(r'$u/U_{\infty}$')
plt.xlim([0,1.4])
plt.ylim([0,10]);
for i in range(10,100,10):
plt.arrow(0,eta[i],h[i],0)
k0 =0.33205736084949444
