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

Time alternating Convection and Heat flux BC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 22, 2016, 00:59
Default Time alternating Convection and Heat flux BC
  #1
New Member
 
Simon
Join Date: Dec 2016
Posts: 14
Rep Power: 9
jchan033 is on a distinguished road
Hi everyone,

I wish to apply an edge with where the boundary condition changes from constant heat flux to convection with respect to time (cyclical).

Meaning, Heat flux addition for 10 secs, Convection for the another 10 seconds.

The cycle repeats.

I have no idea how this UDF can be written, as usually thermal condition (heat flux, constant temp, convection) is selected before applying the UDF.

Please advice, and thank you very much for reading.

Cheers,
Simon
jchan033 is offline   Reply With Quote

Old   December 22, 2016, 03:45
Default
  #2
Senior Member
 
Kevin
Join Date: Dec 2016
Posts: 138
Rep Power: 9
KevinZ09 is on a distinguished road
I've never done anything like that myself, and I'm doubtful it can be done through a UDF. However, you should be able to achieve that with a journal file. It could be a bit cumbersome, but it's doable. I don't have any examples though.
KevinZ09 is offline   Reply With Quote

Old   December 22, 2016, 04:06
Default
  #3
New Member
 
Simon
Join Date: Dec 2016
Posts: 14
Rep Power: 9
jchan033 is on a distinguished road
Quote:
Originally Posted by KevinZ09 View Post
I've never done anything like that myself, and I'm doubtful it can be done through a UDF. However, you should be able to achieve that with a journal file. It could be a bit cumbersome, but it's doable. I don't have any examples though.
Hi Kevin,

Thanks again for helping me! I really appreciate it. Journal files are like macros, yes? To record all the actions executed by the user, to be "replayed" with a click of a button?

However it does not automate the cyclical effect yes?

Cheers,
Simon
jchan033 is offline   Reply With Quote

Old   December 22, 2016, 05:13
Default
  #4
Senior Member
 
Kevin
Join Date: Dec 2016
Posts: 138
Rep Power: 9
KevinZ09 is on a distinguished road
Journal files are quite a bit different from the macros you use in UDF. You use journal files if you intend on running Fluent through a script or something similar, not through the GUI. Basically, you set up your whole problem in the journal file and then run it. It's like you do it through the GUI but then instead of clicking and entering your settings, you type them in the journal file using the corresponding TUI command. So instead of you manually, through the GUI, performing a simulation with heat flux bc, stop it, change it to convection, stop it, change it again, etc., you can enter this in a journal file that performs it "automatically".

It's still a bit cumbersome though, but I wouldn't know of another way to do it. Perhaps someone else does?
KevinZ09 is offline   Reply With Quote

Old   December 22, 2016, 22:54
Default
  #5
New Member
 
Simon
Join Date: Dec 2016
Posts: 14
Rep Power: 9
jchan033 is on a distinguished road
Alright, thanks again ^^
jchan033 is offline   Reply With Quote

Old   December 24, 2016, 01:14
Default
  #6
Member
 
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 15
shashank312 is on a distinguished road
Think it can be done using UDF but you'll have to be tricky about it. You can use DEFINE_PROFILE but since you'll be imposing this as a temperature condition, you can only specify the value of temperature on the boundary faces, not the flux (or gradient). Here's how I would tackle the two cases:

1. For the heat flux case, I would perform the interpolation myself and assign a temperature on the wall based on the gradient (which you already know because you know the flux) and the temperature of the cells next to the wall. Depends on how you want to specify your gradient (first order: one cell, second order: two cells).

2. For the convection case, you would write the following equation:
k_f * dT/dn = h * (T_w - T_f), where dT/dn is again represented through temperatures of the wall and cells next to the wall.

Hope this helps.
shashank312 is offline   Reply With Quote

Reply

Tags
convection, heat flux, time, udf


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
Heat flux with convection and radiation loss kcgmech Fluent UDF and Scheme Programming 0 February 11, 2016 04:08
UDF for time dependent stepwise heat flux profile bugrasss Fluent UDF and Scheme Programming 0 April 15, 2015 06:32
convection + known heat flux BC in the same wall zfaraday OpenFOAM 0 November 19, 2013 16:01
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
Natural convection with heat flux Anton FLUENT 5 April 2, 2007 04:03


All times are GMT -4. The time now is 05:39.