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.01.2010, 01:52 GMT-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.01.2010, 22:07 GMT-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.01.2010, 01:18 GMT-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