# How to physically understand time dependent boundary conditions?

I am a beginner in Computational science and FEM. I came across some PDEs which implement time dependent boundary conditions.

I am not able to visualize exactly a physical scenario of how that would look or what it would mean with reference to a real problem.

Say for example, a wave equation - where the waves are reflected back if BC = 0; what would a changing BC imply here and how would we know the expression for such a changing BC? Same goes for a heat equation.

Can anyone explain in brief through an example or point me towards a document?

• You can also think how the pressure changes when you blow an empty bottle. This can be considered as a pressure boundary condition that changes with time. Nov 4 '15 at 7:06
• @nicoguaro ok so the source is at the opening of the bottle, how would I know the solution 'u' at the boundary of the bottle? So how can I obtain the expression for such a pressure BC?....or are you implying that the changing BC exists at the opening which is also the source?
– CRG
Nov 5 '15 at 16:38
• You will need to make measurements for that... I have never seen it for bottles, but for some wind instruments like clarinets and didgeridoos (all different mechanisms). Nov 5 '15 at 16:46

## 1 Answer

For the heat equation imagine a rod that is heated on the left and cooled on the right. Now imagine that instead of a constant prescribed temperature on the left what we want is the heat to steadily rise and fall. This would be an example of a time-dependent boundary condition.

This would be written as:

\begin{align} \frac{\partial{u}}{\partial{t}} = c\frac{\partial^{2}{u}}{\partial{x}^{2}}\\ u(x,0) = f(x)\\ u(0,t) = \phi(t) \hspace{4mm} u(1,t) = 0\\ \end{align}

where maybe we could model the $\phi(t)=\sin(t)$ so that the temperature rises and falls.

Similarly for the wave equation, imagine a string that is fixed at the right end but moves up and down on the left end.

Additional example: Another example using the heat equation would be a rod with a point source in the middle, i.e.:

\begin{align} \frac{\partial{u}}{\partial{t}} = c\frac{\partial^{2}{u}}{\partial{x}^{2}}\\ u(x,0) = \left\{ \begin{array}{ll} 1/2 & \mbox{if } x = 1/2 \\ 0 & \mbox{else} \end{array} \right.\\ u(0,t) = 0 \hspace{4mm} u(1,t) = 0\\ \end{align}

Now this just has two zero Dirichlet conditions on the left and right ends of the rod. We could make this more interesting by adding a time dependent condition to the left end. Perhaps something like:

\begin{align} \frac{du}{dx}(0,t) = \min(u,1) \end{align}

This might represent some kind of chemical reaction of the left hand side where we initially have no flux when the temperature is zero there, but later as heat makes it to the wall it results in a flux.

• Thanks for you answer James. Does such a BC mean that 'u' can take any value in the range of 'sin(t)' on the boundary? or is the boundary - 'sin(t)' obtaining its own values for every time step 't' and moving that way in sync with 'u' which is being computed for each time step on the cells inside the domain.
– CRG
Nov 4 '15 at 3:12
• So in this case the temperature at the left boundary would initially be $\sin(0)=0$. Then at the next time step it would become $\sin(\Delta{t})$, then $\sin(2\Delta{t})$, etc. In other words the one dimensional rod would initially have temperature zero throughout, but as time progresses and as we march forward in timesteps, the left side would begin to heat up. So to answer your question it is the later. $u=sin(n\Delta{t})$ at left hand side where n is the time step number we are on. This of course in turn effects the interior solution (say when you solve the linear system). Nov 4 '15 at 3:37
• Ok. So if I use a point heat source inside the domain....say in the middle of the rod. Would a changing boundary condition still make any sense? Because in such a case the source of temperature variation is inside the rod right?....So can we conclude that a changing BC is meaningful only if the source is on the boundary?
– CRG
Nov 4 '15 at 15:38
• @superuser I added another example using your point source idea but that also contains a time dependent boundary condition. To answer your question: $\textit{Would a changing boundary condition still make any sense?}$ It only makes sense if your modeling something where a time dependent boundary condition is warranted by the underlying physical phenomena. Your example of a point source with zero BC on each end is completely valid and in that case the BC are not time dependent. I provide an example in my answer where a time dependent BC could be used. Nov 5 '15 at 18:32
• thanks! That clears my doubt. Would it be correct to say that such an (approximate) expression for changing BC can be obtained by analytical or experimental data?
– CRG
Nov 5 '15 at 21:37