March 21, 2022 at 2:04 pmisaps1860Subscriber
I have written an UDF for Calculating the area of a surface. The UDF works perfect for the surface of an inlet or an outlet, but for an interior surface the values are wrong. A test example for a simple tube gives different results for inlet and interior surfaces although the areas should be identical.
Is there anything additional to consider for the calculations of the areas for interior?
UDF is below:
domain = Get_Domain(1);
int zone_id = 35;
thread = Lookup_Thread(domain, zone_id);
real NV_VEC(va); /* for storing area vector */
real Area = 0;
F_AREA(va, face, thread); /* Obtain the area vector */
Area += NV_MAG(va); /* Obtain area magnitude */
Area = PRF_GRSUM1(Area);
Message("Area of surface1 is %e ", Area);
Best regardsMarch 21, 2022 at 5:26 pmRobAnsys EmployeeTry summing the modulus of the area. Interiors don't have an aligned surface normal. It's why the Flux Reports don't pick up the interior faces.
March 21, 2022 at 5:40 pmisaps1860SubscriberThank you for your answer . Makes sense, that with no aligned surface normal there is no logical result.
But I have to ask what do you mean with "summing the modulus of the area"? Don┬┤t really understand that.
March 21, 2022 at 6:18 pmDrAmineAnsys EmployeeLook in the documentation you will see that on interior bcs not all variables are available and that you require other connectivity macro
March 22, 2022 at 10:53 amRobAnsys EmployeeIf the vector is random you may find the x-area to be positive or negative: hence sum the modulus (positive) values.
Viewing 4 reply threads
Ansys Innovation Space
- You must be logged in to reply to this topic.
Boost Ansys Fluent Simulations with AWS
Earth Rescue – An Ansys Online Series
Ansys BlogTrending discussions
- 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.