Topic: How to show the strain energy?

Hi, I want to know the strain energy. However, it seems that there are  only
ENUM_ITEM_WITH_VALUE(IST_PlasStrainEnerDens, 49) \
ENUM_ITEM_WITH_VALUE(IST_ElasStrainEnerDens, 50) \
ENUM_ITEM_WITH_VALUE(IST_TotalStrainEnerDens, 51) \
  in the file "src/oofemlib/internalstatetype.h". And I add them to vtk line just like:
vtkxml tstep_all domain_all vars 5 1 81 49 50 51 primvars 1 1 cellvars 5 1 81 49 50 51 .
But I just get lots of 0.
The elements I used is the type of LTRSpace.
I am curios about this question. Could anyone help me?

Re: How to show the strain energy?

Hi ousatoshi,

It's left up to each respective component (typically the material model) to compute all it can compute.
Typically, a more "exotic" feature, like these 3 you mentioned, were added alongside a new material model, where the author needed these particular outputs, and then they were never backported into the more conventional models.


We have to export zeroes, because it's the only sensible "default" value. VTU export won't let you skip elements, you have to export everywhere.
Perhaps a different value, like NaN (not sure if that's supported?) or some -inf sentinel value would make it more clear, but often, zero makes sense as a default; e.g. plastic strain when you have a mix of elastic and plastic materials, the elastic regions will output zero.


So, each and every material needs to make sure that giveIPValue outputs all it can output.
Quite a bit of work, but we can do things to improve the situation and minimize developer work:

1. Consolidate the IST list.
2. Storing 3D material state always. I have argued that we should be doing this anyway, but this is yet another case where it would greatly help, due to point 3:
3. Virtual method overloads; inheritance will help us implement support for whole categories of materials with a single method.

I wrote a issue to keep track of this
https://github.com/oofem/oofem/issues/31