Changeset 3533


Ignore:
Timestamp:
Aug 25, 2006, 4:51:49 PM (18 years ago)
Author:
duncan
Message:

Tidy up dam simulation and minimum depth

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/pyvolution/shallow_water.py

    r3532 r3533  
    142142            #self.reduction = min  #Looks better near steep slopes
    143143
     144
     145    def set_minimum_sww_depth(self, minimum_sww_depth):
     146        """
     147        Set the minimum depth that will be recognised when writing
     148        to an sww file. This is useful for removing thin water layers
     149        that seems to be caused by friction creep.
     150
     151        The minimum allowed sww depth is in meters.
     152        """
     153        self.minimum_sww_depth = minimum_sww_depth
    144154
    145155
  • development/dam_2006/project.py

    r3456 r3533  
    1515
    1616if sys.platform == 'win32':
    17     home = environ['INUNDATIONHOME']     #Sandpit's parent dir
     17    try:
     18        home = environ['INUNDATIONHOME']     #Sandpit's parent dir
     19    except:
     20        home = '.'
    1821else:   
    1922    home = getenv('INUNDATIONHOME', sep+'d'+sep+'cit'+sep+'1'+sep+'cit'+sep+'risk_assessment_methods_project'+sep+'inundation')     
    2023
     24
     25if not access(home, F_OK):
     26    home = '.'
     27   
    2128#Derive subdirectories and filenames
    2229time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
     
    2532outputtimedir = outputdir+time+sep
    2633meshdir = scenariodir+sep+'meshes'+sep
    27 datadir = scenariodir+sep+'topographies'+sep
    28 gaugedir = scenariodir+sep+'gauges'+sep
    29 polygondir = scenariodir+sep+'polygons'+sep
    30 boundarydir = scenariodir+sep+'boundaries'+sep
    31 #output dir without time
    32 outputdir = scenariodir+sep+'output'+sep
    33 tidedir = scenariodir+sep+'tide_data'+sep
    3434
    35 gauge_filename = gaugedir + 'gauge_location_dam.xya'
    36 #buildings_filename = gaugedir + 'onslow_res.csv'
    37 #community_filename = gaugedir + 'CHINS_v2.csv'
    38 #community_scenario = gaugedir + 'community_onslow.csv'
    39 #gaugetimeseries = gaugedir + 'onslow'
    4035depth_filename = outputtimedir + "depth.csv"
    4136velocity_x_filename = outputtimedir + "velocity_x.csv"
     
    5651    mkdir (outputtimedir)
    5752
    58 if not access(gaugedir,F_OK):
    59     mkdir (gaugedir)
    60 
    61 # boundary source data
    62 #MOST_dir = 'f:'+sep+'3'+sep+'ehn'+sep+'users'+sep+'davidb'+sep+'tsunami'+sep+'WA_project'+sep+'SU-AU_90'+sep+'most_2'+sep+'detailed'+sep
    63 
    6453codedir = getcwd()+sep
    6554                               
  • development/dam_2006/run_dam.py

    r3514 r3533  
    1 """Script for running a tsunami inundation scenario for Onslow, WA, Australia.
     1"""Script for running a dam break simulation of UQ's dam break tank.
    22
    3 Source data such as elevation and boundary data is assumed to be available in
    4 directories specified by project.py
    5 The output sww file is stored in project.outputtimedir
    63
    7 The scenario is defined by a triangular mesh created from project.polygon,
    8 the elevation data and a simulated submarine landslide.
    9 
    10 Ole Nielsen and Duncan Gray, GA - 2005 and Nick Bartzis, GA - 2006
     4Ole Nielsen and Duncan Gray, GA - 2006
    115"""
    126
     
    2014import sys
    2115from shutil import copy
    22 from os import mkdir, access, F_OK, path
     16from os import path
    2317
    2418# Related major packages
     
    7266    print domain.statistics()
    7367
     68   
    7469    domain.set_name(project.basename)
    7570    domain.set_datadir(project.outputtimedir)
    7671    domain.set_quantities_to_be_stored(['stage', 'xmomentum', 'ymomentum'])
     72    domain.set_minimum_sww_depth(0.01)
    7773
    7874    #-------------------------------------------------------------------------
     
    8076    #-------------------------------------------------------------------------
    8177
    82     tide = 0.0
    8378    slope = 0.05
    8479
  • documentation/user_manual/anuga_user_manual.tex

    r3499 r3533  
    13881388    been run, returns the value \code{default\_datadir} specified in
    13891389    \code{config.py}.
     1390\end{methoddesc}
     1391
     1392\begin{methoddesc} {set\_minimum_sww_depth}{time=0.0}
     1393    Module: \module{pyvolution.domain}
     1394
     1395    Sets the minimum depth that will be recognised when writing
     1396        to an sww file. This is useful for removing thin water layers
     1397        that seems to be caused by friction creep.
    13901398\end{methoddesc}
    13911399
Note: See TracChangeset for help on using the changeset viewer.