Skip to content

Time step size affects mesh deformation #6837

@bobmyhill

Description

@bobmyhill

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

Image

t(10) = 0.0024, max timestep=0.0006

Image

t(14) = 0.0024, max timestep=0.0003

Image

t(26) = 0.0024, max timestep=0.0001

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions