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)

Tom123 March 8, 2015 06:30

Hi Bruno,

Many thanks to your quick reply. As a new user, I am quite confused by the sentence "First, go into a good working folder". I would talk in detail for my question and appreciate for your time to read it.

In my computer for the directory of "tomf@tomf-ThinkStation-D30:~/OpenFOAM/OpenFOAM-2.3.0", there are some folders such as "applications", "tutorials" etc, and I already created a folder named "FOAM_RUN". And I copied everything inside "tutorials" to the "FOAM_RUN" in case if I mess up things in FOAM_RUN I still have the original copy of "tutorials". And currently, I run the code under the directory of "tomf@tomf-ThinkStation-D30:~/OpenFOAM/OpenFOAM-2.3.0/FOAM_RUN/tutorials/combustion/reactingFoam".

Everything goes fine till I need use swak4foam to change my inlet boundary condition. Then the problem is where I should install the swak4foam, inside the folder of "../OpenFOAM-2.3.0", or inside the "../OpenFOAM-2.3.0/FOAM_RUN/tutorials/combustion/reactingFoam", or inside somewhere else?

Much thanks for your patience, and have a nice day.

wyldckat March 8, 2015 07:49

Hi Tom,

There is a big difference between "FOAM_RUN" and "$FOAM_RUN", where the first is a name and the second is a variable. For more details, please read this page: http://openfoamwiki.net/index.php/In...with_the_Shell

Quote:

Originally Posted by Tom123 (Post 535166)
As a new user, I am quite confused by the sentence "First, go into a good working folder".

Mmm... well, the idea is that any folder should do just fine... as long as there aren't any spaces or special characters in the name of the folder path... hence the idea of "good working folder".

This folder:
Code:

~/OpenFOAM/OpenFOAM-2.3.0/FOAM_RUN
Isn't exactly the conventional location for storing the cases you plan on running.
As I mentioned above, please read/study this page: http://openfoamwiki.net/index.php/In...with_the_Shell - hopefully things will be clearer then.

Best regards,
Bruno

Tom123 March 8, 2015 09:03

Hi Bruno,

I read the content from the link and still do not know where to install Swak4foam. So, do you mean that Swak4foam could be installed anywhere inside the folder of ~/OpenFOAM/OpenFOAM-2.3.0?
To make it clear, let us say somebody run the example case inside the ~/OpenFoam/OpenFOAM-2.3.0/tutorials/incompressible/icoFoam/cavity, but use a changeable flow condition on top of the cavity not a steady one. If the Swak4Foam is installed in ~/OpenFoam/OpenFOAM-2.3.0/swak4Foam, is it still OK?

I understand I may ask sth. really tiny, but that is the thing that really hinder me.

Wish you the best thank you.

Tom

wyldckat March 8, 2015 10:27

Hi Tom,

OK, I guess it's easier to show you a clear example.
Try running the following commands:
Code:

mkdir -p $FOAM_RUN
cd $FOAM_RUN
pwd

The last command will tell you in which folder you are currently running commands inside. This is where you were meant to have your copy of the "tutorials" folder.

Then run these commands:
Code:

cd ..
pwd
echo $HOME/OpenFOAM/$USER-$WM_PROJECT_VERSION

If these commands worked as intended, then the last two lines should show you the exact same text.
This is where the instructions suggest that you place the source code for swak4Foam and build it.

All of the possibilities listed in step #2 will create the new folder "swak4Foam".

Best regards,
Bruno

Tom123 March 9, 2015 03:00

Hi Bruno,

It remains unsolved: after ./Allwmake it gives the following result

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
abort:no repository found in '/home/toml/OpenFOAM/toml-2.3.0/swak4Foam'(.hg not found)!
Swak version is 0.3.1
Bison is version 3.0.2
swak4Foam only confirmed to work with Bison 2.x
Consider running ./maintainanceScripts/compileRequirements.sh for a local bison-installation
Set the environment variable DEVELOP_FOR_NEW_BISON if you want to continue anyway.
Requirements for library not satisified. I see no sense in going on
Check README .... your problem occured to 5 other people before and has been solved on ..

Anyone can help, please, please

Tom

wyldckat March 13, 2015 16:34

Hi Tom,

Quote:

Originally Posted by Tom123 (Post 535254)
Bison is version 3.0.2
swak4Foam only confirmed to work with Bison 2.x
Consider running ./maintainanceScripts/compileRequirements.sh for a local bison-installation
Set the environment variable DEVELOP_FOR_NEW_BISON if you want to continue anyway.
Requirements for library not satisified. I see no sense in going on
Check README .... your problem occured to 5 other people before and has been solved on ..

The line:
Code:

Consider running ./maintainanceScripts/compileRequirements.sh for a local bison-installation
says it all ;)
This is also documented here: http://openfoamwiki.net/index.php/In....3.1_and_newer - section "2.2 swak4Foam 0.3.1 and newer"

And I've added this new FAQ here: http://openfoamwiki.net/index.php/In...with_Bison_2.x

Best regards,
Bruno

------------
edit: In response to something you had written in your original post:
Quote:

An advice: why do not you make a video and put it on Youtube to teach how to install swak4Foam. I think it would be much more clear to most users especially for those beginners like me.
A video takes considerably a lot more time to make than writing. Unless you don't mind having to see a 6 hour unedited video of me ranting about the 1001 different issues you can run into while trying to install swak4Foam :D Well, it's not 1001, but I would very likely repeat myself a lot and go on and on about how how each flex/bison/OpenFOAM/Linux Distribution version could be a problem and how to deal with each and every single one... in one very large unedited video :D ;)

Hrushi March 16, 2015 14:12

1 Attachment(s)
Quote:

Originally Posted by wyldckat (Post 489700)
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

Hi Bruno,

I am trying to install swak4Foam in OpenFOAM-2.3.1 on SLES 10 SPI.

I have downloaded swak4Foam from above links.

Then I followed the instructions given at
HTML Code:

http://www.cfd-online.com/Forums/openfoam-installation/103805-swak4foam-3.html#post477609
After running following command,

Code:

./configure --prefix $PWD/../bison
I got following error. I have also attached log file for the same.

Code:

checking for GNU M4 that supports accurate traces... configure: error: no acceptable m4 could be found in $PATH.
GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended.
GNU M4 1.4.15 uses a buggy replacement strstr on some systems.
Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 have another strstr bug.

From error, I understand that there is a problem with m4 version. I have downloaded tar file for m4-1.4.6.

But I don't know how to install and set up m4-1.4.6 and then build bison-2.7 from that.

Regards
Hrushi

wyldckat March 21, 2015 10:08

Hi Hrushi,

I've added and tested the instructions on how to build m4 here: http://openfoamwiki.net/index.php/In...ependencies#m4

In addition, I've added this issue to the "Understanding Error Messages" page: http://openfoamwiki.net/index.php/In...o_old_or_buggy

Best regards,
Bruno

Hrushi March 23, 2015 08:07

Hi Bruno,

Quote:

I've added and tested the instructions on how to build m4 here: http://openfoamwiki.net/index.php/In...ependencies#m4
I followed the instructions given in above link. I used m4-1.4.16 version.

The installation was successful.:)

Regards

Hrushi

mehtab April 20, 2015 12:09

Hi,

I want to use groovyB for my simulation, but my variable pressure is related to temperature with exponential expression.

Is it possible to use the exponential expression in groovyBC?

Tom123 April 20, 2015 12:33

Hi,

It is OK to set any kind of condition you want by using swak4foam. However, if the boundary condition you set is reasonable is another story. (I want to make a metaphor: you could use money buy whatever, but the thing you buy is lawful or not is another thing). Best wishes.

Tom123 April 20, 2015 12:37

I found your answer really helps, thanks very much. I want to make another metaphor. I think you, just like the fish thank the right water (I use right because if you put the some fish in salty water, it may die).

vishal3 September 9, 2015 05:49

1 Attachment(s)
Dear Bruno,

I was trying to compile swak4Foam for OF231 by using the following link:
http://openfoamwiki.net/index.php/In...ependencies#m4


I was in the middle of installing m4-1.4.17. It went all right till ./configure. After this when i was running make command it showed me the following error.

Will please tell me what is the error and what should I do to install swak4Foam correctly?

Thanking you,

wyldckat September 9, 2015 16:05

Quote:

Originally Posted by vishal3 (Post 563095)
Will please tell me what is the error and what should I do to install swak4Foam correctly?

Quick answer: I need more details, because the error messages you have gotten are really strange and I don't remember ever seeing them before.

Therefore, I need to know how to reproduce the same error, for which I need the following details:
  1. Which Linux Distribution are you using?
  2. Have you checked which bison version your system has got? In other words, what does this command give you:
    Code:

    bison --version
  3. Which gcc and g++ versions are you using?
    Code:

    gcc --version
    g++ --version



All times are GMT -4. The time now is 15:53.