poICFD SetTerminationCriterion
Specifies the criterion for integration termination in the streamline creation in the CFD Plot/Streamlines panel.
Syntax
poICFD_handle SetTerminationCriterion termination_mode termination_value
Application
HyperView Tcl Modify
Description
This command specifies when the integration of the streamline creation should be forced to
stop. There are different modes to define such termination criterion, however the
termination_mode argument should be one of the supported modes. You can
get a list of supported integration termination criterion modes from the CFD
Plot/Streamlines panel by using the GetTerminationCriteriaList command.
Note: You can specify multiple criteria at the same time. The integration will stop
whenever any one of the criteria is satisfied.
Inputs
- termination_mode
- The mode used to define the integration termination criterion. The valid modes are:
- max_length
- Used to limit the maximum length of an individual streamline. Valid values are any positive floats.
- max_num_steps
- Used to limit the total number of integration steps. Valid values are any non-zero nature numbers.
- terminate_speed
- Used to set the terminate speed. Allows you to inform HyperView to terminate the integration for the current streamline when the local speed (magnitude of velocity) is under a certain value, since such a speed is deemed as too slow to be meaningful for streamline creation. Note that terminate_speed specifies the speed as a percentage of the medium speed of the whole fluid field. You can get the medium speed from the CFD Plot/Streamlines panel by calling the GetMediumSpeed command The valid value range is from 0 - 100.
- termination_value
- The value used to define the integration termination criterion.
Example
To specify that the following integration termination criterion be used for streamline
creation:
- "the length of the individual streamline should not exceed 10.5"
- "the total number of integration steps should not exceed 5000"
- "the terminate speed is 0.001% of the medium speed"
hwi OpenStack
hwi GetSessionHandle session_handle
session_handle GetProjectHandle project_handle
project_handle GetPageHandle page_handle [project_handle GetActivePage]
page_handle GetWindowHandle window_handle [page_handle GetActiveWindow]
window_handle GetClientHandle client_handle
client_handle GetModelHandle model_handle [client_handle GetActiveModel]
model_handle GetResultCtrlHandle result_handle
result_handle GetCFDCtrlHandle CFD_handle
CFD_handle SetStreamLineColoredByMode seed
CFD_handle SetTerminationCriterion "Max_length" 10.5
CFD_handle SetTerminationCriterion "Max_num_steps" 5000
CFD_handle SetTerminationCriterion "Terminate_speed" 0.001
hwi CloseStack
Error
Returns HW_InvalidArgs if the criterion mode specified is not supported, or if the criterion value is out of the valid range.