September 27, 2017 at 11:19 amadminAnsys Employee
Could a Workbench input/output parameter be adjusted through a conditional expression (else, if, and, or)?
November 8, 2017 at 8:15 amVishal GanoreAnsys Employee
Yes and this will be done via expression tab for the input as well as output parameter. There we have to be careful with the units. Note that the format is “value if argument else another-value if argument … else default-value.” The expression and mathematical function evaluation in Workbench is based on the Python 2.6 programing language. All python numeric and function capabilities can be used. Here are some sample logical expressions: Simple: 500 if P1 == 15 else 250 With several parameters: 500 if P1 + P3 < 15 else 250 With units: 125 [mm] if P1 == 15 [mm] else 250 [mm] With an interval: 450 [K] if 5 [kg/s] < P1 < 15 [kg/s] else 300 [K] With or/and operators: 500 [MPa] if P1 < 15 [mm] and P3 >= 50 [m s^-1] else 250 [MPa] 500 [MPa] if P1 < 15 [mm] or P3 >= 50 [m s^-1] else 250 [MPa] With “logical” output: ‘Yes’ if P1 >= 8 else ‘No’ if P1 <= 7 With several conditions: 117 if P1 >= 8 else 102 if P1 == 7 else 69 if P1 == 6 else 3 These examples would be then given in the Expression Field of the parameter under the properties of the outline. For more information refer to ANSYS Help: ANSYS Documentation > ANSYS Workbench Documentation > User’s Guide > Working with Parameters and Design Points > Parameters > Custom Parameters.
- You must be logged in to reply to this topic.
Simulation World 2022
Earth Rescue – An Ansys Online Series
- Suppress Fluent to open with GUI while performing in journal file
- Heat transfer coefficient
- What are the differences between CFX and Fluent?
- Floating point exception in Fluent
- Time Step Size and Courant Number
- Difference between K-epsilon and K-omega Turbulence Model
- The solver failed with a non-zero exit code of : 2
- Floating point exception
- How to model free convection warming of liquid in a plastic bag