-
-
December 12, 2020 at 7:47 am
bradenkerr
SubscriberHello,
I am new to using Fluent and I am looking to create an expression in CFD post that has if-elseif-else structure. I am modeling two cylinders that are parallel in the z-axis direction and I have flow in the x direction. Hence, I have flow over the top and bottom of two cylinders. I want to plot the pressure vs theta around the cylinder, so I was hoping to use the following format but keep getting errors
if ( 0[m]
Y>-.1[m], acos(X/.05[m], acos(X/.05[m])) This would define theta as positive when its in on the upper half of either cylinder, or negative when its on the bottom.
I want to do this so I can create a chart that has all four lines overlaid and from what I understand all four need the same x axis variable to do that.
Any help is appreciated.
December 12, 2020 at 8:04 amDrAmine
Ansys EmployeeWhat about using abs function?
December 12, 2020 at 8:12 ambradenkerr
SubscriberSince I would like to chart all four "halfs" of the cylinders that are visable, using abs would map the bottom half of the upper and the lower half cylinder on the same values. Instead, I would like the bottom half of the top cylinder to be 0 to -90 and the top half of the bottom cylinder to be 0 to 90, hence the need for the or conditional. I realize my original if statement doesn't actually do that, so here is the fixed version, now I just need help figuring out how to properly implement it.
if ( 0[m]However, I also get the error that its an invalid function call, so I don't think I am typing it correctly in the first place. To clarify, Im typing this in the expression window, not in the command editor.
December 12, 2020 at 12:26 pmDrAmine
Ansys EmployeeIf relying on this https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v202/en/cfx_ref/i1346469.html is not working I will then check next week. Try to put the operands in parentheses.
December 13, 2020 at 3:08 ambradenkerr
SubscriberIm a student so unfortunately cant access that page.
December 14, 2020 at 10:07 amDrAmine
Ansys EmployeeYou can access the Online Help Just hit F1.
December 14, 2020 at 10:15 amDrAmine
Ansys EmployeeSomething like this should work: if ( ((0[m]0.1[m])), Value if TRUE, Value if FALSE)
Viewing 6 reply threads- The topic ‘If-elseif-else statements within cfd post expression’ is closed to new replies.
Ansys Innovation SpaceBoost 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.
Ansys Blog
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.
Trending discussions- legend min and max
- Ensight hot iron palette from an image
- Streamlines in EnSight using MRI data
- Import MRI data into Ensight
- FLUENT APPLICATIION ERROR
- Total Surface Heat Flux Calculation in Fluent
- Drop Test of a Water-Filled Tube
- Difference between “total pressure” and “absolute pressure”?
- Minimum Orthogonal Quality Less than 0.01 For Transonic Airfoil Flow Analysis
- obtaining pressure distribution by making points in ansys
Top Contributors-
8808
-
4658
-
3153
-
1680
-
1474
Top Rated Tags© 2023 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-