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

SampleDict Pressure Plot across a wing chord

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 6 Post By fumiya

Reply
 
LinkBack Thread Tools Search this Thread 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: 14
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, 377 views)
File Type: jpg CubeAxis.jpg (33.9 KB, 268 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: 17
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's Avatar
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 19
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: 14
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

Old   August 3, 2015, 09:32
Default
  #5
Member
 
Stephanie
Join Date: Feb 2015
Location: Magdeburg, Germany
Posts: 71
Rep Power: 11
stephie is on a distinguished road
Hello everyone,

I know the last post is two years ago, but I hope someone might help me...
I am working with foam ext. 3.1 and my task is to produce the pressure distribution around an airfoil. My airfoil is defined as a wall, which leads to me to the following problem:

--> unknown sample typ

I created the mesh with Salome and defined just the inlet and the outlet as patch, top/bottom/airfoil as walls and front/back as empty. So I can't use patch or one of the other sample typs.

This is the content of my sampleDict:

/*--------------------------------*- 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 vtk;

interpolationScheme cellPoint;

fields
(
p
);

sets
(
TopOfAerofoil
{
type face;
axis xyz;

start (-0.025 0.0875 0); //how do i find this accurately? Also should it be slightly offset from the surface?
end (0.075 0.0875 0);
nPoints 250;
}

BottomOfAerofoil
{
type face;
axis xyz;

start (-0.0249658 0.0873361 0);
end (0.0749617 0.0874998 0);
nPoints 50;
}
);

surfaces
(

//Extracting a patch
walls_constant
{
type wall;
patches ( airfoil );
}
);

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

Also tried the way with paraview, but for me it didn't work..maybe I did something wrong.

If anyone has an ida to solve this problem or to produce a pressure distribution, I would be very gratefule!

Best regards,
Stephie
stephie is offline   Reply With Quote

Old   July 5, 2021, 19:33
Default Plot on intersection curves with sample
  #6
New Member
 
Miguel David Méndez Bohórquez
Join Date: Sep 2016
Location: Bogotá
Posts: 10
Rep Power: 10
Miguel.Mendez is on a distinguished road
Quote:
Originally Posted by fumiya View Post
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
Hi, This is very usefull. I would like to replicate the same with the post processing functions of OpenFoam (sample functions). Does anyone knows if it is possible? I use OpenFoam 6.0.

Thanks in advance to the ones who can help me!

Greetings.
Miguel.Mendez is offline   Reply With Quote

Reply

Tags
post processing, pressure plot, sampledict, wing chord


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
Pressure Inlet VS velocity Inlet difference Mohsin FLUENT 9 January 4, 2021 11:34
[OpenFOAM] How to plot change in pressure over time for a point in the mesh johan ParaView 4 November 12, 2008 08:21
how to plot the average pressure over each period? Tsui Phoenics 1 June 5, 2008 10: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 11:57.