Changeset 9008


Ignore:
Timestamp:
Oct 18, 2013, 5:37:29 PM (11 years ago)
Author:
davies
Message:

More work on dev_audusse

Location:
trunk/anuga_work/development/gareth
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_work/development/gareth/experimental/bal_and/swb2_domain.py

    r9007 r9008  
    7676
    7777        self.beta_w=1.0
    78         self.beta_w_dry=1.0
     78        self.beta_w_dry=0.0
    7979        self.beta_uh=1.0
    8080        self.beta_uh_dry=0.0
  • trunk/anuga_work/development/gareth/experimental/bal_and/swb2_domain_ext.c

    r9007 r9008  
    945945   
    946946    // Try some Froude-number limiting in shallow depths
    947     //dpth=max(stage_centroid_values[k] - elevation_centroid_values[k], 0.0);
    948 
    949     //if(dpth<0.4){
    950     //    // momnorm = momentum^2
    951     //    momnorm=(xmom_centroid_values[k]*xmom_centroid_values[k]+
    952     //             ymom_centroid_values[k]*ymom_centroid_values[k]);
    953     //   
    954     //    // vel^2 < constant*g*dpth [-- then multiply both sides by dpth^2]
    955     //    if(momnorm > 4*9.81*dpth*dpth*dpth){
    956     //        // Down-scale momentum so that Froude number < constant
    957     //        tmp=sqrt((4*9.81*dpth*dpth*dpth)/momnorm);
    958     //        xmom_centroid_values[k] *=tmp;
    959     //        ymom_centroid_values[k] *=tmp;
    960     //    }
    961     //}
     947    dpth=max(stage_centroid_values[k] - elevation_centroid_values[k], 0.0);
     948
     949    if(dpth<0.1){
     950        // momnorm = momentum^2
     951        momnorm=(xmom_centroid_values[k]*xmom_centroid_values[k]+
     952                 ymom_centroid_values[k]*ymom_centroid_values[k]);
     953       
     954        // vel^2 < constant*g*dpth [-- then multiply both sides by dpth^2]
     955        if(momnorm > 4*9.81*dpth*dpth*dpth){
     956            // Down-scale momentum so that Froude number < constant
     957            tmp=sqrt((4*9.81*dpth*dpth*dpth)/momnorm);
     958            xmom_centroid_values[k] *=tmp;
     959            ymom_centroid_values[k] *=tmp;
     960        }
     961    }
    962962  }
    963963
     
    12011201          // Calculate heights of neighbouring cells
    12021202          hc = stage_centroid_values[k]  - elevation_centroid_values[k];
    1203           h0 = stage_centroid_values[k] - elevation_centroid_values[k0];
    1204           h1 = stage_centroid_values[k] - elevation_centroid_values[k1];
    1205           h2 = stage_centroid_values[k] - elevation_centroid_values[k2];
     1203          h0 = stage_centroid_values[k0] - elevation_centroid_values[k0];
     1204          h1 = stage_centroid_values[k1] - elevation_centroid_values[k1];
     1205          h2 = stage_centroid_values[k2] - elevation_centroid_values[k2];
    12061206          hmin = min(min(h0, min(h1, h2)), hc);
    12071207          //// GD FIXME: No longer needed?
     
    12901290          find_qmin_and_qmax(dq0, dq1, dq2, &qmin, &qmax);
    12911291       
    1292           beta_tmp = 1.0;//beta_w_dry + (beta_w - beta_w_dry) * hfactor;
     1292          beta_tmp = beta_w_dry + (beta_w - beta_w_dry) * hfactor;
    12931293       
    12941294         
  • trunk/anuga_work/development/gareth/tests/dam_break/plotme.py

    r9007 r9008  
    1111
    1212
    13 p_dev = util2.get_output('dam_break_20131009_221446/dam_break.sww', 0.001)
     13p_dev = util2.get_output('dam_break_20131018_165002/dam_break.sww', 0.001)
    1414p2_dev=util2.get_centroids(p_dev, velocity_extrapolation=True)
    1515
  • trunk/anuga_work/development/gareth/tests/shallow_steep_slope/channel_SU_sparse.py

    r9007 r9008  
    3636#------------------------------------------------------------------------------
    3737def topography(x, y):
    38         return -x/10.  #+ 1.*(numpy.sin(x/10.) +abs(y-50.)/10.) -0.*(x>80.) # linear bed slope
     38        return -x/10.  + 1.*(numpy.sin(x/10.) +abs(y-50.)/10.) -0.*(x>80.) # linear bed slope
    3939
    4040def stagetopo(x,y):
  • trunk/anuga_work/development/gareth/tests/urban_flow/ideal_urban.py

    r8774 r9008  
    1212#from anuga.structures.inlet_operator import Inlet_operator
    1313
    14 from balanced_dev import *
    15 from balanced_dev import create_domain_from_regions as create_domain_from_regions
     14from bal_and import *
     15from bal_and import create_domain_from_regions as create_domain_from_regions
    1616#from anuga_tsunami import *
    1717#from anuga_tsunami import create_domain_from_regions as create_domain_from_regions
  • trunk/anuga_work/development/gareth/tests/urban_flow/plotme.py

    r8523 r9008  
    11### Python code to do plotting of this experiment.
    22
    3 import util
     3from bal_and import plot_utils as util
    44import numpy
    55from matplotlib import pyplot as pyplot
Note: See TracChangeset for help on using the changeset viewer.