Changeset 6159


Ignore:
Timestamp:
Jan 14, 2009, 11:02:14 AM (16 years ago)
Author:
wilson
Message:

updated 14/01/09

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/anuga_1d/channel_domain_ext.c

    r6140 r6159  
    6060    double zphalf,zmhalf,hleftstar,hrightstar;
    6161    double fluxtemp1,fluxtemp0,speedtemp;
     62    double batemp;
    6263
    6364    zmhalf = max(q_leftm[2],q_leftp[2]);
     
    133134    } else {
    134135        edgeflux[0] = s_maxl*flux_left[0] - s_minl*flux_right[0];
    135 //      edgeflux[0] += s_maxl*s_minl*(a_leftp-a_leftm);
     136
     137        batemp = (h_leftp)*b_leftp-(h_leftm)*b_leftm;
     138
     139        edgeflux[0] += s_maxl*s_minl*batemp;
    136140        edgeflux[0] /= denom;
    137141        edgeflux[1] = s_maxl*flux_left[1] - s_minl*flux_right[1];
     
    141145
    142146    }
    143    
    144147        fluxtemp0 = edgeflux[0];
    145148        fluxtemp1 = edgeflux[1];
     
    148151    // Flux formulas for right hand side
    149152    flux_left[0] = d_rightm;
    150     flux_left[1] = u_rightm*d_rightm + 0.5*g*h_rightm*h_rightm;
     153    flux_left[1] = u_rightm*d_rightm + 0.5*g*h_rightm*h_rightm*b_rightm;
    151154
    152155    flux_right[0] = d_rightp;
    153     flux_right[1] = u_rightp*d_rightp + 0.5*g*h_rightp*h_rightp;
     156    flux_right[1] = u_rightp*d_rightp + 0.5*g*h_rightp*h_rightp*b_rightp;
    154157   
    155158   
     
    161164    } else {
    162165        edgeflux[0] = s_maxr*flux_left[0] - s_minr*flux_right[0];
    163 //              edgeflux[0] += s_maxr*s_minr*(a_rightp-a_rightm);
     166
     167        batemp = (h_rightp)*b_rightp-(h_rightm)*b_rightm;
     168
     169        edgeflux[0] += s_maxr*s_minr*batemp;
    164170        edgeflux[0] /= denom;
    165171        edgeflux[1] = s_maxr*flux_left[1] - s_minr*flux_right[1];
     
    174180    edgeflux[1]=edgeflux[1]-fluxtemp1;
    175181   
    176    
    177      
    178     edgeflux[1]-=0.5*g*h_rightm*h_rightm-0.5*g*hrightstar*hrightstar+0.5*g*hleftstar*hleftstar-0.5*g*h_leftp*h_leftp;
    179 
    180    
    181 
     182   
     183     edgeflux[1]-=0.5*g*h_rightm*h_rightm*b_rightm-0.5*g*hrightstar*hrightstar*b_rightm+0.5*g*hleftstar*hleftstar*b_leftp-0.5*g*h_leftp*h_leftp*b_leftp;
     184
     185   
     186     //edgeflux[1]-=0.5*g*h_rightm*h_rightm-0.5*g*hrightstar*hrightstar+0.5*g*hleftstar*hleftstar-0.5*g*h_leftp*h_leftp;
    182187     
    183 
    184188     //edgeflux[1]-=0.5*g*b_rightm*h_rightm*h_rightm-0.5*g*b_leftp*h_leftp*h_leftp;
    185189                // Maximal wavespeed
Note: See TracChangeset for help on using the changeset viewer.