CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] plot cp on airfoils

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 25, 2015, 17:46
Default
  #21
New Member
 
Cristina Moreira
Join Date: Jan 2015
Location: Portugal
Posts: 28
Rep Power: 11
CrisMoreira is on a distinguished road
Hi Bruno

No, I mean see where the pressure (on my case) is being measure.

Something as what i'm showing in annex.

Regards

Cristina
Attached Images
File Type: png Selecção_038.png (13.9 KB, 44 views)
CrisMoreira is offline   Reply With Quote

Old   July 26, 2015, 14:05
Default
  #22
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Cristina,

Sorry, but I'm a bit confused. Here's the "sampleDict" you sent me via PM:
Code:
interpolationScheme cellPointFace;
// interpolationScheme. choice of
//      cell          : use cell-centre value only; constant over cells
//                      (default)
//      cellPoint     : use cell-centre and vertex values
//      cellPointFace : use cell-centre, vertex and face values.
//      pointMVC      : use point values only (Mean Value Coordinates)
//      cellPatchConstrained : like 'cell' but uses cell-centre except on
//                             boundary faces where it uses the boundary value.
//                             For use with e.g. patchCloudSet.
// 1] vertex values determined from neighbouring cell-centre values
// 2] face values determined using the current face interpolation scheme
//    for the field (linear, gamma, etc.)

setFormat       raw;
// Set output format : choice of
//      xmgr
//      jplot
//      gnuplot
//      raw
//      vtk
//      ensight
//      csv

surfaceFormat   raw;
// Surface output format. Choice of
//      null        : suppress output
//      ensight     : Ensight Gold format, one field per case file
//      foamFile    : separate points, faces and values file
//      dx          : DX scalar or vector format
//      vtk         : VTK ascii format
//      raw         : x y z value format for use with e.g. gnuplot 'splot'.
//
// Note:
// other formats such as obj, stl, etc can also be written (by proxy)
// but without any values!



// optionally define extra controls for the output formats
sets
(
    GaugesP
    {
        type    patchCloud;
        axis    xyz;
        patches 1(ramp);
        points  ((9.50 0.0 0.105) 
                (9.52 0.0 0.2825)
                (9.63 0.0 0.32)
                (9.74 0.0 0.40)
                (9.83 0.0 0.44)
                (9.56 0.0 0.50)
                (9.67 0.0 0.50)
                (9.78 0.0 0.50));
                maxDistance 100;
    }
);

surfaces        ();

fields          ( p );
In the first attached image "Plot 2D options.jpg" is shown where the plot options are, namely which parameters to be represented.

But I suspect that you want to plot the pressure values over time? If this is the case, some file tricks are needed. For example, I've gotten the following folder structure with your "sampleDict" and with the tutorial case I mentioned before:
Code:
 postProcessing/
└── sets
    ├── 0
    │   ├── GaugesP_p.vtk
    ├── 100
    │   ├── GaugesP_p.vtk
    └── 50
        ├── GaugesP_p.vtk
This is nice and all, but ParaView needs this in a single folder, with the number as a suffix of the file name, e.g. "GaugesP_p_0.vtk". To do this, a bit of shell script code should do the trick:
Code:
for fname in postProcessing/sets/*/GaugesP_p.vtk; do

    name_extension=${fname##*/}
    name=${name_extension%%.*}
    extension=${name_extension##*.}
    time_folder=${fname#*/*/}
    time_folder=${time_folder%%/*}

    cp $fname postProcessing/sets/${name}_${time_folder}.${extension}

done
If you run this in the command line, it will copy the VTK files to the respective structure that ParaView needs:
Code:
postProcessing/
└── sets
    ├── GaugesP_p_0.vtk
    ├── GaugesP_p_100.vtk
    └── GaugesP_p_50.vtk
Then:
  1. Open the file group "GaugesP_p_..vtk" in ParaView.
  2. Now split the display so that you see the spreadsheet view (upper right corner of the 3D display window).
  3. Select the line for the point you want to measure.
  4. Instead of the "Plot Data" filter, you'll need the "Plot Selection Over Time".
  5. Use the "Copy Active Selection" button, then the "Apply" button.
The final display should be something like the image "Plotting selection over time.jpg".


Best regards,
Bruno
Attached Images
File Type: jpg Plot 2D options.jpg (35.4 KB, 22 views)
File Type: jpg Plotting selection over time.jpg (64.5 KB, 33 views)
CrisMoreira likes this.
__________________
wyldckat is offline   Reply With Quote

Old   July 27, 2015, 19:47
Default
  #23
New Member
 
Cristina Moreira
Join Date: Jan 2015
Location: Portugal
Posts: 28
Rep Power: 11
CrisMoreira is on a distinguished road
Hi Bruno,

Thanks four your reply.

Yes in part this is what i want but what i was asking is if ParaView has the capacity to show where the gauges are, i.e, see the "physical" location that you provide on sampleDict with the coordinates.

If so it would be really nice for me but if not AutoCAD should do the trick.
CrisMoreira is offline   Reply With Quote

Old   July 30, 2015, 07:03
Default
  #24
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 646
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi Cristina,

I think you just have to add some point or sphere sources in the paraview session (in the Render View part). In case of the point source you can use the glyph filter to get a sphere on that position. ParaView cannot read it directly from the sampleDict.

Regards,
Tom
CrisMoreira likes this.
tomf 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
[ANSYS Meshing] 2D Meshing of Parallel Airfoils Fco.Herbert ANSYS Meshing & Geometry 1 December 5, 2017 16:42
[OpenFOAM] Convergence validation with Plot Over Time jam68 ParaView 1 February 11, 2017 18:05
[swak4Foam] Foam warnings - related to swak4Foam Salam-H OpenFOAM Community Contributions 20 August 2, 2015 16:40
multiple airfoils at once, are they affected? kdrbrk FLUENT 0 October 18, 2010 06:31
graph plot anindya Main CFD Forum 2 September 17, 2003 13:00


All times are GMT -4. The time now is 08:15.