<div dir="ltr">Hi Jan,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On 15 July 2015 at 23:59, Rick Walsh <span dir="ltr"><<a href="mailto:rickmwalsh@gmail.com" target="_blank">rickmwalsh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5"><p dir="ltr"><br>
On 15 Jul 2015 11:38 pm, "Jan Darowski" <<a href="mailto:jan.darowski@gmail.com" target="_blank">jan.darowski@gmail.com</a>> wrote:<br>
><br>
> I was checking against C implementation from github (which is the<br>
> easiest for quick modifications and additional data extraction and<br>
> also is an original codes direct translation). After finding two more<br>
> bugs I got around 20min of difference with the depth of 80m and 30min<br>
> at the bottom (15/45 mix). CVA can't be a problem as I switched it off<br>
> to isolate the Boyles influence. I suspect one more place: the<br>
> original implementation uses projected depths (estimates some maximum<br>
> depth the diver can ascend to) and later verifies it but only in one<br>
> direction. So maybe, that's why for deeper dives it's more<br>
> conservative.<br>
><br>
> For sure, original implementation has slightly different saturation<br>
> results. But tracing it and saying which way it changes the schedule<br>
> is terrible as it depends on the depth. I would say that <10% of deco<br>
> time difference is the limit. As long as we can stay there, it's fine.<br>
> If you just play with the bottom time (for example increase it by<br>
> 1-2min), you can see that the original code generates very uneven<br>
> schedules.</p>
</div></div><p dir="ltr">I agree that is odd.  Essentially it's scaling the algorithm according to the depth of the first stop. Which would be ok, except there's a step change between defined stop levels.</p>
<p dir="ltr">But if that's how it is, I think you should stick with that method, flawed or not, for consistency with other programmes.</p></blockquote><div>The Boyles law compensation is effectively adjusting the conservatism of the model according to the depth of the first deco stop.  But changes in deco stop depths vary in 3m steps, and as you pointed out this can lead to some odd changes in a profile with very small increments in bottom time.<br><br></div><div>In order to avoid step changes, I thought it might be worth doing the initial Boyles law compensation based on the ceiling of the initial ascent, rather than the depth of the first deco stop.  They represent a similar concept, but the ceiling changes incrementally, whereas the deco stops vary in 3m increments.  The attached patch does this (on top of your github).  It is a small change from the published algorithm, so I'm not saying it should be used.  But it's worth considering, especially when you compare the profiles with small increments in bottom time.<br><br></div><div>I compared both these methods of Boyle's law compensation against the total ascent times and depth of first stop for the 200ft trimix dive VPM-B profiles published by Eric Maiken (linked in my previous email).  These comparison are plotted on the attached pdf and spreadsheet.<br><br></div><div>For consistency with the published profiles, the following parameters were used:<br>Gasses    18/45    <br>    50.00%    <br>    100.00%    <br>        <br>    Critical radii (microns)    <br>N2    0.55    <br>He    0.45    <br>        <br>Ascent rate    33    ft/min<br>Descent rate    99    ft/min<br></div><div><br></div><div>The published profiles have bottom times (including descent) in 10 min increments up to 120 min.  To further compare the methods of Boyle's law compensation, I added in 1 min increments in the range 10-20 min, and 40-50 min.<br><br></div><div>As seen by the first two graphs, all three models give generally similar profiles.  However, when looking at small bottom time increments which result in a change in the depth of the first deco stop, odd changes occur in the total ascent time when basing the Boyle's law compensation from the first deco stop depth, whereas my modified method gives a much more regular change.<br><br></div><div>Obviously, this is just testing with limited dive profiles.<br></div><br></div><div class="gmail_quote">Cheers,<br><br></div><div class="gmail_quote">Rick<br></div><div class="gmail_quote"><br></div></div></div></div>