Ignore:
Timestamp:
Jul 11, 2012, 9:42:10 PM (13 years ago)
Author:
davies
Message:

Adding new 'okada_tsunami' routines, which are well tested
and can treat both simple and complex faults

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_work/development/gareth/experimental/balanced_dev/swb2_domain_ext.c

    r8450 r8466  
    493493                //Bedslope approx 1:
    494494                //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) );
    495496                //
    496497                // Bedslope approx 2
     
    505506
    506507                // 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;
    508509                //
    509510                xmom_explicit_update[k] -= normals[ki2]*bedslope_work;
     
    535536                    // Bedslope approx 1:
    536537                    //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));
    537539                    //
    538540                    // Bedslope approx 2:
     
    547549                    //
    548550                    // 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;
    550552                    //
    551553                    xmom_explicit_update[n] += normals[ki2]*bedslope_work;
     
    10791081      dqv[1] = a*dxv1 + b*dyv1;
    10801082      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 
    10821095      // Now we want to find min and max of the centroid and the
    10831096      // vertices of the auxiliary triangle and compute jumps
     
    10881101   
    10891102      // Limit the gradient
     1103      //if(hmin/hc<0.5){
    10901104      limit_gradient(dqv, qmin, qmax, beta_tmp);
     1105      //}
    10911106      //limit_gradient2(dqv, qmin, qmax, beta_tmp,r0scale);
    10921107     
Note: See TracChangeset for help on using the changeset viewer.