-
-
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.
- How do you approach this?
- Convective Augmentation Factor in DEFINE_HEAT_FLUX
- Conservation issue with a UDS solution
- Where is the Electrolyte Projected Area in the Reports tab of PEMFC Model?
- ANSYS fluent – Rocky DEM coupling
- Solar load , Mesh Orientation and Beam direction
- Non-Premixed Combustion PDF generation with 4th-order interpolation
-
446
-
199
-
194
-
166
-
162
© 2024 Copyright ANSYS, Inc. All rights reserved.