• 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

Revisionb67ef8b1139cf8f82a9891c05c19f2d13725fd19 (tree)
Zeit2007-07-26 06:38:32
Autoriselllo
Commiteriselllo

Log Message

I removed the first plot from the code plot_section.py and now the plot
of the scalar (namely the axial velocity) along a cross section is fine.

Ändern Zusammenfassung

Diff

diff -r 41bc3d2d98c1 -r b67ef8b1139c Python-codes/plot_section.py
--- a/Python-codes/plot_section.py Fri Jul 13 16:08:46 2007 +0000
+++ b/Python-codes/plot_section.py Wed Jul 25 21:38:32 2007 +0000
@@ -8,30 +8,18 @@
88 read3d=0
99
1010 if (read3d!=0):
11-
12- vel3d=pylab.load("vsection")
13- print 'the shape of vel3d is', shape(vel3d)
14- vel3d=vel3d.reshape(nt,nr,nz)
15- vel_section=vel3d[:,:,65]
16- pylab.save("vel_cross_section",vel_section)
11+ vel3d=pylab.load("vsection")
12+ print 'the shape of vel3d is', shape(vel3d)
13+ vel3d=vel3d.reshape(nt,nr,nz)
14+ vel_section=vel3d[:,:,65]
15+ pylab.save("vel_cross_section",vel_section)
1716
1817 elif (read3d==0):
19- vel_section=pylab.load("vel_cross_section")
18+ vel_section=pylab.load("vel_cross_section")
2019
2120 rg2=pylab.load("rg2.out")
2221 r=rg2[:,0]
2322
24-pylab.hold(False)
25-# the following plot is just a test to make sure I can read the cross-section file correctly
26-pylab.plot(r,vel_section[34,:])
27-
28-pylab.xlabel('Radial Coordinate')
29-pylab.ylabel('Vz')
30-pylab.title('Radial Grid')
31-pylab.grid(True)
32-pylab.savefig("test-plot")
33-pylab.hold(False)
34-#now I create a grid for the cross-section plotting
3523
3624 theta=linspace(0.,2.*pi,nt)
3725 #print "theta is ", theta
@@ -47,13 +35,20 @@
4735
4836
4937 #pylab.colorbar()
50-pylab.clf()
51-pylab.contourf(rsin_t.transpose(), rcos_t.transpose(), vel_section.transpose(),arange(0,(max(ravel(vel_section))+0.01),0.01),interpolation="bilinear",cmap=pylab.cm.jet)
38+#pylab.clf()
39+pylab.figure()
40+X = rsin_t.transpose()
41+Y = rcos_t.transpose()
42+Z = vel_section.transpose()
43+velmin = vel_section.min()
44+velmax = vel_section.max()
45+print velmin, velmax
46+levels = arange(velmin, velmax+0.01, 0.01)
47+pylab.contourf(X, Y, Z, levels, cmap=pylab.cm.jet)
5248 pylab.colorbar()
5349
5450 #pylab.show()
5551
56-pylab.savefig("velocity_on_section.png")
57-pylab.hold(False)
52+pylab.savefig("velocity_on_section_DNS.png")
53+#pylab.hold(False)
5854
59-print 'So far so good'
\ No newline at end of file