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

Probes

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 4, 2011, 05:07
Default Probes
  #1
Member
 
supercommandodhruv
Join Date: Sep 2011
Posts: 57
Rep Power: 5
dhruv is on a distinguished road
Hello All,

I am using probes function to have data points at some locations in my domain. I have 2 questions.

1. If I use U as fields, I get the three components at of velocity at that point. Is there a way to get the magnitude of velocity at that point (like mag U) ?

2. For the location of the probes, I have different locations which changes with every test case, so I want the controlDict to read the locations from from a different file, where I have set the formula for the location points. How can I do this?

Thanks in advance for your help.

Dhruv.
dhruv is offline   Reply With Quote

Old   October 4, 2011, 11:46
Default
  #2
nsf
Member
 
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 85
Rep Power: 7
nsf is on a distinguished road
Hi,

I'm not sure about the first question, maybe someone else can help you there.

For the second question; you can use include statements in your controlDict file,

Code:
        ...
        probeLocations
        (
#include "some/PATH/someFile"
	);
        ...
Where someFile contains your probes just as if you would have entered them without the include statement.

Good Luck

/N
nsf is offline   Reply With Quote

Old   October 5, 2011, 02:55
Default Thanks
  #3
Member
 
supercommandodhruv
Join Date: Sep 2011
Posts: 57
Rep Power: 5
dhruv is on a distinguished road
Thanks nsf,

I also looked in one of the tutorials, and found the same. I will try it today.

Dhruv.

Quote:
Originally Posted by nsf View Post
Hi,

I'm not sure about the first question, maybe someone else can help you there.

For the second question; you can use include statements in your controlDict file,

Code:
        ...
        probeLocations
        (
#include "some/PATH/someFile"
    );
        ...
Where someFile contains your probes just as if you would have entered them without the include statement.

Good Luck

/N
dhruv is offline   Reply With Quote

Old   October 5, 2011, 12:59
Default
  #4
nsf
Member
 
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 85
Rep Power: 7
nsf is on a distinguished road
Quote:
Originally Posted by dhruv View Post
Thanks nsf,

I also looked in one of the tutorials, and found the same. I will try it today.

Dhruv.
No worries,

Here's a trick I'd like to share for those new to linux and bash.

Let's say you wanted to find tutorial examples that use include statements in the controlDict file, this one-liner can help you

Code:
find $FOAM_TUTORIALS -name controlDict | xargs grep "#include"
the first command (find) will list all controlDict files in the tutorial folder. The pipe (|) will pass the list to xargs which will run grep "#include" once on each controlDict in the list.

Hopefully someone will find this useful .

/Nicolas
nsf is offline   Reply With Quote

Reply

Tags
probes

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
Error using probes balkrishna OpenFOAM Running, Solving & CFD 6 November 12, 2010 05:55
Resolving Velocity Magnitudes with Probes steph79 OpenFOAM 2 August 9, 2010 18:16
probes for a component of a volTensorField titio OpenFOAM Post-Processing 0 July 2, 2010 13:50
problems with probes() function in chtMultiRegionFoam Victor OpenFOAM 0 November 25, 2009 16:08
Probes and multiprocessor runs grtabor OpenFOAM Running, Solving & CFD 1 June 12, 2007 13:59


All times are GMT -4. The time now is 14:46.