ParStokes for sheet-shelf and basal sliding

Extension of Elmer in computational glaciology
Post Reply
Clemens
Posts: 9
Joined: 13 Dec 2017, 15:06
Antispam: Yes

ParStokes for sheet-shelf and basal sliding

Post by Clemens »

Hi all,
I’m trying to set up the ParStokes solver for a 3D sheet-shelf simulation. I’ve got it running with no basal sliding under the sheet, but when I turn on basal sliding it gives me a segmentation fault. The culprit appears to be the UserFunction "SlideCoef_Contact". When I comment the lines out that contain the "SlideCoef_Contact", the segmentation fault disappears. The same is true if I set the Slip Coefficients to a constant value. Has anyone got ParStokes working with an ice shelf and ice sheet including basal sliding?
My basal BC in the sif is as follows:

Code: Select all

Boundary Condition 5
  Name = "bottom"
  Target Boundaries = 5
  Body Id = 3

  Normal-Tangential FlowVar = Logical True
  Normal-Tangential V = Logical True

  Flow Force BC = Logical True

  !Condition where the bed is stuck
  Zb = Equals Bedrock
  Zb Condition = Variable GroundedMask
    Real MATC "tx + 0.5"
  !Bedrock conditions
  Slip Coefficient 2 = Variable Coordinate 1
    Real Procedure "ElmerIceUSF" "SlidCoef_Contact"
  Slip Coefficient 3 = Variable Coordinate 1
    Real Procedure "ElmerIceUSF" "SlidCoef_Contact"
  
  Sliding Law = String "Weertman"
  Weertman Friction Coefficient = Real $C
  Weertman Exponent = Real $(1.0/1.0)
  Weertman Linear Velocity = Real 1.0
  Grounding Line Definition = String "Discontinuous"
  Test Contact Tolerance = real 1.0e-3

  FlowVar 1 = Real 0.0
  FlowVar 1 Condition = Variable GroundedMask
    Real MATC "tx + 0.5"
  V 1 = Real 0.0
  V 1 Condition = Variable GroundedMask
    Real MATC "tx + 0.5"
!
! Shelf conditions
  External Pressure = Variable Coordinate 3
     Real Procedure "ElmerIceUSF" "SeaPressure"

  Slip Coefficient 1 = Variable Coordinate 3
     Real Procedure "ElmerIceUSF" "SeaSpring"

  ComputeNormal Condition = Variable GroundedMask
    Real MATC "tx + 0.5"

  Compute Sea Pressure = Logical True
  Compute Sea Spring = Logical True
End
tzwinger
Site Admin
Posts: 99
Joined: 24 Aug 2009, 12:20
Antispam: Yes

Re: ParStokes for sheet-shelf and basal sliding

Post by tzwinger »

To start with: Is your sliding function segfaulting or is the segfault within the ParStokes?

Regards,

Thomas
Clemens
Posts: 9
Joined: 13 Dec 2017, 15:06
Antispam: Yes

Re: ParStokes for sheet-shelf and basal sliding

Post by Clemens »

OK I did some digging. So the segfault came from the USF_sliding user function, where it wantst the Flow Solver Name. If none is set in the solver section, it is set to Flow Solution. By setting

Code: Select all

Flow Solver Name = String "FlowVar"
in the ParStokes solver section this segfault went away. The solver is running now, but the results on the real-world domain don't look good at the moment. But I'll have to play around a bit more with it. The question now is, in the USF_Contact function, when the flow solver has slightly converged it uses the 'Flow Solution Loads' to look for areas that have become grounded/ungrounded. Do I have to change this to "FlowVar Loads'? Because this is the name of the variable in the vtu file. The solver runs whether I change this or not, but could anyone suggest what the correct option would be?

Cheers, Clemens
Clemens
Posts: 9
Joined: 13 Dec 2017, 15:06
Antispam: Yes

Re: ParStokes for sheet-shelf and basal sliding

Post by Clemens »

Hi all,

just for people who'll come across the same problem in the future. It is indeed necessary to change a line in USF_Contact.f90. Instead of

Code: Select all

VarSurfResidual => VariableGet (Model % Mesh % Variables, 'Flow Solution Loads', UnFoundFatal=UnFoundFatal)
It needs to be changed to

Code: Select all

VarSurfResidual => VariableGet (Model % Mesh % Variables, 'FlowVar Loads', UnFoundFatal=UnFoundFatal)
or to whatever you call your variable in the parStokes solver. This makes sure the GroundedMask is updated when the ParStokes solver has slightly converged.

Also, I'm getting now plausible results with the ParStokes solver at moderate resolutions of ~8km, but still struggle for convergence at higher resolution. Will play around a bit more with the settings. My settings for the 3 solvers are as follows:

Code: Select all

Solver 6
  Exec Solver = Before Simulation
  Equation = "Velocity Preconditioning"
  Procedure = "VelocityPrecond" "VelocityPrecond"
  Variable = -dofs 3 "V"
  Optimize Bandwidth = Logical True
  Linear System Row Equilibration = Logical True
  Element = "p:1 b:4"

End

Solver 7
  Exec Solver = Before Simulation
  Equation = "Pressure Preconditioning"
  Procedure = "PressurePrecond" "PressurePrecond"
  Variable = -dofs 1 "p" ! that would be default
  Element = "p:1 b:4"
	Linear System Symmetric = True
  Linear System Scaling = True
  Linear System Solver = iterative
  Linear System Iterative Method = CG
  Linear System Max Iterations = 1000
  Linear System Convergence Tolerance = 1.0e-6
  Linear System Preconditioning = Diagonal
  Linear System Residual Output = 10
  Linear System Timing = True
End

Solver 8
  Equation = String "Stokes"
  Procedure = "ParStokes" "StokesSolver"
  Variable = "FlowVar"
  Flow Solver Name = String "FlowVar"
  Variable Dofs = 4
  Element = "p:1 b:4"
  Convective = Logical False
  Block Diagonal A = Logical True
  Use Velocity Laplacian = Logical True
  !-----------------------------------------------
  ! Keywords related to the block preconditioning
  !-----------------------------------------------
  Block Preconditioning = Logical True
  Linear System Adaptive Tolerance = Logical True
  Linear System Base Tolerance = Real 1.0e-3
  Linear System Relative Tolerance = Real 1.0e-2

  Steady State Convergence Tolerance = 1.0E-03
  Nonlinear System Convergence Tolerance = 1.0E-05
  Nonlinear System Max Iterations = 50
  Nonlinear System Min Iterations = 10
  Nonlinear System Newton After Iterations = 50
  Nonlinear System Newton After Tolerance =  1.0E-03
End
Cheers, Clemens
Post Reply