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

Make the outputs scriptable / selectable #1

Closed da-crivelli closed 1 year ago

da-crivelli commented 1 year ago

Currently the output selection is ignored, and defaults to max. Von Mises and max. displacement. These are used for plotting after all test cases are run, and added to the results dataframe.

The user shall be able to select the output parameters as follows:

fea.set_outputs(
    [
        {
            "output_var": "vonMises",
            "reduction_fun": np.max,
        },
    ]
)

The reduction_fun should be a function handle to reduce output_var to a single value.