|
[Sponsors] |
January 8, 2014, 19:36 |
Mass transfer UDF expecting void return
|
#1 | |
New Member
Join Date: Jan 2014
Posts: 2
Rep Power: 0 |
Hello everyone,
I am trying to write a DEFINE_MASS_TRANSFER UDF for my FLUENT model. The code is attached below. This is a test UDF since it just returns a single value at the moment. My UDF can be interpreted(via Define -> User-Defined -> Functions -> Interpreted...) without errors, and I can select the specific UDF in my model afterwards, but when I try and run my model, the following errors come up. What am I doing wrong? Any help would be appreciated; I'm new at this. Quote:
Code:
// UDF to define a simple mass transfer based on simple diffusion from One to Two #include "udf.h" DEFINE_MASS_TRANSFER(simple_diff,cell,thread,from_index,from_species_index,to_index,to_species_index) { real m_ot, D_ot; real est_area, flux_ot; Thread *one = THREAD_SUB_THREAD(thread,from_index); Thread *two = THREAD_SUB_THREAD(thread,to_index); //m_ot = 0.; //D_ot = 9.31*pow(10,-9); //est_area = pow(C_VOLUME(cell,one),2.0/3.0); //flux_ot = -D_ot*(C_YI(cell,one,from_species_index)-C_YI(cell,two,to_species_index)); //m_ot = flux_ot*est_area*1.7*pow(10,-27)*6*pow(10,23)*C_VOLUME(cell,one); //return (m_ot); real X = 5.0; return(X); } |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 08:00 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |
Hooking a DPM Particle Heat and Mass Transfer UDF to FLUENT | subhankar_bhandari | Main CFD Forum | 0 | August 19, 2010 04:01 |
writing UDF for modelig mass transfer for VOF | ardalan soleymani | FLUENT | 0 | July 11, 2007 02:09 |
Heat and Mass Transfer UDF | Srinivas Parimi | FLUENT | 3 | August 22, 2005 14:49 |