Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/fem/tests/BoundaryFluxes2/case.sif
5284 views
!----------------------------------------------------------------
! Test case for automated computation of boundary loads for each 
! boundary. This is the most efficient way to compute fluxes when
! it is possible. There are limitations related to cases where
! nodes are shared between different boundaries. In such a case the 
! procedure cannot separate between the fluxes on that node from 
! different boundaries.
!
! Compared to test case "BoundaryFluxes" this hand-pics the flux to 
! compute. The effect of neighbouring BCs may be omitted since they
! are natural BCs and by construction have zero flux. 
! 
! Similar procedure would be available through "Calculate Loads" and
! summing of nodal loads through "boundary sum" operator of SaveScalars.
! This one sweep operation is somewhat easier to use. 
!
! P.R. / 26.11.2014
!-----------------------------------------------------------------

Header
  CHECK KEYWORDS Warn
  Mesh DB "." "square"
  Include Path ""
  Results Directory ""
End

Simulation
  Max Output Level = 5

  Coordinate System = "Cartesian"
  Coordinate Mapping(3) = 1 2 3

  Simulation Type = "Steady State"
  Steady State Max Iterations = 1
  Output Intervals = 1

  Post File = "case.vtu"
End

Constants
  Gravity(4) = 0 -1 0 9.82
  Stefan Boltzmann = 5.67e-08
End

Body 1
  Name = "Body"
  Body Force = 1
  Equation = 1
  Material = 1
End

Equation 1
  Name = "Equations"
  Active Solvers(2) = 1 2
End

Solver 1
  Exec Solver = "Always"
  Equation = "Heat Equation"
  Variable = "Temperature"
  Variable Dofs = 1
  Linear System Solver = "Iterative"
  Linear System Iterative Method = "BiCGStab"
  Linear System Max Iterations = 350
  Linear System Convergence Tolerance = 1.0e-08
  Linear System Abort Not Converged = True
  Linear System Preconditioning = "ILU0"
  Linear System Residual Output = 1
  Steady State Convergence Tolerance = 1.0e-05
  Stabilize = True
  Nonlinear System Convergence Tolerance = 1.0e-05
  Nonlinear System Max Iterations = 1
  Nonlinear System Newton After Iterations = 3
  Nonlinear System Newton After Tolerance = 1.0e-02
  Nonlinear System Relaxation Factor = 1.0

  Calculate Boundary Fluxes = Logical True
End


Solver 2
  Equation = SaveScalars
  Procedure = "SaveData" "SaveScalars"

! This will make the heat flux through boundary 3 the value 
! to monitor in the consistency test. SaveScalars is only needed
! to implement the test, not to compute the flux. 
  Show Norm Index = 1
!  Filename = f.dat
End

Material 1
  Name = "Material"
  Density = 1
  Heat Conductivity = 10.0
End

Body Force 1
  Name = "BodyForce"
  Heat Source = 0
End

Boundary Condition 1
  Name = "Bot"
  Target Boundaries(1) = 1 
  Temperature = 0.0
End

Boundary Condition 2
  Name = "Right"
  Target Boundaries(1) = 2 
End

Boundary Condition 3
  Name = "Top"
  Target Boundaries(1) = 3 
  Temperature = 10.0

! Hand-pick only this BC to be computed
  Calculate Boundary Flux = Logical True
End

Boundary Condition 4
  Name = "Left"
  Target Boundaries(1) = 2 
End



Solver 2 :: Reference Norm = Real 100.0
RUN
!End Of File