Warning: Undefined array key 1 in /home/np29546/public_html/elmerice/wiki/inc/auth.php on line 78

Warning: Cannot modify header information - headers already sent by (output started at /home/np29546/public_html/elmerice/wiki/inc/auth.php:78) in /home/np29546/public_html/elmerice/wiki/inc/auth.php on line 431

Warning: Cannot modify header information - headers already sent by (output started at /home/np29546/public_html/elmerice/wiki/inc/auth.php:78) in /home/np29546/public_html/elmerice/wiki/inc/actions.php on line 38
userfunctions:zs [Elmer/Ice Wiki]

This is an old revision of the document!


User Function USF_Zs

General Informations

  • USF Fortran File: USF_Zs.f90
  • USF Name: ZsIni, ZsMZsIni, ZsTopIni, ZsTopMZsIni,…
  • Required Input Variable(s): Zs or Zs Top or Zs Bottom

General Description

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).

SIF contents

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

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.

userfunctions/zs.1353448226.txt.gz · Last modified: 2012/11/20 21:50 by gag
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0