CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Resolving Velocity Magnitudes with Probes (https://www.cfd-online.com/Forums/openfoam/78998-resolving-velocity-magnitudes-probes.html)

steph79 August 9, 2010 16:51

Resolving Velocity Magnitudes with Probes
 
Hi again. I wish to use OpenFOAM to calculate velocity magnitudes in the flow field with respect to time however I have only been able to code for the two respective points below to resolve the u, v and w components which I would rather not have to post-process. I think that the magnitudes need to be calculated and then magU used but I haven't seen this explicitly coded elsewhere on some google searches. Any help would be appreciated, if I haven't explained myself clearly enough then let me know!

Thanks.


Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application    icoFoam;

startFrom      startTime;

startTime      0;

stopAt          endTime;

endTime        0.02;

deltaT          0.0001;

writeControl    timeStep;

writeInterval  10;

purgeWrite      0;

writeFormat    ascii;

writePrecision  12;

writeCompression uncompressed;

timeFormat      general;

timePrecision  12;

runTimeModifiable yes;

libs ( "libOpenFOAM.so" "libgroovyBC.so" ) ;

functions
{
        probes
        {
                type                        probes;
                functionObjectLibs        ("libsampling.so");
                enabled                true;
                outputControl                timeStep;
                outputInterval                10;
                probeLocations
                (
                        ( 1 10 0.5 )
                        ( 2 2  0.5 )
                );
        fields
                (
                U
                );
        }
}


msrinath80 August 9, 2010 17:56

There was a utility called magU in OpenFOAM. Not sure whether it is still around. Just try typing magU and see what happens. If it does exist, then either magU or it's source should tell you how to proceed. Good Luck!

steph79 August 9, 2010 18:16

Quote:

Originally Posted by msrinath80 (Post 270873)
There was a utility called magU in OpenFOAM. Not sure whether it is still around. Just try typing magU and see what happens. If it does exist, then either magU or it's source should tell you how to proceed. Good Luck!

Thanks, I tried that already but it seems to ignore the magU and persists as though it was U. I was thinking that this may have been because I haven't correctly calculated the magU's beforehand though!


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