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

post-processing procedures in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Rate this Entry

post-processing procedures in OpenFOAM

Posted January 6, 2017 at 07:54 by kindle

$ ls src/postProcessing
Allwmake foamCalcFunctions functionObjects postCalc

In "Allwmake" types for the three:
postCalc : libo
foamCalcFunctions : libso
functionObjects : libso

Ref{
In User's Guide "Running wmake"
lib : statically linked lib
libso : dynamically linked lib (*.so)
libo : statically linked object file lib (*.o)
}

************************************************** ******
First part postCalc
************************************************** ******
In postCalc : calc.H, postCalc.C (main)
In applications/utilities/postProcessing/velocityField take vorticity as example.

#include "calc.H" (there's no main function)
#include "fvc.H" (fvc::curl)

back to practical : how do you use utility vorticity? "vorticity" is an executable as indicated in Make/files
Then how does it run without a main function?
It doesn't. Because we only considered #include omitting the linking options in Make/options:

1 EXE_INC = \
2 -I$(LIB_SRC)/postProcessing/postCalc \
3 -I$(LIB_SRC)/finiteVolume/lnInclude \
4 -I$(LIB_SRC)/meshTools/lnInclude
5
6 EXE_LIBS = \
7 $(FOAM_LIBBIN)/postCalc.o \
8 -lgenericPatchFields \
9 -lfiniteVolume \
10 -lmeshTools

The first part is the including headers dir corresponding #include in the vorticity.C thus repetitive information.
The second part is the linking to libraries :
it links with postCalc.o ! And other libraries : genericPatchFields, finiteVolume, meshTools.

The main function when executing "voriticity" is in $(FOAM_LIBBIN)/postCalc.o

However $ ldd /opt/openfoam30/platforms/linux64GccDPInt32Opt/bin/vorticity does not give the lib postCalc.o :

linux-vdso.so.1 => (0x00007fffc3c88000)u/libltdl.so.7 (0x00007fbb63750000)
libgenericPatchFields.so => /opt/openfoam30/platforms/linux64GccDPInt32Opt/lib/libgenericPatchFields.so (0x00007f03f4ce0000)
libfiniteVolume.so => /opt/openfoam30/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so (0x00007f03f3699000)
libmeshTools.so => /opt/openfoam30/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so (0x00007f03f30e0000)
libOpenFOAM.so => /opt/openfoam30/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so (0x00007f03f2720000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f03f2510000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f03f2200000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f03f1ee0000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f03f1cc0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f03f18f0000)
libPstream.so => /opt/openfoam30/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so (0x00007f03f16d0000)
libtriSurface.so => /opt/openfoam30/platforms/linux64GccDPInt32Opt/lib/libtriSurface.so (0x00007f03f1430000)
libsurfMesh.so => /opt/openfoam30/platforms/linux64GccDPInt32Opt/lib/libsurfMesh.so (0x00007f03f1120000)
libfileFormats.so => /opt/openfoam30/platforms/linux64GccDPInt32Opt/lib/libfileFormats.so (0x00007f03f0e90000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f03f0c70000)
/lib64/ld-linux-x86-64.so.2 (0x00007f03f5000000)
libmpi.so.1 => /usr/lib/libmpi.so.1 (0x00007f03f08d0000)
libhwloc.so.5 => /usr/lib/x86_64-linux-gnu/libhwloc.so.5 (0x00007f03f0690000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f03f0460000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f03f0250000)
libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007f03f0030000)
libnuma.so.1 => /usr/lib/x86_64-linux-gnu/libnuma.so.1 (0x00007f03efe20000)

************************************************** ******
Second part foamCalc
************************************************** ******
Main function is here : applications/utilities/postProcessing/foamCalc
taking a utility name as argument.
Ex: foamCalc div phi

And all its utility functions are src/postProcessing/foamCalcFunctions

************************************************** ******
Third part functionObjects
************************************************** ******
Posted in Post-processing
Views 1926 Comments 0 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 0

Comments

 

All times are GMT -4. The time now is 05:10.