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

How are vector list ordered in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ngj

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 1, 2012, 11:51
Default How are vector list ordered in OpenFOAM
  #1
New Member
 
Tian Coulsting
Join Date: Jun 2012
Posts: 19
Rep Power: 14
TianC is on a distinguished road
Hi everyone,

A swift reply would be greatly appreciated since my deadline is on Wednesday!

The main reason why the issue exists is because I am using ParaView on remote ssh connection. Because of this I can not do any kind of 1D plot (i.e. velocity vs. time). I am told by the computer administrator that he is sorting it but I am sure it will not be done in time. Therefore I am taking a different approach to do this.

I need to output the value of pressure at the middle of my downstream edge for a 3D cavity flow to plot against time.

I have written the following shell script to extract values from the p files within the saved timesteps:

for f in */p
do
cat $f | awk 'NR==21 {print}' >> p

echo "Processing $f file..."
done

This looks in all the folders within my case directory and searches for the p file; if it finds it, it will write line number 21 to a file called p in my case directory. This works perfectly for what I want to do.

The only problem is I don't know how the list of vectors are ordered in the U, p, k, nuSgs, etc... files.

Does anyone know how the vectors are organised??

Cheers,

Tian
TianC is offline   Reply With Quote

Old   September 1, 2012, 13:02
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Tian,

It is actually quite simple. The ordering of all the fields are related to the mesh. This means that the first cell (index 0) is linked to the first field in p, U, k, etc. You can make the same argument for the cell with index N.

Maybe you should look into the sampling utility and see if it could fit your needs.

Kind regards,

Niels
TianC likes this.
ngj is offline   Reply With Quote

Old   September 1, 2012, 13:19
Default
  #3
New Member
 
Tian Coulsting
Join Date: Jun 2012
Posts: 19
Rep Power: 14
TianC is on a distinguished road
Hi Niels,

Ah... I think it is the sample utility I could use for this. Thank you.

Kind regards,

Tian
TianC is offline   Reply With Quote

Old   September 1, 2012, 13:59
Default
  #4
New Member
 
Tian Coulsting
Join Date: Jun 2012
Posts: 19
Rep Power: 14
TianC is on a distinguished road
Hi again Niels,

I am trying to use the sample utility, this is how my sampleDict reads:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

setFormat raw;

interpolationScheme cellPointFace;

fields
(
p
);



sets
(
bottomSurfaces
{
type cloud;
points (2 1 0.5);
axis y;
}
);

// ************************************************** ********************* //

I get the following error message:


--> FOAM FATAL IO ERROR:
Expected a '(' while reading VectorSpace<Form, Cmpt, nCmpt>, found on line 36 the label 2

file: /gpfs/home/eng/mauiie/OpenFOAM/mauiie-2.1.0/run/project/cavity3D/cavity3Db/system/sampleDict::sets:oints at line 36.

From function Istream::readBegin(const char*)
in file db/IOstreams/IOstreams/Istream.C at line 94.

FOAM exiting

I can't work out what I've done wrong. Please let me know the error of my ways!

Kind regards,

Tian
TianC 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
Issues with OpenFoam sanjibdsharma OpenFOAM 0 August 14, 2009 09:41
Problem installing OpenFOAM 1.5 installation on RHEL 4. vwsj84 OpenFOAM Installation 4 April 23, 2009 05:48
2009 OpenFOAM Summer School in Zagreb, Croatia hjasak OpenFOAM Announcements from Other Sources 0 March 27, 2009 13:08
Summer School on Numerical Modelling and OpenFOAM hjasak OpenFOAM 5 October 12, 2008 14:14
OpenFOAM Training and Workshop Hrvoje Jasak Main CFD Forum 0 October 7, 2005 08:14


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