Dividing by compartment volume automatically:
Daniel Bending
on 10 Oct 2023
Latest activity Reply by Daniel Bending
on 12 Oct 2023
Hello all,
I've been trying to shift my workflow more towards simbiology, it has a lot of very interesting features and it makes sense to try and do everything in one place if it works well..! Part of my hesitancy into this was some bad experiences handling units in the past, though this was almost certainly all out of my own ignorance, relatedly:
Getting onto my question.
In this model I have a species traveling around the body via blow flow, think a basic PBPK model. My species are picomolarities, if everything is already in concentrations, why is it necessary to initially divide by the compartment volume? i.e. 1/Pancreas below.

If my model dealt in molar quantities this would make a lot of sense, the division would represent the transition to concentrations. This, however, now necessitates my parameters be in units of liter/minute, which is actually correct, but I'd like clarification on why it's correct, ha!
Perhaps this is more of a modelling question than a simbiology question, but if there are answers I'd love to hear them. Thanks!
2 Comments
Time DescendingSimBiology supports constructing a model where all the species have dimensions of concentration. And most reactions can also be written with dimensions of concentration/time. But some reactions involving multiple compartments (for example, when two reactants in different compartments) must be written with dimensions of amount/time. The reason this is necessary is that SimBiology always needs to know how to compute a reaction rate in amount/time so that it can perform mass balances. Note that you will need to put units on all the components in the model in order for SimBiology to know that your reaction rates have dimensions of concentration/time. You can find more details by searching for "Reaction Rate Dimensions" on this page.
Even when you write your reactions with dimensions of concentration/time, you will still see volume terms in the equations. That's basically unavoidable when you have species in concentration. But you should be able to write reactions using rate constants with the units you want. So, for example, kipl could have units of 1/minute. (In the case you mention where the units are liter/minute, this rate constant effectively includes the volume, so you could think of this as
, where the "amount" constant gives a rate in amount/time and the "conc" constant gives a rate in concentration/time).
, where the "amount" constant gives a rate in amount/time and the "conc" constant gives a rate in concentration/time).To illustrate this approach, I'm attaching a project where I've attempt to recreate your model with reaction units in concentration/time. When you view the equations for this model, you'll see the following:
Note that the primary difference from the equation you shared is that each of the subterms are now multiplied by tjhe appropriate compartment volume. So for all the reactions that originate in the Pancreas, you'll see the multiplication by Pancreas volume cancels out with the division by Pancreas volume. But for the reaction that originates in the Aterial compartment, you'll see that the rate now depends on the ratio of the two compartment volumes (since that reaction rate was written relative to the Arterial compartment).
Hopefully that clears things up a bit.
-Arthur
Sign in to participate