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.

Coupling heat transfer with an ODE

Please login with a confirmed email address before reporting spam

Hi all,

I am working on a problem that involves solving temperature (T)- and a new dimensionless variable called conversion (alpha). These variables need to be solved simultaneously, since T=f(alpha) and alpha=f(T). Here is the ODE for alpha:

dalpha/dt=C*exp(B/T)(1-alpha)

where A,B are constants and T is the Temperature; alpha on the other hand is dimensionless. I used the heat transfer module and I inserted alpha using the global ODE module. My problem is that when I define the new variable alpha as a function of T, COMSOL does not recognize T, and I get the following error:

Undefined variable.
- Variable: comp1.T
- Global scope:
Failed to evaluate expression.
- Expression: comp1.T
- Feature: Time-Dependent Solver 1 (sol1/t1)

Any thoughts on how to couple an ODE that defines a new variable with a variable already defined in COMSOL, in this case Temperature=T. I have attached a simplified version of my problem.

Thank you


6 Replies Last Post 2016年5月18日 GMT-4 09:20
Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年8月18日 GMT-4 03:48
Hi,

The temperature T is a field variable, defined in the 2D domain as a field T(x,y,t). In order to use a temperature in the ODE, you need to use a scalar value such as the average temperature or the temperature in a point in the 2D geometry. For example, to use the average temperature, define an Average coupling operator aveop1 in all domains and then replace T with aveop1(T) in the ODE.

Best regards,
Magnus Ringh, COMSOL
Hi, The temperature T is a field variable, defined in the 2D domain as a field T(x,y,t). In order to use a temperature in the ODE, you need to use a scalar value such as the average temperature or the temperature in a point in the 2D geometry. For example, to use the average temperature, define an Average coupling operator aveop1 in all domains and then replace T with aveop1(T) in the ODE. Best regards, Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年8月18日 GMT-4 13:23
Hi Magnus,

I work with John. We need alpha to change through our thickness based on the changing temperature T produced by the heat transfer, but so far, it's not coupling correctly.

Preferably, we want to come as close as we can to including a scalar value of T in our alpha equation. Which scalar coupling technique (maximum, minimum, integration, average) would best suit this purpose? Which boundaries/domains/points would we use when we implement this feature? So far, we have tried a few variations with the features and boundaries/domains/points that they utilize, but we could use some guidance.

Thank you
Hi Magnus, I work with John. We need alpha to change through our thickness based on the changing temperature T produced by the heat transfer, but so far, it's not coupling correctly. Preferably, we want to come as close as we can to including a scalar value of T in our alpha equation. Which scalar coupling technique (maximum, minimum, integration, average) would best suit this purpose? Which boundaries/domains/points would we use when we implement this feature? So far, we have tried a few variations with the features and boundaries/domains/points that they utilize, but we could use some guidance. Thank you

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年8月19日 GMT-4 02:08
Hi,

It's hard to tell what scalar temperature that is applicable in your case. I suggest that you contact us at support@comsol.com for full technical support.

Best regards,
Magnus Ringh, COMSOL
Hi, It's hard to tell what scalar temperature that is applicable in your case. I suggest that you contact us at support@comsol.com for full technical support. Best regards, Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年10月20日 GMT-4 21:02
Hi. I am a beginner in comsol and is facing the similar problem as John. I am modelling heat transfer and would like to use the resultant temperature obtained in my ODE. May i know how can i convert the temperature field into scalar value so that it can be implemented in ODE?

Thanks
Hi. I am a beginner in comsol and is facing the similar problem as John. I am modelling heat transfer and would like to use the resultant temperature obtained in my ODE. May i know how can i convert the temperature field into scalar value so that it can be implemented in ODE? Thanks

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2016年5月17日 GMT-4 08:55
Hello fellas,

I am also encountering the same problem.

In my case, the Global ODEs equation doesn't have any dependence in T. Even then the error of comp1.T not recognised is coming.

Please help.
Hello fellas, I am also encountering the same problem. In my case, the Global ODEs equation doesn't have any dependence in T. Even then the error of comp1.T not recognised is coming. Please help.

Walter Frei COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2016年5月18日 GMT-4 09:20
Hello,

It seems that there may be a misunderstanding here. "T" is a field variable that varies spatially over the domains in which you are solving heat transfer. A "Global ODE" is only meant if there is a single global scalar value that you want to track.

Based upon the descriptions in this thread, it is more likely that what you are really wanting to use here is the "Domain ODE" interface, as exemplified here:
www.comsol.com/blogs/modeling-the-thermal-curing-process/
Hello, It seems that there may be a misunderstanding here. "T" is a field variable that varies spatially over the domains in which you are solving heat transfer. A "Global ODE" is only meant if there is a single global scalar value that you want to track. Based upon the descriptions in this thread, it is more likely that what you are really wanting to use here is the "Domain ODE" interface, as exemplified here: https://www.comsol.com/blogs/modeling-the-thermal-curing-process/