Changeset 519
- Timestamp:
- Nov 10, 2004, 5:24:16 PM (20 years ago)
- 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 963 963 ymom_update += S*v 964 964 965 966 def wind_stress(domain):967 """Apply wind stress to water momentum968 """969 970 #FIXME: Under construction971 972 #Hardwired velocity field - should be initialised as a973 #callable object974 975 u = -10000.0976 v = 10000.0977 978 Cw = 3.0e-3 #Wind stress coefficient979 rho_a = 1.2e-3 #Atmospheric density980 rho = 1023 #Density of water981 982 from math import sqrt983 984 xmom_update = domain.quantities['xmomentum'].explicit_update985 ymom_update = domain.quantities['ymomentum'].explicit_update986 987 N = domain.number_of_elements988 989 c = Cw*rho_a/rho990 S = c * sqrt(u**2 + v**2)991 992 #print 'B4:', xmom_update[10]993 994 xmom_update += S*u995 ymom_update += S*v996 997 #print 'After:', xmom_update[10]998 999 965 1000 966
Note: See TracChangeset
for help on using the changeset viewer.