CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

how to output reslut along multiple lines

Register Blogs Community New Posts Updated Threads Search

Like Tree10Likes
  • 10 Post By blebon

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 15, 2017, 03:49
Default how to output reslut along multiple lines
  #1
New Member
 
Bingchuan
Join Date: Dec 2017
Posts: 16
Rep Power: 8
bingchuan is on a distinguished road
Hi,

As we know, we can output results along a line using function singleGraph. We can define the start and end points in it. My question is how to output the results along multiple lines? Can I modify the singleGraph file like:
.....
start (x11, y11,z11);
end (x12,y12,z12);
fileds (U p);

start (x21,y21,z21);
end (x22,y22,z22);
fileds (U p);
...
where (x1i, y1i, z1i) are the start and end of the first line, (x2i, y2i, z2i) are the start and end of the second line.

Thanks.

Bingchuan

Last edited by bingchuan; December 19, 2017 at 03:47.
bingchuan is offline   Reply With Quote

Old   December 15, 2017, 08:50
Default
  #2
New Member
 
Join Date: Oct 2017
Location: Germany
Posts: 26
Rep Power: 8
rajan19us is on a distinguished road
Just extract the data of 2 different plots in .csv file and then import in excel. In excel, you can combine both the graphs in a single figure.

Regards,
Rajan
rajan19us is offline   Reply With Quote

Old   December 15, 2017, 10:51
Default
  #3
Member
 
Bruno Lebon
Join Date: Dec 2012
Posts: 33
Rep Power: 13
blebon is on a distinguished road
This is the sort of thing that can be easily implemented in Python. Read the outputs from multiple line graphs and concatenate them.
blebon is offline   Reply With Quote

Old   December 19, 2017, 03:39
Default
  #4
New Member
 
Bingchuan
Join Date: Dec 2017
Posts: 16
Rep Power: 8
bingchuan is on a distinguished road
Thanks Rajan.
Thanks Bruno.

Sorry, I didn't clarify my question clearly.

I was doing an unsteady simulition. Since the computational dimain is three dimensional, so I am going to write the results of the whole computional domain in large time interval. But the results along some lines need to be monitored during small time interval (e.g. line 1 and 2 in the sketch). So it is improssblie to extract data from the whole domain like Rajan said.

I planed to use the function objects singleGraph included by the "casedir/system/controlDict" , i.e.
...
funcitons
{
#includeFunc singleGraph
}
...
as recommend by https://cfd.direct/openfoam/user-gui...hs-monitoring/.

It works when sampling data along a line. However, I don't know how to sample data along a few lines just like line 1 and 2 in the sketch above.

Bests,
Bingchuan
bingchuan is offline   Reply With Quote

Old   December 19, 2017, 03:42
Default
  #5
New Member
 
Bingchuan
Join Date: Dec 2017
Posts: 16
Rep Power: 8
bingchuan is on a distinguished road
Sorry, I failed to upload the sketch.

You can go to https://pan.baidu.com/s/1dEP3X7N
bingchuan is offline   Reply With Quote

Old   December 19, 2017, 04:23
Default
  #6
Member
 
Bruno Lebon
Join Date: Dec 2012
Posts: 33
Rep Power: 13
blebon is on a distinguished road
You need two simpleGraphs in your system directory. Just rename the template files to different file names, for example simpleGraph1 and simpleGraph2 and then include them in the controlDict.

functions
{
#includeFunc singleGraph1
#includeFunc singleGraph2
}
blebon is offline   Reply With Quote

Old   December 19, 2017, 05:48
Default
  #7
New Member
 
Bingchuan
Join Date: Dec 2017
Posts: 16
Rep Power: 8
bingchuan is on a distinguished road
Quote:
Originally Posted by blebon View Post
You need two simpleGraphs in your system directory. Just rename the template files to different file names, for example simpleGraph1 and simpleGraph2 and then include them in the controlDict.

functions
{
#includeFunc singleGraph1
#includeFunc singleGraph2
}
It works.
Thank you Bruno.

Bests,
Bingchuan
bingchuan is offline   Reply With Quote

Old   September 16, 2020, 11:08
Default fatal error with singleGraph1
  #8
New Member
 
Join Date: Mar 2019
Location: Mexico
Posts: 7
Rep Power: 7
Saulhr is on a distinguished road
I used the @blebon strategy but singleGraph1 is not a "type" that is allowed. Therefore, it is a fatal error.

@Bingchuan you succeeded is your task?

I'm trying to do the same thing.
Saulhr is offline   Reply With Quote

Old   November 1, 2021, 10:27
Default Solution
  #9
New Member
 
Join Date: Jul 2021
Posts: 1
Rep Power: 0
rhommel1 is on a distinguished road
This was over two years ago, but for the future Bingchuan's solution does work if you have two files labeled singleGraph1 and singleGraph2 in your system directory. You can actually do this with infinitely many single graphs (I have tested up to 50).
rhommel1 is offline   Reply With Quote

Reply

Tags
line, singlegraph


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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 06:09
[General] paraview. plot selection over time. multiple lines Svensen ParaView 0 August 26, 2017 02:48
[OpenFOAM.org] Install openFOAM 3.0.1 in Ubuntu 16.04 LTS from Deb packs Pier84 OpenFOAM Installation 4 June 18, 2016 16:22
[PyFoam] what is the unused output? leroyv OpenFOAM Community Contributions 4 July 4, 2014 04:55
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 12:21


All times are GMT -4. The time now is 12:03.