TAGGED: mass-fraction, udf, udf-fluent
-
-
February 2, 2021 at 4:45 amAbbasraza20000220SubscriberHello 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 amYasserSelimaSubscriberI can't see problem in the function. What kind of problems do you get?n
-
February 2, 2021 at 8:43 amAbbasraza20000220SubscriberWhen 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 pmRobForum ModeratorDoes the shadow wall bound the fluid region? n
-
February 2, 2021 at 6:56 pmYasserSelimaSubscribermy 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 amAbbasraza20000220SubscriberThanks 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 amAmine Ben Hadj AliAnsys 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 pmJack5864SubscriberHi 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
-
Viewing 7 reply threads
- The topic ‘mass fraction UDF’ is closed to new replies.
Ansys Innovation Space
Trending discussions
- Non-Intersected faces found for matching interface periodic-walls
- Script error Code: 800a000d
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Fluent fails with Intel MPI protocol on 2 nodes
- Cyclone (Stairmand) simulation using RSM
- error udf
- Diesel with Ammonia/Hydrogen blend combustion
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script Error
Top Contributors
-
1301
-
591
-
544
-
524
-
366
Top Rated Tags
© 2025 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.