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.

Variable defining/refering

Please login with a confirmed email address before reporting spam

I am going through some of available examples of models and and I have some difficulty understanding syntax of certain variables' references such as tpf.G0i, chds.ndflux_c, chns.G0i, nitf.rho or chns.Vf2. The bit before dot is obvious (physics ID), but how do you identify the part after it?
I went through the part of manual on variables (from COMSOL Multi. User Guide) but somehow it did not clarify it. For instance in one place I found what ndflux is (Normal conductive heat flux), but what does it mean with _c at the end? Or where does rho come from (no such variable appears in the model, only symbolic). Same for G0i or Vf2.

I know what some of you may think right now (RTFM), but I kindly ask for a more specific answer. Actually the relevant part of manual would be nice, but one that actually DOES mention such construction and variables above.

Thank you,
Mike

7 Replies Last Post 12 gen 2015, 04:20 GMT-5
COMSOL Moderator

Hello Mike Brown

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Mohammad Hossein Babaei

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 dic 2011, 11:13 GMT-5
Hi, Did you find any answer for your question? I need to know wat tpf.G0i is, too. Thanks...
Hi, Did you find any answer for your question? I need to know wat tpf.G0i is, too. Thanks...

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 20 dic 2011, 03:21 GMT-5
Hi

have you tried an indexed search of the doc ? Mostly you get to the values there, then where I search is in the equation view. OK COMSOL does still not allow us to sort them in alphabetic order so it takes time, but everything is in there, including their definition. ("rho" is the generic name for the material density)

--
Good luck
Ivar
Hi have you tried an indexed search of the doc ? Mostly you get to the values there, then where I search is in the equation view. OK COMSOL does still not allow us to sort them in alphabetic order so it takes time, but everything is in there, including their definition. ("rho" is the generic name for the material density) -- Good luck Ivar

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20 dic 2011, 05:27 GMT-5
Hi,

Activating the Equation View from the Show menu at the top of the Model Builder window gives you access to Equation View subnodes under each node in the physics interface branches. In the Equation View nodes' Settings windows, the Variables table includes all variables that the physics interface defines for that feature, include the expression, unit, and description. In general, the documentation does not list all variables that a physics interface includes.

Specifically,

tpf.G0i (and chns.G0i) is an auxiliary initial interface distance variable for the two-phase flow (tpf) interfaces.

chds.ndflux_c is the normal diffusive flux for species "c" in a Transport of Diluted Specied (chds) interface.

chns.Vf2 is the volume fraction of fluid 2 in a two-phase flow interface.

Best regards,
Magnus Ringh, COMSOL

Hi, Activating the Equation View from the Show menu at the top of the Model Builder window gives you access to Equation View subnodes under each node in the physics interface branches. In the Equation View nodes' Settings windows, the Variables table includes all variables that the physics interface defines for that feature, include the expression, unit, and description. In general, the documentation does not list all variables that a physics interface includes. Specifically, tpf.G0i (and chns.G0i) is an auxiliary initial interface distance variable for the two-phase flow (tpf) interfaces. chds.ndflux_c is the normal diffusive flux for species "c" in a Transport of Diluted Specied (chds) interface. chns.Vf2 is the volume fraction of fluid 2 in a two-phase flow interface. Best regards, Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 7 gen 2012, 13:06 GMT-5
This is very helpful,

Thanks for your comments.
I have a similar question about calling a variable or domain probe. Let say I want to average T on a boundry in domain A and use it in expression for its adjacent domain(B) in an expression for heat source.

How can I define this average and call it?

Thanks,
Siamak
This is very helpful, Thanks for your comments. I have a similar question about calling a variable or domain probe. Let say I want to average T on a boundry in domain A and use it in expression for its adjacent domain(B) in an expression for heat source. How can I define this average and call it? Thanks, Siamak

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 7 gen 2012, 18:29 GMT-5
Hi

The reuse of dependent variables, such as T (defined as a field) requires a projection operator to define it, still as a field, but "projected" onto another entity, by a known projection law.

But for you case, you want an average temperature over an element, i.e. a boundary. That you can define as a Variable (independent of the coordinates x,y,z) by using a Define Variable (global) and equal it to the myT = aveop1(T), where aveop1() is an operator defined in the "Definition coupling operator, average" section, where you specify the entities (boundaries) where you want to average. Then myT can be called everywhere within the model, also to define the temperature along another boundary. Note this makes the model non-linear

--
Good luck
Ivar
Hi The reuse of dependent variables, such as T (defined as a field) requires a projection operator to define it, still as a field, but "projected" onto another entity, by a known projection law. But for you case, you want an average temperature over an element, i.e. a boundary. That you can define as a Variable (independent of the coordinates x,y,z) by using a Define Variable (global) and equal it to the myT = aveop1(T), where aveop1() is an operator defined in the "Definition coupling operator, average" section, where you specify the entities (boundaries) where you want to average. Then myT can be called everywhere within the model, also to define the temperature along another boundary. Note this makes the model non-linear -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 9 gen 2015, 13:48 GMT-5
Magnus- Thank you for this insight. It is not complete, however. I have worked Model Gallery example 6192 (evaporative cooling of water) in the hope that I would learn what I need for another problem. In this model the COMSOL variable ht.psat is used without explanation. This variable does not appear in the Equation View node. Nor does it appear in any of the PDF documentation that I have searched. How do we learn about these things so that it becomes possible to use COMSOL in a reasonable way?
Magnus- Thank you for this insight. It is not complete, however. I have worked Model Gallery example 6192 (evaporative cooling of water) in the hope that I would learn what I need for another problem. In this model the COMSOL variable ht.psat is used without explanation. This variable does not appear in the Equation View node. Nor does it appear in any of the PDF documentation that I have searched. How do we learn about these things so that it becomes possible to use COMSOL in a reasonable way?

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 12 gen 2015, 04:20 GMT-5
Hi,

ht.psat is the saturation pressure, and that variable is defined in the Equation View node under Heat Transfer in Fluids>Heat Transfer in Fluids 2. In the model documentation, the definition of the concentration on page 2 is that "the source term for water vapor at the water surface is given by the ideal gas law at saturation pressure." That expression is what you type in as the species concentration in Concentration 2 as ht.psat/(R_const*T), where T is the temperature, and R_const in a built-in physical constant for the universal gas constant.

Best regards,
Magnus Ringh, COMSOL
Hi, ht.psat is the saturation pressure, and that variable is defined in the Equation View node under Heat Transfer in Fluids>Heat Transfer in Fluids 2. In the model documentation, the definition of the concentration on page 2 is that "the source term for water vapor at the water surface is given by the ideal gas law at saturation pressure." That expression is what you type in as the species concentration in Concentration 2 as ht.psat/(R_const*T), where T is the temperature, and R_const in a built-in physical constant for the universal gas constant. Best regards, Magnus Ringh, COMSOL

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.