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.

ID of physics in Livelink for matlab

Please login with a confirmed email address before reporting spam

Hi,

Where can I find the ID of a physics feature? I for example want to make a prescribed displacement in Comsol. Usually it works to just make 'Terminal' of a terminal, but I tried 'PrescribedDisplacement' but it doesn't work, so I guess it is called differently. If I try for example a 'BodyLoad' it does work.

model.physics('mech').create('fixedCond','PrescribedDisplacement',2);
gives:
Unknown feature ID: PrescribedDisplacement

I looked in the comsol programming reference, the introduction to livelink and the livelink for matlab reference guid, but wasn't able to find anything. I also looked with the MPHnavigator in the physics object, but this wasn't usefull either.

Does anybody know where to find this?

2 Replies Last Post Feb 10, 2017, 5:40 a.m. EST

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Feb 7, 2017, 3:50 p.m. EST
I found it:p It's really simple. You have open comsol normally and make the physics object. The press the right mouse button while having your mouse on the physics feature in the model builder. The go to copy as code to clipboard -> create. That's it.

imgur.com/a/1U2iT
I found it:p It's really simple. You have open comsol normally and make the physics object. The press the right mouse button while having your mouse on the physics feature in the model builder. The go to copy as code to clipboard -> create. That's it. http://imgur.com/a/1U2iT

Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Feb 10, 2017, 5:40 a.m. EST
Hi

Physics and physics settings are poorly documented. The best way, as you have found, it to add the physics and its settings to your model and either use the Copy As Code or use File->Save As to save the model as an M-file.

You can also open the model in Matlab and use mphnavigator to view the properties and values for nodes in your model.


--
Lars Gregersen
Comsol Denmark
Hi Physics and physics settings are poorly documented. The best way, as you have found, it to add the physics and its settings to your model and either use the Copy As Code or use File->Save As to save the model as an M-file. You can also open the model in Matlab and use mphnavigator to view the properties and values for nodes in your model. -- Lars Gregersen Comsol Denmark

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.