Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
28 oct. 2010, 04:58 UTC−4
if you export the fem from COMSOL to MATLAB, you can see the fem in workspace.
in fem, there are information about mesh, geometry, results(if you export fem after solving) so on.
so just click file> save the workspace in MATLAB.
and then, You can access the data without import/export. Just load the file~.
that's all.;;;;;;;;
if you export the fem from COMSOL to MATLAB, you can see the fem in workspace.
in fem, there are information about mesh, geometry, results(if you export fem after solving) so on.
so just click file> save the workspace in MATLAB.
and then, You can access the data without import/export. Just load the file~.
that's all.;;;;;;;;
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
28 oct. 2010, 08:00 UTC−4
if you export the fem from COMSOL to MATLAB, you can see the fem in workspace.
I load the model using mphload. This only returns a name chosen (e.g. "model"). This is the only information I get. The model inspector does not return any information. Btw, I use Comsol 4.0a.
in fem, there are information about mesh, geometry, results(if you export fem after solving) so on.
I can get this information using mpheval, however I don't get the data from the postprocessing plot. However now I could use Matlabs own functions to make an interpolation on a series of lines...
In general my problem is a bit more complicated. I want to trace (using Matlab) several hundred/thousand lines in the 3D space and use the derived data (temperature along the trace) to calculate optical properties etc. Basically I wanted Comsol to do the job tracing my rays and evaluating the temperature on the trace.
But I start to think that it might be more easy and faster to do the interpolation using Matlab.
But thanks a lot for the help!
[QUOTE]
if you export the fem from COMSOL to MATLAB, you can see the fem in workspace.
[/QUOTE]
I load the model using mphload. This only returns a name chosen (e.g. "model"). This is the only information I get. The model inspector does not return any information. Btw, I use Comsol 4.0a.
[QUOTE]
in fem, there are information about mesh, geometry, results(if you export fem after solving) so on.
[/QUOTE]
I can get this information using mpheval, however I don't get the data from the postprocessing plot. However now I could use Matlabs own functions to make an interpolation on a series of lines...
In general my problem is a bit more complicated. I want to trace (using Matlab) several hundred/thousand lines in the 3D space and use the derived data (temperature along the trace) to calculate optical properties etc. Basically I wanted Comsol to do the job tracing my rays and evaluating the temperature on the trace.
But I start to think that it might be more easy and faster to do the interpolation using Matlab.
But thanks a lot for the help!
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
12 nov. 2010, 16:57 UTC−5
I am having the same difficulty....running COMSOL4.0a with LiveLink for MATLAB
Here's what I can add:
I can use mpheval (From page 96 of the Livelink for MATLAB Manual 4.0a) to get data into a structure where I can see it MATLAB...the trouble is that I have to know the variable name I want to get...I can find out the variable names by using the COMSOL desktop and adding variables to output figures, but I'd like a better way to do this?
Given a model sturcture in is it possible to determine what output variables exist?
Is there documentation someplace that lists the output variables created?
I am having the same difficulty....running COMSOL4.0a with LiveLink for MATLAB
Here's what I can add:
I can use mpheval (From page 96 of the Livelink for MATLAB Manual 4.0a) to get data into a structure where I can see it MATLAB...the trouble is that I have to know the variable name I want to get...I can find out the variable names by using the COMSOL desktop and adding variables to output figures, but I'd like a better way to do this?
Given a model sturcture in is it possible to determine what output variables exist?
Is there documentation someplace that lists the output variables created?
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
5 janv. 2011, 12:17 UTC−5
Hi all,
I know that in the Matlab Livelink you can extract data at specific boundaries, edges, or points using the "mphinterp" command (See page 137 in the Matlab Livelink User's guide for a description). This command allows you to interpolate the COMSOL solution at any location you desire, even if that coordinate does not correspond to a particular element in the solution. Now, for a parametric sweep like you are discussing, i believe that you can set up a for loop in matlab and run the parametric sweep that way. This way, in the for loop, you can store the information gathered from the mphinterp command in a matrix and postproccess it in any way you'd like.
Hope that helps!
Devin
Hi all,
I know that in the Matlab Livelink you can extract data at specific boundaries, edges, or points using the "mphinterp" command (See page 137 in the Matlab Livelink User's guide for a description). This command allows you to interpolate the COMSOL solution at any location you desire, even if that coordinate does not correspond to a particular element in the solution. Now, for a parametric sweep like you are discussing, i believe that you can set up a for loop in matlab and run the parametric sweep that way. This way, in the for loop, you can store the information gathered from the mphinterp command in a matrix and postproccess it in any way you'd like.
Hope that helps!
Devin