How to apply triangular distributed load to beam?
26 days ago by
I am trying to solve the following problem in FEniCS and being new to FEniCS I would greatly appreciate any hint/suggestion for implementing it.
As shown in figure, I have to implement a beam (L*B=10*1) with its left end having fixed and right end having roller boundary condition. I have written the following code for boundary conditions. Is it right?
#Fixed boundary condition to the bottom left corners w_D1 = Constant((0,0)) #roller boundary condition to the right bottom corner w_D2 = Constant(0) def boundary_left(x,on_boundary): return (near(x,0) and near(x,0)) def boundary_right(x,on_boundary): return (near(x,10) and near(x,0)) bc_left=DirichletBC(V,w_D1,boundary_left,method='pointwise') bc_right=DirichletBC(V.sub(1),w_D2,boundary_right,method='pointwise')
Next I would like to implement a non-uniform distributed load on the top edge of the beam (as shown in the figure). I have written the following code for it.
class Top(SubDomain): def inside(self,x,on_boundary): return near(x,1.0) #initialize the sub domain: top=Top() #represents the top edge boundries=FacetFunction("uint",mesh) boundries.set_all(0) top.mark(boundries,1) # define load g_T = Constant((0.0,-0.02)) #Variational problem L = dot(v,g_T)*ds(1)
But this applies uniformly distributed load. Can I please get some help on how I could implement the non-uniformly/triangular distributed load? I tried to express it as an expression y=mx+c, but it does not work.
Thank you very much for your valuable guidance.
Community: FEniCS Project
26 days ago by
If I understood your problem correctly: you want to have a term in your equation L that is space dependent. You could use the Expression object.
The syntax would then be:
# define load g_T = Expression('m*x+c',m=1,c=2,degree=1)
Though I'm not really sure to get what's the field you want to solve.
Please login to add an answer/comment or follow this question.