Jump to content

GOM Python script 'strain'


Recommended Posts

What is the difference btw stretch ratio and technical strain in strain representation?

I think that the difference is unit, not the value itself, that is, the unit of stretch ratio is radian and technical strain's unit is percentage but it has same value.

However, depending on the facet size, sometimes the strain based on stretch ratio representation cannot be calculated but the technical strain representation based strain is able to calculate.

Can you tell the reason why this situation is happened?




Link to comment
Share on other sites


from my point of view this are two questions:
1. about strain semantic
2. about calculation state

Strain semantic

With current length l and initial length lo and elongation/length change/length difference dl=l-lo you get:
stretch ratio: lambda=l/lo
technical strain: epsilon=dl/lo*100%

So stretch ratio can be easily converted into technical strain and vice versa by:

So a stretch ratio of 1.1 (without unit) means technical strain of 10%.

What you see in your second screen shot, that the values are similar but technical strain is in % is not right but results from the parameters you used when creating the strain check.

As no strain in stretch ratio is 1.0, this means that stretch ratio in reference stage is 1.0 for all points. When you check "Against reference stage" the strain values in stretch ratio will be subtracted by 1.0. This is what you got. When you check "Against fixed value: 0.0" you will get the real stretch ratio. For technical strain it makes no difference, as the values in reference stage are 0.0.

Calculation state

When you get nan values in the data numpy array of a check it means:
- the values are not computed yet
- or the values cannot be computed for some reason (e.g. there are no points available due to failed facet matching)

The second case can occur with "strange" facet size settings of course. But as you get the values for technical strain, the strain values can be computed and you just have to trigger a computation of the strain check in stretch ratio.
This can be done manually by these buttons
image.png.5ee171ca0fa539f5f7e5651eb73773be.png image.png.0bf81605647e93a1a68b6f232e106a38.png image.png.b6c4850618cf728c63a0d08927f5d710.png

or in script by (one of) these commands (recorded by pressing the buttons from above)

gom.script.sys.recalculate_project (with_reports=False)

gom.script.sys.recalculate_elements (elements=[gom.app.project.inspection['Stretch_ratio_X']])

BTW: The auto-recalc switches do not work during script run. So if you create a check element by script you must ensure the element is calculated in all stages by script command and cannot trust it is done automatically by the auto-recalc switch.

Link to comment
Share on other sites


  • Create New...