dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #23821
Minor fix in the Navier-Stokes demo
The noslip boundary condition in the Navier-Stokes demo did not catch the
corners of the inlets and outlets (e.g. the corner point at (0, 1) is not
inside "on_boundary && x[1] < 1.0 - DOLFIN_EPS", but there should definitely
be a no slip condition there). This minor fix of the inside string for the
boundary condition removes the creeping flow behavior of the solution.
I hope I did this correctly:-) (My first patch)
Best regards
Mikael
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: mikael.mortensen@xxxxxxxxx-20110616193721-\
# y2tdkyw8x6zdyaeq
# target_branch: bzr+ssh://bazaar.launchpad.net/%2Bbranch/dolfin/
# testament_sha1: 77ad20cd64d0660b7bcd293b5b8bce41d134f21d
# timestamp: 2011-06-16 21:38:22 +0200
# base_revision_id: meg@xxxxxxxxx-20110616184700-vnzj37txkgixrw2e
#
# Begin patch
=== modified file 'demo/pde/navier-stokes/python/demo_navier-stokes.py'
--- demo/pde/navier-stokes/python/demo_navier-stokes.py 2011-06-02 19:26:59 +0000
+++ demo/pde/navier-stokes/python/demo_navier-stokes.py 2011-06-16 19:37:21 +0000
@@ -18,8 +18,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
#
+# Modified by Mikael Mortensen 2011
+#
# First added: 2010-08-30
-# Last changed: 2010-08-31
+# Last changed: 2011-06-16
# Begin demo
@@ -50,7 +52,8 @@
p_in = Expression("sin(3.0*t)")
# Define boundary conditions
-noslip = DirichletBC(V, (0, 0), "on_boundary && x[1] < 1.0 - DOLFIN_EPS && x[0] < 1.0 - DOLFIN_EPS")
+noslip = DirichletBC(V, (0, 0), "on_boundary && (x[0] < DOLFIN_EPS | x[1] < DOLFIN_EPS | \
+ (x[0] > 0.5 - DOLFIN_EPS && x[1] > 0.5-DOLFIN_EPS))")
inflow = DirichletBC(Q, p_in, "x[1] > 1.0 - DOLFIN_EPS")
outflow = DirichletBC(Q, 0, "x[0] > 1.0 - DO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