Complete V4.8 example acceptance and scripts
FemLite CI / build-test (push) Has been cancelled

This commit is contained in:
shenw
2026-06-25 10:26:06 +08:00
parent d8dbc0b346
commit 240d2728fa
42 changed files with 1707 additions and 4 deletions
+3
View File
@@ -0,0 +1,3 @@
@echo off
call "%~dp0..\run_example_case.bat" "%~dp0" "Kirsch" "--static-linear" "kirsch_quad.inp" "1"
exit /b %errorlevel%
+3
View File
@@ -0,0 +1,3 @@
@echo off
call "%~dp0..\run_example_case.bat" "%~dp0" "ScordelisLo" "--static-linear" "scordelislo_quad_static.inp" "1"
exit /b %errorlevel%
@@ -0,0 +1,3 @@
@echo off
call "%~dp0..\run_example_case.bat" "%~dp0" "clamped_square_plate_pressure_pulse" "--run" "clamped_square_plate_pressure_pulse_s4.inp" "50"
exit /b %errorlevel%
+14
View File
@@ -0,0 +1,14 @@
# Elliptic Membrane Benchmark
This folder contains a compact FemLite approximation of the NAFEMS LE1 elliptic
membrane reference described by `models.sme.elliptic_membrane.zh_CN.pdf`.
The reference model is a thin, isotropic quarter membrane with elliptical inner
and outer boundaries, symmetry constraints on the coordinate axes, and outward
edge loading. FemLite currently represents this case with shell membrane
elements in the X-Y plane, using the benchmark geometry and material scale while
keeping the mesh intentionally small for smoke and regression runs.
Run `run_case.bat` from Explorer or a terminal to execute the static case and
write VTK results under `results\auto_run`.
@@ -0,0 +1,45 @@
*HEADING
FemLite compact NAFEMS LE1 elliptic membrane approximation
*NODE
1, 2.000000, 0.000000, 0.000000
2, 3.250000, 0.000000, 0.000000
3, 1.732051, 0.500000, 0.000000
4, 2.814583, 1.375000, 0.000000
5, 1.000000, 0.866025, 0.000000
6, 1.625000, 2.381570, 0.000000
7, 0.000000, 1.000000, 0.000000
8, 0.000000, 2.750000, 0.000000
*ELEMENT, TYPE=S4, ELSET=MEMBRANE
1, 1, 2, 4, 3
2, 3, 4, 6, 5
3, 5, 6, 8, 7
*NSET, NSET=X_SYMM
7, 8
*NSET, NSET=Y_SYMM
1, 2
*NSET, NSET=ALLNODES
1, 2, 3, 4, 5, 6, 7, 8
*NSET, NSET=OUTER
2, 4, 6, 8
*MATERIAL, NAME=STEEL
*ELASTIC
2.1E11, 0.3
*DENSITY
7850.0
*SHELL SECTION, ELSET=MEMBRANE, MATERIAL=STEEL
0.1
*BOUNDARY
X_SYMM, 1, 1, 0.0
Y_SYMM, 2, 2, 0.0
ALLNODES, 3, 6, 0.0
*STEP
*STATIC
*CLOAD
2, 1, 5.0E5
4, 1, 8.0E5
4, 2, 4.0E5
6, 1, 4.0E5
6, 2, 8.0E5
8, 2, 5.0E5
*END STEP
+3
View File
@@ -0,0 +1,3 @@
@echo off
call "%~dp0..\run_example_case.bat" "%~dp0" "elliptic_membrane" "--static-linear" "elliptic_membrane_s4_static.inp" "1"
exit /b %errorlevel%
+14
View File
@@ -0,0 +1,14 @@
# Golf Ball Impact Smoke Case
The reference PDF in this folder describes a detailed golf ball impact model
with multi-layer ball materials, club geometry, friction, and high-speed contact.
FemLite does not yet implement the full hyperelastic/viscoelastic material stack,
so this example provides a compact dynamic contact surrogate that exercises the
available shell impact path.
The case reuses the existing rigid-sphere impact topology, applies the documented
contact friction scale (`mu = 0.15`), and writes transient VTK output under
`results\auto_run`.
Run `run_case.bat` from Explorer or a terminal.
File diff suppressed because it is too large Load Diff
+3
View File
@@ -0,0 +1,3 @@
@echo off
call "%~dp0..\run_example_case.bat" "%~dp0" "golfBallImpact" "--run" "golf_ball_impact_s4_short.inp" "200"
exit /b %errorlevel%
@@ -0,0 +1,10 @@
# Membrane Uniaxial Stretching
This example turns the documented uniaxial membrane material parameters in this
folder into a compact FemLite S4 static test. The input uses the isotropic
reference values (`E = 100 kPa`, `nu = 0.3`) and applies a prescribed
displacement to the right edge of a thin rectangular membrane.
Run `run_case.bat` to solve the static case and write VTK output under
`results\auto_run`.
@@ -0,0 +1,35 @@
*HEADING
FemLite isotropic membrane uniaxial stretching smoke case
*NODE
1, 0.0, 0.0, 0.0
2, 0.5, 0.0, 0.0
3, 1.0, 0.0, 0.0
4, 0.0, 0.2, 0.0
5, 0.5, 0.2, 0.0
6, 1.0, 0.2, 0.0
*ELEMENT, TYPE=S4, ELSET=MEMBRANE
1, 1, 2, 5, 4
2, 2, 3, 6, 5
*NSET, NSET=LEFT
1, 4
*NSET, NSET=RIGHT
3, 6
*NSET, NSET=ALLNODES
1, 2, 3, 4, 5, 6
*MATERIAL, NAME=ISO_MEMBRANE
*ELASTIC
1.0E5, 0.3
*DENSITY
1.0
*SHELL SECTION, ELSET=MEMBRANE, MATERIAL=ISO_MEMBRANE
0.01
*BOUNDARY
LEFT, 1, 1, 0.0
1, 2, 2, 0.0
ALLNODES, 3, 6, 0.0
*STEP
*STATIC
*BOUNDARY
RIGHT, 1, 1, 0.01
*END STEP
@@ -0,0 +1,2 @@
E_iso 100[kPa] "Young's modulus"
nu_iso 0.3 "Poisson's ratio"
@@ -0,0 +1,2 @@
E_iso 100[kPa] "杨氏模量"
nu_iso 0.3 "泊松比"
@@ -0,0 +1,9 @@
E1_orth 100[kPa] "Young's modulus, 1 component"
E2_orth 20[kPa] "Young's modulus, 2 component"
E3_orth 20[kPa] "Young's modulus, 3 component"
nu12_orth 0.3 "Poisson's ratio, 12 component"
nu23_orth 0 "Poisson's ratio, 23 component"
nu13_orth 0 "Poisson's ratio, 13 component"
G12_orth 38.5[kPa] "Shear modulus, 12 component"
G23_orth G12_orth "Shear modulus, 23 component"
G13_orth G12_orth "Shear modulus, 13 component"
@@ -0,0 +1,9 @@
E1_orth 100[kPa] "杨氏模量,1 分量"
E2_orth 20[kPa] "杨氏模量,2 分量"
E3_orth 20[kPa] "杨氏模量,3 分量"
nu12_orth 0.3 "泊松比,12 分量"
nu23_orth 0 "泊松比,23 分量"
nu13_orth 0 "泊松比,13 分量"
G12_orth 38.5[kPa] "剪切模量,12 分量"
G23_orth G12_orth "剪切模量,23 分量"
G13_orth G12_orth "剪切模量,13 分量"
@@ -0,0 +1,3 @@
@echo off
call "%~dp0..\run_example_case.bat" "%~dp0" "membrane_uniaxial_stretching" "--static-linear" "membrane_uniaxial_s4_static.inp" "1"
exit /b %errorlevel%
@@ -0,0 +1,3 @@
@echo off
call "%~dp0..\run_example_case.bat" "%~dp0" "rigid_sphere_impact_plate" "--run" "rigid_sphere_impact_plate_s4.inp" "200"
exit /b %errorlevel%
+56
View File
@@ -0,0 +1,56 @@
@echo off
setlocal
if "%~5"=="" goto usage
set "CASE_DIR=%~1"
set "CASE_NAME=%~2"
set "MODE=%~3"
set "INP_FILE=%~4"
set "OUT_INTERVAL=%~5"
set "ROOT_DIR=%CASE_DIR%..\.."
set "EXE=%ROOT_DIR%\build-win-gcc-16\femlite.exe"
set "INP=%CASE_DIR%%INP_FILE%"
set "OUT_DIR=%CASE_DIR%results\auto_run"
echo FemLite %CASE_NAME%
echo.
if not exist "%INP%" (
echo Input file was not found: "%INP%"
goto fail
)
if not exist "%EXE%" (
echo femlite.exe was not found. Trying to build build-win-gcc-16...
cmake --build "%ROOT_DIR%\build-win-gcc-16" --config Release
if errorlevel 1 goto fail
)
if not exist "%OUT_DIR%" mkdir "%OUT_DIR%"
del /Q "%OUT_DIR%\history.csv" 2>nul
del /Q "%OUT_DIR%\nodes_*.csv" 2>nul
del /Q "%OUT_DIR%\elements_*.csv" 2>nul
del /Q "%OUT_DIR%\reactions_*.csv" 2>nul
del /Q "%OUT_DIR%\contact_*.csv" 2>nul
del /Q "%OUT_DIR%\result_*.vtk" 2>nul
echo Running FemLite...
"%EXE%" "%INP%" --output-dir "%OUT_DIR%" --output-interval %OUT_INTERVAL% %MODE%
if errorlevel 1 goto fail
echo.
echo Case completed successfully.
if not "%FEMLITE_NO_PAUSE%"=="1" pause
exit /b 0
:usage
echo Usage: run_example_case.bat CASE_DIR CASE_NAME MODE INP_FILE OUTPUT_INTERVAL
goto fail
:fail
echo.
echo Case failed.
if not "%FEMLITE_NO_PAUSE%"=="1" pause
exit /b 1
+3
View File
@@ -0,0 +1,3 @@
@echo off
call "%~dp0..\run_example_case.bat" "%~dp0" "scordelis_lo_roof" "--static-linear" "scordelis_lo_s4_static.inp" "1"
exit /b %errorlevel%
+3
View File
@@ -0,0 +1,3 @@
@echo off
call "%~dp0..\run_example_case.bat" "%~dp0" "shell_patch_test" "--static-linear" "shell_patch_s4.inp" "1"
exit /b %errorlevel%
+10
View File
@@ -0,0 +1,10 @@
# Shell-Solid Connection Smoke Case
The source notes in this folder describe a shell-solid transition benchmark.
FemLite does not yet include a full benchmark cylinder/hole coupling model, so
this case provides a small shared-node shell/solid interface that exercises the
same solver path: a C3D8 solid block shares its loaded face with an S4 shell skin.
Run `run_case.bat` to execute the static case and write VTK output under
`results\auto_run`.
@@ -0,0 +1,3 @@
@echo off
call "%~dp0..\run_example_case.bat" "%~dp0" "shell_solid_connection" "--static-linear" "shell_solid_connection_static.inp" "1"
exit /b %errorlevel%
@@ -0,0 +1,11 @@
r_outer 1[m] "Outer radius"
thickness 0.1[m] Thickness
r_inner r_outer-thickness "Inner radius"
r_mid r_outer-thickness/2 "Radius of shell midsurface in geometry"
r_hole 0.15[m] "Hole radius"
length 4[m] "Length of segment"
nominal_stress 10[MPa] "Target stress"
p_int nominal_stress*thickness/r_inner "Internal pressure"
f_extp -pi*r_hole^2*nominal_stress*thickness/r_mid "External load from pressure"
sx_ref 10[MPa] "Reference axial stress"
sz_ref 0[MPa] "Reference transverse stress"
@@ -0,0 +1,11 @@
r_outer 1[m] 外半径
thickness 0.1[m] 厚度
r_inner r_outer-thickness 内半径
r_mid r_outer-thickness/2 几何中壳中面的半径
r_hole 0.15[m] 孔半径
length 4[m] 分段长度
nominal_stress 10[MPa] 目标应力
p_int nominal_stress*thickness/r_inner 内压
f_extp -pi*r_hole^2*nominal_stress*thickness/r_mid 来自压力的外部载荷
sx_ref 10[MPa] 参考轴向应力
sz_ref 0[MPa] 参考横向应力
@@ -0,0 +1,38 @@
*HEADING
FemLite shared-node shell-solid interface smoke case
*NODE
1, 0.0, -0.05, 0.0
2, 1.0, -0.05, 0.0
3, 1.0, 0.05, 0.0
4, 0.0, 0.05, 0.0
5, 0.0, -0.05, 0.2
6, 1.0, -0.05, 0.2
7, 1.0, 0.05, 0.2
8, 0.0, 0.05, 0.2
*ELEMENT, TYPE=C3D8, ELSET=SOLID
1, 1, 2, 3, 4, 5, 6, 7, 8
*ELEMENT, TYPE=S4, ELSET=SHELL_SKIN
2, 2, 3, 7, 6
*NSET, NSET=FIXED
1, 4, 5, 8
*NSET, NSET=INTERFACE
2, 3, 6, 7
*MATERIAL, NAME=STEEL
*ELASTIC
2.1E11, 0.3
*DENSITY
7850.0
*SOLID SECTION, ELSET=SOLID, MATERIAL=STEEL
*SHELL SECTION, ELSET=SHELL_SKIN, MATERIAL=STEEL
0.01
*BOUNDARY
FIXED, 1, 3, 0.0
*STEP
*STATIC
*CLOAD
2, 1, 2.5E5
3, 1, 2.5E5
6, 1, 2.5E5
7, 1, 2.5E5
*END STEP
+12
View File
@@ -0,0 +1,12 @@
# Strength Reduction Slope Smoke Case
The reference document in this folder describes a geomechanical slope stability
strength-reduction benchmark. FemLite does not yet implement Mohr-Coulomb
plasticity or automated strength reduction, so this folder contains a compact
linear-elastic slope wedge derived from the documented geometry and material
scale. It is intended as an executable placeholder and parser/solver regression
case until the full material model is available.
Run `run_case.bat` to execute the static case and write VTK output under
`results\auto_run`.
+3
View File
@@ -0,0 +1,3 @@
@echo off
call "%~dp0..\run_example_case.bat" "%~dp0" "strengthReduction" "--static-linear" "strength_reduction_slope_static.inp" "1"
exit /b %errorlevel%
@@ -0,0 +1,60 @@
*HEADING
FemLite compact elastic slope wedge derived from strength-reduction benchmark
*NODE
1, 0.0, 0.0, 0.0
2, 85.0, 0.0, 0.0
3, 85.0, 0.0, 30.0
4, 30.0, 0.0, 30.0
5, 20.0, 0.0, 20.0
6, 0.0, 0.0, 20.0
7, 0.0, 1.0, 0.0
8, 85.0, 1.0, 0.0
9, 85.0, 1.0, 30.0
10, 30.0, 1.0, 30.0
11, 20.0, 1.0, 20.0
12, 0.0, 1.0, 20.0
*ELEMENT, TYPE=C3D4, ELSET=SLOPE
1, 1, 5, 2, 7
2, 2, 11, 8, 7
3, 2, 5, 11, 7
4, 1, 6, 5, 7
5, 5, 12, 11, 7
6, 5, 6, 12, 7
7, 2, 4, 3, 8
8, 3, 10, 9, 8
9, 3, 4, 10, 8
10, 2, 5, 4, 8
11, 4, 11, 10, 8
12, 4, 5, 11, 8
*NSET, NSET=BASE
1, 2, 7, 8
*NSET, NSET=LEFT
1, 6, 7, 12
*NSET, NSET=ALLNODES
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
*NSET, NSET=CREST
3, 4, 9, 10
*NSET, NSET=SLOPE_FACE
5, 6, 11, 12
*MATERIAL, NAME=ELASTIC_SOIL
*ELASTIC
2.0E7, 0.3
*DENSITY
1940.0
*SOLID SECTION, ELSET=SLOPE, MATERIAL=ELASTIC_SOIL
*BOUNDARY
ALLNODES, 2, 2, 0.0
BASE, 3, 3, 0.0
LEFT, 1, 1, 0.0
*STEP
*STATIC
*CLOAD
3, 3, -1.0E5
4, 3, -1.0E5
5, 3, -5.0E4
6, 3, -5.0E4
9, 3, -1.0E5
10, 3, -1.0E5
11, 3, -5.0E4
12, 3, -5.0E4
*END STEP
+3
View File
@@ -0,0 +1,3 @@
@echo off
call "%~dp0..\run_example_case.bat" "%~dp0" "tension2D" "--run" "disp0_0001quad.inp" "100"
exit /b %errorlevel%
+3
View File
@@ -0,0 +1,3 @@
@echo off
call "%~dp0..\run_example_case.bat" "%~dp0" "uniaxialTension3D" "--run" "disp0_0001hex.inp" "100"
exit /b %errorlevel%