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

Specifying probe locations in controlDict using dictionary file

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 19, 2008, 12:09
Default In 1.5.x, the following code i
  #1
New Member
 
Vincent Tang
Join Date: Mar 2009
Posts: 1
Rep Power: 0
vincent is on a distinguished road
In 1.5.x, the following code in controlDict samples and writes to frontProbes/0/p and backProbes/0/p during run time
frontProbes
{<blockquote>type probes;
functionObjectLibs ( "libsampling.so" );
probeLocations ( ( -1 0 1) (-1 0 2) );
fields ( p );
}
backProbes
{
type probes;
functionObjectLibs ( "libsampling.so" );
probeLocations ( ( 1 0 1) (1 0 2) );
fields ( p );
}
</blockquote>

However, using dictionary files as the following code does will cause both sets of results to be written to probes/0/p resulting in an unusable output file.
frontProbes
{<blockquote> type probes;
functionObjectLibs ( "libsampling.so" );
dictionary frontProbesDict;
}
backProbes
{
type probes;
functionObjectLibs ( "libsampling.so" );
dictionary backProbesDict;
}
</blockquote>

The issue is caused by different OutputFilter initialization in Foam:: OutputFilterFunctionObject<outputfilter>::start()

OutputFilterFunctionObject.C
IOOutputFilter.C
IOOutputFilter.H
The modifications attached solves the problem by providing an additional constructor in IOOutputFilter. The new constructor allows OutputFilter to be constructed with specified name. I am new to OpenFOAM development. Could someone review the code changes to make sure it fits the OpenFOAM standards?

Thanks.

Vincent
vincent is offline   Reply With Quote

Old   December 24, 2008, 06:29
Default Thanks for the contribution, I
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
Thanks for the contribution, I will review and apply it to 1.5.x after Christmas.

H
henry is offline   Reply With Quote

Old   December 30, 2008, 17:20
Default The changes you proposed are f
  #3
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
The changes you proposed are fine and the new constructor IOOutputFilter can replace the existing one with only minor change. I have applied these changes to 1.5.x.

Thanks

H
henry is offline   Reply With Quote

Old   December 31, 2008, 05:25
Default You forgot to check in the bug
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
You forgot to check in the bug fix in probeLocations.C, line 47.

(/home/hjasak/OpenFOAM/OpenFOAM-1.5-dev/applications/utilities/postProcessing/sa mpling/probeLocations)

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Reply


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
ControlDict for snappyHexMesh adn interFoam erik023 OpenFOAM Running, Solving & CFD 3 November 10, 2008 19:27
[mesh manipulation] RotateMesh Dictionary File titio OpenFOAM Meshing & Mesh Conversion 2 March 12, 2008 11:15
FoamXException by change in controlDict vladimir OpenFOAM Pre-Processing 2 March 14, 2007 15:32
Reading controlDict diegon OpenFOAM Running, Solving & CFD 1 February 6, 2007 13:31
Compilation problems and file locations Joel Siemens 3 February 11, 2003 13:42


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