Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
173 views
unlisted
ubuntu2204
Kernel: Python 3 (ipykernel)
import numpy as np import h5py as h5 import matplotlib.pyplot as plt from matplotlib import rcParams 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_uu_inner =F['uu_inner'][()] C0093_uu_outer =F['uu_outer'][()] C0093_uu =F['uu'][()] C0093_yp_loc =F['yp_loc'][()] F.close()
F = h5.File('../data/C0220.h5','r') C0220_uu_inner =F['uu_inner'][()] C0220_uu_outer =F['uu_outer'][()] C0220_uu =F['uu'][()] C0220_yp_loc =F['yp_loc'][()] F.close()
F = h5.File('../data/C0500.h5','r') C0500_uu_inner =F['uu_inner'][()] C0500_uu_outer =F['uu_outer'][()] C0500_uu =F['uu'][()] C0500_yp_loc =F['yp_loc'][()] F.close()
F = h5.File('../data/P0550.h5','r') P0550_uu_inner =F['uu_inner'][()] P0550_uu_outer =F['uu_outer'][()] P0550_uu =F['uu'][()] P0550_yp_loc =F['yp_loc'][()] F.close()
F = h5.File('../data/P1000.h5','r') P1000_uu_inner =F['uu_inner'][()] P1000_uu_outer =F['uu_outer'][()] P1000_uu =F['uu'][()] P1000_yp_loc =F['yp_loc'][()] F.close()
F = h5.File('../data/P2000.h5','r') P2000_uu_inner =F['uu_inner'][()] P2000_uu_outer =F['uu_outer'][()] P2000_uu =F['uu'][()] P2000_yp_loc =F['yp_loc'][()] F.close()
F = h5.File('../data/P5200.h5','r') P5200_uu_inner =F['uu_inner'][()] P5200_uu_outer =F['uu_outer'][()] P5200_uu =F['uu'][()] P5200_yp_loc =F['yp_loc'][()] F.close()
plt.figure(figsize=(8,5)) plt.subplot(221) plt.plot(P0550_yp_loc, P0550_uu, 'C0-' , label=r'$Re_\tau = 550$ (P)') plt.plot(P1000_yp_loc, P1000_uu, 'C1-' , label=r'$Re_\tau = 1000$ (P)') plt.plot(P2000_yp_loc, P2000_uu, 'C2-' , label=r'$Re_\tau = 2000$ (P)') plt.plot(P5200_yp_loc, P5200_uu, 'C3-' , label=r'$Re_\tau = 5200$ (P)') plt.plot(P0550_yp_loc, P0550_uu_inner, 'C0--' ) plt.plot(P1000_yp_loc, P1000_uu_inner, 'C1--' ) plt.plot(P2000_yp_loc, P2000_uu_inner, 'C2--' ) plt.plot(P5200_yp_loc, P5200_uu_inner, 'C3--' ) plt.plot(P0550_yp_loc, P0550_uu-P0550_uu_inner, 'C0-.' ) plt.plot(P1000_yp_loc, P1000_uu-P1000_uu_inner, 'C1-.' ) plt.plot(P2000_yp_loc, P2000_uu-P2000_uu_inner, 'C2-.' ) plt.plot(P5200_yp_loc, P5200_uu-P5200_uu_inner, 'C3-.' ) plt.legend(frameon=False,loc='upper right') plt.xlabel(r'$y^+$'); plt.xlim([1,5e4]); plt.xscale('log') plt.ylabel(r'$\langle u^{\prime 2} \rangle^+$') plt.ylim([0,14]) plt.text(0.1,14,'(a)') plt.title('Poiseuille') plt.subplot(222) plt.plot(C0093_yp_loc, C0093_uu, 'C4-' , label=r'$Re_\tau = 93$ (C)') plt.plot(C0220_yp_loc, C0220_uu, 'C5-' , label=r'$Re_\tau = 220$ (C)') plt.plot(C0500_yp_loc, C0500_uu, 'C6-' , label=r'$Re_\tau = 500$ (C)') plt.plot(C0093_yp_loc, C0093_uu_inner, 'C4--' ) plt.plot(C0220_yp_loc, C0220_uu_inner, 'C5--' ) plt.plot(C0500_yp_loc, C0500_uu_inner, 'C6--' ) plt.plot(C0093_yp_loc, C0093_uu-C0093_uu_inner, 'C4-.' ) plt.plot(C0220_yp_loc, C0220_uu-C0220_uu_inner, 'C5-.' ) plt.plot(C0500_yp_loc, C0500_uu-C0500_uu_inner, 'C6-.' ) plt.legend(frameon=False,loc='upper right') plt.xlabel(r'$y^+$'); plt.xlim([1,2e3]); plt.xscale('log') plt.ylabel(r'$\langle u^{\prime 2} \rangle^+$') plt.ylim([0,14]) plt.text(0.2,14,'(b)') plt.title('Couette') plt.subplot(223) plt.plot(P0550_yp_loc, P0550_uu_outer, 'C0-' ) plt.plot(P1000_yp_loc, P1000_uu_outer, 'C1-' ) plt.plot(P2000_yp_loc, P2000_uu_outer, 'C2-' ) plt.plot(P5200_yp_loc, P5200_uu_outer, 'C3-' ) plt.xlabel(r'$y^+$'); plt.xlim([1,5e4]); plt.xscale('log') plt.ylabel(r'$\langle u^{\prime 2}\rangle^+_{\lambda \ge \delta} $') plt.ylim([0,3]) plt.text(0.1,3,'(c)') plt.subplot(224) plt.plot(C0093_yp_loc, C0093_uu_outer, 'C4-' ) plt.plot(C0220_yp_loc, C0220_uu_outer, 'C5-' ) plt.plot(C0500_yp_loc, C0500_uu_outer, 'C6-' ) plt.xlabel(r'$y^+$'); plt.xlim([1,2e3]); plt.xscale('log') plt.ylabel(r'$\langle u^{\prime 2} \rangle^+_{\lambda \ge \delta}$') plt.ylim([0,7]) plt.text(0.2,7,'(d)') plt.subplots_adjust(hspace=0.4,wspace=0.3) plt.savefig('figure14.eps',dpi=300,bbox_inches='tight') plt.show() plt.close()
Image in a Jupyter notebook