Changeset 9232
- Timestamp:
- Jul 2, 2014, 10:16:31 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/shallow_water/swDE1_domain_ext.c
r9225 r9232 505 505 }else{ 506 506 // Can't divide by edgeflux 507 // FIXME: This is fluxing mass but not momentum 508 // It might be ok, but,......... 509 // it has potential be a problem in the 510 // case that there was zero edgeflux but non-zero weir flux 511 // [which can occur because the edgeflux is computed from 512 // edge quantities, whereas weir-flux is computed from 513 // centroid info]. Then if we remove mass but not momentum 514 // from the headwater, velocity gets faster. 515 // 516 // However, that situation would usually occur for a short time with a small flux, 517 // so it might never actually create a problem. 507 518 edgeflux[0] = newFlux; 508 519 edgeflux[1]*=0.; … … 576 587 double hle, hre, zc, zc_n, Qfactor, s1, s2, h1, h2; 577 588 double stage_edge_lim, outgoing_mass_edges, bedtop, bedbot, pressure_flux, hc, hc_n, tmp, tmp2; 589 double h_left_tmp, h_right_tmp; 578 590 static long call = 1; // Static local variable flagging already computed flux 579 591 double speed_max_last, vol, smooth, local_speed, weir_height; … … 657 669 z_half=max(zl,zr); 658 670 659 // Account for riverwalls671 //// Account for riverwalls 660 672 if(edge_flux_type[ki]==1){ 661 673 // Update counter of riverwall edges == index of … … 664 676 665 677 // Set central bed to riverwall elevation 666 z_half=max(riverwall_elevation[RiverWall_count-1], max(zl, zr)) ; 667 668 if(min(ql[0], qr[0]) < z_half){ 669 // Since there is a wall blocking the flow connection, use first order extrapolation for this edge 670 ql[0]=stage_centroid_values[k]; 671 ql[1]=xmom_centroid_values[k]; 672 ql[2]=ymom_centroid_values[k]; 673 hle=hc; 674 zl=zc; 675 676 if(n>=0){ 677 qr[0]=stage_centroid_values[n]; 678 qr[1]=xmom_centroid_values[n]; 679 qr[2]=ymom_centroid_values[n]; 680 hre=hc_n; 681 zr = zc_n; 682 }else{ 683 hre=hc; 684 zr = zc; 685 } 686 // Re-set central bed to riverwall elevation 687 z_half=max(riverwall_elevation[RiverWall_count-1], max(zl, zr)) ; 688 } 689 678 z_half=max(riverwall_elevation[RiverWall_count-1], z_half) ; 679 680 //if(min(ql[0], qr[0]) < z_half){ 681 // // Since there is a wall blocking the flow connection, use first order extrapolation for this edge 682 // ql[0]=stage_centroid_values[k]; 683 // ql[1]=xmom_centroid_values[k]; 684 // ql[2]=ymom_centroid_values[k]; 685 // hle=hc; 686 // zl=zc; 687 688 // if(n>=0){ 689 // qr[0]=stage_centroid_values[n]; 690 // qr[1]=xmom_centroid_values[n]; 691 // qr[2]=ymom_centroid_values[n]; 692 // hre=hc_n; 693 // zr = zc_n; 694 // }else{ 695 // hre=hc; 696 // zr = zc; 697 // } 698 // // Re-set central bed to riverwall elevation 699 // z_half=max(riverwall_elevation[RiverWall_count-1], max(zl, zr)) ; 700 //} 690 701 691 702 } … … 728 739 ii+=1; 729 740 h2=riverwall_hydraulic_properties[ii]; 730 731 //printf("%e, %e, %e, %e, %e \n", Qfactor, s1, s2, h1, h2); 732 733 adjust_edgeflux_with_weir(edgeflux, h_left, h_right, g, 741 742 //adjust_edgeflux_with_weir(edgeflux, h_left, h_right, g, 743 // weir_height, Qfactor, 744 // s1, s2, h1, h2); 745 746 // Use first-order h's for weir -- as the 'upstream/downstream' heads are 747 // measured away from the weir itself 748 h_left_tmp= max(stage_centroid_values[k]-z_half,0.); 749 if(n>=0){ 750 h_right_tmp= max(stage_centroid_values[n]-z_half,0.); 751 }else{ 752 h_right_tmp= max(hc_n+zr-z_half,0.); 753 } 754 755 adjust_edgeflux_with_weir(edgeflux, h_left_tmp, h_right_tmp, g, 734 756 weir_height, Qfactor, 735 757 s1, s2, h1, h2); -
trunk/anuga_core/validation_tests/behaviour_only/weir_1/plot_results.py
r9224 r9232 76 76 #C=C*(ft_to_m)**0.5 # Convert to m^0.5/s 77 77 C=2./3.*(9.81*2./3.)**0.5 # Another standard coefficient. 78 L1=9.0 # In the model, the L1 region is 8m with two 1m rises at each edge, leading to the equivalent of 9m width on average78 L1=9.0 # Lengths of the w1/w2 regions 79 79 L2=91. 80 80 def simple_weir(H, C, L): -
trunk/anuga_core/validation_tests/behaviour_only/weir_1/results.tex
r9121 r9232 4 4 In this problem water runs up a broad sloping floodplain, which is split into 2 by a thin weir (riverwall). The landward side of the floodplain is initially dry but becomes wet as the water overtops the weir. We use the change in mass on the landward side of the weir to compute the flux over the weir according to \anuga{}, and compare with direct computation of the weir equation. 5 5 6 \anuga{} allows computation of flow over a weir using the riverwall structure (supported for D E1 only as of 19/05/2014). The default method adjusts the edge flux over the weir to satisfy a basic weir relation with Villemonte's submergence correction. However at high submergence ratios, or when the depth of flow over the weir is large compared with the weir height, \anuga{} smoothly reverts to the shallow water solution (because the weir relations are not sensible in these situations). This is required so that e.g. a weir of 1cm height covered by flow of 1m is basically no different from the shallow water solution - weir relations by themselves will not achieve this. See the documentation of riverwalls for more information.6 \anuga{} allows computation of flow over a weir using the riverwall structure (supported for Discontinuous Elevation Algorithms only as of 01/07/2014). The default method adjusts the edge flux over the weir to satisfy a basic weir relation with Villemonte's submergence correction. However at high submergence ratios, or when the depth of flow over the weir is large compared with the weir height, \anuga{} smoothly reverts to the shallow water solution (because the weir relations are not sensible in these situations). This is required so that e.g. a weir of 1cm height covered by flow of 1m is basically no different from the shallow water solution - weir relations by themselves will not achieve this. See the documentation of riverwalls for more information. 7 7 8 8 \subsection{Results} -
trunk/anuga_core/validation_tests/behaviour_only/weir_1/runup.py
r9225 r9232 22 22 higherResPolygon=[ [40., 40.], [40., 60.], [60., 60.], [60., 40.]] 23 23 # Riverwall = list of lists, each with a set of x,y,z (and optional QFactor) values 24 riverWall={ 'centralWall': 24 #riverWall={ 'centralWall': 25 # [ [50., 0.0, -0.0], 26 # [50., 45., -0.0], 27 # [50., 46., -0.2], 28 # [50., 54., -0.2], 29 # [50., 55., -0.0], 30 # [50., 100.0, -0.0]] 31 # } 32 riverWall={ 'leftWall': 25 33 [ [50., 0.0, -0.0], 26 [50., 45., -0.0], 27 [50., 46., -0.2], 28 [50., 54., -0.2], 29 [50., 55., -0.0], 34 [50., 45.5, -0.0]], 35 'centralWall': 36 [[50., 45.5, -0.2], 37 [50., 54.5, -0.2]], 38 'rightWall': 39 [ [50., 54.5, -0.0], 30 40 [50., 100.0, -0.0]] 31 41 } 32 42 33 riverWall_Par={'centralWall':{'Qfactor':1.0}}43 #riverWall_Par={'centralWall':{'Qfactor':1.0}} 34 44 # Try to avoid any shallow-water type solution -- becomes unstable 35 45 #riverWall_Par={'centralWall':{'Qfactor':1.0, 's1': 0.999, 's2':0.9999, 'h1':100, 'h2':150}} … … 98 108 domain = distribute(domain) 99 109 100 domain.riverwallData.create_riverwalls(riverWall , riverWall_Par)110 domain.riverwallData.create_riverwalls(riverWall) 101 111 102 112 #-------------------------- -
trunk/anuga_work/development/gareth/tests/levee2/runup.py
r9121 r9232 17 17 higherResPolygon=[ [40., 40.], [40., 60.], [60., 60.], [60., 40.]] 18 18 # Riverwall = list of lists, each with a set of x,y,z (and optional QFactor) values 19 riverWall={ ' centralWall':19 riverWall={ 'leftWall': 20 20 [ [50., 0.0, -0.0], 21 [50., 45., -0.0], 22 [50., 46., -0.2], 23 [50., 54., -0.2], 24 [50., 55., -0.0], 21 [50., 45.5, -0.0]], 22 'centralWall': 23 [[50., 45.5, -0.2], 24 [50., 54.5, -0.2]], 25 'rightWall': 26 [ [50., 54.5, -0.0], 25 27 [50., 100.0, -0.0]] 26 28 } … … 59 61 domain.set_datadir('.') 60 62 domain.set_flow_algorithm('DE1') 61 domain.set_store_vertices_uniquely( )63 domain.set_store_vertices_uniquely(True) 62 64 domain.riverwallData.create_riverwalls(riverWall, riverWall_Par) 63 65 -
trunk/anuga_work/development/gareth/tests/levee2/runuplot.py
r9121 r9232 46 46 47 47 ## Get reference stage points 48 seaLev=(abs(p.x-5 1.)+abs(p.y-50.)).argmin() # Index near levee on sea side49 landLev=(abs(p.x-49. )+abs(p.y-50.)).argmin() # Index near levee on land side48 seaLev=(abs(p.x-50.7)+abs(p.y-50.)).argmin() # Index near levee on sea side 49 landLev=(abs(p.x-49.3)+abs(p.y-50.)).argmin() # Index near levee on land side 50 50 heightDiff=p.stage[:,seaLev]-p.stage[:,landLev] 51 51 ## Get indices on 'landward' side of riverwall
Note: See TracChangeset
for help on using the changeset viewer.