FEM: elmer unit tests, add ccx canti node load test

This commit is contained in:
Bernd Hahnebach
2020-07-02 14:24:25 +02:00
parent b8dce01b94
commit 7809cb8de5
4 changed files with 135 additions and 0 deletions

View File

@@ -255,6 +255,7 @@ SET(FemTestsElmer_SRCS
femtest/data/elmer/__init__.py
femtest/data/elmer/case_mm.sif
femtest/data/elmer/elmer_ccxcanti_faceload_mm.sif
femtest/data/elmer/elmer_ccxcanti_nodeload_mm.sif
femtest/data/elmer/group_mesh.geo
femtest/data/elmer/ELMERSOLVER_STARTINFO
)

View File

@@ -153,6 +153,14 @@ class TestSolverElmer(unittest.TestCase):
setup(self.document, "elmer")
self.elmer_inputfile_writing_test("elmer_ccxcanti_faceload")
# ********************************************************************************************
def test_elmer_ccxcanti_nodeload(
self
):
from femexamples.ccx_cantilever_nodeload import setup
setup(self.document, "elmer")
self.elmer_inputfile_writing_test("elmer_ccxcanti_nodeload")
# ********************************************************************************************
def elmer_inputfile_writing_test(
self,

View File

@@ -0,0 +1,120 @@
Check Keywords Warn
Header
Mesh DB "."
End
Solver 1
Bubbles = Logical False
Calculate Pangle = Logical False
Calculate Principal = Logical False
Calculate Strains = Logical False
Calculate Stresses = Logical False
Displace mesh = Logical False
Eigen Analysis = Logical False
Eigen System Values = Integer 5
Equation = String "Elasticity"
Exec Solver = String "Always"
Linear System Abort Not Converged = Logical False
Linear System Convergence Tolerance = Real 1e-08
Linear System Iterative Method = String "BiCGStab"
Linear System Max Iterations = Integer 500
Linear System Precondition Recompute = Integer 1
Linear System Preconditioning = String "ILU0"
Linear System Residual Output = Integer 1
Linear System Solver = String "Iterative"
Optimize Bandwidth = Logical True
Procedure = File "StressSolve" "StressSolver"
Stabilize = Logical True
Steady State Convergence Tolerance = Real 1e-05
Variable = String "Displacement"
Variable DOFs = Integer 3
End
Simulation
BDF Order = Integer 1
Coordinate Mapping(3) = Integer 1 2 3
Coordinate System = String "Cartesian 3D"
Output Intervals = Integer 1
Simulation Type = String "Steady state"
Steady State Max Iterations = Integer 1
Steady State Min Iterations = Integer 0
Timestepping Method = String "BDF"
Use Mesh Names = Logical True
End
Constants
End
Body 1
Equation = Integer 1
Material = Integer 1
Name = String "Solid1"
End
Material 1
Density = Real 7.9e-06
Heat expansion Coefficient = Real 1.2e-05
Poisson ratio = Real 0.3
Youngs Modulus = Real 210000000.0
End
Equation 1
Active Solvers(2) = Integer 1 2
End
Solver 2
Equation = String "ResultOutput"
Exec Solver = String "After simulation"
Output File Name = File "case"
Procedure = File "ResultOutputSolve" "ResultOutputSolver"
Vtu Format = Logical True
End
Boundary Condition 1
Displacement 1 = Real 0.0
Displacement 2 = Real 0.0
Displacement 3 = Real 0.0
Name = String "Face1"
End
Boundary Condition 2
Force 1 = Real -0.0
Force 1 Normalize by Area = Logical True
Force 2 = Real -0.0
Force 2 Normalize by Area = Logical True
Force 3 = Real -9000000000.0
Force 3 Normalize by Area = Logical True
Name = String "Vertex5"
End
Boundary Condition 3
Force 1 = Real -0.0
Force 1 Normalize by Area = Logical True
Force 2 = Real -0.0
Force 2 Normalize by Area = Logical True
Force 3 = Real -9000000000.0
Force 3 Normalize by Area = Logical True
Name = String "Vertex6"
End
Boundary Condition 4
Force 1 = Real -0.0
Force 1 Normalize by Area = Logical True
Force 2 = Real -0.0
Force 2 Normalize by Area = Logical True
Force 3 = Real -9000000000.0
Force 3 Normalize by Area = Logical True
Name = String "Vertex7"
End
Boundary Condition 5
Force 1 = Real -0.0
Force 1 Normalize by Area = Logical True
Force 2 = Real -0.0
Force 2 Normalize by Area = Logical True
Force 3 = Real -9000000000.0
Force 3 Normalize by Area = Logical True
Name = String "Vertex8"
End

View File

@@ -83,6 +83,7 @@ make -j 4 && ./bin/FreeCADCmd -t femtest.app.test_result.TestResult.test_rho
make -j 4 && ./bin/FreeCADCmd -t femtest.app.test_result.TestResult.test_disp_abs
make -j 4 && ./bin/FreeCADCmd -t femtest.app.test_solver_calculix.TestSolverCalculix.test_solver_calculix
make -j 4 && ./bin/FreeCADCmd -t femtest.app.test_solver_elmer.TestSolverElmer.test_solver_elmer
make -j 4 && ./bin/FreeCADCmd -t femtest.app.test_solver_elmer.TestSolverElmer.test_elmer_ccxcanti_nodeload
make -j 4 && ./bin/FreeCADCmd -t femtest.app.test_solver_elmer.TestSolverElmer.test_elmer_ccxcanti_faceload
@@ -318,6 +319,11 @@ unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName(
'femtest.app.test_solver_elmer.TestSolverElmer.test_solver_elmer'
))
import unittest
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName(
'femtest.app.test_solver_elmer.TestSolverElmer.test_elmer_ccxcanti_nodeload'
))
import unittest
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName(
'femtest.app.test_solver_elmer.TestSolverElmer.test_elmer_ccxcanti_faceload'