|
[Sponsors] |
the DEFINE_MASS_TRANSFER is only a interpreting udf IN ANSYS 14.0 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 13, 2012, 06:07 |
the DEFINE_MASS_TRANSFER is only a interpreting udf IN ANSYS 14.0
|
#1 |
New Member
Fangdian
Join Date: Aug 2012
Posts: 19
Rep Power: 14 |
HI
when i use the DEFINE_MASS_TRANSFER udf in ansys 14.0 . I compile the .c source file success ,then load it sucess as follows: ..... (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. 正在创建库 libudf.lib 和对象 libudf.exp Done. Opening library "F:\rongdi\seconddimension\libudf"... Library "F:\rongdi\seconddimension\libudf\ntx86\2ddp\libud f.dll" opened cell_vis liq_gas_source Done. ..... But when i use the liq_gas_source in Multiphase Model dialog box , a error found in the messgage box: Error: NO user-defined function have been loaded Error object: #f when i use it with Interpreting UDFs, it is OK! on the other time, I use it with compile udf in the ansys 12.1. it is also ok! why? thanks! fangdian PS: my .c source file> #include "udf.h" DEFINE_PROPERTY(cell_vis,cell,thread) /*viscosity*/ {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); } |
|
February 14, 2013, 09:37 |
|
#2 |
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 the compiled UDF can be easily selected in interaction menu.
|
|
February 15, 2013, 03:57 |
|
#3 |
New Member
Murdy Baskan
Join Date: Dec 2012
Posts: 4
Rep Power: 14 |
i have same problem in mass transfer udf i solved using these formulas:
1)Do not make copy pastes because of character set of program it gives direct errors 2)Do not use thread pointer like this Thread *liq = THREAD_SUB_THREAD(thread, from_index); Thread *soild = THREAD_SUB_THREAD(thread, to_index); instead use thread pointer like this Thread *liq; liq = THREAD_SUB_THREAD(thread, from_index); Thread *soild; solid = THREAD_SUB_THREAD(thread, to_index); i have solved my problem using these tips. Have a good day. |
|
February 15, 2013, 04:10 |
|
#4 |
Senior Member
SSL
Join Date: Oct 2012
Posts: 226
Rep Power: 15 |
Are you running in licensed version of Fluent?
Our problem is that the compiled UDF can not be hooked in interaction menu. It says "No user-defined functions have been loaded", but I have really compiled and loaded it. I am highly professional in UDF writing but couldn't solve this problem yet. |
|
September 12, 2014, 03:08 |
|
#5 | |
New Member
Sam
Join Date: Feb 2010
Posts: 4
Rep Power: 16 |
Quote:
Does anyone solve the problem? I have the same problem running in licensed version of Fluent. |
||
September 12, 2014, 05:28 |
|
#6 |
Senior Member
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 17 |
UDF-Manual 2.4.6. DEFINE_MASS_TRANSFER:
By default, FLUENT will attempt to hook mass transfer UDFs defined using DEFINE_LINEARIZED_MASS_TRANSFER. In order to hook a DEFINE_MASS_TRANSFER UDF to FLUENT, you must first issue the TUI command solve/set/expert and enter no at the Linearized Mass Transfer UDF? prompt. cheers |
|
September 12, 2014, 05:33 |
|
#7 | |
New Member
Sam
Join Date: Feb 2010
Posts: 4
Rep Power: 16 |
Quote:
|
||
April 19, 2016, 04:53 |
my once success
|
#8 |
New Member
Cheer
Join Date: Sep 2015
Posts: 1
Rep Power: 0 |
I created a new .cs file in the VS, and saved it as x.c (C program file). Then I copied the udf code into the programming text frame and deleted some of the spaces in the udf (maybe actually they are not all real space). Amazingly, the x.c works.
I don't know which step is the key, but it can be a bit of help. |
|
Tags |
define_mass_transfer |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Remeshing_ ANSYS 14.0_ System Coupling | acdesa | ANSYS | 4 | November 2, 2016 10:12 |
Ansys FLUENT UDF - Velocity profile (of known values) across edge / surface | emmkell | Fluent UDF and Scheme Programming | 2 | October 21, 2011 14:12 |
Ansys FLUENT UDF - Velocity profile (of known values) across edge / surface | emmkell | FLUENT | 0 | October 20, 2011 08:37 |
UDF Interpreting Error | stephen | Fluent UDF and Scheme Programming | 1 | May 8, 2010 02:10 |
Exporting results from CFX to ANSYS ?? | sohail ahmed | CFX | 1 | December 20, 2007 02:10 |