Commit 16edc22d authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

fix boundary visc size

parent de338f7a
Pipeline #5431 passed with stage
in 27 seconds
......@@ -216,17 +216,16 @@ static void f_boundary(WeakBoundary *wbnd, FluidProblem *problem,const double *n
f00[(U+id)*n_fields+P] += (pid<0?0:-n[id]);
f00[(U+id)*n_fields+U+id] += (vid<0?0:sigma);
for (int jd = 0; jd <D; ++jd) {
f0[U+id] += mu*(c_du_o_c[id][jd]+c_du_o_c[jd][id])*n[jd];
f00[(U+id)*n_fields+U+id] += (vid<0?0:n[id]*n[jd]*sigma) - mu/c*dc[jd]*n[jd];
f00[(U+id)*n_fields+U+jd] -= mu/c*dc[id]*n[jd];
f01[(U+id)*n_fields*D+(U+id)*D+jd] += mu*n[jd];
f01[(U+id)*n_fields*D+(U+jd)*D+id] += mu*n[jd];
f0[U+id] -= mu*(c_du_o_c[id][jd]+c_du_o_c[jd][id])*n[jd];
f00[(U+id)*n_fields+U+id] += (vid<0?0:n[id]*n[jd]*sigma) + mu/c*dc[jd]*n[jd];
f00[(U+id)*n_fields+U+jd] += mu/c*dc[id]*n[jd];
f01[(U+id)*n_fields*D+(U+id)*D+jd] -= mu*n[jd];
f01[(U+id)*n_fields*D+(U+jd)*D+id] -= mu*n[jd];
}
}
double unbnd = unold;
if (wbnd->type == BND_WALL) unbnd = unold/2;
else if(vid>0) unbnd = (unold+unext)/2;
if (unbnd<0) {
for (int id = 0; id < D; ++id) {
f0[U+id] += unbnd*((vid<0 ? 0 : data[vid+id])-u[id])*rho/c;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment