- Timestamp:
- Jul 11, 2012, 9:42:10 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_work/development/gareth/experimental/balanced_dev/swb2_domain_ext.c
r8450 r8466 493 493 //Bedslope approx 1: 494 494 //bedslope_work = g*hc*(ql[0])*length-0.5*g*max(ql[0]-zl,0.)*(ql[0]-zl)*length; 495 bedslope_work = g*length*( hc*(ql[0])-0.5*max(ql[0]-zl,0.)*(ql[0]-zl) ); 495 496 // 496 497 // Bedslope approx 2 … … 505 506 506 507 // Bedslope approx 3 507 bedslope_work = -0.5*g*max(stage_centroid_values[k]-zl,0.)*(stage_centroid_values[k]-zl)*length;508 //bedslope_work = -0.5*g*max(stage_centroid_values[k]-zl,0.)*(stage_centroid_values[k]-zl)*length; 508 509 // 509 510 xmom_explicit_update[k] -= normals[ki2]*bedslope_work; … … 535 536 // Bedslope approx 1: 536 537 //bedslope_work = g*hc_n*(qr[0])*length-0.5*g*max(qr[0]-zr,0.)*(qr[0]-zr)*length; 538 bedslope_work = g*length*(hc_n*(qr[0])-0.5*max(qr[0]-zr,0.)*(qr[0]-zr)); 537 539 // 538 540 // Bedslope approx 2: … … 547 549 // 548 550 // Bedslope approx 3 549 bedslope_work = -0.5*g*max(stage_centroid_values[n]-zr,0.)*(stage_centroid_values[n]-zr)*length;551 //bedslope_work = -0.5*g*max(stage_centroid_values[n]-zr,0.)*(stage_centroid_values[n]-zr)*length; 550 552 // 551 553 xmom_explicit_update[n] += normals[ki2]*bedslope_work; … … 1079 1081 dqv[1] = a*dxv1 + b*dyv1; 1080 1082 dqv[2] = a*dxv2 + b*dyv2; 1081 1083 1084 // Idea: New limiter, computed using only neighbouring centroid values and local centroid value 1085 // Step1: Compute the value of stage at the centroid of triangle k , 1086 // using only the neighbouring centroid stage values 1087 //tmp = a*(x-x0) + b*(y-y0) + stage_centroid_values[k0]; 1088 // Step2: Now, compute a limiting factor, so that if gradients are multiplied by this, 1089 // then for a triangle with these limited gradients, based at the local centroid value 1090 // ,the re-constructed neighbour centroid values will not over shoot (if larger) or undershoot (if smaller) 1091 //limiting_factor=1 - max_all_k0((tmp - stage_centroid_values[k])/(tmp - stage_centroid_values[k0])) 1092 //limiting_factor=min(max(limiting_factor,0),1) 1093 // Advantages: No limiting for linear problem. Worth a look anyway 1094 1082 1095 // Now we want to find min and max of the centroid and the 1083 1096 // vertices of the auxiliary triangle and compute jumps … … 1088 1101 1089 1102 // Limit the gradient 1103 //if(hmin/hc<0.5){ 1090 1104 limit_gradient(dqv, qmin, qmax, beta_tmp); 1105 //} 1091 1106 //limit_gradient2(dqv, qmin, qmax, beta_tmp,r0scale); 1092 1107
Note: See TracChangeset
for help on using the changeset viewer.