-
-
February 21, 2021 at 1:49 pm
Nitin_Bansal
Subscriberhello
i am trying to compile my udf for continuity source term. my udf and error dialog of fluent both attached below. please tell me that problem is in my udf or anything else.
thanks
February 21, 2021 at 3:28 pmYasserSelima
Subscriberadd semicolon ;nreal m_lv;nand nreal sat_t=30.3;nnFebruary 21, 2021 at 3:55 pmYasserSelima
Subscriberthe two lines start with m_lv and the return line as wellnFebruary 21, 2021 at 5:41 pmNitin_Bansal
Subscriberthe two lines start with m_lv and the return line as well/forum/discussion/comment/107562#Comment_107562
i didn't get it, what do you want to say.nFebruary 21, 2021 at 6:39 pmYasserSelima
Subscriberyour UDF wasn't compiled wether for serial or parallel.nYou have errors in the function ... you should find the error messages after you press build.nnThe errors I can see in your function are missing semicolons at the end of 4 lines ... nso, add semicolon at the end of the lines starting with nm_lv = ...nand nreturn ... nFebruary 22, 2021 at 11:04 amNitin_Bansal
Subscribernthanks for notify menactually i want to know that T_l and T_v defined by me is right or wrong. I read in udf manual that in multiphase we have to use subdomain to define values for individual liquid or vapor phase, i use c0 and pt0 for vapor phase which is my primary phase and c2 and pt2 for liquid phase which is my secondary phase. is this correct ?nFebruary 22, 2021 at 11:43 amYasserSelima
Subscriberwrong ... what model you are using?nFebruary 22, 2021 at 11:54 amRob
Forum ModeratorCan you post the code? Note, staff are not permitted to open attachments. I'm not going to debug the code but if there is something obvious I'll point it out. The first being there isn't a continuity source, we can add mass, energy, momentum etc. nFebruary 22, 2021 at 1:12 pmFebruary 22, 2021 at 1:53 pmRob
Forum ModeratorCompare the DEFINE_SOURCE line with the example given here. nWhich model are you using as temperature may or may not be on the mixture rather than the phase. nFebruary 24, 2021 at 10:37 amNitin_Bansal
SubscriberArray nthanksnI am using the VOF model and for simulation using ANSYS2020 R1. In the references followed by me, According to them we have to write a UDF for interfacial mass and energy transfer. All the references uses older version of ANSYS. i want to know in 2020 also I have to write UDF or not needed. If needed then my udf (shown below)is correct or not.n#Includeudf.hn#includeextfile.hn#define cr=0.1nDEFINE_SOURCE(mass_source,c,t,rhoL,rhoV,vofL,vofV)n{nreal m_lvnreal sat_t=20.3nreal T_v=C_T(c=0,pt0[vap_phase]);nreal T_l=C_T(c=2,pt2[liq_phase]);nif(T_l>=sat_t)n{nm_lv=cr*vofL*rhoL*((T_l-sat_t)/sat_t)n}nelse if(T_vFebruary 24, 2021 at 10:45 amAmine Ben Hadj Ali
Ansys EmployeeThat model is already in Fluent and you do not require and UDF. That is the default Lee Model.nViewing 11 reply threads- The topic ‘ERROR WHILE USING SOURCE UDF’ is closed to new replies.
Innovation SpaceTrending discussionsTop Contributors-
4678
-
1565
-
1386
-
1242
-
1021
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.
-
The Ansys Learning Forum is a public forum. You are prohibited from providing (i) information that is confidential to You, your employer, or any third party, (ii) Personal Data or individually identifiable health information, (iii) any information that is U.S. Government Classified, Controlled Unclassified Information, International Traffic in Arms Regulators (ITAR) or Export Administration Regulators (EAR) controlled or otherwise have been determined by the United States Government or by a foreign government to require protection against unauthorized disclosure for reasons of national security, or (iv) topics or information restricted by the People's Republic of China data protection and privacy laws.
