ventpy 0.1.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ventpy-0.2.1/.github/ISSUE_TEMPLATE/norma-pais.md +35 -0
- ventpy-0.2.1/.github/ISSUE_TEMPLATE/numero-incorrecto.md +26 -0
- ventpy-0.2.1/.github/workflows/tests.yml +120 -0
- {ventpy-0.1.0 → ventpy-0.2.1}/.gitignore +6 -0
- ventpy-0.2.1/CHANGELOG.md +122 -0
- {ventpy-0.1.0 → ventpy-0.2.1}/CMakeLists.txt +11 -1
- ventpy-0.2.1/CONTRIBUTING.md +107 -0
- ventpy-0.2.1/PKG-INFO +228 -0
- ventpy-0.2.1/README.es.md +201 -0
- ventpy-0.2.1/README.md +201 -0
- ventpy-0.2.1/ROADMAP.md +65 -0
- ventpy-0.2.1/bindings/bindings.cpp +1480 -0
- ventpy-0.2.1/examples/01-demanda-peru/README.md +91 -0
- ventpy-0.2.1/examples/01-demanda-peru/input.json +20 -0
- ventpy-0.2.1/examples/01-demanda-peru/run.py +87 -0
- ventpy-0.2.1/examples/02-preset-chile/README.md +63 -0
- ventpy-0.2.1/examples/02-preset-chile/input.json +12 -0
- ventpy-0.2.1/examples/02-preset-chile/run.py +60 -0
- ventpy-0.2.1/examples/03-cobertura-levantamiento/README.md +70 -0
- ventpy-0.2.1/examples/03-cobertura-levantamiento/input.json +26 -0
- ventpy-0.2.1/examples/03-cobertura-levantamiento/run.py +75 -0
- ventpy-0.2.1/examples/04-red-ventilador/README.md +76 -0
- ventpy-0.2.1/examples/04-red-ventilador/input.json +23 -0
- ventpy-0.2.1/examples/04-red-ventilador/run.py +80 -0
- ventpy-0.2.1/examples/05-ducto-seleccion/README.md +62 -0
- ventpy-0.2.1/examples/05-ducto-seleccion/run.py +79 -0
- ventpy-0.2.1/include/ventpy/atkinson.hpp +222 -0
- {ventpy-0.1.0 → ventpy-0.2.1}/include/ventpy/caudal_equipo.hpp +10 -4
- {ventpy-0.1.0 → ventpy-0.2.1}/include/ventpy/caudal_explosivos.hpp +21 -6
- {ventpy-0.1.0 → ventpy-0.2.1}/include/ventpy/caudal_personal.hpp +36 -13
- ventpy-0.2.1/include/ventpy/caudal_polvo.hpp +103 -0
- ventpy-0.2.1/include/ventpy/caudal_termico.hpp +217 -0
- ventpy-0.2.1/include/ventpy/cobertura.hpp +289 -0
- ventpy-0.2.1/include/ventpy/ducto.hpp +165 -0
- {ventpy-0.1.0 → ventpy-0.2.1}/include/ventpy/governor.hpp +29 -0
- ventpy-0.2.1/include/ventpy/limites_gases.hpp +130 -0
- ventpy-0.2.1/include/ventpy/normativa.hpp +409 -0
- ventpy-0.2.1/include/ventpy/red.hpp +336 -0
- {ventpy-0.1.0 → ventpy-0.2.1}/include/ventpy/types.hpp +371 -24
- {ventpy-0.1.0 → ventpy-0.2.1}/include/ventpy/validation.hpp +31 -3
- ventpy-0.2.1/include/ventpy/ventilador.hpp +316 -0
- {ventpy-0.1.0 → ventpy-0.2.1}/pyproject.toml +16 -7
- {ventpy-0.1.0 → ventpy-0.2.1}/python/ventpy/__init__.py +128 -18
- ventpy-0.2.1/python/ventpy/cli.py +857 -0
- ventpy-0.2.1/tests/cpp/test_atkinson.cpp +218 -0
- {ventpy-0.1.0 → ventpy-0.2.1}/tests/cpp/test_caudal_equipo.cpp +7 -6
- {ventpy-0.1.0 → ventpy-0.2.1}/tests/cpp/test_caudal_explosivos.cpp +30 -16
- {ventpy-0.1.0 → ventpy-0.2.1}/tests/cpp/test_caudal_fugas.cpp +6 -6
- {ventpy-0.1.0 → ventpy-0.2.1}/tests/cpp/test_caudal_personal.cpp +37 -23
- ventpy-0.2.1/tests/cpp/test_caudal_polvo.cpp +120 -0
- ventpy-0.2.1/tests/cpp/test_caudal_termico.cpp +275 -0
- ventpy-0.2.1/tests/cpp/test_citas_normativas.cpp +460 -0
- ventpy-0.2.1/tests/cpp/test_cobertura.cpp +482 -0
- ventpy-0.2.1/tests/cpp/test_ducto.cpp +158 -0
- ventpy-0.2.1/tests/cpp/test_governor.cpp +379 -0
- ventpy-0.2.1/tests/cpp/test_limites_gases.cpp +151 -0
- ventpy-0.2.1/tests/cpp/test_normativa.cpp +161 -0
- ventpy-0.2.1/tests/cpp/test_red.cpp +261 -0
- {ventpy-0.1.0 → ventpy-0.2.1}/tests/cpp/test_validation.cpp +29 -0
- ventpy-0.2.1/tests/cpp/test_ventilador.cpp +288 -0
- ventpy-0.2.1/tests/python/test_citas_normativas.py +284 -0
- ventpy-0.2.1/tests/python/test_cli.py +498 -0
- ventpy-0.2.1/tests/python/test_cobertura.py +185 -0
- ventpy-0.2.1/tests/python/test_escala.py +156 -0
- ventpy-0.2.1/tests/python/test_examples.py +106 -0
- ventpy-0.2.1/tests/python/test_multinorma.py +42 -0
- ventpy-0.2.1/tests/python/test_polvo_termico.py +141 -0
- ventpy-0.2.1/tests/python/test_properties.py +327 -0
- ventpy-0.2.1/tests/python/test_red_ventilacion.py +367 -0
- {ventpy-0.1.0 → ventpy-0.2.1}/tests/python/test_ventpy.py +6 -4
- ventpy-0.1.0/PKG-INFO +0 -259
- ventpy-0.1.0/README.es.md +0 -234
- ventpy-0.1.0/README.md +0 -234
- ventpy-0.1.0/bindings/bindings.cpp +0 -658
- ventpy-0.1.0/include/ventpy/normativa.hpp +0 -136
- ventpy-0.1.0/tests/cpp/test_governor.cpp +0 -171
- {ventpy-0.1.0 → ventpy-0.2.1}/.github/workflows/release.yml +0 -0
- {ventpy-0.1.0 → ventpy-0.2.1}/LICENSE +0 -0
- {ventpy-0.1.0 → ventpy-0.2.1}/include/ventpy/atmosphere.hpp +0 -0
- {ventpy-0.1.0 → ventpy-0.2.1}/include/ventpy/caudal_fugas.hpp +0 -0
- {ventpy-0.1.0 → ventpy-0.2.1}/python/ventpy/visualization.py +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "🌎 Agregar la norma de un país"
|
|
3
|
+
about: "Aporta los valores normativos de ventilación de tu país (no necesitas programar)"
|
|
4
|
+
title: "[Norma] Agregar <PAÍS> — <NORMA>"
|
|
5
|
+
labels: ["norma", "buena primera tarea", "help wanted"]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## País y norma
|
|
9
|
+
|
|
10
|
+
- **País:**
|
|
11
|
+
- **Norma / reglamento:** (ej. Chile · DS 132, Reglamento de Seguridad Minera)
|
|
12
|
+
- **Enlace oficial:**
|
|
13
|
+
|
|
14
|
+
## Valores normativos
|
|
15
|
+
|
|
16
|
+
> Pon el que sepas y deja el resto en blanco. **Un aporte parcial también sirve.**
|
|
17
|
+
> Lo importante es la **cita del artículo** de cada valor.
|
|
18
|
+
|
|
19
|
+
| Parámetro | Valor | Unidad | Artículo |
|
|
20
|
+
|---|---|---|---|
|
|
21
|
+
| Caudal mínimo por persona | | m³/min | |
|
|
22
|
+
| Factor por equipo diésel | | m³/min por HP (o kW) | |
|
|
23
|
+
| Dilución post-voladura (tiempo) | | min | |
|
|
24
|
+
| Velocidad mínima del aire | | m/s | |
|
|
25
|
+
| Velocidad máxima del aire | | m/s | |
|
|
26
|
+
| Factor de fugas | | % | |
|
|
27
|
+
|
|
28
|
+
## ¿Algo distinto en tu país?
|
|
29
|
+
|
|
30
|
+
¿Hay algún requisito que la norma peruana no tiene (altitud, temperatura, gases específicos)?
|
|
31
|
+
|
|
32
|
+
## ¿Puedes probarlo?
|
|
33
|
+
|
|
34
|
+
- [ ] Tengo un caso real de mi país para usarlo como test
|
|
35
|
+
- [ ] Solo aporto los valores; que alguien más lo implemente
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "🔢 Un resultado no calza con mi experiencia"
|
|
3
|
+
about: "Reporta un cálculo que no coincide con la práctica en campo"
|
|
4
|
+
title: "[Cálculo] <qué calculaste> da <X>, esperaba <Y>"
|
|
5
|
+
labels: ["bug", "necesita verificación"]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Qué calculaste
|
|
9
|
+
|
|
10
|
+
```python
|
|
11
|
+
# pega aquí tu código
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Qué salió vs. qué esperabas
|
|
15
|
+
|
|
16
|
+
- **VentPy devolvió:**
|
|
17
|
+
- **Esperaba:** (y por qué — norma, experiencia de campo, otro software)
|
|
18
|
+
|
|
19
|
+
## Contexto de la operación
|
|
20
|
+
|
|
21
|
+
- Tipo: superficial / subterránea
|
|
22
|
+
- País y norma aplicable:
|
|
23
|
+
- Datos relevantes (personal, equipos diésel, sección de labor, etc.):
|
|
24
|
+
|
|
25
|
+
> Aunque no estés seguro, repórtalo. Un número mal calculado en ventilación es un tema de
|
|
26
|
+
> **seguridad**: preferimos revisar de más.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
# Suite C++ en las tres plataformas y en ambas configuraciones. Debug y
|
|
15
|
+
# Release se ejecutan por separado porque la optimizacion puede alterar el
|
|
16
|
+
# comportamiento en coma flotante, y varias pruebas verifican fronteras
|
|
17
|
+
# normativas exactas.
|
|
18
|
+
cpp:
|
|
19
|
+
name: C++ ${{ matrix.os }} / ${{ matrix.build_type }}
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
strategy:
|
|
22
|
+
fail-fast: false
|
|
23
|
+
matrix:
|
|
24
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
25
|
+
build_type: [Debug, Release]
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v4
|
|
28
|
+
- name: Configurar
|
|
29
|
+
run: cmake -S . -B build -DVENTPY_BUILD_TESTS=ON -DVENTPY_BUILD_PYTHON=OFF -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
|
30
|
+
- name: Compilar
|
|
31
|
+
run: cmake --build build --config ${{ matrix.build_type }} --parallel
|
|
32
|
+
- name: Ejecutar pruebas
|
|
33
|
+
run: ctest --test-dir build -C ${{ matrix.build_type }} --output-on-failure
|
|
34
|
+
|
|
35
|
+
# AddressSanitizer y UndefinedBehaviorSanitizer. El compilador de Windows no
|
|
36
|
+
# ofrece UBSan, de modo que este trabajo es el unico lugar donde se detecta
|
|
37
|
+
# comportamiento indefinido (lecturas sin inicializar, desbordes, division
|
|
38
|
+
# entre cero, conversiones invalidas).
|
|
39
|
+
sanitizers:
|
|
40
|
+
name: Sanitizers (ASan + UBSan)
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v4
|
|
44
|
+
- name: Configurar con sanitizers
|
|
45
|
+
env:
|
|
46
|
+
FLAGS: -fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize-recover=undefined -g -O1
|
|
47
|
+
run: |
|
|
48
|
+
cmake -S . -B build-san \
|
|
49
|
+
-DVENTPY_BUILD_TESTS=ON -DVENTPY_BUILD_PYTHON=OFF \
|
|
50
|
+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
51
|
+
-DCMAKE_CXX_FLAGS="$FLAGS" -DCMAKE_EXE_LINKER_FLAGS="$FLAGS"
|
|
52
|
+
- name: Compilar
|
|
53
|
+
run: cmake --build build-san --parallel
|
|
54
|
+
- name: Ejecutar pruebas bajo sanitizers
|
|
55
|
+
env:
|
|
56
|
+
ASAN_OPTIONS: detect_leaks=1:abort_on_error=1:strict_string_checks=1
|
|
57
|
+
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
|
|
58
|
+
run: ctest --test-dir build-san --output-on-failure
|
|
59
|
+
|
|
60
|
+
# Cobertura de lineas y ramas del nucleo. El umbral evita que la cobertura
|
|
61
|
+
# caiga sin que nadie lo note; se mide solo include/ventpy (la libreria),
|
|
62
|
+
# excluyendo pruebas y dependencias externas.
|
|
63
|
+
coverage:
|
|
64
|
+
name: Cobertura
|
|
65
|
+
runs-on: ubuntu-latest
|
|
66
|
+
steps:
|
|
67
|
+
- uses: actions/checkout@v4
|
|
68
|
+
- name: Instalar lcov
|
|
69
|
+
run: sudo apt-get update && sudo apt-get install -y lcov
|
|
70
|
+
- name: Configurar con instrumentacion
|
|
71
|
+
run: |
|
|
72
|
+
cmake -S . -B build-cov \
|
|
73
|
+
-DVENTPY_BUILD_TESTS=ON -DVENTPY_BUILD_PYTHON=OFF \
|
|
74
|
+
-DCMAKE_BUILD_TYPE=Debug \
|
|
75
|
+
-DCMAKE_CXX_FLAGS="--coverage -O0 -g" \
|
|
76
|
+
-DCMAKE_EXE_LINKER_FLAGS="--coverage"
|
|
77
|
+
- name: Compilar y ejecutar
|
|
78
|
+
run: |
|
|
79
|
+
cmake --build build-cov --parallel
|
|
80
|
+
ctest --test-dir build-cov --output-on-failure
|
|
81
|
+
- name: Medir y comprobar umbral
|
|
82
|
+
run: |
|
|
83
|
+
lcov --capture --directory build-cov --output-file cov.info \
|
|
84
|
+
--rc branch_coverage=1 --ignore-errors mismatch,gcov,source
|
|
85
|
+
lcov --extract cov.info "*/include/ventpy/*" --output-file cov-core.info \
|
|
86
|
+
--rc branch_coverage=1 --ignore-errors unused
|
|
87
|
+
lcov --list cov-core.info --rc branch_coverage=1
|
|
88
|
+
LINES=$(lcov --summary cov-core.info --rc branch_coverage=1 2>&1 | grep -oP 'lines\.+: \K[0-9.]+')
|
|
89
|
+
echo "Cobertura de lineas del nucleo: $LINES %"
|
|
90
|
+
awk -v v="$LINES" 'BEGIN { if (v+0 < 85.0) { print "Por debajo del umbral (85%)"; exit 1 } }'
|
|
91
|
+
- uses: actions/upload-artifact@v4
|
|
92
|
+
if: always()
|
|
93
|
+
with:
|
|
94
|
+
name: cobertura
|
|
95
|
+
path: cov-core.info
|
|
96
|
+
|
|
97
|
+
# Suite Python contra la extension compilada, en las tres plataformas.
|
|
98
|
+
# Incluye las pruebas basadas en propiedades, que generan sus propios casos.
|
|
99
|
+
python:
|
|
100
|
+
name: Python ${{ matrix.os }}
|
|
101
|
+
runs-on: ${{ matrix.os }}
|
|
102
|
+
strategy:
|
|
103
|
+
fail-fast: false
|
|
104
|
+
matrix:
|
|
105
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
106
|
+
steps:
|
|
107
|
+
- uses: actions/checkout@v4
|
|
108
|
+
- uses: actions/setup-python@v5
|
|
109
|
+
with:
|
|
110
|
+
python-version: "3.12"
|
|
111
|
+
- name: Instalar el paquete con sus extras de prueba
|
|
112
|
+
run: python -m pip install --upgrade pip && python -m pip install ".[test]"
|
|
113
|
+
- name: Ejecutar la suite
|
|
114
|
+
run: python -m pytest tests/python -q
|
|
115
|
+
- name: Ejecutar las pruebas de escala
|
|
116
|
+
run: python -m pytest tests/python -q -m slow
|
|
117
|
+
- name: Comprobar la interfaz de linea de comandos
|
|
118
|
+
run: |
|
|
119
|
+
ventpy --help
|
|
120
|
+
ventpy lmp --norma peru
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Build artifacts
|
|
2
2
|
build/
|
|
3
|
+
build-tests/
|
|
4
|
+
build-release/
|
|
3
5
|
_build/
|
|
4
6
|
dist/
|
|
5
7
|
wheelhouse/
|
|
@@ -37,6 +39,10 @@ CLAUDE.md
|
|
|
37
39
|
docs/
|
|
38
40
|
AGENT_NOTES.md
|
|
39
41
|
|
|
42
|
+
# Local agent tooling state (not part of the published package)
|
|
43
|
+
.claude/
|
|
44
|
+
.superpowers/
|
|
45
|
+
|
|
40
46
|
# OS files
|
|
41
47
|
.DS_Store
|
|
42
48
|
Thumbs.db
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Registro de cambios
|
|
2
|
+
|
|
3
|
+
Todas las versiones publicadas de VentPy. El formato sigue
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/es-ES/1.1.0/) y el versionado es
|
|
5
|
+
[semántico](https://semver.org/lang/es/).
|
|
6
|
+
|
|
7
|
+
## [0.2.1] — 2026-08-20
|
|
8
|
+
|
|
9
|
+
### La cita normativa sigue a la norma configurada
|
|
10
|
+
|
|
11
|
+
Hasta 0.2.0 la referencia legal de cada resultado estaba escrita como literal
|
|
12
|
+
peruano dentro de cada calculador y no consultaba la norma de la
|
|
13
|
+
configuración. Con `RegulatoryConfig.chile()` los caudales eran correctos,
|
|
14
|
+
pero la cita que los acompañaba era el DS 024-2016-EM peruano.
|
|
15
|
+
|
|
16
|
+
**A quién afecta:** a quien haya emitido informes con el preajuste chileno. Los
|
|
17
|
+
números no cambian —ni uno solo—; lo que cambia es el respaldo legal impreso
|
|
18
|
+
junto a ellos. Conviene reemitir esos informes: citaban el reglamento peruano
|
|
19
|
+
en una faena chilena.
|
|
20
|
+
|
|
21
|
+
| Resultado | Perú (DS 024) | Chile (DS 132) |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| Caudal por persona | Art. 236, con la escala por altitud del Art. 247 | **Art. 138**, sin escala por altitud |
|
|
24
|
+
| Caudal por HP diésel | Art. 246 | **Art. 132** |
|
|
25
|
+
| Dilución tras voladura | Art. 243-244 | **Arts. 156, 571 y 585** (reingreso). El DS 132 no fija tiempo de dilución ni volumen de gases por kg: son criterio de ingeniería, y la cita lo dice |
|
|
26
|
+
| Polvo respirable | Art. 111 | Sin límite verificado: la cita declara el vacío y atribuye la concentración objetivo a criterio de ingeniería |
|
|
27
|
+
| Carga térmica | Art. 252 lit. d | Sin criterio verificado: el piso de 30 m/min se mantiene —el caudal es el mismo— pero la cita lo declara criterio de ingeniería |
|
|
28
|
+
| Cobertura y velocidad del aire | Art. 252 lit. f/g y Art. 248 | Sin régimen ni límites verificados: la cita declara el vacío y remite a los umbrales configurados |
|
|
29
|
+
|
|
30
|
+
Donde el DS 132 no regula un concepto, la cita lo dice explícitamente en vez de
|
|
31
|
+
trasladar el artículo peruano. Ningún artículo chileno se cita sin verificar
|
|
32
|
+
contra el texto vigente (LeyChile idNorma=221064, versión 09-abr-2024).
|
|
33
|
+
|
|
34
|
+
### Cambios
|
|
35
|
+
|
|
36
|
+
- Nueva función `regulation_reference(topic, config)` en `normativa.hpp`: único
|
|
37
|
+
lugar del núcleo donde vive el texto de una cita. Cada calculador la consulta
|
|
38
|
+
en lugar de llevar su propio literal.
|
|
39
|
+
- `CoverageCalculator.compare_zone` acepta un cuarto argumento `config` que fija
|
|
40
|
+
la norma de la cita. Su valor por defecto es el preajuste peruano, igual que
|
|
41
|
+
el constructor por defecto de `RegulatoryConfig`; el código existente no
|
|
42
|
+
cambia de comportamiento. `analyze_survey` propaga la configuración que ya
|
|
43
|
+
recibía.
|
|
44
|
+
- Las advertencias de sílice, de concentración de polvo sobre el umbral, de
|
|
45
|
+
estrés térmico y de velocidad fuera de rango también siguen la norma activa.
|
|
46
|
+
|
|
47
|
+
### Versiones
|
|
48
|
+
|
|
49
|
+
- `CMakeLists.txt` declaraba 0.1.0 mientras `pyproject.toml` y el paquete
|
|
50
|
+
Python declaraban 0.2.0. Las tres quedan en 0.2.1.
|
|
51
|
+
|
|
52
|
+
## [0.2.0] — 2026-08-20
|
|
53
|
+
|
|
54
|
+
### ⚠️ Los resultados cambian respecto de 0.1.0
|
|
55
|
+
|
|
56
|
+
Esta versión corrige tres citas normativas del núcleo. **Un cálculo hecho con
|
|
57
|
+
0.1.0 puede quedar por debajo del mínimo legal**, así que conviene rehacer los
|
|
58
|
+
que se hayan emitido con esa versión.
|
|
59
|
+
|
|
60
|
+
| Corrección | 0.1.0 | 0.2.0 |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| Escala de caudal por persona (DS 024-2016-EM, **Art. 247**) | 3/4/5 m³/min con umbrales de 3.000 y 4.000 msnm | **3/4/5/6** m³/min con umbrales de **1.500, 3.000 y 4.000** msnm, que es el texto vigente del artículo |
|
|
63
|
+
| Polvo respirable | citado como "Art. 103-107" | **Art. 111**: límite de 3 mg/m³ para jornada de 8 h, con paralización de la labor si se supera |
|
|
64
|
+
| Temperatura efectiva máxima | citada como "Art. 240: 30 °C" | No existe en la norma vigente (proviene del derogado DS 055-2010-EM). El criterio normativo real es el **Art. 252 lit. d** (velocidad mínima de 30 m/min con temperatura seca entre 24 y 29 °C) y la remisión del **Art. 104 / Anexo 13** para estrés térmico |
|
|
65
|
+
|
|
66
|
+
El efecto práctico de la primera corrección: toda mina por encima de 1.500 msnm
|
|
67
|
+
exige más aire por persona del que 0.1.0 calculaba.
|
|
68
|
+
|
|
69
|
+
### Cambio incompatible
|
|
70
|
+
|
|
71
|
+
- El constructor de `RegulatoryConfig` pasa de 10 a 12 parámetros por el tercer
|
|
72
|
+
umbral de altitud del Art. 247. Quien use los preajustes
|
|
73
|
+
(`RegulatoryConfig.peru()`, `.chile()`, `.for_standard()`) no necesita
|
|
74
|
+
cambiar nada; solo afecta a quien construya la configuración parámetro a
|
|
75
|
+
parámetro.
|
|
76
|
+
|
|
77
|
+
### Nuevas capacidades
|
|
78
|
+
|
|
79
|
+
- **Multi-norma.** Preajustes por país mediante `peru()`, `chile()` y
|
|
80
|
+
`for_standard()`. El preajuste chileno implementa el DS 132 (Art. 138:
|
|
81
|
+
3 m³/min por persona sin escalón por altitud; Art. 132: 2,83 m³/min por HP
|
|
82
|
+
efectivo al freno).
|
|
83
|
+
- **Límites máximos permisibles de gases** consultables por norma
|
|
84
|
+
(`gas_limits`, `lmp_for`): Perú (DS 024, Anexo 15) y Chile (DS 594 / DS 132),
|
|
85
|
+
con la cita de cada valor. Un gas no regulado por la norma lanza una
|
|
86
|
+
excepción en vez de devolver un valor por omisión.
|
|
87
|
+
- **Cobertura y déficit de ventilación** (Art. 252, literales f y g): compara
|
|
88
|
+
el caudal medido en campo, directo o por estaciones de aforo, contra el
|
|
89
|
+
requerido, por labor y para la mina completa, con verificación de la
|
|
90
|
+
velocidad del aire del Art. 248.
|
|
91
|
+
- **Red de ventilación**: resistencias de Atkinson con corrección por densidad
|
|
92
|
+
y pérdidas por choque, dimensionamiento de ducto con criterio técnico y
|
|
93
|
+
económico, balance de red por el método de Hardy Cross con detección
|
|
94
|
+
automática de mallas, y curva de ventilador con punto de operación y margen
|
|
95
|
+
de entrada en pérdida.
|
|
96
|
+
- **Polvo respirable y carga térmica** integrados al cálculo consolidado.
|
|
97
|
+
- **Interfaz de línea de comandos** `ventpy` con cinco subcomandos sobre
|
|
98
|
+
archivos JSON y códigos de salida pensados para automatización: 0 correcto,
|
|
99
|
+
1 error de entrada y 2 resultado no confiable.
|
|
100
|
+
- **Ejemplos resueltos** en `examples/`, cada uno con su comando, la salida
|
|
101
|
+
esperada y el artículo que lo sustenta.
|
|
102
|
+
|
|
103
|
+
### Correcciones
|
|
104
|
+
|
|
105
|
+
- El solver de red rechaza resistencias no finitas. Un valor infinito se
|
|
106
|
+
aceptaba y el balance devolvía caudales inválidos marcados como convergidos.
|
|
107
|
+
- Las funciones de validación rechazan NaN e infinito en todos sus parámetros.
|
|
108
|
+
- El cálculo simplificado de gases de voladura recupera la advertencia por
|
|
109
|
+
exceder el tiempo máximo de dilución del Art. 243.
|
|
110
|
+
|
|
111
|
+
### Interno
|
|
112
|
+
|
|
113
|
+
- La suite pasó de 55 a 197 pruebas en C++ y 151 en Python, incluidas pruebas
|
|
114
|
+
basadas en propiedades y de escala hasta 500 ramales.
|
|
115
|
+
- Integración continua en Linux, macOS y Windows, con analizadores dinámicos
|
|
116
|
+
de memoria y comportamiento indefinido, y medición de cobertura.
|
|
117
|
+
|
|
118
|
+
## [0.1.0] — 2026-08-16
|
|
119
|
+
|
|
120
|
+
- Primera versión publicada: cálculo de demanda de ventilación según
|
|
121
|
+
DS 024-2016-EM (personal, equipos diésel, explosivos y fugas), correcciones
|
|
122
|
+
atmosféricas por altitud y visualización opcional.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
cmake_minimum_required(VERSION 3.20)
|
|
2
2
|
project(ventpy
|
|
3
|
-
VERSION 0.1
|
|
3
|
+
VERSION 0.2.1
|
|
4
4
|
DESCRIPTION "High-performance mine ventilation calculation library"
|
|
5
5
|
LANGUAGES CXX
|
|
6
6
|
)
|
|
@@ -94,7 +94,17 @@ if(VENTPY_BUILD_TESTS)
|
|
|
94
94
|
tests/cpp/test_caudal_equipo.cpp
|
|
95
95
|
tests/cpp/test_caudal_explosivos.cpp
|
|
96
96
|
tests/cpp/test_caudal_fugas.cpp
|
|
97
|
+
tests/cpp/test_caudal_polvo.cpp
|
|
98
|
+
tests/cpp/test_caudal_termico.cpp
|
|
97
99
|
tests/cpp/test_governor.cpp
|
|
100
|
+
tests/cpp/test_normativa.cpp
|
|
101
|
+
tests/cpp/test_citas_normativas.cpp
|
|
102
|
+
tests/cpp/test_limites_gases.cpp
|
|
103
|
+
tests/cpp/test_cobertura.cpp
|
|
104
|
+
tests/cpp/test_atkinson.cpp
|
|
105
|
+
tests/cpp/test_ducto.cpp
|
|
106
|
+
tests/cpp/test_red.cpp
|
|
107
|
+
tests/cpp/test_ventilador.cpp
|
|
98
108
|
)
|
|
99
109
|
target_link_libraries(ventpy_tests PRIVATE
|
|
100
110
|
ventpy_core
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Contributing to VentPy · Cómo contribuir a VentPy
|
|
2
|
+
|
|
3
|
+
VentPy is an open-source library for **mine ventilation calculations**. It started with the
|
|
4
|
+
Peruvian standard (DS 024-2016-EM) and is growing toward **multi-standard support across Latin
|
|
5
|
+
America**: Chile, Colombia and Mexico.
|
|
6
|
+
|
|
7
|
+
> 🇪🇸 **Este documento está en inglés y español.** Baja para la versión en español.
|
|
8
|
+
> **No necesitas ser programador experto.** Si eres ingeniero de minas y conoces la norma de tu
|
|
9
|
+
> país, ya tienes lo más difícil: el conocimiento del dominio.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## English
|
|
14
|
+
|
|
15
|
+
### Ways to contribute
|
|
16
|
+
|
|
17
|
+
You do **not** need to write C++ to help. In order of how much we need it:
|
|
18
|
+
|
|
19
|
+
1. **Add a national standard.** You know your country's ventilation regulation? That's the
|
|
20
|
+
contribution we need most. See `ROADMAP.md` for the open standards.
|
|
21
|
+
2. **Worked examples.** A real (anonymised) ventilation case with its numbers, as a test.
|
|
22
|
+
3. **Documentation.** Fix an unclear paragraph, translate, add a diagram.
|
|
23
|
+
4. **Report a wrong number.** If a result doesn't match your field experience, open an issue.
|
|
24
|
+
A bug report with the expected value is a genuine contribution.
|
|
25
|
+
5. **Code.** Python API, plots, CLI, performance.
|
|
26
|
+
|
|
27
|
+
### First contribution, step by step
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# 1. Fork the repo on GitHub, then:
|
|
31
|
+
git clone https://github.com/YOUR-USER/VentPy.git
|
|
32
|
+
cd VentPy
|
|
33
|
+
|
|
34
|
+
# 2. Install in editable mode with test extras
|
|
35
|
+
pip install -e ".[test,viz]"
|
|
36
|
+
|
|
37
|
+
# 3. Run the tests (should be green before you change anything)
|
|
38
|
+
pytest tests/python -q
|
|
39
|
+
|
|
40
|
+
# 4. Create a branch, make your change, run tests again
|
|
41
|
+
git checkout -b add-chile-standard
|
|
42
|
+
pytest tests/python -q
|
|
43
|
+
|
|
44
|
+
# 5. Commit and open a Pull Request
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Ground rules
|
|
48
|
+
|
|
49
|
+
- **Cite the regulation.** Any constant must reference its article: `DS 024-2016-EM, Art. 247`.
|
|
50
|
+
Numbers without a source will not be merged — this library is used for **safety** decisions.
|
|
51
|
+
- **Add a test** for every new behaviour. If you're unsure how, open the PR anyway and ask.
|
|
52
|
+
- **Be conservative in the docs.** Never claim more precision than the method actually has.
|
|
53
|
+
- Small PRs are better than big ones. One standard, one PR.
|
|
54
|
+
|
|
55
|
+
### Questions?
|
|
56
|
+
|
|
57
|
+
Open an issue with the `question` label. There are no stupid questions — if something wasn't
|
|
58
|
+
clear to you, it wasn't clear enough.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Español
|
|
63
|
+
|
|
64
|
+
### Formas de contribuir
|
|
65
|
+
|
|
66
|
+
**No necesitas escribir C++.** En orden de lo que más falta:
|
|
67
|
+
|
|
68
|
+
1. **Agregar la norma de tu país.** ¿Conoces el reglamento de ventilación de Chile, Colombia o
|
|
69
|
+
México? Esa es la contribución que más necesitamos. Mira `ROADMAP.md`.
|
|
70
|
+
2. **Casos resueltos.** Un caso real de ventilación (anonimizado) con sus números, como test.
|
|
71
|
+
3. **Documentación.** Corregir un párrafo confuso, traducir, agregar un diagrama.
|
|
72
|
+
4. **Reportar un número equivocado.** Si un resultado no calza con tu experiencia en campo,
|
|
73
|
+
abre un issue. Un reporte con el valor esperado ya es una contribución real.
|
|
74
|
+
5. **Código.** API de Python, gráficos, línea de comandos, rendimiento.
|
|
75
|
+
|
|
76
|
+
### Tu primera contribución, paso a paso
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# 1. Haz fork del repo en GitHub, luego:
|
|
80
|
+
git clone https://github.com/TU-USUARIO/VentPy.git
|
|
81
|
+
cd VentPy
|
|
82
|
+
|
|
83
|
+
# 2. Instala en modo editable con extras de test
|
|
84
|
+
pip install -e ".[test,viz]"
|
|
85
|
+
|
|
86
|
+
# 3. Corre los tests (deben pasar antes de que toques nada)
|
|
87
|
+
pytest tests/python -q
|
|
88
|
+
|
|
89
|
+
# 4. Crea una rama, haz tu cambio, corre los tests otra vez
|
|
90
|
+
git checkout -b agregar-norma-chile
|
|
91
|
+
pytest tests/python -q
|
|
92
|
+
|
|
93
|
+
# 5. Commitea y abre un Pull Request
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Reglas de la casa
|
|
97
|
+
|
|
98
|
+
- **Cita la norma.** Toda constante debe referenciar su artículo: `DS 024-2016-EM, Art. 247`.
|
|
99
|
+
Un número sin fuente no se mergea — esta librería se usa para decisiones de **seguridad**.
|
|
100
|
+
- **Agrega un test** por cada comportamiento nuevo. Si no sabes cómo, abre el PR igual y pregunta.
|
|
101
|
+
- **Sé conservador en la documentación.** Nunca afirmes más precisión de la que el método tiene.
|
|
102
|
+
- Mejor PRs chicos que grandes. Una norma, un PR.
|
|
103
|
+
|
|
104
|
+
### ¿Dudas?
|
|
105
|
+
|
|
106
|
+
Abre un issue con la etiqueta `question`. No hay preguntas tontas: si algo no te quedó claro,
|
|
107
|
+
es que no estaba lo bastante claro.
|