|
[Sponsors] |
Specific Heat macro for eulerian multiphase flow |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 31, 2022, 17:11 |
Specific Heat macro for eulerian multiphase flow
|
#1 |
New Member
Babak
Join Date: Oct 2021
Posts: 12
Rep Power: 5 |
Hi I'm having problem writing a temperature dependent specific heat macro for my eulerian two phase boiling flow simulation.
I want to get the primary phase temperature from the cell and use it in the code but having problem to do so; I already did the other properties like density using DEFINE PROPERTY macro but since specific heat is kinda different I'm getting odd answers. So here is my code and I narrow the problem down to the bold words: DEFINE_SPECIFIC_HEAT(specficheat,T, Tref, h, yi) { real cpf; Domain *mixture_domain = Get_Domain(1); Thread *mixture_thread = Lookup_Thread(mixture_domain,8); Thread *t_wa = THREAD_SUB_THREAD(mixture_thread,0); Thread *t_va = THREAD_SUB_THREAD(mixture_thread,1); cell_t c; real Tw = C_T(c,t_wa); cpf=(((5067-4494)/70)*(Tw-473.15)+4494); *h = cpf*(T-Tref); return cpf; } In above code, Tw is the Primary phase temp (in this case water) and when i use this code my Cp distribution is like this: and when I change the code to: DEFINE_SPECIFIC_HEAT(specficheat,T, Tref, h, yi) { real cpf; Domain *mixture_domain = Get_Domain(1); Thread *mixture_thread = Lookup_Thread(mixture_domain,8); Thread *t_wa = THREAD_SUB_THREAD(mixture_thread,0); Thread *t_va = THREAD_SUB_THREAD(mixture_thread,1); cell_t c; cpf=(((5067-4494)/70)*(T-473.15)+4494); *h = cpf*(T-Tref); return cpf; } the Cp distribution is ok but since it's based on wrong temp data, it's leading to wrong results because of using cell temp instead of phase temp. Can someone help me with this? how can i write a specific heat macro for multiphase flows? what do i do wrong? |
|
February 2, 2022, 20:53 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
as far as I know, unfortunately there is no way to get cell/thread information inside DEFINE_SPECIFIC_HEAT macro
it means, you are not able to differentiate temperatures according to phases I've heard the way our is to use real gas model
__________________
best regards ****************************** press LIKE if this message was helpful |
|
February 3, 2022, 09:45 |
|
#3 |
New Member
Babak
Join Date: Oct 2021
Posts: 12
Rep Power: 5 |
Thanks for your helpful response.
I actually want to simulate nanofluid boiling flow and I need to define the nanofluid phase property based on cell information properties; so by any chance do you know any other way to do a simulation like this or have any advice for me to do this type of simulation? |
|
June 17, 2022, 04:20 |
|
#4 | |
New Member
Ying Feng
Join Date: May 2022
Location: China
Posts: 6
Rep Power: 4 |
Quote:
|
||
June 17, 2022, 12:25 |
|
#5 |
New Member
Babak
Join Date: Oct 2021
Posts: 12
Rep Power: 5 |
Hi. Thanks for the reply. Could you elaborate on what did I do wrong here and how to fix It?
|
|
June 17, 2022, 23:33 |
|
#6 | |
New Member
Ying Feng
Join Date: May 2022
Location: China
Posts: 6
Rep Power: 4 |
Quote:
I write the UDF accroding to the help documentation, i am not sure it is right. DEFINE_SPECIFIC_HEAT(specficheat,T, Tref, h, yi) { real cpf; cpf=((5067-4494)/70)*(T-473.15)+4494; *h = 8.18571*(T^2/2+75.8552*T)-8.18571*(Tref^2/2+75.8552*Tref); return cpf; } in the above content, the enthalpy is obtained by integrating the Cp. integral(1/70 (5067 - 4494) (T - 473.15) + 4494) dT = 8.18571 (T^2/2 + 75.8552 T) + constant |
||
Tags |
multiphase flow, multiphase udf, specific heat, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fluent Heat exchanger model | gimson | FLUENT | 0 | May 10, 2021 05:30 |
Simple piston movement in cylinder- fluid models | arun1994 | CFX | 4 | July 8, 2016 03:54 |
Constant velocity of the material | Sas | CFX | 15 | July 13, 2010 09:56 |
Natural convection - Inlet boundary condition | max91 | CFX | 1 | July 29, 2008 21:28 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 16:55 |