Ignore:
Timestamp:
Mar 11, 2008, 8:43:22 PM (17 years ago)
Author:
steve
Message:

Updated some methods for quantity. Looks like we can use old
limiting system with larger values of beta.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/analytical_solutions/oblique_shock.py

    r5030 r5162  
    2929
    3030
    31 from shallow_water import Domain, Constant_height
    32 from shallow_water import Transmissive_boundary, Reflective_boundary,\
     31from anuga.shallow_water import Domain
     32from anuga.shallow_water import Transmissive_boundary, Reflective_boundary,\
    3333     Dirichlet_boundary
    34 
     34from anuga.visualiser import RealtimeVisualiser
    3535from math import sqrt, cos, sin, pi
    36 from mesh_factory import oblique
     36from mesh_factory import oblique_cross
    3737
    3838
     
    4444leny = 30.
    4545lenx = 40.
    46 n = 50
    47 m = 60
     46n = 100
     47m = 120
    4848
    49 points, elements, boundary = oblique(m, n, lenx, leny)
     49points, elements, boundary = oblique_cross(m, n, lenx, leny)
    5050domain = Domain(points, elements, boundary)
    5151
     
    5454
    5555# Store output
    56 domain.store=True
     56#domain.store=True
    5757
    5858# Output format
    59 domain.format="sww" #NET.CDF binary format
     59#domain.format="sww" #NET.CDF binary format
    6060                    # "dat" for ASCII
    6161
     
    8787#Initial condition
    8888h = 0.5
    89 domain.set_quantity('stage', Constant_height(x_slope, h) )
     89domain.set_quantity('stage', expression = 'elevation + %d'%h )
    9090
     91#---------------------------------
     92# Setup visualization
     93#---------------------------------
     94vis = RealtimeVisualiser(domain)
     95vis.render_quantity_height("elevation", dynamic=False)
     96vis.render_quantity_height("stage", zScale=10, dynamic=True)
     97vis.colour_height_quantity('stage', (0.75, 0.5, 0.5))
     98vis.start()
    9199
    92100######################
     
    96104for t in domain.evolve(yieldstep = 0.5, finaltime = 50):
    97105    domain.write_time()
     106    vis.update()
    98107
    99108print 'That took %.2f seconds' %(time.time()-t0)
     109
     110
     111vis.evolveFinished()
     112vis.join()
    100113
    101114#FIXME: Compute average water depth on either side of shock and compare
Note: See TracChangeset for help on using the changeset viewer.