-
-
July 3, 2019 at 8:00 pm
zakmt293
SubscriberGreetings
Respected experts I hope this post finds you fine. I have this UDF and have been working on it from the last week but I am unable to get my way out. If you people can go through it and just point out where the mistake is. I do know that in UDF no help is allowed on this forum but I have no other place. It gives an error like this "Received signal SIGSEGV."
# include "udf.h"
# include "mem.h"
# include "sg.h"
DEFINE_ADJUST(my_adjust,domain)
{
Domain *d;
Thread *t,*t0,*t1=NULL;
cell_t c,c0,c1=-1;
face_t f;
int phase_domain_index_p=0;
int phase_domain_index_s=1;
Thread *tp=THREAD_SUB_THREAD(t,phase_domain_index_p=0);
Thread *ts=THREAD_SUB_THREAD(t,phase_domain_index_s=1);
real xc[ND_ND];
real A[ND_ND],dr0[ND_ND],dr1[ND_ND], es[ND_ND],ds,A_by_es;
d=Get_Domain(1);
if (FLUID_THREAD_P(t)) return;
begin_f_loop(f,t)
{
INTERIOR_FACE_GEOMETRY(f,t,A,ds,es,A_by_es,dr0,dr1)
t1=THREAD_T1(t);
c0=F_C0(f,t);
t0=THREAD_T0(t);
c1=F_C1(f,t);
if (C_VOF(c0,tp)>0 && C_VOF(c0,tp)<1)
{
Message("We have reached to desire objectiven");
}
end_f_loop(f,t)
}
}
Also my major aim is to loop over all the faces in my domain. And then retrieve information of both adjacent cell c0 and c1 if a face is in fluid domain. Else if face is on boundary then only info about c0 would be retrieved.The above mentioned UDF is a progress toward the objective in aforementioned line.
Can you recommend me a very good and effective strategy that could solve my problem. I can add up more details if required. I would be thankful if guided as it is very necessary for me to move forward.
Thank You
-
July 4, 2019 at 6:48 am
DrAmine
Ansys EmployeeI recommend having a look into the customization manual.
What I understand here is that the the UDF has to be applied on non Fluid thread? Is this expected?
You forgot a thread loop of all threads in the domain if you are not focusing on certain thread ID.
-
July 5, 2019 at 7:14 pm
zakmt293
SubscriberGreetings
Respected Sir Amine I am going through Manual as well. I am working on it. I will again post my progress with detailed steps. I am very thankful for your value able suggestion and expect that I would be helped if there was an issue. Let me comeback with more knowledge and more preparation.
Thank You
Best Regards
Ahmad
-
- 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.
- 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
-
3682
-
2552
-
1751
-
1232
-
584
© 2023 Copyright ANSYS, Inc. All rights reserved.