Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
172 views
unlisted
ubuntu2204
Kernel: Python 3 (ipykernel)
import numpy as np import h5py as h5 import matplotlib.pyplot as plt from matplotlib import rcParams from matplotlib.gridspec import GridSpec rcParams['font.family'] = 'serif' rcParams['font.serif'] = ['Computer Modern Roman'] rcParams['text.usetex'] = True rcParams['xtick.major.size']=7 rcParams['ytick.major.size']=7 rcParams['xtick.minor.size']=3.5 rcParams['ytick.minor.size']=3.5 rcParams['xtick.labelsize']=10 rcParams['ytick.labelsize']=10 rcParams['contour.negative_linestyle'] = 'solid'
F = h5.File('../data/C0093.h5','r') C0093_E_uu_inner =F['E_uu_inner'][()] C0093_E_uu_outer =F['E_uu_outer'][()] C0093_E_uu =F['E_uu'][()] C0093_Re_tau =F['Re_tau'][()] F.close()
F = h5.File('../data/C0220.h5','r') C0220_E_uu_inner =F['E_uu_inner'][()] C0220_E_uu_outer =F['E_uu_outer'][()] C0220_E_uu =F['E_uu'][()] C0220_Re_tau =F['Re_tau'][()] F.close()
F = h5.File('../data/C0500.h5','r') C0500_E_uu_inner =F['E_uu_inner'][()] C0500_E_uu_outer =F['E_uu_outer'][()] C0500_E_uu =F['E_uu'][()] C0500_Re_tau =F['Re_tau'][()] F.close()
F = h5.File('../data/P0550.h5','r') P0550_E_uu_inner =F['E_uu_inner'][()] P0550_E_uu_outer =F['E_uu_outer'][()] P0550_E_uu =F['E_uu'][()] P0550_Re_tau =F['Re_tau'][()] F.close()
F = h5.File('../data/P1000.h5','r') P1000_E_uu_inner =F['E_uu_inner'][()] P1000_E_uu_outer =F['E_uu_outer'][()] P1000_E_uu =F['E_uu'][()] P1000_Re_tau =F['Re_tau'][()] F.close()
F = h5.File('../data/P2000.h5','r') P2000_E_uu_inner =F['E_uu_inner'][()] P2000_E_uu_outer =F['E_uu_outer'][()] P2000_E_uu =F['E_uu'][()] P2000_Re_tau =F['Re_tau'][()] F.close()
F = h5.File('../data/P5200.h5','r') P5200_E_uu_inner =F['E_uu_inner'][()] P5200_E_uu_outer =F['E_uu_outer'][()] P5200_E_uu =F['E_uu'][()] P5200_Re_tau =F['Re_tau'][()] F.close()
C_Re = np.array([C0093_Re_tau, C0220_Re_tau, C0500_Re_tau]) P_Re = np.array([P0550_Re_tau, P1000_Re_tau, P2000_Re_tau, P5200_Re_tau]) C_Ew = np.array([C0093_E_uu[0], C0220_E_uu[0], C0500_E_uu[0]]) P_Ew = np.array([P0550_E_uu[0], P1000_E_uu[0], P2000_E_uu[0], P5200_E_uu[0]]) C_Ew_inner = np.array([C0093_E_uu_inner[0], C0220_E_uu_inner[0], C0500_E_uu_inner[0]]) P_Ew_inner = np.array([P0550_E_uu_inner[0], P1000_E_uu_inner[0], P2000_E_uu_inner[0], P5200_E_uu_inner[0]]) C_Ew_outer = np.array([C0093_E_uu_outer[0], C0220_E_uu_outer[0], C0500_E_uu_outer[0]]) P_Ew_outer = np.array([P0550_E_uu_outer[0], P1000_E_uu_outer[0], P2000_E_uu_outer[0], P5200_E_uu_outer[0]])
fig = plt.figure(figsize=(8.3,5),layout="constrained") gs = GridSpec(2, 6, figure=fig) ax1 = fig.add_subplot(gs[0, :3]) plt.plot(C_Re, C_Ew - C_Ew_inner, 'k--o', markerfacecolor='none')#,label=r'$\epsilon_{\mathrm{w},\lambda^+ < 1000}^+$ , Couette') plt.plot(P_Re, P_Ew - P_Ew_inner, 'k--s', markerfacecolor='none')#,label=r'$\epsilon_{\mathrm{w},\lambda^+ < 1000}^+$ , Poiseuille') plt.plot(C_Re, C_Ew, 'k-o', markerfacecolor='none')#,label=r'$\epsilon_{\mathrm{w}}^+$ , Couette') plt.plot(P_Re, P_Ew, 'k-s', markerfacecolor='none')#,label=r'$\epsilon_{\mathrm{w}}^+$ , Poiseuille') plt.plot([-1,0],[0,0], 'k--', markerfacecolor='none',label=r'$\epsilon_{\mathrm{w},\lambda^+ < 1000}^+$') plt.plot([-1,0],[0,0], 'k-', markerfacecolor='none',label=r'$\epsilon_{\mathrm{w}}^+$') plt.xscale('log') plt.xlabel(r'$Re_\tau$') plt.legend(frameon=False,ncol=1,loc='upper right') plt.ylabel(r'$\epsilon_\mathrm{w}^+$') plt.ylim([0.3,0.5]) plt.text(30,0.5,'(a)') fig.add_subplot(gs[0, 3:6]) plt.plot(C_Re, C_Ew - C_Ew_inner, 'k-o', markerfacecolor='none',label=r'Couette') plt.plot(P_Re, P_Ew - P_Ew_inner, 'k-s', markerfacecolor='none',label=r'Poiseuille') plt.xscale('log') plt.xlabel(r'$Re_\tau$') #plt.legend(frameon=False,ncol=1,loc='lower left') plt.ylabel(r'$\epsilon_{\mathrm{w},\lambda^+ < 1000}^+$') plt.ylim([0.30,0.35]) plt.text(30,0.35,'(b)') ax3 = fig.add_subplot(gs[1, :2]) plt.plot(C_Re, C_Ew_outer, 'k-o', markerfacecolor='none',label=r'Couette') plt.xscale('log') plt.xlabel(r'$Re_\tau$') #plt.legend(frameon=False,ncol=2,loc='upper right') plt.ylabel(r'$\epsilon_{\mathrm{w},\lambda \ge \delta}^+$') plt.ylim([0.05,0.25]) plt.xlim([50,1e3]) plt.text(14,0.25,'(c)') ax4 = fig.add_subplot(gs[1, 2:4]) plt.plot(P_Re, P_Ew_outer, 'k-s', markerfacecolor='none',label=r'Poiseuille') plt.xscale('log') plt.xlabel(r'$Re_\tau$') #plt.legend(frameon=False,ncol=2,loc='upper right') plt.ylabel(r'$\epsilon_{\mathrm{w},\lambda \ge \delta}^+$') plt.ylim([0.02,0.04]) plt.xlim([300,1e4]) plt.text(60,0.04,'(d)') ax4 = fig.add_subplot(gs[1, 4:6]) #plt.plot(C_Re, -C_Ew_outer+C_Ew_inner, 'k-o', markerfacecolor='none',label=r'Couette') plt.plot(P_Re[-3:], -P_Ew_outer[-3:]+P_Ew_inner[-3:], 'k-s', markerfacecolor='none',label=r'Poiseuille') plt.xscale('log') plt.xlabel(r'$Re_\tau$') #plt.legend(frameon=False,ncol=1,loc='lower right') plt.ylabel(r'$\epsilon_{\mathrm{w},1000\delta_v < \lambda < \delta}^+ $') plt.ylim([-0.05,0.1]) plt.xlim([5e2,1e4]) plt.text(100,0.1,'(e)') plt.savefig('figure04.eps',dpi=300,bbox_inches='tight') plt.show() plt.close()
Image in a Jupyter notebook