|
[Sponsors] |
March 24, 2016, 08:59 |
Help: Mass transfer is always 0
|
#1 |
Member
Rajukiran Antham
Join Date: Dec 2012
Location: Sweden
Posts: 41
Rep Power: 14 |
Hej,
I am using UDF to calculate mass transfer. I need to calculate interfacial area density using alpha fraction gradient. I am using below code, if (C_VOF(c,liq)>0 && C_VOF(c,liq)<1) { if (NULL != THREAD_STORAGE(mixture_thread,SV_VOF_G)) { vol_lx = C_VOF_G(c, liq)[0]; vol_ly = C_VOF_G(c, liq)[1]; vol_lz = C_VOF_G(c, liq)[2]; printf("THREAD_STORAGE : %f \n", THREAD_STORAGE(gas,SV_VOF_G)); } ai = fabs (sqrt((vol_lx*vol_lx)+(vol_ly*vol_ly)+(vol_lz*vol_ lz))); masstransfer = htc*ai*(Tsat-T_l)/h_lt; } I Checked Thread_Storage and it is always null, It is not entering loop. I switched on the temporary solver memory,but still it is not working. I saw this question in couple of threads , but there is no answer for the question. I really appreciate if some one can answer this. reagrds, Raju |
|
March 24, 2016, 10:57 |
|
#2 |
Member
Rajukiran Antham
Join Date: Dec 2012
Location: Sweden
Posts: 41
Rep Power: 14 |
I tried accessing the temperature gradient in the same way by replacing SV_VOF_G to SV_T_G and it works.
I really could use some help here,, Thanks in Advance regards, Raju |
|
March 25, 2016, 06:35 |
|
#3 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
The manual of Fluent does not mention "SV_VOF_G". The manual of Fluent does mention "SV_T_G".
It is good that you tried, because many things in Fluent are not documented, and "SV_VOF_G" would be a logical name for the thing that you want to have, but at this point you should just conclude that "SV_VOF_G" is not implemented in Fluent, and that you need to find a different approach. |
|
March 25, 2016, 09:35 |
|
#4 |
Member
Rajukiran Antham
Join Date: Dec 2012
Location: Sweden
Posts: 41
Rep Power: 14 |
Thank you for the reply pakk,
I checked sg_mphase.h which contain all the definitions for macros that are associated with VOF multiphase model. I found this definition there #define C_VOF_G(c,t)C_STORAGE_R_NV(c,t,SV_VOF_G) So I guess it is implemented in fluent. But, I am not sure whether this definition is the exact one I am looking for. If SV_VOF_G is not implemented in fluent, then I think it should give some sort compilation error but I did not get any. Is there any other way for accessing volume fraction gradient? regards, Raju |
|
March 25, 2016, 09:48 |
|
#5 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Your definition does not show that it is implemented; it only shows that if it is implemented, then C_VOF_G is also implemented.
This shows that there certainly were plans to implement it, and that the 'surrounding infrastructure' is already in place, but it does not show that it really is there. And your test shows it is not there... Maybe it is implemented, but not stored by default. Maybe it is possible to activate it with a TUI text, just as you had to use to activate the other gradients. But there is nothing in the help about this. I think your best option there is to contact the Ansys helpdesk. |
|
March 25, 2016, 09:57 |
|
#6 |
Member
Rajukiran Antham
Join Date: Dec 2012
Location: Sweden
Posts: 41
Rep Power: 14 |
Thanks again,
I have already sent a query regarding this to Ansys support, I will post the reply as soon as I get something from them. regards, Raju |
|
March 20, 2017, 20:11 |
|
#7 |
New Member
Join Date: Mar 2015
Posts: 6
Rep Power: 11 |
Hi Raj,
Can you update me about this issue? I am facing the same problem! Sent from my iPhone using CFD Online Forum mobile app |
|
March 20, 2017, 20:24 |
|
#8 | |
Member
Rajukiran Antham
Join Date: Dec 2012
Location: Sweden
Posts: 41
Rep Power: 14 |
Quote:
I solved the issue by calculating Interfacial area density in a separate UDF and stored it in a UDM. I called the UDM wherever the interfacial area density is required. Below is the UDF which I wrote for it, Code:
#include "udf.h" DEFINE_ADJUST(gradient, domain) { #if !RP_HOST Thread *t; Thread **pt; cell_t c; int phase_domain_index = 0; /* Check the phase whether it is primary or secondary */ Domain *pDomain = DOMAIN_SUB_DOMAIN(domain,phase_domain_index); { Alloc_Storage_Vars(pDomain,SV_VOF_RG,SV_VOF_G,SV_NULL); Scalar_Reconstruction(pDomain, SV_VOF,-1,SV_VOF_RG,NULL); Scalar_Derivatives(pDomain,SV_VOF,-1,SV_VOF_G,SV_VOF_RG,Vof_Deriv_Accumulate); } mp_thread_loop_c (t,domain,pt) if (FLUID_THREAD_P(t)) { Thread *ppt = pt[phase_domain_index]; begin_c_loop (c,t) { C_UDMI(c,t,0) = sqrt((C_VOF_G(c,ppt)[0]*C_VOF_G(c,ppt)[0])+(C_VOF_G(c,ppt)[1]*C_VOF_G(c,ppt)[1])); /* C_UDMI(c,t,1) = C_VOF_G(c,ppt) [1]; C_UDMI(c,t,2) = C_VOF_G(c,ppt)[2];*/ } end_c_loop (c,t) } Free_Storage_Vars(pDomain,SV_VOF_RG,SV_VOF_G,SV_NULL); #endif } |
||
March 23, 2017, 09:01 |
|
#9 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
You can make this part shorter (and thus easier to understand and maintain):
Code:
C_UDMI(c,t,0) = sqrt((C_VOF_G(c,ppt)[0]*C_VOF_G(c,ppt)[0])+(C_VOF_G(c,ppt)[1]*C_VOF_G(c,ppt)[1])); Code:
C_UDMI(c,t,0) = NV_MAG(C_VOF_G(c,ppt)); |
|
March 12, 2018, 07:28 |
|
#10 | |
New Member
xiatiantian
Join Date: Dec 2017
Posts: 5
Rep Power: 8 |
Quote:
error: received a fatal signal (segmentation fault) Could you tell me the reason? |
||
March 13, 2018, 12:31 |
|
#11 |
Senior Member
Join Date: Sep 2017
Posts: 246
Rep Power: 12 |
Hi All,
Going back to the original post (admittedly 2 years ago), it strikes me that the test for existence of the vector quantity C_VOF_G might not involve if(NNULLP(THREAD_STORAGE(mixture_thread,SV_VOF_G)) ) but rather if(NNULLP(T_STORAGE_R_NV(mixture_thread,SV_VOF_G)) ) I have not checked whether there is a difference in outcomes. Ed |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mass transfer coefficient | ArturTU | FLUENT | 1 | October 27, 2015 11:04 |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 07:28 |
About phase change heat and mass transfer | Michael | FLUENT | 2 | February 13, 2011 02:49 |
How to calculate Volumetric Mass transfer coefficient using CFX? | tuks_123 | CFX | 2 | July 22, 2010 02:15 |
Vof, udf and mass transfer panel | Jay | FLUENT | 1 | March 15, 2005 01:29 |