This guide shows the shortest path from a fresh checkout to running CUFSM Octave CLI.
- GNU Octave with
octave-cliavailable on the command line. - Python 3.9 or newer, if using the Python helper package.
- Git, if cloning from GitHub.
- A terminal: PowerShell, Command Prompt, Windows Terminal, macOS Terminal, Linux shell, or WSL.
Check Octave with:
octave-cli --versionDownload GNU Octave from:
After installation, open a new PowerShell or Command Prompt window and run:
octave-cli --versionIf the command is not found, restart the terminal or add the Octave installation directory to PATH.
winget install -e --id GNU.OctaveThen open a new terminal and check:
octave-cli --versionFor Ubuntu or Debian in WSL:
sudo apt update
sudo apt install octave gitUsing Homebrew:
brew update
brew install octavesudo apt update
sudo apt install octave gitgit clone https://github.com/someparsa/cufsm-octave.git
cd cufsm-octaveThe JSON workflow is the preferred workflow for repeatable analysis:
octave-cli --quiet cufsm_json.m examples/lipped-channel.jsonIt writes:
examples/lipped-channel-results.json
examples/lipped-channel-results.txt
The JSON result is the machine-readable result. The text report is easier to inspect manually.
From the repository root:
python -m pip install -e .Optional extras are installed separately:
python -m pip install -e ".[validation]"
python -m pip install -e ".[plotting]"
python -m pip install -e ".[dataframe]"The validation extra enables full JSON Schema validation with jsonschema.
The plotting extra enables matplotlib signature-curve plotting. The
dataframe extra enables pandas result-table helpers.
Run the checked-in JSON example through Python:
from cufsm_octave import run_cufsm
result = run_cufsm("examples/lipped-channel.json")
print(result.overall_minimum)Generate a JSON input from a named section template:
from cufsm_octave import write_section_input
write_section_input(
"examples/generated-unlipped-channel.json",
"unlipped-channel",
depth=8.0,
flange=3.0,
thickness=0.075,
fy=50.0,
output_path="examples/generated-unlipped-channel-results.json",
)Plot an existing result JSON after installing the plotting extra:
python examples/postprocess_signature_curve.py \
examples/lipped-channel-results.json \
examples/lipped-channel-signature-curve.pngRun the Python batch and optimization examples:
python examples/python_batch_lipped_channel.py
python examples/python_optimize_lipped_channel.pyThese examples generate their own input/result files under
examples/batch-results/ and examples/optimization-results/.
The older hardcoded example is still available:
octave-cli --quiet cufsm-octave-example.mIt writes:
cufsm-results.txt
Use this mostly as a reference for the original hardcoded Octave workflow. Prefer the JSON runner for new work.
If the repository is stored on a Windows drive and you run Octave through WSL, use a command like:
wsl bash -lc "cd /mnt/c/path/to/cufsm-octave && octave-cli --quiet cufsm_json.m examples/lipped-channel.json"Replace /mnt/c/path/to/cufsm-octave with the actual WSL path.