TAGGED: mass-fraction, udf, udf-fluent
-
-
February 2, 2021 at 4:45 am
Abbasraza20000220
SubscriberHello to all,I have a problem in defining the UDF behind the shadow surface. For this, I have been using mass fraction specie (c1,t1) for shadow surface while for for defining mass fraction specie on the coupled wall I am using (c0,t0). Am I using right approach?.n#include udf.hn#include prop.hn#include sg.hn#include mem.hnn/*******************************************************************************/nnDEFINE_PROFILE(mfm_h, thread, position)n{nn double mh, mc, fh, fc;nn real x[ND_ND];n face_t f;n Thread *t0, *t1;n cell_t c0, c1;nn begin_f_loop(f, thread)n {nn c0 = F_C0(f, thread);n t0 = THREAD_T0(thread);n c1 = F_C1(f, thread);n t1 = THREAD_T1(thread);nn fh = C_YI(c0, t0, 0);n fc = C_YI(c1, t1, 0);nn mh = fh*0.95;n mc = fc+fh-mh; F_PROFILE(f, thread, position)= mh;nn }n end_f_loop(f, thread)nn}/*******************************************************************************/nn fc = C_YI(c1, t1, 0);n mc = fc+fh-mh;nThis is making problem when i remove both from the above, this UDF runs. As per given equation, I have to first define mass fraction on shadow surface which is Fc. Am I doing anything wrong? nPlease guide me seniors.nnRegards,nAbbas Razann -
February 2, 2021 at 5:11 am
YasserSelima
SubscriberI can't see problem in the function. What kind of problems do you get?n -
February 2, 2021 at 8:43 am
Abbasraza20000220
SubscriberWhen I used fc = C_YI(c1, t1, 0); mc = fc+fh-mh in the UDF, it gives #segmentation fault error. On removing, its working.nn -
February 2, 2021 at 12:26 pm
Rob
Ansys EmployeeDoes the shadow wall bound the fluid region? n -
February 2, 2021 at 6:56 pm
YasserSelima
Subscribermy first guess, you have different number of cells on each side of the interfacenadd this line to the udf nMessage(
side 0 c0= %f
side 1 c1=%f , c0, c1);nyou should find some lines printed before it crashes and you can see that c0 and c1 are not equal ... if yes, my guess is rightnnif the number of cells are identical on the two sides, try calling this by the host, then pass the values to the nodes n -
February 3, 2021 at 7:51 am
Abbasraza20000220
SubscriberThanks a lot for your suggestion Mr. YassernYes, Mr Rob, it is wall & shadow (coupled wall) bound fluid region.nIssue is resolved. Having another issue on loading UDF on wall & its shadow surface, solution isn't converging. What will be the reason as you can see in the screenshot line are parallel. But before loading UDF, its converging after few iterations. Now it has been past 3000.nRegards,nAbbas Razannn
-
February 3, 2021 at 9:45 am
DrAmine
Ansys EmployeeBit difficult here to help as you can have situations where on both sides you have different cell id's and for that reason one should start searching for the associations or better cell partners. This can be done via F_CENTROID and some tolerances. After that is fuillfied you can save the cell id and thread id in cell memories. Afterwards it is easy to loop over the faces of one side, access the cell id and thread id of the partner (on the other side) and do what one wants to do. This is how one would implement a membrane!n -
February 17, 2021 at 2:04 pm
Jack5864
SubscriberHi DrAmine,nnI am having a somewhat similar issue (I am using a membrane), and it seems like your approach here might be just what I need. I was hoping to ask you for more information on how one would go about using these cell partners. nFirstly, what DEFINE macro would be appropriate for this? Would it be something like DEFINE_ADJUST, looping over the faces and changing the values of the cells on either side of the wall, or using a two-sided wall and changing the values on either side of the wall? I ask because your answer mentions cells, but you talk about looping over the faces of one side of the wall and accessing the cell id and thread of the partner, but would the partner not be a face? Perhaps I am misunderstanding something about the cells/faces and their roles at the boundary.nAlso, how can the cell id be saved? Could it perhaps be saved as a UDMI? I couldn't find anything about this in the documentation.nnMany thanks,nJackn
-
- 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
- Difference between K-epsilon and K-omega Turbulence Model
- The solver failed with a non-zero exit code of : 2
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error: Received signal SIGSEGV
-
5290
-
3311
-
2471
-
1308
-
1016
© 2023 Copyright ANSYS, Inc. All rights reserved.