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

Accessing Themo Data on a Boundary Patch

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 6, 2011, 06:14
Post Accessing Themo Data on a Boundary Patch
  #1
New Member
 
Bill
Join Date: Jun 2011
Location: UK
Posts: 14
Rep Power: 6
maninthemail is on a distinguished road
Hello

Simple-ish question, this. I'm writing a boundary condition for reactingFoam. Typically, when I want to get values on said boundary, I do something like this,

Code:
const fvPatchField<scalar>& p = patch().lookupPatchField<volScalarField, scalar>("p");
const fvPatchField<vector>& U = patch().lookupPatchField<volVectorField, vector>("U");
Which works fine (see endless examples in $FOAM_SRC/finiteVolume/fields/fvPatchFields/derived).

I can't seem use this method to get the specific heat, Cp. If I try I get the error,

Code:
--> FOAM FATAL ERROR: 
    request for volScalarField Cp from objectRegistry region0 failed
    available objects of type volScalarField are
followed by a list of all the variables I can access this way. Cp is not in said list.

Does anyone know how can I get Cp (and by extension other thermophysical data) on a boundary patch in this sort of context?

Many thanks in advance
maninthemail is offline   Reply With Quote

Old   December 16, 2011, 05:25
Default
  #2
New Member
 
Bill
Join Date: Jun 2011
Location: UK
Posts: 14
Rep Power: 6
maninthemail is on a distinguished road
Bump. Still none the wiser. Anyone? Is this even possible? How about getting thermophysical values in the cells adjacent to the boundary?
maninthemail is offline   Reply With Quote

Old   December 16, 2011, 15:17
Default
  #3
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 727
Rep Power: 18
mturcios777 will become famous soon enough
I think Cp is one of those that needs to be calculated from your mixture. You might need to do something like this (this is rough pseudocode ).

Code:
fvPatchField<scalarField> Cp = 0;
forAll(Y,specI)
{
    Cp+=Y[speci].thePatchFieldYouWant*Cp.listOfSpecies[index for specI]
}
I think Cp lives in thermo somewhere, but I'm not 100% sure. Maybe look up a BC for alpha or alphat, as I think that would have access to what you need.
mturcios777 is offline   Reply With Quote

Old   April 13, 2012, 17:56
Default
  #4
New Member
 
Nikhil
Join Date: Sep 2011
Posts: 9
Rep Power: 6
Nikhilcfd is on a distinguished road
Hello

I know this is an old post. Just in case..

I guess you need to add 'Cp' as a volScalarField in createFields.H file and update it every iteration.

Hope this helps.
Nikhilcfd is offline   Reply With Quote

Reply

Tags
boundary, capacity, condition, heat, specific

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import problem ARC Open Source Meshers: Gmsh, Netgen, CGNS, ... 0 February 27, 2010 11:56
StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 05:38
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 18:27
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15


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