Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/fem/tests/AdvDiffFCT/case.sif
3206 views
Check Keywords Warn

Header
  Mesh DB "." "square"
End

Simulation
  Max Output Level = 5
  Coordinate System = Cartesian
  Simulation Type = Transient

!  Crank-Nicolsen
  Timestepping Method = newmark
  Newmark Beta = 0.5
  Bdf Order = 1

  $steps=400
  Timestep Sizes = $pi/steps

! remove the 10 for full circle
  Timestep Intervals = $steps/10
  Output Intervals = 4
  Steady State Max Iterations = 1

$ FilePrefix = "case"
End

Body 1
  Equation = 1
  Material = 1
  Body Force = 1
  Initial Condition = 1
End

Equation 1
  Active Solvers(2) = 1 2
  Convection = constant
End

Solver 1
  Equation = Advection Diffusion
  Variable = Cons
  Procedure = "AdvectionDiffusion" "AdvectionDiffusionSolver"

  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStab
  Linear System Max Iterations = 200
  Linear System Convergence Tolerance = 1.0e-10
  Linear System Preconditioning = ILU0
  Linear System Residual Output = 20

  Nonlinear System Max Iterations = 1
  Nonlinear System Convergence Tolerance = 1.0e-4
  Nonlinear System Newton After Tolerance = 1.0e-3
  Nonlinear System Newton After Iterations = 10
  Nonlinear System Relaxation Factor = 1
  Steady State Convergence Tolerance = 1.0e-4

! Look good on paper, but in practice not particularly good performance
!  fct: Linear System Iterative Method = richardson
!  fct: Linear System Scaling = False

! We are maybe not so interested in the change of the corrector
  fct: Skip Compute Nonlinear Change = Logical True
  
  Solver Timing = True

! Stabilize = True
!  Bubbles = True
  Bubbles = False
  Stabilize = False

! Parameters for the flux corrected transport
  Linear System FCT = Logical True

! The following are optional 
!  FCT Correction Symmetric = Logical True
!  FCT Correction Skip = Logical False
!  FCT Correction Save = Logical True

  Solver Timing = True
End


Solver 2
!  Exec Solver = after saving
  Exec Solver = never
  Equation = "result output"
  Procedure = "ResultOutputSolve" "ResultOutputSolver"
  Output File Name = $FilePrefix$
  Vtu Format = Logical True
  Single Precision = Logical True 
End

Solver 3
  Exec Solver = Never
  Equation = "saverange"
  Procedure = "SaveData" "SaveScalars"
  Filename = $FilePrefix$.dat
 
  Variable 1 = Cons 

  Operator 1 = min  
  Operator 2 = max
  Operator 3 = int mean
  Operator 4 = min  
  Operator 5 = max
  Operator 6 = int mean
  Operator 7 = Cpu Time
End


Initial Condition 1
  Name = "InitialCondition"

  Cons = Variable time
    Real Procedure "InitDist" "InitDist"
End 

Material 1
  Density = 1.0

  Cons Diffusivity = Real 1.0e-6

! Constant velocity
!  Convection Velocity 1 = Real 0.1
!  Convection Velocity 2 = Real 0.05

! Rotation around origin
  Convection Velocity 1 = Opposes Coordinate 2
  Convection Velocity 2 = Equals Coordinate 1
End


Boundary Condition 1
  Name = "BCs" 
  Target Boundaries(4) = 1 2 3 4
  Cons = Real 0.0
End

Solver 1 :: Reference Norm = Real 0.258982
RUN

!End Of File