Changeset 6159
- Timestamp:
- Jan 14, 2009, 11:02:14 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/anuga_1d/channel_domain_ext.c
r6140 r6159 60 60 double zphalf,zmhalf,hleftstar,hrightstar; 61 61 double fluxtemp1,fluxtemp0,speedtemp; 62 double batemp; 62 63 63 64 zmhalf = max(q_leftm[2],q_leftp[2]); … … 133 134 } else { 134 135 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; 136 140 edgeflux[0] /= denom; 137 141 edgeflux[1] = s_maxl*flux_left[1] - s_minl*flux_right[1]; … … 141 145 142 146 } 143 144 147 fluxtemp0 = edgeflux[0]; 145 148 fluxtemp1 = edgeflux[1]; … … 148 151 // Flux formulas for right hand side 149 152 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; 151 154 152 155 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; 154 157 155 158 … … 161 164 } else { 162 165 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; 164 170 edgeflux[0] /= denom; 165 171 edgeflux[1] = s_maxr*flux_left[1] - s_minr*flux_right[1]; … … 174 180 edgeflux[1]=edgeflux[1]-fluxtemp1; 175 181 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; 182 187 183 184 188 //edgeflux[1]-=0.5*g*b_rightm*h_rightm*h_rightm-0.5*g*b_leftp*h_leftp*h_leftp; 185 189 // Maximal wavespeed
Note: See TracChangeset
for help on using the changeset viewer.