Changeset 3789
- Timestamp:
- Oct 16, 2006, 2:25:22 PM (18 years ago)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r3703 r3789 189 189 """ 190 190 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 192 202 193 203 -
anuga_core/source/anuga/shallow_water/shallow_water_ext.c
r3730 r3789 535 535 //FIXME (Ole): This is only implemented in this C extension and 536 536 // has no Python equivalent 537 537 538 if (hc <= 0.0) { 538 539 wc[k] = zc[k]; 539 540 540 xmomc[k] = 0.0; 541 ymomc[k] = 0.0; 541 542 } else { 542 543 //Reduce excessive speeds derived from division by small hc 543 544 544 545 u = xmomc[k]/hc; 545 546 547 548 549 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 } 551 552 552 553 v = ymomc[k]/hc; 553 554 555 556 557 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 } 559 560 } 560 561 } -
anuga_validation/okushiri_2005/run_okushiri.py
r3786 r3789 39 39 domain = Domain(points, vertices, boundary) 40 40 41 domain.set_name('okushiri_as2005 ')41 domain.set_name('okushiri_as2005_with_mxspd=0') 42 42 domain.set_default_order(2) 43 43 domain.set_minimum_storable_height(0.001) 44 domain.set_maximum_allowed_speed(0) # The default in August 2005 44 45 45 46
Note: See TracChangeset
for help on using the changeset viewer.