• R/O
  • SSH

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision4adefb72974a84f21d707e200bff7d97c97b6c7c (tree)
Zeit2007-07-04 19:12:13
Autoriselllo
Commiteriselllo

Log Message

I added the code correlations_deposition.py which calculates the
deposition velocity in a cylinder using different correlations and plots
them together.

Ändern Zusammenfassung

Diff

diff -r 9d7126879836 -r 4adefb72974a Python-codes/correlations_deposition.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Python-codes/correlations_deposition.py Wed Jul 04 10:12:13 2007 +0000
@@ -0,0 +1,105 @@
1+#! /usr/bin/env python
2+from scipy import *
3+import pylab # used to read the .csv file
4+
5+nu_air=2.1e-5
6+Re=linspace(3000.,30000.,100)
7+Diff=2.e-10 # in the range 1e-6-->1e-11
8+R=0.05
9+
10+def corr_vouitsis(nu_air,Diff,Re):
11+ Sc=nu_air/Diff # definition of Schmidt number
12+ f=0.0791*Re**(-0.25)
13+ #Now I use a correlation to calculate the Sherwood number
14+ Sh=0.042*Re*f**0.5*Sc**(1./3.) #
15+ V_d=Sh*Diff/(2.*R) # sh=Sherwood number; R= tube radius
16+ return V_d
17+
18+v_dep_vouitsis=corr_vouitsis(nu_air,Diff,Re)
19+
20+def corr_housiadas(nu_air,Diff,Re):
21+ Sc=nu_air/Diff # definition of Schmidt number
22+ U=Re*nu_air/(2.*R)
23+ print 'U is', U
24+ f=0.0791*Re**(-0.25)
25+ #Sh=0.042*Re*f**0.5*Sc**(1./3.)
26+ u_star=U*sqrt(f/2.)
27+ V_d=u_star*0.2*Sc**(-2./3.)*Re**(-1./8.)
28+ return V_d
29+
30+def corr_housiadas_gliniesky(nu_air,Diff,Re):
31+ Sc=nu_air/Diff # definition of Schmidt number
32+ U=Re*nu_air/(2.*R)
33+ print 'U is', U
34+ factor=(1./(((8./Re)**10.+(Re/36500.)**20.))**0.5+(2.21*log(Re/7.))**10.)**(1./5.)
35+ f=2./factor
36+ #f=0.0791*Re**(-0.25)
37+ #Sh=0.042*Re*f**0.5*Sc**(1./3.)
38+ u_star=U*sqrt(f/2.)
39+ V_d=u_star*0.2*Sc**(-2./3.)*Re**(-1./8.)
40+ return V_d
41+
42+def corr_vouitsis_gliniesky(nu_air,Diff,Re):
43+ Sc=nu_air/Diff # definition of Schmidt number
44+ #f=0.0791*Re**(-0.25)
45+ factor=(1./(((8./Re)**10.+(Re/36500.)**20.))**0.5+(2.21*log(Re/7.))**10.)**(1./5.)
46+ f=2./factor
47+ #Now I use a correlation to calculate the Sherwood number
48+ Sh=0.042*Re*f**0.5*Sc**(1./3.) #
49+ V_d=Sh*Diff/(2.*R) # sh=Sherwood number; R= tube radius
50+ return V_d
51+
52+
53+v_dep_housiadas=corr_housiadas(nu_air,Diff,Re)
54+
55+pylab.plot(Re,v_dep_vouitsis,Re,v_dep_housiadas)
56+pylab.xlabel('Reynolds number')
57+pylab.ylabel('Deposition velocity')
58+pylab.legend(('voutsis','housiadas'))
59+pylab.title('V_dep')
60+pylab.grid(True)
61+pylab.savefig('v_dep_comparison')
62+
63+pylab.hold(False)
64+
65+print 'max_vouitsis,max_housiadas,max_diff', max(v_dep_vouitsis),max(v_dep_housiadas),\
66+max(abs(v_dep_housiadas-v_dep_vouitsis))
67+
68+
69+v_dep_housiadas_gli=corr_housiadas_gliniesky(nu_air,Diff,Re)
70+v_dep_vouitsis_gli=corr_vouitsis_gliniesky(nu_air,Diff,Re)
71+
72+pylab.plot(Re,v_dep_vouitsis_gli,Re,v_dep_housiadas_gli)
73+pylab.xlabel('Reynolds number')
74+pylab.ylabel('Deposition velocity')
75+pylab.legend(('voutsis gliniesky','housiadas gliniesky'))
76+pylab.title('V_dep')
77+pylab.grid(True)
78+pylab.savefig('v_dep_comparison_gliniesky')
79+
80+pylab.hold(False)
81+
82+
83+pylab.plot(Re,v_dep_housiadas,Re,v_dep_housiadas_gli)
84+pylab.xlabel('Reynolds number')
85+pylab.ylabel('Deposition velocity')
86+pylab.legend(('housiadas no Gliniesky','housiadas Gliniesky'))
87+pylab.title('V_dep')
88+pylab.grid(True)
89+pylab.savefig('v_dep_comparison_housiadas')
90+
91+pylab.hold(False)
92+
93+
94+pylab.plot(Re,v_dep_vouitsis,Re,v_dep_vouitsis_gli)
95+pylab.xlabel('Reynolds number')
96+pylab.ylabel('Deposition velocity')
97+pylab.legend(('vouitsis no Gliniesky','vouitsis Gliniesky'))
98+pylab.title('V_dep')
99+pylab.grid(True)
100+pylab.savefig('v_dep_comparison_vouitsis')
101+
102+pylab.hold(False)
103+
104+
105+print 'So far so good'
\ No newline at end of file