measure create computed
Adams View computed measures allow you to create measures in the Adams View expression language that can be evaluated before a simulation or any time after. You build them using design-time functions and typically use them in the initial model set up.
An Adams View computed measure is convenient because it can reference any Adams View variable. For example, if you create two measures and you want to add or subtract them, you can use an Adams View computed measure to do so. You can also compute data from a run-time measure.
Format:
measure create computed |
|---|
measure_name = | new computed measure |
text_of_expression = | string |
units = | string |
create_measure_display = | boolean |
legend = | string |
comments = | string |
Example:
Assuming that ADAMS_KE is an existing measure of the kinetic energy of a pendulum and MY_KE is an existing analytical measure if the kinetic energy.
measure create computed & |
|---|
measure_name = | my_measure_computed & |
text_of_expression = | “100*(.model_1.adams_ke - .model_1.my_ke)/322.6” & |
units = | “no_units” & |
legend = | “measure comparison of analytical and kinetic energy results” |
Description:
Parameter | Value Type | Description |
|---|
measure_name | New measure name | Specifies name of the computed measure |
text_of_expression | String | The TEXT_OF_EXPRESSION parameter defines the computation to be performed by the function. Remember that the value of this argument should be a character string, NOT an expression. |
units | String | Specifies units of the measure. |
create_measure_display | Yes/No | Specifies whether the strip chart has to be displayed of the measure. |
Legend | String | Specifies the text that will appear at the top of the created measure. |
comments | String | Specifies any comments. |
Cautions:
1. Be careful, however, about the changes you make in your model. Making changes can cause a potential problem because model changes can invalidate the accuracy of any measure that depends on the results of a simulation. The simulation redefines the model data and re-evaluates your Adams View computed measures.