This is an old revision of the document!
USF_Zs.f90
ZsIni
, ZsMZsIni
, ZsTopIni
, ZsTopMZsIni
,… Zs
or Zs Top
or Zs Bottom
The aim of these user functions is to get the appropriate value of the mesh update from the surface displacement.
The first type of user function (~Ini
) is used to initialize the free surface elevation (surface elevation equals to the altitude of the nodes belonging on this surface). The second type (~MZsIni
) calculate the mesh update variable as the new surface elevation minus the initial elevation.
As presented here, these user functions can be easily replaced by MATC functions (recalling that MATC function consume more cpu than user functions).
The required keywords in the SIF file for this solver are:
Initial Condition 2 Zs Top = Variable Coordinate 3 Real Procedure "./USF_Zs" "ZsTopIni" End Initial Condition 3 Zs Bottom = Variable Coordinate 3 Real Procedure "./USF_Zs" "ZsBottomIni" End ! Bottom boundary condition Boundary Condition 1 Target Boundaries = 1 !!! this BC is equal to body no. 3 !!! Body Id = 3 Mesh Update 1 = Real 0.0 Mesh Update 2 = Real 0.0 Mesh Update 3 = Variable Zs Bottom Real Procedure "./USF_Zs" "ZsBottomMzsIni" End ! Upper Surface Boundary Condition 2 Target Boundaries = 2 !!! this BC is equal to body no. 2 !!! Body Id = 2 Mesh Update 1 = Real 0.0 Mesh Update 2 = Real 0.0 Mesh Update 3 = Variable Zs Top Real Procedure "./USF_Zs" "ZsTopMzsIni" End
The same can be done by using simple MATC user functions (recalling that for large simulation, fortran user functions are more efficient than MATC), but first the initial elevation has to be stored in a new variable.
Solver 6 Equation = String "Free Surface Evolution" Variable = "Zs" Variable DOFs = 1 Procedure = "FreeSurfaceSolver" "FreeSurfaceSolver" ... Exported Variable 1 = ReferenceZs Exported Variable 1 DOFS = 1 End Initial Condition 2 ReferenceZs = Equals Coordinate 3 Zs = Equals Coordinate 3 End ! Upper Surface Boundary Condition 2 Target Boundaries = 2 !!! this BC is equal to body no. 2 !!! Body Id = 2 Mesh Update 3 = Variable Zs, ReferenceZs Real MATC "tx(0) - tx(1)" End
Examples of the usage of these user functions can be found in the ISMIP application for one upper free surface and in Tête Rousse application for an upper and lower free surfaces.