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.
Calculating the heat stored in a solid sub-domain
Posted Apr 20, 2012, 9:28 a.m. EDT 10 Replies
Please login with a confirmed email address before reporting spam
I am solving a time-dependent heat transfer problem on a solid domain. The specific heat capacity (Cp) is a function of temperature. I would like to calculate the amount of heat stored in specific sub-domains as a function of time. Since Cp is not constant, I need to perform a temperature integration on Cp before I do a domain integration.
How can I do this in COMSOL? Any ideas/help would be greatly appreciated.
Thanks.
Ismail
Please login with a confirmed email address before reporting spam
I would say: in the Results add a domain integration of ht.Cp*T*ht.rho, but check it this varaible is not already defined by default by COMSOL ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Hi
I would say: in the Results add a domain integration of ht.Cp*T*ht.rho, but check it this varaible is not already defined by default by COMSOL ;)
--
Good luck
Ivar
Hi Ivar,
Thank you for your reply. Your suggestion would work just fine if Cp was constant. In my case Cp is a function of temperature. Therefore, in order to calculate the amount of heat stored, I think I need to calculate the area under the Cp versus Temperature curve (i.e. integrating Cp with respect to temperature) before I do a domain integration. This is the generalized form of enthalpy (H) definition.
H = integral (Cp . dT)
How can I do this in COMSOL?
Thanks again.
Ismail
Please login with a confirmed email address before reporting spam
if Cp is defined a Cp(T,p, ...) then COMSOl will map directly the Cp per element and per T corresponding to that elements, so I do not believe you need anything else than to write out the formula.
Now if you have defined Cp as a variable or an analytical function you need to integrate your_Cp(T)*T*ht.rho over the domain, all three of these are not truely varaibles but fields, with implicit Cp(T,p,x,y,z ...) variables, bit not shown in COMSOL notation convention
Test it out on a simple 2D example with "simple" known values to get convinced. The nice thing with COMSOl it's so easy to test the math underlaying by simple examples ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
In my case Cp is a function of temperature and I define it via an interpolation (data source: table) under "Global Definitions" in COMSOL:
Cp(T)
And yes, at any given time point, there is a temperature distribution on my domain and we can calculate the corresponding Cp(T) distribution with no problem.
The question arises when we try to calculate the heat added into our domain:
heat added = (enthalpy at current time) - (enthalpy at time = 0)
Lets say temperature at time = 0 is T0 and the temperature at current time is T. Then,
heat added = integral of Cp(T)*dT (integrated from T0 to T)
Since Cp is not constant, the following is not true:
heat added = Cp(T)*T - Cp(T0)*T0
Yes, we can calculate Cp(T)*T in COMSOL for any given time point, but how can we take the following integral in COMSOL?
heat added = integral of Cp(T)*dT (integrated from T0 to T)
Thank you for your help.
Ismail
Please login with a confirmed email address before reporting spam
Ok now I understand you better ;) And you are perfectly right, it's not the same
then I would say define a global dependent variable via its time derivative and have COMSOL integrate it over your time dependent solver case t. I believe that is the closest you can get.
And if I remember right the KB (knowledge base) has some entries on this too, try a search on time derivatives
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Thanks again!
Ismail
Please login with a confirmed email address before reporting spam
that is what I understand what COMSOl does if you define a global dependent variable as the integration of Cp(T)*T,
and write out the equations as a derivative. Then after a time "t" the resulting value is a time integation of the stored energy at each moment
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
We want to calculate:
integral of Cp(T)*dT
Per your suggestion, we can write the following by making use of the chain rule:
Cp(T)*dT = Cp(T)*(dT/dt)*dt
Then:
temperature integral of Cp(T) = time integral of Cp(T)*(dT/dt)
Great! Do you know the expression in COMSOL for the time derivative of temperature (i.e. dT/dt)?
Thanks!
Ismail
Please login with a confirmed email address before reporting spam
It looks like Tt is the first time derivative of temperature in COMSOL.
Thanks again for all your help!
Ismail
Please login with a confirmed email address before reporting spam
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.
Suggested Content
- FORUM Challenges in Simulating Reflectance of Glass and Silver Layers at Sub-120 nm Scale
- KNOWLEDGE BASE Solving Models with Step Changes to Loads in Time
- KNOWLEDGE BASE Error: Failed to Find a Solution. Returned Solution is Not Converged
- KNOWLEDGE BASE Manually Setting the Scaling of Variables
- BLOG Video Tutorial: Introduction to Modeling Structural Mechanics