4.4.6. Feature Toggling
For transient analysis Aria provides a mechanism for enabling and disabling certain aspects of a model like boundary conditions, contact conditions, source contributions and element block physics during selected time periods. This option is useful when modeling a time sequence of discontinuous events and the capability will be subsequently referred to as “toggling”. Toggling as applied to simple electric switches means that one either opens or closes the switch (i.e. the switch is on or off). Similarly, from an analysis perspective one simply defines a specific model feature to be either active or inactive. Toggling does not imply the ability to swap in another physics model or to apply different model parameters.
Generally speaking the use of toggling is justified when a change in model physics will result in a change to the structure of the system matrix or to the structure of linear system contributions. For example, change of a flux boundary condition to a Dirichlet boundary condition requires a change to the structure of the matrix contribution since unknown values are now specified and need not be computed. Similarly, deactivation of a element block will remove degrees-of-freedom (rows and columns) from the Jacobian matrix thus reducing the number of system unknowns. Note that a change of flux boundary condition input parameters (e.g. the convective coefficient) will modify the system matrix coefficients but not affect the structure of the associated linear system matrix contributions so feature toggling is not justified in this case. Instead parameter changes in time should be accounted for through the parameter model definition.
Setting up toggling requires two specifications in the input deck. First, the active/inactive state history of a feature is defined using a TOGGLE BLOCK command block at the SIERRA scope. This command block specifies whether associated features should be active or inactive during each transient block of the simulation. Second, the features that are being toggled must be associated with the corresponding toggle block.
Contact, source terms, boundary conditions, and initial conditions defined via block commands are associated with a toggle block via the USE TOGGLE BLOCK command line. Source terms, boundary conditions, and initial conditions defined via single line commands are associated with a toggle block via an argument “toggle = toggle_block_name” at the end of the line command. Toggling of an entire element block is established via a standalone USE TOGGLE BLOCK command line within the Region scope. For toggling of the element block associated with a bulk fluid element we note that the corresponding element block name is BLOCK_FOR_bulk_element_name.
Toggling is supported for flux boundary conditions, contact conditions and source terms by simply zeroing out their contributions. Thus the number of DOF in the linear system will not change. Toggling of Dirichlet boundary conditions and element blocks is currently supported by removing the element DOF from the linear system.
Oftentimes one may wish to toggle off a surface boundary condition and toggle on a variant of the same boundary condition. As an example, one might replace a convective flux boundary condition with constant reference temperature with one having a reference temperature defined by a tabular function. Since the original boundary condition still exists (but it’s toggled off) the reference temperature definition will conflict with the new boundary condition. Cases such as this will require that the second boundary condition be applied to a different surface (differently named) that overlies the surface used in the original boundary condition in order to resolve this conflict.
Note
Toggling is not supported for material properties.
Usage of toggling is demonstrated in the outline below where we note that the time period within the TOGGLE BLOCK corresponds to one of the time periods defined within the Solution Control command block. A full command reference is provided in the command summary.
Begin Sierra myJob
.
Begin Toggle Block first_toggle
period = a_time_period_2
state = active
End
.
Begin Toggle Block second_toggle
period = a_time_period_3
state = inactive
End
Begin Toggle Block third_toggle
period = a_time_period_3
state = active
End
.
Begin Procedure My_Aria_Procedure
.
Begin Solution Control Description
Use system main
Begin system main
Simulation start time = 0.0
Simulation termination time = 3600.0
Begin transient a_time_period_1
advance My_Region
End
Begin transient a_time_period_2
advance My_Region
End
Begin transient a_time_period_3
advance My_Region
End
End
Begin parameters for transient a_time_period_2
start time = 0.0
termination time = 2.0
Begin parameters for Aria region My_Region
.
End parameters for Aria region My_Region
End parameters for transient a_time_period_2
Begin parameters for transient a_time_period_2
start time = 2.0
termination time = 5.0
Begin parameters for Aria region My_Region
.
End parameters for Aria region My_Region
End parameters for transient a_time_period_2
End
.
Begin Aria Region My_Region
.
Use toggle block first_toggle for block_8
.
Begin Volume Heating h1
.
use toggle block first_toggle
End
Source for energy on block_1 = constant value=1 toggle=second_toggle
Begin Heat Flux Boundary Condition bc1
.
Use toggle block second_toggle
End
BC Dirichlet for temperature on surface_3 = constant value = 400 toggle=third_toggle
.
End
.
End
.
End Sierra myJob
Note that if one wishes to replace a boundary condition (the physics model) then one can do so by first adding a duplicate surface mesh entity and adding a new toggle block corresponding to usage of the new physics model.
It is important to note that within a TOGGLE BLOCK only one event (active or inactive) can be specified for the selected time period(s). Time periods other than the ones specified within the TOGGLE BLOCK command block will assume the opposite character (active/inactive). With reference to the previous outline this behavior is demonstrated by simple examples.
For the following toggle block
Begin Toggle Block my_toggle
period = a_time_period_2
state = active
End
a feature is active for a_time_period_2 and inactive for a_time_period_1 and a_time_period_3. Similarly the same behavior could be obtained using
Begin Toggle Block my_toggle
period = a_time_period_1 a_time_period_3
state = inactive
End