VibeFlow Scilab
This skill is responsible for using Scilab as the numerical computing, control, optimization, data processing, and engineering scripting backend for VibeCAE.
- Usage mode: generate and run Scilab scripts from
caseDictto complete parameter calculations, reduced-order models, control analysis, optimization, data processing, or chart output. - Development mode: develop reusable
.scifunction libraries, batch scripts, Xcos/control-tool interfaces, or Studio invocation bridges.
When To Use
- Matrix calculations, control systems, optimization, signal processing, statistical processing, or engineering calculation scripts are needed.
- Lightweight numerical analysis of CFD/FEM/MD results is needed, but the full Python ecosystem is not required.
- The user already has Scilab scripts or wants to connect MATLAB-style workflows to VibeCAE.
.scebatch scripts,.scifunctions, charts, and tables need to be generated.
First Decision: Usage Mode Or Development Mode
- One-off calculations, parameter tables, and post-processing plots for the current case: use usage mode.
- General function libraries, templates, Studio adapters, Xcos models, or batch frameworks: use development mode.
- If Scilab commands are unavailable or the graphics backend is abnormal: switch to
vibeflow-toolchainfirst. - If Python is the more suitable backend, prefer the existing Python post-processing workflow.
What To Read First
- Parameters, objective functions, inputs, outputs, and post-processing requirements in
0-caseDict/caseDict. references/scilab-playbook.mdreferences/scilab-practical-tips.md: software knowledge base, key concepts, failure interpretation, and adapter design points.- Existing
.sce,.sci, and data tables underC-run/scilab/,D-post/, andRef/.
Inputs
0-caseDict/caseDict- CSV, TSV, DAT, MAT, result logs, and monitor files
.scescripts and.scifunctions
Outputs
C-run/scilab/case-*/main.sceC-run/scilab/case-*/functions/*.sciC-run/scilab/case-*/logs/D-post/scilab_*charts, tables, and intermediate data- Post-processing records in
caseDictwhen needed
Recommended Structure
C-run/scilab/
└── case-1/
├── main.sce
├── functions/
├── data/
├── results/
├── logs/
├── Allrun
└── Allclean
Usage-Mode Workflow
- Determine input data, output metrics, units, and calculation objectives from
caseDict. - Write
main.sce, anchoring paths to the current case instead of relying on the interactive current directory. - Put reusable functions under
functions/and load them explicitly at the beginning of the script. - Run Scilab in batch mode and save logs.
- Output CSV/PNG/SVG/PDF results and check that the files exist.
- Hand charts and calculation results to
vibeflow-postprocessor the report skill.
Development-Mode Workflow
- Clarify the development target: function library, optimization template, control-analysis script, Xcos export, or Studio adapter.
- Write the development note first, recording function interfaces, inputs, outputs, defaults, error handling, and a minimal example.
- Keep scripts runnable in a headless environment.
- Add minimal numerical validation for key functions, such as known analytical solutions, benchmark data, or dimension checks.
- If coupled with a solver, clearly define data-file formats and refresh timing.
Core Rules
- Scilab scripts must not hide key physical assumptions; units and data sources must be clear.
- Use
.scifor reusable functions and.scefor one-off workflows. - Graphics output must have deterministic paths and must not depend on manual saving from GUI windows.
- For large files, distinguish memory requirements and preprocess or read in chunks when needed.
Validation
- The Scilab CLI can run.
main.sceexecutes successfully in batch mode and the log has no errors.- Output files exist and are non-empty.
- Key numerical results pass a simple sanity check.
Fallback Rules
- Numerical model or objective function unclear: return to
vibeflow-case-dict. - Environment unavailable: return to
vibeflow-toolchain. - Results are intended for a report but evidence is insufficient: switch to
vibeflow-postprocessorvibeflow-report.