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.

Obtaining Postprocessing Data From Matlab

Please login with a confirmed email address before reporting spam

Hello,

Is there a way to display postprocessing data by running a Matlab .m file? I have figured out how to do everything else in Matlab (create geometry objects, define boundary/subdomain conditions, mesh, and solve), but the one thing I have not been able to do is obtaining post-processing data.

Specifically, I would like to find the capacitance matrix. To do this in the COMSOL GUI is very simple. I just go to Postprocessing, Data Display, Global, and select capacitance matrix.

It seems there should be a corresponding way to do this in the Matlab .m file. On an old forum, I read someone suggested to use the postinterp command:
postinterp(fem,'expr',xx)
where fem is the FEM structure, expr is the variable or expression that you want to evaluate, and xx are the coordinates where you want the variable or expression to be evaluated.

However this only seems to work for variables, such as the electric field, that depend on position and can be plotted in the GUI. Is there any way I can obtain the value for a predefined quantity in the global data display (such as the capacitance matrix)?

Thank you,
Kevin

P.S. If it is relevant I'm using COMSOL version 3.5a

1 Reply Last Post 30 gen 2011, 03:09 GMT-5
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 30 gen 2011, 03:09 GMT-5
Hi

3.5 is getting old in my mind, but from what I remember you have for matlab extraction the posteval() and postinterp() operators (the latter interpolates on your grid, wjile the first uses the mes grid) and several others. Read through the command.com, and run a few test cases on simple examples (i.e. cantelever beam or simple capacity ...)

--
Good luck
Ivar
Hi 3.5 is getting old in my mind, but from what I remember you have for matlab extraction the posteval() and postinterp() operators (the latter interpolates on your grid, wjile the first uses the mes grid) and several others. Read through the command.com, and run a few test cases on simple examples (i.e. cantelever beam or simple capacity ...) -- Good luck Ivar

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.