There are various ways in Fastflo of handling moving boundary problems. One is to simply move the node points of the mesh to follow the fluid, producing a Lagrangian frame of reference. Another is the Arbitrary Lagrangian-Eulerian (ALE) approach, in which the boundary fits the new free surface, but a mesh smoothness condition regulates the movement of interior nodes and the velocity difference between fixed and transformed meshes appears as a convective velocity in the equations.
In this section, we develop the ALE approach in Fastflo. Analysis is done on a fixed reference mesh; a mapping function computed on this mesh describes the relation to the real space with moving free surface. Large deformations can be accommodated without undue mesh distortion. The method has widespread application, and is illustrated for a 2D Stefan problem in which we compute the freezing of a fluid region.
Let the true space coordinate vector be x, and let
![]()
The X variables can be regarded as a set of time-varying
curvilinear coordinates, and various differential operators
encountered in partial differential equations are transformed
as in the following examples
A time derivative can be written
![]()
![]()
With these transformations, the entire set of equations can be solved in the fixed-mesh X-domain. The mapping from x into the fixed geometry X can be chosen to preserve internal smoothness, together with some necessary boundary conditions.
By way of illustration, we wish to solve a Stefan problem in which the dominant equation is the time-varying heat equation
![]()
![]()
A key point of the ALE method is that the motion of the internal mesh nodes can be assigned arbitrarily. For convenience, we choose to calculate the ``velocity''
![]()
![]()
Finally, the update of the mapping
![]()
![]()
Some caution is required here! This update is not fully
implicit, whereas the mainstream finite element methods
used in Fastflo are implicit. Stability restrictions on
timesteps can be expected to occur in the ALE method.]
We now consider a two-dimensional problem.
The domain chosen in the X-plane is the unit square, with the
free surface at
. The condition at the free boundary is given
by the Stefan condition:
![]()
In general, the free surface may be defined by a relation
![]()
![]()
![]()
![]()
Suppose the original
-domain was the thin film of ice
and
, with an initial temperature distribution given by
![]()
The mesh file stefan2D.msh is produced using Unit and consists of a unit square in the X-plane. It has 64 equal 8-noded squares as shown in the figures at the end of this section. The boundary segments are tagged as follows:
![]()
![]()
![]()
![]()
The next part of the file specifies two problems, heat and spread. To understand this part of the code, it is instructive to review the equations to be solved and the transformations (1-3) at the start of this section.
Problem heat is the transformed heat equation.
V200 is the current value of x, and the grad operation puts
into the locations V400, V500 the values of the matrix
.
Note that the size of the object
returned, namely a 2
2 matrix, is determined by the size of
V200 and the operation performed on it, so the results are placed in
V400 and the next consecutive locations. Then the inverse of the
matrix
is
placed in V600, V700. V800 is just formed as the
transpose of
, and so the product of
with its transpose,
is placed in V1000, V1100. V1201 contains the
determinant
, and V1300 is the product
.
With all that decided, the transformed heat equation is written
down with a fully implicit time discretisation. The timestepping
procedure is the backward Euler method (see Section 7.3.1). The
boundary conditions at
and
simply say that the new
temperature is the same as the old one. At the other boundary segments,
the absence of an explicit condition ensures that there is no normal
heat flux.
The problem spread describes the equation for updating the
transformation, by timestepping the function
.
In fact it computes
. The transformation
matrices are computed as before, although they are now required only
for the boundary condition at the free surface. The components of
normal to the fixed surfaces are set to zero,
and the Stefan condition is applied, as discussed above, to the
free surface.
The remainder of the specification consists of a macro run. This successively updates the temperature (using the old mesh velocity) and then the mesh (using the new temperature). The temperature and mesh are not strongly coupled. Note that, when heat is assembled, various registers in the vector stack need to be passed from the global to the local position. This explains the additional addresses mentioned after the name heat. After solving both heat and spread, the stack is popped to bring the registers back to their original designation. The command mapm 200 in each timestep swaps the contents of V200 with the mesh locations and enable a contour plot of the temperature at the physical locations to be drawn The second mapm 200 then restores V200 to the transformed mesh.
The sequence is run over 4,000,000 seconds (a little more than ``40 days
and 40 nights'') with 200 equal timesteps, and the extent of the frozen
region and the temperature contours at the end are as shown below.
![]()
|
![]()
|
![]()
|
![]()
|
Finally, we return to the comment made earlier about timestep restrictions. If the timestep is made too large, the explicit scheme for updating the mesh breaks down.