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

Calculate pressure between internal faces (with swak4foam)

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 31, 2012, 05:56
Default Calculate pressure between internal faces (with swak4foam)
  #1
New Member
 
Join Date: Jan 2012
Posts: 7
Rep Power: 5
Kalas is on a distinguished road
Hi,

I have a pipe-flow type simulation in which I want to measure the difference in (total)pressure between two internal surfaces. Usually this is done in fluent which allows internal surfaces to be defined, and hence one can calculate pressure and velocity etc on them. But since OF doesn't allow internal surfaces I have defined two faceSets (through fluentMeshToFoam -writeSets). I have discovered OF itself can't really do anything with these, but the swak4foam package supposedly can. But there seems to be something I have missed, because not even swak4foam can read the values on the faceSet. The functions part of my controlDict looks like this:

Code:
 
functions
(
 averagePresInlet
 {
  type swakExpression;
  valueType faceSet;
  setname sec_inlet;
  expression "p";
  accumulations (
  average
  );
  verbose true;
 }
);
which I thought would atleast write the average pressure on the sec_inlet faceSet. But my problem is that after the first timestep simpleFoam exits with the error:

Code:
 
--> FOAM FATAL ERROR:
Could not find a field name "p" of type scalar (neither type surfaceScalarField nor volScalarField) Autointerpolate: 0
Obviously there is something I have missed, I just can't figure out what it is.. help would be greatly appreciated!

Thanks,
Klas
Kalas is offline   Reply With Quote

Old   February 3, 2012, 05:18
Default
  #2
New Member
 
Join Date: Jan 2012
Posts: 7
Rep Power: 5
Kalas is on a distinguished road
Nvm,

found out that you need

autoInterpolate true;

Br,
Klas
Kalas is offline   Reply With Quote

Reply

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
How do I avoid calculate pressure on 1st itr hts# CFX 2 September 17, 2010 06:06
external flow with snappyHexMesh chelvistero OpenFOAM 11 January 15, 2010 20:43
How to calculate ave dinamic pressure? Nicola CFX 1 July 20, 2006 07:01
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) HB &DS CFX 0 January 9, 2000 14:19
Hydrostatic pressure in 2-phase flow modeling (long) DS & HB Main CFD Forum 0 January 8, 2000 16:00


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