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

SampleDict Pressure Plot across a wing chord

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

Like Tree4Likes
  • 4 Post By fumiya

Reply
 
LinkBack Thread Tools Display Modes
Old   March 23, 2013, 11:45
Default SampleDict Pressure Plot across a wing chord
  #1
New Member
 
Thomas
Join Date: Nov 2012
Posts: 5
Rep Power: 4
70m1 is on a distinguished road
Hi all,

I would like to make a pressure plot on the surface of my wing geometry along the centre chord with gnuplot.

Unfortunately I require a bit of hand holding...

I intend to do this using the SampleDict file. The geometry is .stl data that was used to create the mesh with snappyHexMesh and so is in the triSurface folder.

To potentially complicate matters the centre chord is along z=0.05 instead of z=0. However this is still the middle of the boundary (See attached image)

Below is what I have attempted so far... I think it is probably a pretty poor attempt.




/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object sampleDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

setFormat gnuplot;

surfaceFormat raw;

formatOptions
{
ensight
{
format ascii;
}
}

interpolationScheme cell;

fields
(
p
);

sets
(
TopOfAerofoil
{
type face; //not sure on this
axis xyz; // not sure on this

start (0.0001 0.0001 0.05001); //how do i find this accurately? Also should it be slightly offset from the surface?
end (0.1001 0.1001 0.05001);
nPoints 50;
}

BottomOfAerofoil
{
type face;
axis xyz;

start (0.1001 0.1001 0.05001);
end (0.1001 0.1001 0.05001);
nPoints 50;
}
);

surfaces
(
triSurfaceSampling
{
// Sampling on triSurface
type sampledTriSurfaceMesh;
surface PointyTip.stl;
source boundaryFaces; // not sure on this
interpolate true; //not sure on this
}
);


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



Thanks!
Attached Images
File Type: jpg STLinBoundary.jpg (33.4 KB, 102 views)
File Type: jpg CubeAxis.jpg (33.9 KB, 72 views)
70m1 is offline   Reply With Quote

Old   March 23, 2013, 21:35
Default
  #2
Senior Member
 
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 7
doubtsincfd is on a distinguished road
Quote:
I would like to make a pressure plot on the surface of my wing geometry along the centre chord with gnuplot
Are you trying to plot pressure along a line lying on the airfoil?

Quote:
TopOfAerofoil
{
type face; //not sure on this
axis xyz; // not sure on this

start (0.0001 0.0001 0.05001); //how do i find this accurately? Also should it be slightly offset from the surface?
end (0.1001 0.1001 0.05001);
nPoints 50;
}
This will give you values along line joining the two points
xyz refers it will print in three columns

read applications/utilities/postProcessing/sampling/sample/sampleDict file.
It has detailed explanation of all the options that can be used

If the point are along a curved line, I suggest you use patchCloud. You will have to manually enter the coordinates of the points though. Plus you can give some tolerance to the points. OF will search points ON THE PATCH and print the values
doubtsincfd is offline   Reply With Quote

Old   March 23, 2013, 21:36
Default
  #3
Senior Member
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 169
Rep Power: 7
fumiya is on a distinguished road
I don't know the way to do what you want with the sample utility
but alternatively you could use "Plot On Intersection Curves" filter
in ParaView.

According to the following procedure, you can get the csv file of the
data sampled on the patch:
1) Select the patch you want to sample(e.g., wing)
2) Select Filters -> Data Analysis -> Plot On Intersection Curves
(Slice Type: Plane, z=0.05)
3) File -> Save Data (Files of type: csv)

Hope this helps,
Fumiya
fumiya is offline   Reply With Quote

Old   March 24, 2013, 16:24
Default
  #4
New Member
 
Thomas
Join Date: Nov 2012
Posts: 5
Rep Power: 4
70m1 is on a distinguished road
much easier way of doing it, thanks Fumiya

@doubtsincfd I will have to have a longer look at this to understand it in depth, but thank you for your help.
70m1 is offline   Reply With Quote

Reply

Tags
post processing, pressure plot, sampledict, wing chord

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
Pressure Inlet VS velocity Inlet difference Mohsin FLUENT 6 January 15, 2015 18:15
How to plot change in pressure over time for a point in the mesh johan OpenFOAM Paraview & paraFoam 4 November 12, 2008 08:21
how to plot the average pressure over each period? Tsui Phoenics 1 June 5, 2008 09:16
Plot Pressure vs Time (transient analysis) Santiago Orrego CFX 1 October 30, 2007 11:11
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 19:40.