Changeset 3425


Ignore:
Timestamp:
Jul 26, 2006, 5:32:15 PM (18 years ago)
Author:
steve
Message:
 
Location:
development/pyvolution-1d
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • development/pyvolution-1d/analytic_dam.py

    r3424 r3425  
    7575        #u2 = S2 - g*h0/(4*S2)*(1+sqrt(1+8*S2*S2/(g*h0)))
    7676
    77 
    78 
    7977        h2=h0/(1.0-u2/z)
    80 
    81         print z,h2,u2       
    8278        x3=(u2-c2)*t
    8379        x2=z*t
  • development/pyvolution-1d/dam.py

    r3424 r3425  
    6363    g = Gnuplot.Gnuplot()
    6464    g.title(title)
    65     g('set data style linespoints')
     65    g('set style data lines')
    6666    g.xlabel('x')
    6767    g.ylabel('y')
     
    7373    plot2 = Gnuplot.PlotItems.Data(x2.flat,y2.flat, with="lines 3")
    7474    g.plot(plot1,plot2)
    75     #g.plot(Gnuplot.PlotItems.Data(x1.flat,y1.flat),with="linespoints")
     75    #g.plot(Gnuplot.PlotItems.Data(x1.flat,y1.flat),with="lines")
    7676    #g.plot(Gnuplot.PlotItems.Data(x2.flat,y2.flat), with="lines")
    7777
     
    8181
    8282L = 2000.0     # Length of channel (m)
    83 N = 400        # Number of compuational cells
     83N = 100        # Number of compuational cells
    8484cell_len = L/N # Origin = 0.0
    8585
     
    103103
    104104domain.default_order = 2
    105 domain.cfl = 0.8
    106 #domain.beta = 0.0
     105domain.cfl = 1.0
     106domain.beta = 0.85
    107107print "domain.order", domain.default_order
    108108
     
    130130finaltime = 50.0
    131131
    132 print domain.neighbour_vertices
    133 
    134132for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime):
    135133    domain.write_time()
    136134    if t > 0.0:
    137135        StageQ = domain.quantities['stage'].vertex_values
     136        MomentumQ = domain.quantities['xmomentum'].vertex_values
     137        Velocity = MomentumQ/StageQ
    138138        y , my = analytical_sol(X.flat,domain.time)
    139139        linePlot(plot1,X,StageQ,X,y)
    140         MomentumQ = domain.quantities['xmomentum'].vertex_values
    141 
    142         Velocity = MomentumQ/StageQ
    143140        linePlot(plot2,X,MomentumQ,X,my)
    144141        linePlot(plot3,X,Velocity,X,my/y)
     
    164161#f.close
    165162
     163#del plot1, plot2,plot3
  • development/pyvolution-1d/domain.py

    r3335 r3425  
    823823            elif self.order == 2:
    824824                Q.extrapolate_second_order()
    825                 Q.limit()
     825                #Q.limit()
    826826            else:
    827827                raise 'Unknown order'
  • development/pyvolution-1d/quantity.py

    r3424 r3425  
    572572                #G[k] = (d1+d2)*0.5
    573573                #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 )
    575575       
    576576
  • development/pyvolution-1d/shallow_water_1d.py

    r3424 r3425  
    6363
    6464        #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)
    6767        #print "\nI have Removed forcing terms line 64 1dsw"
    6868
Note: See TracChangeset for help on using the changeset viewer.