-
-
September 19, 2023 at 1:33 am
aliborhan
SubscriberHello,
I have a multiblock domain with four different zones (two fluid zones and two porous zones). The UDF I'm using includes the macro DEFINE_PROFILE. It appears that calculations are performed twice during each iteration! Furthermore, when I run the simulation in parallel mode with two processors, the information is printed four times on the console. Why is this happening?
I appreciate your guidance in advance!
-
September 20, 2023 at 1:35 pm
aliborhan
SubscriberHello,
I have a multiblock domain with four different zones (two fluid zones and two porous zones). The UDF I'm using includes the macro DEFINE_PROFILE. It appears that calculations are performed twice during each iteration! Furthermore, when I run the simulation in parallel mode with two processors, the information is printed four times on the console. Why is this happening?
I appreciate your guidance in advance!
-
September 20, 2023 at 2:28 pm
Rob
Ansys EmployeePlease post the code. I'm not going to debug it but may see something when having a quick look.
-
September 20, 2023 at 3:10 pm
aliborhan
Subscriber#include "udf.h"DEFINE_ON_DEMAND(store_resistance){Domain *domain;Thread *t, *tt;cell_t c;int mem_1_id = 9;domain = Get_Domain(1);t = Lookup_Thread(domain,mem_1_id);/* Fill the UDM with initial resistance */begin_c_loop (c,t){C_UDMI(c,t,0) = 1.0e12;}end_c_loop (c,t)}//----------------------------------DEFINE_PROFILE(vis_res,t,i){cell_t c;begin_c_loop(c,t){if ( N_TIME <= 1.0 ){F_PROFILE(c,t,i) = C_UDMI(c,t,0);}if ( N_TIME > 1.0 ){F_PROFILE(c,t,i) = 1.1*C_UDMI(c,t,0);C_UDMI(c,t,0) = F_PROFILE(c,t,i);}}end_c_loop(c,t)}This is a test code. I just wanted to make sure that the variable of interest is updated and multiplied by "1.1" during each iteration. But after each iteration, it is multiplied by "1.21=1.1*1.1".
-
September 20, 2023 at 4:09 pm
Rob
Ansys EmployeeNot sure. What is N_TIME?
-
September 20, 2023 at 4:29 pm
aliborhan
SubscriberThe computational domain is 2D and I hooked the same UDF in two places, specifically for "Viscous Resistance: Direction-1" and "Viscous Resistance: Direction-2," that results in duplicated calculations.
-
September 20, 2023 at 4:31 pm
aliborhan
SubscriberN_TIME is an integer number of time steps.
-
September 21, 2023 at 7:30 am
Rob
Ansys EmployeeSo, two zones and two entries, one of those may be why it's updating twice.
-
- 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.

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.
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Difference between K-epsilon and K-omega Turbulence Model
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Suppress Fluent to open with GUI while performing in journal file
- Mesh Interfaces in ANSYS FLUENT
- Time Step Size and Courant Number
- error: Received signal SIGSEGV
-
7658
-
4476
-
2957
-
1433
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.