avl_sweep#
Top-level orchestrator. Calls avl_fileread, avl_rungen, avl_bin, and st_fileread in sequence. Exposed publicly as avl_sweep() via avl_aero_tables.__init__.
Orchestrate AVL geometry reading, sweep execution, and .st output parsing.
- avl_aero_tables.avl_sweep.run(avl_file, alpha, beta, ctrl_sweeps=None, out_dir=None, binary=None, out_format='csv')[source]#
Run AVL stability analysis for a sweep of alpha, beta, and deflections.
- Parameters:
avl_file (str | Path) – Path to the .avl geometry file.
alpha (list[float]) – Angle-of-attack sweep values in degrees.
beta (list[float]) – Sideslip angle sweep values in degrees.
ctrl_sweeps (dict[str, list[float]] | None) – Mapping of control-surface name → deflection sweep values. An empty dict (default) produces one run per (alpha, beta) point.
out_dir (Path | None) – Directory for .st output files. Defaults to
out/<geometry_name>/<timestamp>/relative to the current working directory, where timestamp isYYYY-MM-DD-HHMMSS. Each call creates a fresh subdirectory so previous results are never overwritten. Pass an explicit path to write to a fixed location instead.binary (Path | None) – Path to the AVL binary. Auto-detected if not provided.
out_format (Literal['csv', 'json', 'df']) – Export format for results saved alongside the .st files. One of
"csv"(default),"json", or"df"(DataFrame in memory only — no file written). The file is written toout_dir/results.<ext>.
- Returns:
One StResult per .st output file produced.
- Return type:
list[StResult]
Example
>>> from avl_aero_tables import avl_sweep >>> results = avl_sweep( ... "examples/bd.avl", ... alpha=[-5, 0, 5, 10], ... beta=[0], ... ctrl_sweeps={"elevator": [-10, 0, 10]}, ... ) AVL sweep complete → ... (12 cases) >>> len(results) # 4 alpha × 3 elevator deflections 12 >>> results[0].data["Alpha"] -5.0