Skip to content
Snippets Groups Projects
Commit e56cbb7f authored by Amaury Johnen's avatar Amaury Johnen
Browse files

boundary layer growing quadratically seems better than linearly

parent 16062d4a
No related branches found
No related tags found
No related merge requests found
......@@ -412,7 +412,14 @@ void getLocalInfoAtNode (MVertex *v, BoundaryLayerField *blf, double &hwall) {
v->getParameter(0,t);
double hwall_beg = blf->hwall (ge->getBeginVertex()->tag());
double hwall_end = blf->hwall (ge->getEndVertex()->tag());
hwall = hwall_beg + (t-t_begin)/(t_end-t_begin) * (hwall_end - hwall_beg);
double x = (t-t_begin)/(t_end-t_begin);
double hwallLin = hwall_beg + x * (hwall_end - hwall_beg);
double hwall_mid = std::min(hwall_beg, hwall_end);
double hwallQuad = hwall_beg * (1-x)*(1-x) +
hwall_mid * 2*x*(1-x) +
hwall_end * x*x;
// we prefer a quadratic growing:
hwall = 0*hwallLin + 1*hwallQuad;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment