Hi, I've tried DWSIM 7.2 and Python seems to work in the minimal case, in the Cantera Interop example (and other Cantera examples) I get the following: 'numpy.float64' value cannot be converted to System.Double in method Void .ctor(Double) I was able to track this down to the casts in lines 83–88 of the Python unit operation in Cantera Interop.dwxmz, and I was able to solve this by casting the output variables to float, e.g.: oms1.Phases[0].Compounds['Methane'].MoleFraction = System.Nullable[System.Double](outCH4)...
Hi, I've tried DWSIM 7.2 and Python seems to work in the minimal case, in the Cantera Interop example (and other Cantera examples) I get the following: 'numpy.float64' value cannot be converted to System.Double in method Void .ctor(Double) I was able to track this down to the casts in lines 83–88 of the Python unit operation in Cantera Interop.dwxmz, and I was able to solve this by casting the output variables to float, e.g.: oms1.Phases[0].Compounds['Methane'].MoleFraction = System.Nullable[System.Double](outCH4)...
Hi, I've tried DWSIM 7.2 and Python seems to work in the minimal case, in the Cantera Interop example (and other Cantera examples) I get the following: 'numpy.float64' value cannot be converted to System.Double in method Void .ctor(Double) I was able to track this down to the casts in lines 83–88 of the Python unit operation in Cantera Interop.dwxmz, and I was able to solve this by casting the output variables to float, e.g.: oms1.Phases[0].Compounds['Methane'].MoleFraction = System.Nullable[System.Double](outCH4)...
Hi, I've tried DWSIM 7.2 and Python seems to work in the minimal case, in the Cantera Interop example (and other Cantera examples) I get the following: 'numpy.float64' value cannot be converted to System.Double in method Void .ctor(Double) I was able to track this down to the casts in lines 83–88 of the Python unit operation in Cantera Interop.dwxmz, and I was able to solve this by casting the output variables to float, e.g.: oms1.Phases[0].Compounds['Methane'].MoleFraction = System.NullableSystem.Double...
Hi, thanks for checking this out. Regards, -r
Hi, Hopefully I'm doing this right. Attempted to run the Cantera interop example: [30/12/2021 11:38:40 PM] Attempted to access a missing member. at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet (System.Object o, System.Type objType, System.String name, System.Object[] args, System.String[] paramnames, System.Boolean[] CopyBack) [0x000bb] in <4db44276fe2442e2b0c7756aa8b4da57>:0 at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet (System.Object Instance, System.Type Type,...
Hi, I am attempting to use the Python interop capabilities in DWSIM on Linux. I have followed danwbr's advice elsewhere regarding known working OS/DWSIM version combinations. DWSIM version: 7.1.2 (the Ubuntu .deb) OS: Ubuntu 20.04.2 x86_64 Python: 3.8.10 PYTHONPATH: '/usr/lib/python38.zip:/usr/lib/python3.8:/usr/lib/python3.8/lib-dynload:/home/rterrett/.local/lib/python3.8/site-packages:/usr/local/lib/python3.8/dist-packages:/usr/lib/python3/dist-packages' (here I just copied the contents of sys.path....