Perform dimensional analysis on model
DimensionalAnalysis property specifies
whether to perform dimensional analysis on the model before simulation.
It is a property of the
the model's compile time options and is the object property of the
DimensionalAnalysis is set to
the SimBiology® software checks whether the physical quantities
of the units involved in reactions and rules, match and are applicable.
For example, consider a reaction
a + b —>
c. Using mass action kinetics, the reaction rate is defined
k is the rate
constant of the reaction. If you specify that initial amounts of
0.01M and 0.005M respectively, then units of
If you specify
k with another equivalent unit definition,
whether the physical quantities match. If the physical quantities
do not match, you see an error and the model is not simulated.
Unit conversion requires dimensional analysis. If
off, and you turn
UnitConversion on, then
turned on automatically. If
UnitConversion is on
and you turn off
turned off automatically.
If you have MATLAB® function calls in your model, dimensional analysis ignores any expressions containing function calls and generates a warning.
Valid physical quantities for reaction rates are amount/time, mass/time, or concentration/time.
|Applies to||Object: |
SimBiology allows exponentiation of any dimensionless quantity
to any dimensionless power. For example, you can write the following
expression if both
(x + 3)^(a + 0.5)
false, units are not used. However, SimBiology still
performs a minimum level of dimensional analysis to decide whether
a reaction rate is in dimensions of amount/time or concentration/time.
units (if not empty) must have consistent dimensions so that SimBiology can
perform dimensional analysis. However, the units are not converted.
UnitConversion is set to
DimensionalAnalysis to be
SimBiology performs a dimensional analysis and converts everything
to consistent units. Hence, you must specify consistent units, and
no units can be empty. If you have a dimensionless parameter, you
must still set its unit to
If you have a custom function and
on, follow the recommendation below.
Non-dimensionalize the parameters that are passed to the function if they are not already dimensionless.
Suppose you have a custom function defined as
y = f(t) where
the time in hour and
y is the concentration of
a species in mole/liter. When you use this function in your model
to define a repeated assignment rule for instance, define it as:
= f(time/t0)*s0, where
time is the simulation
t0 is a parameter defined as 1.0 hour,
a parameter defined as 1.0 mole/liter, and
the concentration of a species in mole/liter. Note that
not have to be in the same units as
but they must be dimensionally consistent. For example, the
can be set to minute and picomole/liter, respectively.
This example shows how to retrieve and set
the default configuration set in a model object.
Import a model.
modelObj = sbmlimport('oscillator')
SimBiology Model - Oscillator Model Components: Models: 0 Parameters: 0 Reactions: 42 Rules: 0 Species: 23
configset object of
the model object.
configsetObj = getconfigset(modelObj) Configuration Settings - default (active) SolverType: ode15s StopTime: 10.000000 SolverOptions: AbsoluteTolerance: 1.000000e-006 RelativeTolerance: 1.000000e-003 RuntimeOptions: StatesToLog: all CompileOptions: UnitConversion: true DimensionalAnalysis: true
optionsObj = get(configsetObj,'CompileOptions') Compile Settings: UnitConversion: true DimensionalAnalysis: true
Assign a value of