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.

weird problem in COMSOL tmeperature measurment

Please login with a confirmed email address before reporting spam

Hi

I am doing a simple moving mesh problem where a hot block is going into a cool block so temperature of the inner block should decrease in all of its points, but I see weirdly that there are some points in inner block which have temperature even more than the initial temperature!!

I have not defined any heat flux input or whatever, just initial temperature of 500 k
but after runnig i see some points with more than 570 k degree!!!!!
how does COMSOL get to such ressults, Ivar please help :(

it uses FEM right? so I can not understand how? please take look at model and results Ivar.

Thanks,


20 Replies Last Post 21.10.2016, 09:43 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 12.04.2011, 01:33 GMT-4
Hi

You should understand what is going on, I agree its not making physical sens , but mathematically, (FEM wise) the way you have set up your model it's perfectly correct !!

Have you done your model verification and validation ?
Have you checked the mesh sensitivity ? w.r.t shape order and expected results ?

Make a movie out of your simulation take a look, then select 3D plot Group 1 - Surface - Quality No refinement, smoothing none and check "Wireframe" now you are looking at the raw data. What do you observe ?

Now physics and math agree ;)

As you have only 1 element across your beam, and a very symmetric T profile of rather parabolic type, the FEM or maths of COMSOL is correctly adding in a parabola (from the 2nd order shape function it's using). But this overshoots slightly ;) hence our physical violation "creation of energy" !

This is a beautiful example of how one can get really fooled, if one is not regularly checking what is behind, welcome to the club :)

And even if you are now warned, you will be astonished how many times you will be caught in the future, not to say how many times it will go "undetected", I'm also regularly getting fooled, even after 30+ years of FEM

nice model by the way, one see the effect of low heat conductivity, diffusion is often tricky, i do not find it very intuitive

--
Good luck
Ivar
Hi You should understand what is going on, I agree its not making physical sens , but mathematically, (FEM wise) the way you have set up your model it's perfectly correct !! Have you done your model verification and validation ? Have you checked the mesh sensitivity ? w.r.t shape order and expected results ? Make a movie out of your simulation take a look, then select 3D plot Group 1 - Surface - Quality No refinement, smoothing none and check "Wireframe" now you are looking at the raw data. What do you observe ? Now physics and math agree ;) As you have only 1 element across your beam, and a very symmetric T profile of rather parabolic type, the FEM or maths of COMSOL is correctly adding in a parabola (from the 2nd order shape function it's using). But this overshoots slightly ;) hence our physical violation "creation of energy" ! This is a beautiful example of how one can get really fooled, if one is not regularly checking what is behind, welcome to the club :) And even if you are now warned, you will be astonished how many times you will be caught in the future, not to say how many times it will go "undetected", I'm also regularly getting fooled, even after 30+ years of FEM nice model by the way, one see the effect of low heat conductivity, diffusion is often tricky, i do not find it very intuitive -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.04.2011, 11:24 GMT-4
Hi Ivar

Thanks for comments. I saw the wireframe and saw the same distribution! I got the point but do not you think that my problem is because of the low thermal conductance og hot block (0.2[w/m*k]) and cold block (15 [w/m*k])..in the two dimensional model as you produced thermal conductivity was defined about 1000 which is very high. but in real these numbers are for my problem which are for propylen and steel in order.
and I was th8inking that these low valuse may be the source of a adiabatic interaction which can produce heat inside the hot block because the velocity is high too and there not enough time for smooth heat diffusion.

do you think so?

Thanks
Hi Ivar Thanks for comments. I saw the wireframe and saw the same distribution! I got the point but do not you think that my problem is because of the low thermal conductance og hot block (0.2[w/m*k]) and cold block (15 [w/m*k])..in the two dimensional model as you produced thermal conductivity was defined about 1000 which is very high. but in real these numbers are for my problem which are for propylen and steel in order. and I was th8inking that these low valuse may be the source of a adiabatic interaction which can produce heat inside the hot block because the velocity is high too and there not enough time for smooth heat diffusion. do you think so? Thanks

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 12.04.2011, 12:05 GMT-4
Hi

One thing for me, without any heat source, you cannot increase the temperature of the hottest item, and I do not see what you have in your model that could generate heat (friction could be a source, but I havent seen it in there)

so I remain convinced it's a FEM mathematical artefact. Try to set the shape functions / discretisation to linear instead of quadratic and I'm convinced you will get another temperature distribution, and try to use 3-4 elements across your plastic and check that the temperature distribution remains or changes

--
Good luck
Ivar
Hi One thing for me, without any heat source, you cannot increase the temperature of the hottest item, and I do not see what you have in your model that could generate heat (friction could be a source, but I havent seen it in there) so I remain convinced it's a FEM mathematical artefact. Try to set the shape functions / discretisation to linear instead of quadratic and I'm convinced you will get another temperature distribution, and try to use 3-4 elements across your plastic and check that the temperature distribution remains or changes -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.04.2011, 13:38 GMT-4
Ivar

please chek this 2D model and see the unreal distribuition, I tried different meshes but they are all have different results.

I think COMSOL have problem here.

Thanks
Ivar please chek this 2D model and see the unreal distribuition, I tried different meshes but they are all have different results. I think COMSOL have problem here. Thanks


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.04.2011, 13:52 GMT-4
Hi Ivar
I think in low conductivities there is problem in COMSOL..same model same mesh same... works with much higher thermla condcutivity, but as you decrease the conductivity around 1 or 0.5 w/m.k you see problem in the same model

Did you chek it out ?

Thanks
Hi Ivar I think in low conductivities there is problem in COMSOL..same model same mesh same... works with much higher thermla condcutivity, but as you decrease the conductivity around 1 or 0.5 w/m.k you see problem in the same model Did you chek it out ? Thanks

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.04.2011, 14:55 GMT-4
I wanted to say I did not get any response from the technology support about doing surface to surface radiation during the moving mesh. they sent me emails that we are working on it, but nothing came out, I also feel COMSOL can not do this to..it is not a big deal (considering radiation while doing a moving mesh) but COMSOL can not do this either!!

do you agree?

Thanks
I wanted to say I did not get any response from the technology support about doing surface to surface radiation during the moving mesh. they sent me emails that we are working on it, but nothing came out, I also feel COMSOL can not do this to..it is not a big deal (considering radiation while doing a moving mesh) but COMSOL can not do this either!! do you agree? Thanks

Nagi Elabbasi Facebook Reality Labs

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.04.2011, 15:13 GMT-4
It’s not a COMSOL problem/bug! When you decrease the conductivity in a transient thermal analysis you reduce the “speed” at which the heat propagates through the material. For the same time step, the heat will now propagate much less into the body. If that depth of heat propagation is of the order of the element size you get these oscillations in temperature that you observed. That’s a standard finite element issue (the mesh is too coarse to capture the solution). Quadratic and higher order interpolations do not help in this case, they actually make things a little worse.

You can do one of two things, increase the time step or reduce the element size. The inequality relating these parameters is dt > rho * C / k * dL^2 where dt is the time step and dL is the element size.

Nagi Elabbasi
Veryst Engineering
It’s not a COMSOL problem/bug! When you decrease the conductivity in a transient thermal analysis you reduce the “speed” at which the heat propagates through the material. For the same time step, the heat will now propagate much less into the body. If that depth of heat propagation is of the order of the element size you get these oscillations in temperature that you observed. That’s a standard finite element issue (the mesh is too coarse to capture the solution). Quadratic and higher order interpolations do not help in this case, they actually make things a little worse. You can do one of two things, increase the time step or reduce the element size. The inequality relating these parameters is dt > rho * C / k * dL^2 where dt is the time step and dL is the element size. Nagi Elabbasi Veryst Engineering

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.04.2011, 16:42 GMT-4
Hi Nagi

It worked finally :)))))))

I did not know how much should I decrease the element size, I did it before but it looked like it was not fine enough, I did it even ten times more than my last finer mesh.

could you please let me know how did you get the formula and if it is like this dt > (rho * C )/ (k * dL^2 ) C is heat capacitance, right?

again thanks a lot from Nagi and Ivar.
I am sure I will come back with more questions :)
Hi Nagi It worked finally :))))))) I did not know how much should I decrease the element size, I did it before but it looked like it was not fine enough, I did it even ten times more than my last finer mesh. could you please let me know how did you get the formula and if it is like this dt > (rho * C )/ (k * dL^2 ) C is heat capacitance, right? again thanks a lot from Nagi and Ivar. I am sure I will come back with more questions :)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.04.2011, 17:04 GMT-4

And so what is wrong with COMSOL is that it can not consider radiation (surface to surface radiation) during a moving mesh simulation. As I said I have not got any response form technical surpport for more than a week and this is the problem of COMSOL now.
do you agree in this Mr. Nagi?

Thanks
And so what is wrong with COMSOL is that it can not consider radiation (surface to surface radiation) during a moving mesh simulation. As I said I have not got any response form technical surpport for more than a week and this is the problem of COMSOL now. do you agree in this Mr. Nagi? Thanks

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.04.2011, 17:30 GMT-4
The formula that Nagi mentioned is a direct result of the non-dimensionalization of the heat transfer by conduction equation:

rho*Cp*dT/dt=div(k*gradT)

From non-dimensionalizing that equation you can see that the length scale is L=sqrt(rho*Cp*t/k)
The formula that Nagi mentioned is a direct result of the non-dimensionalization of the heat transfer by conduction equation: rho*Cp*dT/dt=div(k*gradT) From non-dimensionalizing that equation you can see that the length scale is L=sqrt(rho*Cp*t/k)

Nagi Elabbasi Facebook Reality Labs

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.04.2011, 21:48 GMT-4
Exactly. Thanks Jeff. Be careful though which terms are in the numerator/denominator. It should be L=sqrt(k*t/(rho*Cp))

Nagi Elabbasi
Veryst Engineering
Exactly. Thanks Jeff. Be careful though which terms are in the numerator/denominator. It should be L=sqrt(k*t/(rho*Cp)) Nagi Elabbasi Veryst Engineering

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 13.04.2011, 01:27 GMT-4
Hi Navid

I'm sure you are familiar with this math issue:

Take a plane and draw two distinct points.
Question: how many distinct straight lines may you pass by the two points ? and how many parabolas ?

If you take three distinct points, NOT lined up. Then how many lines, parabolas or cubics ?

With FEM it's the same, you must always ensure to have enough elements across the gradient of your model to correctly catch the gradient slope, and when needed slope of slope ... and not to forget to use "smooth" transition functions, overall, that might derived once, twice, or more the better ...

The basic math behind FEM should not be forgotten, even if COMSOL is doing a good job to look after that for us ;)

--
Good luck
Ivar
Hi Navid I'm sure you are familiar with this math issue: Take a plane and draw two distinct points. Question: how many distinct straight lines may you pass by the two points ? and how many parabolas ? If you take three distinct points, NOT lined up. Then how many lines, parabolas or cubics ? With FEM it's the same, you must always ensure to have enough elements across the gradient of your model to correctly catch the gradient slope, and when needed slope of slope ... and not to forget to use "smooth" transition functions, overall, that might derived once, twice, or more the better ... The basic math behind FEM should not be forgotten, even if COMSOL is doing a good job to look after that for us ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13.04.2011, 11:06 GMT-4
Hi Ivar

Thanks for comments, the fact is I had never had such a small element size comparing with my geometry, I considered that fact but never thought that we need such a small mesh because of the very small thermal conductance, so I can say this is the smallest mesh I ever had in my life ;).

By the way I got response form COMSOL about radiation and moving mesh together, they did that and the only difference is that instead of defining a free deformation for the hot block and then define its moving fact in the prescribed deformation from the first they did define a prescribed deformation for the hot block so attached is the file, but there is still one problem that when the block is far from the hole there are some radiation flux absorbed by the cylinder which is not real!! so I do not know if this is a modeling or COMSOL, because the block with hole in it is defined as opaque too !!

I appreciate if you take a look if you have time Ivar

Thanks
Hi Ivar Thanks for comments, the fact is I had never had such a small element size comparing with my geometry, I considered that fact but never thought that we need such a small mesh because of the very small thermal conductance, so I can say this is the smallest mesh I ever had in my life ;). By the way I got response form COMSOL about radiation and moving mesh together, they did that and the only difference is that instead of defining a free deformation for the hot block and then define its moving fact in the prescribed deformation from the first they did define a prescribed deformation for the hot block so attached is the file, but there is still one problem that when the block is far from the hole there are some radiation flux absorbed by the cylinder which is not real!! so I do not know if this is a modeling or COMSOL, because the block with hole in it is defined as opaque too !! I appreciate if you take a look if you have time Ivar Thanks


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13.04.2011, 11:57 GMT-4
Hi

the problem I mentioned before was about radiation resolution according to their comment, I increased the resolution and run it again and takes much longer time and still is running. I will let you know about results as I get it.

I wanted to say thanks again to Nagi for comments about conductance equation.

thanks,
Hi the problem I mentioned before was about radiation resolution according to their comment, I increased the resolution and run it again and takes much longer time and still is running. I will let you know about results as I get it. I wanted to say thanks again to Nagi for comments about conductance equation. thanks,

Nagi Elabbasi Facebook Reality Labs

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13.04.2011, 12:38 GMT-4
You're welcome Navid, glad I could help! Keep us updated with this interesting model.

If the solution time is too much for you - since it's the smallest mesh you ever had in your life! - consider these two modificaitons to make it faster. Using linear, not quadratic, heat transfer elements, and increasing the time step size. The second change gives you less total steps and allows you to use bigger elements, so a compounded benefit. However, it is only possible if there is nothing else going on in the model that requires the small time step.

Nagi Elabbasi
Veryst Engineering
You're welcome Navid, glad I could help! Keep us updated with this interesting model. If the solution time is too much for you - since it's the smallest mesh you ever had in your life! - consider these two modificaitons to make it faster. Using linear, not quadratic, heat transfer elements, and increasing the time step size. The second change gives you less total steps and allows you to use bigger elements, so a compounded benefit. However, it is only possible if there is nothing else going on in the model that requires the small time step. Nagi Elabbasi Veryst Engineering

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13.04.2011, 15:08 GMT-4
Hi Ivar

I see a prbolem in the model get from COMSOL support. as what I said they sued prescribed deforamtion instead of prescribed mesh displacement that we used in model before.
so in this case model is working but results are not real I think. I see the radiation is not resonabaly changing.

can you take alook at the model and elt me know about your comments. I apprciate if Nagi gives me some help too. the model is attached in previous posts.

Thanks,
Hi Ivar I see a prbolem in the model get from COMSOL support. as what I said they sued prescribed deforamtion instead of prescribed mesh displacement that we used in model before. so in this case model is working but results are not real I think. I see the radiation is not resonabaly changing. can you take alook at the model and elt me know about your comments. I apprciate if Nagi gives me some help too. the model is attached in previous posts. Thanks,

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 14.04.2011, 11:15 GMT-4
Hi

right now my problem is I can not use radiation and moving mesh together in COMSOL! I used prescribed mesh dispalcment and it did not worked and when prescribed deformation is defined results are not look to be real!
have you ever used these two together! I do not know why it does not work. it looks like when hot block starts to be in contact with cold block there is a problem and the error is "repeated error test failures. may have reached a singularity" before this happens convergence is also goes to infinity. I do not know if how COMSOL can not understand the contact to begin.

thanks
Hi right now my problem is I can not use radiation and moving mesh together in COMSOL! I used prescribed mesh dispalcment and it did not worked and when prescribed deformation is defined results are not look to be real! have you ever used these two together! I do not know why it does not work. it looks like when hot block starts to be in contact with cold block there is a problem and the error is "repeated error test failures. may have reached a singularity" before this happens convergence is also goes to infinity. I do not know if how COMSOL can not understand the contact to begin. thanks


Please login with a confirmed email address before reporting spam

Posted: 10 years ago 20.01.2015, 10:09 GMT-5

The formula that Nagi mentioned is a direct result of the non-dimensionalization of the heat transfer by conduction equation:

rho*Cp*dT/dt=div(k*gradT)

From non-dimensionalizing that equation you can see that the length scale is L=sqrt(rho*Cp*t/k)


Hi Jeff,

You mentioned that this inequality, L=sqrt(k*t/(rho*Cp)), which determines the element size is derived from the non-dimensionalizing of the heat transfer equation. Could you please explain this a little bit?

Thanks in advance.
[QUOTE] The formula that Nagi mentioned is a direct result of the non-dimensionalization of the heat transfer by conduction equation: rho*Cp*dT/dt=div(k*gradT) From non-dimensionalizing that equation you can see that the length scale is L=sqrt(rho*Cp*t/k) [/QUOTE] Hi Jeff, You mentioned that this inequality, L=sqrt(k*t/(rho*Cp)), which determines the element size is derived from the non-dimensionalizing of the heat transfer equation. Could you please explain this a little bit? Thanks in advance.

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 20.01.2015, 11:09 GMT-5
See pruffle.mit.edu/3.016/Appendices/NonDimensional.pdf , especially the example on the Diffusion equation towards the end. It demonstrates why the penetration depth varies like sqrt(k*t/(rho*Cp)).
Jeff
See http://pruffle.mit.edu/3.016/Appendices/NonDimensional.pdf , especially the example on the Diffusion equation towards the end. It demonstrates why the penetration depth varies like sqrt(k*t/(rho*Cp)). Jeff

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 21.10.2016, 09:43 GMT-4
Dear Nagi, dear Jeff,

first thank you for these really good answers. The last couple of months I was working on a model coupling turbulent flow and heat transfer in fluids. It was really really hard to get it to converge and now reading your post here I have the feeling now I know why it was so hard. As you described, to capture the solution or the temperature gradients, the depth of the heat propagation has to be bigger than the element size. Or in other words the heat front has to leave the finite element. But in a CFD simulation one uses the CFL number to ensure convergence. In this case the CFL number has to be lower than 1 and that means the flow front has to stay in the finite element. I see contradiction here!
Unfortunately connecting support did not help, so I hope you could help me to find it out. And also how do we capture the solution in a CFD simulation, if the flow front has always to be inside of the finite element.

Best regards
Antoni Artinov
Dear Nagi, dear Jeff, first thank you for these really good answers. The last couple of months I was working on a model coupling turbulent flow and heat transfer in fluids. It was really really hard to get it to converge and now reading your post here I have the feeling now I know why it was so hard. As you described, to capture the solution or the temperature gradients, the depth of the heat propagation has to be bigger than the element size. Or in other words the heat front has to leave the finite element. But in a CFD simulation one uses the CFL number to ensure convergence. In this case the CFL number has to be lower than 1 and that means the flow front has to stay in the finite element. I see contradiction here! Unfortunately connecting support did not help, so I hope you could help me to find it out. And also how do we capture the solution in a CFD simulation, if the flow front has always to be inside of the finite element. Best regards Antoni Artinov

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.