Ignore:
Timestamp:
Nov 11, 2004, 4:19:47 PM (20 years ago)
Author:
ole
Message:
 
Location:
inundation/ga/storm_surge
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/shallow_water.py

    r519 r522  
    4343
    4444        #Stored output
    45         self.store=False
     45        self.store = False
    4646        self.format = 'sww'   
    4747        self.smooth = True
     
    144144        """Specialisation of basic evolve method from parent class
    145145        """
     146
     147        #Call check integrity here rather than from user scripts
     148        self.check_integrity()
    146149       
    147150        #Initialise real time viz if requested
  • inundation/ga/storm_surge/pyvolution/wind_example.py

    r519 r522  
    11"""Example of shallow water wave equation.
    22
    3 Flat bed with wind stress
    4 
     3Flat bed with constant wind stress
    54"""
    65
    76######################
    87# Module imports
    9 #
    108from mesh_factory import rectangular
    11 from shallow_water import Domain, Reflective_boundary, Dirichlet_boundary,\
    12      Transmissive_boundary, Constant_height, Wind_stress
    13 from Numeric import array
     9from shallow_water import Domain, Reflective_boundary, Constant_height, Wind_stress
    1410
    15 #Create basic mesh
    16 N = 80
    17 len1 = 100
    18 len2 = 100
    19 points, vertices, boundary = rectangular(N, N, len1, len2)
     11#Create basic mesh (100m x 100m)
     12N = 80     
     13len = 100
     14points, vertices, boundary = rectangular(N, N, len, len)
    2015
    2116#Create shallow water domain
    2217domain = Domain(points, vertices, boundary)
    23 domain.smooth = True
    24 domain.visualise = False
    25 domain.store = True
    26 domain.default_order=2
     18domain.default_order = 2
    2719domain.set_name('wind_laminar')
    2820
    2921#Set initial conditions
     22domain.set_quantity('elevation', 0.0)
     23domain.set_quantity('level', 1.0)
     24domain.set_quantity('friction', 0.0)
    3025
    31 depth = 1
    32 
    33 def x_slope(x, y):
    34     return 0*x/10
    35 
    36 domain.set_quantity('elevation', x_slope)
    37 domain.set_quantity('level', Constant_height(x_slope, depth))
    38 
    39 #Set driving forces
    40 manning = 0.0
    41 domain.set_quantity('friction', manning)
    42 
    43 
    44 #Constant windfield implemented using functions
    45 domain.forcing_terms.append(Wind_stress(9000, 120))
    46 
     26#Constant (quite extreme :-) windfield: 9000 m/s, bearing 120 degrees
     27domain.forcing_terms.append( Wind_stress(s=9000, phi=120) )
    4728
    4829######################
    4930# Boundary conditions
    5031Br = Reflective_boundary(domain)
    51 Bd = Dirichlet_boundary([depth, 0, 0])
    52 
    5332domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br})
    54 #domain.set_boundary({'left': Bd, 'right': Bd, 'top': Bd, 'bottom': Bd})
    55 #domain.set_boundary({'left': Br, 'right': Bd, 'top': Bd, 'bottom': Bd})
    56 domain.check_integrity()
    57 
    5833
    5934######################
  • inundation/ga/storm_surge/pyvolution/wind_example_rot.py

    r519 r522  
    11"""Example of shallow water wave equation.
    22
    3 Flat bed with wind stress
     3Flat bed with rotational wind stress
    44
    55"""
     
    99#
    1010from mesh_factory import rectangular
    11 from shallow_water import Domain, Reflective_boundary, Dirichlet_boundary,\
    12      Transmissive_boundary, Constant_height, Wind_stress
    13 from Numeric import array
     11from shallow_water import Domain, Reflective_boundary, Wind_stress
    1412
    1513#Create basic mesh
    1614N = 80
    17 len1 = 100
    18 len2 = 100
    19 points, vertices, boundary = rectangular(N, N, len1, len2)
     15len = 100
     16points, vertices, boundary = rectangular(N, N, len, len)
    2017
    2118#Create shallow water domain
     
    2825
    2926#Set initial conditions
     27domain.set_quantity('elevation', 0.0)
     28domain.set_quantity('level', 2.0)
     29domain.set_quantity('friction', 0.0)
    3030
    31 depth = 2
    32 
    33 def x_slope(x, y):
    34     return 0*x/10
    35 
    36 domain.set_quantity('elevation', x_slope)
    37 domain.set_quantity('level', Constant_height(x_slope, depth))
    38 
    39 #Set driving forces
    40 manning = 0.0
    41 domain.set_quantity('friction', manning)
    42 
    43 
    44 
    45 #Constant windfield implemented using functions
    46 #domain.forcing_terms.append(Wind_stress(5000, 30))
    47 
    48 #Constant windfield implemented using (lambda) functions
    49 #domain.forcing_terms.append(Wind_stress(lambda x,y,t: 5000, lambda x,y,t: 30))
    5031
    5132#Variable windfield implemented using functions
     
    9778domain.forcing_terms.append(Wind_stress(speed, phi))
    9879
     80
    9981#Add lateral wind gusts bearing 25 deg
    10082def gust(x,y,t):
     
    11496# Boundary conditions
    11597Br = Reflective_boundary(domain)
    116 Bd = Dirichlet_boundary([depth, 0, 0])
    117 
    11898domain.set_boundary({'left': Br, 'right': Br, 'top': Br, 'bottom': Br})
    119 #domain.set_boundary({'left': Bd, 'right': Bd, 'top': Bd, 'bottom': Bd})
    120 #domain.set_boundary({'left': Br, 'right': Bd, 'top': Bd, 'bottom': Bd})
    121 domain.check_integrity()
    122 
    12399
    124100######################
  • inundation/ga/storm_surge/validation/run_merimbula.py

    r520 r522  
    2424
    2525domain.default_order = 1
    26 domain.store = True         #Store for visualisation purposes
    27 domain.format = 'sww'       #Native netcdf visualisation format
    2826domain.filename = filename
    2927
Note: See TracChangeset for help on using the changeset viewer.