CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

CEL expression for calculating heat flux to be applied as surface boundary condition

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree4Likes
  • 1 Post By ghorrocks
  • 1 Post By ghorrocks
  • 1 Post By ghorrocks
  • 1 Post By ghorrocks

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 5, 2016, 15:37
Default CEL expression for calculating heat flux to be applied as surface boundary condition
  #1
New Member
 
R-Sh
Join Date: Oct 2014
Location: USA
Posts: 23
Rep Power: 12
shadnia is on a distinguished road
Hi everyone,
I am modeling the heat transfer thorough the concrete wall placed outside by using CFX.
I need to write a CEL expression to calculate heat flux based on following formula to be applied as a surface boundary condition. The ultimate goal of modeling is to get the temperature at both sides of the concrete wall. On the other hand the input data is the total heat flux calculated by following formula and the output is the temperature at both sides of concrete wall.

[Geometry attached]

Total heat flux = qsun - qconv - qrad

where qsun = (1-γ)×I =
If t (time) is between 21600 (s) to 64800 (s):
qsun = 0.6 ×(2.0616 e-15 t4 – 3.8000 e-10 t3+2.3570 e-5 t2-2.5992 e-1 t+4.3738 e+3)
else, qsun = 0.

so qsun is a known parameter as a function of time.


and qconv = h∞ (Tsurface - T∞)

and qrad = σε ((Tsurface)4 - (Tsky)4)


so qconv and qrad are functions of time and surface temperature.

Please note that finally the total heat flux will be as a function of time and surface temperature. On the other hand the surface temperature has to be calculated by modeling step by step and then has to be plugged in the formula mentioned above to get the next total heat flux..

Any help or clue to write mentioned CEL expression will be greatly appreciated.

Happy new year

Attached Images
File Type: png Geometry.png (33.4 KB, 32 views)
shadnia is offline   Reply With Quote

Old   January 5, 2016, 16:28
Default
  #2
Senior Member
 
Join Date: Jun 2009
Posts: 1,878
Rep Power: 33
Opaque will become famous soon enough
It should be straightforward with a set of expression as below

Quote:
LIBRARY:
CEL:
EXPRESSIONS:
MyHeatFlux = HeatSun + HeatConv + HeatTrad
HeatSun = ...
HeatConv = MyHTC * (Temperature - Tinf)
HeatTrad = MyEmiss * sigma * (Temperature^4 - Tsky^4)
Tinf = ... [K]
Tsky = ... [K]
MyHTC = ... [ W m^-2 K^-1]
MyEmiss = ...
END
END
END
Recall to use MyHeatFlux at the boundary condition, and you should be set.

NOTE: The approach above may not always converge since the discretization code assumes there is no dependency of the heat flux on the surface temperature; therefore, some type of linearization must be introduced. You can do that by adding a Energy Boundary Source with 0 strength but with a non-zero Flux Coefficient (recall the coefficient must be negative). How to determine the Flux Coefficient ? You may need to work it out by linearizing MyHeatFlux respect to the Temperature, i.e. dMyHeatFlux/dTemperature = ....

Hope the above helps,
Opaque is offline   Reply With Quote

Old   January 5, 2016, 20:57
Default
  #3
New Member
 
R-Sh
Join Date: Oct 2014
Location: USA
Posts: 23
Rep Power: 12
shadnia is on a distinguished road
Opaque, thanks a lot for your kindly respond. It will be so helpful, so I will work on it and let you know the results.
shadnia is offline   Reply With Quote

Old   April 17, 2018, 07:57
Default
  #4
New Member
 
Rohit Tiwari
Join Date: Nov 2016
Posts: 10
Rep Power: 10
Rohtiwari is on a distinguished road
Thanks a lot Opaque, it solved my problem.

Quote:
Originally Posted by Opaque View Post
It should be straightforward with a set of expression as below



Recall to use MyHeatFlux at the boundary condition, and you should be set.

NOTE: The approach above may not always converge since the discretization code assumes there is no dependency of the heat flux on the surface temperature; therefore, some type of linearization must be introduced. You can do that by adding a Energy Boundary Source with 0 strength but with a non-zero Flux Coefficient (recall the coefficient must be negative). How to determine the Flux Coefficient ? You may need to work it out by linearizing MyHeatFlux respect to the Temperature, i.e. dMyHeatFlux/dTemperature = ....

Hope the above helps,
Rohtiwari is offline   Reply With Quote

Old   August 18, 2018, 15:19
Red face Same problem
  #5
New Member
 
Join Date: Aug 2018
Posts: 6
Rep Power: 8
CFD USER infinity is on a distinguished road
Hi every body
I am facing same problem in CFX. I have a variable heat flux on a surface. Would you please let me know how you define source coefficient? Should it be a number, if yes then why its negative here. Thanks a lot
CFD USER infinity is offline   Reply With Quote

Old   August 19, 2018, 06:27
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,868
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
If you are applying a heat flux on a boundary then this is a simple boundary condition, not a source term (and therefore should not require a source term coefficient).

To apply a variable heat flux over a boundary simply express the heat flux on the boundary as a function which varies over the boundary. This could be a CEL expression, an interpolation function or a user fortran function.
CFD USER infinity likes this.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   August 19, 2018, 12:27
Default
  #7
New Member
 
Join Date: Aug 2018
Posts: 6
Rep Power: 8
CFD USER infinity is on a distinguished road
Please accept my thanks for your prompt reply. My B.C is variable heat flux and I can add to CFX as a CEL expression. It's almost similar to this one just mentioned in above comment:


Quote:
LIBRARY:
CEL:
EXPRESSIONS:
MyHeatFlux = HeatSun + HeatConv + HeatTrad
HeatSun = ...
HeatConv = MyHTC * (Temperature - Tinf)
HeatTrad = MyEmiss * sigma * (Temperature^4 - Tsky^4)
Tinf = ... [K]
Tsky = ... [K]
MyHTC = ... [ W m^-2 K^-1]
MyEmiss = ...
END
END
END
However I don't know how to consider source coefficient. Would you please let me know what I should put as a source coefficient for "MyHeatFlux" in the software? In other words I would like to know how to linearzie dMyHeatFlux/dTemperature, and how to put this linearized term into flux coefficient.
Thanks
CFD USER infinity is offline   Reply With Quote

Old   August 19, 2018, 19:53
Default
  #8
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,868
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Did you read my post? I will say it again:

Quote:
this is a simple boundary condition, not a source term (and therefore should not require a source term coefficient).
CFD USER infinity likes this.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   August 19, 2018, 20:38
Default
  #9
New Member
 
Join Date: Aug 2018
Posts: 6
Rep Power: 8
CFD USER infinity is on a distinguished road
Hello again. Many thanks for taking the time for replying. Step by step I could figure out to solve my problem. However according to CFX manual, I should use 2D sources which are associated with boundary condition. Once you activate energy equation source, there is flux coefficient. I supposed similar to 3D source definition, I should use coefficient for 2D as well. Please enlighten me if I am wrong. Based on what had been written above I should assign "a non-zero Flux Coefficient (recall the coefficient must be negative)." So I am confused whether I should go for flux coefficient or not. Please let me know when we use source coefficient or Flux coefficient.
Thanks a lot for your help Glenn.
CFD USER infinity is offline   Reply With Quote

Old   August 19, 2018, 20:41
Default
  #10
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,868
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Just make the wall a heat flux boundary and apply your heat flux that way. No source term required, no source term coefficient.
CFD USER infinity likes this.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   August 19, 2018, 20:45
Default
  #11
New Member
 
Join Date: Aug 2018
Posts: 6
Rep Power: 8
CFD USER infinity is on a distinguished road
Thanks a lot again. If you don't mind, May I ask when we use source coefficient AKA flux coefficient? Just want to learn more about it.
Many thanks
CFD USER infinity is offline   Reply With Quote

Old   August 19, 2018, 20:56
Default
  #12
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,868
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
You usually use source terms to apply to a volume rather than a boundary face. The only time you would use source terms on boundaries is to apply a boundary condition too complex to apply with the built in boundary functions.

If you want to apply a source term you really need to read the documentation on it as there are a few issues you need to consider. The source term coefficient is one of them. In some cases you can ignore the source term coefficient as the solver calculates it for you (I suspect your case will not require calculation), but in some cases you need to define it. You work out the source term coefficient as the derivative of the source term with respect to the key variable in the equation. So in your case it would be the derivative of your function WRT temperature.
CFD USER infinity likes this.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   August 19, 2018, 21:05
Default
  #13
New Member
 
Join Date: Aug 2018
Posts: 6
Rep Power: 8
CFD USER infinity is on a distinguished road
Thanks Glenn, really appreciated. So I will consider my variable heat flux on the wall in CEL expression rather defining it as a heat flux source.
CFD USER infinity is offline   Reply With Quote

Old   August 20, 2018, 16:20
Default
  #14
New Member
 
Join Date: Aug 2018
Posts: 6
Rep Power: 8
CFD USER infinity is on a distinguished road
Hello again,


I came to know that my heat source also varies with temperature and coordination (its a radiation simulation in 1D direction). Would you please let me know what should I do for energy source, and source coefficient?


What I have realized is I can again use CEL expression, but I don't know what I have to consider for source coefficient. I am simulation 1D radiation in a channel.


Thanks a lot
CFD USER infinity is offline   Reply With Quote

Old   August 20, 2018, 19:32
Default
  #15
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,868
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Post #12 answers all those questions.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Boundary Condition for heat flux changing by time vainilreb OpenFOAM Pre-Processing 0 January 22, 2013 14:13
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
CFX13 Post Periodic interface EtaEta CFX 7 December 8, 2011 18:15
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55


All times are GMT -4. The time now is 23:13.