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.

Comsol in Matlab

Please login with a confirmed email address before reporting spam

Hi All,

I am new to comsol and am trying to use it to simulate a diffusion based system with adsorption.

I have managed to do this for a single geometry (a geometry of a 2d plane with holes removed) but i would like to be able to generate a random placement of the holes, and perform the calculation multiple times. This seems like a problem best tackled using comsol in matlab, as loops are easily implemented in matlab, and it is easy to generate random geometry.

I am having a problem running comsol in matlab. Using the command "comsol40a server matlab" opens matlab with a comsol server. However when I run one of the library models i recieve the following output

ans =

Type: Root
Tag: Model
Identifier: root

Having viewed the output in the GUI in comsol I cannot see the results in matlab.

In addition to this, when using other models that I have created, which work in comsol, I occasionally get stack trace erros and java exception errors.

This may be a trivial error but I am very new to both comsol and matlab. I am using comsol version40a and matlab 2010b

3 Replies Last Post 19 ott 2010, 11:38 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 ott 2010, 10:39 GMT-4
Hi,

It looks like a similar problem I was having.

I had specified the wrong installation root. ie when installing comsol it asks where matlab is installed. Which is perhaps what is going on here looking at the output your getting. Mine was specified as:

Computer>OS(C:)>Program Files>MATLAB>R2010a>bin

when it should have been:

Computer>OS(C:)>Program Files>MATLAB>R2010a

Its maybe something similar, hope it helps,

Chris
Hi, It looks like a similar problem I was having. I had specified the wrong installation root. ie when installing comsol it asks where matlab is installed. Which is perhaps what is going on here looking at the output your getting. Mine was specified as: Computer>OS(C:)>Program Files>MATLAB>R2010a>bin when it should have been: Computer>OS(C:)>Program Files>MATLAB>R2010a Its maybe something similar, hope it helps, Chris

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 ott 2010, 11:01 GMT-4
first You need to explicitly import whatever you want to see//postprocess using mphXYZ commands from matlab, as explained in the livelink doc
JF
first You need to explicitly import whatever you want to see//postprocess using mphXYZ commands from matlab, as explained in the livelink doc JF

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 ott 2010, 11:38 GMT-4
Thanks for the swift replies, I have been handed a full documentation of the live link and have started reading through it, but havent reached that part so far.
Thanks for the swift replies, I have been handed a full documentation of the live link and have started reading through it, but havent reached that part so far.

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.