- Thank you received: 0
Problem simulating heat transport through composite solid
4 years 4 months ago - 4 years 4 months ago #2978
by Luma
Problem simulating heat transport through composite solid was created by Luma
Hello NGSolve users,
I have a problem simulating the heat transport through my model of a stirling engine, which is a solid composed of different materials.
I modeled the geometry in FreeCad, exported the .step file, created a mesh using GMSH and used the mesh in the NGSolve script using ReadGmsh().
I added the .step, .geo and .msh files as well as the simulation script in the attachements.
In my Simulation, the lower surface is set to a constant temperature higher than the initial temperature, such that the body is heating up from below. The problem is, that there are some artefacts in the temperature field, and i struggle to find out whether the mesh file is corrupted or the python script is faulty (I think i already checked the second option using another geometry and mesh file). The temperature looks like this
and thus illogical to me.
I would be very grateful if someone could take a look at my code and give me a hint.
Kind regards and thanks in advance
Lukas
I have a problem simulating the heat transport through my model of a stirling engine, which is a solid composed of different materials.
I modeled the geometry in FreeCad, exported the .step file, created a mesh using GMSH and used the mesh in the NGSolve script using ReadGmsh().
I added the .step, .geo and .msh files as well as the simulation script in the attachements.
In my Simulation, the lower surface is set to a constant temperature higher than the initial temperature, such that the body is heating up from below. The problem is, that there are some artefacts in the temperature field, and i struggle to find out whether the mesh file is corrupted or the python script is faulty (I think i already checked the second option using another geometry and mesh file). The temperature looks like this
and thus illogical to me.
I would be very grateful if someone could take a look at my code and give me a hint.
Kind regards and thanks in advance
Lukas
Attachments:
Last edit: 4 years 4 months ago by Luma. Reason: attachement missing
4 years 4 months ago #2980
by joachim
Replied by joachim on topic Problem simulating heat transport through composite solid
Hi Luma,
when you have different materials, you have to keep the densities and heat capacities with the mass matrix, otherwise the interface conditions at the material boundaries are wrong.
I am not sure how you got to your implicit Euler time-stepping. I replaced it by my standard one.
The attached file gives reasonable results.
Best, Joachim
when you have different materials, you have to keep the densities and heat capacities with the mass matrix, otherwise the interface conditions at the material boundaries are wrong.
I am not sure how you got to your implicit Euler time-stepping. I replaced it by my standard one.
The attached file gives reasonable results.
Best, Joachim
Attachments:
The following user(s) said Thank You: Luma
4 years 4 months ago #2981
by Luma
Replied by Luma on topic Problem simulating heat transport through composite solid
Hi Joachim,
thank you for the quick reply, I have been unaware of that. Works perfectly fine now!
Have a nice day
Lukas
thank you for the quick reply, I have been unaware of that. Works perfectly fine now!
Have a nice day
Lukas
4 years 4 months ago - 4 years 4 months ago #2983
by Luma
Replied by Luma on topic Problem simulating heat transport through composite solid
I must correct:
If i set the timestep and end time back to dt=0.01 and t_end=1, the result is the same as before. You have any idea why that is?
And as for keeping the densities and heat capacities with the mass matrix, i dont really understand why it makes a difference:
Solving
[tex]
\frac{\partial}{\partial t}u - \frac{\lambda}{\rho c}\Delta u = f
[/tex]
and
[tex]
\frac{\partial}{\partial t}\rho c u - \lambda\Delta u = \rho c f
[/tex]
should yield the same result if i set the diffusivity right on the different subdomains.
If i set the timestep and end time back to dt=0.01 and t_end=1, the result is the same as before. You have any idea why that is?
And as for keeping the densities and heat capacities with the mass matrix, i dont really understand why it makes a difference:
Solving
[tex]
\frac{\partial}{\partial t}u - \frac{\lambda}{\rho c}\Delta u = f
[/tex]
and
[tex]
\frac{\partial}{\partial t}\rho c u - \lambda\Delta u = \rho c f
[/tex]
should yield the same result if i set the diffusivity right on the different subdomains.
Last edit: 4 years 4 months ago by Luma.
4 years 4 months ago #2985
by joachim
Replied by joachim on topic Problem simulating heat transport through composite solid
now you see an underresolved initial layer which occurs since initial conditions and boundary conditions don't fit together. just wait.
with the weak form we discretize
div (lambda grad u)
if lambda is not one constant everywhere, you cannot move it through the div operator.
with the weak form we discretize
div (lambda grad u)
if lambda is not one constant everywhere, you cannot move it through the div operator.
Time to create page: 0.103 seconds