CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] plot cp on airfoils (https://www.cfd-online.com/Forums/paraview/116922-plot-cp-airfoils.html)

CrisMoreira July 25, 2015 16:46

1 Attachment(s)
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

wyldckat July 26, 2015 13:05

2 Attachment(s)
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

CrisMoreira July 27, 2015 18:47

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.:)

tomf July 30, 2015 06:03

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


All times are GMT -4. The time now is 18:54.