[PATCH] Don't calculate with NaN when on 100% o2

Robert C. Helling helling at atdotde.de
Sun Mar 30 14:52:21 PDT 2014


On 30 Mar 2014, at 23:07, Dirk Hohndel <dirk at hohndel.org> wrote:
> 
> Tried to talk to you on IRC, but let's repeat here:
> 
> +		entry->ead = (entry->depth + 10000) * (1000 - fhe) / 1000.0 - 10000;
> +		entry->end = (entry->depth + 10000) * (1000 - fo2 - fhe) / (double)N2_IN_AIR - 10000;
> 
> That first one is the definition of END, the second one the definition
> of EAD. What am I missing?
> 
> /D

Dirk,

now I am confused. I have to admit, I had not heard about the distinction of the two before (I had only used the “the depth that has the the same partial pressure of N2 when using air” whatever that is called).

Do you agree with the two comments before those lines (that I did not touch):

 		 * EAD takes O2 + N2 (air) into account
 		 * END just uses N2 */


Those are in agreement with
http://lists.hohndel.org/pipermail/subsurface/2013-January/002411.html

Maybe it is too late at night for me but it still seems to me that

+		entry->ead = (entry->depth + 10000) * (1000 - fhe) / 1000.0 - 10000;
+		entry->end = (entry->depth + 10000) * (1000 - fo2 - fhe) / (double)N2_IN_AIR - 10000;

exactliy represents that.

Best
Robert

--                                                                              
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO 
Robert C. Helling     Elite Master Course Theoretical and Mathematical Physics  
                      Scientific Coordinator                                   
                      Ludwig Maximilians Universitaet Muenchen, Dept. Physik    
print "Just another   Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339       
    stupid .sig\n";   http://www.atdotde.de 



More information about the subsurface mailing list