Simulate anaesthetic uptake

sim_anaesthetic_uptake(
  pinsp,
  delta_time = 0.1,
  total_time = 10,
  conductances,
  capacitances,
  use_humidification = FALSE,
  pambient = 101.325,
  pwater = 6.26,
  use_concentration_effect = FALSE,
  tp_factor = stp_factor(),
  alveolar_minute_ventilation = conductances["lung"]/tp_factor,
  shunt_frac = 0,
  metabolism_frac = 0,
  ppart = partial_pressures(pinsp = pinsp)
)

Arguments

pinsp

numeric(1), inspiratory partial pressure of the anaesthetic.

delta_time

numeric(1), time difference between each calculation step in min.

total_time

numeric(1), total time to simulate.

conductances

numeric(4), conductances.

capacitances

numeric(4), capacitances.

use_humidification

logical(1), should humification take into account (default: FALSE).

pambient

numeric(1), ambient pressure in kPa.

pwater

numeric(1), water pressure in kPa.

use_concentration_effect

logical(1), should concentration effect take into account (default: FALSE).

tp_factor

numeric, temperature/pressure factor.

alveolar_minute_ventilation

numeric(1), alveolar minute ventilation in l/min.

shunt_frac

double(1), fraction of pulmonary shunt.

metabolism_frac

double(1), fraction of metabolism of the volatile anaesthetic per hour (e.g. metabolism_frac = 0.05 for 5 % per hour).

ppart

double(6), initial partial pressures settings to start with. Useful to (re)start a simulation at a given anaesthetic state/time point.

Value

matrix, with partial pressures for each simulation step.

Note

metabolism_frac: applying the values given in Cowles 1973 the output slightly differs (at the second decimal place).

References

Figure 1 in Cowles, A. L., Borgstedt, H. H., & Gillies, A. J. (1973). A simplified digital method for predicting anesthetic uptake and distribution. Computers in Biology and Medicine, 3(4), 385-395. doi:10.1016/0010-4825(73)90004-8

Examples

## Test case with diethyl ether as in Cowles 1973, Table 4
blood_flow <- cardiac_output(total = 6.3)
part_coefs <- partition_coefficients("diethyl-ether")

# Volumes as in Cowles, Table 3
tissue_volume <- c(
    lung_air = 2.68, lung_tissue = 1.0,
    vrg = 8.83, mus = 36.25, fat = 11.5
)
blood_volume <- c(lung = 1.4, vrg = 3.2, mus = 0.63, fat = 0.18)

conductances <- c(
    lung = conductance(
        flow = 4.0,                     # alveolar minute ventilation
        partition_coefficient = 1.0     # gas:gas partition coefficient
    ),
    vrg = conductance(blood_flow["vrg"], part_coefs["lung"]),
    mus = conductance(blood_flow["mus"], part_coefs["lung"]),
    fat = conductance(blood_flow["fat"], part_coefs["lung"])
)
capacitances <- c(
    lung = lung_capacitance(
        tissue_volume["lung_air"],
        ## blood volume and tissue:gas == blood:gas in that case
        tissue_volume["lung_tissue"], tissue_coefficient = part_coefs["lung"],
        ## blood volume and blood:gas part_coefs
        blood_volume["lung"], part_coefs["lung"]
    ),
    vrg = capacitance(
        tissue_volume["vrg"], part_coefs["vrg"],
        blood_volume["vrg"], part_coefs["lung"]
    ),
    mus = capacitance(
        tissue_volume["mus"], part_coefs["mus"],
        blood_volume["mus"], part_coefs["lung"]
    ),
    fat = capacitance(
        tissue_volume["fat"], part_coefs["fat"],
        blood_volume["fat"], part_coefs["lung"]
    )
)

sim <- sim_anaesthetic_uptake(
    pinsp = 12, delta_time = 10/60, total_time = 10,
    conductances = conductances, capacitances = capacitances
)

matplot(sim[, 1], sim[, -1], type = "l")