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.
Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.
Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Suppress Fluent to open with GUI while performing in journal file
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Difference between K-epsilon and K-omega Turbulence Model
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error in cfd post
© 2023 Copyright ANSYS, Inc. All rights reserved.