Skip to content

Commit

Permalink
Trying to fix some elmerice tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
raback committed Oct 7, 2024
1 parent dae6442 commit 073697a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 27 deletions.
12 changes: 6 additions & 6 deletions elmerice/Tests/Contact/cavity.sif
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Simulation
Initialize Dirichlet Conditions = Logical False
Output File = "$namerun".result"
Post File = "$namerun".vtu"
max output level = 3
max output level = 5
End

!---------------------------------------------------
Expand Down Expand Up @@ -308,7 +308,7 @@ Solver 9
Filename = "results.dat"

Show Norm = True
Show Norm Index = 1
Show Norm Index = 3

Variable 1 = "Stress Vector 2"
Operator 1 = "boundary min"
Expand Down Expand Up @@ -414,8 +414,8 @@ Boundary Condition 4
Target Boundaries = 4
End

Solver 6 :: Reference Norm = Real 7.0439455
Solver 6 :: Reference Norm Tolerance = Real 1E-05
Solver 6 :: Reference Norm = 7.0439455
Solver 6 :: Reference Norm Tolerance = 1.0E-05

Solver 9 :: Reference Norm = Real 0.1
Solver 9 :: Reference Norm Tolerance = Real 1E-06
Solver 9 :: Reference Norm = 1.19528960E-01
Solver 9 :: Reference Norm Tolerance = 1.0E-03
27 changes: 15 additions & 12 deletions elmerice/Tests/FrictionHeatMasked/test.sif
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ Simulation
Steady State Min Iterations = 1
Steady State Max Iterations = 1

ascii output = true
Post File = "test_$Step$.vtu"

max output level = 4
max output level = 5

Initialize Dirichlet Conditions = Logical False
! Extruded Mesh Levels = 3
Expand Down Expand Up @@ -183,13 +184,12 @@ End

!creates output
Solver 7
Equation = "ForceToStress"
Procedure = File "ElmerIceSolvers" "ForceToStress"
Variable = String "Friction Heating"
Variable DOFs = 1
Force Variable Name = String "Friction Load"
Linear System Solver = Direct
Linear System Direct Method = umfpack
Equation = "ForceToStress"
Procedure = "ElmerIceSolvers" "ForceToStress"
Variable = "Friction Heating"
Force Variable Name = String "Friction Load"
Linear System Solver = "Direct"
Linear System Direct Method = "umfpack"
End

!creates output
Expand Down Expand Up @@ -326,8 +326,11 @@ Boundary Condition 6
REAL MATC "tx(0)+H"
End

Solver 3 :: Reference Norm = Real 207.29755
Solver 3 :: Reference Norm Tolerance = Real 1E-06
Solver 7 :: Reference Norm = Real 31.2285175
Solver 7 :: Reference Norm Tolerance = Real 1E-06
Solver 3 :: Reference Norm = 207.29755
Solver 3 :: Reference Norm Tolerance = 1.0E-06
Solver 5 :: Reference Norm = 9.36764080E-02
Solver 5 :: Reference Norm Tolerance = 1.0E-06
! The norm seems to be zero now!
!Solver 8 :: Reference Norm = 31.2285175
!Solver 8 :: Reference Norm Tolerance = 1.0E-06

29 changes: 20 additions & 9 deletions fem/src/modules/StressSolve.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1120,8 +1120,12 @@ SUBROUTINE BulkAssembly()
IF( UseLocalMatrixCopy( Solver, activeind = t) ) GOTO 100

n = GetElementNOFNOdes()
ntot = GetElementNOFDOFs() + GetElementNOFBDOFs()

IF( STDOFs > dim ) THEN
ntot = GetElementNOFDOFs() + GetElementNOFBDOFs()
ELSE
ntot = GetElementNOFDOFs()
END IF

NodeIndexes => Element % NodeIndexes
CALL GetElementNodes( ElementNodes )

Expand Down Expand Up @@ -1355,9 +1359,11 @@ SUBROUTINE BulkAssembly()
! If time dependent simulation, add mass matrix to global
! matrix and global RHS vector
!------------------------------------------------------------------------------
tForce = 0._dp
IF (Transient) tForce = FORCE

IF( STDOFs > dim ) THEN
tForce = 0._dp
IF (Transient) tForce = FORCE
END IF

IF ( .NOT. (ConstantBulkMatrix .OR. ConstantBulkSystem .OR. ConstantSystem) ) THEN
IF ( Transient .AND. .NOT. EigenOrHarmonicAnalysis() ) THEN
IF( GetInteger( GetSolverParams(), 'Time derivative order', Found) == 2 ) THEN
Expand All @@ -1369,10 +1375,15 @@ SUBROUTINE BulkAssembly()
END IF

BLOCK
INTEGER :: nb
nb = GetElementNOFBDOFS(Element)
IF(nb>0) CALL NSCondensate(n,nb,dim,STIFF,FORCE,tFORCE)
END BLOCK
INTEGER :: nb
nb = GetElementNOFBDOFS(Element)
! Stabilization is needed if there are bubbles .AND. some addititional dof!
! Otherwise the NSCondensate is not a fitting method!!!
IF(nb>0 .AND. STDOFs > dim ) THEN
! Or should the 1st argument be ntot????
CALL NSCondensate(n,nb,dim,STIFF,FORCE,tFORCE)
END IF
END BLOCK
!------------------------------------------------------------------------------
! Check if reference of displacement has been changed
!------------------------------------------------------------------------------
Expand Down

0 comments on commit 073697a

Please sign in to comment.