CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

boundaryField() and internalField() While calculating heat flux

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 13, 2019, 07:44
Default boundaryField() and internalField() While calculating heat flux
  #1
New Member
 
Ümit Yelken
Join Date: Jun 2018
Posts: 28
Rep Power: 8
uyelken is on a distinguished road
Hello my friends,

Im working to calculate heat flux on patch. I need to calculate reynolds number. But because of no slip bc applied on wall i must use internal value of velocity. Do you have any idea?

My code block is:
forAll(heatFlux.boundaryField(), patchi)
{
heatFlux.boundaryField()[patchi] =
k_mean.boundaryField()[patchi]*((0.024)*pow((rho.boundaryField()[patchi]*mag(U.internalField()[patchi])*(0.15)/nu_mean.boundaryField()[patchi]),0.8))*(0.898/(0.15))*(T.internalField()[patchi]-T.boundaryField()[patchi]);
}

It is not working. So how can i obtain internal field value?
uyelken is offline   Reply With Quote

Old   July 15, 2019, 11:19
Default
  #2
New Member
 
Emily
Join Date: Nov 2017
Posts: 24
Rep Power: 9
em17 is on a distinguished road
Hi,

To find the internal velocity of a cell adjacent to a patch you can use

U.boundaryField()[patchID].internalField()[internalCellID]

where 'patchID' is the ID of your patch and 'internalCellID' is the ID of the cell adjacent to the patch face.
You will then have to put this in a forAll loop to cycle through all the mesh cells on the patch face.

I hope this helps!
Emily
em17 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
Used Heat Flux instead of tempearture roshanak878 OpenFOAM 1 August 9, 2023 22:57
wallHeatFlux utility for an incompressible case Mr.Jingles OpenFOAM Post-Processing 67 April 6, 2023 04:25
ill defined primitiveEntry starting at keyword 'value' on line 197 ChangeDictionary Struggle_Achieve OpenFOAM Pre-Processing 2 December 20, 2017 04:58
solidWallHeatFluxTemperature at the solid solid interface in chtMultiRegionSimpleFoam maddalena OpenFOAM Running, Solving & CFD 43 January 11, 2011 03:39
pipe flow with heat transfer Fabian OpenFOAM 2 December 12, 2009 05:53


All times are GMT -4. The time now is 04:22.