This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Functions | |
void | interface_tensionu (interface in, interface_cut cut, real2D u, real2D v, real2D cu, real2D ap, real2D syu, real2D p, real2D pi, real2D ni, int nx, int ny) |
void | interface_tensionv (interface in, interface_cut cut, real2D u, real2D v, real2D cv, real2D ap, real2D sxv, real2D av, real2D p, real2D pi, real2D ni, int nx, int ny) |
void | interfacial_pressure (interface in, real2D u, real2D v, real2D ap, real sigma, real mu, real pg, real tau, int nx, int ny) |
|
Definition at line 87 of file tension.c. References listinter::coord, fill0(), INP, INU, listinter::ip, interface_cut::list, interface_cut::ncut, PHI_R_LINEAR, real, real2D, splint, interface::spx, interface::spy, listinter::t, listinter::type, VER_TYPE, interface_cut::xo, and interface_cut::yo. Referenced by timestep().
00092 { 00093 int i, j, l; 00094 real t, t1, t2; 00095 polynom3 px, py; 00096 00097 fill0(pi, nx, ny); 00098 fill0(ni, nx, ny); 00099 00100 /* For each intersection */ 00101 for (l = 0; l < cut.ncut - 1; l++) { 00102 px = in.spx[cut.list[l].ip]; 00103 py = in.spy[cut.list[l].ip]; 00104 00105 t1 = cut.list[l].t; t2 = cut.list[l+1].t; 00106 t = 0.5*(t1 + t2); 00107 i = splint(px, t) - cut.xo; 00108 j = splint(py, t) - cut.yo; 00109 00110 /* Intersection with the verticals */ 00111 if (cut.list[l].type == VER_TYPE) { 00112 if (cut.list[l].coord == i) { 00113 if (!INP(i-1,j)) { 00114 pi[i-1][j] += PHI_R_LINEAR(in, cut.list[l].ip, t1)/ 00115 (splint(py, t1) - 2.); 00116 ni[i-1][j] += 1.0; 00117 } 00118 } 00119 else if (!INP(i,j)) { 00120 pi[i][j] += PHI_R_LINEAR(in, cut.list[l].ip, t1)/ 00121 (splint(py, t1) - 2.); 00122 ni[i][j] += 1.0; 00123 } 00124 } 00125 00126 if (INU(i,j)) u[i][j] -= phi_r_dr(in, cut.list[l].ip, t1, t2)/cu[i][j]; 00127 } 00128 for (i = 2; i <= nx; i++) 00129 for (j = 2; j < ny; j++) 00130 if (INU(i,j)) { 00131 if (pi[i-1][j] != 0.0) 00132 u[i][j] += syu[i][j]*pi[i-1][j]/(cu[i][j]*ni[i-1][j]); 00133 if (pi[i][j] != 0.0) 00134 u[i][j] -= syu[i+1][j]*pi[i][j]/(cu[i][j]*ni[i][j]); 00135 } 00136 } |
|
Definition at line 139 of file tension.c. References listinter::coord, fill0(), HOR_TYPE, INP, INV, listinter::ip, interface_cut::list, interface_cut::ncut, PHI_R_LINEAR, real, real2D, splint, interface::spx, interface::spy, listinter::t, listinter::type, interface_cut::xo, and interface_cut::yo. Referenced by timestep().
00144 { 00145 int i, j, l; 00146 real t, t1, t2; 00147 polynom3 px, py; 00148 00149 fill0(pi, nx, ny); 00150 fill0(ni, nx, ny); 00151 00152 /* For each intersection */ 00153 for (l = 0; l < cut.ncut - 1; l++) { 00154 px = in.spx[cut.list[l].ip]; 00155 py = in.spy[cut.list[l].ip]; 00156 00157 t1 = cut.list[l].t; t2 = cut.list[l+1].t; 00158 t = 0.5*(t1 + t2); 00159 i = splint(px, t) - cut.xo; 00160 j = splint(py, t) - cut.yo; 00161 00162 /* Intersection with the horizontals */ 00163 if (cut.list[l].type == HOR_TYPE) { 00164 if (cut.list[l].coord == j) { 00165 if (!INP(i,j-1)) { 00166 pi[i][j-1] += PHI_R_LINEAR(in, cut.list[l].ip, t1) 00167 /(splint(py, t1) - 2.); 00168 ni[i][j-1] += 1.0; 00169 } 00170 } 00171 else if (!INP(i,j)) { 00172 pi[i][j] += PHI_R_LINEAR(in, cut.list[l].ip, t1) 00173 /(splint(py, t1) - 2.); 00174 ni[i][j] += 1.0; 00175 } 00176 } 00177 00178 if (INV(i,j)) v[i][j] += phi_r_dz(in, cut.list[l].ip, t1, t2)/cv[i][j]; 00179 } 00180 for (i = 2; i < nx; i++) 00181 for (j = 3; j <= ny; j++) 00182 if (INV(i,j)) { 00183 if (pi[i][j-1] != 0.0) 00184 v[i][j] += (sxv[i][j] + av[i][j]/2.)*pi[i][j-1] 00185 /(cv[i][j]*ni[i][j-1]); 00186 else if (!INP(i,j-1)) 00187 v[i][j] += av[i][j]/2.*p[i][j]/cv[i][j]; 00188 if (pi[i][j] != 0.0) 00189 v[i][j] -= (sxv[i][j+1] - av[i][j]/2.)*pi[i][j] 00190 /(cv[i][j]*ni[i][j]); 00191 else if (!INP(i,j)) 00192 v[i][j] += av[i][j]/2.*p[i][j-1]/cv[i][j]; 00193 } 00194 } |
|
Definition at line 197 of file tension.c. References interface::n, real, real2D, interface::spx, interface::spy, sq, interface::t, and interface::y. Referenced by timestep().
00200 { 00201 real h = 1.0/(nx - 2.); 00202 int i; 00203 00204 sigma *= sq(tau)/(h*h*h); 00205 mu *= tau/sq(h); 00206 pg *= sq(tau/h); 00207 00208 for (i = 0; i < in.n - 1; i++) 00209 in.p[i] = pg*(in.y[i] - 2.) + 00210 phi_r(in.spx[i], in.spy[i], in.t[i], sigma, mu, 00211 u, v, ap, nx, ny); 00212 in.p[in.n-1] = pg*(in.y[in.n-1] - 2.) + 00213 phi_r(in.spx[in.n-2], in.spy[in.n-2], in.t[in.n-1], 00214 sigma, mu, u, v, ap, nx, ny); 00215 } |