CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Paraview & paraFoam (http://www.cfd-online.com/Forums/openfoam-paraview/)
-   -   How to draw two plots in one graph in paraView? (http://www.cfd-online.com/Forums/openfoam-paraview/122925-how-draw-two-plots-one-graph-paraview.html)

immortality August 31, 2013 16:48

How to draw two plots in one graph in paraView?
 
I want to have two x-y plot in one figure for compare,how to do this by "plot over line"?

wyldckat August 31, 2013 16:53

I answered a similar question the other day: http://www.cfd-online.com/Forums/par...-one-plot.html

Saideep November 27, 2015 07:11

Hi guys;

I know this post isn't completely related to this thread but just wanted to continue with this old thread rather than start with a new one.

I am stuck with a peculiar problem.

Imagine i have a 'L' - shaped flow domain and i would like to plot data over the entire length of the channel. That is from the inlet to the outlet as one plot.

I can extract data over two individual straight channels but to analyze my results i want them to be included into one plot.

I also can use swak utility and use probe locations but i am working with interFoam and the influence of capillary pressure is important to capture which gets difficult to track with probe locations.

Do you guys have an idea of how can i do this. I have been searching for a similar sort of case for quite some time but failed to do so.

Saideep

wyldckat November 28, 2015 14:13

Hi Saideep,

Try this:
  1. Use the two individual filters "Plot over line" for each section of the domain.
  2. Select the two entries of the plots on the "Pipeline Browser" (keep the Shift key pressed while you click on each item).
  3. Apply the filter "Group Datasets".
  4. Then Apply the filter "Plot Data" to the previous entry "GroupDatasets1".
Best regards,
Bruno

Saideep November 30, 2015 07:17

2 Attachment(s)
Hi Bruno;

I tried your advise but still not able to generate a continuous plot. I still have the plots as two separate datas.

To make it clear i am attaching the figures:
1. I would like to plot over the shown plot over lines.
Attachment 43844

2. Once I group data set the data are under one group yet they are seen to be under different sections.
From the figure:
Attachment 43845
I would like to join the data, that is the blue plot of p(1) data should follow continuously to the p(2) data.

In simple way, the two plots are both 17.5e-6m in length. I would like to plot them over 35e-6m.

Thanks Bruno;
Saideep

wyldckat November 30, 2015 17:20

Quick answer:
  1. Use the two individual filters "Plot over line" for each section of the domain.
  2. Apply the filter "Calculator" to the first "PlotOverLine" entry on the "Pipeline Browser". Use:
    • Expression:
      Code:

      arc_length
    • Result Array Name:
      Code:

      position
  3. Apply the filter "Calculator" to the second "PlotOverLine" entry on the "Pipeline Browser". Use:
    • Expression:
      Code:

      arc_length+17.5e-6
    • Result Array Name:
      Code:

      position
  4. Select the two entries of the calculators on the "Pipeline Browser" (keep the Shift key pressed while you click on each item).
  5. Apply the filter "Group Datasets".
  6. Then Apply the filter "Plot Data" to the previous entry "GroupDatasets1".
    1. Make sure you choose to plot both entries in the "Composite Data Set Index".
    2. For the "X Array Name", use for both the field named "position".
    3. and the rest I think you've already seen how to do it.
If you don't like it showing the 2 separate label lines, then apply to the "GroupDatasets1" entry the filter "Merge Blocks" and then "Plot Data" the this latest one.


All times are GMT -4. The time now is 16:49.