Eomys/pyleecan

TODO: improve VarLoad.OP_Matrix doc

Opened this issue · 2 comments

There seems to be some undocumented features in the setter of VarLoad.OP_Matrix property (_set_OP_Matrix). I.e. one can set an OPMatrix, a list of operation points or a file with operation points as well.
So this is a reminder to document this features :-)

Edit: Further, the setter may benefit of some error handling as well.

Hello,

In fact it's an hidden/internal retrocompatibility ;) We used to set OP_matrix as array (so as list in class generator). In the code we convert the list to array then to OP_matrix and we assume that the columns are N0, Id, Iq, Tem (WRSM were not that much used before the OP matrix rework). It's not documented since now it's better to use set_OP_array and to always specify the columns as arguments.

Regarding the file, it's a normal option for pyleecan object with the class generator (it was made for the simu/machine/materials split). This file is a copy of the normal setter generated by the class generator + the array case.

Best regards,
Pierre

Actually I came to this "issue" while studying set_OP_array of VarLoad and OPMatrix.
BTW these methods also need some improvement in my opinion, e.g. there are some asumptions with incomplete arg_lists that need at least an logger info / warning.