Ignore:
Timestamp:
Jul 30, 2008, 5:03:47 PM (14 years ago)
Author:
steve
Message:

Added in minimum height

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/anuga_1d/dam_h_sudi.py

    r5535 r5587  
    11import os
    22from math import sqrt
    3 from shallow_water_h import *
     3#from shallow_water_h import *
     4from shallow_water_domain import *
    45from Numeric import zeros, Float
    56from analytic_dam_sudi import AnalyticDam
     
    3132
    3233L=2000.0
    33 N=100
     34N=400
    3435
    3536cell_len=L/N
     
    4142domain=Domain(points)
    4243
    43 domain.default_order = 1
     44domain.default_order = 2
    4445domain.default_time_order = 1
    45 #domain.cfl = 1.0
    46 #domain.limiter = "minmod"
     46domain.cfl = 1.0
     47domain.limiter = "vanleer"
    4748
    4849
    4950
    50 
    51 
    52    
    53    
    5451def height(x):
    5552    y=zeros(len(x), Float)
     
    6360    return y
    6461
    65 domain.set_quantity('height', height)
     62domain.set_quantity('stage',height) #('height', height)
    6663domain.order=domain.default_order
    6764print "domain order", domain.order
     
    7875t0=time.time()
    7976yieldstep=30.0
    80 finaltime=30.0
    81 print "integral", domain.quantities['height'].get_integral()
     77finaltime=20.0
     78print "integral", domain.quantities['stage'].get_integral() #['height'].get_integral()
    8279for t in domain.evolve(yieldstep=yieldstep, finaltime=finaltime):
    8380    domain.write_time()
    84     print "integral", domain.quantities['height'].get_integral()
     81    print "integral", domain.quantities['stage'].get_integral() #['height'].get_integral()
    8582    if t>0.0:
    86         HeightQ=domain.quantities['height'].vertex_values
     83        HeightQ=domain.quantities['stage'].vertex_values #['height'].vertex_values
    8784        MomentumQ=domain.quantities['xmomentum'].vertex_values
    8885        h, uh=analytical_sol(X.flat, domain.time)
Note: See TracChangeset for help on using the changeset viewer.