Finite Differencing Dynamic Boundary

In summary, the conversation discusses a finite differencing scheme being used to solve a differential equation with dynamic boundary conditions. The difficulty lies in choosing an appropriate spacing value, and the conversation explores a possible solution suggested by the department chair. This solution involves transforming the differential equation and using a moving boundary condition to simplify the problem. The conversation ends with a request for further explanation on how to generalize this method for moving boundary problems.
  • #1
member 428835
Hi PF!

I'm using a finite differencing scheme to solve the following $$h_t = h h_{zz} + 2h_z^2$$ where the subscripts denote partial derivatives. The difficulty I'm facing is the boundary conditions are dynamic, and move with time ##t##. This makes choosing a ##\Delta z## very difficult and unintuitive for me.

I have already developed a MatLab code that works pretty well but I feel my ##\Delta z## should change in time. If anyone knows any references or has advice on this issue of dealing with the ##\Delta z## please let me know.

Thanks so much!

Josh
 
Physics news on Phys.org
  • #2
Try to change the time variable in order to achieve time independent boundary conditions.
 
  • #3
I've already performed a similarity transform, which can actually be solved analytically under certain physical situations! But I'm trying to solve before the transform, so moving boundary conditions is all I can work with.
 
  • #4
  • #5
Thanks!
 
  • #6
On a problem like this, what I would do is change variables, so that the z variable is as follows:

$$z^*=\frac{(z-z_{left}(t))}{(z_{right}(t)-z_{left}(t))}$$

You would have to transform the differential equation so that the partial derivative with respect to t is at constant z* versus z. But the advantage would be that the boundary conditions could always be applied at z* = 0 and z* = 1. Basically what you are doing is taking the complexity out of the boundary conditions and putting it into the differential equation where it can be handled more easily.

Chet
 
  • #7
Chet, this is exactly what the department chair recommended. We then have $$\frac{\partial}{\partial z} = \frac{1}{z_r(t)-z_l(t)}\frac{\partial}{\partial z^*}$$Unfortunately at the moment I need to solve this problem in the $z$ space, not the $z^*$ space. This being said, later I'll look into this method. Would you mind if I asked you for advice then if I run into any trouble?

I do have a well-prepared strategy to proceed, but I'm wondering how to use finite differencing techniques to solve for the last spatial node in my domain? Currently I'm using a forward time centered space scheme. During each time loop, I use FD to recalculate each ##h## value, which gives me something like this $$\frac{h_i^{j+1}-h_i^j}{\Delta t} \approx h_i^j \left( \frac{h_{i+1}^j-2h_i^j+h_{i-1}^j}{\Delta z^2} \right) + 2\left( \frac{h_{i+1}^j-h_{i-1}^j}{2 \Delta z} \right)^2$$

where the subscript denotes space and the superscript denotes time. To find ##h^{j+1}_{right}## should I allow ##h_{right}^j=0## since that is what the right end was at time ##j## and then use a backward space technique for the first derivative term?
 
Last edited by a moderator:
  • #8
joshmccraney said:
Chet, this is exactly what the department chair recommended. We then have $$\frac{\partial}{\partial z} = \frac{1}{z_r(t)-z_l(t)}\frac{\partial}{\partial z^*}$$Unfortunately at the moment I need to solve this problem in the $z$ space, not the $z^*$ space. This being said, later I'll look into this method. Would you mind if I asked you for advice then if I run into any trouble?

I do have a well-prepared strategy to proceed, but I'm wondering how to use finite differencing techniques to solve for the last spatial node in my domain? Currently I'm using a forward time centered space scheme. During each time loop, I use FD to recalculate each ##h## value, which gives me something like this $$\frac{h_i^{j+1}-h_i^j}{\Delta t} \approx h_i^j \left( \frac{h_{i+1}^j-2h_i^j+h_{i-1}^j}{\Delta z^2} \right) + 2\left( \frac{h_{i+1}^j-h_{i-1}^j}{2 \Delta z} \right)^2$$

where the subscript denotes space and the superscript denotes time. To find ##h^{j+1}_{right}## should I allow ##h_{right}^j=0## since that is what the right end was at time ##j## and then use a backward space technique for the first derivative term?
You need actual boundary conditions at the two ends. What are the boundary conditions?

chet
 
  • #9
Chestermiller said:
On a problem like this, what I would do is change variables, so that the z variable is as follows:

$$z^*=\frac{(z-z_{left}(t))}{(z_{right}(t)-z_{left}(t))}$$

You would have to transform the differential equation so that the partial derivative with respect to t is at constant z* versus z. But the advantage would be that the boundary conditions could always be applied at z* = 0 and z* = 1. Basically what you are doing is taking the complexity out of the boundary conditions and putting it into the differential equation where it can be handled more easily.

Chet

I am not quite sure I understand this method. What is ##z_{left}## and ## z_{right} ##? What happens if the moving boundary is part of the solution to the problem, as in a Stefan problem?
 
  • #10
Strum said:
I am not quite sure I understand this method. What is ##z_{left}## and ## z_{right} ##? What happens if the moving boundary is part of the solution to the problem, as in a Stefan problem?
Josh,

Do you feel like you can explain this to Strum?

Chet
 
  • #11
So Chet. It doesn't look like Josh wants to chip in. Would you mind explaining how this would generalize to moving boundary problems?
 
  • #12
Strum said:
So Chet. It doesn't look like Josh wants to chip in. Would you mind explaining how this would generalize to moving boundary problems?
zleft(t) and zright(t) are the time-dependent locations of the left- and right boundaries of the region being analyzed. Both boundaries are assumed to be moving. To complete the problem statement, Josh would have to provide the boundary conditions on h at these locations.

We would like to convert the problem statement from h = h (z,t) to h = h(z*,t) so that, in the z* - t framework, the boundaries are not moving. The transformation that I gave in post #6 will do this. But, one has to transform the differential equation properly. We start out by writing:

$$dh=\left(\frac{\partial h}{\partial t}\right)_{z^*}dt+\left(\frac{\partial h}{\partial z^*}\right)_{t}dz^*$$
Then we evaluate the partial derivatives in the differential equation as follows:
$$\left(\frac{\partial h}{\partial z}\right)_t=\left(\frac{\partial h}{\partial z^*}\right)_{t}\left(\frac{\partial z^*}{\partial z}\right)_t=\left(\frac{\partial h}{\partial z^*}\right)_{t}\frac{1}{(z_{right}(t)-z_{left}(t))}$$
$$\left(\frac{\partial h}{\partial t}\right)_z=\left(\frac{\partial h}{\partial t}\right)_{z^*}
+\left(\frac{\partial h}{\partial z^*}\right)_{t}
\left(\frac{\partial z*}{\partial t}\right)_z=
\left(\frac{\partial h}{\partial t}\right)_{z^*}
-\frac{z^*}{(z_{right}(t)-z_{left}(t))}\left(\frac{\partial h}{\partial z^*}\right)_{t}
\left(\frac{dz_{right}}{dt}-\frac{dz_{left}}{dt}\right)$$

This is then substituted into the differential equation.

Hope this makes sense.

Chet
 
  • Like
Likes member 428835
  • #13
Thanks Chet! Sorry it has taken so long for me to thank you, but thanks so much!
 
  • #14
And sorry Strum, I recently changed my email address, and that coupled with a summer vacation meant I was scarce; I'm sorry and didn't intend to be rude.

At the risk of sounding redundant to what Chet said, ##z_{left}## is the left boundary position of ##z## in the problem. If you imagine ##z## as the length of a candle, then perhaps ##z_{left}## is the height, and since the candle is presumable burning, ##z_{left}## would be getting smaller in time. Obviously the differential equation above, while it can be re-cast as the heat equation, is definitely not a candle; in fact, it's capillary corner flow! The same logic extends to ##z_{right}##.

Chet's proposed change of variables implies ##z^* \in [0,1]##. This is a common substitution in non-dimentionalizing pressure terms in navier-stokes equations, if you've studies those at all.

Again, I'm terribly sorry for the late delays, and the only reason I was able to respond to Chet was via my phone, which took some work.

And Chet, ##h(z_{left}) = 1## and ##h(z_{right}) = 0##. I'll work with this some and let you know what I get, although it seems in your previous post you already did the heavy lifting.
 

Related to Finite Differencing Dynamic Boundary

1. What is Finite Differencing Dynamic Boundary?

Finite Differencing Dynamic Boundary is a mathematical technique used in numerical analysis to approximate the solutions of differential equations. It involves dividing the domain into a finite number of sub-intervals and approximating the derivatives at the boundaries of these intervals.

2. How is Finite Differencing Dynamic Boundary different from other numerical methods?

Finite Differencing Dynamic Boundary is different from other numerical methods because it uses a finite difference approximation to solve differential equations, while other methods such as the finite element method use a piecewise function to approximate the solution.

3. What are the advantages of using Finite Differencing Dynamic Boundary?

Some advantages of using Finite Differencing Dynamic Boundary include its simplicity and ease of implementation, its ability to handle complex boundary conditions, and its ability to handle problems with irregular geometries.

4. What are the limitations of Finite Differencing Dynamic Boundary?

Finite Differencing Dynamic Boundary has some limitations, such as its sensitivity to the grid size and the location of the boundaries. It also requires a uniform grid, which may not be possible for all problems.

5. In what fields is Finite Differencing Dynamic Boundary commonly used?

Finite Differencing Dynamic Boundary is commonly used in fields such as fluid dynamics, heat transfer, and electromagnetics. It is also used in finance and economics for solving partial differential equations in option pricing and risk management.

Similar threads

  • Differential Equations
3
Replies
96
Views
6K
  • Differential Equations
Replies
5
Views
1K
  • Differential Equations
Replies
1
Views
2K
  • Differential Equations
Replies
1
Views
2K
  • Differential Equations
Replies
3
Views
2K
  • Differential Equations
Replies
1
Views
2K
  • Advanced Physics Homework Help
Replies
2
Views
410
Replies
3
Views
1K
  • Differential Equations
Replies
1
Views
2K
Replies
2
Views
1K
Back
Top