Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Python For Comsol
Posted 2023年1月18日 GMT-5 20:04 0 Replies
Please login with a confirmed email address before reporting spam
I am working on a coupled model which I need to use Python to give/get output/input from COMSOL. How can I couple Python to COMSOL. I tried MPh to run a simple model but I got this error:
Traceback (most recent call last): File "SourceFile", line 169, in com.comsol.model.util.ModelUtil.load Exception: Java Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\idlelib\run.py", line 578, in runcode exec(code, self.locals) File "C:----------------------------\MPh-Test\MPh-main\tests\capacitor.py", line 3, in <module> model = client.load('capacitor.mph') File "C:\Users----------\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\mph\client.py", line 322, in load model = Model(self.java.load(tag, str(file))) java.lang.java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: 'void com.comsol.nativejni.util.FlLicense.initWS0(com.comsol.nativejni.CPointer, java.lang.String)'
Hello Armin Ramezanzad
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.