Changeset 2649


Ignore:
Timestamp:
Apr 2, 2006, 8:07:36 PM (19 years ago)
Author:
steve
Message:
 
Location:
inundation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inundation/examples/island.py

    r2648 r2649  
    3434                                           'left': [3]},
    3535                          maximum_triangle_area = 5,
    36                           filename = 'island.msh'
    37               , interior_regions=[ ([[50,25], [70,25], [70,75], [50,75]], 3)]
     36                          filename = 'island.msh' ,
     37                          interior_regions=[ ([[50,25], [70,25], [70,75], [50,75]], 3)]
    3838                          )
    3939
     
    7878
    7979#domain.set_quantity('friction', 0.1)  #Honky dory
    80 domain.set_quantity('friction', 1000)     #Creep
     80domain.set_quantity('friction', 2)     #Creep
    8181domain.set_quantity('elevation', island)
    8282domain.set_quantity('stage', 1)
  • inundation/pyvolution/shallow_water_ext.c

    r2648 r2649  
    245245      h = w[k]-z[k];
    246246      if (h >= eps) {
    247         S = -g * eta[k]*eta[k] * sqrt((uh[k]*uh[k] + vh[k]*vh[k]));
    248         S /= pow(h, 7.0/3);      //Expensive (on Ole's home computer)
    249         //S /= exp(7.0/3.0*log(h));      //seems to save about 15% over manning_friction
    250         //S /= h*h*(1 + h/3.0 - h*h/9.0); //FIXME: Could use a Taylor expansion
    251 
    252 
    253         //Update momentum
    254         xmom[k] += S*uh[k];
    255         ymom[k] += S*vh[k];
     247        S = -g * eta[k]*eta[k] * sqrt((uh[k]*uh[k] + vh[k]*vh[k]));
     248        S /= pow(h, 7.0/3);      //Expensive (on Ole's home computer)
     249        //S /= exp(7.0/3.0*log(h));      //seems to save about 15% over manning_friction
     250        //S /= h*h*(1 + h/3.0 - h*h/9.0); //FIXME: Could use a Taylor expansion
     251
     252
     253        //Update momentum
     254        xmom[k] += S*uh[k];
     255        ymom[k] += S*vh[k];
    256256      }
    257257    }
Note: See TracChangeset for help on using the changeset viewer.