Help: Mass transfer is always 0
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 |
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 |
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. |
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 |
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. |
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 |
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 |
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:
|
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)); |
Quote:
error: received a fatal signal (segmentation fault) Could you tell me the reason? |
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 |
All times are GMT -4. The time now is 04:43. |