CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   ParaView (http://www.cfd-online.com/Forums/paraview/)
-   -   2 datas on one plot (http://www.cfd-online.com/Forums/paraview/122612-2-datas-one-plot.html)

Akuji August 23, 2013 04:12

2 datas on one plot
 
Hello!

I need some help with paraiew.
I calculated my task with 2 different boundary conditions and now I need to display my results on plot. I have 2D task. At 1 step I create plane and then use "Plot Data". But it works only for one task.
Is it possible to display results of my 2 task on one plot? If so, it would be more easy to see difference.

wyldckat August 24, 2013 13:08

1 Attachment(s)
Greetings Arina,

Attached is an example that shows:
  1. On the right is the plot with 4 lines, 2 of each plot.
  2. On the top left is the "Pipeline Browser" that has the 2 plot filters that are shown on the right. Notice that both have the eye icon turned on.
  3. On the bottom left on the "Object Inspector" is shown where you can configure the lines.
Best regards,
Bruno

immortality August 31, 2013 17:16

Hi dear Bruno
I got this error:
Code:

ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/IO/vtkOpenFOAMReader.cxx, line 6481
vtkOpenFOAMReaderPrivate (0x24370e0): Error reading line 19 of /home/ehsan/Desktop/WR_inviscid/0/T: Expected number, string or (, found Temperature


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/IO/vtkOpenFOAMReader.cxx, line 6481
vtkOpenFOAMReaderPrivate (0x24370e0): Error reading line 19 of /home/ehsan/Desktop/WR_inviscid/0/U: Expected number, string or (, found Velocity


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/IO/vtkOpenFOAMReader.cxx, line 6481
vtkOpenFOAMReaderPrivate (0x24370e0): Error reading line 19 of /home/ehsan/Desktop/WR_inviscid/0/p: Expected number, string or (, found Pressure


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0xa755c70): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0xa755a90): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x89a1560): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x89a13d0): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0xc8b6e90): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0xc8b6cb0): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0xc8bfdd0): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0xc8bfca0): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x9ef88e0): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x9ef8540): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x9f02ab0): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x9f02980): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x9f05150): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x9f05020): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x9f0d800): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x9f0d640): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x67cc220): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x67cc720): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x2ab1690): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x2ab1560): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x9ef1980): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x2ab21f0): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x2ae3920): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x2ae37f0): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x2adec80): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x2adeb50): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x67d78e0): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x67d2a10): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x67da140): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x67da010): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x67df740): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x2ae6680): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x2af7950): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x2aea820): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x2afe230): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x2afe0d0): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x2af9b90): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x67e8840): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x7a95140): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x7a94fb0): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x7a97550): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x7a97320): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x7a99c80): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x7a99af0): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x7a9c3f0): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x7a9c260): No X column is set (index 0).


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkAlgorithm.cxx, line 553
vtkContextMapper2D (0x7a9e4a0): Attempt to get point or cell data from a data object


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Charts/vtkPlotPoints.cxx, line 635
vtkPlotLine (0x7a966b0): No X column is set (index 0).

and I don't get two graphs in two different times,both two times becomes the same when I change each one!:confused:

wyldckat August 31, 2013 17:44

Hi Ehsan,

A snapshot of what you're seeing in the "Display" tab would help understand what you configured wrong.


In addition, you want to see data from different times? You didn't mention that on the other thread... I haven't tested this, but it might work:
  1. Once you have the plot data for one time instance, you can save it with the "File -> Save Data" option and save it as VTK.
  2. Then skip to the other time instance and save that one as well.
  3. Open another ParaView and load the two files you saved.
  4. (edit: ) For each loaded VTK file, apply the filter "Plot Data" to each one, so that each 3D line that was saved in the VTK files, will be plotted in the graph.
Best regards,
Bruno


edit: If using OpenFOAM to generated the results that are shown in ParaView, then see this post: http://www.cfd-online.com/Forums/ope...tml#post449126 post #20

immortality September 1, 2013 06:00

Code:

Greetings Arina,

Attached is an example that shows:
On the right is the plot with 4 lines, 2 of each plot.
On the top left is the "Pipeline Browser" that has the 2 plot filters that are shown on the right. Notice that both have the eye icon turned on.
On the bottom left on the "Object Inspector" is shown where you can configure the lines.
Best regards,
Bruno

Hi Bruno
yes I want to have graphs of two different times of one field,whats the other scenario?I mean how you have created the attached figure? if there are in one time all graphs should coincide together and make only one graph,and I don't know how you have obtained two p field and two U field only in one snapshot?:confused:

wyldckat September 1, 2013 06:08

Hi Ehsan,

Quote:

Originally Posted by immortality (Post 449156)
if there are in one time all graphs should coincide together and make only one graph,and I don't know how you have obtained two p field and two U field only in one snapshot?:confused:

The snapshot clearly shows that there are 2 plot filters being used and shown in the same plot representation! It's two "Plot over line" filters that were used for 2 different 3D lines for the same time instance.


And as discussed at the following post: http://www.cfd-online.com/Forums/ope...tml#post449126 post #20 - on OpenFOAM, the easiest is to copy the field from one time snapshot to the next one, so that you can compare the values from 2 time snapshots.

Best regards,
Bruno

immortality September 1, 2013 06:21

I didn't check mark the "write all timesteps..." is it true?
but when I open .vtk files nothing is shown in paraView.:mad:

wyldckat September 1, 2013 07:03

Quote:

Originally Posted by immortality (Post 449162)
I didn't check mark the "write all timesteps..." is it true?
but when I open .vtk files nothing is shown in paraView.:mad:

  • Writing all time steps might make it easier for you to have all of the lines for all time steps. This way you don't need to save each one individually. The problem is that the saved VTK files do not preserve the indication of the time which they are meant for, so it can get a bit disorienting.
  • The VTK file saved from a "Plot over Line" is only the line. To plot these lines from the VTK files back to the chart, use the filter "Plot Data".

immortality September 1, 2013 08:56

Hi Bruno
I only want to plot 3-4 figures that show the run data is almost the same in two sequential last cycles.each cycle period lasts about .001s and I want to plot some fields in present(the last)cycle and previous cycle.
how can use plot over line for seeing saved vtk's?:confused:

wyldckat September 1, 2013 09:19

Read post #4, because I've updated it.

immortality September 1, 2013 09:51

2 Attachment(s)
second figure can't be loaded :(
it was hard to upload these due to internet speed!

immortality September 1, 2013 10:36

Bruno the second graph is not opened in the first figure,
this way is better than subtracting fields due to those little points with high values I posted in http://www.cfd-online.com/Forums/ope...tml#post449205.

wyldckat September 1, 2013 10:38

According to the images you've attached, the second one clearly shows that you mistakenly saved the second second graphic as PNG, instead of VTK :(

immortality September 1, 2013 11:02

2 Attachment(s)
thanks,they plot correctly now,a question,I have saved them by p Field only but there are other fields too when I open them,is it true according to vtk properties?

immortality September 1, 2013 11:08

1 Attachment(s)
and another thing is that when I open paraview,two panels open,with or without -builtin what may be the cause?

immortality September 1, 2013 12:34

can change the names of fields on graphs and add aome explanations to them on the graph too?

wyldckat September 1, 2013 13:21

1 Attachment(s)
Quote:

Originally Posted by immortality (Post 449212)
thanks,they plot correctly now,a question,I have saved them by p Field only but there are other fields too when I open them,is it true according to vtk properties?

The "Save Data" option from the "File" menu should save all of the requested data from the selected items. Therefore, yes, that's normal that it saves values from all fields present in those lines.

Quote:

Originally Posted by immortality (Post 449213)
and another thing is that when I open paraview,two panels open,with or without -builtin what may be the cause?

That's a bit strange.... I guess that ParaView saved this in its "ParaView.ini" file. If you close the second one and safely close ParaView, it should save the current window settings into the ini file.

Quote:

Originally Posted by immortality (Post 449227)
can change the names of fields on graphs and add aome explanations to them on the graph too?

Renaming fields... no. But, for example, you can use the "Calculator" filter to calculate that "U" is "Velocity" :D
As for annotations on the plot... you can't add loose annotations, but you can add titles to the axis and figure, as shown in the attached image.

immortality September 1, 2013 15:29

thanks for explanations.but isn't there a quicker approach without saving each plot and close the paraview,again open it and open two plots and delete exess fields? :)
-------------
and how use calculator(in which branch in pipeline browser it have to be?)

wyldckat September 1, 2013 17:05

Quote:

Originally Posted by immortality (Post 449246)
thanks for explanations.but isn't there a quicker approach without saving each plot and close the paraview,again open it and open two plots and delete exess fields? :)

The only way that I can think of would require considerable hacking into the "PV3FoamReader" plug-in for ParaView.
This is because ParaView uses only a single time line and it does not have a filter that can offset the time at which a particular dataset is in.

Quote:

Originally Posted by immortality (Post 449246)
and how use calculator(in which branch in pipeline browser it have to be?)

It's simple: do some trial-and-error until you can figure it out :p.
That's how I learned :rolleyes:.

immortality September 2, 2013 06:11

Quote:

It's simple: do some trial-and-error until you can figure it out .
That's how I learned .
Bruno I know how to work with Calculator but don't understand the way you suggest for having two different names for diagrams!when I have to use calculator?I think before saving,right?


All times are GMT -4. The time now is 09:40.