Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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 4.1 plotting error message: "mphplot at 154"

Please login with a confirmed email address before reporting spam

Hello, my name is Kristian Ejlebjerg Jensen and I am able to use Comsol 4.1 and its sensitivity analysis for topology optimization with an external optimization algorithm (MMA).

My problem relates to plotting of the actual design field (the optimization runs fine, when I plot the solution variables). I have attached an example script. After the design field is updated (using the setU and createSolution functions), I try to visualize this new design field. I however get the following error

??? Subscript indices must either be real positive integers or logicals.
Error in ==> C:\programs\COMSOL41\mli\mphplot.p>l_color at 1489
Error in ==> C:\programs\COMSOL41\mli\mphplot.p>l_computecolor at 1453
Error in ==> C:\programs\COMSOL41\mli\mphplot.p>addplot at 250
Error in ==> C:\programs\COMSOL41\mli\mphplot.p>mphplot at 154

(I am not sure as to the application of the "server" option for mphplot, but I just get a blank figure, when I try to use it.)

Thanks


5 Replies Last Post Apr 15, 2011, 2:03 a.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 28, 2011, 8:43 a.m. EST
The problem is NOT solved with the recent update.
The problem is NOT solved with the recent update.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 4, 2011, 5:17 a.m. EST
I just got word that this is a bug to be fixed in Comsol 4.2.
I just got word that this is a bug to be fixed in Comsol 4.2.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 18, 2011, 2:27 a.m. EST
I have the same problem, is there no solution/work around yet?
I have the same problem, is there no solution/work around yet?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 16, 2011, 10:27 p.m. EDT

To resolve the issue in Matlab - COMSOL 4.1, you might want to try the following.

1. Define a full density field for both the design domain and the non-design domain. You could set the density value for the non-design domain however you see fit.
2. Visualize this full density field.
To resolve the issue in Matlab - COMSOL 4.1, you might want to try the following. 1. Define a full density field for both the design domain and the non-design domain. You could set the density value for the non-design domain however you see fit. 2. Visualize this full density field.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 15, 2011, 2:03 a.m. EDT
Hi Kristian,

I am working on applying topology optimization in fuel cells. However, I am facing difficulty in coding in MATLAB. I have two problems:
1. How to compute the volume below the design variable basis function (gamma)?
2. How to extract the objective sensitivity with respect to gamma from the same location where gamma is specified?

Can you please shed light on these two problems.

Regards,
Praveen
Hi Kristian, I am working on applying topology optimization in fuel cells. However, I am facing difficulty in coding in MATLAB. I have two problems: 1. How to compute the volume below the design variable basis function (gamma)? 2. How to extract the objective sensitivity with respect to gamma from the same location where gamma is specified? Can you please shed light on these two problems. Regards, Praveen

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.