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

Changing the boundary condition from 'constant flux' to 'constant temperature' type

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2019, 10:47
Post Changing the boundary condition from 'constant flux' to 'constant temperature' type
  #1
Member
 
Saurabh Das
Join Date: Jul 2018
Posts: 43
Rep Power: 8
Sorabh is on a distinguished road
Hello,
I am solving a problem where a face will receive a heat flux for 2 seconds and then, it will be at a constant temperature for the rest of the time.

Something like this:


How do I do this?
Thanks...

EDIT: I tried something like this:

Code:
DEFINE_PROFILE(heat_flux,thread,position)   //The UDF profile will have the name “heat_flux” 
{ 
  face_t f; //Define face variable 
  double x[ND_ND],time;  
  time=RP_Get_Real("flow-time"); //Acquire time from FLUENT solver 
  begin_f_loop(f,thread)  //Loop through all relevant boundary faces 
  { 
    if (time < 6e-5)
		F_PROFILE(f,thread,position)= IO; //IO = 4e9
	else{
		F_PROFILE(f,thread,position) = 0;
		F_T(f,thread) = 110;
	}
    end_f_loop(f,thread)
  } 
}
However, the results were not what was excepted. I excepted the temperature in that particular area to be 110 K, but on reaching the steady state, the temperature is around 410 K.

What am I doing wrong?
Sorabh is offline   Reply With Quote

Old   April 4, 2019, 11:43
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
First of all: your wall can be adiabatic (no heat flux) or isothermal (specified temperature), not both. You have to choose which one you want. I can't tell you that, both are possible, it depends on the problem that you are trying to solve.

Secondly: you say it happens after two seconds, but in the code it is 6e-5 seconds.



If you want it to be adiabatic after some time: remove the line "F_T(f,thread) = 110;".
If you want it to be isothermal after some time: do the simulation until that time, and then change the type of boundary condition (by hand of by scheme script).




Finally: unless you have additional heat sources that you are not describing, it makes no sense that your steady state temperature is anything else than 110 K, since you have one wall at 110 K and no other fixed temperatures. So you probably have something in your simulation that you are not describing here (possibly because you are unaware of it), or your simulation did not converge and you are looking at a diverged solution.
pakk is offline   Reply With Quote

Old   April 4, 2019, 11:55
Default
  #3
Member
 
Saurabh Das
Join Date: Jul 2018
Posts: 43
Rep Power: 8
Sorabh is on a distinguished road
Oh I was about to edit the original post, saw my mistake therein.

And your suggestion worked out. I got what I was looking for, Thanks!
Sorabh is offline   Reply With Quote

Reply

Tags
multiple boundary


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
Wind turbine simulation Saturn CFX 60 July 17, 2024 06:45
activeBaffleVelocity boundary condition ? om3ro OpenFOAM Programming & Development 10 November 17, 2020 00:26
Centrifugal fan j0hnny CFX 13 October 1, 2019 14:55
Difficulty In Setting Boundary Conditions Moinul Haque CFX 4 November 25, 2014 18:30
Divergent temperature in chtMultiRegion(Simple)Foam akrasemann OpenFOAM Running, Solving & CFD 13 March 24, 2014 03:54


All times are GMT -4. The time now is 18:58.