Hi Jan, On 4 July 2015 at 08:27, Jan Darowski <[email protected]> wrote:
> Hi, > Here is another pull request. I hope now it's better. Everything was > reorganized from scratch, the final code is almost the same. > > I tried your VPM patch set. I haven't worked through the logic of the code or looked at individual commits. I just tested the dive VPM planner. I don't have Multideco or any other VPM planner for comparison, so I was only comparing it against example profiles I could find. Almost all examples were using VPM-B, and most had an added conservatism factor - both very good things for planning real dives, but quite annoying as a comparison, since I understand you have not yet implemented the Boyle's law adjustment or conservatism factors. But, there is an example in the introduction to Eric Baker's original VPM Fortran code. Note that the licence for the Fortran code is, "DISTRIBUTE FREELY - CREDIT THE AUTHORS". The example uses 15/45 trimix bottom gas, and 36% and 100% as deco gasses. There are two example dives to 260 ft (79 metres) with 30 minute bottom time, and 60 minute surface interval between the dives. Descent rate is 75 ft/min (23 m/min), and ascent rate is generally 30 ft/min (9 m/min) then 10 ft/min (3 m/min) from final stop. Total dives times are 101 and 126 minutes, respectively. Setting the same profiles, the deco schedule calculated by Subsurface is quite a bit more aggressive. Total dive times are 86 and 103 minutes. But then I checked the configuration parameters adopted, and there are differences. I altered vpmb_config to match what was used in the Fortran code. critical radius of N2 was 0.6, changed to 0.8 microns critical radius of He was 0.5, changed to 0.7 microns critical volume of lambda was 250, changed to 231.021 bar (=7500 fsw-min) Using these configuration parameters, we get total dive times of 101 and 125 minutes, respectively. I.e.within 1 minute (which is nothing) of the example dives. It would be a huge coincidence if the calculations weren't being performed correctly. I can't claim these configuration parameters are 'better', but with them, we can match the benchmark. A patch is attached. You may or may not want to take it: when the Boyles Law adjustment is made, I think the critical radii should be reduced back to how they were, but the lambda parameter should also be reduced to ~200 bar. I also attached a patch to include the units in the config structure, to make it marginally easier to understand what the parameters represent. Cheers, Rick
From c0e3e0711c358b995a696d0e62b6a68376c82f83 Mon Sep 17 00:00:00 2001 From: Rick Walsh <[email protected]> Date: Sat, 4 Jul 2015 16:34:22 +1000 Subject: [PATCH 13/14] Use same VPM configuration parameters as Fortran example Adopt the same critical radii and gas volume parameters as Eric Baker's original VPM Fortran code. Signed-off-by: Rick Walsh <[email protected]> --- deco.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deco.c b/deco.c index f1bc803..5bea4a8 100644 --- a/deco.c +++ b/deco.c @@ -43,7 +43,7 @@ struct vpmb_config { double regeneration_time; //! Time needed for the bubble to regenerate to the start radius. double other_gases_pressure; //! Always present pressure of other gasses in tissues. }; -struct vpmb_config vpmb_config = { 0.6, 0.5, 250.0, 8.2, 0.179, 2.57, 20160, 0.1359888 }; +struct vpmb_config vpmb_config = { 0.8, 0.7, 231.021, 8.2, 0.179, 2.57, 20160, 0.1359888 }; const double buehlmann_N2_a[] = { 1.1696, 1.0, 0.8618, 0.7562, 0.62, 0.5043, 0.441, 0.4, -- 2.4.3
From 70b45d1f7c0a23684246eb0937717338362993c9 Mon Sep 17 00:00:00 2001 From: Rick Walsh <[email protected]> Date: Sat, 4 Jul 2015 16:53:19 +1000 Subject: [PATCH 14/14] Include units in VPM config structure definition Signed-off-by: Rick Walsh <[email protected]> --- deco.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/deco.c b/deco.c index 5bea4a8..8d815f2 100644 --- a/deco.c +++ b/deco.c @@ -36,12 +36,12 @@ struct buehlmann_config buehlmann_config = { 1.0, 1.01, 0, 0.75, 0.35, 1.0, fals struct vpmb_config { double crit_radius_N2; //! Critical radius of N2 nucleon (microns). double crit_radius_He; //! Critical radius of He nucleon (microns). - double crit_volume_lambda; //! Constant corresponding to critical gas volume. - double gradient_of_imperm; //! Gradient after which bubbles become impermeable. - double surface_tension_gamma; //! Nucleons surface tension constant. - double skin_compression_gammaC; //! - double regeneration_time; //! Time needed for the bubble to regenerate to the start radius. - double other_gases_pressure; //! Always present pressure of other gasses in tissues. + double crit_volume_lambda; //! Constant corresponding to critical gas volume (bar). + double gradient_of_imperm; //! Gradient after which bubbles become impermeable (bar). + double surface_tension_gamma; //! Nucleons surface tension constant (mN/cm). + double skin_compression_gammaC; //! Skin compression gammaC (mN/cm). + double regeneration_time; //! Time needed for the bubble to regenerate to the start radius (min). + double other_gases_pressure; //! Always present pressure of other gasses in tissues (bar). }; struct vpmb_config vpmb_config = { 0.8, 0.7, 231.021, 8.2, 0.179, 2.57, 20160, 0.1359888 }; -- 2.4.3
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
