endoR: endoR - the endotherm model of NicheMapR

View source: R/endoR.R

endoRR Documentation

endoR - the endotherm model of NicheMapR

Description

This model implements postural and physiological thermoregulation under a given environmental scenario for an organism of a specified shape and no extra body parts. In this function the sequence of thermoregulatory events in the face of heat stress is to first change posture (uncurl), second change flesh conductivity, third raise core temperature, fourth pant and fifth sweat.

Usage

endoR(AMASS = 1, SHAPE = 4, SHAPE_B = 1.1, FURTHRMK = 0, ZFURD = 2E-03, ZFURV = 2E-03, TC = 37, TC_MAX = 45, TA = 20, TGRD = TA, TSKY = TA, VEL = 0.1, RH = 5, QSOLR = 0, Z = 20, SHADE = 0,...)

Arguments

TA

= 20, air temperature at local height (°C)

TGRD

= TA, ground temperature (°C)

TSKY

= TA, sky temperature (°C)

VEL

= 0.1, wind speed (m/s)

RH

= 5, relative humidity (%)

QSOLR

= 0, solar radiation, horizontal plane (W/m2)

Z

= 20, zenith angle of sun (degrees from overhead)

SHADE

= 0, shade level (%)

AMASS

= 65, # kg

SHAPE

= 4, # shape, 1 is cylinder, 2 is sphere, 3 is plate, 4 is ellipsoid

SHAPE_B

= 1.1, # current ratio between long and short axis (-)

FURTHRMK

= 0, # user-specified fur thermal conductivity (W/mK), not used if 0

ZFURD

= 2E-03, # fur depth, dorsal (m)

ZFURV

= 2E-03, # fur depth, ventral (m)

TC

= 37, # core temperature (°C)

TC_MAX

= 39, # maximum core temperature (°C)

Examples

library(NicheMapR)
# environment
TAs <- seq(0, 50, 2) # air temperatures (deg C)
VEL <- 0.01 # wind speed (m/s)
RH <- 10 # relative humidity (\%)
QSOLR <- 100 # solar radiation (W/m2)

# core temperature
TC <- 38 # core temperature (deg C)
TC_MAX <- 43 # maximum core temperature (deg C)
TC_INC <- 0.25 # increment by which TC is elevated (deg C)

# size and shape
AMASS <- 0.0337 # mass (kg)
SHAPE_B <- 1.1 # start off near to a sphere (-)
SHAPE_B_MAX <- 5 # maximum ratio of length to width/depth

# fur/feather properties
DHAIRD = 30E-06 # hair diameter, dorsal (m)
DHAIRV = 30E-06 # hair diameter, ventral (m)
LHAIRD = 23.1E-03 # hair length, dorsal (m)
LHAIRV = 22.7E-03 # hair length, ventral (m)
ZFURD = 5.8E-03 # fur depth, dorsal (m)
ZFURV = 5.6E-03 # fur depth, ventral (m)
RHOD = 8000E+04 # hair density, dorsal (1/m2)
RHOV = 8000E+04 # hair density, ventral (1/m2)
REFLD = 0.248  # fur reflectivity dorsal (fractional, 0-1)
REFLV = 0.351  # fur reflectivity ventral (fractional, 0-1)

# physiological responses
PCTWET <- 0.1 # base skin wetness (%)
PCTWET_MAX <- 20 # maximum skin wetness (%)
PCTWET_INC <- 0.25 # intervals by which skin wetness is increased (%)
Q10 <- 2 # Q10 effect of body temperature on metabolic rate
QBASAL <- 10 ^ (-1.461 + 0.669 * log10(AMASS * 1000)) # basal heat generation (W) (bird formula from McKechnie and Wolf 2004 Phys. & Biochem. Zool. 77:502-521)
DELTAR <- 5 # offset between air temperature and breath (deg C)
EXTREF <- 15 # O2 extraction efficiency (%)
PANT_INC <- 0.1 # turns on panting, the value being the increment by which the panting multiplier is increased up to the maximum value, PANT_MAX
PANT_MAX <- 3 # maximum panting rate - multiplier on air flow through the lungs above that determined by metabolic rate

ptm <- proc.time() # start timing
endo.out <- lapply(1:length(TAs), function(x){endoR(TA = TAs[x], QSOLR = QSOLR, VEL = VEL, TC = TC, TC_MAX = TC_MAX, RH = RH, AMASS = AMASS, SHAPE_B_MAX = SHAPE_B_MAX, PCTWET = PCTWET, PCTWET_INC = PCTWET_INC, PCTWET_MAX = PCTWET_MAX, Q10 = Q10, QBASAL = QBASAL, DELTAR = DELTAR, DHAIRD = DHAIRD, DHAIRV = DHAIRV, LHAIRD = LHAIRD, LHAIRV = LHAIRV, ZFURD = ZFURD, ZFURV = ZFURV, RHOD = RHOD, RHOV = RHOV, REFLD = REFLD, TC_INC = TC_INC, PANT_INC = PANT_INC, PANT_MAX = PANT_MAX, EXTREF = EXTREF)}) # run endoR across environments
proc.time() - ptm # stop timing

endo.out1 <- do.call("rbind", lapply(endo.out, data.frame)) # turn results into data frame
treg <- endo.out1[, grep(pattern = "treg", colnames(endo.out1))]
colnames(treg) <- gsub(colnames(treg), pattern = "treg.", replacement = "")
morph <- endo.out1[, grep(pattern = "morph", colnames(endo.out1))]
colnames(morph) <- gsub(colnames(morph), pattern = "morph.", replacement = "")
enbal <- endo.out1[, grep(pattern = "enbal", colnames(endo.out1))]
colnames(enbal) <- gsub(colnames(enbal), pattern = "enbal.", replacement = "")
masbal <- endo.out1[, grep(pattern = "masbal", colnames(endo.out1))]
colnames(masbal) <- gsub(colnames(masbal), pattern = "masbal.", replacement = "")

QGEN <- enbal$QGEN # metabolic rate (W)
H2O <- masbal$H2OResp_g + masbal$H2OCut_g # g/h water evaporated
TFA_D <- treg$TFA_D # dorsal fur surface temperature
TFA_V <- treg$TFA_V # ventral fur surface temperature
TskinD <- treg$TSKIN_D # dorsal skin temperature
TskinV <- treg$TSKIN_V # ventral skin temperature
TCs <- treg$TC # core temperature

par(mfrow = c(2, 2))
par(oma = c(2, 1, 2, 2) + 0.1)
par(mar = c(3, 3, 1.5, 1) + 0.1)
par(mgp = c(2, 1, 0))
plot(QGEN ~ TAs, type = 'l', ylab = 'metabolic rate, W', xlab = 'air temperature, deg C', ylim = c(0.2, 1.2))
plot(H2O ~ TAs, type = 'l', ylab = 'water loss, g/h', xlab = 'air temperature, deg C', ylim = c(0, 1.5))
points(masbal$H2OResp_g ~ TAs, type = 'l', lty = 2)
points(masbal$H2OCut_g ~ TAs, type = 'l', lty = 2, col = 'blue')
legend(x = 3, y = 1.5, legend = c("total", "respiratory", "cutaneous"), col = c("black", "black", "blue"), lty = c(1, 2, 2), bty = "n")
plot(TFA_D ~ TAs, type = 'l', col = 'grey', ylab = 'temperature, deg C', xlab = 'air temperature, deg C', ylim = c(10, 50))
points(TFA_V ~ TAs, type = 'l', col = 'grey', lty = 2)
points(TskinD ~ TAs, type = 'l', col = 'orange')
points(TskinV ~ TAs, type = 'l', col = 'orange', lty = 2)
points(TCs ~ TAs, type = 'l', col = 'red')
legend(x = 30, y = 33, legend = c("core", "skin dorsal", "skin ventral", "feathers dorsal", "feathers ventral"), col = c("red", "orange", "orange", "grey", "grey"), lty = c(1, 1, 2, 1, 2), bty = "n")
plot(masbal$AIR_L * 1000 / 60 ~ TAs, ylim=c(0,250),  lty = 1, xlim=c(-5,50), ylab = "ml / min", xlab=paste("air temperature (deg C)"), type = 'l')

mrke/NicheMapR documentation built on April 3, 2024, 10:05 a.m.