-
Notifications
You must be signed in to change notification settings - Fork 267
Description
In tests/gmg_mesh_deform_topo.prm, there is a time-dependent function that controls deformation of the top boundary:
subsection Mesh deformation
set Mesh deformation boundary indicators = top: boundary function
# The left and right boundary are allowed to move,
# even though the Stokes velocity is zero along these boundaries.
set Additional tangential mesh velocity boundary indicators = left,right
subsection Boundary function
set Variable names = x,y,t
set Function expression = 0; if (x<0.5, 1e+2*sin(x*2*3.14159)*cos(t/0.001), 0)
end
end
My assumption would be that at the fixed end time of this simulation, the top boundary should look the same, even if the velocity field inside the domain looks different. However, the mesh deformation appears to be dependent on the timestep size.
Edit: As @tjhei points out, the differences are because the function gives the boundary velocity, not position, and the velocity is treated as linear over a timestep, with the value taken from the start of the timestep. This can certainly be improved in a number of ways - for example, if the function could be given as displacement instead, the effective velocity over a tmestep could be calculated to give the exact deformation of the mesh.
t(6) = 0.0024, max timestep=0.0012
t(10) = 0.0024, max timestep=0.0006
t(14) = 0.0024, max timestep=0.0003
t(26) = 0.0024, max timestep=0.0001
The other timesteps are all shifted as well (i.e., this isn't just a problem with the last timestep).
These test results are using the version of the code in #6829 , but main branch shows the same behaviour.