Checkpoint V5.11 shell redesign baseline

This commit is contained in:
shenw
2026-06-28 11:34:52 +08:00
parent db68340aaf
commit 5e90d58d0e
60 changed files with 13859 additions and 8386 deletions
+15 -6
View File
@@ -1,22 +1,31 @@
# Euler Column Buckling Benchmark
This benchmark verifies the V5 linear buckling path on a pinned-pinned
This benchmark verifies the V5 main-solver linear buckling path on a pinned-pinned
Euler-Bernoulli column with a known analytical critical load:
```text
Pcr = pi^2 E I / (K L)^2
```
The benchmark tool assembles the beam bending stiffness and calls the production
`geom_beam2d_column_stiffness`, `buckling_dense_solve` and
`buckling_euler_column_load` routines from `femlite_core`.
The default example path runs:
```powershell
build-win-gcc-16\femlite.exe examples\euler_column_buckling\euler_column_buckling.inp --buckling --output-dir examples\euler_column_buckling\results\auto_run
```
The main executable reads `*BUCKLING COLUMN`, assembles the column through
`fem_buckling_column`, and calls the production `geom_beam2d_column_stiffness`,
`buckling_dense_solve` and `buckling_euler_column_load` routines from
`femlite_core`. The legacy benchmark executable is only a thin wrapper around the
same production module.
Files:
- `euler_column_buckling.inp`: benchmark input with `E`, `I`, `L`, element
count and effective length factor.
- `check_buckling_results.py`: CTest checker.
- `run_case.bat`: double-click runner.
- `check_buckling_results.py`: CTest checker for the `femlite --buckling`
workflow.
- `run_case.bat`: double-click runner that builds and calls `femlite`.
Generated outputs:
@@ -16,17 +16,17 @@ def read_key_values(path: Path) -> dict[str, str]:
return {row["key"]: row["value"] for row in csv.DictReader(handle)}
def find_tool(build_dir: Path) -> Path:
def find_femlite(build_dir: Path) -> Path:
candidates = [
build_dir / "euler_column_buckling_benchmark.exe",
build_dir / "euler_column_buckling_benchmark",
build_dir / "Release" / "euler_column_buckling_benchmark.exe",
build_dir / "Release" / "euler_column_buckling_benchmark",
build_dir / "femlite.exe",
build_dir / "femlite",
build_dir / "Release" / "femlite.exe",
build_dir / "Release" / "femlite",
]
for candidate in candidates:
if candidate.exists():
return candidate
raise RuntimeError(f"missing euler_column_buckling_benchmark tool under {build_dir}")
raise RuntimeError(f"missing femlite executable under {build_dir}")
def main() -> int:
@@ -37,11 +37,11 @@ def main() -> int:
output_dir = Path(sys.argv[2]).resolve()
repo_root = Path(__file__).resolve().parents[2]
input_file = repo_root / "examples" / "euler_column_buckling" / "euler_column_buckling.inp"
tool = find_tool(build_dir)
tool = find_femlite(build_dir)
output_dir.mkdir(parents=True, exist_ok=True)
completed = subprocess.run(
[str(tool), str(input_file), str(output_dir)],
[str(tool), str(input_file), "--buckling", "--output-dir", str(output_dir)],
cwd=repo_root,
text=True,
stdout=subprocess.PIPE,
@@ -77,7 +77,7 @@ def main() -> int:
require(max(w_values) > 0.0, "mode shape is blank")
require(w_values[0] <= 1.0e-12 and w_values[-1] <= 1.0e-12, "pinned end displacement is not zero")
print(f"Euler buckling benchmark passed: Pcr={factor:.6e}, error={rel_error:.3e}")
print(f"Euler buckling main-solver workflow passed: Pcr={factor:.6e}, error={rel_error:.3e}")
return 0
+6 -6
View File
@@ -4,7 +4,7 @@ setlocal
set "CASE_DIR=%~dp0"
set "ROOT_DIR=%CASE_DIR%..\.."
set "OUT_DIR=%CASE_DIR%results\auto_run"
set "TOOL=%ROOT_DIR%\build-win-gcc-16\euler_column_buckling_benchmark.exe"
set "TOOL=%ROOT_DIR%\build-win-gcc-16\femlite.exe"
set "INP=%CASE_DIR%euler_column_buckling.inp"
if not exist "%OUT_DIR%" mkdir "%OUT_DIR%"
@@ -12,21 +12,21 @@ del /Q "%OUT_DIR%\buckling_summary.csv" 2>nul
del /Q "%OUT_DIR%\buckling_mode_1.csv" 2>nul
if not exist "%TOOL%" (
echo Building euler_column_buckling_benchmark...
cmake --build "%ROOT_DIR%\build-win-gcc-16" --config Release --target euler_column_buckling_benchmark
echo Building femlite...
cmake --build "%ROOT_DIR%\build-win-gcc-16" --config Release --target femlite
if errorlevel 1 goto fail
)
"%TOOL%" "%INP%" "%OUT_DIR%"
"%TOOL%" "%INP%" --buckling --output-dir "%OUT_DIR%"
if errorlevel 1 goto fail
echo.
echo Euler column buckling benchmark completed.
echo Euler column buckling main-solver workflow completed.
if not "%FEMLITE_NO_PAUSE%"=="1" pause
exit /b 0
:fail
echo.
echo Euler column buckling benchmark failed.
echo Euler column buckling main-solver workflow failed.
if not "%FEMLITE_NO_PAUSE%"=="1" pause
exit /b 1
@@ -18,8 +18,10 @@ geometry/material baseline; `spherical_cap_displacement_control_shell4.inp`
uses the PDF Shell-4 mesh as an explicit nonlinear direct-displacement
diagnostic input for the V5.11 follow-up work. Both decks now use
`*NONLINEAR CONTINUATION, METHOD=ARC_LENGTH_OR_DISPLACEMENT_CONTROL,
SHELL_GEOMETRIC=YES` so the production S4 corotational nonlinear path is selected
whenever the nonlinear route is attempted. Both decks prescribe the crown
SHELL_GEOMETRIC=YES` as a migration-era request for the current S4 nonlinear
diagnostic path. The V5.11 completion target is
`SHELL_GEOMETRIC=FINITE_STRAIN`; old corotational aliases must be deleted when
the finite-membrane-strain S4 route is implemented. Both decks prescribe the crown
displacement to `-6.2 m`; the reaction is nondimensionalized as
```text
@@ -33,17 +35,17 @@ static-linear Shell-16 samples at the PDF table displacement values and writes
`FEMLITE_SPHERICAL_CAP_NONLINEAR=1` is set, the checker instead attempts a real
`--static-nonlinear` Shell-4 direct-displacement path and validates
`continuation_path.csv`. That nonlinear route is intentionally diagnostic today:
FemLite has the opt-in corotational S4 frame/objectivity foundation, elastic
S4 algorithmic tangent from production internal-force finite differences,
prestress-delta membrane geometric stiffness, and shell pressure follower
tangent for `DLOAD P`. It still does not include the full Shell-4/8/16
postbuckling solve chain: plastic/multilayer shell algorithmic tangents,
bending/shear prestress terms, all follower-load families and generalized
Riks/arc-length equations. Non-`ELASTIC` S4 shell materials are rejected on the
corotational tangent path until their algorithmic tangents are implemented. The
example must not be marked as full PDF postbuckling PASS until V5.11-1/V5.11-3
are finished and the optional nonlinear checker reaches the target displacement
with post-peak load drop and restiffening.
FemLite has section/resultant state, elastic multilayer ABD/H matrices,
ELASTIC/J2/J2_JC section tangent plumbing, nonsymmetric Newton correction support
and shell pressure follower tangent for `DLOAD P`. It still does not include the
full Shell-4/8/16 postbuckling solve chain: finite-rotation director state,
finite membrane strain, Koiter-Sanders type curvature increment, MITC/ANS
assumed strain, analytic material/geometric/rotation/drilling tangent,
plastic multilayer through-thickness state and all declared follower-load
families. The example must not be marked as full PDF postbuckling PASS until
V5.11 finite-strain S4 is finished, old corotational interfaces are removed, and
the nonlinear checker reaches the target displacement with post-peak load drop
and restiffening.
Run: