Skip to content
Snippets Groups Projects
Commit 9923cc9b authored by Kutalmış Berçin's avatar Kutalmış Berçin
Browse files

BUG: applyBoundaryLayer: disable application on disconnected cells (fixes #1513)

parent 8a3dc052
1 merge request!489BUG: 2021-1: Various bug fixes and developments
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2015-2019 OpenCFD Ltd. Copyright (C) 2015-2021 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -333,10 +333,10 @@ int main(int argc, char *argv[]) ...@@ -333,10 +333,10 @@ int main(int argc, char *argv[])
// u/U0 = (y/ybl)^(1/7) // u/U0 = (y/ybl)^(1/7)
// assumes U0 is the same as the current cell velocity // assumes U0 is the same as the current cell velocity
Info<< "Setting boundary layer velocity" << nl << endl; Info<< "Setting boundary layer velocity" << nl << endl;
scalar yblv = ybl.value(); const scalar yblv = ybl.value();
forAll(U, celli) forAll(U, celli)
{ {
if (y[celli] <= yblv) if ((y[celli] > 0) && (y[celli] <= yblv))
{ {
mask[celli] = 1; mask[celli] = 1;
U[celli] *= ::pow(y[celli]/yblv, (1.0/7.0)); U[celli] *= ::pow(y[celli]/yblv, (1.0/7.0));
......
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