CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

volum integral of mag(U)...?

Register Blogs Community New Posts Updated Threads Search

Like Tree12Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 27, 2012, 07:39
Default Bug in coded function in parallel mode resolved
  #21
Senior Member
 
Eelco van Vliet
Join Date: Mar 2009
Location: The Netherlands
Posts: 124
Rep Power: 19
eelcovv is on a distinguished road
I just got a message that the bug has been resolved in OF 2.1.x.

http://www.openfoam.org/mantisbt/view.php?id=480

Regards
Eelco
eelcovv is offline   Reply With Quote

Old   September 12, 2012, 10:44
Default
  #22
New Member
 
Michael
Join Date: Dec 2011
Location: Geneva
Posts: 28
Rep Power: 14
lithos is on a distinguished road
Quote:
Originally Posted by akidess View Post
Eelco, did you use this link: https://code.google.com/p/foamcalcex/ ?

I'm attaching a tarball with the code to this post. Let me know if you have any troubles with it.
You're my hero of the day. Thanks a lot for this wonderful piece of code. It is working fine on Mac OS X 10.6.8 with OpenFOAM 2.0.x build 931a91d59a3a.
lithos is offline   Reply With Quote

Old   September 27, 2012, 01:56
Default
  #23
New Member
 
neetu kumari
Join Date: Mar 2011
Posts: 14
Rep Power: 15
neetu kumari is on a distinguished road
Quote:
Originally Posted by akidess View Post
You just compiled the post-processing libraries postCalc and foamCalcFunctionsEx, but not the application. I think you are in the wrong directory.

The directory tree should look like this:

Code:
foamcalcex
---- Allwmake
---- foamCalcExApp
-------- foamCalc.C
-------- Make
---- postProcessing
-------- Allwmake
-------- foamCalcFunctionsEx
-------- postCalc
Are you using the Allwmake script in the top level directory?

Hi!

I am Neetu. I have also downloaded the tar file foamCalcEx. I have compiled it correctly according to your instruction, but still it is not working. When I am running this function from my case directory then it showing that "foamClacEx command is not found". What should I do now? Give me the solution for this problem.

Thanks
neetu kumari is offline   Reply With Quote

Old   October 1, 2012, 08:41
Default
  #24
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Quote:
Originally Posted by neetu kumari View Post
Hi!

I am Neetu. I have also downloaded the tar file foamCalcEx. I have compiled it correctly according to your instruction, but still it is not working. When I am running this function from my case directory then it showing that "foamClacEx command is not found". What should I do now? Give me the solution for this problem.

Thanks
Did you have any compilation errors?
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   October 2, 2012, 11:06
Default
  #25
New Member
 
Michael
Join Date: Dec 2011
Location: Geneva
Posts: 28
Rep Power: 14
lithos is on a distinguished road
Quote:
Originally Posted by neetu kumari View Post
Hi!

I am Neetu. I have also downloaded the tar file foamCalcEx. I have compiled it correctly according to your instruction, but still it is not working. When I am running this function from my case directory then it showing that "foamClacEx command is not found". What should I do now? Give me the solution for this problem.

Thanks
Dear Neetu,

please make sure that you correct each 'files' file in each of the three 'Make' directories. If you use a local user environment for compiling additional stuff for OpenFOAM they should be

Code:
foamCalc.C

EXE = $(FOAM_USER_APPBIN)/foamCalcEx
Code:
calcType/calcType.C
...
LIB = $(FOAM_USER_LIBBIN)/libfoamCalcFunctionsEx
Code:
postCalc.C

LIB = $(FOAM_USER_LIBBIN)/postCalc
That means you would have to set
FOAM_USER_APPBIN
FOAM_USER_LIBBIN.
Usually the structure in WM_PROJECT_USER_DIR should be like
WM_PROJECT_USER_DIR/run
WM_PROJECT_USER_DIR/lib
WM_PROJECT_USER_DIR/platforms/...your_system.../bin. You can find out the assigned directory by typing
Code:
echo $FOAM_USER_APPBIN
Have a nice day.

Cheers,

Michael
lithos is offline   Reply With Quote

Old   October 2, 2012, 11:13
Default
  #26
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
The changes that Michael mentioned are already incorporated in the code repository (the tarball is not up to date). You can follow Michael's instructions, or get a copy using 'hg clone' (see previous posts or https://code.google.com/p/foamcalcex/source/checkout). Also do the same if you want to use foamCalcEx with OF-1.6-ext.

- Anton
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   October 3, 2012, 00:45
Default
  #27
New Member
 
neetu kumari
Join Date: Mar 2011
Posts: 14
Rep Power: 15
neetu kumari is on a distinguished road
Thank you for the reply. Now I am able to compile the file correctly.
Thanks
neetu kumari is offline   Reply With Quote

Old   October 17, 2012, 03:44
Default please help me?
  #28
Member
 
vahid
Join Date: Feb 2012
Location: Mashhad-Iran
Posts: 80
Rep Power: 13
vahid.najafi is an unknown quantity at this point
Hi dear Foamers.
I want to calculate one equation(pics of it attachmented), im my case.
please help me ,and tell me how to do it???
thanks for your attention.
Attached Images
File Type: jpg equation.jpg (51.1 KB, 59 views)
vahid.najafi is offline   Reply With Quote

Old   November 20, 2014, 00:11
Default
  #29
Member
 
Albert Tong
Join Date: Dec 2010
Location: Perth, WA, Australia
Posts: 76
Blog Entries: 1
Rep Power: 15
tfuwa is on a distinguished road
Quote:
Originally Posted by akidess View Post
Eelco, did you use this link: https://code.google.com/p/foamcalcex/ ?

I'm attaching a tarball with the code to this post. Let me know if you have any troubles with it.
Dear Anton,

Thanks for the great tool.

Is it possible to average/integrate a certain parameter over a specific area, say num1<x<num2 & num3<y<num4?
__________________
Kind regards,

Albert
tfuwa is offline   Reply With Quote

Old   November 20, 2014, 04:50
Default
  #30
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Quote:
Originally Posted by tfuwa View Post
Is it possible to average/integrate a certain parameter over a specific area, say num1<x<num2 & num3<y<num4?
The way I would do that is to create a volScalarField (e.g. using funkySetFields) that is 1 in your area of interest and 0 elsewhere, multiply it with your field of interest using foamCalcEx, and then doing the integration or averaging. Alternatively, you can also have a look at funkyDoCalc which might be able to do what you want using a dictionary.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   October 5, 2015, 00:02
Default
  #31
New Member
 
Dasein
Join Date: Mar 2015
Posts: 21
Rep Power: 11
Tellur is on a distinguished road
Hi Anton, I am trying to compile your utility under OpefFoam 2.4. I'm following the details on the wiki installation but I am getting the following error:

~/OpenFOAM/theodore-2.4.0/foamcalcex/postProcessing ~/OpenFOAM/theodore-2.4.0/foamcalcex
+ wmake libo postCalc
'/home/theodore/OpenFOAM/root-2.4.0/platforms/linux64GccDPOpt/lib/postCalc.o' is up to date.
+ wmake libso foamCalcFunctionsEx
make: *** No rule to make target `/opt/openfoam240/src/finiteVolume/lnInclude/cyclicAMILduInterface.H', needed by `calcType/calcType.dep'. Stop.
root@node3:~/OpenFOAM/theodore-2.4.0/foamcalcex# ./Allwmake
~/OpenFOAM/theodore-2.4.0/foamcalcex/postProcessing ~/OpenFOAM/theodore-2.4.0/foamcalcex
+ wmake libo postCalc
'/home/theodore/OpenFOAM/root-2.4.0/platforms/linux64GccDPOpt/lib/postCalc.o' is up to date.
+ wmake libso foamCalcFunctionsEx
SOURCE=calcType/calcType.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam240/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam240/src/OpenFOAM/lnInclude -I/opt/openfoam240/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/calcType.o
In file included from /opt/openfoam240/src/finiteVolume/lnInclude/ddtScheme.C:30:0,
from /opt/openfoam240/src/finiteVolume/lnInclude/ddtScheme.H:325,
from /opt/openfoam240/src/finiteVolume/lnInclude/fvcDdt.C:28,
from /opt/openfoam240/src/finiteVolume/lnInclude/fvcDdt.H:199,
from /opt/openfoam240/src/finiteVolume/lnInclude/fvc.H:44,
from /opt/openfoam240/src/finiteVolume/lnInclude/fvCFD.H:8,
from calcType/calcType.H:48,
from calcType/calcType.C:26:
/opt/openfoam240/src/finiteVolume/lnInclude/cyclicAMIFvPatch.H:39:35: fatal error: cyclicAMILduInterface.H: No such file or directory
#include "cyclicAMILduInterface.H"

I tried looking around in the site for changes in the Make files but nothing worked so far. Any idea what it could be?

Thanks in advance!

Theodore.
Tellur is offline   Reply With Quote

Old   October 12, 2015, 06:26
Default
  #32
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Sorry, I just noticed your post now. If you haven't solved it already, the solution is to modify Make/options for foamCalcFunctionsEx as follows (adding include and library references to meshTools):
Code:
ifdef FOAM_DEV
  FOAM_DEV_OPTION = -DFOAM_DEV
endif
EXE_INC = \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
   $(FOAM_DEV_OPTION)
EXE_LIBS = \
    -lfiniteVolume \
    -lmeshTools
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   August 1, 2016, 07:06
Default
  #33
Senior Member
 
sahm's Avatar
 
Seyyed Ali H.M.
Join Date: Nov 2009
Location: Utah
Posts: 107
Rep Power: 17
sahm is on a distinguished road
Hi Anton

I am trying to compile the FoamCalcEx library on OpenFOAM v1606+ and I have added the meshtools in the options files, but I'm getting this error message:

Quote:
Make/linux64GccDPInt32Opt/field/components/components.o
field/components/components.C: In member function ‘virtual void Foam::calcTypes::components::calc(const Foam::argList&, const Foam::Time&, const Foam::fvMesh&)’:
field/components/components.C:95:21: error: ‘class Foam::IOobject’ has no member named ‘headerOk’
if (fieldHeader.headerOk())
^
/home/sahm/OpenFOAM/OpenFOAM-v1606+/wmake/rules/General/transform:8: recipe for target 'Make/linux64GccDPInt32Opt/field/components/components.o' failed
make: *** [Make/linux64GccDPInt32Opt/field/components/components.o] Error 1
I'm trying to understand where this problem is rooting from. Apparently some other applications of openfoam have this headerOk function and they compiled fine. But this one is giving me error. Could you please help me with this? I need foamCalcEx to calculate average of a field in my project. In the meantime I will try working on it.
__________________
SAHM
sahm is offline   Reply With Quote

Old   January 24, 2019, 17:00
Default
  #34
Senior Member
 
sahm's Avatar
 
Seyyed Ali H.M.
Join Date: Nov 2009
Location: Utah
Posts: 107
Rep Power: 17
sahm is on a distinguished road
For my future reference: Change headerOk to typeHeaderOK
__________________
SAHM
sahm is offline   Reply With Quote

Old   January 6, 2020, 11:39
Default
  #35
Member
 
X
Join Date: Jan 2019
Posts: 63
Rep Power: 7
mcfdma is on a distinguished road
Hello Anton, firstly, thank you for sharing your utility.

I would like to know if it's possible to use volIntegrate field across a line (one point to another) instead of the entire domain?
mcfdma is offline   Reply With Quote

Old   April 23, 2020, 08:32
Default
  #36
Member
 
Kabir Shariff
Join Date: Oct 2016
Location: France
Posts: 53
Rep Power: 10
Kbshariff is on a distinguished road
Quote:
Originally Posted by akidess View Post
If I may shamelessly promote my own utility here:

http://code.google.com/p/foamcalcex/

I extended the standard foamCalc tool to support min, max and volumeIntegrate calculations.

Code:
foamCalcEx mag U
foamCalcEx volIntegrate magU > data.txt
The above lines will write the volume integral into a text file data.txt.



I tried to use your uility on OF 7, but unfortunately i have this error.


Kindly assist please
Code:
~/foamcalcex/postProcessing ~/foamcalcex
+ wmake libo postCalc
wmake libo postCalc
+ wmake libso foamCalcFunctionsEx
wmake libso foamCalcFunctionsEx
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam7/src/finiteVolume/lnInclude  -IlnInclude -I. -I/opt/openfoam7/src/OpenFOAM/lnInclude -I/opt/openfoam7/src/OSspecific/POSIX/lnInclude   -fPIC -c calcType/calcType.C -o Make/linux64GccDPInt32Opt/calcType/calcType.o
In file included from /opt/openfoam7/src/finiteVolume/lnInclude/ddtScheme.C:30:0,
                 from /opt/openfoam7/src/finiteVolume/lnInclude/ddtScheme.H:357,
                 from /opt/openfoam7/src/finiteVolume/lnInclude/fvcDdt.C:28,
                 from /opt/openfoam7/src/finiteVolume/lnInclude/fvcDdt.H:250,
                 from /opt/openfoam7/src/finiteVolume/lnInclude/fvc.H:44,
                 from /opt/openfoam7/src/finiteVolume/lnInclude/fvCFD.H:8,
                 from calcType/calcType.H:48,
                 from calcType/calcType.C:26:
/opt/openfoam7/src/finiteVolume/lnInclude/cyclicAMIFvPatch.H:39:10: fatal error: cyclicAMILduInterface.H: No such file or directory
 #include "cyclicAMILduInterface.H"
          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/opt/openfoam7/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/calcType/calcType.o' failed
make: *** [Make/linux64GccDPInt32Opt/calcType/calcType.o] Error 1



regards,


Kabir
Kbshariff 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
RANS in integral form siw Main CFD Forum 0 August 17, 2010 04:18
please help to patch volum of secondary phase VOF zidouni FLUENT 1 February 27, 2008 06:46
monitor surface integral & report surface integral Ning FLUENT 0 March 18, 2007 13:51
Evaluation of boundary integral aunola Main CFD Forum 0 May 8, 2006 08:54
Von Karman Integral Length Scale Txingurri Main CFD Forum 0 May 2, 2002 13:05


All times are GMT -4. The time now is 12:59.