Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Function name

Please login with a confirmed email address before reporting spam

In V4, we can define the function name under the global definition>parameter
If water has been chosen,
For example,
Material: Water
Material properties: density (rho) and dynamic viscosity (mu)
All above has been specified by the software.

Under parameter, I would like to key in Re (Reynold number) as function name and the expression column, I key in the rho*V*L/mu. But there is showing invalid function name for 'rho' and 'mu'.
Thus, what should I key in the 'function name' that has been defined under the material properties in the parameter/ variable? Or, I still have to redefine the density and dynamic viscosity?

Looking forward to hearing from you guys.

Thanks a lot.

1 Reply Last Post 23.04.2011, 03:16 GMT-4
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 23.04.2011, 03:16 GMT-4
Hi

You should read through carefully the doc about variables and Parameters.

Parameters are normally constants (they are evaluated at start of the sequence, but might be overwritten later in the solver steps, rather an exception)

Variables are normally depending on other variables, including space coordinates and dependent variables , or Parameters and variables typically change during the solving process. They are evaluated at demand during the solving or the postprocessing

Material data are parameters, or variables grouped and used via the physics material settings. the variable rho is stored in the material section, then copied to the "rho" of the domains or boundaries. So if you refer to "rho" in the parameter section COMSOL does not understand to which "rho" you are referring to (even if you have only 1 material), furthermore rho might depend on x,y,z, or r or t or T or p ... implicitly.

In COMSOL you do not write rho(x,y,T) even if it is so, the x,y and T comes from the domain and mesh element considered during the analysis, and you define them by selecting the domains or boundaries in the GUI.

So for parameters you must define the numerical values. For variables you must use integration couplings to define the domain/boundaries to work on so that COMSOL identifies the x,yz spatial position ,and hence related T,p ...

--
Good luck
Ivar
Hi You should read through carefully the doc about variables and Parameters. Parameters are normally constants (they are evaluated at start of the sequence, but might be overwritten later in the solver steps, rather an exception) Variables are normally depending on other variables, including space coordinates and dependent variables , or Parameters and variables typically change during the solving process. They are evaluated at demand during the solving or the postprocessing Material data are parameters, or variables grouped and used via the physics material settings. the variable rho is stored in the material section, then copied to the "rho" of the domains or boundaries. So if you refer to "rho" in the parameter section COMSOL does not understand to which "rho" you are referring to (even if you have only 1 material), furthermore rho might depend on x,y,z, or r or t or T or p ... implicitly. In COMSOL you do not write rho(x,y,T) even if it is so, the x,y and T comes from the domain and mesh element considered during the analysis, and you define them by selecting the domains or boundaries in the GUI. So for parameters you must define the numerical values. For variables you must use integration couplings to define the domain/boundaries to work on so that COMSOL identifies the x,yz spatial position ,and hence related T,p ... -- 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.