I have a 2D transient heat conduction problem as attached file. As its boundary conditions are not homogeneous, it is highly appreciated if you could help me to solve it.
@Masoud. Your problem, as formulated, does not make physical sense. The boundary condition T(rb, z, t)=Tw is not consistent with T(r,0,t) = T0 --- unless Tw = T0, in which case the problem is trivial. Otherwise there will be a permanent diverging heat-flow in the vicinity of the point (rb, 0). Although it is possible to analyse that to considerable extent, it would (without further, well-explained motivations) be the mathematical equivalent of self-flogging.
If you try to solve a garbage-in problem, you can only (at best) obtain a garbage-out solution, no matter how many books you read.
Why don't you instead tell us what kind of physical problems you want to solve?
Masoud> Since my problem is nonhomogeneous, then I got problem with solving it.
Your time-independent inhomogeneous boundary conditions implies that the solution will approach a time-independent stationary solution for large times (only in your case it does not look like a reasonable physical solution). If you consider the time dependent deviation from this asymptotic solution, it will satisfy the heat equation with homogeneous boundary conditions.
@Masoud, I gave your link to very general formulae (3D). If you do not have angular dependence, it means that you have radial symmetry, and thus less heterogeneity (!) comparing to the most general case.
Kare found some inconsistency in your formulation, and you should be careful about problem set up. Either you should take it from article or derive yourself. If it was a person that give you a list with formula, he may not understand all and give you a wrongly formulated problem, so check yourself.
Even in your 1st equation there is misprint (or mistake), see in denominator "drd" before "=". It makes no sense! I would just skip last "d".
Let me add to the above remarks, that the inconsistency is not substantial. At least for the stationary solution. It can be compared to the following problem of seeking a harmonic function in a rectangle, say square [0,1]2 with T(x,1)=0 [for 0
I couldn't understand your meaning from "self-flogging", "Garbage-in" and "Garbage-on".
Any way my problem is an hollow cylinder that is a part of ground. The inner surface has a temperatures equals to Tw and outer surface is insulated. The upper temperature has a temperature equals to T0 and lower surface is insulated too. Also the initial temperature equals to T0 what is the problem? I think there is no mistake.
That there are no realistic physical systems where the temperature changes discontinuously. If the outer surface, kept at a constant temperature Tw touches the upper surface kept at constant temperature T0 != Tw, there will be a constant infinite heat flow between the surfaces, partly flowing through your cylinder. You don't give any motivation for studying such a problem, which is why I label it garbage-in. It is not that you cannot mathematically construct a solution; it is only that it will be much harder and more painful to do than for a physically realistic problem. Which is why I consider it the equivalent of self-flogging to invest time and energy on it. And what can you possibly learn from the solution of a problem which is unrealistic in the first place?
Note that I stress the lack of motivation for the formulated problem. It can perhaps be of interest to investigate solution behaviour when the temperature gradient between the top and outer surfaces becomes very large. But that is not the right end to start. When you are ready for such challenges, you no longer need to ask about much simpler issues.
If the ground is determining the temperature of your inner surface (how?), you should expect this temperature to vary continuously between bottom and top. Your mathematical model must reflect that.
It is no doubt that temperature changes from top to bottom of ground but it is some thing like 2K for a 50 m borehole. It is common if you search through various papers. Also the top surface is equals to average yearly temperature equals to T0.
Dear Followers, I would like to mention, that both models have some value, depending on the goals. Yes, if it is an academic discussion, we have right to consider any solvable problem, whose features approximates the natural situation.
With respect to the current question, indeed, there is a discontinuity of the temperature at one edge, which causes natural question, how it is possible. For explanation we need to introduce some "ideal thermostatic devices", which cannot be built in the nature. In particular the flow of the heat is then permanent, not talking about some possible singularities. However such a simplified model can extend our understanding of the heat flow, at least qualittively.
On the other hand, if we need realistic model, the current one has to be extended, or at least changed, with respect to the boundaries. This, however is due to those who are using the obtained results. In particular, a model of the OUTER domain is required, e.g. the type of insulation, the source of the heat and the reservoir supposed to keep constant teperature T0 (however, with possible deviations:)
OK, you have a hole in the ground, and something hotter than the surrounding ground inside that hole. The physics of why it is hotter may be of interest, but that is probably not a major issue.
Masoud> Also the top surface is equals to average yearly temperature equals to T0
You cannot assume that! The hot borehole will heat its surrounding ground, including the top layers. So, for a physical model the surface temperature must be part of the searched-for solution. That also makes the problem a little more interesting.
What could be a physical model? One model is to assume that the top surface exchanges heat with the air above through convection. If the wind is blowing fast we may perhaps assume the (suitably time averaged) air temperature Ta to be independent of the borehole, i.e. a given parameter. The heat flux between ground and air can then be modelled by an equation dT/dz = (T-Ta)/λ at z=0, for some parameter λ with dimension length. I.e., your inhomogeneous Dirichlet boundary condition at z=0 should be replaced with a Robin type condition. Another mechanism for heat exchange is radiation, but I don't think that changes the mathematical structure of the problem (only the interpretations of Ta and λ).
What happens if you keep two surfaces, defined by z=0 respectively x=0, constantly at different temperatures Tx respectively Tz? You can mathematically solve the Laplace equation for that situation, to find a temperature
T(x,z) = Tx + (2/π)*(Tz - Tx)*arctan(z/x)
Then you can compute the heat flow for that temperature distribution, to find that its magnitude diverges like 1/r = 1/sqrt(x2 + z2) near (0,0). It diverges in such a way that the total integrated heat flux becomes infinite, which is why this is a physically unacceptable situation.
If you do physical sciences, it does not matter how many equations you solve correctly, if these equations fail to mimic physical reality sufficiently well.
@Masoud. The earth is pretty big; nobody has inserted isolating layers into it. So I don't understand why you impose boundary conditions at r = rb + L and z = a + L. That only leads to a lot of extra work, and makes the solution more complicated and difficult to interpret physically.
There are many ways to solve this problem. Since the equation is linear, the most direct is to use separation of variables. One obtains two ordinary differential equations, expresses the solution as a series over the products and finds the coefficients by imposing the boundary conditions.
If one prefers not having to deal with inhomogeneous boundary conditions, since these are linear in the function, it's always possible to map this problem to one with homogeneous boundary conditions, by introducing an appropriate source term.
One typically defines a new function, equal to the original one plus terms whose presence cancels the boundary values and leads to homogeneous boundary conditions-e.g.http://www.math.usm.edu/lambers/mat417/lecture5.pdf
One can do that, either at the level of the partial differential equation, or at the level of the ordinary differential equations.
In any event, there's nothing particularly strange with the fact that the function doesn't take the same value on the common boundary. So there's no point getting confused by it.
The method demonstrated in the above linked lecture notes, is only a little bit more practical than advice to solve 100x100 linear equations by Cramer's rule. In this case because it completely hides the physical behaviour of the solution.
When you impose a time varying boundary condition on the heat equation, each frequency component of that condition will be the source of a a damped wave propagating into the medium. This leads to the well known fact that the ground temperature at a certain depth (which depends on the heat conductivity of the local soil, but is of order decimetres to meters) is half a year out of phase with the top layer.
That interesting and physically important behaviour is a standard topic in physics classes on heat transport, easily found by solving the heat equation in a couple of lines. However, some farmers in the northern region were I grew up, learned this elementary aspect of heat conduction through practical experience. When they tried to isolate their drainage systems better, only to discover that their "improvements" resulted in their pipes being completely frozen at the (early summer) time when they were most needed...
The boundary conditions in the present case aren't time dependent, however. And even if they were, this doesn't affect the practical applications of the homogenization technique, since linear systems aren't solved, in practice, by Cramer's rule, in any case-and the homogenization technique, in fact, eliminates the need for solving that particular linear system in the first place.
Stam> linear systems aren't solved, in practice, by Cramer's rule
Of course not.
For the same reason that PDE boundary problems should not be solved by the method advocated by the notes you advocated. For a time independent 1+1 dimensional problem there is essentially only one way to do it; nothing to quarrel about there. However, the solution presented in the said notes for a time dependent 1+1 dimensional problem can misled people to use similar techniques for the time independent 1+2 dimensional problems discussed here. It is a very bad approach, which should be banished from lecture halls around the world, in particular lecture halls attended by science students.
PDE's is a vast and important field of science, usually with nice physical interpretations for each problem encountered. However, the treatments often offered in lecture notes and textbooks are not very useful in practise. In many cases it is tempting to say that they are not-even-wrong (except that they often contain errors and misprints, never weeded out because the formulas are never used in practice). They don't provide any physical insights; how can you gain any physical insight form a multiple sum of increasingly rapid oscillation functions, sometimes only converging pointwise?
Stam> nothing particularly strange with the fact that the function doesn't take the same value on the common boundary. So there's no point getting confused by it.
Who did you find to be confused, and where? I provided an explicit solution for this case, and analysed its physical consequences. Which are not quite acceptable from a physical point of view. There is a difference between confused and concerned.
There's nothing more to be concerned about than by the mismatch between the boundary conditions for any partial differential equation, at measure zero sets, e.g. corners, or edges. This isn't anything specific to the present problem, however.
It certainly doesn't affect the mathematics or the numerical treatment, as such.
The mismatch will lead to boundary layers near the ``edge'' (or ``corner'') and will affect the numerical treatment insofar as it will affect the choice of the basis of functions that will lead to the most stable representation of the solution, in the most efficient way.
I do not want to invent tire for a car. Since results say we can assume surface temperatures equals to averaged yearly temperature(T0), it is enough. Since results say ground boundary conditions are as mentioned conditions, it is enough.
Here is science discussion site. It was not a nice joking. If I say results show, it means some other studies(numerical studies) show. I wanted to do this analytically. If you can not answer, please please and please let others.
There's been a lot of discussion on your problem, some good....some not so useful...
Regarding the discontinuity of temperature at that corner, well you are solving an idealised problem and such things won't arise in real life, but nevertheless such discontinuities can and do arise as part of the problem set we teach and expect students to solve. As Joachim said, one can find perfectly valid Fourier series for such problems using the separation of variables technique. The only practical issue which arises with the discontinuity is the poor performance of the Fourier series close to the corner, when a large number of terms will be needed. And close to the corner the temperature will actually vary as a linear function of the local angular coordinate by which I mean as one rotates around the point r=r_b and z=0 from the line r=r_b to the line z=0. This is Dr Elaussen's arctan formula from earlier.
Numerically, there is no difficulty in solving this. An absolutely standard Euler forward differencing in time together with 2nd order central differences in space and the fictitious point method for the Neumann conditions will give the solution quickly. I would estimate fewer than 30 lines of code are needed, if one eschews comment lines.
As for an analytical solution, well this will be hard work but it is possible. One begins by restating the problem as being one for theta where theta=T-T_0. It is then probably better to find the steady state solution first using separation of variables. In the z-direction you'll need to use what is, in effect, a quarter-range series of sines. The separation of variables method then tells you that the radial variation for each of these sines will be a sum of modified zero order Bessel functions of both the first and the second kinds. This won't be at all nice, but it can be done. Then one can solve for the difference between the true transient solution and the steady state problem using the same ideas, but all the boundary conditions are then homogeneous. This last bit will be truly horrific because then one needs to use zeroth order Bessel functions (not modified), and the steady state solution will need to be rewritten as a Fourier-Bessel series using these latter functions. So if you have the will and resolution to try this, then you have my best wishes!
But the message is that this can be done analytically and that the end result will be a pretty complicated series of the Fourier type using modified zero-order Bessel functions and a quarter range sine series. And if you really really wish to pursue this analytical solution, my advice would be to try solving an analogous Cartesian version first so that the whole solution process is rehearsed without having to deal with Bessel functions, and even that is going to be a very lengthy analysis.
[N.b. some of the above does repeat, though in a slightly differently worded form, what has been said by others, notably Drs Nicolis, Olauseen and Domsta.]
My advice: the numerical solution is the way to go.
Something still wrong for the solution you provide. For x=0 or 1 & y=0, the solution you provide here is T=0, not 1. Some choice must have been made while forcing the BC for the determination of those coefficients associated with the eigenfunction. My guess is that this is outer solution for the outer domain that cut out the corner at x=0 or 1, y=0. The discontinuity of BC eventually need to be resolved in the inner domain.
The x=0 and x=1 boundaries are fine because of the sine. If one sets y=0 in the full solution, then what is left is the half-range Fourier Sine series for f(x)=1.
The presence of the discontinuity of the boundary condition means that you have to be very careful over simply substituting in any limits which head towards the boundary. Referring to the 2D model problem I introduced, the strip, then:
If y=/=0 and we let x->0 (or x->1) then T->0.
If x=/=0 and x=/=1 and we let y->0 then T->1.
If we now decide to let both x and y tend towards zero, then the limit depends on the direction taken. In the present context Prof Elaussen's arctan formula is T~(2/pi)arctan(x/y), and thisis valid at leading order very very close to x=y=0. If we take x->0 and y->0 but maintain y=mx, then as the corner is approached we have T=(2/pi)arctan(1/m). So if m=1 T->0.5. At the corner, then, all possible values between 0 and 1 may be obtained, but the value obtained depends on the direction of approach.
All of this may seem strange, but it is the consequence of having a discontinuous boundary temperature.
Understand. In essence, the perturbation is used and the solution you provide is the outer solution. That's how we can cut the corner out. To really handle the corner analytically, then we need to properly handle the inner domain.
Yes, but as long as one is not at the corner where the discontinuity is, then the series solution will converge to the exact solution to within any pre-chosen tolerance (such as within 10^{-6}) using a finite number of terms. The nearer the corner one is, the more terms will be required. At the corner one has that ambiguity. So, in essence, I am saying that the series solution is precise, except at the corner where the discontinous BC is.
That is what RG ought to be, but I don't detect much scientific attitude in your responses. Here and previously (linked below) you pose some (homework type -- but not uninteresting) heat equation problems in various geometries. But, when provided with carefully and laboriously worked out solutions you don't care enough about them to detect very obvious mis-writings. Which you would have detected immediately, by comparing the formulas with the numerical results you claim to know.
What then is the point of providing you with analytic formulas?
Masoud> If I say results show, it means some other studies(numerical studies) show
I have already explained the physical problem with your model. If you only consider the temperature distribution numerically, I don't see that any problem can arise. But what kind of science (and PhD-degree) can you get out of that?
But if you also calculate the heat flux you will discover a problem near the "corner" where boundary conditions are inconsistent. In the continuum limit the total heat flux diverges logarithmically. In standard numerical calculations this divergence will be cut off by the discretisation length, but be visible through a lack of convergence as you make this length smaller and smaller.
Masoud> I wanted to do this analytically.
As I read your posts you want some people at ResearchGate to provide the analytic answers.
Masoud> If you can not answer, please please and please let others.
I know how to do it by the standard separation of variables method, and easily available formulas for Bessel functions and their integrals. But the final expression involves the numerical solution of a non-linear 2x2 eigenvalue problem, where the eigenvalue parameter enters as argument of Bessel function matrix elements of the 2x2 matrix. So it is arguable whether this really classify as an analytic solution or not.
And, considering your attitude, I think it would be highly unethical to provide you with more explicit formulas or additional hints (additional to those I have already, perhaps to generously, provided). You say you don't want to "invent tires"; you seem to want ResearchGate to do that for you. And also mount them on your car, so you can drive comfortably to your PhD graduation ceremony.
1- I've got my PhD years ago and it is not about my thesis.
2- If I ask a question, then I will search some hints about it (of course it was kind of professors to solve it completely). I ask the question because of my lack of knowledge about solving inhomogeneous PDE. I emphasis my lack of knowledge.
I think that your main task will be to solve these problems numerically. The analytical solution for the Cartesian problem is tractable, as you have seen, but will still need programming to evaluate. The one in polars is do-able, but is a very very big task. As Prof Olaussen has pointed out, one will need to solve the for separation constants, and this will involve Bessel functions, and therefore even this analytical scheme has a numerical comopnent. In this case it would certainly be quicker to solve the PDEs using a sitable numerical scheme.