Changeset 519


Ignore:
Timestamp:
Nov 10, 2004, 5:24:16 PM (20 years ago)
Author:
ole
Message:

Committed wind field with examples.
This may need a C-implementation for speed.

Location:
inundation/ga/storm_surge/pyvolution
Files:
2 added
1 edited

Legend:

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

    r518 r519  
    963963            ymom_update += S*v       
    964964       
    965        
    966 def wind_stress(domain):
    967     """Apply wind stress to water momentum
    968     """
    969 
    970     #FIXME: Under construction
    971 
    972     #Hardwired velocity field - should be initialised as a
    973     #callable object
    974 
    975     u = -10000.0
    976     v =  10000.0
    977 
    978     Cw = 3.0e-3 #Wind stress coefficient
    979     rho_a = 1.2e-3 #Atmospheric density
    980     rho = 1023 #Density of water
    981    
    982     from math import sqrt
    983 
    984     xmom_update = domain.quantities['xmomentum'].explicit_update
    985     ymom_update = domain.quantities['ymomentum'].explicit_update   
    986    
    987     N = domain.number_of_elements
    988 
    989     c = Cw*rho_a/rho
    990     S = c * sqrt(u**2 + v**2)
    991 
    992     #print 'B4:', xmom_update[10]
    993    
    994     xmom_update += S*u
    995     ymom_update += S*v
    996 
    997     #print 'After:', xmom_update[10]   
    998 
    999965       
    1000966
Note: See TracChangeset for help on using the changeset viewer.