|
[Sponsors] |
the macro DEFINE_MASS_TRANSFER can't use as compile udf in ansys14.0 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 27, 2012, 11:31 |
the macro DEFINE_MASS_TRANSFER can't use as compile udf in ansys14.0
|
#1 |
New Member
Fangdian
Join Date: Aug 2012
Posts: 19
Rep Power: 14 |
hi,
These days, I use the macro DEFINE_MASS_TRANSFER in the ansys14.0, I found that this macro can't be correctly used as compiling UDF. In the C source file, i define two macros: one is the DEFINE_PROPERTY to set the material properties and the other is the DEFINE_MASS_TRANSFER to set the mass tranfer between two phases. #include "udf.h" DEFINE_PROPERTY(cell_vis,cell,thread) /*定义材料粘度*/ {real ga_visy; real temp=C_T(cell,thread); if(temp<=1773) ga_visy=2; else if(temp<=1853) ga_visy=1e-3*(119.003-0.061*temp); else if(temp<=1873) ga_visy=1e-3*(10.603-0.0025*temp); else if(temp<=1973) ga_visy=1e-3*(36.263-0.0162*temp); else ga_visy=3e-3; return ga_visy; } DEFINE_MASS_TRANSFER(liq_gas_source,cell,thread,fr om_index,from_species_index,to_index,to_species_in dex) { real m_lg; real T_frost=1773; Thread *liq = THREAD_SUB_THREAD(thread, from_index); Thread *soild = THREAD_SUB_THREAD(thread, to_index); m_lg = 0.; if (C_T(cell, soild) >= T_frost) { m_lg = -0.1*C_VOF(cell,soild)*C_R(cell,soild)*fabs(C_T(cel l,soild)-T_frost)/T_frost; } if ((m_lg == 0. ) && (C_T(cell, liq) <= T_frost)) { m_lg = 0.1*C_VOF(cell,liq)*C_R(cell,liq)*fabs(T_frost-C_T(cell,liq))/T_frost; } return (m_lg); } I compile the C source file and load them success which can be verified by the messages in the message window: ..... Done. Copied F:\rongdi\seconddimension/F:\rongdi\seconddimension est.c to libudf\src Copied F:\rongdi\seconddimension/F:\rongdi\seconddimension\udf.h to libudf\src (system "copy "E:\softwear\special\ansys14\ANSYSI~1\v140\fluent" \fluent14.0.0\src\makefile_nt.udf "libudf\ntx86\2ddp\makefile" " (chdir "libudf"() (chdir "ntx86\2ddp"() # Generating ud_io1.h test.c # Generating udf_names.c because of makefile test.obj udf_names.c # Linking libudf.dll because of makefile user_nt.udf udf_names.obj test.obj Microsoft (R) Incremental Linker Version 10.00.30319.01 Copyright (C) Microsoft Corporation. All rights reserved. Done. Opening library "F:\rongdi\seconddimension\libudf"... Library "F:\rongdi\seconddimension\libudf\ntx86\2ddp\libud f.dll" opened cell_vis liq_gas_source Done. .... Subsequently, I can use the cell_vis to chang the material property, but when i use the function "liq_gas_source" in the phase interaction window, I can't find the function and an error was found as follows: Error:No user-defined functions have been loaded. Error Object:#f IF i use the marco DEFINE_MASS_TRANSFER as interpreted UDF, it is OK. On the other hands, i can successly use this marco in the ansys12.0 as compile UDF. That is to say, I can't use the marco as compile UDF in the ansys 14.0 but only the interpreted UDF. Is the version problem??Or there is a defect in the ansys14.0 ? ps: My case file, mesh file and C source file is attached in the attachments. |
|
September 4, 2012, 03:31 |
|
#2 |
New Member
lzc
Join Date: Dec 2011
Posts: 3
Rep Power: 14 |
I have the same problem. I am searching for a solution.
|
|
September 4, 2012, 22:30 |
|
#3 |
New Member
Fangdian
Join Date: Aug 2012
Posts: 19
Rep Power: 14 |
||
September 5, 2012, 11:02 |
|
#4 | |
New Member
Tenglong Cong
Join Date: Jun 2011
Posts: 3
Rep Power: 15 |
Quote:
If there are any solutions, please send me a message, thank you! |
||
September 6, 2012, 02:49 |
|
#5 |
New Member
lzc
Join Date: Dec 2011
Posts: 3
Rep Power: 14 |
||
September 6, 2012, 07:58 |
|
#6 | |
New Member
Fangdian
Join Date: Aug 2012
Posts: 19
Rep Power: 14 |
Quote:
When I use the macro DEFINE_MASS_TRANSFER with interpreting way, there is only one DEFINE_PROPERTY macro except the macro DEFINE_MASS_TRANSFER. psid you use the parallel UDF with Windows system? As far as the error_10054, perhaps there are many reasons.You could search the possible answer on the internet. for example: http://cape-forum.com/index.php?topic=1283.0 Good luck to you! |
||
September 6, 2012, 08:01 |
|
#7 | |
New Member
Fangdian
Join Date: Aug 2012
Posts: 19
Rep Power: 14 |
Quote:
Sorry! I have not get the solutions with the mixture UDF. I will send you a message if i get the solution. Best Wishes! |
||
September 11, 2012, 13:07 |
|
#8 |
New Member
lzc
Join Date: Dec 2011
Posts: 3
Rep Power: 14 |
||
September 25, 2012, 03:33 |
|
#9 |
New Member
Fangdian
Join Date: Aug 2012
Posts: 19
Rep Power: 14 |
||
November 26, 2012, 10:12 |
|
#10 |
New Member
YG Kim
Join Date: Nov 2010
Posts: 15
Rep Power: 16 |
Did you succeed it? I try to implement UDF mass transfer by use of phase interaction tab, but I fail to run the calculation. How you can access the phase level temperature “C_T(cell, soild)”? I use VOF model that solves mixture level enthalpy equation instead of temperature type energy equation. In this sence, I couldn’t understand phase level temperature macro (C_T(cell, solid). Is there some physics I didn’t catch yet? Thank you.
Last edited by sooroo3; November 28, 2012 at 01:04. |
|
February 14, 2013, 09:35 |
|
#11 |
Senior Member
SSL
Join Date: Oct 2012
Posts: 226
Rep Power: 15 |
I have asked Ansys Fluent support team. The problem is with the cracked version of fluent. In licensed version it can be easily be selected in interaction menu.
|
|
November 22, 2013, 04:50 |
|
#12 | |
Member
mehdimoradi
Join Date: Jun 2013
Posts: 53
Rep Power: 13 |
Quote:
Could you access the phase level temperature? because i want to interpret a mass transfer udf but have a difficulty in definition of phase temperature. if you solved your problem anyway let me know kindly. thanks |
||
November 22, 2013, 07:36 |
|
#13 |
New Member
YG Kim
Join Date: Nov 2010
Posts: 15
Rep Power: 16 |
Mehdimoradi;
If VOF model is employed, there may be no way to access the phase level temperature because a enthalpy equation is solved for mixture level energy. Under one field assumption in multiphase flow, VOF method, usually, solves single set of Navier stokes as well as energy equation for two phase. |
|
August 23, 2014, 11:00 |
hamed.moradkhani@yahoo.com
|
#14 |
New Member
sarighulikhan
Join Date: Mar 2014
Posts: 15
Rep Power: 12 |
do the following and keep me inform about the results
+ first write case file and data file then hook the compiled udf 1.define->user-defined->functions->interprated.. interprate the q.c file 2.type on the command window of fluent solve(press enter) set(press enter) expert(press enter) answer for the 4 comming questions respectively are: no-yes-no-yes after these 2 steps u can hook the udf from phase intraction->mass tab->user defined->selecting udf... now you can start runing calculation |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 07:05 |
DPM UDF particle position using the macro P_POS(p)[i] | dm2747 | FLUENT | 0 | April 17, 2009 02:29 |
udf compile in parallel system | tahereh | FLUENT | 1 | December 9, 2008 10:48 |
DEFINE_DPM_OUTPUT macro UDF HELP | Puneet | FLUENT | 3 | November 28, 2003 11:55 |
compile the UDF | Li Jingping | FLUENT | 2 | April 14, 2003 22:18 |