Ventsim

v0.17.0
io.github.agenticeram/ventsim-mcp Checked 1 day ago Published 16 hours ago

Read, check and what-if Ventsim mine ventilation models (.vsm files)

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

model_summary

Summarise a Ventsim .vsm file: title, version, airway/fan counts, total length.

ParameterTypeDescription
path *string

list_airways

List airways. Filter by name/notes text or minimum velocity (m/s); sort by any returned field (e.g. 'Quantity', 'Length', 'Velocity m/s', 'Pressure Branch'). units='imperial' returns cfm, fpm, ft, ft2, in. w.g. and hp (filters stay in SI).

ParameterTypeDescription
path *string
descendingboolean
limitinteger
min_velocity
name_containsstring
sort_bystring
unitsstring

get_airway

Every column of one airway (by 'Unique No'), including heat and gas fields.

ParameterTypeDescription
path *string
unique_no *string

list_fans

Airways that carry a fan, with duty airflow, fan pressure and power.

ParameterTypeDescription
path *string

check_flow_balance

Mass-balance check of simulated airflow at every junction (mass flow expressed as m3/s of standard 1.2 kg/m3 air when the file has it, else volume flow). Only airways of the simulated stage are used. Junctions are found by matching airway end coordinates. Nodes touched by a single airway (portals, dead ends) are skipped. A large imbalance usually means the model needs to be re-simulated, contains recirculation fans, or has disconnected nodes.

ParameterTypeDescription
path *string
limitinteger
tolerancenumber

velocity_check

Find airways whose simulated air velocity (m/s) is above max_velocity or, if min_velocity > 0, below it while still carrying air (e.g. dust/gas settling limits). Airways with zero airflow are ignored.

ParameterTypeDescription
path *string
limitinteger
max_velocitynumber
min_velocitynumber

fan_summary

Totals for all fans: count by model, airflow, total fan power (kW).

ParameterTypeDescription
path *string

fan_duty_check

Where every fan of the simulated stage runs on its curve: airflow per fan, position between the first and last curve point (0..1), margin to the stall peak, static efficiency as saved by Ventsim and a status: ok, near_stall (within 10 % of the peak flow), stall_region (left of the pressure peak), beyond_curve, below_curve, no_flow, fixed_flow (airflow fixed, the curve is not used), off or no_curve. Uses the results saved in the file.

ParameterTypeDescription
path *string
only_problemsboolean

compare_models

Compare two saved versions of a model by Unique No: added/removed airways and those whose airflow (m3/s) or branch pressure (Pa) changed by more than min_change.

ParameterTypeDescription
path_a *string
path_b *string
limitinteger
min_changenumber

what_if

EXPERIMENTAL what-if airflow estimate. Re-solves the network with the stored fan curves and resistances, scaling resistance of given airways (Unique No -> factor, e.g. {"12": 50} for a new door), switching fans off (list of Unique No) and/or changing fan speed (Unique No -> speed in %, e.g. {"6": 90}; affinity laws), and returns the airflow change per airway relative to an unmodified solve of the same model. 'baseline_fit' tells you how well the solver reproduces the flows saved by Ventsim (mean_rel_error = total absolute flow error / total flow). If 'reliable' is false…

ParameterTypeDescription
path *string
compressibleboolean
fan_speed
fans_off
limitinteger
resistance_scale

size_regulator

EXPERIMENTAL. Resistance to add in one airway (a regulator, door or damper) so that it carries target_airflow (m3/s), solved with the what_if network model. Returns the added resistance (Ns2/m8), the pressure it drops, an approximate regulator opening area (McPherson: A_o = A / (1 + 0.759 A sqrt(R_add)), standard air) and the airflow changes elsewhere. A target above the airway's present airflow cannot be reached by a regulator; the result then says so.

ParameterTypeDescription
path *string
target_airflow *number
unique_no *string
limitinteger

trace_airflow

Follow the main airflow path through one airway: upstream to where the air enters the mine and downstream to where it leaves, taking at every junction the airway that carries the most air (saved results, simulated stage). Returns the path in flow order with length, airflow and the frictional pressure drop (Pa) of each airway and in total.

ParameterTypeDescription
path *string
unique_no *string
max_stepsinteger

simulate_airflow

EXPERIMENTAL. Solve the airflow from the model inputs alone, without the results Ventsim saved: airway resistance, fan curves, fan speed and count, fixed-flow and fixed-pressure airways, closed airways, surface connections and dead ends. Works on a model that was never simulated. Optional changes as in what_if. Natural ventilation and heat are not modelled; use_saved_heat=True takes them from the saved results instead. If the file has saved airflow, 'vs_saved' compares the two (error = total absolute airflow difference / total airflow). stage: simulate another stage (se…

ParameterTypeDescription
path *string
compressibleboolean
fan_speed
fans_off
limitinteger
resistance_scale
stage
use_saved_heatboolean

simulate_heat

EXPERIMENTAL. Dry- and wet-bulb air temperature and relative humidity through the network, mixed at junctions. 'rock_temp' (deg C) turns on the rock-heat response: when the airflow or air temperature changes, the rock-to-air heat changes with it (wall conductance from the airway's velocity and the rock's conductivity and age; rock temperature from 'Rock VRT1/2' or this value). Off by default; an unchanged model is unaffected. Heat per airway is what Ventsim saved (rock, diesel, fans, other sources) plus 'extra_heat_kw' ({Unique No: kW}: a new diesel fleet, a fire, a…

ParameterTypeDescription
path *string
airflowstring
extra_heat_kw
extra_latent_kw
fan_speed
fans_off
limitinteger
resistance_scale
rock_temp
surface_temp

heat_stress

EXPERIMENTAL. Heat stress in every airway carrying air: approximate Thermal Work Limit (W/m2) with its zone (unrestricted > 220, acclimatisation 140-220, buffer 115-140, withdrawal < 115; Brake & Bates) and WBGT (0.7 wet bulb + 0.3 dry bulb), from the simulate_heat temperatures and the airway velocity. Same airflow and heat options as simulate_heat. TWL is a steady heat balance in the spirit of Brake & Bates, not their published iterative model.

ParameterTypeDescription
path *string
airflowstring
extra_heat_kw
fan_speed
fans_off
limitinteger
resistance_scale
surface_temp
wbgt_limit

cooling_required

EXPERIMENTAL. Cooling (kW and tons of refrigeration) placed in one airway that brings the wet bulb leaving the target airways down to target_wet_bulb (deg C), solved on the simulate_heat network. Sensible cooling only (no condensation), so the real plant duty is higher; rock heat is not re-balanced.

ParameterTypeDescription
cooler_unique_no *string
path *string
target_unique_nos *array
target_wet_bulb *number
airflowstring
extra_heat_kw
fan_speed
fans_off
resistance_scale
surface_temp

contaminant_spread

EXPERIMENTAL. Steady-state spread of a gas or smoke released in airways: 'sources' = {Unique No: release rate in m3/s of pure gas} (methane make, CO from a fire, averaged blasting fumes...). Fully mixed at junctions, recirculation included. include_file_sources=True also reads the model's own 'Base Injection' (m3/s) x 'Base Concentration' (ppm) inputs (this reading of Ventsim's fields is not verified). Airflow changes as in simulate_heat. Returns the airways above threshold_ppm with their concentration (ppm and %), most contaminated first.

ParameterTypeDescription
path *string
airflowstring
fan_speed
fans_off
include_file_sourcesboolean
limitinteger
resistance_scale
sources
threshold_ppmnumber

render_network

Draw the airways of the simulated stage to an SVG file (opens in any browser). view: 'plan' (X-Y), 'section_x' (X-Z) or 'section_y' (Y-Z). color_by: any numeric airway field, e.g. 'Velocity m/s', 'Quantity', 'Pressure Branch'. Line width follows airflow, fans are circles, airways in 'highlight' (Unique No, e.g. from trace_airflow) are drawn on top in magenta. Hover an airway for its values. Never overwrites a file.

ParameterTypeDescription
out_path *string
path *string
color_bystring
highlight
viewstring
width_pxinteger

export_csv

Write airways to a CSV file. 'columns' may name any column of the .vsm table; by default the common fields are exported.

ParameterTypeDescription
out_path *string
path *string
columns

edit_airways

EXPERIMENTAL. Copy the model to 'out_path' (never overwrites the source) after changing fields. Each edit: {"unique_no": "12", "field": "Notes", "value": "..."}. Allowed fields: Notes, Group, Branch Name (text), Fan Speed (% of curve speed, 1-200, fan airways only), Fan Off (true/false, fan airways only) and the geometry fields Width, Height, Length (m) and kFactor (kg/m3): area, perimeter and resistance are rescaled with them (Atkinson, R ~ k*P*L/A^3). "Closed": true closes an airway (no air, as a sealed stopping; cannot be undone here). "Pathways": number of identical…

ParameterTypeDescription
edits *array
out_path *string
path *string

optimize_fans_tool

EXPERIMENTAL. Search fan speeds (% of saved speed) for the lowest estimated fan power at which the named airways keep their required airflow (min_flow, m3/s; required, or strict=True) and no airway goes outside the velocity limits (min/max m/s, shaft limit). Airways already outside the limits at the saved speeds do not block a speed set unless strict=True. Airflow uses the what_if solver (compressible=True: densities follow absolute pressure, as Ventsim's Compressible Airflows); power comes from the fan curve at the new speed (affinity laws) and the saved efficiency…

ParameterTypeDescription
path *string
compressibleboolean
fans
limits
max_speednumber
min_flow
min_speednumber
stepnumber
strictboolean

model_check

The Ventsim warnings and errors that can be found from the file (Ventsim manual, Appendix E), before opening it in Ventsim: loose ends without surface or closed-end setting (no entry / no exit), duplicate airways (two airways between the same junctions), zero-length airways, running fans or fixed flows whose air has no path (operating fan blocked / fix stopped), fans in series, stoppings in series and conflicting fixed flows on one path. Each item says how to fix it; fix_model applies the automatic fixes to a copy. Not covered (need a simulation): stalled or reversed…

ParameterTypeDescription
path *string
limitinteger

fix_model

Copy the model to 'out_path' with the automatic fixes for what model_check finds: "duplicates" (airways between the same two junctions become one airway with Pathways = their number and the equivalent parallel resistance; not done when one has a fan, fixed flow or stopping), "loose_ends" (ends without air, surface or closed-end setting are marked Closed End, as Ventsim's edit box does), "blocked_fans" (running fans whose air has no path are turned off). Default: all three. Returns what was changed and the model_check counts before and after.

ParameterTypeDescription
out_path *string
path *string
fixes

add_airways

EXPERIMENTAL. Copy the model to 'out_path' with new airways added. Each airway: {"like": "12", "start": [x, y, z], "end": [x, y, z], "name": "new drive", "width": 5.0, "height": 5.0, "open_ends": ["end"]} (name, width, height, open_ends optional). It copies size, shape, friction factor and stage from airway 'like' (not its fan, fixed flow or pressure, heat or gas sources); resistance follows the new length and size. An end within 5 cm of an existing airway end joins the network there (not at a surface connection); an end that joins nothing is a dead end unless listed in…

ParameterTypeDescription
airways *array
out_path *string
path *string

list_stages

Stages (mine plan periods) in the model, their airway counts, and the stage whose results are saved (used by default). Another stage can be solved from its inputs with simulate_airflow(stage=...) and its escape routes checked with escape_routes(stage=...); the other tools use the saved results, which belong to the saved stage.

ParameterTypeDescription
path *string

escape_routes

Walking distance from each airway to the surface and to the nearest refuge (or the surface, if nearer), as Ventsim computes it: shortest path along airways from the middle of the airway; stoppings and other impassable resistances cannot be walked. 'blocked': extra airways to treat as impassable (a fire, a fall). With unique_no, the distances for that airway; otherwise the farthest airways first.

ParameterTypeDescription
path *string
blocked
limitinteger
stage
unique_no

recirculation_check

Closed loops in the airflow: air that comes back to a point it already passed (fan recirculation and other circulating loops). Each group lists its airways, the fans in it and the smallest airflow around the loop. Changes and airflow as in simulate_heat.

ParameterTypeDescription
path *string
airflowstring
fan_speed
fans_off
min_flownumber
resistance_scale

contaminant_arrival

Time for smoke or gas released at the start of the 'sources' airways (Unique Nos) to reach each airway, carried at the mean air velocity (Ventsim's 'Spread Time' rule; no dispersion). Release at t = 1 s as in Ventsim. Returns the reached airways, earliest first, and the number never reached.

ParameterTypeDescription
path *string
sources *array
airflowstring
fan_speed
fans_off
limitinteger
resistance_scale

contaminant_transient

EXPERIMENTAL. Time-dependent gas, smoke or DPM transport on the (steady) airflow. releases = [{"airway": Unique No, "rate_m3s": pure gas m3/s, "start_s": 0, "end_s": t}]; initial_ppm = {Unique No: ppm at t = 0} (a fume cloud). dispersion 0 = plug flow, up to 1 = each airway a stirred tank. Returns peak ppm and its time, first arrival and the last time above threshold_ppm for the monitored airways (default: the 20 worst), with their outlet concentration history. Airflow changes as in simulate_heat.

ParameterTypeDescription
path *string
airflowstring
dispersionnumber
dt_s
duration_snumber
fan_speed
fans_off
initial_ppm
monitor
releases
resistance_scale
threshold_ppmnumber

blast_clearance

EXPERIMENTAL. Re-entry time after blasting: fume_m3 of gas (e.g. CO: explosive kg x fume factor m3/kg) fills the face airways at t = 0 and is carried away by the airflow; returns the time until every airway is below threshold_ppm (default 25 ppm CO) and the worst airways on the way out.

ParameterTypeDescription
face_unique_nos *array
fume_m3 *number
path *string
airflowstring
dispersionnumber
fan_speed
fans_off
max_snumber
resistance_scale
threshold_ppmnumber

heat_airflow_coupled

EXPERIMENTAL. Airflow and heat solved together: a heat change (extra_heat_kw, a fire, cooling as negative kW, or an airflow change) changes the air density and with it the natural ventilation pressure in every inclined airway (g * dz * delta rho); the airflow is re-solved until it settles. Returns the airways whose flow changed most against the frozen-NVP what_if answer, reversed airways and any airways that keep swinging.

ParameterTypeDescription
path *string
extra_heat_kw
fan_speed
fans_off
limitinteger
resistance_scale
surface_temp

fire_scenario

EXPERIMENTAL, simplified fire (not VentFIRE). A steady fire of heat_kw in one airway: the airflow is re-solved with the buoyancy it creates (heat_airflow_coupled), airways that reverse are listed, and CO (co_m3s of pure gas, e.g. heat_kw x yield) and/or smoke is carried in time over the new airflow (contaminant_transient) from t = 0. Returns the airflow change, reversals, the hottest airways and when CO reaches threshold_ppm where. No fire growth, oxygen limit, throttling of hot air or smoke layering.

ParameterTypeDescription
fire_unique_no *string
heat_kw *number
path *string
co_m3snumber
duration_snumber
limitinteger
smoke_m3snumber
threshold_ppmnumber

diesel_exhaust

EXPERIMENTAL, not compared with Ventsim. Diesel particulate (DPM) concentration from the diesel engines in the model ('dieselkw' x load_factor x emission_g_per_kwh, the engine's DPM emission factor in g/kWh, e.g. from its certificate), mixed along the saved airflow; and the airflow against air_per_kw_m3s for each engine.

ParameterTypeDescription
emission_g_per_kwh *number
path *string
air_per_kw_m3snumber
limitinteger
load_factornumber

compliance_check

Airways outside ventilation limits: low and high air velocity (shafts have their own maximum), airflow per kW of diesel, wet-bulb temperature (from simulate_heat's model, as Ventsim saved it, when the file has a heat simulation) and walking distance to a refuge or the surface. The defaults are common practice values, not a particular regulation; pass your own in 'limits': min_velocity_ms, max_velocity_ms, max_velocity_shaft_ms, air_per_diesel_kw_m3s, max_wet_bulb_C, max_escape_distance_m (null switches a check off). Closed and impassable airways are skipped.

ParameterTypeDescription
path *string
check_wet_bulbboolean
limitinteger
limits

fan_select

Pick fans from the fan library stored in the model for a duty: total 'airflow' (m3/s) at 'pressure' (Pa, static or total) with 'fans_in_parallel' units. For each fan: the speed at which it meets the duty (affinity laws), efficiency, power per fan and margin to the stall peak; suitable fans (speed <= max_speed_pct, right of the stall peak) ranked by power.

ParameterTypeDescription
airflow *number
path *string
pressure *number
densitynumber
fans_in_parallelinteger
limitinteger
max_speed_pctnumber
pressure_typestring

energy_report

Fan power (as saved), yearly energy and cost at 'price_per_kwh', and where the air power goes: the airways with the largest frictional pressure drop x airflow, and the part lost in doors, regulators and stoppings.

ParameterTypeDescription
path *string
price_per_kwh *number
hours_per_yearnumber
limitinteger

calibrate_airflow

EXPERIMENTAL. Fit airway resistances to survey measurements: 'measured' = {Unique No: airflow m3/s}; 'adjustable' = airways whose resistance may change (default: the measured ones). Returns the resistance factors, the airflow before and after at the measured airways, and the remaining misfit. Feed the factors to what_if / simulate_airflow as resistance_scale, or write them with edit_airways (kFactor). Measurements that cannot tell airways apart (airways in series) get the smallest change; check 'at_limit'.

ParameterTypeDescription
measured *object
path *string
adjustable
from_inputsboolean
max_factornumber

write_results

EXPERIMENTAL. Copy the model to 'out_path' with this server's results written into it, so Ventsim and the other tools see them: airflow ('Quantity', 'Dry Massflow'), pressures at both ends, the airway pressure drop and the fan pressure, from the what_if solver (airflow='saved', default: the saved state plus the changes given) or from simulate_airflow (airflow='simulated', inputs only, less accurate); with_heat also the dry- and wet-bulb temperatures from simulate_heat. Ventsim stores airflow positive along each airway; an airway whose air now runs backwards is written n…

ParameterTypeDescription
out_path *string
path *string
airflowstring
fan_speed
fans_off
resistance_scale
with_heatboolean

hvac_layout

Read-only. Rooms and doors of a building HVAC model (ROOMS and DOORS sections): each room's plan polygon and the loose duct ends inside it, and each door's size and the two rooms it joins (-1 = outside). HVAC airflow through rooms is not solved (see ROADMAP #32); the field readings are inferred from Ventsim's examples, not documented.

ParameterTypeDescription
path *string

shortest_path

EXPERIMENTAL. Shortest route between two airways over the network (Ventsim's Shortest Path). weight: 'distance' (Length), 'resistance' (Resistance Total) or 'hops'. mode: 'any', 'horizontal' (airways inclined less than max_angle_deg) or 'follow_airflow' (along the airflow only). min_area_m2 leaves out small airways such as vent ducts. Returns the airway Unique Nos in order with total length and resistance.

ParameterTypeDescription
from_unique_no *string
path *string
to_unique_no *string
max_angle_degnumber
min_area_m2number
modestring
weightstring

sensitivity

EXPERIMENTAL. Monte Carlo sensitivity of airflow to airway resistances (Ventsim's Sensitivity, resistance mode): each resistance varied by up to +/- spread_pct, the network re-solved 'runs' times. Gives mean, standard deviation, deviation % and the share of runs within 5 % of the mean, for each target airway (default: all).

ParameterTypeDescription
path *string
runsinteger
spread_pctnumber
targets

heat_sensitivity

EXPERIMENTAL. Monte Carlo sensitivity of temperatures to heat inputs (Ventsim's Sensitivity, heat mode): every airway's heat varied by up to +/- spread_pct, the heat network re-mixed 'runs' times with the airflow held. Mean, deviation and range of the leaving wet and dry bulb for each target airway (default: the 20 hottest).

ParameterTypeDescription
path *string
runsinteger
spread_pctnumber
targets

goal_seek

EXPERIMENTAL. Fan speed (% of curve speed) that gives target_m3s in one airway (Ventsim's Goal Seek, fan speed mode), by bisection. The model is not changed: apply the result with edit_airways (Fan Speed) and confirm in Ventsim.

ParameterTypeDescription
fan_unique_no *string
path *string
target_m3s *number
target_unique_no *string
speed_maxnumber
speed_minnumber

radon_steady

EXPERIMENTAL. Steady-state radon (Bq/m3 and pCi/l) in every airway from surface exhalation (Bq/s/m2 per airway, over its wall area) and point sources (Bq/s per airway), carried by the airflow. Progeny and dose are not modelled.

ParameterTypeDescription
path *string
point_bq_s
surface_bq_s_m2

fan_upgrade_npv

Experimental. Net present value and simple payback of changing a fan from power_now_kw to power_new_kw (energy saving at price_per_kwh over life_years, discounted, minus capex). A generic calculator, not Ventsim's costing model.

ParameterTypeDescription
capex *number
hours_per_year *number
life_years *integer
power_new_kw *number
power_now_kw *number
price_per_kwh *number
discount_ratenumber

goal_seek_regulator

EXPERIMENTAL. Resistance factor on one airway (regulator, door, damper) that gives target_m3s, target_velocity (m/s) or target_pressure_pa (pressure drop across the target airway, which may be the regulator itself) (Ventsim's Goal Seek, resistance mode), by bisection with the what_if solver. The model is not changed.

ParameterTypeDescription
path *string
regulator_unique_no *string
target_unique_no *string
factor_maxnumber
factor_minnumber
target_m3s
target_pressure_pa
target_velocity

compare_survey

EXPERIMENTAL. Compare survey readings with the airflow saved in the model. 'measured' = {Unique No: airflow m3/s}, or {"v:<Unique No>": velocity m/s}; or a CSV (VentLOG export, spreadsheet) with an airway column (Unique No / uid / airway) and an airflow (Quantity / airflow / q) or velocity (velocity / v) column. Flags readings off by more than tolerance_pct (or min_airflow m3/s) and reversed directions; feed the same readings to calibrate_airflow to fit resistances.

ParameterTypeDescription
path *string
csv_path
measured
min_airflownumber
tolerance_pctnumber

airway_size_economics

Experimental. Economic airway size: excavation cost against discounted fan energy cost for each width given (rectangular, height = width * height_ratio, Atkinson friction). Returns the table and the cheapest size. Not Ventsim's costing model.

ParameterTypeDescription
airflow_m3s *number
length_m *number
widths_m *array
discount_ratenumber
excavation_cost_per_m3number
fan_efficiency_pctnumber
height_rationumber
hours_per_yearnumber
k_factornumber
life_yearsinteger
price_per_kwhnumber

duct_leakage

Experimental. Auxiliary (forcing or exhausting) duct with leakage along its length: give the airflow needed at the face to get the fan airflow, pressure and power, or the fan airflow to get what reaches the face. Leakage is the airflow lost through 100 m of duct at 1 kPa; friction by Atkinson with k_factor. Returns a profile along the duct.

ParameterTypeDescription
diameter_m *number
leakage_m3s_per_100m_at_1kpa *number
length_m *number
face_airflow_m3s
fan_airflow_m3s
fan_efficiency_pctnumber
k_factornumber

import_dxf

EXPERIMENTAL. Add airways to a copy of the model from a DXF drawing: every LINE and every LWPOLYLINE/POLYLINE segment (optionally only on 'layers') becomes an airway with the size, shape and friction of airway 'like_unique_no' (or width/height). Ends within 5 cm join existing airway ends, as in add_airways. Coordinates are taken as metres in the model's own system. Needs the optional ezdxf package.

ParameterTypeDescription
dxf_path *string
like_unique_no *string
out_path *string
path *string
height
layers
namestring
width

export_dxf

Experimental. Write the airways of the simulated stage to a DXF file (one LINE per airway, end 1 to end 2, in metres) for AutoCAD or other CAD. Needs the optional ezdxf package. Never overwrites the source model.

ParameterTypeDescription
out_path *string
path *string