mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Switched to nitrogen only simulation
This commit is contained in:
parent
9c01ef4541
commit
7539c33529
@ -4,16 +4,14 @@ ADDON = false;
|
|||||||
|
|
||||||
#include "XEH_PREP.hpp"
|
#include "XEH_PREP.hpp"
|
||||||
|
|
||||||
GVAR(inertGasTypes) = ["nitrogen", "helium"];
|
GVAR(halftimes) = [
|
||||||
GVAR(inertGasHalftimes) = [
|
4, 8, 12.5, 18.5, 27, 38.3, 54.3, 77, 109, 146, 187, 239, 305, 390, 498, 635
|
||||||
[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(interGasAValues) = GVAR(inertGasHalftimes) apply {_x apply {
|
GVAR(aValues) = GVAR(nitrogenHalftimes) apply {
|
||||||
2 * _x ^ (-1/3)
|
2 * _x ^ (-1/3)
|
||||||
}};
|
};
|
||||||
GVAR(interGasBValues) = GVAR(inertGasHalftimes) apply {_x apply {
|
GVAR(bValues) = GVAR(nitrogenHalftimes) apply {
|
||||||
1.005 - (_x ^ (-1/2))
|
1.005 - (_x ^ (-1/2))
|
||||||
}};
|
};
|
||||||
|
|
||||||
ADDON = true;
|
ADDON = true;
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
private _maxPAmbtol = 0;
|
private _maxPAmbtol = 0;
|
||||||
|
|
||||||
{
|
{
|
||||||
private _a = GVAR(interGasAValues) select (_forEachIndex * 2);
|
private _a = GVAR(aValues) select (_forEachIndex * 2);
|
||||||
private _b = GVAR(interGasBValues) select (_forEachIndex * 2);
|
private _b = GVAR(aValues) select (_forEachIndex * 2);
|
||||||
|
|
||||||
private _pAmbtol = (_x - _a) * _b;
|
private _pAmbtol = (_x - _a) * _b;
|
||||||
_maxPAmbtol = _maxPAmbTol max _pAmbtol;
|
_maxPAmbtol = _maxPAmbTol max _pAmbtol;
|
||||||
|
@ -10,14 +10,13 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#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 _pBegin = _x;
|
||||||
private _pGas = ACE_player getVariable QGVAR(inertGasPressure);
|
private _pGas = ACE_player getVariable QGVAR(nitrogenPressure);
|
||||||
private _tExposure = 1/60;
|
private _tExposure = 1/60;
|
||||||
private _gasType = ACE_player getVariable QGVAR(inertGasType);
|
private _tHalftime = GVAR(halftimes) select (_forEachIndex * 2);
|
||||||
private _tHalftime = (GVAR(inertGasHalftimes) select (GVAR(inertGasTypes) find _gasType)) select (_forEachIndex * 2);
|
|
||||||
|
|
||||||
// Bühlmann algorithm
|
// Bühlmann algorithm
|
||||||
private _pComp = _pBegin + (_pGas - _pBegin) * (1 - 2 ^ (-1 * _tExposure / _tHalftime));
|
private _pComp = _pBegin + (_pGas - _pBegin) * (1 - 2 ^ (-1 * _tExposure / _tHalftime));
|
||||||
|
Loading…
Reference in New Issue
Block a user