da-crivelli / freecad-parametric-fea

A flexible parametric FEA library based on FreeCAD
GNU Lesser General Public License v2.1
33 stars 5 forks source link

Allow multiple parameters for custom output function #17

Open da-crivelli opened 1 year ago

da-crivelli commented 1 year ago

If a user wants to write their own reduction function (e.g. Galileo - Rankine criterion, or a custom safety factor output) they currently would need to use some post-processing in Paraview or other software.

In a future version this should be possible:

fea.set_outputs([{
            "output_var": ("s1","s2","s3"),
            "reduction_fun": myfun,
        }])

def myfun(s1, s2, s3):
    return something