Hello Torsten!
On 01/03/12 15:44, Torsten Bronger wrote:
Hallöchen!
Robert Cimrman writes:
Look at the SfePy Primer [1], specifically the post-processing section. In short, you need to define a function ('post_process_hook' option in input file) that computes derived quantities from the computed variables (e.g. strain or stress from displacements).
Let us know how it goes.
If I say
stress = pb.evaluate("de_cauchy_stress.2.Omega(silicon.D, u)", mode="el_avg") print(repr(stress))
I get something like
array([[[[ 298.62126426], [ 228.57003414], [ 19.25326414]]], [[[ 342.02403106], [ 353.74870016], [ -21.73842943]]],
What do the three values in each group mean?
The shape is, in general, (n_elements, n_quadrature_points, n_row, n_col). In "el_avg" mode, you get an average of all quadrature points values per element, so the shape in your case is (n_elements, 1, n_row, n_col). So each group, as you say, is the value of the stress tensor in the corresponding element. It has n_row = 3, n_col = 1, as it is symmetric 2x2 and we store only the items 11, 22, 12 (in this order).
Is this clear enough?
r.