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

extract Field value inside boundary condition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 27, 2015, 12:56
Default extract Field value inside boundary condition
  #1
Member
 
Mehtab
Join Date: Jan 2015
Posts: 41
Rep Power: 11
mehtab is on a distinguished road
Hi Foamer,

I want to implement a boundary condition for temperature which depends on mass flow rate and net heat flux Q at same patch.

How can i read a field value at a patch inside a boundary condition class?

Please help. Thanks in advance.
mehtab is offline   Reply With Quote

Old   April 28, 2015, 02:06
Default
  #2
Senior Member
 
JNSN's Avatar
 
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 137
Rep Power: 19
JNSN is on a distinguished road
Hi Cummins,

this should work:

Code:
const fvMesh& mesh = patch().boundaryMesh().mesh();
const volScalarField& alpha = mesh.lookupObject<volScalarField>("alpha.water");
Regrads,
Jan
JNSN is offline   Reply With Quote

Old   April 28, 2015, 05:32
Default
  #3
Member
 
Mehtab
Join Date: Jan 2015
Posts: 41
Rep Power: 11
mehtab is on a distinguished road
Quote:
Originally Posted by JNSN View Post
Hi Cummins,

this should work:

Code:
const fvMesh& mesh = patch().boundaryMesh().mesh();
const volScalarField& alpha = mesh.lookupObject<volScalarField>("alpha.water");
Regrads,
Jan
Hi Jan,

Thank you very much for your response. In my problem, I need specific heat Cp and mass flux at a patch in order to calculate my temperature at the same patch.


Code:
const fvMesh& mesh = patch().boundaryMesh().mesh();
const surfaceScalarField& phi = mesh.lookupObject<surfaceScalarField>"phi");
const volScalarField& Cp = mesh.lookupObject<volScalarField>"Cp");
I think I should use "phi" for mass flow calculation at the patch. Am I right?

What variable should I use for specific heat calculation (Cp)? I think it should be updated from thermophysical properties.

Thanks in advance...
mehtab 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
mixed inflow/outflow downstream boundary condition question peob OpenFOAM Running, Solving & CFD 3 February 3, 2017 10:54
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
Velocity profile boundary condition Tuca FLOW-3D 1 April 23, 2013 12:02
meshing F1 front wing Steve FLUENT 0 April 17, 2003 12:37


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