Ignore:
Timestamp:
Dec 22, 2004, 2:58:16 PM (20 years ago)
Author:
duncan
Message:

adding regional modifiers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/examples/run_tsh.py

    r514 r718  
    1818
    1919from shallow_water import Domain, Reflective_boundary, Dirichlet_boundary,\
    20      Transmissive_boundary, Time_boundary, Constant_height, Weir
    21 
     20     Transmissive_boundary, Time_boundary, Set_region, Add_value_to_region
    2221from mesh_factory import rectangular
    2322from pmesh2domain import pmesh_to_domain, pmesh_to_domain_instance
     
    8079    #
    8180    print 'Boundaries'
    82     Br = Reflective_boundary(domain)
     81    reflective = Reflective_boundary(domain)
    8382    Bt = Transmissive_boundary(domain)
    8483
    8584    #Constant inflow
    86     Bd = Dirichlet_boundary(array([inflow_stage, 0.0, 0.0]))
     85    Bd = Dirichlet_boundary(array([7, 0.0, 0.0]))
    8786
    8887    #Time dependent inflow
     
    105104    tags['internal'] = None
    106105    tags['levee'] = None
    107     tags['0'] = Br
    108     tags['wall'] = Br
    109     tags['external'] = Br
    110     tags['open'] = Bd
     106    tags['0'] = reflective
     107    tags['wall'] = reflective
     108    tags['external'] = reflective
     109    tags['open'] = Bd 
     110    tags['opening'] = None
    111111
    112112    domain.set_boundary(tags)
    113113
    114 
     114    # region tags
     115    #domain.set_region(Set_region('mound', 'elevation', 100, location='unique vertices'))
     116    domain.set_region(Add_value_to_region('mound', 'elevation', 100, location='unique vertices', initial_quantity='elevation'))
     117    domain.set_region(Add_value_to_region('reservoir', 'level', 100.0,initial_quantity='elevation'))
     118   
    115119    #print domain.quantities['elevation'].vertex_values
    116120    #print domain.quantities['level'].vertex_values
Note: See TracChangeset for help on using the changeset viewer.