Do you have any updates?

El vie, 16 jun 2023 a las 15:31, J. Sanz (<jsanz451@gmail.com>) escribió:
Hello Rober,
Thanks for your answer. But I still have some problems with this. 
1-I am not able to get the nodal results for vonMises stress. The same code with lineal material was fine. Can you help me?
2-I use Paraview to check the results (vtk file), and I am not able to see cell results, only nodal displacements. Any hint?

Thanks a lot.

El vie, 9 jun 2023 a las 9:57, Robert Cimrman (<cimrman3@ntc.zcu.cz>) escribió:
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.

SfePy mailing list -- sfepy@python.org
To unsubscribe send an email to sfepy-leave@python.org
Member address: jsanz451@gmail.com