Difference between revisions of "Contrib foamCalcEx"

From OpenFOAMWiki
(Added grad)
(updated final link and minor html format fix)
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{VersionInfo}} {{Version1.6.x}} {{Version1.6-ext}} {{Version2.0.x}}
+
{{VersionInfo}} {{Version1.6.x}} {{Version1.6-ext}} {{Version2.0.x}} {{Version2.1}} {{Version3.0-ext}}
  
 
== Short description ==
 
== Short description ==
Line 7: Line 7:
 
== Usage ==  
 
== Usage ==  
  
The utility works the same way as the standard foamCalc tool, but accepts extra parameters (min, max, volIntegrate, average, grad):
+
The utility works the same way as the standard foamCalc tool, but accepts extra parameters (min, max, volIntegrate, average, grad, scalarMultiply):
  
 
<pre>
 
<pre>
./foamCalcEx min <fieldName> [-latestTime] [-time ranges]  
+
foamCalcEx min <fieldName> [-latestTime] [-time ranges]  
  
./foamCalcEx max <fieldName> [-latestTime] [-time ranges]
+
foamCalcEx max <fieldName> [-latestTime] [-time ranges]
  
./foamCalcEx volIntegrate <fieldName> [-latestTime] [-time ranges]
+
foamCalcEx minMax <fieldName> [-latestTime] [-time ranges]
  
./foamCalcEx average <fieldName> [-latestTime] [-time ranges]
+
foamCalcEx cellMinMax <fieldName> [-latestTime] [-time ranges]
  
./foamCalcEx grad <fieldName> [-latestTime] [-time ranges]
+
foamCalcEx volIntegrate <fieldName> [-latestTime] [-time ranges]
 +
 
 +
foamCalcEx average <fieldName> [-latestTime] [-time ranges]
 +
 
 +
foamCalcEx grad <fieldName> [-latestTime] [-time ranges]
 +
 
 +
foamCalcEx laplacian <fieldName> [-latestTime] [-time ranges]
 +
 
 +
foamCalcEx multiplyDivide <fieldName> multiply/divide -field/value <scalar_value>/<fieldName> [-latestTime] [-time ranges]
 
</pre>
 
</pre>
  
 
== Download ==
 
== Download ==
Get the most recent version here: http://code.google.com/p/foamcalcex/
+
Get the most recent version here: https://bitbucket.org/akidess/foamcalcex
  
To install, run the following commands in a terminal window where you have loaded the OpenFOAM environment:
+
To install, run one of the following group of commands in a terminal window where you have loaded the OpenFOAM environment:
 +
<ul {{NoIndentStyle}}>
 +
<li>If you have {{tt|hg}} ([http://en.wikipedia.org/wiki/Mercurial Mercurial]) installed:
 
<pre>
 
<pre>
hg clone https://code.google.com/p/foamcalcex/
+
hg clone https://bitbucket.org/akidess/foamcalcex
 
cd foamcalcex
 
cd foamcalcex
 
./Allwmake
 
./Allwmake
 
</pre>
 
</pre>
 +
</li>
 +
<li>If you do not have {{tt|hg}} ([http://en.wikipedia.org/wiki/Mercurial Mercurial]) installed or if you're in a country with a more restricted access or unable to use [http://en.wikipedia.org/wiki/HTTP_Secure HTTPS]:
 +
<pre>
 +
wget https://bitbucket.org/akidess/foamcalcex/get/tip.zip -O latest-foamCalcEx.zip
 +
unzip latest-foamCalcEx.zip
 +
cd akidess-foamcalcex-*
 +
chmod +x Allwmake postProcessing/Allwmake
 +
find . -exec touch '{}' \;
 +
./Allwmake
 +
</pre>
 +
</li>
 +
</ul>
  
 
== History ==
 
== History ==
Line 39: Line 61:
 
--[[User:Akidess|Akidess]] 09:38, 18 October 2011 (CEST)
 
--[[User:Akidess|Akidess]] 09:38, 18 October 2011 (CEST)
  
 +
 +
== Note ==
 +
Be aware that the [[Contrib/swak4Foam|swak4Foam]] utilities [[Contrib_funkySetFields|funkySetFields]] and [http://openfoamwiki.net/index.php/Contrib/swak4Foam/README_2.x#.3DfunkyDoCalc.3D funkyDoCalc] can also be used for post-processing calculations (with longer commandline flags or dictionaries)
 
[[Category:Utilities]]
 
[[Category:Utilities]]

Latest revision as of 01:02, 17 May 2015

Valid versions: OF Version 16x.png OF Version 16ext.png OF Version 20x.png OF Version 21.png OF Version 30ext.png

1 Short description

A patch to the foamCalc tool to enable some extra field operations such as min and max.

2 Usage

The utility works the same way as the standard foamCalc tool, but accepts extra parameters (min, max, volIntegrate, average, grad, scalarMultiply):

foamCalcEx min <fieldName> [-latestTime] [-time ranges] 

foamCalcEx max <fieldName> [-latestTime] [-time ranges]

foamCalcEx minMax <fieldName> [-latestTime] [-time ranges]

foamCalcEx cellMinMax <fieldName> [-latestTime] [-time ranges]

foamCalcEx volIntegrate <fieldName> [-latestTime] [-time ranges]

foamCalcEx average <fieldName> [-latestTime] [-time ranges]

foamCalcEx grad <fieldName> [-latestTime] [-time ranges]

foamCalcEx laplacian <fieldName> [-latestTime] [-time ranges]

foamCalcEx multiplyDivide <fieldName> multiply/divide -field/value <scalar_value>/<fieldName> [-latestTime] [-time ranges]

3 Download

Get the most recent version here: https://bitbucket.org/akidess/foamcalcex

To install, run one of the following group of commands in a terminal window where you have loaded the OpenFOAM environment:

  • If you have hg (Mercurial) installed:
    hg clone https://bitbucket.org/akidess/foamcalcex
    cd foamcalcex
    ./Allwmake
    
  • If you do not have hg (Mercurial) installed or if you're in a country with a more restricted access or unable to use HTTPS:
    wget https://bitbucket.org/akidess/foamcalcex/get/tip.zip -O latest-foamCalcEx.zip
    unzip latest-foamCalcEx.zip
    cd akidess-foamcalcex-*
    chmod +x Allwmake postProcessing/Allwmake
    find . -exec touch '{}' \;
    ./Allwmake
    

4 History

--Akidess (talk) 13:59, 2 October 2012 (CEST) Now runs on OF-1.6-ext

--Akidess 08:36, 10 January 2012 (CET)

--Akidess 09:38, 18 October 2011 (CEST)


5 Note

Be aware that the swak4Foam utilities funkySetFields and funkyDoCalc can also be used for post-processing calculations (with longer commandline flags or dictionaries)