CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

using a function object to calculate the wall heat flux at a certain location

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 10, 2019, 21:35
Default using a function object to calculate the wall heat flux at a certain location
  #1
New Member
 
Abdulaziz Alkandari
Join Date: Apr 2019
Posts: 6
Rep Power: 7
AbdulazizAlkandari is on a distinguished road
Hi,

I have written a function object which allows me to calculate the average wall heat flux for a whole patch. How can I modify that function object to calculate the average wall heat flux for a specific strip of the same patch , say between x=-0.1 to x=0.1?

Below is the code i used to calculate my heat flux at the patch:

const fvBoundaryMesh& bMesh = mesh().boundary();
const label WallPatchIDB = bMesh.findPatchID("bottomWall");
const fvPatch& WallPatchB = bMesh[WallPatchIDB];

const volScalarField& h = mesh().lookupObject<volScalarField>("h");
const volScalarField& alphaSgs = mesh().lookupObject<volScalarField>("alphat");
const volScalarField& alpha = mesh().lookupObject<volScalarField>("thermo:alpha" );
const surfaceScalarField alphaEff= fvc::interpolate( alpha + alphaSgs );

const surfaceScalarField qMahdi = alphaEff * fvc::snGrad(h);
const scalar qWallBMahdi = gSum( qMahdi.boundaryField()[WallPatchIDB]*WallPatchB.magSf() );
const scalar AfB = gSum( WallPatchB.magSf() );

const scalar WallFluxBMahdi = qWallBMahdi / AfB;
AbdulazizAlkandari 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
Basic Nozzle-Expander Design karmavatar CFX 20 March 20, 2016 08:44
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
Heat Flux Wall Boundary Confusion. Joee FLUENT 1 August 21, 2010 12:20
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 04:37


All times are GMT -4. The time now is 00:16.