|
[Sponsors] |
September 8, 2006, 12:27 |
define mass transfer - define source
|
#1 |
Guest
Posts: n/a
|
hi I have a probblem with boiling (defined by DEFINE_MASS_TRANSFER or DEFINE_SOURCE) using standard (provided by Fluent) tutorials - means udf`s from I can get boiling of water (both in VOF and Mixture model) but.... the temperatures are stupid. In liquid pase temperature is OK but in gas phase it reach maximum or minimum temperature (from temp. on beginning = 350K to 1K or 5000K which are max and min. temperatures in FLUENT). Do you happen to know what to do? Meybe you had the same problem. regards g
|
|
July 14, 2016, 13:48 |
|
#2 |
Senior Member
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 16 |
FLUENT will automatically include the terms needed to model mass transfer in all relevant conservation equations. Another option to model mass transfer between phases is through the use of user-defined sources and their inclusion in the relevant conservation equations. This approach is a more involved but more powerful, allowing you to split the source terms according to a model of your choice.
FLUENT provides a DEFINE_MASS_TRANSFER that you can use to input models for different types of mass transfer, e.g. evaporation, condensation, boiling, etc. Note that when using this UDF, FLUENT will automatically add the source contribution to all relevant momentum and scalar equations. This contribution is based on the assumption that the mass "created'' or "destroyed'' will have the same momentum and energy of the phase from which it was created or destroyed. If you would like to input your source terms directly into mass, momentum, energy, or scalar equations, then the appropriate path is to use UDFs for user-defined sources for all equations, rather than the UDF for mass transfer.
__________________
best regards pblasiak |
|
November 14, 2018, 02:45 |
|
#3 | |
Senior Member
vidyadhar
Join Date: Jul 2016
Posts: 138
Rep Power: 10 |
Quote:
Dear pblasiak, I am working on evaporation of a liquid using VOF method. I have written the following UDF (single file) for simulating mass transfer. When I press the "Run Calculate ----> calculate" button, after interpretation and initialization, I am facing this problem- Error: received a fatal signal (Segmentation fault). Error Object: #f 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); } Thanks in advance! |
||
November 14, 2018, 05:33 |
|
#4 |
Senior Member
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 16 |
maybe try compilation instead interpretation?
__________________
best regards pblasiak |
|
November 24, 2018, 07:34 |
|
#5 |
Senior Member
vidyadhar
Join Date: Jul 2016
Posts: 138
Rep Power: 10 |
Hello Przemek,
Thanks for your reply. Even after compilation, I am facing the same Segmentation Fault. I think I have done a mistake in the UDF. Instead of assigning UDMI at cells next to 'meniscus' which is an interior zone, now I am using the macro sub_domain_loop to apply source term at UDM which is defined at locations where C_VOF is neither zero nor one. Thanks & Regards, vidyadhar |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to define a mass source at a velocity inlet ? | cfdiscool | FLUENT | 4 | June 26, 2014 04:00 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 02:24 |
DEFINE MASS TRANSFER | Maciej | FLUENT | 0 | November 27, 2005 21:33 |
Vof, udf and mass transfer panel | Jay | FLUENT | 1 | March 15, 2005 01:29 |