diff --git a/CMakeLists.txt b/CMakeLists.txt index 2337d6d..008a441 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.20) project(FemLite - VERSION 0.4.3 + VERSION 0.4.8 LANGUAGES C Fortran ) @@ -428,6 +428,13 @@ set_tests_properties(perf_contact_pair_medium PROPERTIES LABELS "performance_smoke" ) +add_test(NAME perf_contact_pair_p1 COMMAND perf_contact_pair 128 1) +set_tests_properties(perf_contact_pair_p1 PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "performance_smoke" + TIMEOUT 60 +) + if(Python3_Interpreter_FOUND) add_test(NAME source_size COMMAND "${Python3_EXECUTABLE}" @@ -700,6 +707,353 @@ if(Python3_Interpreter_FOUND) LABELS "example_smoke" TIMEOUT 60 ) + + add_test(NAME example_node_analytical_contact_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + node_analytical_contact + examples/node_analytical_plane_contact/node_analytical_plane_contact.inp + run + --dynamic-steps 1 + --output-interval 1 + --require-contact + ) + set_tests_properties(example_node_analytical_contact_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_block_on_arch_contact_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "block_on_arch_contact" + "examples/block_on_arch/block_on_arch_contact_smoke.inp" + "run" + --dynamic-steps 1 + --output-interval 1 + --require-contact + ) + set_tests_properties(example_block_on_arch_contact_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_cylinder_roller_contact_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "cylinder_roller_contact" + "examples/cylinder_roller_contact/cylinder_roller_contact_smoke.inp" + "run" + --dynamic-steps 5 + --output-interval 5 + --require-contact + ) + set_tests_properties(example_cylinder_roller_contact_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_sliding_wedge_friction_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "sliding_wedge_friction" + "examples/sliding_wedge/sliding_wedge_friction_smoke.inp" + "run" + --dynamic-steps 20 + --output-interval 10 + --require-contact + --require-friction + ) + set_tests_properties(example_sliding_wedge_friction_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_roll_forming_friction_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "roll_forming_friction" + "examples/roll_forming/roll_forming_friction_smoke.inp" + "run" + --dynamic-steps 20 + --output-interval 10 + --require-contact + --require-friction + ) + set_tests_properties(example_roll_forming_friction_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_falling_objects_contact_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "falling_objects_contact" + "examples/falling_objects/falling_objects_contact_smoke.inp" + "run" + --dynamic-steps 20 + --output-interval 10 + --require-contact + ) + set_tests_properties(example_falling_objects_contact_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_ball_adhesion_contact_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "ball_adhesion_contact" + "examples/ball_adhesion_decohesion/ball_adhesion_contact_smoke.inp" + "run" + --dynamic-steps 20 + --output-interval 10 + --require-contact + ) + set_tests_properties(example_ball_adhesion_contact_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_buckling_corrugated_shell_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "buckling_corrugated_shell" + "examples/buckling_corrugated_shell/corrugated_shell_static_smoke.inp" + "static-linear" + --output-interval 1 + --probe-node 8 + --probe-field uz + --min-abs-displacement 1.0e-12 + --sign negative + ) + set_tests_properties(example_buckling_corrugated_shell_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_dynamic_grain_container_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "dynamic_grain_container" + "examples/Dynamic_Grain_Packing_of_a_Flexible_Container/flexible_container_ground_contact_smoke.inp" + "run" + --dynamic-steps 5 + --output-interval 5 + --require-contact + ) + set_tests_properties(example_dynamic_grain_container_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_thick_plate_pressure_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "thick_plate_pressure" + "examples/thick_plate/thick_plate_pressure_smoke.inp" + "static-linear" + --output-interval 1 + --probe-node 7 + --probe-field uz + --min-abs-displacement 1.0e-12 + --sign negative + ) + set_tests_properties(example_thick_plate_pressure_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_membrane_airbag_pressure_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "membrane_airbag_pressure" + "examples/membrane_airbag_inflation/membrane_airbag_pressure_s4_static.inp" + "static-linear" + --output-interval 1 + --probe-node 5 + --probe-field uz + --min-abs-displacement 1.0e-12 + --sign negative + ) + set_tests_properties(example_membrane_airbag_pressure_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_spherical_cap_point_load_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "spherical_cap_point_load" + "examples/spherical_cap_with_central_point_load/spherical_cap_s4_static.inp" + "static-linear" + --output-interval 1 + --probe-node 5 + --probe-field uz + --min-abs-displacement 1.0e-12 + --sign negative + ) + set_tests_properties(example_spherical_cap_point_load_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_blasting_rock_pulse_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "blasting_rock_pulse" + "examples/blasting_rock/blasting_rock_pulse_smoke.inp" + "run" + --dynamic-steps 5 + --output-interval 5 + --probe-node 1 + --probe-field uz + --min-abs-displacement 1.0e-12 + --sign positive + ) + set_tests_properties(example_blasting_rock_pulse_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_nonlinear_harmonic_membrane_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "nonlinear_harmonic_membrane" + "examples/nonlinear_harmonic/nonlinear_harmonic_membrane_smoke.inp" + "run" + --dynamic-steps 5 + --output-interval 5 + --probe-node 5 + --probe-field uz + --min-abs-displacement 1.0e-12 + --sign negative + ) + set_tests_properties(example_nonlinear_harmonic_membrane_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_layered_shell_tension_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "layered_shell_tension" + "examples/failure_prediction_in_a_layered_shell/layered_shell_tension_smoke.inp" + "static-linear" + --output-interval 1 + --probe-node 2 + --probe-field ux + --min-abs-displacement 1.0e-12 + --sign positive + ) + set_tests_properties(example_layered_shell_tension_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_two_arches_contact_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "two_arches_contact" + "examples/two_arches/two_arches_contact_smoke.inp" + "run" + --dynamic-steps 1 + --output-interval 1 + --require-contact + ) + set_tests_properties(example_two_arches_contact_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_pinched_hemisphere_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "pinched_hemisphere" + "examples/pinched_hemispherical_shell/pinched_hemisphere_s4_dynamic_smoke.inp" + "run" + --dynamic-steps 5 + --output-interval 5 + --probe-node 7 + --probe-field ux + --min-abs-displacement 1.0e-12 + --sign negative + ) + set_tests_properties(example_pinched_hemisphere_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) + + add_test(NAME example_stress_dependent_cantilever_smoke + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_SOURCE_DIR}/tests/scripts/run_example_smoke.py" + "${CMAKE_SOURCE_DIR}" + "$" + "${CMAKE_BINARY_DIR}" + "stress_dependent_cantilever" + "examples/stress_dependent_elasticity/stress_dependent_cantilever_smoke.inp" + "static-linear" + --output-interval 1 + --probe-node 10 + --probe-field uz + --min-abs-displacement 1.0e-12 + --sign negative + ) + set_tests_properties(example_stress_dependent_cantilever_smoke PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + LABELS "example_smoke" + ) endif() add_test(NAME implicit_inp COMMAND test_implicit_inp) diff --git a/docs/07_user_manual.md b/docs/07_user_manual.md index 8194218..5320dec 100644 --- a/docs/07_user_manual.md +++ b/docs/07_user_manual.md @@ -1,12 +1,12 @@ -# FemLite 0.4.3 用户手册 +# FemLite 0.4.8 用户手册 日期:2026-06-24 ## 1. 适用范围 -本文档面向 FemLite 0.4.3 的使用者,说明如何编译、运行、准备输入文件、查看结果和复现实例。 +本文档面向 FemLite 0.4.8 的使用者,说明如何编译、运行、准备输入文件、查看结果和复现实例。 -FemLite 0.4.3 是船舶接触爆炸结构响应 FEM 软件的第四版接触增强阶段版,当前支持: +FemLite 0.4.8 是船舶接触爆炸结构响应 FEM 软件的第四版阶段验收版,当前支持: - 三维实体和壳单元结构分析。 - 显式瞬态动力学。 @@ -17,11 +17,11 @@ FemLite 0.4.3 是船舶接触爆炸结构响应 FEM 软件的第四版接触增 - element/node/analytical surface 子集、contact property 子集、刚性平面接触和面-面 contact pair 阶段能力。 - contact pair active set、gap residual 和 augmented penalty 诊断输出。 - 静力/隐式求解的收敛状态和 cutback 诊断查询接口。 -- 内部线性求解器可在 CG 和 BiCGSTAB 间切换,并提供预条件和迭代统计查询。 +- 内部线性求解器可在 CG、BiCGSTAB 和 GMRES 间切换,并提供预条件和迭代统计查询。 - CSV、VTK、restart 和 contact CSV 输出。 - Fortran95 原生接口、C ABI 子集和 Python 调试脚本。 -0.4.3 不等价于完整 Abaqus 兼容求解器,也不等价于工程级通用 mortar/摩擦接触最终版。 +0.4.8 不等价于完整 Abaqus 兼容求解器,也不等价于工程级通用 mortar/摩擦接触最终版。 ## 2. 目录概览 @@ -129,7 +129,7 @@ build-win-gcc-16\femlite.exe examples\rigid_sphere_impact_plate\rigid_sphere_imp ## 6. 输入文件 -FemLite 使用 Abaqus inp 风格输入文件的子集。0.4.3 常用支持项包括: +FemLite 使用 Abaqus inp 风格输入文件的子集。0.4.8 常用支持项包括: - `*NODE` - `*ELEMENT` @@ -240,7 +240,7 @@ kind,pair_id,active_count,max_penetration,force_norm,work_estimate,cumulative_wo `search_*` 字段在 `SUMMARY` 行给出最近一次 contact pair 力评估的全局搜索统计、BVH 候选缓存使用情况和 `cpu_time` 口径秒数;逐 `PAIR` 行给出对应接触对的搜索、缓存和计时统计。`cpu_time` 是轻量趋势诊断,小算例中可能显示为 0。 -Fortran95 API 可通过 `fem_get_convergence_status` 查询最近一次求解的增量、迭代、残差、位移修正范数和收敛标志,通过 `fem_get_convergence_metrics` 查询相对残差、contact gap residual 和 combined norm,通过 `fem_get_convergence_diagnostics` 查询 cutback 次数、最后步长、最后有效时间、状态码和失败原因码。`fem_set_linear_solver` 可选择 `CG` 或 `BiCGSTAB` 与 `none/Jacobi` 预条件,`fem_get_linear_solver_stats` 查询最近一次线性求解迭代数、残差和状态。V4.7 起,`fem_set_shell_stabilization` 可设置壳 drilling 系数、S3 剪切锁定折减系数和最小折减比例,默认分别为 `1.0e-4`、`0.0625`、`1.0e-4`;`fem_get_shell_stability_stats` 可查询最近壳刚度装配诊断。C ABI 提供同名 `femlite_get_*`/`femlite_set_*` 包装,`converged` 使用 0/1 整数返回。 +Fortran95 API 可通过 `fem_get_convergence_status` 查询最近一次求解的增量、迭代、残差、位移修正范数和收敛标志,通过 `fem_get_convergence_metrics` 查询相对残差、contact gap residual 和 combined norm,通过 `fem_get_convergence_diagnostics` 查询 cutback 次数、最后步长、最后有效时间、状态码和失败原因码。`fem_set_linear_solver` 可选择 `CG`、`BiCGSTAB` 或 `GMRES` 与 `none/Jacobi` 预条件,`fem_get_linear_solver_stats` 查询最近一次线性求解迭代数、残差和状态。V4.7 起,`fem_set_shell_stabilization` 可设置壳 drilling 系数、S3 剪切锁定折减系数和最小折减比例,默认分别为 `1.0e-4`、`0.0625`、`1.0e-4`;`fem_get_shell_stability_stats` 可查询最近壳刚度装配诊断。C ABI 提供同名 `femlite_get_*`/`femlite_set_*` 包装,`converged` 使用 0/1 整数返回。 建议把大型结果输出到 `examples/.../results/...` 或独立 `output/` 目录。仓库 `.gitignore` 默认忽略大规模结果文件。 @@ -263,6 +263,24 @@ Fortran95 API 可通过 `fem_get_convergence_status` 查询最近一次求解的 | `examples/shell_solid_connection` | 共享节点壳-实体接口静力案例 | | `examples/strengthReduction` | 强度折减文档派生的线弹性坡体案例 | | `examples/golfBallImpact` | 高尔夫冲击文档派生的壳接触动力缩减案例 | +| `examples/node_analytical_plane_contact` | node surface 到 analytical plane 的接触 smoke | +| `examples/block_on_arch` | 文档派生的浅拱-解析刚体面接触 smoke | +| `examples/cylinder_roller_contact` | 滚子-基础法向接触代表性 smoke | +| `examples/sliding_wedge` | 倾斜楔块摩擦滑移接触 smoke | +| `examples/membrane_airbag_inflation` | 膜气囊压力载荷 S4 动力/静力回归入口 | +| `examples/spherical_cap_with_central_point_load` | 球冠中心载荷 S4 壳静力回归入口 | +| `examples/two_arches` | 双拱壳-壳接触 smoke | +| `examples/blasting_rock` | 花岗岩块爆破脉冲显式动力 smoke | +| `examples/nonlinear_harmonic` | 薄膜谐波压力响应显式动力 smoke | +| `examples/failure_prediction_in_a_layered_shell` | 四层共享节点壳拉伸回归入口 | +| `examples/pinched_hemispherical_shell` | pinched hemisphere S4 壳动力 smoke | +| `examples/stress_dependent_elasticity` | 分区弹性模量悬臂梁弯曲回归入口 | +| `examples/roll_forming` | 滚压成形文档派生的压紧-摩擦牵引 smoke | +| `examples/falling_objects` | 多物体显式接触与刚性箱底代表性 smoke | +| `examples/ball_adhesion_decohesion` | 球-膜接触压入 smoke,粘附/脱粘本构为后续能力 | +| `examples/buckling_corrugated_shell` | 波纹锥壳屈曲文档派生的静力预载 smoke | +| `examples/Dynamic_Grain_Packing_of_a_Flexible_Container` | 动态颗粒装填文档派生的柔性容器压力-地面接触 smoke | +| `examples/thick_plate` | NAFEMS LE10 厚板压力静力回归入口 | | `examples/contact_rigid_plane_indentation` | 刚性平面压入接触算例 | | `examples/contact_two_blocks_compression` | 两实体块面-面压缩接触算例 | | `examples/shell_rigid_plane_contact` | S4 壳-刚性平面接触算例 | @@ -284,9 +302,9 @@ ctest --test-dir build-win-gcc-16 --output-on-failure ctest --test-dir build-win-gcc-16 -R "^(contact|implicit_inp|source_size)$" --output-on-failure ``` -0.4.3 本地记录: +0.4.8 本地记录: -- Windows GCC 16:34/34 passed。 +- Windows GCC 16:V4.8 后硬化加入 GMRES、node analytical contact、P1 contact 性能 smoke,并补齐所有文档型 examples 目录后,当前 CTest 记录为 66/66 passed。 - WSL Ubuntu + gfortran 13.3:沿用第三版发布流程复测。 - Windows Intel oneAPI ifx 2026.0 + MSVC:沿用第三版发布流程复测。 diff --git a/docs/08_developer_manual.md b/docs/08_developer_manual.md index c49fed5..9be21c8 100644 --- a/docs/08_developer_manual.md +++ b/docs/08_developer_manual.md @@ -1,4 +1,4 @@ -# FemLite 0.4.3 开发者手册 +# FemLite 0.4.8 开发者手册 日期:2026-06-24 @@ -6,7 +6,7 @@ 本文档面向 FemLite 开发者,说明代码结构、构建测试、模块职责、接口扩展、编码约束和发布检查流程。 -FemLite 核心代码采用 Fortran 95 非面向对象风格,使用集中式 `fem_database` 保存模型、状态和求解数据。当前版本为 0.4.3。 +FemLite 核心代码采用 Fortran 95 非面向对象风格,使用集中式 `fem_database` 保存模型、状态和求解数据。当前版本为 0.4.8。 ## 2. 开发原则 @@ -214,10 +214,10 @@ fem_contact_output.f90 contact CSV 字段辅助 求解器核心文件: - `fem_assembly_csr.f90`:DOF 获取、CSR 图案和装配。 -- `fem_linear_solver_cg.f90`:线性求解器分发层、Jacobi/none 预条件、CG、BiCGSTAB 和外部求解器占位。 +- `fem_linear_solver_cg.f90`:线性求解器分发层、Jacobi/none 预条件、CG、BiCGSTAB、GMRES 和外部第三方库预留入口。 - `fem_solver_implicit.f90`:静力、隐式 Newmark、非线性 Newton。 -V4.6 起,隐式求解器内部不再直调 CG,而是通过 `linear_solver_solve` 分发。新增线性求解器时应先在该分发层注册 method 常量、预条件支持、统计状态和模块测试,再接入 Fortran API / C ABI。 +V4.6 起,隐式求解器内部不再直调 CG,而是通过 `linear_solver_solve` 分发。当前内部支持 CG、BiCGSTAB 和 GMRES;新增线性求解器时应先在该分发层注册 method 常量、预条件支持、统计状态和模块测试,再接入 Fortran API / C ABI。外部第三方稀疏库后端仍作为后续适配项,不计入当前阶段完成项。 新增求解路径时应明确: @@ -321,7 +321,7 @@ ctest --test-dir build-win-gcc-16 -R "^(contact|contact_omp1|contact_omp4|restar - 示例 smoke:shell patch、Scordelis-Lo、pressure pulse、rigid sphere impact。 - 性能测试:`perf_p1`、`perf_contact_pair`、`perf_contact_pair_omp_consistency`。 -0.4.3 基线 CTest 包含 34 项;V4.4 开发态加入 `contact_omp1`、`contact_omp4`、`perf_contact_pair_smoke`、`perf_contact_pair_medium` 和 `perf_contact_pair_omp_consistency` 后,在 Python 可用时包含 39 项。 +0.4.8 基线 CTest 已覆盖 V4.1 至 V4.8 的接触、隐式、壳、示例和发布检查项;V4.8 后硬化继续加入 GMRES、node analytical contact smoke、P1 contact 性能 smoke,以及所有文档型 `examples/` 目录的可执行案例和双击脚本检查。当前 Windows GCC 16 记录为 66/66 passed。 ## 14. 源码规模门禁 @@ -339,7 +339,7 @@ python tests\scripts\check_source_size.py . --warn-file-lines 1500 --max-file-li - 超过 2000 行必须登记 hard-threshold exception。 - stale exception 会导致测试失败。 -0.4.3 当前无 active hard-threshold exception;软警告不阻断发布。 +0.4.8 当前无 active hard-threshold exception;软警告不阻断发布。 ## 15. 编码规范 @@ -368,7 +368,7 @@ python tests\scripts\check_source_size.py . --warn-file-lines 1500 --max-file-li - Windows 双击自动运行脚本可命名为 `run_case.bat`;脚本应把结果写入示例目录下的 `results` 子目录,并支持自动检查失败码。 新增基准测试案例应放在 `examples/` 下,并为每个案例建立独立文件夹;旧兼容目录不作为新测试入口。 -V4.8 起,`examples_layout` CTest 会检查 `examples/` 一级目录:有文档的目录必须包含至少一个 `.inp`,有 `.inp` 的目录必须包含 `run_case.bat`。 +V4.8 起,`examples_layout` CTest 会检查 `examples/` 一级目录:有文档的目录必须包含至少一个 `.inp`,有 `.inp` 的目录必须包含 `run_case.bat`。文档后缀包含 `.md`、`.pdf`、`.ppt`、`.pptx`、`.txt` 和 `.rst`。 示例目录不应提交: diff --git a/docs/v4_acceptance_report.md b/docs/v4_acceptance_report.md index 202683e..b0076cf 100644 --- a/docs/v4_acceptance_report.md +++ b/docs/v4_acceptance_report.md @@ -19,7 +19,7 @@ V4.8 是第四版阶段验收收束版,重点确认 0.4.x 开发期新增的 - 第一版、第二版、第三版已验收能力无回退。 - surface/contact 输入子集、contact pair active-set、augmented penalty、摩擦历史、BVH 搜索、候选缓存和性能统计保持可回归。 - 非线性静力和非线性 Newmark 收敛诊断、cutback 诊断和 C ABI 查询接口保持可回归。 -- CG/BiCGSTAB 线性求解器分发、预条件设置和统计接口保持可回归。 +- CG/BiCGSTAB/GMRES 线性求解器分发、预条件设置和统计接口保持可回归。 - 壳 drilling 稳定、S3 剪切锁定诊断、壳 J2 剪切/弯曲代表性塑性和 Scordelis-Lo smoke 保持可回归。 - `examples/` 下文档型目录均有可执行 `.inp`,包含 `.inp` 的目录均有 `run_case.bat`。 @@ -32,10 +32,10 @@ V4.8 是第四版阶段验收收束版,重点确认 0.4.x 开发期新增的 | 基础回归 | PASS | smoke、材料、单元、数据库、稀疏矩阵、线性求解、输出和 restart 测试保留 | | 接触与摩擦 | PASS | contact、OMP 1/4、contact block sliding、rigid impact 和接触统计回归覆盖 | | 隐式与收敛诊断 | PASS | implicit inp、solver implicit、cutback 和收敛状态接口回归覆盖 | -| 线性求解器 | PASS | CG/BiCGSTAB、Jacobi、unsupported external 占位和 C ABI 设置查询覆盖 | +| 线性求解器 | PASS | CG/BiCGSTAB/GMRES、Jacobi 和 C ABI 设置查询覆盖;external 仅为后续第三方库适配项 | | 壳稳定与壳塑性 | PASS | drilling、S3 剪切锁定、S4 J2 剪切/弯曲、trial rollback 和 Scordelis-Lo smoke 覆盖 | | 示例目录结构 | PASS | `examples_layout` 检查文档目录和双击脚本约定 | -| 文档派生示例 | PASS | elliptic membrane、membrane uniaxial、shell-solid connection、strength reduction、golf ball impact 均接入 smoke | +| 文档派生示例 | PASS | elliptic membrane、membrane uniaxial、shell-solid connection、strength reduction、golf ball impact,以及 block-on-arch、roller contact、sliding wedge、airbag membrane、spherical cap、two arches、blasting rock、nonlinear harmonic、layered shell、pinched hemisphere、stress dependent elasticity、roll forming、falling objects、ball adhesion contact、corrugated shell buckling preload、dynamic grain container 和 thick plate 均接入 smoke | | 源码规模门禁 | PASS | `source_size` 保持通过 | ## 4. 示例矩阵 @@ -49,6 +49,24 @@ V4.8 期间补齐或确认的示例目录: | `examples/shell_solid_connection` | `run_case.bat` | C3D8 与 S4 共享节点接口静力案例 | | `examples/strengthReduction` | `run_case.bat` | 强度折减文档派生线弹性坡体案例 | | `examples/golfBallImpact` | `run_case.bat` | 壳接触动力缩减案例,采用文档摩擦系数尺度 | +| `examples/node_analytical_plane_contact` | `run_case.bat` | node-based slave surface 到 analytical rigid plane 的接触 smoke | +| `examples/block_on_arch` | `run_case.bat` | 浅拱与解析刚体面接触代表性 smoke | +| `examples/cylinder_roller_contact` | `run_case.bat` | 滚子-基础法向接触代表性 smoke | +| `examples/sliding_wedge` | `run_case.bat` | 倾斜接触面摩擦滑移 smoke | +| `examples/membrane_airbag_inflation` | `run_case.bat` | S4 膜片压力载荷回归入口 | +| `examples/spherical_cap_with_central_point_load` | `run_case.bat` | 球冠中心载荷 S4 静力回归入口 | +| `examples/two_arches` | `run_case.bat` | 双拱壳-壳接触代表性 smoke | +| `examples/blasting_rock` | `run_case.bat` | C3D8 花岗岩块爆破脉冲动力 smoke | +| `examples/nonlinear_harmonic` | `run_case.bat` | 薄膜谐波压力显式动力 smoke | +| `examples/failure_prediction_in_a_layered_shell` | `run_case.bat` | 四层共享节点壳拉伸回归入口 | +| `examples/pinched_hemispherical_shell` | `run_case.bat` | pinched hemisphere S4 壳动力 smoke | +| `examples/stress_dependent_elasticity` | `run_case.bat` | 分区弹性模量悬臂梁弯曲回归入口 | +| `examples/roll_forming` | `run_case.bat` | 滚压成形文档派生的压紧-摩擦牵引 smoke | +| `examples/falling_objects` | `run_case.bat` | 多物体显式接触与刚性箱底代表性 smoke | +| `examples/ball_adhesion_decohesion` | `run_case.bat` | 球-膜接触压入 smoke,粘附/脱粘本构为后续能力 | +| `examples/buckling_corrugated_shell` | `run_case.bat` | 波纹锥壳屈曲文档派生的静力预载 smoke | +| `examples/Dynamic_Grain_Packing_of_a_Flexible_Container` | `run_case.bat` | 动态颗粒装填文档派生的柔性容器压力-地面接触 smoke | +| `examples/thick_plate` | `run_case.bat` | NAFEMS LE10 厚板压力静力回归入口 | | 既有基准目录 | `run_case.bat` | Kirsch、Scordelis-Lo、shell patch、压力脉冲、刚球冲击、2D/3D 拉伸等均补齐双击入口 | ## 5. 测试命令 @@ -66,10 +84,10 @@ ctest --test-dir build-win-gcc-16 --output-on-failure ctest --test-dir build-win-gcc-16 -R examples_layout --output-on-failure ``` -文档派生示例 smoke 专项检查: +示例 smoke 专项检查: ```powershell -ctest --test-dir build-win-gcc-16 -R "example_(elliptic_membrane|membrane_uniaxial|shell_solid_connection|strength_reduction|golf_ball_impact)_smoke" --output-on-failure +ctest --test-dir build-win-gcc-16 -L example_smoke --output-on-failure ``` 本轮 Windows GCC 16 验证结果: @@ -79,11 +97,11 @@ cmake --build build-win-gcc-16 --config Release completed successfully ctest --test-dir build-win-gcc-16 --output-on-failure -100% tests passed, 0 tests failed out of 47 +100% tests passed, 0 tests failed out of 66 ``` ## 6. 后续限制 -- 完整 Mohr-Coulomb 强度折减、完整高尔夫球多材料冲击和高保真 shell-solid benchmark 仍需核心求解器后续能力支持。 +- 完整 Mohr-Coulomb 强度折减、完整高尔夫球多材料冲击、高保真 shell-solid benchmark、几何非线性 pinched hemisphere 载荷曲线、复合材料失效准则、应力相关弹性弱式映射、低反射边界、频域-时域谐波初值流程、完整滚压成形刚体辊旋转/塑性过程、球-膜粘附/脱粘 cohesive law、线性屈曲特征值、循环对称边界和颗粒流-膜双向耦合仍需核心求解器后续能力支持。 - pinched cylinder、hemisphere、twisted beam 和更密 Scordelis-Lo 收敛矩阵建议作为 0.5.x 或专项长跑基准推进。 -- 外部稀疏求解器后端当前仍是显式 unsupported 占位,接口已预留但未绑定第三方库。 +- 外部第三方稀疏求解器后端仍是后续适配项;当前第四版完成范围以内置 CG、BiCGSTAB 和 GMRES 为准。 diff --git a/docs/v4_development_plan.md b/docs/v4_development_plan.md index 4a3c7fc..c05e210 100644 --- a/docs/v4_development_plan.md +++ b/docs/v4_development_plan.md @@ -592,7 +592,7 @@ FemLite 0.4.x 定位为: | S9 | 壳局部平面几何近似 | DONE/PARTIAL。Scordelis-Lo 曲壳 S3/S4 静力 smoke 已接入独立基准目录;完整 pinched cylinder/hemisphere/twisted beam 矩阵进入 V4.8 验收扩展 | V4.7 | | S10 | 壳塑性 section tangent 基准不足 | DONE/PARTIAL。已补充 S4 J2 剪切塑性、代表性外纤维弯曲塑性、trial/rollback 和 tangent 对称性回归;完整厚度积分壳塑性和卸载长跑进入后续 | V4.7 | | S11 | 集中质量和壳转动惯量对角近似 | B 类。显式继续默认集中质量;隐式路径增加一致质量或改进转动惯量选项的设计和小算例验证 | V4.5, V4.6 | -| S12 | CG + Jacobi 单一路径 | DONE。已建立线性求解器分发层,支持 CG、BiCGSTAB、none/Jacobi 预条件、统计查询和外部求解器占位 | V4.6 | +| S12 | CG + Jacobi 单一路径 | DONE。已建立线性求解器分发层,支持 CG、BiCGSTAB、GMRES、none/Jacobi 预条件和统计查询;外部第三方库后端作为后续适配项 | V4.6, V4.8 hardening | | S13 | MPC penalty 约束 | C 类。0.4.x 保留 penalty MPC,补充病态诊断和回归;严格 Lagrange multiplier 或 multiplier-augmented MPC 进入后续 | V4.5 | | S14 | 小应变 J2/J2_JC + Jaumann 客观率 | C 类。0.4.x 重点做接触/隐式稳定性验证和文档边界;完整 `F = Fe Fp` 大变形塑性列入 0.5.0 或后续 | V4.5, V4.7 | | S15 | restart 不保存完整模型数据库 | B 类。V4.3 已同步保存 mortar 积分点摩擦历史;0.4.x 后续继续同步新增求解状态,完整 inp 数据库级 restart 作为后续增强 | V4.3, V4.8 | @@ -724,7 +724,7 @@ FemLite 0.4.x 定位为: ### V4.4 搜索统计与并行优化起步 -完成状态:V4.4 起步,尚未作为发布版本;当前项目版本仍为 0.4.3。 +完成状态:V4.4 起步记录;当前项目已继续推进到 0.4.8 阶段验收版。 已完成: @@ -815,7 +815,7 @@ FemLite 0.4.x 定位为: ### V4.6 稀疏线性求解器接口完善 -完成状态:V4.6 线性求解器抽象、内部可切换求解路径、预条件选择和最近一次求解统计已形成阶段完善基线;外部稀疏求解器当前为显式 unsupported 占位。 +完成状态:V4.6 线性求解器抽象、内部可切换求解路径、预条件选择和最近一次求解统计已形成阶段完善基线;V4.8 后硬化补充内部 GMRES,外部第三方稀疏求解器不再作为第四版完成项。 已完成: @@ -824,7 +824,8 @@ FemLite 0.4.x 定位为: - 新增 BiCGSTAB 内部求解器,覆盖非对称 CSR 小系统。 - 预条件器支持 `LPRECOND_NONE` 和 `LPRECOND_JACOBI`。 - 隐式线性静力、线性 Newmark、非线性静力 Newton 修正方程和非线性 Newmark 修正方程均改为通过分发层求解。 -- `LSOLVER_EXTERNAL` 作为外部稀疏求解器预留 method;当前实际求解返回 `LS_STATUS_UNSUPPORTED`。 +- `LSOLVER_GMRES` 已接入分发层,作为 CG/BiCGSTAB 之外的内部非对称 Krylov 求解器。 +- `LSOLVER_EXTERNAL` 仅作为后续外部第三方稀疏库适配预留 method;当前实际求解返回 `LS_STATUS_UNSUPPORTED`,不计入 V4.8 完成范围。 - 新增 Fortran API `fem_set_linear_solver`、`fem_get_linear_solver_settings` 和 `fem_get_linear_solver_stats`。 - C ABI 新增 `femlite_set_linear_solver`、`femlite_get_linear_solver_settings` 和 `femlite_get_linear_solver_stats`。 @@ -833,9 +834,9 @@ FemLite 0.4.x 定位为: - `linear_solver_cg` 回归继续覆盖原 CG 入口、零 RHS 和非收敛路径。 - `linear_solver_cg` 回归覆盖分发层 CG + none 预条件。 - `linear_solver_cg` 回归覆盖 BiCGSTAB + Jacobi 求解非对称 CSR 小系统。 -- `linear_solver_cg` 回归覆盖外部求解器占位的 unsupported 状态。 +- `linear_solver_cg` 回归覆盖 GMRES + Jacobi 求解非对称 CSR 小系统,并保留外部求解器未启用时的明确 unsupported 状态。 - `implicit_inp` 回归将隐式线性静力路径切换到 BiCGSTAB,并检查最后一次线性求解统计。 -- `c_api` 回归覆盖线性求解器默认设置、空模型统计、切换到 BiCGSTAB + none 和恢复默认。 +- `c_api` 回归覆盖线性求解器默认设置、空模型统计、切换到 BiCGSTAB + none、切换到 GMRES + Jacobi 和恢复默认。 - `source_size` 定向 CTest 已通过,新增求解器接口未触发源码规模硬阈值。 后续: @@ -886,20 +887,24 @@ FemLite 0.4.x 定位为: - 新增 `examples/elliptic_membrane/` S4 静力缩减案例,基于 NAFEMS LE1 椭圆膜文档的几何、材料和边界尺度。 - 新增 `examples/membrane_uniaxial_stretching/` S4 单轴拉伸静力案例,采用文档中的各向同性膜材料参数。 - 新增 `examples/shell_solid_connection/` 共享节点壳-实体接口静力案例,覆盖 C3D8 与 S4 混合模型路径。 -- 新增 `examples/strengthReduction/` 线弹性坡体楔形静力案例,作为强度折减文档的可执行占位基准。 +- 新增 `examples/strengthReduction/` 线弹性坡体楔形静力案例,作为当前求解器范围内的强度折减文档回归入口。 - 新增 `examples/golfBallImpact/` 壳接触动力缩减案例,采用文档中的摩擦系数尺度并复用刚球冲击路径。 - 为 `clamped_square_plate_pressure_pulse`、`Kirsch`、`rigid_sphere_impact_plate`、`scordelis_lo_roof`、`ScordelisLo`、`shell_patch_test`、`tension2D`、`uniaxialTension3D` 和上述新增目录补充 `run_case.bat`。 - 新增通用 `examples/run_example_case.bat`,统一示例双击运行、结果目录清理和失败码返回。 - 新增 `tests/scripts/check_examples_layout.py`,检查 `examples/` 一级目录中“有文档无 `.inp`”和“有 `.inp` 无 `run_case.bat`”的回退。 -- CTest 新增 `examples_layout`,并将新增五个文档派生案例接入 `example_smoke`。 +- CTest 新增 `examples_layout`,并将文档派生案例接入 `example_smoke`。 - 新增 `docs/v4_acceptance_report.md`,记录第四版 V4.8 阶段验收范围、测试矩阵、示例矩阵和后续限制。 +- V4.8 后硬化新增 `examples/node_analytical_plane_contact/`,将 node-based slave surface 到 analytical rigid plane 的接触路径提升为可双击示例和 CTest smoke。 +- V4.8 后硬化新增内部 GMRES 求解器和 `perf_contact_pair_p1`,增强线性求解器与接触性能验收覆盖。 +- V4.8 后硬化补齐 `examples/block_on_arch/`、`examples/cylinder_roller_contact/`、`examples/sliding_wedge/`、`examples/membrane_airbag_inflation/`、`examples/spherical_cap_with_central_point_load/`、`examples/two_arches/`、`examples/blasting_rock/`、`examples/nonlinear_harmonic/`、`examples/failure_prediction_in_a_layered_shell/`、`examples/pinched_hemispherical_shell/`、`examples/stress_dependent_elasticity/`、`examples/roll_forming/`、`examples/falling_objects/`、`examples/ball_adhesion_decohesion/`、`examples/buckling_corrugated_shell/`、`examples/Dynamic_Grain_Packing_of_a_Flexible_Container/` 和 `examples/thick_plate/`;每个目录均包含 README、可执行 `.inp` 和 `run_case.bat`,并在 README 中标明当前求解器覆盖范围与未覆盖的完整高保真能力。 已补充测试: - `elliptic_membrane_s4_static.inp`、`membrane_uniaxial_s4_static.inp`、`shell_solid_connection_static.inp` 和 `strength_reduction_slope_static.inp` 已完成静力求解 smoke。 - `example_golf_ball_impact_smoke` 使用短步数动态输入检查接触输出,避免常规回归运行完整长跑。 +- 新增 `example_node_analytical_contact_smoke`、`example_block_on_arch_contact_smoke`、`example_cylinder_roller_contact_smoke`、`example_sliding_wedge_friction_smoke`、`example_roll_forming_friction_smoke`、`example_falling_objects_contact_smoke`、`example_ball_adhesion_contact_smoke`、`example_buckling_corrugated_shell_smoke`、`example_dynamic_grain_container_smoke`、`example_thick_plate_pressure_smoke`、`example_membrane_airbag_pressure_smoke`、`example_spherical_cap_point_load_smoke`、`example_blasting_rock_pulse_smoke`、`example_nonlinear_harmonic_membrane_smoke`、`example_layered_shell_tension_smoke`、`example_two_arches_contact_smoke`、`example_pinched_hemisphere_smoke` 和 `example_stress_dependent_cantilever_smoke`,覆盖节点-解析面、壳/实体接触、摩擦滑移、多物体接触、球-膜压入、波纹锥壳静力预载、柔性容器压力-地面接触、厚板压力、压力载荷、脉冲动力、壳-壳接触、层合壳拉伸、曲壳 pinched load 和分区弹性梁弯曲路径。 - `examples_layout` 纳入 Python CTest 分支,保护示例目录结构约定。 -- Windows GCC 16 Release 构建已通过;全量 CTest 已通过,47/47 passed。 +- Windows GCC 16 Release 构建已通过;全量 CTest 已通过,66/66 passed。 - 已手动验证 `examples/elliptic_membrane/run_case.bat` 静力入口和 `examples/clamped_square_plate_pressure_pulse/run_case.bat` 动力入口均可在 `FEMLITE_NO_PAUSE=1` 下完成。 后续: diff --git a/examples/Dynamic_Grain_Packing_of_a_Flexible_Container/Dynamic_Grain_Packing_of_a_Flexible_Container.pptx b/examples/Dynamic_Grain_Packing_of_a_Flexible_Container/Dynamic_Grain_Packing_of_a_Flexible_Container.pptx new file mode 100644 index 0000000..788e234 Binary files /dev/null and b/examples/Dynamic_Grain_Packing_of_a_Flexible_Container/Dynamic_Grain_Packing_of_a_Flexible_Container.pptx differ diff --git a/examples/Dynamic_Grain_Packing_of_a_Flexible_Container/README.md b/examples/Dynamic_Grain_Packing_of_a_Flexible_Container/README.md new file mode 100644 index 0000000..8d67cf1 --- /dev/null +++ b/examples/Dynamic_Grain_Packing_of_a_Flexible_Container/README.md @@ -0,0 +1,23 @@ +# Dynamic Grain Packing of a Flexible Container Smoke Case + +This folder contains the original dynamic grain-packing presentation plus a +compact FemLite V4.8 smoke case: + +- `flexible_container_ground_contact_smoke.inp` +- `run_case.bat` + +The reference model couples a granular-flow domain to a thin flexible container: +grains are released from a cylinder, contact forces are accumulated on the +container walls, the membrane receives those forces as face loads, and the +container can also contact a rigid ground surface. FemLite V4.8 does not include +a granular-flow solver or two-way grain/membrane coupling. The included input +keeps the structural part executable: an S4 flexible container panel receives a +ramped pressure load and starts in contact with an analytical rigid ground. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/Dynamic_Grain_Packing_of_a_Flexible_Container/flexible_container_ground_contact_smoke.inp b/examples/Dynamic_Grain_Packing_of_a_Flexible_Container/flexible_container_ground_contact_smoke.inp new file mode 100644 index 0000000..116f603 --- /dev/null +++ b/examples/Dynamic_Grain_Packing_of_a_Flexible_Container/flexible_container_ground_contact_smoke.inp @@ -0,0 +1,46 @@ +*HEADING +FemLite V4.8 compact dynamic grain packing flexible container smoke case +** Structural subset of the granular-flow/membrane coupling reference model. +** Granular grains and two-way coupling are future solver features. +*NODE +1, -0.10, -0.10, -0.001 +2, 0.00, -0.10, -0.001 +3, 0.10, -0.10, -0.001 +4, -0.10, 0.00, -0.001 +5, 0.00, 0.00, -0.001 +6, 0.10, 0.00, -0.001 +7, -0.10, 0.10, -0.001 +8, 0.00, 0.10, -0.001 +9, 0.10, 0.10, -0.001 +*ELEMENT, TYPE=S4, ELSET=CONTAINER_MEMBRANE +1, 1, 2, 5, 4 +2, 2, 3, 6, 5 +3, 4, 5, 8, 7 +4, 5, 6, 9, 8 +*NSET, NSET=TOP_CORNERS +7, 9 +*NSET, NSET=CONTACT_NODES +1, 2, 3, 4, 5, 6, 7, 8, 9 +*MATERIAL, NAME=FLEXIBLE_CONTAINER +*DENSITY +1000.0 +*ELASTIC +5.0E7, 0.35 +*SHELL SECTION, ELSET=CONTAINER_MEMBRANE, MATERIAL=FLEXIBLE_CONTAINER +1.0E-3 +*AMPLITUDE, NAME=GRAIN_PRESSURE +0.0, 0.0, 5.0E-5, 1.0 +*BOUNDARY +TOP_CORNERS, 1, 6, 0.0 +*DLOAD, AMPLITUDE=GRAIN_PRESSURE +CONTAINER_MEMBRANE, P, 2.0E3 +*SURFACE, NAME=CONTAINER_CONTACT, TYPE=NODE +CONTACT_NODES +*SURFACE, NAME=GROUND, TYPE=ANALYTICAL +PLANE, 0.0, 0.0, 1.0, 0.0 +*CONTACT PAIR, PENALTY=1.0E6, DAMPING=1.0E2, AUGMENT=0.20 +CONTAINER_CONTACT, GROUND +*STEP +*DYNAMIC +1.0E-5, 5.0E-5 +*END STEP diff --git a/examples/Dynamic_Grain_Packing_of_a_Flexible_Container/run_case.bat b/examples/Dynamic_Grain_Packing_of_a_Flexible_Container/run_case.bat new file mode 100644 index 0000000..c35d7b0 --- /dev/null +++ b/examples/Dynamic_Grain_Packing_of_a_Flexible_Container/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "dynamic_grain_packing_flexible_container" "--run" "flexible_container_ground_contact_smoke.inp" "5" +exit /b %errorlevel% diff --git a/examples/ball_adhesion_decohesion/README.md b/examples/ball_adhesion_decohesion/README.md new file mode 100644 index 0000000..c12e5c6 --- /dev/null +++ b/examples/ball_adhesion_decohesion/README.md @@ -0,0 +1,24 @@ +# Ball Adhesion/Decohesion Contact Smoke Case + +This folder contains the original ball adhesion/decohesion reference files plus +a compact FemLite V4.8 smoke case: + +- `ball_adhesion_decohesion_params.txt` +- `ball_adhesion_contact_smoke.inp` +- `run_case.bat` + +The reference model uses a rubber membrane, a ball indenter, adhesive normal +and shear stiffness, tensile/shear strength limits and energy-release criteria. +FemLite V4.8 does not include a cohesive adhesion/decohesion law. The included +input keeps the executable contact part of the benchmark in the current solver: +a rubber-like C3D8 membrane pad, a stiffer ball surrogate, the documented +50 mm / 150 mm / 6 mm length scale, and a short explicit indentation that +checks contact activation. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/ball_adhesion_decohesion/ball_adhesion_contact_smoke.inp b/examples/ball_adhesion_decohesion/ball_adhesion_contact_smoke.inp new file mode 100644 index 0000000..8f7aa75 --- /dev/null +++ b/examples/ball_adhesion_decohesion/ball_adhesion_contact_smoke.inp @@ -0,0 +1,65 @@ +*HEADING +FemLite V4.8 compact ball adhesion/decohesion contact smoke case +** Contact-only executable subset. Adhesive stiffness, strength and energy +** release criteria from the reference parameters require a future cohesive law. +*NODE +1, -0.150, -0.150, 0.000 +2, 0.150, -0.150, 0.000 +3, 0.150, 0.150, 0.000 +4, -0.150, 0.150, 0.000 +5, -0.150, -0.150, 0.006 +6, 0.150, -0.150, 0.006 +7, 0.150, 0.150, 0.006 +8, -0.150, 0.150, 0.006 +9, -0.050, -0.050, 0.004 +10, 0.050, -0.050, 0.004 +11, 0.050, 0.050, 0.004 +12, -0.050, 0.050, 0.004 +13, -0.050, -0.050, 0.054 +14, 0.050, -0.050, 0.054 +15, 0.050, 0.050, 0.054 +16, -0.050, 0.050, 0.054 +*ELEMENT, TYPE=C3D8, ELSET=MEMBRANE_PAD +1, 1, 2, 3, 4, 5, 6, 7, 8 +*ELEMENT, TYPE=C3D8, ELSET=BALL_SURROGATE +2, 9, 10, 11, 12, 13, 14, 15, 16 +*ELSET, ELSET=MEMBRANE_SET +1 +*ELSET, ELSET=BALL_SET +2 +*NSET, NSET=MEMBRANE_EDGE +1, 2, 3, 4, 5, 6, 7, 8 +*NSET, NSET=BALL_ALL +9, 10, 11, 12, 13, 14, 15, 16 +*NSET, NSET=BALL_TOP +13, 14, 15, 16 +*MATERIAL, NAME=RUBBER_LIKE_MEMBRANE +*DENSITY +1100.0 +*ELASTIC +1.14E7, 0.45 +*MATERIAL, NAME=STIFF_BALL +*DENSITY +2000.0 +*ELASTIC +1.0E9, 0.30 +*SOLID SECTION, ELSET=MEMBRANE_SET, MATERIAL=RUBBER_LIKE_MEMBRANE +*SOLID SECTION, ELSET=BALL_SET, MATERIAL=STIFF_BALL +*AMPLITUDE, NAME=RAMP +0.0, 0.0, 2.0E-4, 1.0 +*BOUNDARY +MEMBRANE_EDGE, 1, 3, 0.0 +BALL_ALL, 1, 2, 0.0 +*BOUNDARY, AMPLITUDE=RAMP +BALL_TOP, 3, 3, -3.0E-3 +*SURFACE, NAME=MEMBRANE_TOP, TYPE=ELEMENT +MEMBRANE_PAD, S2 +*SURFACE, NAME=BALL_BOTTOM, TYPE=ELEMENT +BALL_SURROGATE, S1 +*SURFACE INTERACTION, NAME=BALL_MEMBRANE_CONTACT, PENALTY=1.0E7, DAMPING=1.0E2, SEARCH=1.0E-2, AUGMENT=0.20 +*CONTACT PAIR, INTERACTION=BALL_MEMBRANE_CONTACT +BALL_BOTTOM, MEMBRANE_TOP +*STEP +*DYNAMIC +1.0E-5, 2.0E-4 +*END STEP diff --git a/examples/ball_adhesion_decohesion/ball_adhesion_decohesion.pptx b/examples/ball_adhesion_decohesion/ball_adhesion_decohesion.pptx new file mode 100644 index 0000000..f8aaf79 Binary files /dev/null and b/examples/ball_adhesion_decohesion/ball_adhesion_decohesion.pptx differ diff --git a/examples/ball_adhesion_decohesion/ball_adhesion_decohesion_params.txt b/examples/ball_adhesion_decohesion/ball_adhesion_decohesion_params.txt new file mode 100644 index 0000000..5c75998 --- /dev/null +++ b/examples/ball_adhesion_decohesion/ball_adhesion_decohesion_params.txt @@ -0,0 +1,15 @@ +Rs 50[mm] "Sphere radius" +Rm 150[mm] "Membrane radius" +tm 6[mm] "Membrane thickness" +d0 5[mm] "Initial clearance" +C10 1.5[MPa] "Mooney-Rivlin C10 (rubber)" +C01 0.4[MPa] "Mooney-Rivlin C01 (rubber)" +kappa 100[MPa] "Bulk modulus (rubber)" +kn 2e10[N/m^3] "Adhesive stiffness" +p_stick 0.2[MPa] "Adhesion pressure" +sIc 2[MPa] "Adhesive tensile strength" +GIc 1130[J/m^2] "Tensile energy release rate" +sIIc 3[MPa] "Adhesive shear strength" +GIIc 1800[J/m^2] "Shear energy release rate" +w_max 80[mm] "Max vertical ball displacement" +par 0 "Solution parameter" diff --git a/examples/ball_adhesion_decohesion/run_case.bat b/examples/ball_adhesion_decohesion/run_case.bat new file mode 100644 index 0000000..f290401 --- /dev/null +++ b/examples/ball_adhesion_decohesion/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "ball_adhesion_decohesion" "--run" "ball_adhesion_contact_smoke.inp" "10" +exit /b %errorlevel% diff --git a/examples/blasting_rock/README.md b/examples/blasting_rock/README.md new file mode 100644 index 0000000..f7ccb40 --- /dev/null +++ b/examples/blasting_rock/README.md @@ -0,0 +1,21 @@ +# Blasting Rock Pulse Smoke Case + +This folder contains the original blasting-rock benchmark notes plus a compact +FemLite smoke case: + +- `blasting_rock_pulse_smoke.inp` +- `run_case.bat` + +The reference model is a transient elastic-wave benchmark with a localized blast +pulse and low-reflecting boundaries. FemLite V4.8 does not claim the full +low-reflecting boundary implementation or FFT comparison. The included input +keeps the executable core: a C3D8 granite block, symmetry constraints, a short +blast-like nodal pulse, and explicit transient output. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/blasting_rock/blasting_rock_pulse_smoke.inp b/examples/blasting_rock/blasting_rock_pulse_smoke.inp new file mode 100644 index 0000000..6dcb1a3 --- /dev/null +++ b/examples/blasting_rock/blasting_rock_pulse_smoke.inp @@ -0,0 +1,38 @@ +*HEADING +FemLite V4.8 compact blasting-rock pulse smoke case +** Reference scale: H=L=0.24 m, E=50 GPa, nu=2/7, rho=2700 kg/m3. +** Low-reflecting boundaries and FFT postprocessing are outside the V4.8 scope. +*NODE +1, 0.00, 0.00, 0.00 +2, 0.24, 0.00, 0.00 +3, 0.24, 0.24, 0.00 +4, 0.00, 0.24, 0.00 +5, 0.00, 0.00, 0.24 +6, 0.24, 0.00, 0.24 +7, 0.24, 0.24, 0.24 +8, 0.00, 0.24, 0.24 +*ELEMENT, TYPE=C3D8, ELSET=ROCK +1, 1, 2, 3, 4, 5, 6, 7, 8 +*NSET, NSET=XSYM +1, 4, 5, 8 +*NSET, NSET=YSYM +1, 2, 5, 6 +*NSET, NSET=BLAST_PATCH +1 +*MATERIAL, NAME=GRANITE +*DENSITY +2700.0 +*ELASTIC +5.0E10, 0.285714285714 +*SOLID SECTION, ELSET=ROCK, MATERIAL=GRANITE +*BOUNDARY +XSYM, 1, 1, 0.0 +YSYM, 2, 2, 0.0 +*AMPLITUDE, NAME=BLAST_PULSE +0.0, 0.0, 1.0E-5, 1.0, 8.1E-5, 0.0 +*CLOAD, AMPLITUDE=BLAST_PULSE +BLAST_PATCH, 3, 1.4E6 +*STEP +*DYNAMIC +1.0E-6, 1.5E-4 +*END STEP diff --git a/examples/blasting_rock/models.sme.blasting_rock.pdf b/examples/blasting_rock/models.sme.blasting_rock.pdf new file mode 100644 index 0000000..248b327 Binary files /dev/null and b/examples/blasting_rock/models.sme.blasting_rock.pdf differ diff --git a/examples/blasting_rock/models.sme.blasting_rock.zh_CN.pdf b/examples/blasting_rock/models.sme.blasting_rock.zh_CN.pdf new file mode 100644 index 0000000..325b601 Binary files /dev/null and b/examples/blasting_rock/models.sme.blasting_rock.zh_CN.pdf differ diff --git a/examples/blasting_rock/run_case.bat b/examples/blasting_rock/run_case.bat new file mode 100644 index 0000000..0e8f69b --- /dev/null +++ b/examples/blasting_rock/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "blasting_rock" "--run" "blasting_rock_pulse_smoke.inp" "5" +exit /b %errorlevel% diff --git a/examples/block_on_arch/README.md b/examples/block_on_arch/README.md new file mode 100644 index 0000000..dbabe9a --- /dev/null +++ b/examples/block_on_arch/README.md @@ -0,0 +1,22 @@ +# Block On Arch Contact Smoke Case + +This folder contains the original benchmark notes plus a compact FemLite +smoke case: + +- `block_on_arch_contact_smoke.inp` +- `run_case.bat` + +The reference model describes a solid block pressing a curved shell arch +through a contact interface and following a snap-through response. FemLite +V4.8 does not claim the full snap-through benchmark. The included input is a +small, executable contact surrogate: a shallow S4 arch crown is initially +under an analytical rigid block face so the node-to-plane contact path, +contact output, shell mass/stiffness, and dynamic driver are all exercised. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/block_on_arch/block_on_arch_contact_smoke.inp b/examples/block_on_arch/block_on_arch_contact_smoke.inp new file mode 100644 index 0000000..86748bf --- /dev/null +++ b/examples/block_on_arch/block_on_arch_contact_smoke.inp @@ -0,0 +1,43 @@ +*HEADING +FemLite V4.8 compact block-on-arch contact smoke case +** Representative executable case for the block-on-arch documentation. +** The rigid block face is modeled by an analytical plane; full snap-through +** continuation is outside the V4.8 verification scope. +*NODE +1, -0.60, -0.10, 0.030 +2, 0.00, -0.10, -0.002 +3, 0.60, -0.10, 0.030 +4, -0.60, 0.00, 0.030 +5, 0.00, 0.00, -0.002 +6, 0.60, 0.00, 0.030 +7, -0.60, 0.10, 0.030 +8, 0.00, 0.10, -0.002 +9, 0.60, 0.10, 0.030 +*ELEMENT, TYPE=S4, ELSET=ARCH +1, 1, 2, 5, 4 +2, 2, 3, 6, 5 +3, 4, 5, 8, 7 +4, 5, 6, 9, 8 +*NSET, NSET=ARCH_ENDS +1, 3, 4, 6, 7, 9 +*NSET, NSET=ARCH_CONTACT_NODES +2, 5, 8 +*MATERIAL, NAME=ARCH_ALUMINUM +*DENSITY +2700.0 +*ELASTIC +7.0E10, 0.30 +*SHELL SECTION, ELSET=ARCH, MATERIAL=ARCH_ALUMINUM +3.0E-2 +*BOUNDARY +ARCH_ENDS, 1, 6, 0.0 +*SURFACE, NAME=ARCH_SLAVE, TYPE=NODE +ARCH_CONTACT_NODES +*SURFACE, NAME=RIGID_BLOCK_FACE, TYPE=ANALYTICAL +PLANE, 0.0, 0.0, 1.0, 0.0 +*CONTACT PAIR, PENALTY=5.0E8, DAMPING=1.0E4, AUGMENT=0.25 +ARCH_SLAVE, RIGID_BLOCK_FACE +*STEP +*DYNAMIC +1.0E-5, 5.0E-5 +*END STEP diff --git a/examples/block_on_arch/block_on_arch_parameters.txt b/examples/block_on_arch/block_on_arch_parameters.txt new file mode 100644 index 0000000..51c0358 --- /dev/null +++ b/examples/block_on_arch/block_on_arch_parameters.txt @@ -0,0 +1,11 @@ +R_arch 1200[mm] "Arch radius" +d 30[mm] "Arch thickness" +seg_arch 40[deg] "Arch segment" +R_block 350[mm] "Block radius" +height_block 50[mm] "Block height" +seg_block 40[deg] "Block segment" +n_elem_arch 50 "Number of mesh elements, arch" +n_elem_block 10 "Number of mesh elements, block" +F_ref -1[N/mm^2] "Reference load value" +max_disp 120[mm] "Maximum displacement" +para 0 "Load parameter" diff --git a/examples/block_on_arch/block_on_arch_parameters.zh_CN.txt b/examples/block_on_arch/block_on_arch_parameters.zh_CN.txt new file mode 100644 index 0000000..566c8ef --- /dev/null +++ b/examples/block_on_arch/block_on_arch_parameters.zh_CN.txt @@ -0,0 +1,11 @@ +R_arch 1200[mm] "拱半径" +d 30[mm] "拱厚度" +seg_arch 40[deg] "拱段" +R_block 350[mm] "块体半径" +height_block 50[mm] "块体高度" +seg_block 40[deg] "块体段" +n_elem_arch 50 "网格单元数,拱" +n_elem_block 10 "网格单元数,块体" +F_ref -1[N/mm^2] "参考载荷值" +max_disp 120[mm] "最大位移" +para 0 "载荷参数" diff --git a/examples/block_on_arch/models.sme.block_on_arch.pdf b/examples/block_on_arch/models.sme.block_on_arch.pdf new file mode 100644 index 0000000..841e022 Binary files /dev/null and b/examples/block_on_arch/models.sme.block_on_arch.pdf differ diff --git a/examples/block_on_arch/models.sme.block_on_arch.zh_CN.pdf b/examples/block_on_arch/models.sme.block_on_arch.zh_CN.pdf new file mode 100644 index 0000000..c92bdcf Binary files /dev/null and b/examples/block_on_arch/models.sme.block_on_arch.zh_CN.pdf differ diff --git a/examples/block_on_arch/run_case.bat b/examples/block_on_arch/run_case.bat new file mode 100644 index 0000000..d02bf8f --- /dev/null +++ b/examples/block_on_arch/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "block_on_arch" "--run" "block_on_arch_contact_smoke.inp" "1" +exit /b %errorlevel% diff --git a/examples/buckling_corrugated_shell/README.md b/examples/buckling_corrugated_shell/README.md new file mode 100644 index 0000000..a7aacd8 --- /dev/null +++ b/examples/buckling_corrugated_shell/README.md @@ -0,0 +1,23 @@ +# Buckling Corrugated Shell Smoke Case + +This folder contains the original corrugated conical shell buckling reference +document plus a compact FemLite V4.8 smoke case: + +- `corrugated_shell_static_smoke.inp` +- `run_case.bat` + +The reference model performs a linear buckling eigenvalue analysis of a conical +shell with sixteen corrugated sectors, cyclic symmetry, azimuthal mode-number +sweeps and full-geometry postprocessing. FemLite V4.8 does not include a +buckling eigenvalue solver or cyclic-symmetry constraints. The included input +keeps the executable structural path in the current solver: an S4 corrugated +conical sector at the documented radius/height/thickness scale, aluminum +material, fixed bottom edge and vertical top-edge compression. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/buckling_corrugated_shell/corrugated_shell_static_smoke.inp b/examples/buckling_corrugated_shell/corrugated_shell_static_smoke.inp new file mode 100644 index 0000000..9f59c8b --- /dev/null +++ b/examples/buckling_corrugated_shell/corrugated_shell_static_smoke.inp @@ -0,0 +1,37 @@ +*HEADING +FemLite V4.8 compact corrugated conical shell static smoke case +** Static preload subset of the buckling/cyclic-symmetry reference model. +** Linear buckling eigenvalues and cyclic symmetry are future solver features. +*NODE +1, 0.031000, 0.000000, 0.000 +2, 0.028443, 0.005658, 0.000 +3, 0.028640, 0.011864, 0.000 +4, 0.023250, 0.000000, 0.025 +5, 0.021332, 0.004243, 0.025 +6, 0.021481, 0.008897, 0.025 +7, 0.015500, 0.000000, 0.050 +8, 0.014221, 0.002829, 0.050 +9, 0.014320, 0.005932, 0.050 +*ELEMENT, TYPE=S4, ELSET=CORRUGATED_SECTOR +1, 1, 2, 5, 4 +2, 2, 3, 6, 5 +3, 4, 5, 8, 7 +4, 5, 6, 9, 8 +*NSET, NSET=BOTTOM_EDGE +1, 2, 3 +*NSET, NSET=TOP_EDGE +7, 8, 9 +*MATERIAL, NAME=ALUMINUM +*DENSITY +2700.0 +*ELASTIC +7.0E10, 0.30 +*SHELL SECTION, ELSET=CORRUGATED_SECTOR, MATERIAL=ALUMINUM +5.0E-4 +*BOUNDARY +BOTTOM_EDGE, 1, 6, 0.0 +*STEP +*STATIC +*CLOAD +TOP_EDGE, 3, -3.333333E-1 +*END STEP diff --git a/examples/buckling_corrugated_shell/models.sme.buckling_corrugated_shell.pdf b/examples/buckling_corrugated_shell/models.sme.buckling_corrugated_shell.pdf new file mode 100644 index 0000000..38f28cf Binary files /dev/null and b/examples/buckling_corrugated_shell/models.sme.buckling_corrugated_shell.pdf differ diff --git a/examples/buckling_corrugated_shell/run_case.bat b/examples/buckling_corrugated_shell/run_case.bat new file mode 100644 index 0000000..3db14f9 --- /dev/null +++ b/examples/buckling_corrugated_shell/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "buckling_corrugated_shell" "--static-linear" "corrugated_shell_static_smoke.inp" "1" +exit /b %errorlevel% diff --git a/examples/cylinder_roller_contact/README.md b/examples/cylinder_roller_contact/README.md new file mode 100644 index 0000000..3817b6e --- /dev/null +++ b/examples/cylinder_roller_contact/README.md @@ -0,0 +1,22 @@ +# Cylinder Roller Contact Smoke Case + +This folder contains the original cylinder-roller benchmark notes plus a +compact FemLite smoke case: + +- `cylinder_roller_contact_smoke.inp` +- `run_case.bat` + +The reference problem is a 2D plane-strain Hertz contact benchmark with a +steel roller, an aluminum foundation, local mesh refinement, and analytical +pressure comparison. FemLite V4.8 does not claim the complete Hertz pressure +curve. The included 3D strip case keeps the material contrast and frictionless +normal-contact path: a narrow steel roller strip is pressed into an aluminum +foundation, and the contact output is checked by CTest. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/cylinder_roller_contact/cylinder_roller_contact.txt b/examples/cylinder_roller_contact/cylinder_roller_contact.txt new file mode 100644 index 0000000..dcbe497 --- /dev/null +++ b/examples/cylinder_roller_contact/cylinder_roller_contact.txt @@ -0,0 +1,13 @@ +E1 70[GPa] "Block Young's modulus" +E2 210[GPa] "Cylinder Young's modulus" +nu0 0.3 "Poisson's ratio" +Fn 35[kN] "External load" +E_star 2*E1*E2/((E1+E2)*(1-nu0^2)) "Combined Young's modulus" +R 50[mm] "Combined radius" +d 200[mm] "Block width" +th 1[mm] Thickness +lc 10[mm] "Estimated contact length" +a sqrt(8*Fn*R/(pi*E_star*th)) "Analytical contact length" +pmax sqrt(Fn*E_star/(2*pi*R*th)) "Maximum contact pressure" +dist 1[mm] "Initial distance between parts" +k 0 "Spring coefficient" \ No newline at end of file diff --git a/examples/cylinder_roller_contact/cylinder_roller_contact.zh_CN.txt b/examples/cylinder_roller_contact/cylinder_roller_contact.zh_CN.txt new file mode 100644 index 0000000..b53a531 --- /dev/null +++ b/examples/cylinder_roller_contact/cylinder_roller_contact.zh_CN.txt @@ -0,0 +1,13 @@ +E1 70[GPa] "铝块的杨氏模量" +E2 210[GPa] "圆柱体的杨氏模量" +nu0 0.3 "泊松比" +Fn 35[kN] "外部载荷" +E_star 2*E1*E2/((E1+E2)*(1-nu0^2)) "组合杨氏模量" +R 50[mm] "组合半径" +d 200[mm] "铝块宽度" +th 1[mm] 厚度 +lc 10[mm] "估计的接触长度" +a sqrt(8*Fn*R/(pi*E_star*th)) "解析接触长度" +pmax sqrt(Fn*E_star/(2*pi*R*th)) "最大接触压力" +dist 1[mm] "零件之间的初始距离" +k 0 "弹簧系数" \ No newline at end of file diff --git a/examples/cylinder_roller_contact/cylinder_roller_contact_smoke.inp b/examples/cylinder_roller_contact/cylinder_roller_contact_smoke.inp new file mode 100644 index 0000000..8dc33db --- /dev/null +++ b/examples/cylinder_roller_contact/cylinder_roller_contact_smoke.inp @@ -0,0 +1,65 @@ +*HEADING +FemLite V4.8 compact cylinder-roller contact smoke case +** Reference scale: E_aluminum=70 GPa, E_steel=210 GPa, nu=0.3, R=50 mm. +** This smoke uses a narrow roller strip as a 3D contact surrogate. +*NODE +1, -0.100, -0.005, -0.020 +2, 0.100, -0.005, -0.020 +3, 0.100, 0.005, -0.020 +4, -0.100, 0.005, -0.020 +5, -0.100, -0.005, 0.000 +6, 0.100, -0.005, 0.000 +7, 0.100, 0.005, 0.000 +8, -0.100, 0.005, 0.000 +9, -0.020, -0.005, -0.001 +10, 0.020, -0.005, -0.001 +11, 0.020, 0.005, -0.001 +12, -0.020, 0.005, -0.001 +13, -0.020, -0.005, 0.049 +14, 0.020, -0.005, 0.049 +15, 0.020, 0.005, 0.049 +16, -0.020, 0.005, 0.049 +*ELEMENT, TYPE=C3D8, ELSET=FOUNDATION +1, 1, 2, 3, 4, 5, 6, 7, 8 +*ELEMENT, TYPE=C3D8, ELSET=ROLLER +2, 9, 10, 11, 12, 13, 14, 15, 16 +*NSET, NSET=FOUNDATION_ALL +1, 2, 3, 4, 5, 6, 7, 8 +*NSET, NSET=ROLLER_ALL +9, 10, 11, 12, 13, 14, 15, 16 +*NSET, NSET=ROLLER_TOP +13, 14, 15, 16 +*ELSET, ELSET=FOUNDATION_SET +1 +*ELSET, ELSET=ROLLER_SET +2 +*MATERIAL, NAME=ALUMINUM +*DENSITY +2700.0 +*ELASTIC +7.0E10, 0.30 +*MATERIAL, NAME=STEEL +*DENSITY +7800.0 +*ELASTIC +2.10E11, 0.30 +*SOLID SECTION, ELSET=FOUNDATION_SET, MATERIAL=ALUMINUM +*SOLID SECTION, ELSET=ROLLER_SET, MATERIAL=STEEL +*AMPLITUDE, NAME=RAMP +0.0, 0.0, 1.0E-3, 1.0 +*BOUNDARY +FOUNDATION_ALL, 1, 3, 0.0 +ROLLER_ALL, 2, 2, 0.0 +*BOUNDARY, AMPLITUDE=RAMP +ROLLER_TOP, 3, 3, -2.0E-3 +*SURFACE, NAME=FOUNDATION_TOP, TYPE=ELEMENT +FOUNDATION, S2 +*SURFACE, NAME=ROLLER_BOTTOM, TYPE=ELEMENT +ROLLER, S1 +*SURFACE INTERACTION, NAME=ROLLER_CONTACT, PENALTY=1.0E9, DAMPING=1.0E4, SEARCH=1.0E-2, AUGMENT=0.20 +*CONTACT PAIR, INTERACTION=ROLLER_CONTACT +ROLLER_BOTTOM, FOUNDATION_TOP +*STEP +*DYNAMIC +1.0E-5, 1.0E-3 +*END STEP diff --git a/examples/cylinder_roller_contact/models.sme.cylinder_roller_contact.pdf b/examples/cylinder_roller_contact/models.sme.cylinder_roller_contact.pdf new file mode 100644 index 0000000..1958045 Binary files /dev/null and b/examples/cylinder_roller_contact/models.sme.cylinder_roller_contact.pdf differ diff --git a/examples/cylinder_roller_contact/models.sme.cylinder_roller_contact.zh_CN.pdf b/examples/cylinder_roller_contact/models.sme.cylinder_roller_contact.zh_CN.pdf new file mode 100644 index 0000000..830e633 Binary files /dev/null and b/examples/cylinder_roller_contact/models.sme.cylinder_roller_contact.zh_CN.pdf differ diff --git a/examples/cylinder_roller_contact/run_case.bat b/examples/cylinder_roller_contact/run_case.bat new file mode 100644 index 0000000..83e6b9e --- /dev/null +++ b/examples/cylinder_roller_contact/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "cylinder_roller_contact" "--run" "cylinder_roller_contact_smoke.inp" "1" +exit /b %errorlevel% diff --git a/examples/failure_prediction_in_a_layered_shell/README.md b/examples/failure_prediction_in_a_layered_shell/README.md new file mode 100644 index 0000000..3b24e63 --- /dev/null +++ b/examples/failure_prediction_in_a_layered_shell/README.md @@ -0,0 +1,22 @@ +# Layered Shell Failure Prediction Smoke Case + +This folder contains the original layered-shell failure benchmark notes plus a +compact FemLite smoke case: + +- `layered_shell_tension_smoke.inp` +- `run_case.bat` + +The reference problem uses orthotropic composite plies, rotated material +systems, polynomial failure criteria, failure indices, and safety factors. +FemLite V4.8 does not claim that full composite failure workflow. The included +input keeps the executable structural skeleton: four coincident S4 plies sharing +the same midsurface nodes, ply-scale thicknesses, benchmark-style nodal +constraints, and the in-plane tensile edge load. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/failure_prediction_in_a_layered_shell/failure_prediction_in_a_layered_shell_material_properties.txt b/examples/failure_prediction_in_a_layered_shell/failure_prediction_in_a_layered_shell_material_properties.txt new file mode 100644 index 0000000..62194c3 --- /dev/null +++ b/examples/failure_prediction_in_a_layered_shell/failure_prediction_in_a_layered_shell_material_properties.txt @@ -0,0 +1,29 @@ +th 0.05e-3[m] "Ply thickness" +Ftotal 15[N] "Total edge load" +E1 207[GPa] "Young's modulus 11" +E2 7.6[GPa] "Young's modulus 22" +E3 E2 "Young's modulus 33" +nu12 0.3 "Poisson's ratio 12" +nu23 0 "Poisson's ratio 23" +G 5[GPa] "Shear modulus" +Sigmats1 500[MPa] "Tensile strength 11" +Sigmats2 5[MPa] "Tensile strength 22" +Sigmats3 Sigmats2 "Tensile strength 33" +Sigmacs1 350[MPa] "Compressive strength 11" +Sigmacs2 75[MPa] "Compressive strength 22" +Sigmacs3 Sigmacs2 "Compressive strength 33" +Sigmass23 35[MPa] "Shear strength 23" +Sigmass13 Sigmass23 "Shear strength 13" +Sigmass12 Sigmass23 "Shear strength 12" +Fs11 1/Sigmats1-1/Sigmacs1 "Second rank strength tensor, 11 component" +Fs22 1/Sigmats2-1/Sigmacs2 "Second rank strength tensor, 22 component" +Fs33 1/Sigmats3-1/Sigmacs3 "Second rank strength tensor, 33 component" +Ff11 1/(Sigmats1*Sigmacs1) "Fourth rank strength tensor, 11 component" +Ff12 -0.5*sqrt(1/((Sigmats1*Sigmacs1)*(Sigmats2*Sigmacs2))) "Fourth rank strength tensor, 12 component" +Ff13 -0.5*sqrt(1/((Sigmats1*Sigmacs1)*(Sigmats3*Sigmacs3))) "Fourth rank strength tensor, 13 component" +Ff22 1/(Sigmats2*Sigmacs2) "Fourth rank strength tensor, 22 component" +Ff23 -0.5*sqrt(1/((Sigmats2*Sigmacs2)*(Sigmats3*Sigmacs3))) "Fourth rank strength tensor, 23 component" +Ff33 1/(Sigmats3*Sigmacs3) "Fourth rank strength tensor, 33 component" +Ff44 1/Sigmass23^2 "Fourth rank strength tensor, 44 component" +Ff55 1/Sigmass13^2 "Fourth rank strength tensor, 55 component" +Ff66 1/Sigmass12^2 "Fourth rank strength tensor, 66 component" diff --git a/examples/failure_prediction_in_a_layered_shell/failure_prediction_in_a_layered_shell_material_properties.zh_CN.txt b/examples/failure_prediction_in_a_layered_shell/failure_prediction_in_a_layered_shell_material_properties.zh_CN.txt new file mode 100644 index 0000000..1dd8474 --- /dev/null +++ b/examples/failure_prediction_in_a_layered_shell/failure_prediction_in_a_layered_shell_material_properties.zh_CN.txt @@ -0,0 +1,29 @@ +th 0.05e-3[m] "铺层厚度" +Ftotal 15[N] "总边载荷" +E1 207[GPa] "杨氏模量 11" +E2 7.6[GPa] "杨氏模量 22" +E3 E2 "杨氏模量 33" +nu12 0.3 "泊松比 12" +nu23 0 "泊松比 23" +G 5[GPa] "剪切模量" +Sigmats1 500[MPa] "抗拉强度 11" +Sigmats2 5[MPa] "抗拉强度 22" +Sigmats3 Sigmats2 "抗拉强度 33" +Sigmacs1 350[MPa] "抗压强度 11" +Sigmacs2 75[MPa] "抗压强度 22" +Sigmacs3 Sigmacs2 "抗压强度 33" +Sigmass23 35[MPa] "剪切强度 23" +Sigmass13 Sigmass23 "剪切强度 13" +Sigmass12 Sigmass23 "剪切强度 12" +Fs11 1/Sigmats1-1/Sigmacs1 "二阶强度张量,11 分量" +Fs22 1/Sigmats2-1/Sigmacs2 "二阶强度张量,22 分量" +Fs33 1/Sigmats3-1/Sigmacs3 "二阶强度张量,33 分量" +Ff11 1/(Sigmats1*Sigmacs1) "四阶强度张量,11 分量" +Ff12 -0.5*sqrt(1/((Sigmats1*Sigmacs1)*(Sigmats2*Sigmacs2))) "四阶强度张量,12 分量" +Ff13 -0.5*sqrt(1/((Sigmats1*Sigmacs1)*(Sigmats3*Sigmacs3))) "四阶强度张量,13 分量" +Ff22 1/(Sigmats2*Sigmacs2) "四阶强度张量,22 分量" +Ff23 -0.5*sqrt(1/((Sigmats2*Sigmacs2)*(Sigmats3*Sigmacs3))) "四阶强度张量,23 分量" +Ff33 1/(Sigmats3*Sigmacs3) "四阶强度张量,33 分量" +Ff44 1/Sigmass23^2 "四阶强度张量,44 分量" +Ff55 1/Sigmass13^2 "四阶强度张量,55 分量" +Ff66 1/Sigmass12^2 "四阶强度张量,66 分量" diff --git a/examples/failure_prediction_in_a_layered_shell/layered_shell_tension_smoke.inp b/examples/failure_prediction_in_a_layered_shell/layered_shell_tension_smoke.inp new file mode 100644 index 0000000..f4f34df --- /dev/null +++ b/examples/failure_prediction_in_a_layered_shell/layered_shell_tension_smoke.inp @@ -0,0 +1,58 @@ +*HEADING +FemLite V4.8 compact layered-shell tension smoke case +** Reference benchmark: 1 cm square, four 0.05 mm plies, total edge load 15 N. +** Orthotropic rotated plies and failure criteria are outside the V4.8 scope. +*NODE +1, 0.00, 0.00, 0.0 +2, 0.01, 0.00, 0.0 +3, 0.01, 0.01, 0.0 +4, 0.00, 0.01, 0.0 +*ELEMENT, TYPE=S4, ELSET=PLY90 +1, 1, 2, 3, 4 +*ELEMENT, TYPE=S4, ELSET=PLYM45 +2, 1, 2, 3, 4 +*ELEMENT, TYPE=S4, ELSET=PLYP45 +3, 1, 2, 3, 4 +*ELEMENT, TYPE=S4, ELSET=PLY0 +4, 1, 2, 3, 4 +*NSET, NSET=LEFT_EDGE +1, 4 +*NSET, NSET=RIGHT_EDGE +2, 3 +*NSET, NSET=ALLNODES +1, 2, 3, 4 +*MATERIAL, NAME=PLY_TRANSVERSE_EQUIV +*DENSITY +1500.0 +*ELASTIC +7.6E9, 0.30 +*MATERIAL, NAME=PLY_ANGLE_EQUIV +*DENSITY +1500.0 +*ELASTIC +5.0E10, 0.30 +*MATERIAL, NAME=PLY_FIBER_EQUIV +*DENSITY +1500.0 +*ELASTIC +2.07E11, 0.30 +*SHELL SECTION, ELSET=PLY90, MATERIAL=PLY_TRANSVERSE_EQUIV +5.0E-5 +*SHELL SECTION, ELSET=PLYM45, MATERIAL=PLY_ANGLE_EQUIV +5.0E-5 +*SHELL SECTION, ELSET=PLYP45, MATERIAL=PLY_ANGLE_EQUIV +5.0E-5 +*SHELL SECTION, ELSET=PLY0, MATERIAL=PLY_FIBER_EQUIV +5.0E-5 +*BOUNDARY +1, 1, 6, 0.0 +4, 1, 1, 0.0 +4, 3, 6, 0.0 +2, 3, 6, 0.0 +3, 3, 6, 0.0 +*STEP +*STATIC +*CLOAD +2, 1, 7.5 +3, 1, 7.5 +*END STEP diff --git a/examples/failure_prediction_in_a_layered_shell/models.sme.failure_prediction_in_a_layered_shell.pdf b/examples/failure_prediction_in_a_layered_shell/models.sme.failure_prediction_in_a_layered_shell.pdf new file mode 100644 index 0000000..0905918 Binary files /dev/null and b/examples/failure_prediction_in_a_layered_shell/models.sme.failure_prediction_in_a_layered_shell.pdf differ diff --git a/examples/failure_prediction_in_a_layered_shell/models.sme.failure_prediction_in_a_layered_shell.zh_CN.pdf b/examples/failure_prediction_in_a_layered_shell/models.sme.failure_prediction_in_a_layered_shell.zh_CN.pdf new file mode 100644 index 0000000..2be47b6 Binary files /dev/null and b/examples/failure_prediction_in_a_layered_shell/models.sme.failure_prediction_in_a_layered_shell.zh_CN.pdf differ diff --git a/examples/failure_prediction_in_a_layered_shell/run_case.bat b/examples/failure_prediction_in_a_layered_shell/run_case.bat new file mode 100644 index 0000000..67d0966 --- /dev/null +++ b/examples/failure_prediction_in_a_layered_shell/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "failure_prediction_in_a_layered_shell" "--static-linear" "layered_shell_tension_smoke.inp" "1" +exit /b %errorlevel% diff --git a/examples/falling_objects/README.md b/examples/falling_objects/README.md new file mode 100644 index 0000000..cd3cef2 --- /dev/null +++ b/examples/falling_objects/README.md @@ -0,0 +1,22 @@ +# Falling Objects Contact Smoke Case + +This folder contains the original falling-objects reference document plus a +compact FemLite V4.8 smoke case: + +- `falling_objects_contact_smoke.inp` +- `run_case.bat` + +The reference model demonstrates many deformable objects falling inside a rigid +box with explicit dynamics, contact damping and friction. The included FemLite +case keeps the executable mechanics in a compact regression form: two C3D8 +rubber-like blocks start in contact, the lower block also contacts an analytical +rigid floor, and a ramped vertical/tangential load exercises explicit contact +activation and frictional slip. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/falling_objects/falling_objects_contact_smoke.inp b/examples/falling_objects/falling_objects_contact_smoke.inp new file mode 100644 index 0000000..cd0b0d3 --- /dev/null +++ b/examples/falling_objects/falling_objects_contact_smoke.inp @@ -0,0 +1,64 @@ +*HEADING +FemLite V4.8 compact falling objects contact smoke case +** Representative executable subset of the falling-objects document: two +** deformable blocks, a rigid floor, explicit dynamics, damping and friction. +*NODE +1, -0.10, -0.10, -0.005 +2, 0.10, -0.10, -0.005 +3, 0.10, 0.10, -0.005 +4, -0.10, 0.10, -0.005 +5, -0.10, -0.10, 0.095 +6, 0.10, -0.10, 0.095 +7, 0.10, 0.10, 0.095 +8, -0.10, 0.10, 0.095 +9, -0.08, -0.08, 0.092 +10, 0.12, -0.08, 0.092 +11, 0.12, 0.12, 0.092 +12, -0.08, 0.12, 0.092 +13, -0.08, -0.08, 0.192 +14, 0.12, -0.08, 0.192 +15, 0.12, 0.12, 0.192 +16, -0.08, 0.12, 0.192 +*ELEMENT, TYPE=C3D8, ELSET=LOWER_OBJECT +1, 1, 2, 3, 4, 5, 6, 7, 8 +*ELEMENT, TYPE=C3D8, ELSET=UPPER_OBJECT +2, 9, 10, 11, 12, 13, 14, 15, 16 +*ELSET, ELSET=ALL_OBJECTS +1, 2 +*NSET, NSET=LOWER_BOTTOM_NODES +1, 2, 3, 4 +*NSET, NSET=ALL_OBJECT_NODES +1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 +*NSET, NSET=UPPER_OBJECT_NODES +9, 10, 11, 12, 13, 14, 15, 16 +*MATERIAL, NAME=RUBBER_LIKE +*DENSITY +4000.0 +*ELASTIC +3.0E7, 0.30 +*SOLID SECTION, ELSET=ALL_OBJECTS, MATERIAL=RUBBER_LIKE +*AMPLITUDE, NAME=RAMP +0.0, 0.0, 2.0E-4, 1.0 +*BOUNDARY +ALL_OBJECT_NODES, 2, 2, 0.0 +*CLOAD, AMPLITUDE=RAMP +ALL_OBJECT_NODES, 3, -20.0 +UPPER_OBJECT_NODES, 1, 30.0 +*SURFACE, NAME=LOWER_BOTTOM, TYPE=NODE +LOWER_BOTTOM_NODES +*SURFACE, NAME=BOX_FLOOR, TYPE=ANALYTICAL +PLANE, 0.0, 0.0, 1.0, 0.0 +*SURFACE, NAME=LOWER_TOP, TYPE=ELEMENT +LOWER_OBJECT, S2 +*SURFACE, NAME=UPPER_BOTTOM, TYPE=ELEMENT +UPPER_OBJECT, S1 +*SURFACE INTERACTION, NAME=BOX_CONTACT, PENALTY=1.0E7, DAMPING=5.0E2, SEARCH=1.0E-2, AUGMENT=0.20, FRICTION=0.60, FRICTION_REGULARIZATION=1.0E-4 +*SURFACE INTERACTION, NAME=OBJECT_CONTACT, PENALTY=1.0E7, DAMPING=5.0E2, SEARCH=1.0E-2, AUGMENT=0.20, FRICTION=1.10, FRICTION_REGULARIZATION=1.0E-4 +*CONTACT PAIR, INTERACTION=BOX_CONTACT +LOWER_BOTTOM, BOX_FLOOR +*CONTACT PAIR, INTERACTION=OBJECT_CONTACT +UPPER_BOTTOM, LOWER_TOP +*STEP +*DYNAMIC +1.0E-5, 2.0E-4 +*END STEP diff --git a/examples/falling_objects/models.sme.falling_objects.pdf b/examples/falling_objects/models.sme.falling_objects.pdf new file mode 100644 index 0000000..03861d1 Binary files /dev/null and b/examples/falling_objects/models.sme.falling_objects.pdf differ diff --git a/examples/falling_objects/run_case.bat b/examples/falling_objects/run_case.bat new file mode 100644 index 0000000..3875e99 --- /dev/null +++ b/examples/falling_objects/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "falling_objects" "--run" "falling_objects_contact_smoke.inp" "10" +exit /b %errorlevel% diff --git a/examples/membrane_airbag_inflation/README.md b/examples/membrane_airbag_inflation/README.md new file mode 100644 index 0000000..af7f8d6 --- /dev/null +++ b/examples/membrane_airbag_inflation/README.md @@ -0,0 +1,21 @@ +# Membrane Airbag Inflation Smoke Case + +This folder contains the original membrane-airbag benchmark notes plus a +compact FemLite smoke case: + +- `membrane_airbag_pressure_s4_static.inp` +- `run_case.bat` + +The reference problem is a nonlinear membrane inflation benchmark. FemLite +V4.8 does not claim a coupled airbag fluid model or wrinkling/postbuckling +continuation. The included case keeps the documented material scale, +thickness, diagonal length, and maximum pressure, then runs a clamped S4 +membrane patch with shell pressure loading through `*DLOAD`. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/membrane_airbag_inflation/membrane_airbag_inflation_parameters.txt b/examples/membrane_airbag_inflation/membrane_airbag_inflation_parameters.txt new file mode 100644 index 0000000..49179e1 --- /dev/null +++ b/examples/membrane_airbag_inflation/membrane_airbag_inflation_parameters.txt @@ -0,0 +1,7 @@ +para 0 Parameter +th 0.06[cm] Thickness +Ld 1.2[m] "Diagonal length of noninflated airbag" +L Ld/sqrt(2) "Length parameter" +Ey 588[MPa] "Young's modulus" +Nu 0.4 "Poisson's ratio" +Pmax 5[kPa] "Maximum air pressure" diff --git a/examples/membrane_airbag_inflation/membrane_airbag_inflation_parameters.zh_CN.txt b/examples/membrane_airbag_inflation/membrane_airbag_inflation_parameters.zh_CN.txt new file mode 100644 index 0000000..0c60bb8 --- /dev/null +++ b/examples/membrane_airbag_inflation/membrane_airbag_inflation_parameters.zh_CN.txt @@ -0,0 +1,7 @@ +para 0 参数 +th 0.06[cm] 厚度 +Ld 1.2[m] "未充气安全气囊的对角线长度" +L Ld/sqrt(2) "长度参数" +Ey 588[MPa] "杨氏模量" +Nu 0.4 "泊松比" +Pmax 5[kPa] "最大气压" diff --git a/examples/membrane_airbag_inflation/membrane_airbag_pressure_s4_static.inp b/examples/membrane_airbag_inflation/membrane_airbag_pressure_s4_static.inp new file mode 100644 index 0000000..1744102 --- /dev/null +++ b/examples/membrane_airbag_inflation/membrane_airbag_pressure_s4_static.inp @@ -0,0 +1,36 @@ +*HEADING +FemLite V4.8 compact membrane airbag pressure smoke case +** Reference parameters: Ld=1.2 m, th=0.06 cm, E=588 MPa, nu=0.4, Pmax=5 kPa. +*NODE +1, -0.424264, -0.424264, 0.0 +2, 0.000000, -0.424264, 0.0 +3, 0.424264, -0.424264, 0.0 +4, -0.424264, 0.000000, 0.0 +5, 0.000000, 0.000000, 0.0 +6, 0.424264, 0.000000, 0.0 +7, -0.424264, 0.424264, 0.0 +8, 0.000000, 0.424264, 0.0 +9, 0.424264, 0.424264, 0.0 +*ELEMENT, TYPE=S4, ELSET=BAG_MEMBRANE +1, 1, 2, 5, 4 +2, 2, 3, 6, 5 +3, 4, 5, 8, 7 +4, 5, 6, 9, 8 +*NSET, NSET=EDGE +1, 2, 3, 4, 6, 7, 8, 9 +*NSET, NSET=CENTER +5 +*MATERIAL, NAME=BAG_FABRIC +*DENSITY +1000.0 +*ELASTIC +5.88E8, 0.40 +*SHELL SECTION, ELSET=BAG_MEMBRANE, MATERIAL=BAG_FABRIC +6.0E-4 +*BOUNDARY +EDGE, 1, 6, 0.0 +*DLOAD +BAG_MEMBRANE, P, 5.0E3 +*STEP +*STATIC +*END STEP diff --git a/examples/membrane_airbag_inflation/models.sme.membrane_airbag_inflation.pdf b/examples/membrane_airbag_inflation/models.sme.membrane_airbag_inflation.pdf new file mode 100644 index 0000000..7a3d6ea Binary files /dev/null and b/examples/membrane_airbag_inflation/models.sme.membrane_airbag_inflation.pdf differ diff --git a/examples/membrane_airbag_inflation/models.sme.membrane_airbag_inflation.zh_CN.pdf b/examples/membrane_airbag_inflation/models.sme.membrane_airbag_inflation.zh_CN.pdf new file mode 100644 index 0000000..238d3d7 Binary files /dev/null and b/examples/membrane_airbag_inflation/models.sme.membrane_airbag_inflation.zh_CN.pdf differ diff --git a/examples/membrane_airbag_inflation/run_case.bat b/examples/membrane_airbag_inflation/run_case.bat new file mode 100644 index 0000000..d0700b4 --- /dev/null +++ b/examples/membrane_airbag_inflation/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "membrane_airbag_inflation" "--static-linear" "membrane_airbag_pressure_s4_static.inp" "1" +exit /b %errorlevel% diff --git a/examples/node_analytical_plane_contact/README.md b/examples/node_analytical_plane_contact/README.md new file mode 100644 index 0000000..928819f --- /dev/null +++ b/examples/node_analytical_plane_contact/README.md @@ -0,0 +1,9 @@ +# Node Analytical Plane Contact + +This compact case exercises a node-based slave surface against an analytical +rigid plane through the contact pair path. It is a focused V4.8 hardening case +for `*SURFACE, TYPE=NODE` participation in analytical contact, not a generic +node-to-element contact benchmark. + +Run `run_case.bat` to execute the one-step dynamic contact case and write output +under `results\auto_run`. diff --git a/examples/node_analytical_plane_contact/node_analytical_plane_contact.inp b/examples/node_analytical_plane_contact/node_analytical_plane_contact.inp new file mode 100644 index 0000000..ab491bb --- /dev/null +++ b/examples/node_analytical_plane_contact/node_analytical_plane_contact.inp @@ -0,0 +1,26 @@ +*HEADING +FemLite node surface to analytical plane contact smoke case +*NODE +1, 0.0, 0.0, -0.01 +2, 1.0, 0.0, -0.01 +3, 1.0, 1.0, -0.01 +4, 0.0, 1.0, -0.01 +*ELEMENT, TYPE=S4, ELSET=PLATE +1, 1, 2, 3, 4 +*MATERIAL, NAME=MAT +*DENSITY +1.0 +*ELASTIC +30.0, 0.25 +*SHELL SECTION, ELSET=PLATE, MATERIAL=MAT +0.1 +*SURFACE, NAME=SLAVE_NODES, TYPE=NODE +1 +*SURFACE, NAME=RIGID_PLANE, TYPE=ANALYTICAL +PLANE, 0.0, 0.0, 1.0, 0.0 +*CONTACT PAIR, PENALTY=1000.0, DAMPING=2.0 +SLAVE_NODES, RIGID_PLANE +*STEP +*DYNAMIC +0.1, 0.1 +*END STEP diff --git a/examples/node_analytical_plane_contact/run_case.bat b/examples/node_analytical_plane_contact/run_case.bat new file mode 100644 index 0000000..1f0878b --- /dev/null +++ b/examples/node_analytical_plane_contact/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "node_analytical_plane_contact" "--run" "node_analytical_plane_contact.inp" "1" +exit /b %errorlevel% diff --git a/examples/nonlinear_harmonic/README.md b/examples/nonlinear_harmonic/README.md new file mode 100644 index 0000000..08fb1d2 --- /dev/null +++ b/examples/nonlinear_harmonic/README.md @@ -0,0 +1,22 @@ +# Nonlinear Harmonic Membrane Smoke Case + +This folder contains the original nonlinear-harmonic membrane tutorial notes +plus a compact FemLite smoke case: + +- `nonlinear_harmonic_membrane_smoke.inp` +- `run_case.bat` + +The reference model uses a prestressed circular membrane, a frequency-domain +linearized solution for initial conditions, and a nonlinear time-domain +harmonic response. FemLite V4.8 does not claim that full workflow. The included +case keeps the executable transient mechanics: a thin S4 membrane patch with +the documented steel-like material scale, 0.2 mm thickness, and a short +harmonic-like pressure amplitude. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/nonlinear_harmonic/models.sme.nonlinear_harmonic.pdf b/examples/nonlinear_harmonic/models.sme.nonlinear_harmonic.pdf new file mode 100644 index 0000000..19fb8bd Binary files /dev/null and b/examples/nonlinear_harmonic/models.sme.nonlinear_harmonic.pdf differ diff --git a/examples/nonlinear_harmonic/models.sme.nonlinear_harmonic.zh_CN.pdf b/examples/nonlinear_harmonic/models.sme.nonlinear_harmonic.zh_CN.pdf new file mode 100644 index 0000000..9d2f1e4 Binary files /dev/null and b/examples/nonlinear_harmonic/models.sme.nonlinear_harmonic.zh_CN.pdf differ diff --git a/examples/nonlinear_harmonic/nonlinear_harmonic_membrane_smoke.inp b/examples/nonlinear_harmonic/nonlinear_harmonic_membrane_smoke.inp new file mode 100644 index 0000000..8847135 --- /dev/null +++ b/examples/nonlinear_harmonic/nonlinear_harmonic_membrane_smoke.inp @@ -0,0 +1,43 @@ +*HEADING +FemLite V4.8 compact nonlinear-harmonic membrane smoke case +** Reference scale: R=0.25 m, thickness=0.2 mm, E=200 GPa, nu=0.33, F0=10 kPa. +** Prestress, frequency-domain initialization, and nonlinear steady-state +** extraction are outside the V4.8 scope. +*NODE +1, -0.25, -0.25, 0.0 +2, 0.00, -0.25, 0.0 +3, 0.25, -0.25, 0.0 +4, -0.25, 0.00, 0.0 +5, 0.00, 0.00, 0.0 +6, 0.25, 0.00, 0.0 +7, -0.25, 0.25, 0.0 +8, 0.00, 0.25, 0.0 +9, 0.25, 0.25, 0.0 +*ELEMENT, TYPE=S4, ELSET=MEMBRANE +1, 1, 2, 5, 4 +2, 2, 3, 6, 5 +3, 4, 5, 8, 7 +4, 5, 6, 9, 8 +*NSET, NSET=EDGE +1, 2, 3, 4, 6, 7, 8, 9 +*NSET, NSET=CENTER +5 +*MATERIAL, NAME=STRUCTURAL_STEEL +*DENSITY +7850.0 +*ELASTIC +2.0E11, 0.33 +*SHELL SECTION, ELSET=MEMBRANE, MATERIAL=STRUCTURAL_STEEL +2.0E-4 +*BOUNDARY +EDGE, 3, 6, 0.0 +1, 1, 2, 0.0 +3, 2, 2, 0.0 +*AMPLITUDE, NAME=HARMONIC_PULSE +0.0, 0.0, 5.0E-5, 1.0, 1.0E-4, 0.0, 1.5E-4, -1.0, 2.0E-4, 0.0 +*DLOAD, AMPLITUDE=HARMONIC_PULSE +MEMBRANE, P, 1.0E4 +*STEP +*DYNAMIC +1.0E-5, 2.0E-4 +*END STEP diff --git a/examples/nonlinear_harmonic/run_case.bat b/examples/nonlinear_harmonic/run_case.bat new file mode 100644 index 0000000..d28a692 --- /dev/null +++ b/examples/nonlinear_harmonic/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "nonlinear_harmonic" "--run" "nonlinear_harmonic_membrane_smoke.inp" "5" +exit /b %errorlevel% diff --git a/examples/pinched_hemispherical_shell/README.md b/examples/pinched_hemispherical_shell/README.md new file mode 100644 index 0000000..ad11636 --- /dev/null +++ b/examples/pinched_hemispherical_shell/README.md @@ -0,0 +1,21 @@ +# Pinched Hemispherical Shell Smoke Case + +This folder contains the original pinched-hemisphere benchmark notes plus a +compact FemLite smoke case: + +- `pinched_hemisphere_s4_dynamic_smoke.inp` +- `run_case.bat` + +The reference benchmark is a geometrically nonlinear shell problem with large +rotations and continuation. FemLite V4.8 does not claim the full nonlinear +benchmark curve. The included input keeps the executable shell mechanics: a +coarse S4 quarter hemisphere patch, symmetry constraints, opposing pinch loads, +and a short explicit dynamic response check. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/pinched_hemispherical_shell/models.sme.pinched_hemispherical_shell.pdf b/examples/pinched_hemispherical_shell/models.sme.pinched_hemispherical_shell.pdf new file mode 100644 index 0000000..06af2d6 Binary files /dev/null and b/examples/pinched_hemispherical_shell/models.sme.pinched_hemispherical_shell.pdf differ diff --git a/examples/pinched_hemispherical_shell/models.sme.pinched_hemispherical_shell.zh_CN.pdf b/examples/pinched_hemispherical_shell/models.sme.pinched_hemispherical_shell.zh_CN.pdf new file mode 100644 index 0000000..27b5035 Binary files /dev/null and b/examples/pinched_hemispherical_shell/models.sme.pinched_hemispherical_shell.zh_CN.pdf differ diff --git a/examples/pinched_hemispherical_shell/pinched_hemisphere_s4_dynamic_smoke.inp b/examples/pinched_hemispherical_shell/pinched_hemisphere_s4_dynamic_smoke.inp new file mode 100644 index 0000000..825bf16 --- /dev/null +++ b/examples/pinched_hemispherical_shell/pinched_hemisphere_s4_dynamic_smoke.inp @@ -0,0 +1,49 @@ +*HEADING +FemLite V4.8 compact pinched hemispherical shell smoke case +** Reference scale: R=10 m, thickness=0.04 m, E=68.25 MPa, nu=0.3. +** Full geometric nonlinear continuation is outside the V4.8 scope. +*NODE +1, 3.0902, 0.0000, 9.5106 +2, 2.1851, 2.1851, 9.5106 +3, 0.0000, 3.0902, 9.5106 +4, 8.0902, 0.0000, 5.8779 +5, 5.7206, 5.7206, 5.8779 +6, 0.0000, 8.0902, 5.8779 +7, 10.0000, 0.0000, 0.0000 +8, 7.0711, 7.0711, 0.0000 +9, 0.0000, 10.0000, 0.0000 +*ELEMENT, TYPE=S4, ELSET=HEMISPHERE +1, 1, 4, 5, 2 +2, 2, 5, 6, 3 +3, 4, 7, 8, 5 +4, 5, 8, 9, 6 +*NSET, NSET=X_SYM +3, 6, 9 +*NSET, NSET=Y_SYM +1, 4, 7 +*NSET, NSET=TOP_RING +1, 2, 3 +*NSET, NSET=X_LOAD +7 +*NSET, NSET=Y_LOAD +9 +*MATERIAL, NAME=SHELL_STEEL +*DENSITY +6850.0 +*ELASTIC +6.825E7, 0.30 +*SHELL SECTION, ELSET=HEMISPHERE, MATERIAL=SHELL_STEEL +4.0E-2 +*BOUNDARY +X_SYM, 1, 1, 0.0 +Y_SYM, 2, 2, 0.0 +TOP_RING, 3, 6, 0.0 +*AMPLITUDE, NAME=PINCH +0.0, 0.0, 5.0E-4, 1.0 +*CLOAD, AMPLITUDE=PINCH +X_LOAD, 1, -100.0 +Y_LOAD, 2, 100.0 +*STEP +*DYNAMIC +1.0E-5, 5.0E-4 +*END STEP diff --git a/examples/pinched_hemispherical_shell/run_case.bat b/examples/pinched_hemispherical_shell/run_case.bat new file mode 100644 index 0000000..5e9ba41 --- /dev/null +++ b/examples/pinched_hemispherical_shell/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "pinched_hemispherical_shell" "--run" "pinched_hemisphere_s4_dynamic_smoke.inp" "5" +exit /b %errorlevel% diff --git a/examples/roll_forming/README.md b/examples/roll_forming/README.md new file mode 100644 index 0000000..0e31bbb --- /dev/null +++ b/examples/roll_forming/README.md @@ -0,0 +1,24 @@ +# Roll Forming Friction Smoke Case + +This folder contains the original roll-forming reference documents plus a +compact FemLite V4.8 smoke case: + +- `roll_forming_friction_smoke.inp` +- `run_case.bat` + +The reference model describes a quarter-symmetry cold roll-forming process with +rigid rollers, friction coefficient 0.30, roller down-feed, roller rotation, +workpiece plasticity and residual-stress output. FemLite V4.8 does not claim +that complete high-fidelity process simulation. The included input keeps the +executable mechanics that the current solver can verify reliably: a C3D8 +workpiece compressed against a C3D8 roller surrogate, scaled elastic material +properties for a stable short explicit run, Coulomb friction, a tangential +forming load and contact/friction output. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/roll_forming/roll_forming.pdf b/examples/roll_forming/roll_forming.pdf new file mode 100644 index 0000000..f2f430e Binary files /dev/null and b/examples/roll_forming/roll_forming.pdf differ diff --git a/examples/roll_forming/roll_forming.pptx b/examples/roll_forming/roll_forming.pptx new file mode 100644 index 0000000..519e3b3 Binary files /dev/null and b/examples/roll_forming/roll_forming.pptx differ diff --git a/examples/roll_forming/roll_forming_friction_smoke.inp b/examples/roll_forming/roll_forming_friction_smoke.inp new file mode 100644 index 0000000..1dd4a34 --- /dev/null +++ b/examples/roll_forming/roll_forming_friction_smoke.inp @@ -0,0 +1,60 @@ +*HEADING +FemLite V4.8 compact roll forming friction smoke case +** Representative executable subset of the reference roll forming documents. +** Full rigid roller rotation, rolling kinematics and plastic forming are +** outside the V4.8 smoke-case claim. +*NODE +1, -0.05, -0.05, -0.050 +2, 0.05, -0.05, -0.050 +3, 0.05, 0.05, -0.050 +4, -0.05, 0.05, -0.050 +5, -0.05, -0.05, 0.000 +6, 0.05, -0.05, 0.000 +7, 0.05, 0.05, 0.000 +8, -0.05, 0.05, 0.000 +9, -0.05, -0.05, -0.001 +10, 0.05, -0.05, -0.001 +11, 0.05, 0.05, -0.001 +12, -0.05, 0.05, -0.001 +13, -0.05, -0.05, 0.049 +14, 0.05, -0.05, 0.049 +15, 0.05, 0.05, 0.049 +16, -0.05, 0.05, 0.049 +*ELEMENT, TYPE=C3D8, ELSET=ROLLER +1, 1, 2, 3, 4, 5, 6, 7, 8 +*ELEMENT, TYPE=C3D8, ELSET=WORKPIECE +2, 9, 10, 11, 12, 13, 14, 15, 16 +*ELSET, ELSET=ALLSOLID +1, 2 +*NSET, NSET=ROLLER_ALL +1, 2, 3, 4, 5, 6, 7, 8 +*NSET, NSET=WORKPIECE_ALL +9, 10, 11, 12, 13, 14, 15, 16 +*NSET, NSET=WORKPIECE_TOP +13, 14, 15, 16 +*MATERIAL, NAME=SCALED_FORMING_SOLID +*DENSITY +1000.0 +*ELASTIC +1.0E7, 0.30 +*SOLID SECTION, ELSET=ALLSOLID, MATERIAL=SCALED_FORMING_SOLID +*AMPLITUDE, NAME=RAMP +0.0, 0.0, 1.0E-3, 1.0 +*BOUNDARY +ROLLER_ALL, 1, 3, 0.0 +WORKPIECE_ALL, 2, 2, 0.0 +*BOUNDARY, AMPLITUDE=RAMP +WORKPIECE_TOP, 3, 3, -2.0E-3 +*CLOAD, AMPLITUDE=RAMP +WORKPIECE_ALL, 1, 50.0 +*SURFACE, NAME=ROLLER_TOP, TYPE=ELEMENT +ROLLER, S2 +*SURFACE, NAME=WORKPIECE_BOTTOM, TYPE=ELEMENT +WORKPIECE, S1 +*SURFACE INTERACTION, NAME=ROLL_CONTACT, PENALTY=1.0E7, DAMPING=1.0E2, SEARCH=1.0E-2, AUGMENT=0.20, FRICTION=0.30, FRICTION_REGULARIZATION=1.0E-4 +*CONTACT PAIR, INTERACTION=ROLL_CONTACT +WORKPIECE_BOTTOM, ROLLER_TOP +*STEP +*DYNAMIC +1.0E-5, 1.0E-3 +*END STEP diff --git a/examples/roll_forming/run_case.bat b/examples/roll_forming/run_case.bat new file mode 100644 index 0000000..98f09e5 --- /dev/null +++ b/examples/roll_forming/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "roll_forming" "--run" "roll_forming_friction_smoke.inp" "10" +exit /b %errorlevel% diff --git a/examples/sliding_wedge/README.md b/examples/sliding_wedge/README.md new file mode 100644 index 0000000..9221e2d --- /dev/null +++ b/examples/sliding_wedge/README.md @@ -0,0 +1,23 @@ +# Sliding Wedge Friction Smoke Case + +This folder contains the original sliding-wedge benchmark notes plus a compact +FemLite smoke case: + +- `sliding_wedge_friction_smoke.inp` +- `run_case.bat` + +The reference NAFEMS problem is a large-sliding 2D contact benchmark with +Coulomb friction, horizontal springs, gravity, parameter sweeps, and a +1 m analytical sliding distance. FemLite V4.8 does not claim that complete +benchmark. The included input keeps the essential executable mechanics inside +the current solver: two C3D8 wedges with an inclined face, frictional contact, +normal loading, and horizontal driving load. It is used to verify contact +activation, accumulated slip, friction force, and friction work output. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/sliding_wedge/models.sme.sliding_wedge.pdf b/examples/sliding_wedge/models.sme.sliding_wedge.pdf new file mode 100644 index 0000000..21e545e Binary files /dev/null and b/examples/sliding_wedge/models.sme.sliding_wedge.pdf differ diff --git a/examples/sliding_wedge/models.sme.sliding_wedge.zh_CN.pdf b/examples/sliding_wedge/models.sme.sliding_wedge.zh_CN.pdf new file mode 100644 index 0000000..6f97fad Binary files /dev/null and b/examples/sliding_wedge/models.sme.sliding_wedge.zh_CN.pdf differ diff --git a/examples/sliding_wedge/run_case.bat b/examples/sliding_wedge/run_case.bat new file mode 100644 index 0000000..4e447e1 --- /dev/null +++ b/examples/sliding_wedge/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "sliding_wedge" "--run" "sliding_wedge_friction_smoke.inp" "10" +exit /b %errorlevel% diff --git a/examples/sliding_wedge/sliding_wedge.ppt b/examples/sliding_wedge/sliding_wedge.ppt new file mode 100644 index 0000000..82ed17f Binary files /dev/null and b/examples/sliding_wedge/sliding_wedge.ppt differ diff --git a/examples/sliding_wedge/sliding_wedge_friction_smoke.inp b/examples/sliding_wedge/sliding_wedge_friction_smoke.inp new file mode 100644 index 0000000..f5851ce --- /dev/null +++ b/examples/sliding_wedge/sliding_wedge_friction_smoke.inp @@ -0,0 +1,60 @@ +*HEADING +FemLite V4.8 compact sliding wedge friction smoke case +** Reference benchmark: F=1500 N, G=3058 N, tan(theta)=0.1. +** This executable smoke keeps the inclined frictional contact path and uses +** scaled loads for a short explicit run. +*NODE +1, 0.00, -0.05, -0.050 +2, 0.20, -0.05, -0.030 +3, 0.20, 0.05, -0.030 +4, 0.00, 0.05, -0.050 +5, 0.00, -0.05, 0.000 +6, 0.20, -0.05, 0.020 +7, 0.20, 0.05, 0.020 +8, 0.00, 0.05, 0.000 +9, 0.02, -0.05, 0.001 +10, 0.18, -0.05, 0.017 +11, 0.18, 0.05, 0.017 +12, 0.02, 0.05, 0.001 +13, 0.02, -0.05, 0.051 +14, 0.18, -0.05, 0.067 +15, 0.18, 0.05, 0.067 +16, 0.02, 0.05, 0.051 +*ELEMENT, TYPE=C3D8, ELSET=TARGET_WEDGE +1, 1, 2, 3, 4, 5, 6, 7, 8 +*ELEMENT, TYPE=C3D8, ELSET=SLIDING_WEDGE +2, 9, 10, 11, 12, 13, 14, 15, 16 +*ELSET, ELSET=ALLSOLID +1, 2 +*NSET, NSET=TARGET_ALL +1, 2, 3, 4, 5, 6, 7, 8 +*NSET, NSET=SLIDER_ALL +9, 10, 11, 12, 13, 14, 15, 16 +*NSET, NSET=SLIDER_TOP +13, 14, 15, 16 +*MATERIAL, NAME=WEDGE_STEEL +*DENSITY +6000.0 +*ELASTIC +2.06E11, 0.30 +*SOLID SECTION, ELSET=ALLSOLID, MATERIAL=WEDGE_STEEL +*AMPLITUDE, NAME=RAMP +0.0, 0.0, 1.0E-3, 1.0 +*BOUNDARY +TARGET_ALL, 1, 3, 0.0 +SLIDER_ALL, 2, 2, 0.0 +*BOUNDARY, AMPLITUDE=RAMP +SLIDER_TOP, 3, 3, -1.0E-3 +*CLOAD, AMPLITUDE=RAMP +SLIDER_ALL, 1, 50.0 +*SURFACE, NAME=TARGET_FACE, TYPE=ELEMENT +TARGET_WEDGE, S2 +*SURFACE, NAME=SLIDER_FACE, TYPE=ELEMENT +SLIDING_WEDGE, S1 +*SURFACE INTERACTION, NAME=WEDGE_CONTACT, PENALTY=1.0E9, DAMPING=1.0E4, SEARCH=2.0E-2, AUGMENT=0.20, FRICTION=0.20, FRICTION_REGULARIZATION=1.0E-4 +*CONTACT PAIR, INTERACTION=WEDGE_CONTACT +SLIDER_FACE, TARGET_FACE +*STEP +*DYNAMIC +1.0E-5, 1.0E-3 +*END STEP diff --git a/examples/spherical_cap_with_central_point_load/README.md b/examples/spherical_cap_with_central_point_load/README.md new file mode 100644 index 0000000..81ca65f --- /dev/null +++ b/examples/spherical_cap_with_central_point_load/README.md @@ -0,0 +1,21 @@ +# Spherical Cap Central Point Load Smoke Case + +This folder contains the original spherical-cap benchmark notes plus a +compact FemLite smoke case: + +- `spherical_cap_s4_static.inp` +- `run_case.bat` + +The reference model is a nonlinear postbuckling benchmark with displacement +control. FemLite V4.8 does not claim full postbuckling continuation. The +included input uses the documented material scale, radius, thickness, and +central loading idea in a small S4 cap patch so the curved shell geometry, +edge constraints, static driver, and central response output are exercised. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/spherical_cap_with_central_point_load/models.sme.spherical_cap_with_central_point_load.pdf b/examples/spherical_cap_with_central_point_load/models.sme.spherical_cap_with_central_point_load.pdf new file mode 100644 index 0000000..f73d8cb Binary files /dev/null and b/examples/spherical_cap_with_central_point_load/models.sme.spherical_cap_with_central_point_load.pdf differ diff --git a/examples/spherical_cap_with_central_point_load/models.sme.spherical_cap_with_central_point_load.zh_CN.pdf b/examples/spherical_cap_with_central_point_load/models.sme.spherical_cap_with_central_point_load.zh_CN.pdf new file mode 100644 index 0000000..5cb35d7 Binary files /dev/null and b/examples/spherical_cap_with_central_point_load/models.sme.spherical_cap_with_central_point_load.zh_CN.pdf differ diff --git a/examples/spherical_cap_with_central_point_load/run_case.bat b/examples/spherical_cap_with_central_point_load/run_case.bat new file mode 100644 index 0000000..230df67 --- /dev/null +++ b/examples/spherical_cap_with_central_point_load/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "spherical_cap_with_central_point_load" "--static-linear" "spherical_cap_s4_static.inp" "1" +exit /b %errorlevel% diff --git a/examples/spherical_cap_with_central_point_load/spherical_cap_s4_static.inp b/examples/spherical_cap_with_central_point_load/spherical_cap_s4_static.inp new file mode 100644 index 0000000..35dcb2c --- /dev/null +++ b/examples/spherical_cap_with_central_point_load/spherical_cap_s4_static.inp @@ -0,0 +1,36 @@ +*HEADING +FemLite V4.8 compact spherical cap central point-load smoke case +** Reference scale: radius=10 m, thickness=0.20384 m, E=210 GPa, nu=0.3. +*NODE +1, -1.0, -1.0, -0.1005 +2, 0.0, -1.0, -0.0501 +3, 1.0, -1.0, -0.1005 +4, -1.0, 0.0, -0.0501 +5, 0.0, 0.0, 0.0000 +6, 1.0, 0.0, -0.0501 +7, -1.0, 1.0, -0.1005 +8, 0.0, 1.0, -0.0501 +9, 1.0, 1.0, -0.1005 +*ELEMENT, TYPE=S4, ELSET=CAP +1, 1, 2, 5, 4 +2, 2, 3, 6, 5 +3, 4, 5, 8, 7 +4, 5, 6, 9, 8 +*NSET, NSET=EDGE +1, 2, 3, 4, 6, 7, 8, 9 +*NSET, NSET=CROWN +5 +*MATERIAL, NAME=STEEL +*DENSITY +7800.0 +*ELASTIC +2.10E11, 0.30 +*SHELL SECTION, ELSET=CAP, MATERIAL=STEEL +2.0384E-1 +*BOUNDARY +EDGE, 1, 6, 0.0 +*STEP +*STATIC +*CLOAD +CROWN, 3, -1.0E5 +*END STEP diff --git a/examples/stress_dependent_elasticity/README.md b/examples/stress_dependent_elasticity/README.md new file mode 100644 index 0000000..a3d9927 --- /dev/null +++ b/examples/stress_dependent_elasticity/README.md @@ -0,0 +1,22 @@ +# Stress Dependent Elasticity Smoke Case + +This folder contains the original stress-dependent elasticity tutorial notes +plus a compact FemLite smoke case: + +- `stress_dependent_cantilever_smoke.inp` +- `run_case.bat` + +The reference model maps pressure to a stress-dependent Young's modulus through +an auxiliary variable and weak contribution. FemLite V4.8 does not claim that +full nonlinear material workflow. The included input keeps the executable +structural idea: a cantilever beam split through its height into two C3D8 +regions with different elastic moduli, loaded by a nodal force couple to +exercise asymmetric bending stiffness. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/stress_dependent_elasticity/models.sme.stress_dependent_elasticity.pdf b/examples/stress_dependent_elasticity/models.sme.stress_dependent_elasticity.pdf new file mode 100644 index 0000000..7800eaf Binary files /dev/null and b/examples/stress_dependent_elasticity/models.sme.stress_dependent_elasticity.pdf differ diff --git a/examples/stress_dependent_elasticity/models.sme.stress_dependent_elasticity.zh_CN.pdf b/examples/stress_dependent_elasticity/models.sme.stress_dependent_elasticity.zh_CN.pdf new file mode 100644 index 0000000..72e89df Binary files /dev/null and b/examples/stress_dependent_elasticity/models.sme.stress_dependent_elasticity.zh_CN.pdf differ diff --git a/examples/stress_dependent_elasticity/run_case.bat b/examples/stress_dependent_elasticity/run_case.bat new file mode 100644 index 0000000..ae376a8 --- /dev/null +++ b/examples/stress_dependent_elasticity/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "stress_dependent_elasticity" "--static-linear" "stress_dependent_cantilever_smoke.inp" "1" +exit /b %errorlevel% diff --git a/examples/stress_dependent_elasticity/stress_dependent_cantilever_smoke.inp b/examples/stress_dependent_elasticity/stress_dependent_cantilever_smoke.inp new file mode 100644 index 0000000..8667441 --- /dev/null +++ b/examples/stress_dependent_elasticity/stress_dependent_cantilever_smoke.inp @@ -0,0 +1,47 @@ +*HEADING +FemLite V4.8 compact stress-dependent elasticity cantilever smoke case +** Reference scale: 0.10 m x 0.01 m cantilever, E_compression=700 MPa, +** E_tension=300 MPa. The stress-to-modulus weak mapping is outside V4.8. +*NODE +1, 0.00, 0.00, -0.005 +2, 0.10, 0.00, -0.005 +3, 0.10, 0.01, -0.005 +4, 0.00, 0.01, -0.005 +5, 0.00, 0.00, 0.000 +6, 0.10, 0.00, 0.000 +7, 0.10, 0.01, 0.000 +8, 0.00, 0.01, 0.000 +9, 0.00, 0.00, 0.005 +10, 0.10, 0.00, 0.005 +11, 0.10, 0.01, 0.005 +12, 0.00, 0.01, 0.005 +*ELEMENT, TYPE=C3D8, ELSET=COMPRESSIVE_SIDE +1, 1, 2, 3, 4, 5, 6, 7, 8 +*ELEMENT, TYPE=C3D8, ELSET=TENSILE_SIDE +2, 5, 6, 7, 8, 9, 10, 11, 12 +*NSET, NSET=FIXED +1, 4, 5, 8, 9, 12 +*NSET, NSET=TIP_TOP +10, 11 +*NSET, NSET=TIP_BOTTOM +2, 3 +*MATERIAL, NAME=COMPRESSION_EQUIV +*DENSITY +1000.0 +*ELASTIC +7.0E8, 0.30 +*MATERIAL, NAME=TENSION_EQUIV +*DENSITY +1000.0 +*ELASTIC +3.0E8, 0.30 +*SOLID SECTION, ELSET=COMPRESSIVE_SIDE, MATERIAL=COMPRESSION_EQUIV +*SOLID SECTION, ELSET=TENSILE_SIDE, MATERIAL=TENSION_EQUIV +*BOUNDARY +FIXED, 1, 3, 0.0 +*STEP +*STATIC +*CLOAD +TIP_TOP, 3, -50.0 +TIP_BOTTOM, 3, 50.0 +*END STEP diff --git a/examples/thick_plate/README.md b/examples/thick_plate/README.md new file mode 100644 index 0000000..90059cb --- /dev/null +++ b/examples/thick_plate/README.md @@ -0,0 +1,23 @@ +# Thick Plate Pressure Smoke Case + +This folder contains the original NAFEMS LE10 thick-plate reference documents +plus a compact FemLite V4.8 smoke case: + +- `thick_plate_pressure_smoke.inp` +- `run_case.bat` + +The reference benchmark is a quarter elliptical thick plate with an elliptical +hole, steel material, symmetry constraints and a 1 MPa pressure load on the top +surface. The included input keeps the same static thick-solid verification +intent in a small C3D8 quarter-plate surrogate: steel material, symmetry-plane +constraints, an outer support and equivalent nodal pressure loading in the +negative z direction. It is a regression entry for static solid pressure +response, not a full LE10 stress-concentration reproduction. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/thick_plate/models.sme.thick_plate.pdf b/examples/thick_plate/models.sme.thick_plate.pdf new file mode 100644 index 0000000..0d22001 Binary files /dev/null and b/examples/thick_plate/models.sme.thick_plate.pdf differ diff --git a/examples/thick_plate/models.sme.thick_plate.zh_CN.pdf b/examples/thick_plate/models.sme.thick_plate.zh_CN.pdf new file mode 100644 index 0000000..6391da6 Binary files /dev/null and b/examples/thick_plate/models.sme.thick_plate.zh_CN.pdf differ diff --git a/examples/thick_plate/run_case.bat b/examples/thick_plate/run_case.bat new file mode 100644 index 0000000..20ebe50 --- /dev/null +++ b/examples/thick_plate/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "thick_plate" "--static-linear" "thick_plate_pressure_smoke.inp" "1" +exit /b %errorlevel% diff --git a/examples/thick_plate/thick_plate_pressure_smoke.inp b/examples/thick_plate/thick_plate_pressure_smoke.inp new file mode 100644 index 0000000..1c51b66 --- /dev/null +++ b/examples/thick_plate/thick_plate_pressure_smoke.inp @@ -0,0 +1,41 @@ +*HEADING +FemLite V4.8 compact NAFEMS LE10 thick plate pressure smoke case +** Quarter-plate C3D8 surrogate for the thick-plate pressure documentation. +** Full elliptical-hole stress concentration is outside this smoke-case claim. +*NODE +1, 0.0, 0.00, 0.0 +2, 2.0, 0.00, 0.0 +3, 2.0, 1.75, 0.0 +4, 0.0, 1.75, 0.0 +5, 0.0, 0.00, 0.6 +6, 2.0, 0.00, 0.6 +7, 2.0, 1.75, 0.6 +8, 0.0, 1.75, 0.6 +*ELEMENT, TYPE=C3D8, ELSET=THICK_PLATE +1, 1, 2, 3, 4, 5, 6, 7, 8 +*NSET, NSET=X_SYM +1, 4, 5, 8 +*NSET, NSET=Y_SYM +1, 2, 5, 6 +*NSET, NSET=OUTER_EDGE +2, 3, 6, 7 +*NSET, NSET=Z_SUPPORT +2, 3 +*NSET, NSET=TOP_FACE +5, 6, 7, 8 +*MATERIAL, NAME=STEEL +*DENSITY +7850.0 +*ELASTIC +2.10E11, 0.30 +*SOLID SECTION, ELSET=THICK_PLATE, MATERIAL=STEEL +*BOUNDARY +X_SYM, 1, 1, 0.0 +Y_SYM, 2, 2, 0.0 +OUTER_EDGE, 1, 2, 0.0 +Z_SUPPORT, 3, 3, 0.0 +*STEP +*STATIC +*CLOAD +TOP_FACE, 3, -8.75E5 +*END STEP diff --git a/examples/two_arches/README.md b/examples/two_arches/README.md new file mode 100644 index 0000000..622e37e --- /dev/null +++ b/examples/two_arches/README.md @@ -0,0 +1,22 @@ +# Two Arches Contact Smoke Case + +This folder contains the original two-arches benchmark notes plus a compact +FemLite smoke case: + +- `two_arches_contact_smoke.inp` +- `run_case.bat` + +The reference problem is a shell-contact instability benchmark with critical +points, snap-through, displacement-controlled continuation, and a global +equation. FemLite V4.8 does not claim that full postcritical path. The included +input keeps the executable contact mechanics inside the current solver: two +S4 shallow arch strips with frictionless shell contact and a short explicit +pressing step. + +Run: + +```bat +run_case.bat +``` + +Results are written to `results\auto_run`. diff --git a/examples/two_arches/models.sme.two_arches.pdf b/examples/two_arches/models.sme.two_arches.pdf new file mode 100644 index 0000000..2fa1737 Binary files /dev/null and b/examples/two_arches/models.sme.two_arches.pdf differ diff --git a/examples/two_arches/models.sme.two_arches.zh_CN.pdf b/examples/two_arches/models.sme.two_arches.zh_CN.pdf new file mode 100644 index 0000000..4bbc510 Binary files /dev/null and b/examples/two_arches/models.sme.two_arches.zh_CN.pdf differ diff --git a/examples/two_arches/run_case.bat b/examples/two_arches/run_case.bat new file mode 100644 index 0000000..294a6bc --- /dev/null +++ b/examples/two_arches/run_case.bat @@ -0,0 +1,3 @@ +@echo off +call "%~dp0..\run_example_case.bat" "%~dp0" "two_arches" "--run" "two_arches_contact_smoke.inp" "1" +exit /b %errorlevel% diff --git a/examples/two_arches/two_arches_contact_smoke.inp b/examples/two_arches/two_arches_contact_smoke.inp new file mode 100644 index 0000000..ee22055 --- /dev/null +++ b/examples/two_arches/two_arches_contact_smoke.inp @@ -0,0 +1,56 @@ +*HEADING +FemLite V4.8 compact two-arches contact smoke case +** Reference scale: upper radius=80 mm, lower radius=100 mm, thickness=3 mm. +** This input verifies shell-shell contact output, not full snap-through tracking. +*NODE +1, -0.080, -0.003, 0.000 +2, 0.000, -0.003, 0.010 +3, 0.080, -0.003, 0.000 +4, -0.080, 0.003, 0.000 +5, 0.000, 0.003, 0.010 +6, 0.080, 0.003, 0.000 +7, -0.080, -0.003, 0.011 +8, 0.000, -0.003, 0.009 +9, 0.080, -0.003, 0.011 +10, -0.080, 0.003, 0.011 +11, 0.000, 0.003, 0.009 +12, 0.080, 0.003, 0.011 +*ELEMENT, TYPE=S4, ELSET=LOWER_ARCH +1, 1, 2, 5, 4 +2, 2, 3, 6, 5 +*ELEMENT, TYPE=S4, ELSET=UPPER_ARCH +3, 7, 8, 11, 10 +4, 8, 9, 12, 11 +*NSET, NSET=LOWER_ENDS +1, 3, 4, 6 +*NSET, NSET=UPPER_ENDS +7, 9, 10, 12 +*NSET, NSET=UPPER_MID +8, 11 +*MATERIAL, NAME=LOWER_MAT +*DENSITY +1.0 +*ELASTIC +4.0E10, 0.20 +*MATERIAL, NAME=UPPER_MAT +*DENSITY +1.0 +*ELASTIC +2.0E10, 0.30 +*SHELL SECTION, ELSET=LOWER_ARCH, MATERIAL=LOWER_MAT +3.0E-3 +*SHELL SECTION, ELSET=UPPER_ARCH, MATERIAL=UPPER_MAT +3.0E-3 +*AMPLITUDE, NAME=RAMP +0.0, 0.0, 1.0E-4, 1.0 +*BOUNDARY +LOWER_ENDS, 1, 6, 0.0 +UPPER_ENDS, 1, 2, 0.0 +UPPER_ENDS, 4, 6, 0.0 +*BOUNDARY, AMPLITUDE=RAMP +UPPER_MID, 3, 3, -3.0E-3 +*CONTACT PAIR, SLAVE=UPPER_ARCH, MASTER=LOWER_ARCH, PENALTY=5.0E8, DAMPING=1.0E4, SEARCH=1.0E-2, AUGMENT=0.25 +*STEP +*DYNAMIC +1.0E-5, 1.0E-4 +*END STEP diff --git a/examples/two_arches/two_arches_parameters.txt b/examples/two_arches/two_arches_parameters.txt new file mode 100644 index 0000000..d467a80 --- /dev/null +++ b/examples/two_arches/two_arches_parameters.txt @@ -0,0 +1,10 @@ +Ri_upper 80[mm] "Upper arch radius" +Ri_lower 100[mm] "Lower arch radius" +d 3[mm] "Arch thickness" +seg_upper 80[deg] "Upper arch segment" +seg_lower 100[deg] "Lower arch segment" +n_elem_upper 30 "Number of mesh elements, upper arch" +n_elem_lower 75 "Number of mesh elements, lower arch" +F_ref -1[N/mm] "Reference load value" +max_disp 60[mm] "Maximum displacement" +para 0 "Load parameter" diff --git a/examples/two_arches/two_arches_parameters.zh_CN.txt b/examples/two_arches/two_arches_parameters.zh_CN.txt new file mode 100644 index 0000000..0f0d6c3 --- /dev/null +++ b/examples/two_arches/two_arches_parameters.zh_CN.txt @@ -0,0 +1,10 @@ +Ri_upper 80[mm] "上拱半径" +Ri_lower 100[mm] "下拱半径" +d 3[mm] "拱厚度" +seg_upper 80[deg] "上拱段" +seg_lower 100[deg] "下拱段" +n_elem_upper 30 "网格单元数,上拱" +n_elem_lower 75 "网格单元数,下拱" +F_ref -1[N/mm] "参考载荷值" +max_disp 60[mm] "最大位移" +para 0 "载荷参数" diff --git a/src/base/fem_control.f90 b/src/base/fem_control.f90 index b6e76cd..b16f035 100644 --- a/src/base/fem_control.f90 +++ b/src/base/fem_control.f90 @@ -17,6 +17,7 @@ module fem_control integer, parameter :: CONV_FAIL_STOPPED = 3 integer, parameter :: LSOLVER_CG = 1 integer, parameter :: LSOLVER_BICGSTAB = 2 + integer, parameter :: LSOLVER_GMRES = 3 integer, parameter :: LSOLVER_EXTERNAL = 100 integer, parameter :: LPRECOND_NONE = 0 integer, parameter :: LPRECOND_JACOBI = 1 diff --git a/src/base/fem_precision.f90 b/src/base/fem_precision.f90 index 8340477..00cfb12 100644 --- a/src/base/fem_precision.f90 +++ b/src/base/fem_precision.f90 @@ -16,7 +16,7 @@ module fem_precision integer, parameter :: FEMLITE_VERSION_MAJOR = 0 integer, parameter :: FEMLITE_VERSION_MINOR = 4 - integer, parameter :: FEMLITE_VERSION_PATCH = 3 + integer, parameter :: FEMLITE_VERSION_PATCH = 8 real(rk), parameter :: ZERO = 0.0_rk real(rk), parameter :: ONE = 1.0_rk diff --git a/src/solver/fem_linear_solver_cg.f90 b/src/solver/fem_linear_solver_cg.f90 index c14e19a..3ed4105 100644 --- a/src/solver/fem_linear_solver_cg.f90 +++ b/src/solver/fem_linear_solver_cg.f90 @@ -13,6 +13,7 @@ module fem_linear_solver_cg public :: linear_solver_get_stats public :: linear_cg_solve public :: linear_bicgstab_solve + public :: linear_gmres_solve contains @@ -40,6 +41,9 @@ contains case (LSOLVER_BICGSTAB) call linear_bicgstab_solve(a, b, x, max_iter, tol, iter, res_norm, & ierr, preconditioner) + case (LSOLVER_GMRES) + call linear_gmres_solve(a, b, x, max_iter, tol, iter, res_norm, & + ierr, preconditioner) case (LSOLVER_EXTERNAL) iter = 0 res_norm = ZERO @@ -61,7 +65,7 @@ contains integer, intent(out) :: ierr if (method .ne. LSOLVER_CG .and. method .ne. LSOLVER_BICGSTAB .and. & - method .ne. LSOLVER_EXTERNAL) then + method .ne. LSOLVER_GMRES .and. method .ne. LSOLVER_EXTERNAL) then call error_set(FEM_ERR_SOLVER, 'invalid linear solver method', ierr) return end if @@ -358,6 +362,111 @@ contains if (allocated(diag_inv)) deallocate(diag_inv) end subroutine linear_bicgstab_solve + subroutine linear_gmres_solve(a, b, x, max_iter, tol, iter, res_norm, & + ierr, preconditioner) + type(csr_matrix), intent(in) :: a + real(rk), intent(in) :: b(:) + real(rk), intent(inout) :: x(:) + integer, intent(in) :: max_iter + real(rk), intent(in) :: tol + integer, intent(out) :: iter + real(rk), intent(out) :: res_norm + integer, intent(out) :: ierr + integer, intent(in), optional :: preconditioner + real(rk), allocatable :: diag_inv(:), r(:), w(:), ax(:), dx(:), xt(:) + real(rk), allocatable :: v(:,:), h(:,:), g(:), y(:) + real(rk) :: beta, hnorm, norm_b, threshold + integer :: n, m, k, j, stat, prec + + iter = 0 + res_norm = ZERO + prec = LPRECOND_JACOBI + if (present(preconditioner)) prec = preconditioner + call validate_linear_system(a, b, x, max_iter, tol, 'GMRES', ierr) + if (ierr .ne. FEM_SUCCESS) return + + n = a%nrow + m = min(max_iter, n) + allocate(diag_inv(n), r(n), w(n), ax(n), dx(n), xt(n), v(n,m+1), & + h(m+1,m), g(m+1), y(m), stat=stat) + if (stat .ne. 0) then + call error_set(FEM_ERR_SOLVER, 'failed to allocate GMRES workspace', ierr) + return + end if + + call build_preconditioner(a, prec, diag_inv, ierr) + if (ierr .ne. FEM_SUCCESS) go to 900 + call csr_matvec(a, x, ax, ierr) + if (ierr .ne. FEM_SUCCESS) go to 900 + r = b - ax + norm_b = sqrt(dot_product(b, b)) + threshold = tol * max(ONE, norm_b) + res_norm = sqrt(dot_product(r, r)) + if (res_norm .le. threshold) then + ierr = FEM_SUCCESS + go to 900 + end if + + call apply_jacobi_inverse(diag_inv, r, w) + beta = sqrt(dot_product(w, w)) + if (beta .le. tiny(ONE)) then + call error_set(FEM_ERR_SOLVER, 'GMRES preconditioned residual is zero', ierr) + go to 900 + end if + v = ZERO + h = ZERO + g = ZERO + v(:,1) = w / beta + g(1) = beta + dx = ZERO + + do k = 1, m + call csr_matvec(a, v(:,k), ax, ierr) + if (ierr .ne. FEM_SUCCESS) go to 900 + call apply_jacobi_inverse(diag_inv, ax, w) + do j = 1, k + h(j,k) = dot_product(w, v(:,j)) + w = w - h(j,k) * v(:,j) + end do + hnorm = sqrt(dot_product(w, w)) + h(k+1,k) = hnorm + if (hnorm .gt. tiny(ONE) .and. k .lt. m) v(:,k+1) = w / hnorm + call gmres_least_squares(h, g, k, y, ierr) + if (ierr .ne. FEM_SUCCESS) go to 900 + dx = ZERO + do j = 1, k + dx = dx + y(j) * v(:,j) + end do + xt = x + dx + call csr_matvec(a, xt, ax, ierr) + if (ierr .ne. FEM_SUCCESS) go to 900 + r = b - ax + res_norm = sqrt(dot_product(r, r)) + iter = k + if (res_norm .le. threshold) then + x = xt + ierr = FEM_SUCCESS + go to 900 + end if + end do + + x = x + dx + iter = m + call error_set(FEM_ERR_SOLVER, 'GMRES solver did not converge', ierr) + +900 continue + if (allocated(diag_inv)) deallocate(diag_inv) + if (allocated(r)) deallocate(r) + if (allocated(w)) deallocate(w) + if (allocated(ax)) deallocate(ax) + if (allocated(dx)) deallocate(dx) + if (allocated(xt)) deallocate(xt) + if (allocated(v)) deallocate(v) + if (allocated(h)) deallocate(h) + if (allocated(g)) deallocate(g) + if (allocated(y)) deallocate(y) + end subroutine linear_gmres_solve + subroutine validate_linear_system(a, b, x, max_iter, tol, solver_name, ierr) type(csr_matrix), intent(in) :: a real(rk), intent(in) :: b(:) @@ -452,4 +561,61 @@ contains end do end subroutine apply_jacobi_inverse + subroutine gmres_least_squares(h, g, k, y, ierr) + real(rk), intent(in) :: h(:,:) + real(rk), intent(in) :: g(:) + integer, intent(in) :: k + real(rk), intent(inout) :: y(:) + integer, intent(out) :: ierr + real(rk), allocatable :: ata(:,:), rhs(:) + real(rk) :: pivot, factor + integer :: i, j, row, stat + + y = ZERO + if (k .le. 0 .or. size(y) .lt. k) then + call error_set(FEM_ERR_SOLVER, 'GMRES least-squares size mismatch', ierr) + return + end if + allocate(ata(k,k), rhs(k), stat=stat) + if (stat .ne. 0) then + call error_set(FEM_ERR_SOLVER, 'failed to allocate GMRES least-squares', ierr) + return + end if + + ata = ZERO + rhs = ZERO + do i = 1, k + do row = 1, k + 1 + rhs(i) = rhs(i) + h(row,i) * g(row) + do j = 1, k + ata(i,j) = ata(i,j) + h(row,i) * h(row,j) + end do + end do + end do + + do i = 1, k + pivot = ata(i,i) + if (abs(pivot) .le. tiny(ONE)) then + call error_set(FEM_ERR_SOLVER, 'GMRES least-squares singular system', ierr) + go to 900 + end if + do row = i + 1, k + factor = ata(row,i) / pivot + ata(row,i:k) = ata(row,i:k) - factor * ata(i,i:k) + rhs(row) = rhs(row) - factor * rhs(i) + end do + end do + + do i = k, 1, -1 + y(i) = rhs(i) + if (i .lt. k) y(i) = y(i) - dot_product(ata(i,i+1:k), y(i+1:k)) + y(i) = y(i) / ata(i,i) + end do + ierr = FEM_SUCCESS + +900 continue + if (allocated(ata)) deallocate(ata) + if (allocated(rhs)) deallocate(rhs) + end subroutine gmres_least_squares + end module fem_linear_solver_cg diff --git a/tests/interface/test_c_api.c b/tests/interface/test_c_api.c index 8a86c3c..9e393f4 100644 --- a/tests/interface/test_c_api.c +++ b/tests/interface/test_c_api.c @@ -106,7 +106,7 @@ int main(void) ierr = femlite_get_version(&major, &minor, &patch); if (ierr != 0) return check_ierr(ierr, 2); - if (major != 0 || minor != 4 || patch != 3) return 3; + if (major != 0 || minor != 4 || patch != 8) return 3; ierr = femlite_read_inp("examples/c3d4_one_element.inp"); if (ierr != 0) return check_ierr(ierr, 4); @@ -136,6 +136,12 @@ int main(void) &linsol_preconditioner); if (ierr != 0) return check_ierr(ierr, 49); if (linsol_method != 2 || linsol_preconditioner != 0) return 50; + ierr = femlite_set_linear_solver(3, 1); + if (ierr != 0) return check_ierr(ierr, 501); + ierr = femlite_get_linear_solver_settings(&linsol_method, + &linsol_preconditioner); + if (ierr != 0) return check_ierr(ierr, 502); + if (linsol_method != 3 || linsol_preconditioner != 1) return 503; ierr = femlite_set_linear_solver(1, 1); if (ierr != 0) return check_ierr(ierr, 51); diff --git a/tests/module/test_linear_solver_cg.f90 b/tests/module/test_linear_solver_cg.f90 index 0d88848..9b8522d 100644 --- a/tests/module/test_linear_solver_cg.f90 +++ b/tests/module/test_linear_solver_cg.f90 @@ -13,6 +13,7 @@ program test_linear_solver_cg call check_nonconvergence() call check_dispatch_cg_none() call check_bicgstab_solve() + call check_gmres_solve() call check_external_placeholder() call check_invalid_configuration() @@ -160,6 +161,44 @@ contains if (ierr .ne. FEM_SUCCESS) call fail(73) end subroutine check_bicgstab_solve + subroutine check_gmres_solve() + type(csr_matrix) :: a + integer :: ierr + integer :: iter + integer :: method + integer :: preconditioner + integer :: status_code + real(rk) :: b(3) + real(rk) :: x(3) + real(rk) :: res_norm + + call linear_solver_configure(LSOLVER_GMRES, LPRECOND_JACOBI, ierr) + if (ierr .ne. FEM_SUCCESS) call fail(74) + call make_nonsymmetric(a, ierr) + if (ierr .ne. FEM_SUCCESS) call fail(75) + + b = (/ 6.0_rk, 11.0_rk, 8.0_rk /) + x = ZERO + call linear_solver_solve(a, b, x, 30, 1.0e-12_rk, iter, res_norm, ierr) + if (ierr .ne. FEM_SUCCESS) call fail(76) + if (iter .le. 0) call fail(77) + if (res_norm .gt. 1.0e-10_rk) call fail(78) + call check_close(x(1), ONE, 79) + call check_close(x(2), 2.0_rk, 80) + call check_close(x(3), 3.0_rk, 81) + call linear_solver_get_stats(method, preconditioner, iter, res_norm, & + status_code, ierr) + if (ierr .ne. FEM_SUCCESS) call fail(82) + if (method .ne. LSOLVER_GMRES) call fail(83) + if (preconditioner .ne. LPRECOND_JACOBI) call fail(84) + if (status_code .ne. LS_STATUS_CONVERGED) call fail(85) + + call csr_free(a, ierr) + if (ierr .ne. FEM_SUCCESS) call fail(86) + call linear_solver_configure(LSOLVER_CG, LPRECOND_JACOBI, ierr) + if (ierr .ne. FEM_SUCCESS) call fail(87) + end subroutine check_gmres_solve + subroutine check_external_placeholder() type(csr_matrix) :: a integer :: ierr @@ -172,25 +211,25 @@ contains real(rk) :: res_norm call linear_solver_configure(LSOLVER_EXTERNAL, LPRECOND_JACOBI, ierr) - if (ierr .ne. FEM_SUCCESS) call fail(80) + if (ierr .ne. FEM_SUCCESS) call fail(880) call make_tridiagonal(a, ierr) - if (ierr .ne. FEM_SUCCESS) call fail(81) + if (ierr .ne. FEM_SUCCESS) call fail(881) b = (/ ZERO, ZERO, 4.0_rk /) x = ZERO call linear_solver_solve(a, b, x, 20, 1.0e-12_rk, iter, res_norm, ierr) - if (ierr .eq. FEM_SUCCESS) call fail(82) + if (ierr .eq. FEM_SUCCESS) call fail(882) call linear_solver_get_stats(method, preconditioner, iter, res_norm, & status_code, ierr) - if (ierr .ne. FEM_SUCCESS) call fail(83) - if (method .ne. LSOLVER_EXTERNAL) call fail(84) - if (preconditioner .ne. LPRECOND_JACOBI) call fail(85) - if (status_code .ne. LS_STATUS_UNSUPPORTED) call fail(86) + if (ierr .ne. FEM_SUCCESS) call fail(883) + if (method .ne. LSOLVER_EXTERNAL) call fail(884) + if (preconditioner .ne. LPRECOND_JACOBI) call fail(885) + if (status_code .ne. LS_STATUS_UNSUPPORTED) call fail(886) call csr_free(a, ierr) - if (ierr .ne. FEM_SUCCESS) call fail(87) + if (ierr .ne. FEM_SUCCESS) call fail(887) call linear_solver_configure(LSOLVER_CG, LPRECOND_JACOBI, ierr) - if (ierr .ne. FEM_SUCCESS) call fail(88) + if (ierr .ne. FEM_SUCCESS) call fail(888) end subroutine check_external_placeholder subroutine check_invalid_configuration() diff --git a/tests/performance/perf_p1.f90 b/tests/performance/perf_p1.f90 index 4c7e2fc..43aebd5 100644 --- a/tests/performance/perf_p1.f90 +++ b/tests/performance/perf_p1.f90 @@ -40,7 +40,7 @@ program perf_p1 call fem_get_version(major, minor, patch, ierr) call exit_if_error(ierr) - if (major .ne. 0 .or. minor .ne. 4 .or. patch .ne. 1) then + if (major .ne. 0 .or. minor .ne. 4 .or. patch .ne. 8) then write(*,'(A,I1,A,I1,A,I1)') 'unexpected FemLite version ', major, '.', minor, '.', patch call exit(3) end if diff --git a/tests/scripts/check_examples_layout.py b/tests/scripts/check_examples_layout.py index 4c624cc..5caf85d 100644 --- a/tests/scripts/check_examples_layout.py +++ b/tests/scripts/check_examples_layout.py @@ -6,7 +6,7 @@ import sys from pathlib import Path -DOC_SUFFIXES = {".md", ".pdf", ".txt", ".rst"} +DOC_SUFFIXES = {".md", ".pdf", ".ppt", ".pptx", ".txt", ".rst"} def parse_args() -> argparse.Namespace: diff --git a/tests/unit/test_smoke.f90 b/tests/unit/test_smoke.f90 index 7226334..3d9f4b0 100644 --- a/tests/unit/test_smoke.f90 +++ b/tests/unit/test_smoke.f90 @@ -94,7 +94,7 @@ program test_smoke if (ierr .ne. 0) stop 2 if (major .ne. 0) stop 3 if (minor .ne. 4) stop 4 - if (patch .ne. 3) stop 5 + if (patch .ne. 8) stop 5 call fem_read_inp('examples/c3d4_one_element.inp', ierr) if (ierr .ne. 0) stop 11