dualsphysics-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DSPH_SOLVER | No | Path to the DualSPHysics CPU solver executable (e.g., /home/user/softwares/DualSPHysics/bin/linux/DualSPHysics5.4CPU_linux64). If not set, the server searches PATH and conventional install roots. | |
| DSPH_GENCASE | No | Path to the GenCase executable (e.g., /home/user/softwares/DualSPHysics/bin/linux/GenCase_linux64). If not set, the server searches PATH and conventional install roots. | |
| DSPH_PARTVTK | No | Path to the PartVTK executable (e.g., /home/user/softwares/DualSPHysics/bin/linux/PartVTK_linux64). If not set, the server searches PATH and conventional install roots. | |
| DSPH_JOBS_DIR | No | Directory for job outputs. Defaults to ./jobs. | ./jobs |
| DSPH_MEASURETOOL | No | Path to the MeasureTool executable (e.g., /home/user/softwares/DualSPHysics/bin/linux/MeasureTool_linux64). If not set, the server searches PATH and conventional install roots. | |
| DSPH_OMP_THREADS | No | Number of OpenMP threads for the solver. Defaults to all available cores. | all cores |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| check_environmentA | Probe the DualSPHysics toolchain: paths, versions, solver features. Reports for GenCase / CPU solver / PartVTK / MeasureTool whether each binary was found (env var, PATH or conventional install dirs), its version, and the solver's feature flags (a build without WaveGen cannot run wave cases). Call this first; missing tools come with install hints. |
| gencaseA | Run GenCase: case XML -> Case.xml + Case.bi4 (+ preview VTK files). Args: xml_path: Path to the *_Def.xml case definition (with or without .xml). output_dir: Output directory (default: _out next to the XML). out_name: Output case name (default: XML stem minus _Def). save_modes: GenCase -save value (default "all" = bi4 + preview VTKs). extra_args: Extra GenCase flags (e.g. ["-dp:0.02"]). |
| run_caseA | Start the CPU solver in the BACKGROUND and return a job_id. The case must have been processed by gencase first (Case.xml + Case.bi4). Progress is tracked with job_status; outputs land in the job directory (Run.out, data/Part_*.bi4). Restart/cancel are not implemented; solver flags such as -partbegin: can be passed via extra_args. Args: case_path: Processed case base (gencase out_xml, with/without .xml). dirout: Output directory (default: jobs/). omp_threads: OpenMP threads (default: DSPH_OMP_THREADS or all cores). tmax: Override TimeMax (seconds of simulated time). tout: Override TimeOut (seconds between Part files). extra_args: Extra solver flags (e.g. ["-svres"]). |
| job_statusA | Poll a background solver job: state + Run.out progress digest. Returns the running state (plus pid/returncode), simulated time vs tmax, percent, step counters, the solver's Time/Sec throughput (wall-clock seconds per simulated second), the solver's own projected finish time, particle counts and the Run.out tail. |
| partvtkA | PartVTK: convert Part_*.bi4 particle files to VTK for visualisation. Args: job_id: Job whose data/ directory holds the Part_*.bi4 files. dirdata: Explicit particle data directory (alternative to job_id). savevtk: Output prefix (default particles/PartFluid inside the job). onlytype: Particle filter (default fluid only). variables: Variables to store, e.g. "+idp,+vel,+rhop,+press". first/last: Part index range. extra_args: Extra PartVTK flags. |
| measure_toolA | MeasureTool: interpolate SPH values at points -> CSV time series. For the dam-break validation use a horizontal line of points just above the bottom (examples/dambreak_val2d/points_damtip.txt) with density (default -vars:-all,rhop): points beyond the surge front read 0, so the furthest wet point is the front position that validate_dambreak compares against the experiment. Args: job_id: Job whose data/ directory holds the Part_*.bi4 files. dirdata: Explicit particle data directory (alternative to job_id). points_file: MeasureTool points file (POINTS/POINTSLIST/POINTSENDLIST). pointsdef: Inline points definition, e.g. "ptels[x=0:0.01:4,z=0.03]". variables: Variables to interpolate (default density only). onlytype: Particle filter (default fluid only). savecsv: CSV output prefix (default measure/damtip inside the job). savevtk: Optional VTK prefix for the measuring points. extra_args: Extra MeasureTool flags (a -csvsep here overrides ours). |
| validate_dambreakA | Validate a 2D dam-break run: dam-tip front vs Koshizuka & Oka (1996). Reads the CSV produced by measure_tool with the SAME points definition (columns map to points by order), reconstructs the front position per output time (furthest point above the wetness threshold) and reports per-time errors plus MAE / RMSE / max error in metres and as % of the column length. Args: csv_path: MeasureTool time-history CSV. points: Points [[x, y, z], ...] in CSV column order. points_file: The points file used for the measurement. threshold: Wetness threshold (500 kg/m^3 for rhop; ~0.05 for vel). column_length: Water column length a in metres (normalisation). experiment: Embedded experiment (koshizuka1996). max_time: Ignore simulated samples beyond this time (s). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each tool targets a distinct stage of the DualSPHysics workflow (environment check, case generation, execution, polling, conversion, measurement, validation). No overlap in purpose; even validate_dambreak and measure_tool are clearly separated (measure produces CSV, validate analyzes it).
Mostly consistent snake_case with verb_noun pattern (validate_dambreak, check_environment, run_case, measure_tool). Minor deviations: partvtk and gencase lack underscores, and job_status is noun_verb rather than verb_noun, but overall the pattern is predictable and readable.
Seven tools cover the entire simulation lifecycle for a focused domain (dam-break validation). The count is well-scoped and each tool clearly earns its place; no bloat or deficiency.
The core workflow is covered end-to-end: generate case, run solver, monitor status, measure quantities, validate against experiment, and visualize results. Minor gaps include lack of job restart/cancel and no handling of wave generation, but these are acknowledged limitations rather than missing essential steps for the stated dam-break use case.