•
|
If the Add initial value as variable check box is selected, a variable will be added containing the initial value of the dependent variable. This can be used to allow other initial value expressions to depend on a dependent variable’s expression. The variable will get a “physics scope” although the dependent variable itself has a “component scope”. A dependent variable with the fully scoped name root.comp1.u will then add a variable root.comp1.id.u_init for the initial value. The initial value for the time derivative, if present (the Set initial value on time derivatives check box is selected), gets the name root.comp1.id.du_dt_init. From the Physics Builder you can access these variables with the dep prefix using dep.u_init and dep_du_dt_init, respectively.
|
Using the dep prefix in initial value expressions for other variables than scalars must be done with some care. An initial value feature is typically created at the same time as the physics interface, before the size of the dependent variables have been decided. In such cases it may be necessary to use component syntax to get a proper default expression for the initial value setting — for example, {dep.u_init.1,dep.u_init.2,dep.u_init.3} for a 3-component vector.
|