Modern and traditional approaches combined into an effective gray-box mathematical model of full-blood acid-base
The acidity of human body fluids, expressed by the pH, is physiologically regulated in a narrow range, which is required for the proper function of cellular metabolism. Acid-base disorders are common especially in intensive care, and the acid-base status is one of the vital clinical signs for the patient management. Because acid-base balance is connected to many bodily processes and regulations, complex mathematical models are needed to get insight into the mixed disorders and to act accordingly. The goal of this study is to develop a full-blood acid-base model, designed to be further integrated into more complex human physiology models.
We have developed computationally simple and robust full-blood model, yet thorough enough to cover most of the common pathologies. Thanks to its simplicity and usage of Modelica language, it is suitable to be embedded within more elaborate systems. We achieved the simplification by a combination of behavioral Siggaard-Andersen’s traditional approach for erythrocyte modeling and the mechanistic Stewart’s physicochemical approach for plasma modeling. The resulting model is capable of providing variations in arterial pCO2, base excess, strong ion difference, hematocrit, plasma protein, phosphates and hemodilution/hemoconcentration, but insensitive to DPG and CO concentrations.
This study presents a straightforward unification of Siggaard-Andersen’s and Stewart’s acid-base models. The resulting full-blood acid-base model is designed to be a core part of a complex dynamic whole-body acid-base and gas transfer model.
KeywordsAcid-base modeling Physicochemical acid-base Behavioral acid-base Siggaard-Andersen Modelica Physiology Physiolibrary
Acid-base disturbances are associated with a number of fluid, electrolyte, metabolic and respiratory disorders. Understanding the pathogenesis and the underlying pathophysiological processes is crucial for proper diagnostics and treatment, especially in acute medicine, anaesthesiology and during artificial respiration. Complex mathematical models help to uncover the pathogenesis of complex bodily disorders.
Two major approaches for mathematical modeling of the acid-base status of blood are widely employed. The traditional model by Siggaard-Andersen  (SA) is a behavioral model of full blood acid-base (i.e. including erythrocytes), but it is originally defined for standard albumin and phosphates only (though added later ) and, on its own, the model is unable to assess hemodilution and hemoconcentration (e.g. during fluid replacement), and the individual levels of ions are not considered. The second model, Stewart’s physicochemical  model, or the so-called modern approach, is a structural model of plasma only, but it is essential for assessing hemodilution, ion and protein imbalances, which are common in critically ill patients. However neither of these is satisfactory as a complete model.
The Stewart’s physicochemical approach has been further extended to overcome some of its disadvantages. Rees and Andreasen shown the extension to full blood and enhanced it by circulation, blood gases, interstitium and cellular compartments . Wooten later presented an extension to the extracellular compartment  and most recently, Wolf  proposed a profound steady-state physicochemical model of erythrocyte-plasma-interstitium-cell compartments, including detailed ion and water balance. It has been built with the purpose to mechanistically describe complex physicochemical processes, which is, however, computationally demanding and hard to solve due to a large system of non-linear equations. This prevents us from integrating the detailed models into more complex models, or from usage for patient-specific identification.
Described approaches [1, 2, 3, 4, 5, 6] are, however, designed for steady-state situations. To extend the whole-body acid-base assessment by bodily regulatory loops and to show pathogenesis of developing disorders in time, one needs to construct even larger integrative model, including important bodily compartments (interstitial fluid, cells) and regulations (kidney, liver, respiratory regulation) interconnected by a circulation of full-blood, the core component of our approach . From the authors’ experience, these subcomponents however need to be based on computationally robust submodels, which are yet precise enough to describe the physiology.
The aim of this study is to develop a detailed, yet computationally effective, full blood model by combining the two predominant approaches to blood acid-base balance. The resulting combined model will become an essential part of a future complex dynamic whole-body acid-base and blood gas transfer model following the border flux theory  to assess dynamic bodily compensations.
where pHHCT1 = pHSA and pHHCT0 = pHPC. Note that pHHCT1 does not represent the pH inside an erythrocyte, as modeled by Raftos et al., Rees et al. or Wolf and DeLand [11, 12, 13]. In contrast, it is a limit of the pH outside erythrocytes, as the hematocrit of this theoretical compartment (the ratio of erythrocytes) approaches 1. For computation of pHHCT1, we employ our formalization of Siggaard-Andersen’s nomogram, using a set of three sixth-order and a fourth order polynomials, whereas pHHCT0 (effectively plasma only) is given by Fencl’s simple plasma description . However, the particular models used can be replaced by more complex descriptions, with some trade-off between level of detail and numerical complexity. Please refer to the online supplement for the details regarding the calculation of pHHCT1 by own formalization of Siggaard-Andersen’s nomogram (eqs. 1–11 in the Additional file 1) and on calculation of pHHCT0 from the physicochemical model (eqs. 12–16 in the Additional file 1).
BEHCT0 (Base excess of the zero-hematocrit compartment) is formed by the physicochemical model of plasma, so in this case it equals BEPC.
A Modelica tool (tested in Dymola 2016 by Dassault Systémes and OpenModelica 1.11 by OpenModelica Consortium) automatically solves the set of coupled equations, employs necessary numerical methods and finds the steady-state solution.
The model is then validated by a visual comparison with the contemporary models in use.
We executed a steady-state sensitivity analysis of the buffer capacity for albumin and phosphate concentration levels on the combined model in comparison with contemporary models. The initial plasma concentrations were varied from 50 to 200% of the nominal value (4.4 g/dl for albumin and 1.15 g/dl for phosphate). The BE was held constant during the changes; therefore, according to eq. (5), the plasma SID was also varied.
For the lack of established metric to compare the computational complexity and solvability of equation-based models, the former is demonstrated by a sum of non-trivial equations and the latter by the initialization time (through the initial value of CPU time variable, provided by the Modelica tool). We show the values of our Combined model compared to our Modelica implementation of the Wolf model, as a representative of a complete physicochemical approach. The models were compared in Dymola 2016, on a reference computer with Windows 10 64b and i7-3667 U processor. To correctly count small time spans, each model was run 1000 times in parallel and then the CPU time was divided by the same factor.
The model source code implemented in the Modelica language, including our implementation of the Wolf’s model and source codes for the figures, is accessible at .
The main result of the present study is the combination of the Siggaard-Andersen and Stewart’s physicochemical models into a single model, so that we can perform calculations for dilution, albumin, phosphate and the buffer capacity of erythrocytes within a joint computationally effective combined model. The secondary result is the definition of NSID, an indicator showing the relation of BE and SID, each a flagship of its own approach. Thanks to NSID, we can quantify shifts in BE due to the dilution and/or changes in albumin levels or differences in SID due to varying pCO2 in full blood.
The results of sensitivity analysis at various plasma albumin concentrations at constant BE are outlined in Fig. 2b (compared with the Figge-Fencl model and the later albumin-sensitive Van-Slyke equation). Due to the dilution of plasma volume by erythrocytes, the sensitivity to albumin concentration in full blood is lower than the sensitivity in plasma. The results of sensitivity analysis of phosphate concentration were negligible at this scale and are not shown.
Unification of modern and traditional approaches
The preferred bed-side approach to acid-base evaluation still remains under debate, for further information on this issue see [23, 24, 25]. A number of authors have strived to compare the traditional approach to the physicochemical, to be used at the bedside (e.g. [26, 27]) or even make use of both at once . However, although different mathematical formalism, these two major approaches give similar information  and some studies conclude that, in principle, neither of the two methods offer a notable advantage [29, 30, 31].
Some previous works already attempted to find a relationship, e.g. Schlichtig  addressed the question of how base excess (BE) could have been increased, even though the strong ion difference (SID) had remained unchanged among hypoproteinaemia patients, by proposing SIDEx based on the SA approach to the Van Slyke eq. . Wooten later demonstrated mathematically, that “BE and the change in SID are numerically the same for plasma, provided that the concentrations of plasma noncarbonate buffers remain constant” , Matousek continued in the mathematical comparison [29, 32]. We extend the comparison, which was made mostly for plasma, to full blood and variable albumin and phosphate levels and present a method of combining both traditional and physicochemical approaches. NSID also indicates the desired value of SID during albumin and phosphate disorders.
The combined model
The resulting Combined model fits the full-blood Siggaard-Andersen model (by definition) and also the contemporary physicochemical model by Wolf  reduced to the plasma-erythrocyte compartment. Our contribution lies in the extending the classical physicochemical Stewart approach with the buffering effect of erythrocytes and their effects on SID during variable pCO2, while employing also the BE metric for quantization of H+/HCO3− flow balances. The resulting model is computationally effective and the solution does not exhibit numerical problems within normal input ranges.
During the pCO2 titration (Fig. 3b), it can be seen that the SID of plasma in whole blood is not independent of pCO2 and therefore could not serve as an independent state property. On the contrary, the BEOX (BE correction for virtual fully oxygenated blood, which could be calculated e.g. as in ), together with total O2 and total CO2 blood concentrations, are then a truly independent state properties of the full-blood component (as implemented in accompanied model ).
The concept of NSID, redefined for standard interstitium conditions, is then together with the eq. (5) usable also for calculations of BE in interstitial fluid to interconnect the blood with the interstitial compartment.
The proposed model does not depend on any new parameter or set any limitation to the contemporary approaches; rather, it solely joins them using the additional assumption of passive ion exchange only.
Combined model assumptions and limitations
The Combined model relies on fundamental assumptions of each of the combined approaches. The erythrocytes in the HCT1 compartment provide an additional buffer, mostly due to the binding of H+ to hemoglobin. This is associated with interchange of Cl− for HCO− 3, also during the change in pCO2, which has been described in numerous textbooks. The H+ / HCO3− flows are not directly conserved, as it might be buffered by a number of mechanisms, but persists in the form of BE metric. In Stewart’s terms, the H+/HCO3− flows are expressed in the form of SID change, i.e. here as exchange for Cl−.
To maintain the electroneutrality, we assume 1:1 transfer. As a complement of the reduced Cl− in the plasma, the HCO3− in Fig. 3b is rising and so is the total SID. Again, this could be viewed from two standpoints: in Siggaard-Andersen’s traditional approach it is the change of BE, e.g. + 1 M of HCO3− equals the change of BE by plus one. In Stewart’s terms, this equals to the change in SID by + 1 (as shown by ). In the current case of HCO3− to Cl− exchange, it is decrease of Cl− by exactly 1 M.
Our approach is generally limited by the measured data for behavioral model - the plasma is mechanistically extendable and replaceable by more complex models (see the next section), but the reactions in erythrocytes are measured for standard conditions only - that is normal concentration of DPG (5,0 mmol/l), fetal hemoglobin (0 mmol/l) and CO (0 mmol/l). To take these into account, the behavioral description would need to be radically extended by a number of dimensions, impairing the computational effectivity.
The various-complexity implementation
Our implementation in Modelica language enables switching complexity of a particular compartment. That is, we can use three different models for formulation of the physicochemical plasma compartment with various complexity: the simplest model of Fencl , the Figge-Fencl model , updated to version 3.0  to quantify albumin in detail, or Wolf’s plasma compartment from  in current version v3.51 to consider also effects of Mg2+ and Ca2+ binding on albumin). The trade-off is computational complexity. For description of the Siggaard-Andersen erythrocytes compartment, we include the original formulation of the Van-Slyke eq. , our exact formalization using the set of four sixth-order polynomials and the simplest model of Zander . Optionally, the computation can be enhanced with dilution. This allows to choose a simple to medium-complex description, based on current modeling needs. The full-blood component is supposed to be used in multiple arterial and venous parts of a complex model, thus the low complexity and robustness are vital.
Because the acid-base computations are highly non-linear, iterative algorithms which converge to the solution are often used (as employed by e. g. Siggaard-Andersen’s OSA , Figge-Fencl calculations  or even by the newest Wolf model  in the form of a running constraint-unknown optimization problem). From the authors observation, the algorithm may diverge and fail to find any solution or there might be more possible solutions to the formulation of the problem, therefore these models are often sensitive to the initial guess of unknown variables and could have problems for states far from the physiological norm (usually being the initial guess). This makes acid-base modeling particularly challenging, as small changes to guesses of state variables may lead to potentially invalid solution.
The numerical solvability of the equation-based models depends especially on the non-linearity of the problem, particularly on the Jacobian matrix condition number of the equation system. This is, however, very specific to the chosen tool and usage of the certain model and, regrettably, no such formal metric is currently established (F. Casella, personal communication, November 2017). For model comparison, we use a number of non-trivial equations, which might be a good indicator for overall model complexity. To assess the solvability, we propose to use the time needed to consistently initialize the equation set, that is to find exactly one solution. For harder tasks, the solver employs several iterative methods one after another to overcome the convergence problems caused by non-linearities, which will affect the initialization time. Sometimes, the solution may not be found. From our experience, these two metrics does not necessarily correspond to each other.
Wolf model  is the most complete mechanistic description of whole body acidbase. The model is available as a VisSim simulator, which is however unsuitable for integration into other models. Convergence to a solution of its original implementation takes approximately 5 - 20s on the reference computer. The computation time of our reimplementation in modern equation-based Modelica language is negligible (almost instant - see Fig. 5), however it uncovers numerical instabilities and thus this model, as a whole, is unsuitable to be a part of larger integrative model. Our Modelica implementation of Wolf’s E-P (erythrocyte - plasma) has 77 non-trivial (other than direct assignment) equations and is numerically hard to solve - some input settings (e.g. low pCO2 and high BE) lead to invalid solutions and some Modelica tools are even unable to compute the erythrocyte-plasma model correctly at all (yet does not have any problems with the proposed Combined model). Although we admire the level of detail of the Wolf’s mechanistic model, for our needs it is unnecessarily complex, even when reduced to E-P compartments.
The Combined model has been originally designed with focus on precise albumin computation (when the Figge-Fencl plasma model is employed) in combination with hemoglobine buffering. Although the albumin concentration is considered important, Figs. 2b and 3 suggest that the plasma protein buffer capacity is significantly lower than the buffer capacity of hemoglobin.
Clinical observations favor the second case, where the SID is reported normal during hypoproteinemic alkalosis . Some later studies [27, 39] challenge the existence of hypoproteinemic alkalosis in their study dataset, but we theorize that the effect (elevated BE) of albumin depletion in these studies has already been compensated. The exact explanation of this phenomenon is yet to be addressed by the full-body model, which would extend the currently presented model.
When the inner details of any component are not the objective in complex integrative modeling, we can significantly reduce the complexity by substituting it with the behavioral description, yet still retain mechanistic properties of other components and its interactions.
We present a method to quantify the interconnection of two generally used and well-known approaches to acid-base balance, using no additional parameters or assumptions other than passive ion exchange.
The resulting Combined model of full-blood acid-base balance unites the advantages of each approach: it can simulate variations in albumin level, buffer the effect of erythrocytes and predict a reaction to hemodilution and hemoconcentration, yet remains computationally simple. On the other hand, the proposed approach is insensitive to non-normal DPG, HbF and CO concentrations.
The combination gives an additional insight to the acid-base balance by establishing the relationship between the SID and the BE (using the defined NSID in the eq. (5)).
The model is designed to have a variable computational complexity and to be effectively extended by other bodily compartments (interstitial fluid, intracellular fluid, metabolism) and regulations (respiratory and renal) to assess the whole-body dynamic acid-base status.
We would like to thank to Karel Roubík and Arnošt Mládek for a careful review, to S.E. Rees for a great insight and invaluable comments and to Francesco Casella for discussion on numerical solvability of the equation-based models.
This study has been supported by the TRIO MPO FV20628 grant.
Availability of data and materials
Project name: Full blood acid-base
Project home page: https://github.com/filip-jezek/full-blood-acidbase/
Archived version: DOI https://doi.org/10.5281/zenodo.1134853
Operating system(s): Platform independent
Programming language: Modelica 3.2.1
Other requirements: For some parts, Physiolibrary is required (available at physiolibrary.org or bundled with OpenModelica)
License: GNU GPLv3
Any restrictions to use by non-academics: additional licence needed
JK initiated the study, FJ implemented the models and performed the comparative analysis. FJ and JK wrote the manuscript. All authors read and approved the final manuscript.
Ethics approval and consent to participate
Consent for publication
The authors declare that they have no competing interests.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
- 1.Siggaard-Andersen O, Others. The acid-base status of the blood. Munksgaard.; 1974.Google Scholar
- 3.Stewart PA. How to understand acid-base: A quantitative acid base primer for biology and medicine: Elsevier; 1981.Google Scholar
- 7.Kofranek J, Matousek S, Andrlik M. Border flux balance approach towards modelling acid-base chemistry and blood gases transport. In: In: Proceedings of the 6th EUROSIM congress on modelling and simulation. Ljubljana: University of Ljubljana; 2007. p. 1–9.Google Scholar
- 18.Ježek F. full-blood-acidbase. Github. https://doi.org/10.5281/zenodo.1134853.
- 19.Siggaard-Andersen O. Textbook on the Acid-Base and Oxygen Status of the Blood. Acid-Base and Oxygen Status of the Blood. 2010; http://www.siggaard-andersen.dk/OsaTextbook.htm. Accessed 7 Jul 2016
- 20.Figge J. The Figge-Fencl Quantitative Physicochemical Model of Human Acid-Base Physiology (Version 3.0). Figge-Fencl.org - Figge-Fencl Quantitative Physicochemical Model of Human Acid-Base Physiology. 27 October, 2013. http://www.figge-fencl.org/model.html. Accessed 22 Jun 2016.
- 30.Masevicius FD, Dubin A. Has Stewart approach improved our ability to diagnose acid-base disorders in critically ill patients? Pediatr Crit Care Med. 2015;4:62–70.Google Scholar
- 32.Matoušek S. Reunified description of acid-base physiology and chemistry of blood plasma: PhD. Charles University in Prague; 2013. https://is.cuni.cz/webapps/zzp/download/140030054/?lang=cs
- 36.Zander R. Die korrekte Bestimmung des Base Excess (BE, mmol/l) im Blut. AINS - Anästhesiologie · Intensivmedizin · Notfallmedizin. Schmerztherapie. 1995;30(S 1):S36–8.Google Scholar
Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated.