Solution in NGSolve

Hi,

I solve the following problem:
The cantilever beam is fixed with one end firmly fixed at the other end and loaded with a concentrated force [color=red]F = 1e5 N[/color]. The beam section is a square, and [color=red]a = b = 1[/color]. The beam length is [color=red]l = 10[/color]. The elastic modulus is[color=red] E = 2.1e11[/color], the Poisson’s ratio is [color=red]nu = 0.2[/color].

The solution in Ansys is very different from the solution of the solution in NGSolve.

Think it is because I incorrectly set load in NGSolve. Can you explain how to set the load on a certain face? What could be the reason for this difference in the result?

Files: geometry, mesh, PDE and python file.

Hi,
You have to give the surface a seperate boundary number

solid p2 =  plane (10,1,1;1,0,0) -bc=3;

and then set the coefficientfunction only for bc 3 and 0 elsewhere:

# A surface force in z-direction for each piece of the boundary
define coefficient coef_surface_force_z
0, 0, 1e5, 

The BVP from Python doesn’t work for vector valued vector entries and matrix valued matrix entries yet, so I replaced the following line in your Python file to get it running:

# BVP(bf=a, gf=u, lf=f, pre=c, maxsteps=1000).Do()
u.vec.data = a.mat.Inverse(fes.FreeDofs()) * f.vec

Best
Christopher

Hi,

you could also write everything in python.
Using linear strain and stress tensors, you get the bilinear form

a = BilinearForm(fes)
a += SymbolicBFI( 2*mu*InnerProduct(epsilon(u),epsilon(v)) + lam*Trace(u.Deriv())*Trace(v.Deriv()))

and for the force you can use

force = CoefficientFunction( (0,1e5,0) )

f = LinearForm(fes)
f += SymbolicLFI( force*v, definedon=mesh.Boundaries("force"))
f.Assemble()

The “definedon” restricts to the surface you wanted.

Best,
Christoph

Attachment: elasticity_2018-08-16.py