Changing the result of a simulation with changing the units

Hi,
If the injected amount in model compartments is in mole and the transfer rates are in 1/hour. I set the domensional analysis and unit conversion to be on. I used a nonlinear uptake rate as a repeated assignment rule in the model as follows:
k_ass = (kon/volume) * free_receptors
free_receptors is in nanomole, kon is in liter/(mole*hour) and volume iis in liter.
If I change the value of kon to be in liter/(nanomole*hour) and keep other units as they are, I will get different simulation results than that when I keep it as before in liter/(mole*hour).
Could you please explain the reason?
Thank you

9 Kommentare

Could you please explain the reason?
How could we with the information given ?
sounds like you have to do some unit conversion to create a standard.
@Torsten Your spoken language is not appropriate. Even if my question is unclear, your communication must remain respectful.
Torsten
Torsten am 17 Okt. 2024
Bearbeitet: Torsten am 18 Okt. 2024
I don't see anything unrespectful in my comment.
The information you gave us to find the reason for the different results does not suffice to give a useful answer - shortly speaking: How could we explain the reason with the information given ?
Sam Chak
Sam Chak am 17 Okt. 2024
Bearbeitet: Sam Chak am 17 Okt. 2024
Without further ado, does the analysis look like this?
Dimension analysis:
If the unit of kon is in liter/(nanomole*hour), then
@Sam Chak Thank you.
Yes. The simulaion results when the dimentional analysis of k-ass as follows:
k-ass = X ( [liter]/([mole]*[hour])] / [liter] ) * [nanomole]
is different than that if I change the units as follows:
[unit of k-ass] = X * 10-9 * ( [liter]/([nanomolemole]*[hour])] / [liter] ) * [nanomole]
with dimensional analysis and unit conversion is on, the output of the model should be the same for both cases, correct?
Can you provide the MATLAB script for the simple computation of k_ass? You can use random positive real numbers.
Without more details (ideally a way to reproduce the issue), it's difficult for me to say exactly what's going on. But if you turn on unit conversion and change the units of kon from liter/(mole*hour) to liter/(nanomole*hour), then you would need to multiply the numeric value of kon by 1e-9 to to preserve the same numeric behavior. If you've made such a change and you get different results, then I am surprised. My guess is that you changed something else without realizing it. It is also possible that you've run into a bug, but I think that's unlikely given the extensive testing that we've done of this functionality.
If you can provide reproduction steps, the community can more easily help you. If you can't provide reproduction steps, here are some suggestions.
  • You can double check that you correctly converted the numeric value of kon when you change the units by using sbiounitcalculator. For example:
sbiounitcalculator('liter/(mole*hour)', 'liter/(nanomole*hour)', 1)
  • You can compare two models exactly what's different by using the functionality described here.
  • You can inspect your model equations and initial conditions as described here.
  • You can use the SimBiology Model Debugger to step through your simulations to try to figure out where things go wrong.
Good luck!
Day
Day am 18 Okt. 2024
Bearbeitet: Day am 18 Okt. 2024
@Arthur Goldsipe Thank you Arthur, I appreciate your help.
The conversion of units was done correctly. However, all your suggestions will be taken into consideration.
Thank you very much

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Umar
Umar am 18 Okt. 2024

0 Stimmen

Hi @Day ,

The discrepancy in simulation results arises from the dimensional analysis and the inherent relationships between the units involved. When you define k_{ass} as:

k_ass = (kon/volume) * free_receptors

where ( kon ) is in liter/(mole*hour), the units of k_{ass} become consistent with the other parameters in the model. However, when you change ( kon ) to liter/(mole*hour), you effectively alter the scale of the rate constant without adjusting the units of ( free_receptors ) (which remains in nanomoles). This change leads to a different interpretation of the uptake rate, as the conversion factor between moles and nanomoles (1 mole = ( 10^9 ) nanomoles) must be accounted for. Consequently, the rate of receptor binding and the overall dynamics of the model will differ, resulting in varied simulation outcomes. It is crucial to maintain consistent units across all parameters to ensure accurate modeling and interpretation of results. To illustrate this, consider the following MATLAB code snippet:

% Parameters
volume = 1; % in liters
kon_mole = 0.1; % in liter/(mole*hour)
kon_nanomole = kon_mole * 1e-9; % converting to liter/(nanomole*hour)
free_receptors = 50; % in nanomoles
% Nonlinear uptake rate calculation
k_ass_mole = (kon_mole / volume) * (free_receptors * 1e-9); % in moles
k_ass_nanomole = (kon_nanomole / volume) * free_receptors; % in nanomoles
disp(['Uptake rate (mole): ', num2str(k_ass_mole)]);
disp(['Uptake rate (nanomole): ', num2str(k_ass_nanomole)]);

In this example, the uptake rates calculated using different units for k_on will yield different results, demonstrating the importance of consistent unit usage in simulations.

Please see attached.

Hope this helps.

4 Kommentare

Based on the keywords 'injected amounts,' 'compartment models,' and 'transfer rates,' it is likely that @Day is using the interactive SimBiology Model Analyzer app, assuming my natural language processing is still functioning well. However, we were not sure at this initially, as pharmacokinetic and pharmacodynamic models can also be described using standard MATLAB scripts.
@Umar @Sam Chak Thank you very mych for your insights and time.
Hi @Sam Chak,
Thank you for your insightful feedback regarding the use of the interactive SimBiology Model Analyzer app. I appreciate your observations about the potential application of compartment models and transfer rates in our analysis. Your point about the duality of pharmacokinetic and pharmacodynamic modeling—whether through SimBiology or standard MATLAB scripts—is well taken. It is indeed crucial to clarify our approach to ensure consistency and accuracy in our findings. Thank you once again for your valuable input.
Hi @Day,
You are welcome.

Melden Sie sich an, um zu kommentieren.

Kategorien

Produkte

Version

R2024a

Gefragt:

Day
am 17 Okt. 2024

Kommentiert:

am 19 Okt. 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by