Changeset 7077


Ignore:
Timestamp:
May 25, 2009, 4:19:43 PM (15 years ago)
Author:
ole
Message:

Updated runcairns to use add_quantity - also made slide the default event.

Location:
anuga_core/documentation/user_manual/demos/cairns
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/documentation/user_manual/demos/cairns/project.py

    r7064 r7077  
    55
    66#------------------------------------------------------------------------------
    7 # Define scenario as either slide or fixed_wave.
     7# Define scenario as either slide or fixed_wave. Choose one.
    88#------------------------------------------------------------------------------
    9 scenario = 'fixed_wave'
    10 #scenario = 'slide'
     9#scenario = 'fixed_wave' # Huge wave applied at the boundary
     10scenario = 'slide'       # Slide wave form applied inside the domain
    1111
    1212#------------------------------------------------------------------------------
  • anuga_core/documentation/user_manual/demos/cairns/runcairns.py

    r7064 r7077  
    7070# Setup parameters of computational domain
    7171#------------------------------------------------------------------------------
    72 domain.set_name('cairns_' + project.scenario) # Name of sww file
     72domain.set_name('cairns_X' + project.scenario) # Name of sww file
    7373domain.set_datadir('.')                       # Store sww output here
    7474domain.set_minimum_storable_height(0.01)      # Store only depth > 1cm
     
    106106print 'Available boundary tags', domain.get_boundary_tags()
    107107
    108 Bd = Dirichlet_boundary([tide,0,0]) # Mean water level
     108Bd = Dirichlet_boundary([tide, 0, 0]) # Mean water level
    109109Bs = Transmissive_stage_zero_momentum_boundary(domain) # Neutral boundary
    110110
     
    135135
    136136if project.scenario == 'slide':
     137    # Initial run without any event
    137138    for t in domain.evolve(yieldstep=10, finaltime=60):
    138139        print domain.timestepping_statistics()
    139140        print domain.boundary_statistics(tags='ocean_east')       
    140141       
    141     # Add slide
    142     thisstagestep = domain.get_quantity('stage')
     142    # Add slide to water surface
    143143    if allclose(t, 60):
    144         slide = Quantity(domain)
    145         slide.set_values(tsunami_source)
    146         domain.set_quantity('stage', slide + thisstagestep)
     144        domain.add_quantity('stage', tsunami_source)   
    147145
     146    # Continue propagating wave
    148147    for t in domain.evolve(yieldstep=10, finaltime=5000,
    149148                           skip_initial_step = True):
Note: See TracChangeset for help on using the changeset viewer.