-
-
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 amvganoreAnsys 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.
-
- The topic ‘Workbench input/output parameter be adjusted through a conditional expression (else, if, and, or)’ is closed to new replies.
- Non-Intersected faces found for matching interface periodic-walls
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Cyclone (Stairmand) simulation using RSM
- error udf
- Diesel with Ammonia/Hydrogen blend combustion
- Fluent fails with Intel MPI protocol on 2 nodes
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script error Code: 800a000d
- Encountering Error in Heterogeneous Surface Reaction
-
1191
-
513
-
488
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.