Complete V5 acceptance milestone
This commit is contained in:
@@ -1,18 +1,31 @@
|
||||
# Buckling Corrugated Shell Smoke Case
|
||||
# Buckling Corrugated Shell Benchmark
|
||||
|
||||
This folder contains the original corrugated conical shell buckling reference
|
||||
document plus a compact FemLite V4.8 smoke case:
|
||||
document and a compact FemLite V5.5 cyclic linear buckling benchmark.
|
||||
|
||||
- `corrugated_shell_static_smoke.inp`
|
||||
- `run_case.bat`
|
||||
The executable benchmark input is:
|
||||
|
||||
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.
|
||||
- `corrugated_shell_buckling_benchmark.inp`
|
||||
|
||||
The case represents a sixteen-sector corrugated conical shell with a reduced
|
||||
periodic stiffness/geometric-stiffness model derived from the documented radius,
|
||||
height, thickness and aluminum material scale. The benchmark solves the full
|
||||
periodic model with FemLite's internal dense buckling solver and compares the
|
||||
selected cyclic wave number against the equivalent cyclic-sector harmonic
|
||||
result. It also checks the shell 6-DOF cyclic boundary transform and writes
|
||||
modal CSV output through the production modal output path.
|
||||
|
||||
Reference metrics for the current input:
|
||||
|
||||
| Metric | Value |
|
||||
|---|---:|
|
||||
| Sectors | 16 |
|
||||
| Selected wave number | 4 |
|
||||
| Expected critical load range | 150 to 450 |
|
||||
| Expected selected-wave load range | 150 to 550 |
|
||||
| Cyclic/full relative error tolerance | `1.0e-8` |
|
||||
| Modal residual tolerance | `1.0e-8` |
|
||||
| Modal orthogonality tolerance | `1.0e-8` |
|
||||
|
||||
Run:
|
||||
|
||||
@@ -20,4 +33,12 @@ Run:
|
||||
run_case.bat
|
||||
```
|
||||
|
||||
Results are written to `results\auto_run`.
|
||||
Results are written to `results\auto_run`:
|
||||
|
||||
- `corrugated_buckling_summary.csv`
|
||||
- `corrugated_buckling_waves.csv`
|
||||
- `corrugated_buckling_modes.csv`
|
||||
- `corrugated_buckling_profile.csv`
|
||||
|
||||
The legacy `corrugated_shell_static_smoke.inp` is kept only as the old V4.8
|
||||
static preload reference input. It is no longer the V5 benchmark entry.
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import csv
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def read_key_values(path: Path) -> dict[str, float]:
|
||||
rows: dict[str, float] = {}
|
||||
with path.open(newline="") as handle:
|
||||
reader = csv.reader(handle)
|
||||
next(reader)
|
||||
for key, value in reader:
|
||||
try:
|
||||
rows[key] = float(value)
|
||||
except ValueError:
|
||||
rows[key] = float(int(value))
|
||||
return rows
|
||||
|
||||
|
||||
def require(condition: bool, message: str) -> None:
|
||||
if not condition:
|
||||
raise AssertionError(message)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
if len(sys.argv) != 3:
|
||||
raise SystemExit(
|
||||
"usage: check_buckling_results.py BUILD_DIR OUTPUT_DIR"
|
||||
)
|
||||
|
||||
repo = Path(__file__).resolve().parents[2]
|
||||
build_dir = Path(sys.argv[1]).resolve()
|
||||
out_dir = Path(sys.argv[2]).resolve()
|
||||
out_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
case_dir = Path(__file__).resolve().parent
|
||||
inp = case_dir / "corrugated_shell_buckling_benchmark.inp"
|
||||
text = inp.read_text(encoding="utf-8")
|
||||
require("*CORRUGATED SHELL BUCKLING" in text, "benchmark input missing buckling block")
|
||||
require("static smoke" not in text.lower(), "old static smoke input used as benchmark")
|
||||
|
||||
tool = build_dir / "corrugated_shell_buckling_benchmark.exe"
|
||||
if not tool.exists():
|
||||
tool = build_dir / "corrugated_shell_buckling_benchmark"
|
||||
completed = subprocess.run(
|
||||
[str(tool), str(inp), str(out_dir)],
|
||||
cwd=repo,
|
||||
text=True,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
)
|
||||
if completed.returncode != 0:
|
||||
print(completed.stdout)
|
||||
raise RuntimeError(f"{tool} exited with code {completed.returncode}")
|
||||
|
||||
summary = out_dir / "corrugated_buckling_summary.csv"
|
||||
waves = out_dir / "corrugated_buckling_waves.csv"
|
||||
modes = out_dir / "corrugated_buckling_modes.csv"
|
||||
profile = out_dir / "corrugated_buckling_profile.csv"
|
||||
for path in (summary, waves, modes, profile):
|
||||
require(path.exists(), f"missing output: {path.name}")
|
||||
require(path.stat().st_size > 0, f"empty output: {path.name}")
|
||||
|
||||
data = read_key_values(summary)
|
||||
require(int(data["sectors"]) == 16, "unexpected sector count")
|
||||
require(int(data["selected_wave"]) == 4, "unexpected selected wave")
|
||||
require(150.0 <= data["critical_load"] <= 450.0, "critical load outside range")
|
||||
require(150.0 <= data["selected_cyclic_load"] <= 550.0, "selected load outside range")
|
||||
require(data["cyclic_full_relative_error"] <= 1.0e-8, "cyclic/full mismatch too large")
|
||||
require(data["cyclic_boundary_residual"] <= 1.0e-10, "cyclic boundary residual too large")
|
||||
require(data["modal_max_residual"] <= 1.0e-8, "modal residual too large")
|
||||
require(data["modal_orthogonality_offdiag"] <= 1.0e-8, "modal offdiag too large")
|
||||
require(data["modal_orthogonality_diag_error"] <= 1.0e-8, "modal diag error too large")
|
||||
require(0.95 <= data["modal_max_component"] <= 1.05, "mode scaling failed")
|
||||
|
||||
with waves.open(newline="") as handle:
|
||||
wave_rows = list(csv.DictReader(handle))
|
||||
require(len(wave_rows) == 9, "expected wave numbers 0..8")
|
||||
loads = [float(row["cyclic_load"]) for row in wave_rows]
|
||||
require(min(loads) == data["critical_load"], "summary critical load mismatch")
|
||||
|
||||
with modes.open(newline="") as handle:
|
||||
mode_rows = list(csv.DictReader(handle))
|
||||
require(len(mode_rows) >= 16, "modal CSV does not contain one full mode")
|
||||
|
||||
with profile.open(newline="") as handle:
|
||||
profile_rows = list(csv.DictReader(handle))
|
||||
require(len(profile_rows) == 16, "profile should contain one row per sector")
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
@@ -0,0 +1,9 @@
|
||||
*HEADING
|
||||
FemLite compact corrugated shell cyclic linear buckling benchmark
|
||||
**
|
||||
** sectors, selected_wave, output_mode_count, bottom_radius, top_radius, height, thickness
|
||||
*CORRUGATED SHELL BUCKLING
|
||||
16, 4, 6, 0.031000, 0.015500, 0.050000, 5.0E-4
|
||||
**
|
||||
** young, poisson, stiffness_coupling_ratio, geometric_coupling_ratio, corrugation_factor
|
||||
7.0E10, 0.30, 0.18, 0.42, 1.0
|
||||
@@ -1,3 +1,29 @@
|
||||
@echo off
|
||||
call "%~dp0..\run_example_case.bat" "%~dp0" "buckling_corrugated_shell" "--static-linear" "corrugated_shell_static_smoke.inp" "1"
|
||||
exit /b %errorlevel%
|
||||
rem FemLite benchmark runner for the corrugated shell buckling case.
|
||||
setlocal
|
||||
set "CASE_DIR=%~dp0"
|
||||
for %%I in ("%CASE_DIR%..\..") do set "ROOT_DIR=%%~fI"
|
||||
set "BUILD_DIR=%ROOT_DIR%\build-win-gcc-16"
|
||||
set "TOOL=%BUILD_DIR%\corrugated_shell_buckling_benchmark.exe"
|
||||
set "INP=%CASE_DIR%corrugated_shell_buckling_benchmark.inp"
|
||||
set "OUT_DIR=%CASE_DIR%results\auto_run"
|
||||
|
||||
if not exist "%OUT_DIR%" mkdir "%OUT_DIR%"
|
||||
del /Q "%OUT_DIR%\corrugated_buckling_*.csv" 2>nul
|
||||
|
||||
if not exist "%TOOL%" (
|
||||
echo Building corrugated_shell_buckling_benchmark...
|
||||
cmake --build "%BUILD_DIR%" --config Release --target corrugated_shell_buckling_benchmark
|
||||
if errorlevel 1 goto :fail
|
||||
)
|
||||
|
||||
"%TOOL%" "%INP%" "%OUT_DIR%"
|
||||
if errorlevel 1 goto :fail
|
||||
|
||||
echo Corrugated shell buckling benchmark completed.
|
||||
echo Results: "%OUT_DIR%"
|
||||
exit /b 0
|
||||
|
||||
:fail
|
||||
echo Corrugated shell buckling benchmark failed.
|
||||
exit /b 1
|
||||
|
||||
Reference in New Issue
Block a user