How to apply particular bc on imported mesh?

As the top boundary condition is imposed through a Neumann condition,

you only need

bc_u = [bc_left, bc_right]

with the corrections (adding () as described above).
Please note that you could use GMSH to mark boundaries, as described in Transitioning from mesh.xml to mesh.xdmf, from dolfin-convert to meshio - #181 by rkailash

1 Like