Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the approximate survival time of a human in cold water
| ResourceFunction["ColdWaterSurvivalTime"][temp] estimates the survival time in cold water for a temperature temp. | |
| ResourceFunction["ColdWaterSurvivalTime"][temp,prop] gives the property prop. | 
| "SurvivalTime" | time a human can survive in cold water of the specified temperature | 
| "MetabolicHeat" | heat generated by the body in the cold water | 
| "CoolingRate" | body's cooling rate | 
| "Plot" | plot of the curve of survival time versus water temperature | 
| "PropertyAssociation" | all results as an Association | 
| "EnergyUnit" | "Calories" | unit of the result heat ("Kilojoules", "Watts", …) | 
| "TimeUnit" | "Minutes" | unit of time in the results | 
Get the survival time in cold water at a specific temperature:
| In[1]:= | ![ResourceFunction["ColdWaterSurvivalTime"][
 Quantity[10, "DegreesCelsius"]]](https://www.wolframcloud.com/obj/resourcesystem/images/f43/f439e0a9-01a7-466b-b8ff-6e22c37bc944/2f8feb25efac7fa2.png) | 
| Out[1]= |  | 
The function interprets any unit type of degrees for temperature:
| In[2]:= | ![ResourceFunction["ColdWaterSurvivalTime"][
 Quantity[40, "DegreesFahrenheit"]]](https://www.wolframcloud.com/obj/resourcesystem/images/f43/f439e0a9-01a7-466b-b8ff-6e22c37bc944/7028375c535a08bd.png) | 
| Out[2]= |  | 
The function used with one argument is similar to the function with two arguments where the second is "SurvivalTime":
| In[3]:= | ![ResourceFunction["ColdWaterSurvivalTime"][
 Quantity[3, "DegreesCelsius"]]](https://www.wolframcloud.com/obj/resourcesystem/images/f43/f439e0a9-01a7-466b-b8ff-6e22c37bc944/7d7f0e3eec8b7bf2.png) | 
| Out[3]= |  | 
| In[4]:= | ![ResourceFunction["ColdWaterSurvivalTime"][
 Quantity[3, "DegreesCelsius"], "SurvivalTime"]](https://www.wolframcloud.com/obj/resourcesystem/images/f43/f439e0a9-01a7-466b-b8ff-6e22c37bc944/715879982590095d.png) | 
| Out[4]= |  | 
If a Quantity is not specified, it is interpreted in "DegreesCelsius":
| In[5]:= | ![ResourceFunction["ColdWaterSurvivalTime"][3]](https://www.wolframcloud.com/obj/resourcesystem/images/f43/f439e0a9-01a7-466b-b8ff-6e22c37bc944/4364b82c929b39c0.png) | 
| Out[5]= |  | 
Obtain the heat generated by the body in water at the specified temperature:
| In[6]:= | ![ResourceFunction["ColdWaterSurvivalTime"][
 Quantity[3, "DegreesCelsius"], "MetabolicHeat"]](https://www.wolframcloud.com/obj/resourcesystem/images/f43/f439e0a9-01a7-466b-b8ff-6e22c37bc944/6f333479fb693e0f.png) | 
| Out[6]= |  | 
Obtain the body’s cooling rate for a specific temperature:
| In[7]:= | ![ResourceFunction["ColdWaterSurvivalTime"][
 Quantity[3, "DegreesCelsius"], "CoolingRate"]](https://www.wolframcloud.com/obj/resourcesystem/images/f43/f439e0a9-01a7-466b-b8ff-6e22c37bc944/363cce45be021119.png) | 
| Out[7]= |  | 
Use "Plot" to obtain the survival time curve (y axis) for different water temperatures (x axis):
| In[8]:= | ![ResourceFunction["ColdWaterSurvivalTime"][
 Quantity[278, "Kelvins"], "Plot"]](https://www.wolframcloud.com/obj/resourcesystem/images/f43/f439e0a9-01a7-466b-b8ff-6e22c37bc944/174b82f43453ed1a.png) | 
| Out[8]= |  | 
Use "PropertyAssociation" to get all the information simultaneously for a specific temperature. Note that the result is given in the same temperature units as the input:
| In[9]:= | ![ResourceFunction["ColdWaterSurvivalTime"][
 Quantity[512, "DegreesRankine"], "PropertyAssociation"]](https://www.wolframcloud.com/obj/resourcesystem/images/f43/f439e0a9-01a7-466b-b8ff-6e22c37bc944/69349f1512bab7dc.png) | 
| Out[9]= |  | 
Get information using another unit of heat with the option "EnergyUnit":
| In[10]:= | ![ResourceFunction["ColdWaterSurvivalTime"][
 Quantity[10, "DegreesCelsius"], "MetabolicHeat", "EnergyUnit" -> "Kilojoules"]](https://www.wolframcloud.com/obj/resourcesystem/images/f43/f439e0a9-01a7-466b-b8ff-6e22c37bc944/45e1e6ee049ba7ca.png) | 
| Out[10]= |  | 
Choose another unit of time with the "TimeUnit" option:
| In[11]:= | ![ResourceFunction["ColdWaterSurvivalTime"][
 Quantity[46, "DegreesFahrenheit"], "CoolingRate", "TimeUnit" -> "Hours"]](https://www.wolframcloud.com/obj/resourcesystem/images/f43/f439e0a9-01a7-466b-b8ff-6e22c37bc944/78b3ac7e1590c764.png) | 
| Out[11]= |  | 
Change both the unit of energy and the time. The plot and the result use the chosen time unit and a given requested energy unit:
| In[12]:= | ![ResourceFunction["ColdWaterSurvivalTime"][
 Quantity[280, "Kelvins"], "PropertyAssociation", "EnergyUnit" -> "Watts", "TimeUnit" -> "Seconds"]](https://www.wolframcloud.com/obj/resourcesystem/images/f43/f439e0a9-01a7-466b-b8ff-6e22c37bc944/5cb372ff5b603cdb.png) | 
| Out[12]= |  | 
Note that even if the temperature unit is not degrees Celsius, the x axis of the graph remains in that unit:
| In[13]:= | ![ResourceFunction["ColdWaterSurvivalTime"][
 Quantity[500, "DegreesRankine"], "Plot"]](https://www.wolframcloud.com/obj/resourcesystem/images/f43/f439e0a9-01a7-466b-b8ff-6e22c37bc944/3c67f72c5f059e26.png) | 
| Out[13]= |  | 
If the required property does not contain information about the energy, the "EnergyUnit" option does not influence the output:
| In[14]:= | ![ResourceFunction["ColdWaterSurvivalTime"][
 Quantity[290, "Kelvins"], "CoolingRate", "EnergyUnit" -> "Watts"]](https://www.wolframcloud.com/obj/resourcesystem/images/f43/f439e0a9-01a7-466b-b8ff-6e22c37bc944/26bd051f276abf58.png) | 
| Out[14]= |  | 
This work is licensed under a Creative Commons Attribution 4.0 International License