|
[Sponsors] |
December 8, 2023, 12:37 |
C_VOF_G in three phase model
|
#1 |
New Member
Join Date: Oct 2022
Posts: 12
Rep Power: 4 |
Hi all,
I am modeling Sun heating oil layer on top of water in three phase vof model (air as primary phase).. the solar flux (w/m2) is incorporated as heat source at the interface for oil vof >=0.5. I using DEFINE ADJUST to store VOF gradiant in C_UDMI; Display C_UDMI shows both interfaces (air/oil and water/oil). when I Run the calculation seem like it don't apply the heat source at all. my question is why the CUDMI save both interfaces a,d how to force the SOURCE term at the air/oil interface (F(oil) >= 0.5. Thanks in advance #include "udf.h" #include "sg_mphase.h" #define Sun_flux 1120 /* average solar heat flux on earth surface (W/m2) */ DEFINE_ADJUST(my_adjust, mixture_domain) { int phase_domain_index=0.; Thread *t; cell_t c; mixture_domain= Get_Domain(2); thread_loop_c (t,mixture_domain) if (THREAD_STORAGE(t,SV_UDM_I)!=NULL) begin_c_loop (c,t) { /*To store gradient of volume fraction in a user defined memory*/ C_UDMI(c,t,0)=sqrt((C_VOF_G(c,t)[0])*(C_VOF_G(c,t)[0])+(C_VOF_G(c,t)[1])*(C_VOF_G(c,t)[1])); } end_c_loop (c,t) } DEFINE_SOURCE(heat, cell, mix_th, dS, eqn) { Thread *pri_th, *sec_th; real source; pri_th = THREAD_SUB_THREAD(mix_th, 0); sec_th = THREAD_SUB_THREAD(mix_th, 1); if (C_VOF(cell,pri_th)>0.05 && C_VOF(cell,pri_th)<0.5) { source= Sun_flux*C_UDMI(cell,mix_th,0); dS[eqn] = 0.0; } return source; } Last edited by cfd_Matrix; December 15, 2023 at 02:29. |
|
December 10, 2023, 18:57 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
if you defined domain in header
Code:
DEFINE_ADJUST(my_adjust, mixture_domain) Code:
mixture_domain= Get_Domain(2);
__________________
best regards ****************************** press LIKE if this message was helpful |
|
December 11, 2023, 02:31 |
|
#3 | |
New Member
Join Date: Oct 2022
Posts: 12
Rep Power: 4 |
Quote:
if (C_VOF(cell,pri_th)>0.05 && C_VOF(cell,pri_th)<0.5) how to force the SOURCE term at the air/oil interface and for (F(oil) >= 0.5 any clue on how to solve this problem ? |
||
December 12, 2023, 01:27 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
I can hardly understand what you a talking about
Code:
if (C_VOF(cell,pri_th)>0.05 && C_VOF(cell,pri_th)<0.5) { source= Sun_flux*C_UDMI(cell,mix_th,0); dS[eqn] = 0.0; } return source; Code:
if (C_VOF(cell,pri_th)>0.05 && C_VOF(cell,pri_th)<0.5) { .......... } else { ............. } return source;
__________________
best regards ****************************** press LIKE if this message was helpful |
|
December 12, 2023, 16:44 |
|
#5 | |
New Member
Join Date: Oct 2022
Posts: 12
Rep Power: 4 |
Quote:
if (C_VOF(cell,sec_th)>0.5) /* oil is the first secondary phase*/ { source= Sun_flux*C_UDMI(cell,mix_th,0); dS[eqn] = 0.0; } else { source= 0.0; dS[eqn] = 0.0; } return source; |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using Fluent VOF and Lee model to simulate mass transfer of two phase | Albert Lee | FLUENT | 1 | May 2, 2019 09:01 |
Transient Phase Change Model: Explodes at low vapor quality | evcelica | CFX | 0 | August 28, 2018 11:55 |
Condensation/Evaporation Model (Phase Change) | oliveira1820 | CFX | 0 | May 29, 2018 03:07 |
How to access only one phase in multiphase model by UDF | wersoe | Fluent UDF and Scheme Programming | 1 | January 4, 2017 08:11 |
Problems bout CFD model of biomass gasification, Downdraft gasifier | wanglong | FLUENT | 2 | November 26, 2009 00:27 |