Changeset 9118
- Timestamp:
- May 19, 2014, 9:21:40 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/shallow_water/swDE1_domain_ext.c
r9107 r9118 280 280 281 281 minhd=min(h_left, h_right); 282 maxhd=max(h_left, h_right);282 maxhd=max(h_left, h_right); 283 283 // 'Raw' weir discharge = weirScale*2/3*H*(2/3*g*H)**0.5 284 284 rw=weirScale*2./3.*maxhd*sqrt(2./3.*g*maxhd); … … 480 480 // riverwall_elevation + riverwall_rowIndex 481 481 RiverWall_count+=1; 482 // Since there is a wall, use first order extrapolation for this edge483 // This also makes more sense from the viewpoint of weir relations484 ql[0]=stage_centroid_values[k];485 ql[1]=xmom_centroid_values[k];486 ql[2]=ymom_centroid_values[k];487 hle=hc;488 zl=zc;489 if(n>=0){490 qr[0]=stage_centroid_values[n];491 qr[1]=xmom_centroid_values[n];492 qr[2]=ymom_centroid_values[n];493 hre=hc_n;494 zr = zc_n;495 }496 482 497 483 // Set central bed to riverwall elevation 498 484 z_half=max(riverwall_elevation[RiverWall_count-1], max(zl, zr)) ; 485 486 if(min(ql[0], qr[0]) < z_half){ 487 // Since there is a wall blocking the flow connection, use first order extrapolation for this edge 488 ql[0]=stage_centroid_values[k]; 489 ql[1]=xmom_centroid_values[k]; 490 ql[2]=ymom_centroid_values[k]; 491 hle=hc; 492 zl=zc; 493 494 if(n>=0){ 495 qr[0]=stage_centroid_values[n]; 496 qr[1]=xmom_centroid_values[n]; 497 qr[2]=ymom_centroid_values[n]; 498 hre=hc_n; 499 zr = zc_n; 500 }else{ 501 hre=hc; 502 zr = zc; 503 } 504 // Re-set central bed to riverwall elevation 505 z_half=max(riverwall_elevation[RiverWall_count-1], max(zl, zr)) ; 506 } 507 499 508 500 509 } … … 516 525 if(edge_flux_type[ki]==1){ 517 526 //printf("%e \n", z_half); 518 weir_height=riverwall_elevation[RiverWall_count-1]-min(zl,zr); // Reference weir height 527 weir_height=max(riverwall_elevation[RiverWall_count-1]-min(zl,zr), 0.); // Reference weir height 528 //weir_height=max(z_half-max(zl,zr), 0.); // Reference weir height 519 529 520 530 // Get Qfactor index - multiply the idealised weir discharge by this constant factor
Note: See TracChangeset
for help on using the changeset viewer.