Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
601 views
unlisted
ubuntu2404
Kernel: Python 3 (ipykernel)
from Dabade16 import deltaC_dabade16, calculate_eccentricity from Einarsson15 import deltaC_einarsson15, load_betas, Einarsson_interface, fit_C import numpy as np import matplotlib.pyplot as plt

Parameters

#aspect ratio r=0.56 #Reynolds number Rep=0.1 #Initial condition IC = np.array([0.0,0.9,0.1]) IC = IC / np.linalg.norm(IC) #time-line time = np.linspace(0,500.0,500000) #shear-rate gammadot=3.1

Theory of Dabade et al., 2016

###calculate the theory of dabade dabade16 = deltaC_dabade16(r=r) e0 = calculate_eccentricity(r) ###scaling factor for the oblate ellipsoid ftr = e0**2

# Theory of Einarsson et al., 2015

einarsson15 = deltaC_einarsson15(r=r,Rep=Rep,dir='',IC=IC,time=time,gammadot=gammadot)
/Users/davide/Downloads/Joint_paper_figures/jupyter_notebook_submission/figure_5/Einarsson15.py:89: RuntimeWarning: invalid value encountered in arccos theta = np.arccos(n3[orbit_inds])
plt.figure(figsize=(7,4)) ###plot the theory of Einarsson C = einarsson15[0,1:-1] dC = einarsson15[0,2:] - einarsson15[0,:-2] plt.plot(C/(C+1),dC/(C**2+1)/Rep*ftr,label=r'$Einarsson \ et \ al.,\ 2015$',c='red',ls='--') ###plot the theory of Dabade C = dabade16[:,0] dC = dabade16[:,1]+dabade16[:,2] plt.plot(C/(C+1),dC/(C**2+1)*ftr,label=r'$Dabade \ et \ al.,\ 2016$',c='k',ls=':') plt.legend(); plt.xlim(0,1); plt.axhline(0.0,c='grey',alpha=0.3); plt.ylabel(r'$\Delta C/(C^2+1)\times Re_p^{-1} \times {\xi_0}^2$',fontsize=15); plt.xlabel(r'$C/(C+1)$',fontsize=15,labelpad=0.5); plt.savefig('ELL06_compare_einarsson_dabade_theories.png',format='png',dpi=300, bbox_inches='tight');
Image in a Jupyter notebook