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

UDF for reading heat flux through BC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 28, 2018, 06:22
Default UDF for reading heat flux through BC
  #1
Member
 
Michal
Join Date: May 2017
Posts: 35
Rep Power: 9
michal.s is on a distinguished road
Hello there!

I am looking for a solution.
My domain is a fluid and a solid sphere inside - however the sphere is out of the domain (just empty space).
I need to compare temperature distribution within the sphere using 0D and 1D equations.
Therefore I need an UDF to:
1) Read the heat transferred by convection from the liquid into the wall BC with different temperature
2) Calculate the total heat gain during previous time step
3) Calculate what would be the temperature distribution for the current time step within the sphere and on its surface - wall BC inside domain. (Let's say for 0D case it would be just one value)

I have got an idea how to solve it, however I don't know how to get the value of heat flux.

I went through the manual and this forum, I don't have an answer :/

Anybody can have some idea?
michal.s is offline   Reply With Quote

Old   March 1, 2018, 05:07
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
The heat flux from wall to gas (what Fluent calls "Total Surface Heat Flux") can (I think) be accessed through:
Code:
BOUNDARY_HEAT_FLUX(f,t)
(for the rest in the same way as that you access temperature by F_T(f,t).)

I did not test this, but it should work at least in Fluent 18.1. It is not mentioned in the manual, so even if it works in Fluent 18.1, the Ansys programmers might choose to change this in further versions without warning.
pakk is offline   Reply With Quote

Old   March 1, 2018, 05:47
Default
  #3
Member
 
Michal
Join Date: May 2017
Posts: 35
Rep Power: 9
michal.s is on a distinguished road
I didn't know about it, I'll try, thanks!

Right now in TUI I am defining a variable:
1) (rp-var-define 'name 0.0 'real #f)
2) (rpsetvar 'name (pick-a-real "/repor/fluxes/heat-transfer no wall () no"))

In my DEFINE_PROFILE UDF I am calculating all values I need and the temperature at the boudary using variable "name".
Second SCHEME command is executed once in each time-step in order to update its value.

Right now it works, but the temperature calues are not calculated properly (I have to find a mistake, but I am glad that the behaviour is OK)
However I it would be OK to solve it more "elegant"
michal.s is offline   Reply With Quote

Reply


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
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 08:30
Define heat flux on surface by using UDF alnossory FLUENT 0 July 9, 2015 06:53
UDF for a constant heat flux minus radiation based on face temperature MarioArias Fluent UDF and Scheme Programming 3 March 10, 2015 16:54
Heat flux profile UDF B.Hamada Fluent UDF and Scheme Programming 11 July 18, 2014 22:39
Basic question: UDF for wall heat flux Carl FLUENT 1 August 5, 2006 20:01


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