|
[Sponsors] |
April 16, 2010, 19:07 |
Sampling at time-varying locations
|
#1 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
To my knowledge no one has asked this question, so here goes.
I am currently calculating a field that exists only on wall patches. I would like to be able to use the sample utility to extract the value at certain locations. However, the boundary is moving (translating only), and I can't think of a way to use sample to get the values. I know where the mesh starts, so one possibility I was mulling was to change sample so that it would identify the patch that is at the initial sampling location and only output data from that patch afterwards. I've done similar things before using very basic for loops, but I was looking do things using pre-existing OpenFOAM code for better performance. What are some pieces of code I could look at to get ideas? Due to legacy support I am using OpenFoam 1.4 (will be making the transition to 1.(whatever-the-current-version-is) in about a year). |
|
July 15, 2010, 17:58 |
|
#2 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
As a follow up, I see that as of OF1.6, there is the option to sample a movingWall. From the sampleDict in the sample application directory, it looks like I can only sample the patch itself, is this correct?
|
|
October 12, 2010, 19:58 |
|
#3 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
One solution I thought of was writing a script that changed the sampleDict sample line points, since its only one coordinate that is required to change. This is tricky as I would have to be able to identify the exact place the coordinate occurs in. Then I would have to call sample with the -time argument. This looks very messy.
I was poking around the documentation for ParaView, and saw that "Programmable Filter" might do the trick. I don't have much experience with Python though. What I would like to do is use "Programmable Filter" on "Plot over Line" to shift the position of the line so that it remains in the same place relative to a particular patch. I know how to calculate the displacement based on the current time, but I don't know how to 1) Retrieve the time 2) Change the coordinates of the line endpoints Anyone have ideas of how to do this? This could actually open up a lot of cool stuff. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PostChannel | maka | OpenFOAM Post-Processing | 5 | July 22, 2009 09:15 |
Problems with simulating TurbFOAM | barath.ezhilan | OpenFOAM | 13 | July 16, 2009 05:55 |
air bubble is disappear increasing time using vof | xujjun | CFX | 9 | June 9, 2009 07:59 |
Data sampling for time statistics with RANS | Flav | FLUENT | 0 | June 6, 2001 04:32 |
unsteady calcs in FLUENT | Sanjay Padhiar | Main CFD Forum | 1 | March 31, 1999 12:32 |