Changeset 3425
- Timestamp:
- Jul 26, 2006, 5:32:15 PM (18 years ago)
- Location:
- development/pyvolution-1d
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
development/pyvolution-1d/analytic_dam.py
r3424 r3425 75 75 #u2 = S2 - g*h0/(4*S2)*(1+sqrt(1+8*S2*S2/(g*h0))) 76 76 77 78 79 77 h2=h0/(1.0-u2/z) 80 81 print z,h2,u282 78 x3=(u2-c2)*t 83 79 x2=z*t -
development/pyvolution-1d/dam.py
r3424 r3425 63 63 g = Gnuplot.Gnuplot() 64 64 g.title(title) 65 g('set data style linespoints')65 g('set style data lines') 66 66 g.xlabel('x') 67 67 g.ylabel('y') … … 73 73 plot2 = Gnuplot.PlotItems.Data(x2.flat,y2.flat, with="lines 3") 74 74 g.plot(plot1,plot2) 75 #g.plot(Gnuplot.PlotItems.Data(x1.flat,y1.flat),with="lines points")75 #g.plot(Gnuplot.PlotItems.Data(x1.flat,y1.flat),with="lines") 76 76 #g.plot(Gnuplot.PlotItems.Data(x2.flat,y2.flat), with="lines") 77 77 … … 81 81 82 82 L = 2000.0 # Length of channel (m) 83 N = 400 # Number of compuational cells83 N = 100 # Number of compuational cells 84 84 cell_len = L/N # Origin = 0.0 85 85 … … 103 103 104 104 domain.default_order = 2 105 domain.cfl = 0.8106 #domain.beta = 0.0 105 domain.cfl = 1.0 106 domain.beta = 0.85 107 107 print "domain.order", domain.default_order 108 108 … … 130 130 finaltime = 50.0 131 131 132 print domain.neighbour_vertices133 134 132 for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime): 135 133 domain.write_time() 136 134 if t > 0.0: 137 135 StageQ = domain.quantities['stage'].vertex_values 136 MomentumQ = domain.quantities['xmomentum'].vertex_values 137 Velocity = MomentumQ/StageQ 138 138 y , my = analytical_sol(X.flat,domain.time) 139 139 linePlot(plot1,X,StageQ,X,y) 140 MomentumQ = domain.quantities['xmomentum'].vertex_values141 142 Velocity = MomentumQ/StageQ143 140 linePlot(plot2,X,MomentumQ,X,my) 144 141 linePlot(plot3,X,Velocity,X,my/y) … … 164 161 #f.close 165 162 163 #del plot1, plot2,plot3 -
development/pyvolution-1d/domain.py
r3335 r3425 823 823 elif self.order == 2: 824 824 Q.extrapolate_second_order() 825 Q.limit()825 #Q.limit() 826 826 else: 827 827 raise 'Unknown order' -
development/pyvolution-1d/quantity.py
r3424 r3425 572 572 #G[k] = (d1+d2)*0.5 573 573 #G[k] = (d1*(x2-x1) - d2*(x0-x1))/(x2-x0) 574 G[k] = xmic( 0.9, d1, d2 )574 G[k] = xmic( self.domain.beta, d1, d2 ) 575 575 576 576 -
development/pyvolution-1d/shallow_water_1d.py
r3424 r3425 63 63 64 64 #forcing terms not included in 1d domain ?WHy? 65 self #.forcing_terms.append(gravity)66 #self.forcing_terms.append(manning_friction)65 self.forcing_terms.append(gravity) 66 self.forcing_terms.append(manning_friction) 67 67 #print "\nI have Removed forcing terms line 64 1dsw" 68 68
Note: See TracChangeset
for help on using the changeset viewer.