|
[Sponsors] |
[General] Plot the spreading of oil on the surface of water over time |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 27, 2013, 18:49 |
Plot the spreading of oil on the surface of water over time
|
#1 |
Member
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 15 |
Good afternoon everyone!
I am working on a case that measure the oil spreading over water and I want to measure how the oil behaves over time. Now I am able to visualize the oil spreading, however, I am not able to plot the spreading of oil from central to the wall boundary. As far as I can think of is to use the filter: plot selection over time. I used a clip filter to exact the water only and select the surface of the water then use Plot selection over time filter to do it, but it doesn't seem to be working. Does anyone have any idea about how to do this? Thanks in advance. |
|
April 28, 2013, 07:33 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings liguifan,
Try the instructions from this thread: http://www.cfd-online.com/Forums/par...-analysis.html Best regards, Bruno
__________________
|
|
May 21, 2013, 18:07 |
|
#3 | |
Member
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 15 |
Hi Bruno,
Thanks for the reply, I followed you instruction from the other thread, however, in the test case provided, you have fixed a position and measure the height change in that position. In my case, the point I am interested is spreading over the surface of the water. If I use alpha=0.5 in the coutour, it will show the whole surface of the water, not just the oil on the surface, but what I am interested is plot the distance of oil spread on the water surface VS time. Do you have any ideas about that? Quote:
|
||
May 21, 2013, 18:35 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Guifan,
Well, the other example allows us to tell apart water from air by using the contour "alpha=0.5", because "alpha=1" is water and "alpha=0" is air. But in your case, I do not know how you can tell apart water from oil, because I do not see what you're seeing! What values/fields can you use to tell the two apart? Best regards, Bruno
__________________
|
|
May 21, 2013, 18:46 |
|
#5 | |
Member
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 15 |
Hi Bruno,
Please have a look at these two photos, the first one shows that there are three phases, red one is air, white one is oil and blue is water. This is a wedge. The alphawater =0 alphasoil=1 and alphaair=2. The second photo is to use the clip filter to filter out the oil, so that you can see the oil only spreading on the surface of water. Quote:
|
||
May 21, 2013, 19:03 |
|
#6 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Guifan,
Then it should be very simple: when you apply the "Contour" filter, you can choose more than one value. In this case, you can pick "0.5" and "1.5"! Best regards, Bruno
__________________
|
|
May 21, 2013, 19:14 |
|
#7 |
Member
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 15 |
This is to separate the water and oil and air oil, but how can I plot the moving oil VS time if you have any idea?
I will give it a try tonight see what happens. Best, Guifan |
|
May 21, 2013, 19:27 |
|
#8 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Guifan,
Oh, sorry, I forgot about that particular detail of tracking the whole surface instead of a single point. I've done a quick test and I think the following steps can help a bit:
Bruno
__________________
|
|
May 22, 2013, 15:30 |
|
#9 | |
Member
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 15 |
Hi Bruno,
I tested you method today, and got something as shown in the picture. The rectangular is the initial oil and the second picture is the oil film after a few seconds. As you can see, the upper bound of the plot is the outer boundary of the oil film on the surface of water, which is pretty good for now. But I am not sure why the plot is like this, looks quite messy. And I want to plot the upper bound( the max value of the plot) VS time. Do you have any idea about that? Btw, why we need to mark the style as cross? Thanks for that. Quote:
|
||
May 22, 2013, 19:12 |
|
#10 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Guifan,
Quote:
Because this method does not sort the points by the order of connection. Wait, I've done a few more tests and remembered about the "Plot on Sorted Lines" filter, which is shown in the attached image. Use this filter instead of the "Plot Data". Another detail to look for is the "DataSet" blocks shown on the lower left part of the image, inside the "Select Block" tree. It looks like we can only show one line at a time, in case they become disconnected. By the way, I used the "Slice" filter in order to make it easier plot the data. Best regards, Bruno
__________________
|
||
January 29, 2014, 09:19 |
Spread plot over 3D contour
|
#11 |
Senior Member
|
Dear all,
seems I have some difficulties in the transfer of this solution to my problem: I have a gas cloud extending within a tunnel. Producing the contour at the different timesteps is not a problem. (see attached image) But for proper comparison to other simulations (and experimental data at some point) I would need to have the propagation speed of the cloud front (i.e. the position of the most-forward point of the contour). The steps I see are: - get the contour (works nicely) - get the point most distant from the reference plane (origin) (not working yet) - plot the specific coordinate of that point (needs the point) - make the plot over time (needs the previous data) Anybody with an idea how I can get to the goal? Thanks for any answer in advance! Cheers, Bernhard |
|
February 2, 2014, 08:51 |
|
#12 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Bernhard,
Well, in your case, the only solution is to rely on the filter "Programmable Filter": http://www.paraview.org/Wiki/Python_Programmable_Filter Here's what I tested and worked:
Code:
pdi = self.GetPolyDataInput() pdo = self.GetPolyDataOutput() pdo.Allocate(1, 1) newPoints = vtk.vtkPoints() numPoints = pdi.GetNumberOfPoints() maxLocation = [-2.0e300, -2.0e300, -2.0e300] maxLocations = [] for i in range(0, numPoints): coord = pdi.GetPoint(i) if coord[0] > maxLocation[0]: maxLocation = coord maxLocations = [maxLocation] elif abs(coord[0] - maxLocation[0]) < 1.0e-5: maxLocations.append(coord) maxLocation = mean(maxLocations) newPoints.InsertPoint(0, maxLocation[0], maxLocation[1], maxLocation[2]) pdo.SetPoints(newPoints) Code:
pdo.Allocate(1, 1) Best regards, Bruno |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting up Lid driven Cavity Benchmark with 1M cells for multiple cores | puneet336 | OpenFOAM Running, Solving & CFD | 11 | April 7, 2019 01:58 |
How to export time series of variables for one point? | mary mor | OpenFOAM Post-Processing | 8 | July 19, 2017 11:54 |
Stuck in a Rut- interDyMFoam! | xoitx | OpenFOAM Running, Solving & CFD | 14 | March 25, 2016 08:09 |
dynamic Mesh is faster than MRF???? | sharonyue | OpenFOAM Running, Solving & CFD | 14 | August 26, 2013 08:47 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 19:07 |