-
-
December 12, 2020 at 7:47 am
bradenkerr
SubscriberHello, nI 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 nif ( 0[m]Y>-.1[m], acos(X/.05[m], acos(X/.05[m]))nThis would define theta as positive when its in on the upper half of either cylinder, or negative when its on the bottom. nI 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. nAny help is appreciated. n -
December 12, 2020 at 8:04 am
Amine Ben Hadj Ali
Ansys EmployeeWhat about using abs function?n -
December 12, 2020 at 8:12 am
bradenkerr
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. n if ( 0[m]December 12, 2020 at 12:26 pmAmine Ben Hadj Ali
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.nDecember 13, 2020 at 3:08 ambradenkerr
SubscriberIm a student so unfortunately cant access that page. nDecember 14, 2020 at 10:07 amAmine Ben Hadj Ali
Ansys EmployeeYou can access the Online Help Just hit F1.nDecember 14, 2020 at 10:15 amAmine Ben Hadj Ali
Ansys EmployeeSomething like this should work: if ( ((0[m]0.1[m])), Value if TRUE, Value if FALSE)nViewing 6 reply threads- The topic ‘If-elseif-else statements within cfd post expression’ is closed to new replies.
-
Innovation Space
Trending discussions
- air flow in and out of computer case
- Varying Bond model parameters to mimic soil particle cohesion/stiction
- Eroded Mass due to Erosion of Soil Particles by Fluids
- I am doing a corona simulation. But particles are not spreading.
- Centrifugal Fan Analysis for Determination of Characteristic Curve
- Issue to compile a UDF in ANSYS Fluent
- Guidance needed for Conjugate Heat Transfer Analysis for a 3s3p Li-ion Battery
- JACOBI Convergence Issue in ANSYS AQWA
- affinity not set
- Resuming SAG Mill Simulation with New Particle Batch in Rocky
Top Contributors
-
4167
-
1487
-
1363
-
1194
-
1021
Top Rated Tags
© 2025 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.