CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Specifying probe locations in controlDict using dictionary file (http://www.cfd-online.com/Forums/openfoam-bugs/62357-specifying-probe-locations-controldict-using-dictionary-file.html)

vincent December 19, 2008 12:09

In 1.5.x, the following code i
 
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()

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif OutputFilterFunctionObject.C
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif IOOutputFilter.C
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif 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

henry December 24, 2008 06:29

Thanks for the contribution, I
 
Thanks for the contribution, I will review and apply it to 1.5.x after Christmas.

H

henry December 30, 2008 17:20

The changes you proposed are f
 
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

hjasak December 31, 2008 05:25

You forgot to check in the bug
 
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


All times are GMT -4. The time now is 21:40.