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.

Modelling one-dimensional transient heat transfer

Please login with a confirmed email address before reporting spam

Hello,

I am new to COMSOL, and I am modelling a one-dimensional unsteady state heat transfer process across a solid cylinder, I would like to learn about how the temperature distribution changes with time.

Is it appropriate that I use a 2D asymmetric model for studying a 1D heat transfer process in a 3D solid?

The variables, such as specific heat, thermal conductivity, etc, are temperature dependent. Do I have to define the variable T (Temperature) at the very first beginning (parameters or global variables)? How can I extract the Temperature results from the pde solver? I defined a temperature dependent specific heat as global, but I was still not able to call it when I am defining the properties of the material. How can I deal with it? Are there any ways that I can define a variable as a piecewise function? Although I define it as a piecewise function, it was still not working. What can I do if I would like to use the parameter that I defined in determing the interval for the piecewise function?

Thank you very much! I am really new to COMSOL, and I am really eager to learn more about it. I'd appreciate all the help that you provide for me!

Best, Shengyue Shan


3 Replies Last Post 24 juil. 2018, 16:47 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 24 juil. 2018, 10:26 UTC−4
Updated: 6 years ago 24 juil. 2018, 10:27 UTC−4

Hi Shengyue,

I will try to answer as much questions as I can, but my understading of COMSOL is also a bit limited.

  • Do I have to define the variable T (Temperature) at the very first beginning (parameters or global variables)?

No, temperature is an intrinsic parameter of the Heat Transfer model. Be aware that COMSOL uses SI units (kelvin)

  • How can I extract the Temperature results from the pde solver?

Well it depends which temperature fields you want to extract. If you want the temperature of your domain surface (the default plot that appears in the results section after you run your simulation) you can extract the values right clicking in "surface", "export plot data" (or something like that) and select a name for your file. This will give you a .txt file.

  • I defined a temperature dependent specific heat as global, but I was still not able to call it when I am defining the properties of the material. How can I deal with it?

As far as I can tell, you should always define your functions (in this case the specific heat) in "model->definitions->analytic" (not sure if it correct to define it in "global definitions" but maybe someone can give you this information). In here, you have to define your function name, expression, arguments and input and output units. Because your specific heat is temperature dependent, after you define it try to use it in material as: "thenameyougave(T)". Not sure if this works, but you can try!

  • Are there any ways that I can define a variable as a piecewise function? Although I define it as a piecewise function, it was still not working. What can I do if I would like to use the parameter that I defined in determing the interval for the piecewise function?

You can use boolean expressions in COMSOL and even "if" conditions. Imagine you want A to be 1 from t=0 to t=10s and 2 from t=10s onwards. You can go to "model->definitions->analytic" and define a time-dependent variable named A and an expression: 1*(t<10)+2(t>10).

Hope this helps!

Best, Nichal

Hi Shengyue, I will try to answer as much questions as I can, but my understading of COMSOL is also a bit limited. - Do I have to define the variable T (Temperature) at the very first beginning (parameters or global variables)? No, temperature is an intrinsic parameter of the Heat Transfer model. Be aware that COMSOL uses SI units (kelvin) - How can I extract the Temperature results from the pde solver? Well it depends which temperature fields you want to extract. If you want the temperature of your domain surface (the default plot that appears in the results section after you run your simulation) you can extract the values right clicking in "surface", "export plot data" (or something like that) and select a name for your file. This will give you a .txt file. - I defined a temperature dependent specific heat as global, but I was still not able to call it when I am defining the properties of the material. How can I deal with it? As far as I can tell, you should always define your functions (in this case the specific heat) in "model->definitions->analytic" (not sure if it correct to define it in "global definitions" but maybe someone can give you this information). In here, you have to define your function name, expression, arguments and input and output units. Because your specific heat is temperature dependent, after you define it try to use it in material as: "thenameyougave(T)". Not sure if this works, but you can try! - Are there any ways that I can define a variable as a piecewise function? Although I define it as a piecewise function, it was still not working. What can I do if I would like to use the parameter that I defined in determing the interval for the piecewise function? You can use boolean expressions in COMSOL and even "if" conditions. Imagine you want A to be 1 from t=0 to t=10s and 2 from t=10s onwards. You can go to "model->definitions->analytic" and define a time-dependent variable named A and an expression: 1*(t10). Hope this helps! Best, Nichal

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 24 juil. 2018, 16:46 UTC−4

Hi Shengyue,

I will try to answer as much questions as I can, but my understading of COMSOL is also a bit limited.

  • Do I have to define the variable T (Temperature) at the very first beginning (parameters or global variables)?

No, temperature is an intrinsic parameter of the Heat Transfer model. Be aware that COMSOL uses SI units (kelvin)

  • How can I extract the Temperature results from the pde solver?

Well it depends which temperature fields you want to extract. If you want the temperature of your domain surface (the default plot that appears in the results section after you run your simulation) you can extract the values right clicking in "surface", "export plot data" (or something like that) and select a name for your file. This will give you a .txt file.

  • I defined a temperature dependent specific heat as global, but I was still not able to call it when I am defining the properties of the material. How can I deal with it?

As far as I can tell, you should always define your functions (in this case the specific heat) in "model->definitions->analytic" (not sure if it correct to define it in "global definitions" but maybe someone can give you this information). In here, you have to define your function name, expression, arguments and input and output units. Because your specific heat is temperature dependent, after you define it try to use it in material as: "thenameyougave(T)". Not sure if this works, but you can try!

  • Are there any ways that I can define a variable as a piecewise function? Although I define it as a piecewise function, it was still not working. What can I do if I would like to use the parameter that I defined in determing the interval for the piecewise function?

You can use boolean expressions in COMSOL and even "if" conditions. Imagine you want A to be 1 from t=0 to t=10s and 2 from t=10s onwards. You can go to "model->definitions->analytic" and define a time-dependent variable named A and an expression: 1*(t10).

Hope this helps!

Best, Nichal

Dear Nichal,

Thank you very much for your detailed explanation!! I will try!

Thank you very much!

Best regards, Shengyue Shan

>Hi Shengyue, > >I will try to answer as much questions as I can, but my understading of COMSOL is also a bit limited. > >- Do I have to define the variable T (Temperature) at the very first beginning (parameters or global variables)? > >No, temperature is an intrinsic parameter of the Heat Transfer model. Be aware that COMSOL uses SI units (kelvin) > >- How can I extract the Temperature results from the pde solver? > >Well it depends which temperature fields you want to extract. If you want the temperature of your domain surface (the default plot that appears in the results section after you run your simulation) you can extract the values right clicking in "surface", "export plot data" (or something like that) and select a name for your file. This will give you a .txt file. > >- I defined a temperature dependent specific heat as global, but I was still not able to call it when I am defining the properties of the material. How can I deal with it? > >As far as I can tell, you should always define your functions (in this case the specific heat) in "model->definitions->analytic" (not sure if it correct to define it in "global definitions" but maybe someone can give you this information). In here, you have to define your function name, expression, arguments and input and output units. Because your specific heat is temperature dependent, after you define it try to use it in material as: "thenameyougave(T)". Not sure if this works, but you can try! > >- Are there any ways that I can define a variable as a piecewise function? Although I define it as a piecewise function, it was still not working. What can I do if I would like to use the parameter that I defined in determing the interval for the piecewise function? > >You can use boolean expressions in COMSOL and even "if" conditions. Imagine you want A to be 1 from t=0 to t=10s and 2 from t=10s onwards. You can go to "model->definitions->analytic" and define a time-dependent variable named A and an expression: 1*(t10). > >Hope this helps! > >Best, >Nichal Dear Nichal, Thank you very much for your detailed explanation!! I will try! Thank you very much! Best regards, Shengyue Shan

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 24 juil. 2018, 16:47 UTC−4

No problem, let us know if you need anything else

Good luck!

No problem, let us know if you need anything else Good luck!

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.