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.
Access Model Temperature Values? - COMSOL 5.0
Posted 7 avr. 2015, 22:48 UTC−4 Heat Transfer & Phase Change, Computational Fluid Dynamics (CFD), Materials, Modeling Tools & Definitions, Parameters, Variables, & Functions Version 5.2a 4 Replies
Please login with a confirmed email address before reporting spam
IC = 40.25*exp(-1000/T)
Unfortunately, COMSOL refuses to recognize 'T' or 'mod1.T' as proper representations of the temperature. Is it no longer possible to define material properties and global variables by the model temperature? If anyone has any insights, I would be extremely grateful!
Please login with a confirmed email address before reporting spam
Of course it's possible in COMSOL to define material properties and global variables (these last ones by integration or similar operations) by the model temperature!!
Please, be careful: you talk of Global variable: that's a variable independent on the position, that takes a unique value for all the geometry, and surely your IC variable is not such a variable.
In other words, the key is what T is for COMSOL (I mean for COMSOL running your model). If you are solving a heat problem, T is usually the name of the dependent variable (you can check that in the physics node, dependent variables field, at the end), and COMSOL will recognize it. I suppose that's your case. If that is the case, T is not a global variable, but a local one (depending on position, and on t if the study is time dependent). So your variable IC = 40.25*exp(-1000/T) could be defined as such: a variable (inside Component/Definitions/Variables). In that case, IC is local, not global.
Or perhaps T (and IC) for you is not a local variable, but a representative one, like an average. In that case, you could define such a variable in Definitions/Component couplings/Average. If such, use a name different from those of the variables and parameters already defined in your model (and different from the names of COMSOL constants, parameters and operators).
Jesus.
Please login with a confirmed email address before reporting spam
"T" (Temperature) is not defined as such before you have added some physics and that you have passed through (or solved/initiated) the physics node and or solver node.
My way around is to define a Definition - Parameter "T" i.e as 20[degC]", this Parameter value will be overriden by the dependent variable "T", if defined later in any physics, if not, then my Parameter "T" solves any dimensional and reference issues for COMSOL
I use this also for "t" (with default t=0[s]) time when I mix a stationary solver followed by a time depedent solver, to avoid redefining all BCs for each case, when these are dependent on the variable "t" time (again an internal variable only existing for COMSOL once you have set up a physics and a time dependent solver that has been "initialised").
Furthermore, you need to learn clearly the differences between scalars variables, field variables f(x,y,z,t), global variables f(t) etc. as by default in COMSOL writing notation you OMIT the spatial and time dependences; as well as the implicit dx*dy*dz on all related operators. They all look the same, only the context will explain what applies. But with the handy "Unit" logic of COMSOL you can pin-point clearly any discrepancies
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Does calling the temperature, 'T', not evaluate the parameter at the given point in space? I usually deal with incompressible fluids so I usually evaluate velocity first, then temperature, and finally other desired parameters. So I usually want COMSOL to evaluate the formula for the ionic conductivity at each point within my material. I though that calling 'T' in a variable passed to a new material property would accomplish this, but I may be wrong.
Please login with a confirmed email address before reporting spam
Older versions of COMSOL had a shared variable: T for Temperature.
As seen here:
Inline image 1
New versions do not have the "T" dependent variable.
That is why when I try to use it I get this error message: Inline image 2
I have tried to assign and initial value for T under the global parameters so that it can get overridden by other heating sources later but I am still receiving the same error.
How can I create a dependent variable for Temperature in COMSOL 4.4?
Thank you for your time !
Best Regards,
Laura Arciniegas
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.
