- Thank you received: 0
Solution in NGSolve
6 years 3 months ago #694
by Username
Solution in NGSolve was created by Username
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 F = 1e5 N. The beam section is a square, and a = b = 1. The beam length is l = 10. The elastic modulus is E = 2.1e11, the Poisson's ratio is nu = 0.2.
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 .
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 F = 1e5 N. The beam section is a square, and a = b = 1. The beam length is l = 10. The elastic modulus is E = 2.1e11, the Poisson's ratio is nu = 0.2.
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 .
- christopher
- Offline
- Administrator
Less
More
- Thank you received: 101
6 years 3 months ago #696
by christopher
Replied by christopher on topic Solution in NGSolve
Hi,
You have to give the surface a seperate boundary number
and then set the coefficientfunction only for bc 3 and 0 elsewhere:
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:
Best
Christopher
You have to give the surface a seperate boundary number
Code:
solid p2 = plane (10,1,1;1,0,0) -bc=3;
Code:
# A surface force in z-direction for each piece of the boundary
define coefficient coef_surface_force_z
0, 0, 1e5,
Code:
# BVP(bf=a, gf=u, lf=f, pre=c, maxsteps=1000).Do()
u.vec.data = a.mat.Inverse(fes.FreeDofs()) * f.vec
Best
Christopher
The following user(s) said Thank You: Username
6 years 3 months ago #697
by cwinters
Replied by cwinters on topic Solution in NGSolve
Hi,
you could also write everything in python.
Using linear strain and stress tensors, you get the bilinear form
and for the force you can use
The "definedon" restricts to the surface you wanted.
Best,
Christoph
you could also write everything in python.
Using linear strain and stress tensors, you get the bilinear form
Code:
a = BilinearForm(fes)
a += SymbolicBFI( 2*mu*InnerProduct(epsilon(u),epsilon(v)) + lam*Trace(u.Deriv())*Trace(v.Deriv()))
Code:
force = CoefficientFunction( (0,1e5,0) )
f = LinearForm(fes)
f += SymbolicLFI( force*v, definedon=mesh.Boundaries("force"))
f.Assemble()
Best,
Christoph
Attachments:
The following user(s) said Thank You: Username
Time to create page: 0.099 seconds