Hello Jesus,
see below.
On 6/8/23 14:50, J. Sanz wrote:
Hello, Do you have any updates? Regards, J.Sanz
El vie, 26 may 2023 a las 15:33, J. Sanz (<jsanz451@gmail.com>) escribió:
Hello, I have a problem with a simulation including non lineal material.The problem involves a cantilever beam. The free end is moved 20 mm in X direction. I have compared the results with Ansys. The stresses are different, in particular at the pastification zone.
Yield point of the material Relastic = 130 MPa, Epsilon elastic =0.00173
The material is bilinear, it has two slopes, young 1 and young2. The slope changes in the yield point. The no linear material function is based on calculating the strains in every cell. It is assigned the second young modulus for those strains higher than epsilon elastic. If lower, first young modulus is set.
You can find attached the files and comparison. The picture with the comparison has the same scale, so the colours represent the same stress range.
My doubts are the next: 1-I am not sure if the material definition is right. Can you confirm this for me?
It is not, see the next item.
2-Order of the stress strain evaluation, I set it to 3 because it provides the closest results.
This is not correct:
In [4]: y1.shape Out[4]: (482240,)
In [5]: coors.shape Out[5]: (482240, 3)
In [6]: strain.shape Out[6]: (43840, 5, 6, 1)
In [7]: 43840 * 5 Out[7]: 219200
so your strain is evaluated in different quadrature points than expected (= coors). You should always use the same order as in the equations - then it is guaranteed that also the resulting shapes will be compatible.
I have attached a new version of your script that (sort of (*)) works.
3-The output file .vtk contains only nodal solution. How to get the elemental solution as well?
I can see there both nodal (u) and elemental quantities (strain, stresses).
(*) Other things:
- Because your problem is nonlinear, it cannot be solved in a single iteration. So I modified pull() to always return the final displacements, and increased the number of time steps.
- However, this corresponds to just a very simple fixed-point iteration, which converges very slowly, as can be seen from the slowly decreasing initial residual in each time step.
So maybe implementing a proper nonlinear term would be a way to go - then the Newton solver could be used to resolve the nonlinearity much faster. However, as there is no automatic differentiation is SfePy, you would need to provide the tangent matrix, so implementing that would not be a trivial thing.
r.