CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

How to digitize a complex pressure distribution plot

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By sbaffini

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 6, 2023, 04:40
Question How to digitize a complex pressure distribution plot
  #1
New Member
 
Jakub
Join Date: Feb 2023
Posts: 1
Rep Power: 0
Deltahawk is on a distinguished road
Hi everyone,

I'm trying to digitise the total/stagnation pressure distributions of a boundary layer ingesting engine. I have a lot of experimental and computational data from past work but I'm struggling to convert it into a vtk format. My current approach is creating a csv file with engauge by manually drawing lines along each pressure contour line but the limitation is that it only creates separate lines when the contours are uniformly distributed or almost flat and the majority of my dataset is highly distorted.

I'm using a simple MATLAB code which converts a csv file into a vtk file however, it only works when it has the same x-coordinate for every line. Since most of the pressure distributions at high angles of attack are non-uniform, engauge is not able to capture these contours separately and I can't create a suitable csv file for MATLAB to convert.

I looked everywhere for a similar software to engauge but every other approach gives me separate x values for each line. Is there any other way I could digitize this data? I though of changing the MATLAB script to accept separate x values but I'm not sure how to go about it.

Hopefully it makes sense. I uploaded an example of what I'm digitizing.

Thank you in advance.
Attached Images
File Type: jpg Figure 5.6ab.jpg (52.3 KB, 16 views)
File Type: png Screenshot 2022-04-27 at 18.15.42.png (67.2 KB, 11 views)
Deltahawk is offline   Reply With Quote

Old   February 6, 2023, 12:35
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Sorry, I am not sure to understand the format of your initial data.

Matlab is good for many matrix manipulation, also for graphic data but depending on your initial data maybe Tecplot could be of some help.
FMDenaro is offline   Reply With Quote

Old   February 6, 2023, 17:24
Default
  #3
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
I have no idea how you can accurately extract contour values from any location in the plot, but let us assume that you can, so that you have scattered data as follows:

Z1, Y1, f1
Z2, Y2, f2
...
Zn, Yn, fn

where the f are the value you are extracting and the (z,y) couples are the location where they are being extracted from.

What you can do with this data, if the (z,y) couples are scattered (i.e., with no particular order or distribution), is:

1) Do a delaunay triangulation and either just come out with the data on the resulting unstructured triangular grid or use it to reinterpolate the data linearly on whatever other grid

2) Directly interpolata the data to the desired grid

The latter option involves putting up your data structure for an N nearest neighbor search and being able to interpolate from N scattered points, say with an RBF. The RBF route may work also with all the points, so with no need of any data structure, but you'll need to work more on the resulting system solution.

I'm pretty sure that someone has already done this with Matlab and most or all the pieces are out there, whatever route you choose
sbaffini is offline   Reply With Quote

Old   February 6, 2023, 18:51
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by sbaffini View Post
I have no idea how you can accurately extract contour values from any location in the plot, but let us assume that you can, so that you have scattered data as follows:

Z1, Y1, f1
Z2, Y2, f2
...
Zn, Yn, fn

where the f are the value you are extracting and the (z,y) couples are the location where they are being extracted from.

What you can do with this data, if the (z,y) couples are scattered (i.e., with no particular order or distribution), is:

1) Do a delaunay triangulation and either just come out with the data on the resulting unstructured triangular grid or use it to reinterpolate the data linearly on whatever other grid

2) Directly interpolata the data to the desired grid

The latter option involves putting up your data structure for an N nearest neighbor search and being able to interpolate from N scattered points, say with an RBF. The RBF route may work also with all the points, so with no need of any data structure, but you'll need to work more on the resulting system solution.

I'm pretty sure that someone has already done this with Matlab and most or all the pieces are out there, whatever route you choose



Paolo I was thinking to Tecplot because of the unstructured data, the list being exactly what you wrote. Then, would be easy to work for each triangular element and getting isovalue line



f(x,y)=a+b*x+c*y ->y(x)= (f_v -a -b*x)/c
FMDenaro is offline   Reply With Quote

Old   February 7, 2023, 12:45
Default
  #5
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by FMDenaro View Post
Paolo I was thinking to Tecplot because of the unstructured data, the list being exactly what you wrote. Then, would be easy to work for each triangular element and getting isovalue line



f(x,y)=a+b*x+c*y ->y(x)= (f_v -a -b*x)/c
I haven't used Tecplot in maybe 2 decades, so I don't know if it does what he needs. But I think that he has the opposite problem: the data extraction from the figure actually provided the isolines (or some other scrambled set of data), but he needs to convert them in a more common format for visualization.

If Tecplot can digest a scattered set of points with data and come up with the resulting contours then, I guess, it is the simplest route.

My original suggestion came from the fact that, in the past, I worked with MATLAB on the wasp .map file format for terrains, which is just a collection of isolines, hence I know that it is doable in MATLAB very easily. In my case I wanted to get an STL file of the terrain surface, but the matter is pretty much the same.
FMDenaro likes this.
sbaffini is offline   Reply With Quote

Old   February 7, 2023, 12:57
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Let see more details from the authors about his real goal.

Anyway, I think that it is a simple task using the linear law y(x;f_v) to extract the required set of data representing the isolines.
FMDenaro is offline   Reply With Quote

Reply

Tags
matlab code, post-processing, pressure contour, vtk file


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
Total pressure distribution at boundary as a named expression ftopper FLUENT 0 December 9, 2022 10:23
Getting divergence while increasing the back pressure at pressure outlet greenfields15 FLUENT 0 March 19, 2018 00:39
outlet pressure Boundary settings -velocity streamline under ambient temp.conditions Vishnu_bharathi CFX 12 November 21, 2017 07:56
Small wiggles in pressure distribution Rouven Pointwise & Gridgen 5 August 29, 2015 12:51
Bad pressure distribution in pump oringo FLUENT 2 March 2, 2013 11:38


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