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.

posteval command

Please login with a confirmed email address before reporting spam

Dear all,
I am trying to evaluate a normal diffusion flux of a certain quantity (say variable u) through the internal boundary (say the edge number [5]) in my comsol script (matlab framework, model is in 2D, comsol version is 3.4).
I guest I should use the "posteval" command in the form posteval(fem,'ndflux_u_certainmode',...), but the sintaxis is not clear.
Can someone suggest me what is the way to describe this in the script.
Thank you,
Ismail

2 Replies Last Post Feb 6, 2010, 5:14 a.m. EST
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 Feb 6, 2010, 4:40 a.m. EST
Hi

Indeed you have "posteval" for evaluation over boundaries, and "postinterp" for interpolation over a line, area etc, and finally "postplot" for plotting, the latter has similar function call variables, for a different output.

These are rather complex functions as you get structures out and you have many options in. I do not use them often enough to learn all that by hart, I tend to stick to the COMSOL GUI, as often I do not have the time to go deep enough into complex matlab prcessing. As an engineer in a development lab my requests for anlysis are always "for yesterday", no time to make nice plots or fancy calculations, unfortunately. Even if I blieve its worth to master these functions well.

So each time I must use these functions, I restart my indexed search on the pdf docs and look for the descriptions and the many examples scattered all around, and I study the "m" files and history files of my models, specially I use the plot file notations to study the call variables.

For the output analysis, start with a simple example, until you get hand on the structure and the order of the elements.

And if you write up a nice cookbook, with further examples, pls post it here, it could help us other too ;)

Good luck
Ivar
Hi Indeed you have "posteval" for evaluation over boundaries, and "postinterp" for interpolation over a line, area etc, and finally "postplot" for plotting, the latter has similar function call variables, for a different output. These are rather complex functions as you get structures out and you have many options in. I do not use them often enough to learn all that by hart, I tend to stick to the COMSOL GUI, as often I do not have the time to go deep enough into complex matlab prcessing. As an engineer in a development lab my requests for anlysis are always "for yesterday", no time to make nice plots or fancy calculations, unfortunately. Even if I blieve its worth to master these functions well. So each time I must use these functions, I restart my indexed search on the pdf docs and look for the descriptions and the many examples scattered all around, and I study the "m" files and history files of my models, specially I use the plot file notations to study the call variables. For the output analysis, start with a simple example, until you get hand on the structure and the order of the elements. And if you write up a nice cookbook, with further examples, pls post it here, it could help us other too ;) Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 6, 2010, 5:14 a.m. EST
Thank you Ivar,

I just tried the postevai command in the following way:

pd = posteval(fem,'ndflux_u_certainmode','Dl',5,'Edim',1);

It seems it works. After pd is calculated, pd.p field gives the points along the edge [5], and field pd.d gives the required data at these points along the [5].

Best wishes,
Ismail R.
Thank you Ivar, I just tried the postevai command in the following way: pd = posteval(fem,'ndflux_u_certainmode','Dl',5,'Edim',1); It seems it works. After pd is calculated, pd.p field gives the points along the edge [5], and field pd.d gives the required data at these points along the [5]. Best wishes, Ismail R.

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.