Switched to nitrogen only simulation

This commit is contained in:
BaerMitUmlaut 2016-07-13 11:48:54 +02:00
parent 9c01ef4541
commit 7539c33529
3 changed files with 11 additions and 14 deletions

View File

@ -4,16 +4,14 @@ ADDON = false;
#include "XEH_PREP.hpp"
GVAR(inertGasTypes) = ["nitrogen", "helium"];
GVAR(inertGasHalftimes) = [
[4, 8, 12.5, 18.5, 27, 38.3, 54.3, 77, 109, 146, 187, 239, 305, 390, 498, 635],
[1.5, 3.0, 4.7, 7.0, 10.2, 14.5, 20.5, 29.1, 41.1, 55.1, 70.6, 90.2, 115.1, 147.2, 187.9, 239.6]
GVAR(halftimes) = [
4, 8, 12.5, 18.5, 27, 38.3, 54.3, 77, 109, 146, 187, 239, 305, 390, 498, 635
];
GVAR(interGasAValues) = GVAR(inertGasHalftimes) apply {_x apply {
GVAR(aValues) = GVAR(nitrogenHalftimes) apply {
2 * _x ^ (-1/3)
}};
GVAR(interGasBValues) = GVAR(inertGasHalftimes) apply {_x apply {
};
GVAR(bValues) = GVAR(nitrogenHalftimes) apply {
1.005 - (_x ^ (-1/2))
}};
};
ADDON = true;

View File

@ -13,8 +13,8 @@
private _maxPAmbtol = 0;
{
private _a = GVAR(interGasAValues) select (_forEachIndex * 2);
private _b = GVAR(interGasBValues) select (_forEachIndex * 2);
private _a = GVAR(aValues) select (_forEachIndex * 2);
private _b = GVAR(aValues) select (_forEachIndex * 2);
private _pAmbtol = (_x - _a) * _b;
_maxPAmbtol = _maxPAmbTol max _pAmbtol;

View File

@ -10,14 +10,13 @@
*/
#include "script_component.hpp"
private _compartments = ACE_player getVariable [QGVAR(compartments), [0,0,0,0,0,0,0,0]];
private _compartments = ACE_player getVariable [QGVAR(compartments), [0.745,0.745,0.745,0.745,0.745,0.745,0.745,0.745]];
{
private _pBegin = _x;
private _pGas = ACE_player getVariable QGVAR(inertGasPressure);
private _pGas = ACE_player getVariable QGVAR(nitrogenPressure);
private _tExposure = 1/60;
private _gasType = ACE_player getVariable QGVAR(inertGasType);
private _tHalftime = (GVAR(inertGasHalftimes) select (GVAR(inertGasTypes) find _gasType)) select (_forEachIndex * 2);
private _tHalftime = GVAR(halftimes) select (_forEachIndex * 2);
// Bühlmann algorithm
private _pComp = _pBegin + (_pGas - _pBegin) * (1 - 2 ^ (-1 * _tExposure / _tHalftime));