Non linear magnetic model based on preisach model

Hello all

I have a c-script code of preisach model used to model the non-linearity of magnetic material used in transformer core got from thesis, the code see in the attached file, its need three parameters based on the material characteristics and they already defined in c-script parameters. the problem is when I run the simulation the plecs software is suddenly closed and I do not know where the issue is, I tried to check the parameters of use separated code and got the same action.

anyone can check the code and the schematic help me to find the error.

thanks

test_hysteresis core_update.plecs (26.0 KB)

It is currently being resolved directly, updates will be published here.