|
[Sponsors] |
February 17, 2013, 18:09 |
Question about C_UDMI use
|
#1 |
New Member
Join Date: Sep 2012
Posts: 11
Rep Power: 14 |
Hi friends,
I've had some questions about the use of C_UDMI for UDF coding. I've tried to interpret the following codes in FLUENT (two separate files): #include "udf.h" DEFINE_ADJUST(teste, domain) { Thread *t; cell_t c; thread_loop_c(t, domain) { begin_c_loop_all(c, t) { C_UDMI(c,t,0) = 1.; } end_c_loop_all(c, t) } } #include "udf.h" DEFINE_MASS_TRANSFER(mass_exchange_3, cell, thread, from_index,from_species_index, to_index, to_species_index) { real m_lg; m_lg = C_UDMI(cell, thread, 0); return (m_lg); } I don't have any problem interpreting this functions, but when I ran it in FLUENT I checked the mass transfer rate and I got 0.0. Moreover, in post processing the value of C_UDMI is also 0.0. There is any problem whith these codes? Please, help me with this issue... |
|
February 17, 2013, 19:10 |
|
#2 |
New Member
Join Date: Sep 2012
Posts: 11
Rep Power: 14 |
Friends,
I already solved this problem. Thank you! Regards, Natan |
|
November 14, 2018, 02:30 |
received a fatal signal - during calculation of evaporation using UDF
|
#3 | |
Senior Member
vidyadhar
Join Date: Jul 2016
Posts: 138
Rep Power: 10 |
Hello Natan,
I am also working on evaporation of a liquid using VOF method. I have written the following UDF (single file) for simulating mass transfer. After interpretation and initialization, I am facing this problem- Error: received a fatal signal (Segmentation fault). Error Object: #f when I press the "Run Calculate ----> calculate" button: ------------------------------------------------- I request you to help me what is wrong in the UDF. #include "udf.h" #include "sg_mphase.h" #define T_SAT 343 #define LAT_HT 339.8e3 #define CON 3.2 DEFINE_ADJUST(my_adjust,d) { real source; Thread *t0; face_t f; cell_t c0; int ID=3; /* 3 IS THE ZONE ID FOR MENISCUS AS SEEN IN BOUNDARY CONDITIONS PANEL*/ /*BELOW MENTIONED IS THE POINTER FOR DOMAIN OF PHASE*/ Domain *domain = Get_Domain (3); /*CHECK WHETHER I HAVE TO SPECIFY 1-MIXTURE OR 2-PRIMARY PHASE OR 3-SECONDARY PHASE.*/ Thread *thread = Lookup_Thread(domain,ID); begin_f_loop(f,thread) { /*TO SELECT ONE LAYER OF CELLS ADJACENT TO MENISCUS*/ c0 = F_C0(f,thread); /*See ADJACENT CELL INDEX*/ t0 = THREAD_T0(thread); /*See ADJACENT CELL THREAD*/ source= 0.002; /*MENTION SOURCE HERE*/; if(C_T(c0,thread) >= T_SAT) { C_UDMI(c0,t0,0)=source; } } end_f_loop(f,thread) /*the semicolon should be present or not check*/ } DEFINE_MASS_TRANSFER(liq_gas_source,cell,mix_th,fr om_index,from_species_index,to_index,to_species_in dex) { real m_lg=0; Thread *liq=THREAD_SUB_THREAD(mix_th,from_index); Thread *gas=THREAD_SUB_THREAD(mix_th,to_index); m_lg=C_UDMI(cell,liq,0); return (m_lg); } -------------------------------------------- Quote:
|
||
November 14, 2018, 23:54 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
did you set correct number of UDMs in FLuent GUI, which you are using in code?
user-defined -> memory -> UDM Locations switch to 1 best regards |
|
November 15, 2018, 00:03 |
|
#5 | |
Senior Member
vidyadhar
Join Date: Jul 2016
Posts: 138
Rep Power: 10 |
Quote:
Thanks for the reply. Yes, I have swithced UDM locations to 1. Even then, I am facing the problem: Error: received a fatal signal (Segmentation fault). Error Object: #f I wanted to apply the source terms on one layer of cells adjacent to "meniscus" boundary zone (with Zone ID=3) in the liquid phase domain(Domain ID=3). May I request you to correct me if I have done any mistake in the UDF. Is there any mistake in the "loop" of the code? Is placing C_UDMI under DEFINE_ADJUST and using it in DEFINE_MASS_TRANSFER works? Thanks in advance! Vidyadhar |
||
Tags |
fluent, mass transfer, udf, udmi |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question Re Engineering Data Source | imnull | ANSYS | 0 | March 5, 2012 14:51 |
internal field question - PitzDaily Case | atareen64 | OpenFOAM Running, Solving & CFD | 2 | January 26, 2011 16:26 |
question on bounday layer modeling | Wen Long | Main CFD Forum | 2 | November 12, 2005 18:29 |
Poisson Solver question | Suresh | Main CFD Forum | 3 | August 12, 2005 05:37 |
Philosophical CFD question | Richard Howe | Main CFD Forum | 14 | June 17, 2001 15:41 |