Changeset 3789


Ignore:
Timestamp:
Oct 16, 2006, 2:25:22 PM (17 years ago)
Author:
ole
Message:

Added set_maxmum_allowed_speed to zero to simulate behaviour of ANUGA as it was in August 2005. This provides the exact same look and feel as was the case when we first did the Okushiri validation.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/shallow_water_domain.py

    r3703 r3789  
    189189        """
    190190        self.minimum_storable_height = minimum_storable_height
    191 
     191       
     192
     193    def set_maximum_allowed_speed(self, maximum_allowed_speed):
     194        """
     195        Set the maximum particle speed that is allowed in water
     196        shallower than minimum_allowed_height. This is useful for
     197        controlling speeds in very thin layers of water and at the same time
     198        allow some movement avoiding pooling of water.
     199
     200        """
     201        self.maximum_allowed_speed = maximum_allowed_speed
    192202
    193203
  • anuga_core/source/anuga/shallow_water/shallow_water_ext.c

    r3730 r3789  
    535535      //FIXME (Ole): This is only implemented in this C extension and
    536536      //             has no Python equivalent
     537           
    537538      if (hc <= 0.0) {
    538539        wc[k] = zc[k];
    539                 xmomc[k] = 0.0;
    540                 ymomc[k] = 0.0;
     540        xmomc[k] = 0.0;
     541        ymomc[k] = 0.0;
    541542      } else {
    542543        //Reduce excessive speeds derived from division by small hc
    543544       
    544545        u = xmomc[k]/hc;
    545                 if (fabs(u) > maximum_allowed_speed) {
    546                         reduced_speed = maximum_allowed_speed * u/fabs(u);
    547                         //printf("Speed (u) has been reduced from %.3f to %.3f\n",
    548                         //       u, reduced_speed);
    549                         xmomc[k] = reduced_speed * hc;
    550                 }
     546        if (fabs(u) > maximum_allowed_speed) {
     547          reduced_speed = maximum_allowed_speed * u/fabs(u);
     548          //printf("Speed (u) has been reduced from %.3f to %.3f\n",
     549          //     u, reduced_speed);
     550          xmomc[k] = reduced_speed * hc;
     551        }
    551552
    552553        v = ymomc[k]/hc;
    553                 if (fabs(v) > maximum_allowed_speed) {
    554                         reduced_speed = maximum_allowed_speed * v/fabs(v);
    555                         //printf("Speed (v) has been reduced from %.3f to %.3f\n",
    556                         //       v, reduced_speed);
    557                         ymomc[k] = reduced_speed * hc;
    558                 }
     554        if (fabs(v) > maximum_allowed_speed) {
     555          reduced_speed = maximum_allowed_speed * v/fabs(v);
     556          //printf("Speed (v) has been reduced from %.3f to %.3f\n",
     557          //     v, reduced_speed);
     558          ymomc[k] = reduced_speed * hc;
     559        }
    559560      }
    560561    }
  • anuga_validation/okushiri_2005/run_okushiri.py

    r3786 r3789  
    3939    domain = Domain(points, vertices, boundary)
    4040
    41 domain.set_name('okushiri_as2005')
     41domain.set_name('okushiri_as2005_with_mxspd=0')
    4242domain.set_default_order(2)
    4343domain.set_minimum_storable_height(0.001)
     44domain.set_maximum_allowed_speed(0) # The default in August 2005
    4445
    4546
Note: See TracChangeset for help on using the changeset viewer.