Tagged: ansys-fluent, boundary-conditions, udf, udf-fluent
-
-
March 21, 2022 at 2:04 pm
isaps1860
SubscriberI 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:
#include "udf.h"
DEFINE_ADJUST(Face_area1, domain)
{
face_t face;
Thread* thread;
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;
begin_f_loop(face, thread)
{
F_AREA(va, face, thread); /* Obtain the area vector */
Area += NV_MAG(va); /* Obtain area magnitude */
}
end_f_loop(face, thread)
#if RP_NODE
Area = PRF_GRSUM1(Area);
#endif
node_to_host_real_1(Area);
#if RP_HOST
Message("Area of surface1 is %e ", Area);
#endif
}
Best regards
March 21, 2022 at 5:26 pmRob
Ansys 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 pmisaps1860
SubscriberThank 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 pmDrAmine
Ansys 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 amRob
Ansys 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- You must be logged in to reply to this topic.
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- 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
Top Contributors-
2688
-
2138
-
1355
-
1140
-
462
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.
-