CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   SampleDict Pressure Plot across a wing chord (http://www.cfd-online.com/Forums/openfoam-solving/115087-sampledict-pressure-plot-across-wing-chord.html)

70m1 March 23, 2013 11:45

SampleDict Pressure Plot across a wing chord
 
2 Attachment(s)
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!

doubtsincfd March 23, 2013 21:35

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

fumiya March 23, 2013 21:36

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

70m1 March 24, 2013 16:24

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.


All times are GMT -4. The time now is 11:21.