COMSOL Forums: Can't plot variables defined in terms of dependent variables
http://www.comsol.com/community/forums/general/thread/32093/
Most recent forum messagesMon, 08 Oct 2012 18:29:03 +0000COMSOL Forums: Can't plot variables defined in terms of dependent variableshttp://www.comsol.com/shared/images/logos/comsol_logo.gif
http://www.comsol.com/community/forums/general/thread/32093/
Re: Can't plot variables defined in terms of dependent variables
http://www.comsol.com/community/forums/general/thread/32093/#p87645
Hi<br />
<br />
they have partially done it I believe bot not systematically, on the other hand with the x thousend pages of doc from the many modules I have the reading would probably become more difficult. <br />
You will find also many places info about backward compatibility.Not to forget the release notes<br />
These are nice to understand the evolution, but I end up to redo all my models for each new version (or finish the model in the "older one" ;)<br />
<br />
--<br />
Good luck<br />
IvarMon, 08 Oct 2012 18:29:03 +000032093.1349720943.87645Re: Can't plot variables defined in terms of dependent variables
http://www.comsol.com/community/forums/general/thread/32093/#p87617
Hi, Ivar and all:<br />
<br />
I was a bit confused too, about the "global" scope of variables. It seems that prior to COMSOL v.4 "global" meant non-adscribed particularly to any geometrical level (subdomain, boundary, or whatever): that variable was visible everywhere in the model. And, apparently, since version 4 the previous concept is called "nonlocal" (a nonlocal variable ---defined in "Model"/"Definitions"/"Vbles."--- is visible at all geometric levels, but only inside its model), and a variable visible to all models (and all geometries), defined at "Global definitions"/"Vbles.", is called "global". I have interpreted the matter that way.<br />
<br />
I would thank the COMSOL team (those in charge of documentation) to mark the new items and concepts someway. For instance, in Mathematica documentation they mark the new functionalities as "new in Mathematica x", where x is the version it appeared first.<br />
<br />
Bye,<br />
<br />
Jesus.Mon, 08 Oct 2012 12:16:18 +000032093.1349698578.87617Re: Can't plot variables defined in terms of dependent variables
http://www.comsol.com/community/forums/general/thread/32093/#p87607
Hi Jesus<br />
<br />
You are right, interesting ...,<br />
it could come from something not working 100% in the early v4 version and that I had integrated as a "rule". <br />
<br />
By adding "mod1.u" indeed you define a variable under Global Definitions that is not flagged "orange" and that can be called correctly in a plot file when referring to a valid (x,y) domain/boundary.<br />
<br />
But still it's not a "Global Variable" in my understanding (as used under Results Derived Values Global Evaluation) <br />
for me a "Global variable" is a synonym to a variable made independent to the spatial coordinates, by a pre integration over a domain or a boundary.<br />
<br />
So it's a question of definitions and sometimes COMSOL is neither not 100% coherent within the GUI and their doc, and we users get also confused ;) (like Objects and Entities ...)<br />
<br />
Again it tells us to reread carefully the doc at each release, new effects come and go ...<br />
<br />
--<br />
Good luck<br />
IvarMon, 08 Oct 2012 07:56:17 +000032093.1349682977.87607Re: Can't plot variables defined in terms of dependent variables
http://www.comsol.com/community/forums/general/thread/32093/#p87597
Hi, Ivar and Randy,<br />
<br />
I meant that if you want to define "vbar_mod" as a global variable (in "Global Definitions"), the variable "u", which is associated to model 1, should be referred to as "mod1.u", and the expression should be in this case "-mod1.u*mu/(A*H^2)".<br />
<br />
Ivar, I don't understand the int operator. Do you refer to an integration?<br />
<br />
Bye,<br />
<br />
Jesus.Mon, 08 Oct 2012 06:49:14 +000032093.1349678954.87597Re: Can't plot variables defined in terms of dependent variables
http://www.comsol.com/community/forums/general/thread/32093/#p87589
Hi<br />
<br />
I believe you must define it as int1(u)* ... as a strict Global variable, as for me a Global variable is not depending on the spatial variables (x,y,z) but might be dependent on others like the time. This because x,y,z is "Model.Geometry" dependent<br />
--<br />
Good luck<br />
IvarMon, 08 Oct 2012 03:50:04 +000032093.1349668204.87589Re: Can't plot variables defined in terms of dependent variables
http://www.comsol.com/community/forums/general/thread/32093/#p87586
Hello,<br />
<br />
Define your variable vbar_mod in Model/Definitions/Variables, not in Global Definitions/Variables. This way, you can refer to variable u simply with that name: "u". Nevertheless, you can still define vbar_mod in Global Definitions/Variables, but in that case u must be referred to as "mod1.u", or something like that.<br />
<br />
Bye,<br />
<br />
Jesus.Sun, 07 Oct 2012 19:07:01 +000032093.1349636821.87586Re: Can't plot variables defined in terms of dependent variables
http://www.comsol.com/community/forums/general/thread/32093/#p87585
Hi<br />
<br />
you are missing one important thing, "u" is not a global variable but a field its u(x,y,z,t), so your Global definition of vbar_mod is not correct<br />
<br />
your cut line defines a trajectory trough your domain, hence defines an x,y, so as this is slelected the local value of "u" can be found (as z=0 and t=0 for 2D stationary cases)<br />
<br />
What you can do is to define a Model - Definitions - Variables node and copy the vbar_mod therein and remove it from the global variable list. This makes a local variable, in fact a local field as u is a field, defined over all your domains<br />
<br />
Take care: as in COMSOL there are many places where the variables are in fact fields over (x,y,z,t) but this is implicit and not written ut fully<br />
<br />
--<br />
Good luck<br />
IvarSun, 07 Oct 2012 19:00:33 +000032093.1349636433.87585Can't plot variables defined in terms of dependent variables
http://www.comsol.com/community/forums/general/thread/32093/#p87583
I am having a problem with plotting for my simple laminar flow model. I can plot in terms of the simulation's dependent variables, but not in terms of variables that are defined in terms of the dependent variables.<br />
<br />
In other words, in my model (attached), I can plot "-u*mu/(A*H^2)", but not "vbar_mod", which is defined exactly as "-u*mu/(A*H^2)".<br />
<br />
Why is this happening?<br />
<br />
Thanks!Sun, 07 Oct 2012 17:04:54 +000032093.1349629494.87583