Changeset 9032
- Timestamp:
- Dec 3, 2013, 10:06:36 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_work/development/gareth/experimental/bal_and/swb2_domain_ext.c
r9031 r9032 181 181 soundspeed_left = sqrt(g*h_left); 182 182 soundspeed_right = sqrt(g*h_right); 183 //soundspeed_left = sqrt(g*hle); 184 //soundspeed_right = sqrt(g*hre); 183 185 184 186 s_max = max(u_left + soundspeed_left, u_right + soundspeed_right); … … 235 237 // Standard smoothing term 236 238 // edgeflux[i] += 1.0*(s_max*s_min)*(q_right_rotated[i] - q_left_rotated[i]); 237 // Smoothing by stage can cause high velocities / slow draining for nearly dry cells239 // Smoothing by stage alone can cause high velocities / slow draining for nearly dry cells 238 240 if(i==0) edgeflux[i] += (s_max*s_min)*(max(q_right_rotated[i],ze) - max(q_left_rotated[i],ze)); 239 241 if(i==1) edgeflux[i] += (s_max*s_min)*(uh_right - uh_left); … … 753 755 double dqv[3], qmin, qmax, hmin, hmax, bedmax,bedmin, stagemin; 754 756 double hc, h0, h1, h2, beta_tmp, hfactor, xtmp, ytmp, weight, tmp; 755 double dk, dv0, dv1, dv2, de[3], demin, dcmax, r0scale, vel_norm, l1, l2, a_ bs, b_bs, area_e, inv_area_e;757 double dk, dv0, dv1, dv2, de[3], demin, dcmax, r0scale, vel_norm, l1, l2, a_tmp, b_tmp, c_tmp,d_tmp; 756 758 757 759 double *xmom_centroid_store, *ymom_centroid_store; // , *min_elevation_edgevalue, *max_elevation_edgevalue; … … 1033 1035 hmax = max(max(h0, max(h1, h2)), hc); 1034 1036 1035 // Look for strong changes in cell depth, or shallow cell depths, as an indicator of near-wet-dry 1036 // Reduce beta linearly from 1-0 between depth ratio (hmin/hc) of 0.3-0.1 1037 hfactor= max(0., min(5.0*max(hmin,0.0)/max(hc,1.0e-06)-0.5, 1038 min(5.0*max(hc,0.)/max(hmax,1.0e-06)-0.5, 1.0)) 1037 // Look for strong changes in cell depth as an indicator of near-wet-dry 1038 // Reduce beta linearly from 1-0 between depth ratio (hmin/hc) of [a_tmp , b_tmp] 1039 // NOTE: If we have a more 'second order' treatment in near dry areas (e.g. with b_tmp being negative), then 1040 // the water tends to dry more rapidly (which is in agreement with analytical results), 1041 // but is also more 'artefacty' in important cases (tendency for high velocities, etc). 1042 // 1043 //hfactor=1.0; 1044 a_tmp=0.2; // Highest depth ratio with hfactor=1 1045 b_tmp=0.01; // Highest depth ratio with hfactor=0 1046 c_tmp=1.0/(a_tmp-b_tmp); 1047 d_tmp= 1.0-(c_tmp*a_tmp); 1048 hfactor= max(0., min(c_tmp*max(hmin,0.0)/max(hc,1.0e-06)+d_tmp, 1049 min(c_tmp*max(hc,0.)/max(hmax,1.0e-06)+d_tmp, 1.0)) 1039 1050 ); 1051 //printf("%e, %e, \n", c_tmp, d_tmp); 1040 1052 //hfactor= max(0., min(5.0*max(hmin,0.0)/max(hmax,1.0e-06)-0.5, 1.0) 1041 1053 // ); 1042 1054 //hfactor=1.0; 1043 hfactor=min( max(hmin,0.)/(max(hmin,0.)+1.*minimum_allowed_height), hfactor); 1055 1056 //hfactor=min( 1.2*max(hmin,0.)/(max(hmin,0.)+1.*minimum_allowed_height), hfactor); 1044 1057 1045 1058 //----------------------------------- … … 1089 1102 // height 1090 1103 //----------------------------------- 1104 //hfactor=1.0; 1105 //hfactor= max(0., min(5.0*max(hmin,0.0)/max(hc,1.0e-06)-0.5, 1106 // min(5.0*max(hc,0.)/max(hmax,1.0e-06)-0.5, 1.0)) 1107 // ); 1091 1108 1092 1109 // Calculate the difference between vertex 0 of the auxiliary … … 1134 1151 // 1.0)); 1135 1152 //hfactor=min( max(hmin,0.)/(max(hmin,0.)+10.*minimum_allowed_height), hfactor); 1153 //hfactor=1.0; 1136 1154 1137 1155 //-----------------------------------
Note: See TracChangeset
for help on using the changeset viewer.