CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Implementing phase change in a heat transfer solver

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By ThibautDer
  • 1 Post By klilla

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 6, 2016, 10:32
Default Implementing phase change in a heat transfer solver
  #1
New Member
 
Join Date: Apr 2016
Posts: 2
Rep Power: 0
ThibautDer is on a distinguished road
Hi,

I'm working on a heat transfer solver for incompressible flows. In particular, this solver must be able to take account of phase change. To do this I would like to compute the dryness by implementing this:

If h < h_{sat}

T = \frac{h}{c_p}

else

x = \left( h - \int^{T_{sat}}_{T_0} c_p dT \right) \bigg/ h_{fg}

and

T = T_{sat}

I have no idea how to implement the if condition in a way to go through each mesh cells. Does anyone know how to do so in OpenFOAM ?

Thanks in advance
Kummi likes this.

Last edited by ThibautDer; May 9, 2016 at 07:21.
ThibautDer is offline   Reply With Quote

Old   May 9, 2016, 09:38
Default
  #2
Member
 
Kapa Lilla
Join Date: Mar 2009
Location: Bruxelles, Belgium
Posts: 57
Rep Power: 17
klilla is on a distinguished road
You can go through every volScalar/Vector/Tensor field as:

forAll(h, cellI)
{
if(h[cellI]<hSat)
{
T[cellI] = ...;
}
....

}

This will loop over all the cells where h is defined, practically all the cells.
Best,
Lilla
Kummi likes this.
klilla is offline   Reply With Quote

Old   May 9, 2016, 09:49
Default
  #3
New Member
 
Join Date: Apr 2016
Posts: 2
Rep Power: 0
ThibautDer is on a distinguished road
Thank you !
ThibautDer is offline   Reply With Quote

Old   May 9, 2016, 16:18
Default
  #4
Member
 
Zhiheng Wang
Join Date: Mar 2016
Posts: 72
Rep Power: 10
Zhiheng Wang is on a distinguished road
Hi kapa Lilla

I could not get you

"
You can go through every volScalar/Vector/Tensor field as:

forAll(h, cellI)
{
if(h[cellI]<hSat)
{
T[cellI] = ...;
}
....

}

"
Can you please elaborate a little ????
Zhiheng Wang is offline   Reply With Quote

Reply

Tags
heat transfer, laminar flow, phase change


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to simulate the flow and heat transfer of phase change materials? rosol FLUENT 9 April 10, 2016 15:22
Looking for a solver (Mach 0.4, Turbulent, Heat Transfer, Second Order) fredo490 OpenFOAM Running, Solving & CFD 3 March 27, 2013 05:07
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
what approach for direct mixing fluids with heat transfer and phase change? hennas Main CFD Forum 0 June 9, 2009 16:44
How can I increase Heat Transfer at Domain Interf? B.Simon CFX 3 October 28, 2008 19:53


All times are GMT -4. The time now is 14:20.