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
Posted Jan 30, 2011, 2:08 a.m. EST 1 Reply
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
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 Jan 30, 2011, 3:09 a.m. EST