CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] How to install swak4Foam in OF 2.3? (https://www.cfd-online.com/Forums/openfoam-community-contributions/130788-how-install-swak4foam-2-3-a.html)

preacher March 4, 2014 09:06

How to install swak4Foam in OF 2.3?
 
Greetings Everyone

I am trying to download and install swak4Foam for my simulation but i cannot find a swak4Foam.tar.gz file anywhere. Please provide me with a link?

Also it would be helpful if you could provide a brief install method of swak4foam, like where to unzip and compile.

Should i unzip it in Thirdparty folder?

Thannks in advance..:)

Sreetej

hxaxtma March 4, 2014 09:13

swak4Foam for of 2.3 is still in progress, latest version works with ofv222

preacher March 4, 2014 09:29

Thanks for the reply.

Oh... So should In install OF 2.2.2 now.. I recently installed OF 2.3 .

I am new to OPENFOAM platform, what do I need to do in order to roll back to 2.2.2?

Or should I install all over again?

wyldckat March 4, 2014 10:20

Quick news: I've updated the "Downloading" section for swak4Foam, on what to do in regards to OpenFOAM 2.3.0: http://openfoamwiki.net/index.php/Co...am#Downloading

preacher March 5, 2014 00:01

Greetings Once again..

I followed the link provided in the last reply and downloaded the 6.3.1 unofficial-extend-project-mirror.github.io ---- master.tar.gz.

When i unzipped and did ./Allwmake I got this error message..

[sreetej001@hpclogin1 openfoam-extend-Breeder2.0-libraries-swak4Foam-master]$ ./Allwmake
This is a clean install
No file 'swakConfiguration'. Python etc won't work. See README for details
Checking swak4Foam-version and generating file
Swak version is 0.3.0
Bison is version 3.0
swak4Foam only confirmed to work with Bison 2.x
Set the environment variable DEVELOPE_FOR_NEW_BISON if you want to continue anyway.


Any help regarding how to set the environment variable?

Thanks in advance..:)

wyldckat March 5, 2014 14:45

@preacher: I think you downloaded the wrong file. If you want swak4Foam in package format, then you should have downloaded from this link: http://sourceforge.net/p/openfoam-ex..._2.0.x/tarball

Either way, the problem is that Bison 3.0 is not compatible.
Therefore, after you download the file from the link above and unpacked it, then go into the command line and run:
Code:

maintainanceScripts/compileRequirements.sh
./Allwmake

The first line will compile a custom Bison 2.7.1 from source code and use it automatically.

preacher March 6, 2014 01:36

Greetings wyldckat

Thanks for the help.

I downloaded and unzipped openfoam extended file from the link. I also installed bison 2.7 as per your code.

After all this and ./Allwmake. I got this error again.

[sreetej001@hpclogin1 openfoam-extend-swak4Foam-f537bda3865306a8110e8c7434911f352ce1ffcc]$ ./Allwmake
Previously compiled for OpenFOAM 2.3.x

/home/sreetej001/OpenFOAM/ThirdParty-2.3.x/openfoam-extend-swak4Foam-f537bda3865306a8110e8c7434911f352ce1ffcc/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison)

No file 'swakConfiguration'. Python etc won't work. See README for details
Checking swak4Foam-version and generating file
Swak version is 0.3.1
Bison is version 2.3
swak4Foam only confirmed to work with Bison >= 2.4
Compiles with 2.3 but has offset-problems with locations which break the Plugin-functionality
Consider running ./maintainanceScripts/compileRequirements.sh for a local bison-installation
Set the environment variable USE_OLD_BISON if you want to continue anyway



It says bison 2.3, I dont get it. I just installed a bison 2.7.1 and still it says 2.3.

I guess there is some problem when I edited the path using gedit ~/.bashrc. Could you help me with the bash file edit?

Attached is the bashrc file:

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# User specific aliases and functions

source $HOME/OpenFOAM/OpenFOAM-2.3.x/etc/bashrc

PATH=$home/sreetej001/OpenFOAM/ThirdParty-2.3.x/openfoam-extend-swak4Foam-f537bda3865306a8110e8c7434911f352ce1ffcc/privateRequirements/bin/:$HOME/OpenFOAM/ThirdParty-2.3.x/flex/bin/:$HOME/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/qt-4.7.3/bin:$PATH


Thanks in advance for the help...:)

gschaider March 6, 2014 04:47

Quote:

Originally Posted by preacher (Post 478438)
Greetings wyldckat

Thanks for the help.

I downloaded and unzipped openfoam extended file from the link. I also installed bison 2.7 as per your code.

After all this and ./Allwmake. I got this error again.

[sreetej001@hpclogin1 openfoam-extend-swak4Foam-f537bda3865306a8110e8c7434911f352ce1ffcc]$ ./Allwmake
Previously compiled for OpenFOAM 2.3.x

/home/sreetej001/OpenFOAM/ThirdParty-2.3.x/openfoam-extend-swak4Foam-f537bda3865306a8110e8c7434911f352ce1ffcc/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison)

No file 'swakConfiguration'. Python etc won't work. See README for details
Checking swak4Foam-version and generating file
Swak version is 0.3.1
Bison is version 2.3
swak4Foam only confirmed to work with Bison >= 2.4
Compiles with 2.3 but has offset-problems with locations which break the Plugin-functionality
Consider running ./maintainanceScripts/compileRequirements.sh for a local bison-installation
Set the environment variable USE_OLD_BISON if you want to continue anyway



It says bison 2.3, I dont get it. I just installed a bison 2.7.1 and still it says 2.3.

I guess there is some problem when I edited the path using gedit ~/.bashrc. Could you help me with the bash file edit?

Attached is the bashrc file:

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# User specific aliases and functions

source $HOME/OpenFOAM/OpenFOAM-2.3.x/etc/bashrc

PATH=$home/sreetej001/OpenFOAM/ThirdParty-2.3.x/openfoam-extend-swak4Foam-f537bda3865306a8110e8c7434911f352ce1ffcc/privateRequirements/bin/:$HOME/OpenFOAM/ThirdParty-2.3.x/flex/bin/:$HOME/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/qt-4.7.3/bin:$PATH


Thanks in advance for the help...:)

What do "which bison" and "bison -V" say?

preacher March 6, 2014 22:58

Hi

What I mean is the compiler is saying it has only Bison 2.3 version installed but in actual there is a Bison 2.7.1 version installed.

I we can see in the quote above it say bison>=2.4.

So how do I change the environmental variables??

thanks

Sreetej

wyldckat March 7, 2014 15:08

Quote:

Originally Posted by preacher (Post 478667)
So how do I change the environmental variables??

I tested this yesterday and it worked just fine :confused:.
But since it's not working for you, then have a look into this post: http://www.cfd-online.com/Forums/ope...tml#post477609 post #46
It has complete details on how to install a custom Bison version and making sure it's ready to be used.

preacher March 7, 2014 19:34

Thanks for your reply...

The problem was in the path specified in the .bashrc file.

I got that fixed and now it works fine.


Regards

Preacher

peettter March 13, 2014 08:07

Quote:

Originally Posted by wyldckat (Post 478381)
@preacher: I think you downloaded the wrong file. If you want swak4Foam in package format, then you should have downloaded from this link: http://sourceforge.net/p/openfoam-ex..._2.0.x/tarball

This link seems to broken, or is it just me?

Is there another way to download this tarball?

cheers

peter

wyldckat March 15, 2014 04:38

Greetings Peter,

This link is both broken and not broken... Then again, now it is completely broken.
The problem is that Sourceforge.net needs us to follow the correct steps in order for the tarball to be generated... which was as follows:
  1. Go to the main project http://sourceforge.net/p/openfoam-extend/
  2. Click on the swak4Foam link:
    Quote:

    • Summary
    • Files
    • Reviews
    • Support
    • Wiki
    • Mailing Lists
    • Git
    • Hosted Apps
    • Discussion
    • -> swak4Foam <-
    • SVN

  3. Click on the "branches" button on the left.
  4. Choose the branch "port_2.0.x"
  5. And if it was working, you would have to click on "Download snapshot".
  6. Only then would the link mentioned in the wiki page work as intended... well, technically it's the link post-request, but not the actual link.
After some tinkering with SF.net's hg-snapshot generation system, try this download link: http://sourceforge.net/p/openfoam-ex...e1ffcc/tarball - it should either give you a download right away (if it's still on cache) or ask you if you want to generate another snapshot, if the cached one might have already been removed by the cleaning system.

In the meantime, I'll see if I can create a git mirror of the swak4Foam Mercurial repository.

Best regards,
Bruno

wyldckat May 4, 2014 08:31

Greetings to all!

I've finally managed to take care of setting up an automated mirror at Github of the Mercurial repository of swak4Foam: https://github.com/Unofficial-Extend...-swak4Foam-dev

Instructions on how to use it have been added to the section "OpenFOAM 2.3.0 to 2.3.x" in this wiki page: http://openfoamwiki.net/index.php/In...am/Downloading

Best regards,
Bruno

kd55 July 15, 2014 13:43

problems installing swak4foam on OF-2.3.0
 
Hi there,

I've been bashing my head against the brick wall that is openFoam for a week and a half now trying to install swak4foam.

I'm on a linux distribution, and I believe (to the best of my ability it is RHEL) and running openFOAM-2.3.0 using 'module load openfoam/2.3.0.intel' and with a PBS queuing system.

I'm using this version of swak4foam:

Code:

git clone https://github.com/Unofficial-Extend...-swak4Foam-dev swak4Foam
cd swak4Foam
git checkout port_2.0.x

The compilation runs. However, when testing funkySetFields I get 'command not found'. I have looked at the common errors page and searched this forum but still not making any progress.

Below is my second ./Allwmake log:

Code:

Previously compiled for OpenFOAM 2.3.0
No file 'swakConfiguration'. Python etc won't work. See README for details
Checking swak4Foam-version and generating file
Swak version is 0.3.1
Bison is version 2.4.1
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major 2 Minor 3 Patch 0 (-1 == x / 0)
No change to swak4FoamParsers/foamVersion4swak.H
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswak4FoamParsers.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswakLagrangianParser.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libgroovyBC.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswakFunctionObjects.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libsimpleFunctionObjects.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libsimpleLagrangianFunctionObjects.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libsimpleSearchableSurfaces.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libsimpleSwakFunctionObjects.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswakTopoSources.so' is up to date.
SOURCE=swakSetValues.C ;  icpc -std=c++0x -Dlinux64 -DWM_DP -wd327,525,654,819,1125,1476,1505,1572 -axCORE-AVX2 -xHost -O2 -no-prec-div  -DNoRepository      -I../swak4FoamParsers/lnInclude -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/sampling/lnInclude -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/fvOptions/lnInclude -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/meshTools/lnInclude -IlnInclude -I. -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64IccDPOpt/swakSetValues.o
SOURCE=swakExplicitSources.C ;  icpc -std=c++0x -Dlinux64 -DWM_DP -wd327,525,654,819,1125,1476,1505,1572 -axCORE-AVX2 -xHost -O2 -no-prec-div  -DNoRepository      -I../swak4FoamParsers/lnInclude -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/sampling/lnInclude -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/fvOptions/lnInclude -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/meshTools/lnInclude -IlnInclude -I. -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64IccDPOpt/swakExplicitSources.o
SOURCE=swakImplicitSources.C ;  icpc -std=c++0x -Dlinux64 -DWM_DP -wd327,525,654,819,1125,1476,1505,1572 -axCORE-AVX2 -xHost -O2 -no-prec-div  -DNoRepository      -I../swak4FoamParsers/lnInclude -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/sampling/lnInclude -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/fvOptions/lnInclude -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/meshTools/lnInclude -IlnInclude -I. -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/apps/OpenFOAM/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64IccDPOpt/swakImplicitSources.o
Compiling swakFvOptions
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswakFvOptions.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libgroovyStandardBCs.so' is up to date.

SWAK_PYTHON_INCLUDE not defined .... no Python-Integration. Most people are fine without it

'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswakMeshQualityFunctionPlugin.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswakLocalCalculationsFunctionPlugin.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswakRandomFunctionPlugin.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswakFvcSchemesFunctionPlugin.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswakThermoTurbFunctionPlugin.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswakTransportTurbFunctionPlugin.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswakSurfacesAndSetsFunctionPlugin.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswakLagrangianCloudSourcesFunctionPlugin.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswakVelocityFunctionPlugin.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswakChemistryModelFunctionPlugin.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswakRadiationModelFunctionPlugin.so' is up to date.
'/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/lib/libswakCoalCloudAdaptor.so' is up to date.

If you have your own function-plugins you can specify them using the SWAK_USER_PLUGINS environment variable and they would be compiled now. If you don't know what this means: don't bother. You propably don't need it


SWAK_PYTHON_INCLUDE not defined .... no Python-Integration. Utility funkyPythonPostproc not compiled

make[1]: Entering directory `/export71/home/kd613/OpenFOAM/kd613-2.3.0/swak4Foam/Utilities/funkySetFields'
make[1]: `/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/bin/funkySetFields' is up to date.
make[1]: Leaving directory `/export71/home/kd613/OpenFOAM/kd613-2.3.0/swak4Foam/Utilities/funkySetFields'
make[1]: Entering directory `/export71/home/kd613/OpenFOAM/kd613-2.3.0/swak4Foam/Utilities/calcNonUniformOffsetsForMapped'
make[1]: `/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/bin/calcNonUniformOffsetsForMapped' is up to date.
make[1]: Leaving directory `/export71/home/kd613/OpenFOAM/kd613-2.3.0/swak4Foam/Utilities/calcNonUniformOffsetsForMapped'
make[1]: Entering directory `/export71/home/kd613/OpenFOAM/kd613-2.3.0/swak4Foam/Utilities/replayTransientBC'
make[1]: `/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/bin/replayTransientBC' is up to date.
make[1]: Leaving directory `/export71/home/kd613/OpenFOAM/kd613-2.3.0/swak4Foam/Utilities/replayTransientBC'
make[1]: Entering directory `/export71/home/kd613/OpenFOAM/kd613-2.3.0/swak4Foam/Utilities/funkyWarpMesh'
make[1]: Entering directory `/export71/home/kd613/OpenFOAM/kd613-2.3.0/swak4Foam/Utilities/funkySetBoundaryField'
make[1]: `/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/bin/funkyWarpMesh' is up to date.
make[1]: `/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/bin/funkySetBoundaryField' is up to date.
make[1]: Leaving directory `/export71/home/kd613/OpenFOAM/kd613-2.3.0/swak4Foam/Utilities/funkyWarpMesh'
make[1]: Entering directory `/export71/home/kd613/OpenFOAM/kd613-2.3.0/swak4Foam/Utilities/funkyDoCalc'
make[1]: `/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/bin/funkyDoCalc' is up to date.
make[1]: Leaving directory `/export71/home/kd613/OpenFOAM/kd613-2.3.0/swak4Foam/Utilities/funkyDoCalc'
make[1]: Entering directory `/export71/home/kd613/OpenFOAM/kd613-2.3.0/swak4Foam/Utilities/fieldReport'
make[1]: `/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/bin/fieldReport' is up to date.
make[1]: Leaving directory `/export71/home/kd613/OpenFOAM/kd613-2.3.0/swak4Foam/Utilities/fieldReport'
make[1]: Entering directory `/export71/home/kd613/OpenFOAM/kd613-2.3.0/swak4Foam/Utilities/funkySetLagrangianField'
make[1]: `/home/kd613/OpenFOAM/kd613-2.3.0/platforms/linux64IccDPOpt/bin/funkySetLagrangianField' is up to date.
make[1]: Leaving directory `/export71/home/kd613/OpenFOAM/kd613-2.3.0/swak4Foam/Utilities/funkySetLagrangianField'

any help is deeply appreciated.

Kind regards,

Kit

wyldckat July 15, 2014 15:31

Greetings Kit,

Mmm... I've seen this issue before. The "module load" feature is a nice thing to have, but the problem is that sometimes it's missing certain environment variables. The situation I can remember is discussed around this post: http://www.cfd-online.com/Forums/ope...tml#post477786 #62 and beyond.

Essentially, since it does seem to have been successfully been built in your personal user folder for OpenFOAM applications, then the missing commands to load the necessary paths into memory are these two:
Code:

export PATH=$PATH:$FOAM_USER_APPBIN
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$FOAM_USER_LIBBIN

These two commands should be executed after you use the "module load" command. After that, you should be able to use funkySetFields :D

Best regards,
Bruno

steven123 July 15, 2014 15:43

Quote:

Originally Posted by gschaider (Post 478472)
What do "which bison" and "bison -V" say?



Gschaider, can you help me with this problem?

It's different from this post, but my problem is similar to this posting, see:

http://www.cfd-online.com/Forums/ope...n-problem.html

thanks gschaider :)

kd55 July 16, 2014 04:54

Hi Bruno,

That worked a treat. Thanks very much, lost so much time over this.

Muchly appreciated, regards,

Kit

Tom123 March 8, 2015 03:24

Hello Sreetej,

It seems you have perfectly solved your problem about installation of swak4foam. Could you please answer the following question?
After arriving the wiki page:
https://openfoamwiki.net/index.php/I...am/Downloading
It firstly ask for:
  1. First, go into a good working folder. For example, $HOME/OpenFOAM/$USER-$WM_PROJECT_VERSION: mkdir -p $FOAM_RUN cd "$HOME/OpenFOAM/$USER-$WM_PROJECT_VERSION"
What is it exactly ask us to do?
For example, if I want to run icoFoam with changeable boundary conditions, where I need to install it, inside icoFoam or somewhere else?
I spend pretty long time at the very first step. Thanks in advance.

Tom

wyldckat March 8, 2015 05:31

Greetings Tom,

I've updated the wiki page in question. Back when I wrote it, made perfect sense to me, but I guess that it won't make much sense to someone new to Linux.
The updated text is as follows:
Quote:

  1. First, go into a good working folder. For example, to go to the folder "$HOME/OpenFOAM/$USER-$WM_PROJECT_VERSION", run the following commands in a terminal:
    Code:

    mkdir -p $FOAM_RUN
    cd "$HOME/OpenFOAM/$USER-$WM_PROJECT_VERSION"


Is it now easier to understand what needs to be done?

Best regards,
Bruno


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