Dear All,
Hope you are all safe. I am trying to implement the following boundary condition:
The geometry is a simple square (40*40). The bottom side needs to be fixed, and the top side with a time dependent shear loading in the x-direction. The part of my code that I implemented is as below:
BoundaryU = Expression('gam*x[1]*t/tMax', gam = 0.3, t = 0, tMax = tMax, degree = 1)
top = CompiledSubDomain("near(x[1], side) && on_boundary", side = 40.0)
bot= CompiledSubDomain("near(x[1], side) && on_boundary", side = 0.0)
bc = []
facets = MeshFunction("size_t", mesh, 1)
facets.set_all(0)
top.mark(facets, 1)
bot.mark(facets, 2)
bc.append(DirichletBC(V.sub(0).sub(0), BoundaryU, top))
bc.append(DirichletBC(V.sub(0).sub(1), Constant(0.0), top))
bc.append(DirichletBC(V.sub(0).sub(1), Constant(0.0), bot))
bc.append(DirichletBC(V.sub(0).sub(0), Constant(0.0), bot))
With above, I could not see the shear effect at all. I do appreciate your help regarding this issue.
Bests,
Ben