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

Sampling at time-varying locations

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 16, 2010, 19:07
Question Sampling at time-varying locations
  #1
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
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).
mturcios777 is offline   Reply With Quote

Old   July 15, 2010, 17:58
Default
  #2
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
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?
mturcios777 is offline   Reply With Quote

Old   October 12, 2010, 19:58
Default
  #3
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
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.
mturcios777 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 22:08.