Changeset 558


Ignore:
Timestamp:
Nov 16, 2004, 3:04:04 PM (20 years ago)
Author:
ole
Message:

Added linear friction to Sampson examples

Location:
inundation/ga/storm_surge
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/analytical solutions/Analytical_solution_Sampson_import_mesh.py

    r555 r558  
    2626from math import sqrt, cos, sin, pi, exp
    2727from mesh_factory import strang_mesh
     28from quantity import Quantity
    2829
    2930
     
    3940domain.default_order = 2
    4041domain.smooth = True
     42
     43domain.quantities['linear_friction'] = Quantity(domain)
     44domain.set_quantity('friction', 0.0)
     45#del domain.quantities['friction']
     46
    4147
    4248# Provide file name for storing output
     
    7985
    8086domain.set_quantity('elevation', x_slope)
     87domain.set_quantity('linear_friction', tau)
     88
    8189
    8290#Set the water level
  • inundation/ga/storm_surge/pyvolution/shallow_water.py

    r557 r558  
    877877    uh = domain.quantities['xmomentum'].centroid_values
    878878    vh = domain.quantities['ymomentum'].centroid_values
    879     eta = domain.quantities['linear_friction'].centroid_values   
     879    tau = domain.quantities['linear_friction'].centroid_values   
    880880   
    881881    xmom_update = domain.quantities['xmomentum'].semi_implicit_update
     
    886886   
    887887    for k in range(N):
    888         if eta[k] >= eps:
     888        if tau[k] >= eps:
    889889            if h[k] >= eps:
    890                 S = -eta[k]/h[k]
     890                S = -tau[k]/h[k]
    891891
    892892                #Update momentum
Note: See TracChangeset for help on using the changeset viewer.