|
[Sponsors] |
March 23, 2013, 11:45 |
SampleDict Pressure Plot across a wing chord
|
#1 |
New Member
Thomas
Join Date: Nov 2012
Posts: 5
Rep Power: 14 |
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! |
|
March 23, 2013, 21:35 |
|
#2 | ||
Senior Member
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 17 |
Quote:
Quote:
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 |
|||
March 23, 2013, 21:36 |
|
#3 |
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 19 |
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 |
|
March 24, 2013, 16:24 |
|
#4 |
New Member
Thomas
Join Date: Nov 2012
Posts: 5
Rep Power: 14 |
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. |
|
August 3, 2015, 09:32 |
|
#5 |
Member
Stephanie
Join Date: Feb 2015
Location: Magdeburg, Germany
Posts: 71
Rep Power: 11 |
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 |
|
July 5, 2021, 19:33 |
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 |
Quote:
Thanks in advance to the ones who can help me! Greetings. |
||
Tags |
post processing, pressure plot, sampledict, wing chord |
|
|
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 |