CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Fixed temperature for one phase in VOF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 25, 2016, 12:23
Arrow Fixed temperature for one phase in VOF
  #1
New Member
 
Apiano Morais
Join Date: Apr 2016
Posts: 10
Rep Power: 10
Apiano is on a distinguished road
Hi guys, it's my first question in this forum. . I went back to work with Fluent recently.

I am working in a problem with two liquid phases and I want to set a fixed temperature in one of the phases, for the entire simulation. So, the temperature would be fixed in cell zones where there is entirely one phase.
My question is, how do I do that? How can I set the temperature or a UDS fixed in the cell zone?

The idea here is to use the Poisson equation for the energy as the similar electrostatic equation. In this way, the temperature would be the electric potential.

Will this work?
#include "udf.h"
DEFINE_ON_DEMAND(on_demand_calc)
{
real frac;
begin_c_loop(c,t)
{
frac = C_YI_G(c,t,1)
if (frac > 0.9) C_T(c,T) = 1
}
end_c_loop(c,t)
}

Last edited by Apiano; April 25, 2016 at 16:24.
Apiano is offline   Reply With Quote

Old   April 26, 2016, 05:51
Default
  #2
Senior Member
 
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13
Bruno Machado is on a distinguished road
Quote:
Originally Posted by Apiano View Post
Hi guys, it's my first question in this forum. . I went back to work with Fluent recently.

I am working in a problem with two liquid phases and I want to set a fixed temperature in one of the phases, for the entire simulation. So, the temperature would be fixed in cell zones where there is entirely one phase.
My question is, how do I do that? How can I set the temperature or a UDS fixed in the cell zone?

The idea here is to use the Poisson equation for the energy as the similar electrostatic equation. In this way, the temperature would be the electric potential.

Will this work?
#include "udf.h"
DEFINE_ON_DEMAND(on_demand_calc)
{
real frac;
begin_c_loop(c,t)
{
frac = C_YI_G(c,t,1)
if (frac > 0.9) C_T(c,T) = 1
}
end_c_loop(c,t)
}
I am not sure you can or how to do that.

Regarding the piece of code you showed, frac is obtaining the value of the volume fraction gradient of species 1, not the volume fraction C_YI. There is also couple of lines where the " ; " is missing. In addition to that, the the DEFINE_ON_DEMAND, as the name says, is only define on demand, so you gotta execute it manually on Fluent. Not sure this is what you want.
Bruno Machado is offline   Reply With Quote

Old   April 26, 2016, 10:14
Default
  #3
New Member
 
Apiano Morais
Join Date: Apr 2016
Posts: 10
Rep Power: 10
Apiano is on a distinguished road
Yes... I see the code is wrong. But, I found out that I can do that thing with the macro DEFINE_ADJUST(name,d). I'll work on that. If pays off I'll post the code here.
Apiano is offline   Reply With Quote

Reply

Tags
temperature, vof model


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
Volume fraction of dispersed phase to determine DPM, VOF, Mixture model Mohsin FLUENT 5 March 5, 2018 08:47
Difference between convective heat transfer and fixed temperature jpina FLUENT 4 March 14, 2016 09:22
[swak4Foam] mass conservation of solid phase violated when using groovyBC with twoPhaseEulerFoam xpqiu OpenFOAM Community Contributions 8 June 17, 2015 03:08
Fixed Temperature in StarCCM+ Oliver Siemens 4 September 8, 2008 08:22
Differences between VOF and phase field 2L Main CFD Forum 2 July 4, 2004 14:30


All times are GMT -4. The time now is 15:53.