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.

Post-processing query

Please login with a confirmed email address before reporting spam

Hi all,

I am looking for some help in the post-processing regarding the following points:

1. Plotting the two variable results (say stress and strain) on the X-Y graph in the transient run. How to do it?
2. Consider a 2d cantilever beam, constrained on one end and force applied on the other end. I need to take a average stress on the center of beam. How to take an average?

Please share your expertise.

Thanks in advance,
Rakesh

3 Replies Last Post 28 janv. 2010, 01:18 UTC−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 27 janv. 2010, 01:52 UTC−5
Hi

There are a few tricks with the plotting, but at least in V3.5a you have very many options, I suppose you want to do somthing like what can be found in the Cross-Section Plot parameter GUI, by playig with the "keep plot" to overlay several variables, possibly to change the default X-axis data to an expression. You cannot get absolutely everything imaginable, but most required plot are possible, with a little imagination. This does not mean that it is easy when you do 10 runs and have to reapeat the numerous mouse clicks to get out a complex plot. But this will be greatly facilitated in V4 (hey COMSL developpers get it out, even if it is not "perfect" yet ;) as you can record full sequences for later replay them without clicking as hell.

For your average, it rather easy I believe: use the "Options Integration Coupling Variable" with these integrate your desired expresson over an edge/boundary respectively sub-domain. To get out a mean value you must "just" divide the result by the length/area respectively Volume that you get by integrating "1" over the same edge/boundary respectively sub-domain.

Note that this is rather easy if you have "cut-out" your edge, boundary respectively sub-domain so you can select it as a separate item, but you can also restrict to a limited domain by multiplying your expression by a bolean expression depending on the gemetrical variables to limit the region <>0. Again do not forget to use the same bolean expresson for the length/area/volume calulation you use for normalisation.

Good luck
Ivar
Hi There are a few tricks with the plotting, but at least in V3.5a you have very many options, I suppose you want to do somthing like what can be found in the Cross-Section Plot parameter GUI, by playig with the "keep plot" to overlay several variables, possibly to change the default X-axis data to an expression. You cannot get absolutely everything imaginable, but most required plot are possible, with a little imagination. This does not mean that it is easy when you do 10 runs and have to reapeat the numerous mouse clicks to get out a complex plot. But this will be greatly facilitated in V4 (hey COMSL developpers get it out, even if it is not "perfect" yet ;) as you can record full sequences for later replay them without clicking as hell. For your average, it rather easy I believe: use the "Options Integration Coupling Variable" with these integrate your desired expresson over an edge/boundary respectively sub-domain. To get out a mean value you must "just" divide the result by the length/area respectively Volume that you get by integrating "1" over the same edge/boundary respectively sub-domain. Note that this is rather easy if you have "cut-out" your edge, boundary respectively sub-domain so you can select it as a separate item, but you can also restrict to a limited domain by multiplying your expression by a bolean expression depending on the gemetrical variables to limit the region 0. Again do not forget to use the same bolean expresson for the length/area/volume calulation you use for normalisation. Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 27 janv. 2010, 22:07 UTC−5
Thanks for the explanation Ivar.

I am learning Matlab commands for Comsol. I want to access the dependent variables (say u, v and w) in the Matlab. But the matlab command - fem.sol.u displays the values of all variables u,v and w at all the time in the transient simulation.

How to access and store the each variable u, v and w separately at the particular node for the whole transient run and then plot it in Matlab ?
Also I have defined some global expression in the Comsol. Will it be expressed in the same way as that of dependent variables?

Please share your expertise.

Thanks in advance,
Rakesh
Thanks for the explanation Ivar. I am learning Matlab commands for Comsol. I want to access the dependent variables (say u, v and w) in the Matlab. But the matlab command - fem.sol.u displays the values of all variables u,v and w at all the time in the transient simulation. How to access and store the each variable u, v and w separately at the particular node for the whole transient run and then plot it in Matlab ? Also I have defined some global expression in the Comsol. Will it be expressed in the same way as that of dependent variables? Please share your expertise. Thanks in advance, Rakesh

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 28 janv. 2010, 01:18 UTC−5
Hi

take a look at the discussion about effective modal mass, search for :

Matlab script for effective modal mass extraction

the colums are the different dependent variables for all nodes per row, s usual with FEM to get your way in the geometry you must handle the indexes and the indexes of indexes ...

Good luck
Ivar
Hi take a look at the discussion about effective modal mass, search for : Matlab script for effective modal mass extraction the colums are the different dependent variables for all nodes per row, s usual with FEM to get your way in the geometry you must handle the indexes and the indexes of indexes ... 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.