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.

Error to initialize a physics interface created with Physics Builder in LiveLink for Matlab

Please login with a confirmed email address before reporting spam

Hi all,
I am trying to compile with LiveLink for Matlab (Matlab version MATLAB_R2012a) a Comsol model (Comsol version COMSOL 4.3.0.151) that uses a physics interface which I created with the Physics Builder.

I have already exported the physics interface as a plugin and included it into the COMSOL installation. It works in Comsol. The problem is when I try to compile the *.m-file in Matlab. Errors are as follows:

Error using com.comsol.model.impl.PhysicsListImpl/create
Java exception occurred:
Exception:
    com.comsol.util.exceptions.FlException: Unknown physics interface
    (rethrown as com.comsol.util.exceptions.FatalReInitializeException)
Messages:
    Failed to initialize physics interface

    Unknown physics interface
    - Physics interface: PhysicsInterfaceName

Stack trace:
    at com.comsol.model.internal.physics.impl.PhysicsImpl.a(Unknown Source)
    at com.comsol.model.internal.physics.impl.PhysicsImpl.initialize(Unknown Source)
    at com.comsol.model.internal.impl.PhysicsListImpl.a(Unknown Source)
    at com.comsol.model.internal.impl.PhysicsListImpl.a(Unknown Source)
    at com.comsol.model.internal.impl.PhysicsListImpl$d.a(Unknown Source)
    at com.comsol.model.internal.impl.PhysicsListImpl$d.execute(Unknown Source)
    at com.comsol.model.clientserver.ClientManagerImpl$d.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: Exception:
    com.comsol.util.exceptions.FlException: Unknown physics interface
Messages:
    Unknown physics interface
    - Physics interface: PhysicsInterfaceName

at com.comsol.model.applapi.ApplModeCreatorManager.getApplID(Unknown Source)
    at com.comsol.model.applapi.ApplModeCreatorManager.create(Unknown Source)
    ... 12 more

Error in test_43 (line 20)
model.physics.create('TagName', 'PhysicsInterfaceName', 'GeometryName');

Does anyone have a similar problem?

Thank's in advance,

Savitri

5 Replies Last Post 06.11.2015, 14:57 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18.12.2012, 13:04 GMT-5
Comsol support has already solved my problem:

1. Export the plugin under the name com.comsol.myplugin.jar instead of just
myplugin.jar

2. Copy this plugin (as usual) into the plugins folder in your installation
directory

3. Add the line

com.comsol.myplugin.jar

to the file comsolpath.txt which you find in the 'bin' folder in your
installation directory. Make sure you do not overwrite any of the existing
lines.
Comsol support has already solved my problem: 1. Export the plugin under the name com.comsol.myplugin.jar instead of just myplugin.jar 2. Copy this plugin (as usual) into the plugins folder in your installation directory 3. Add the line com.comsol.myplugin.jar to the file comsolpath.txt which you find in the 'bin' folder in your installation directory. Make sure you do not overwrite any of the existing lines.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18.02.2013, 03:42 GMT-5
Hello Savitri,
how do you compile your "Development Files"?
The PhysicsInterfaceBuilderUsersGuide tells:
"When you are satisfied with a collection of builder files, you can compile them into a builder archive."
"When your interface is finalized and you are ready to distribute it to others, you can compile all development files into a builder archive."

-> But it gives no details about how to do it.
comsolcompile integration.mphdev
leads to:
error: Class names, 'integration.mphdev', are only accepted if annotation proces
sing is explicitly requested
1 error

Thanks for any help
Matthias
Hello Savitri, how do you compile your "Development Files"? The PhysicsInterfaceBuilderUsersGuide tells: "When you are satisfied with a collection of builder files, you can compile them into a builder archive." "When your interface is finalized and you are ready to distribute it to others, you can compile all development files into a builder archive." -> But it gives no details about how to do it. comsolcompile integration.mphdev leads to: error: Class names, 'integration.mphdev', are only accepted if annotation proces sing is explicitly requested 1 error Thanks for any help Matthias

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18.02.2013, 04:10 GMT-5
Hello Matthias,
Are you creating your Physics interface with COMSOL Java API?
If you create the Physics Interface directly with COMSOL it´s direct to compile the archive. You have to right click the "Development Files" and click "Compile to archive folder".
I hope I have understood your question,
Savitri
Hello Matthias, Are you creating your Physics interface with COMSOL Java API? If you create the Physics Interface directly with COMSOL it´s direct to compile the archive. You have to right click the "Development Files" and click "Compile to archive folder". I hope I have understood your question, Savitri

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18.02.2013, 04:19 GMT-5
Simple options are sometimes hard to find.
-> Maybe a relocation of the "Compile to Archive" Symbol - or a toolbar for the Modelbuilder could make things easier to find.

Thanks
Simple options are sometimes hard to find. -> Maybe a relocation of the "Compile to Archive" Symbol - or a toolbar for the Modelbuilder could make things easier to find. Thanks

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 06.11.2015, 14:57 GMT-5
Hello guys,

I have seen your post, and I ask you a question, as you might be able to help me.

I would like to compile matlab codes using that use Comsol 5.1 with LiveLink into executable files. I tried with the Matlab Compiler but without success. Do you have an idea how to operate, or a link to a website that describes the procedure ?


Thank you very very much,

Mat.
Hello guys, I have seen your post, and I ask you a question, as you might be able to help me. I would like to compile matlab codes using that use Comsol 5.1 with LiveLink into executable files. I tried with the Matlab Compiler but without success. Do you have an idea how to operate, or a link to a website that describes the procedure ? Thank you very very much, Mat.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.