Hello everyone,I learned the usage of traction boundary conditions in the tutorial(This is a thermoelastic problem, where Delta_T represents the known temperature distribution. I am concerned about the traction term in the variational formula):
Vu = VectorFunctionSpace(mesh, 'CG', 2)
du = TrialFunction(Vu)
u_ = TestFunction(Vu)
u = Function(Vu, name="Displacement")
T = Constant((1.0, 0.0)) # Uniform traction force in the x-direction
Wint = inner(sigma(du, Delta_T), eps(u_))*dx
aM = lhs(Wint)
LM = rhs(Wint) + dot(T, u_)*ds(4)
Boundary 4 is an arc, and I want T to be a force directed towards the center of the circle, as shown in the diagram:
I have two questions. Firstly, if T is uniform, I have two options:
n = FacetNormal(mesh)
dot(Constant(T) * n, u_)*ds(4)
or:
T_x = Expression('T * cos(x[0])', degree=1)
T_y = Expression('T * abs(sin(x[1]))', degree=1)
T_expr = as_vector((P_x, P_y))
T = project(P_expr, Vu)
dot(T, u_)*ds(4)
But the results of these two methods are completely different. I don’t know which one to use, or are both incorrect?
Secondly, building upon the first question, I want to know how to handle it if T is a discrete vector (with a length equal to the number of nodes on boundary 4, and with different magnitudes at each node).