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

Accessing Themo Data on a Boundary Patch

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mturcios777

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 6, 2011, 05:14
Post Accessing Themo Data on a Boundary Patch
  #1
New Member
 
Bill
Join Date: Jun 2011
Location: UK
Posts: 16
Rep Power: 14
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, 04:25
Default
  #2
New Member
 
Bill
Join Date: Jun 2011
Location: UK
Posts: 16
Rep Power: 14
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, 14:17
Default
  #3
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
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.
Zhiheng Wang likes this.
mturcios777 is offline   Reply With Quote

Old   April 13, 2012, 17:56
Default
  #4
New Member
 
Nikhil
Join Date: Sep 2011
Posts: 11
Rep Power: 14
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


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
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 10:56
[Other] StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 04:38
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 04:05
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 17:27
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15


All times are GMT -4. The time now is 01:31.