Deriving the temperature equations for a composite wall using the heat equation

shreddinglicks

Junior Member
Joined
Apr 16, 2016
Messages
76
I have the work I did below. I tried to execute my equations in Matlab but there is something wrong with the transient solution. I checked and rechecked my derivation and script. Can someone please take a moment and check my work? My derivation also accounts for contact resistance at the material interface.



1750885300509.png
1750885327627.png
1750885345642.png
1750885371994.png
 
I have the work I did below. I tried to execute my equations in Matlab but there is something wrong with the transient solution.
Do you mean that if you solve the PDEs by yourself you get a different result than when you solve them in MATLAB?

Can someone please take a moment and check my work?
Well I checked some of your work. It seems to me that you followed the correct systematic way to solve such partial equations with non-homogeneous boundary conditions. But it is very difficult to check your whole work as we don't know what you want us to find exactly!

I used MATLAB when I was studying Digital Signal Processing but never used it with partial differential equations. Therefore, I have a little knowledge to understand what you are trying to tell us here!
 
I am solving a problem involving two materials. The external boundaries are at fixed temperatures and there is an interface condition accounting for contact resistance.

I plotted the equations for temperature on Matlab. The result is not right. The steady solutions are correct however. Calculating a few points by hand produces the same results Matlab gives. Therefore I suspect an issue in my math.
 
I am solving a problem involving two materials. The external boundaries are at fixed temperatures and there is an interface condition accounting for contact resistance.

I plotted the equations for temperature on Matlab. The result is not right. The steady solutions are correct however. Calculating a few points by hand produces the same results Matlab gives. Therefore I suspect an issue in my math.
If you need to know where might be the mistakes you did, I need to study every step you have written in your solution. This takes time and I am very lazy. If you need to know the answer quickly, I cannot help you. But if you are not in a hurry, I can check your solution slowly every day. I don't like to check long solutions but I will make an exception for you.
 
If you need to know where might be the mistakes you did, I need to study every step you have written in your solution. This takes time and I am very lazy. If you need to know the answer quickly, I cannot help you. But if you are not in a hurry, I can check your solution slowly every day. I don't like to check long solutions but I will make an exception for you.
Thank you.
 
You're welcome. The first partial differential equation is missing one boundary condition, particularly the condition at \(\displaystyle x = a\) such as \(\displaystyle u_1(a,t)\).
That is accounted for in the interface condition that relates both equations.
 
That is accounted for in the interface condition that relates both equations.
When you say the interval for the spatial variable is \(\displaystyle 0 < x < a\), you must provide one boundary condition for each end. You cannot just say \(\displaystyle u_{1}(0,t) = F\) and ignore the other end!
 
The other interface end is accounted for further down the solution where the two equations are related.

What should they be?
 
What should they be?
I don't know but something should be given, otherwise your boundary conditions are not Dirichlet, Neumann, or Robin!
What are your boundary conditions called? And how did you assume that you can solve the partial differential equation if it does not have one of those?
 
I made the external conditions homogeneous. The interface condition is what is applied at the internal interface.

How do I apply the 3 basic conditions you mentioned at the interface to relate the two materials?
 
I made the external conditions homogeneous. The interface condition is what is applied at the internal interface.

How do I apply the 3 basic conditions you mentioned at the interface to relate the two materials?
In this case, I will assume that \(\displaystyle u_2(x,t)\) has the interval \(\displaystyle a < x < b\) which you did not give. I will assume that you are using Dirichlet boundary conditions such as:

\(\displaystyle u_1(0,t) = F\)
\(\displaystyle u_2(b,t) = G\)

And the interface condition will be at \(\displaystyle x = a\) which should have the continuity properties. It will be like solving a system.

I will continue my calculations tomorrow!
 
You will redo the calculations by adding an extra condition at the interface \(\displaystyle (x = a)\) for both functions \(\displaystyle u_1\) and \(\displaystyle u_2\). We will call this condition \(\displaystyle T_m \rightarrow\) matching temperature (interface temperature). This temperature is related to the steady state solution.

First Equation

\(\displaystyle \alpha_1\frac{\partial^2u_1}{\partial x^2} = \frac{\partial u_1}{\partial t}\)

\(\displaystyle u_1(x,0) = f(x)\)
\(\displaystyle u_1(0,t) = F\)
\(\displaystyle u_1(a,t) = T_m\)
\(\displaystyle 0 < x < a\)

Second Equation

\(\displaystyle \alpha_2\frac{\partial^2u_2}{\partial x^2} = \frac{\partial u_2}{\partial t}\)

\(\displaystyle u_2(x,0) = P(x)\)
\(\displaystyle u_2(a,t) = T_m\)
\(\displaystyle u_2(b,t) = G\)
\(\displaystyle a < x < b\)

Your goal now is to find the steady state solutions, \(\displaystyle \psi_1\) and \(\displaystyle \psi_2\).
 
You will redo the calculations by adding an extra condition at the interface \(\displaystyle (x = a)\) for both functions \(\displaystyle u_1\) and \(\displaystyle u_2\). We will call this condition \(\displaystyle T_m \rightarrow\) matching temperature (interface temperature). This temperature is related to the steady state solution.

First Equation

\(\displaystyle \alpha_1\frac{\partial^2u_1}{\partial x^2} = \frac{\partial u_1}{\partial t}\)

\(\displaystyle u_1(x,0) = f(x)\)
\(\displaystyle u_1(0,t) = F\)
\(\displaystyle u_1(a,t) = T_m\)
\(\displaystyle 0 < x < a\)

Second Equation

\(\displaystyle \alpha_2\frac{\partial^2u_2}{\partial x^2} = \frac{\partial u_2}{\partial t}\)

\(\displaystyle u_2(x,0) = P(x)\)
\(\displaystyle u_2(a,t) = T_m\)
\(\displaystyle u_2(b,t) = G\)
\(\displaystyle a < x < b\)

Your goal now is to find the steady state solutions, \(\displaystyle \psi_1\) and \(\displaystyle \psi_2\).
No, that does not account for contact resistance. The temperature at the interface is not the same for both materials.
 
No, that does not account for contact resistance. The temperature at the interface is not the same for both materials.
You are right. I ignored the contact resistance to make your calculations easier. But if you want to include it and be tough, it is your call. In this case, the calculations will be very difficult even for the steady state solution. If you like challenges, this is a really good one of them.

steady_state.png

I checked your steady solutions. They are correct and also MATLAB confirms this as you said. That was one simple tough task!

Now when I read your transient solution, I think that you made a big mistake unintentionally😱

\(\displaystyle \alpha_1\) and \(\displaystyle \alpha_2\) don't belong to the time solution \(\displaystyle T(t)\). Instead they belong the spatial solution \(\displaystyle X(x)\). I understand why you have made this mistake! Because you are used to do that when you solve a normal partial differential equation. But when we solve a system of two equations we want both time functions to decay in the same time. If you put \(\displaystyle \alpha_1\) and \(\displaystyle \alpha_2\) in the time equations, the time functions will decay in different times. This violates the whole system process.

I think that this might be the reason why your transient solution gives wrong results. When the spatial functions don't have \(\displaystyle \alpha_1\) and \(\displaystyle \alpha_2\), you get wrong eigenvalues \(\displaystyle \lambda_n\). My intuition tells me that was the error that let the system produced wrong data. Fix it and let me know if your problem is solved.

💪👽👽
 
Last edited:
You are right. I ignored the contact resistance to make your calculations easier. But if you want to include it and be tough, it is your call. In this case, the calculations will be very difficult even for the steady state solution. If you like challenges, this is a really good one of them.

View attachment 39502

I checked your steady solutions. They are correct and also MATLAB confirms this as you said. That was one simple tough task!

Now when I read your transient solution, I think that you made a big mistake unintentionally😱

\(\displaystyle \alpha_1\) and \(\displaystyle \alpha_2\) don't belong to the time solution \(\displaystyle T(t)\). Instead they belong the spatial solution \(\displaystyle X(x)\). I understand why you have made this mistake! Because you are used to do that when you solve a normal partial differential equation. But when we solve a system of two equations we want both time functions to decay in the same time. If you put \(\displaystyle \alpha_1\) and \(\displaystyle \alpha_2\) in the time equations, the time functions will decay in different times. This violates the whole system process.

I think that this might be the reason why your transient solution gives wrong results. When the spatial functions don't have \(\displaystyle \alpha_1\) and \(\displaystyle \alpha_2\), you get wrong eigenvalues \(\displaystyle \lambda_n\). My intuition tells me that was the error that let the system produced wrong data. Fix it and let me know if your problem is solved.

💪👽👽
So alpha_sub_1 and alpha_sub_2 should be arguments in the sin and cos functions in the spatial solutions?

I will try that when I get to my computer with the Matlab license.
 
Top