|
[Sponsors] |
[OpenFOAM.com] OpenFOAM 8 compatible with Swak4FOAM |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 11, 2020, 21:11 |
OpenFOAM 8 compatible with Swak4FOAM
|
#1 |
New Member
Anonymous
Join Date: Oct 2020
Posts: 1
Rep Power: 0 |
Hi,
I'm interested in working with time-varying boundary conditions and have OpenFOAM 8 installed. I wish to install swak4FOAM to use their groovybc function. Is OpenFOAM 8 compatible with swak4FOAM? The documentation of swak4FOAM only mentions up to openFOAM 3.0 but since it seems like with such a handy set of libraries, there should be one compatible with the later versions of OpenFOAM. thanks! |
|
October 12, 2020, 08:40 |
|
#2 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
Quote:
Having said that, you might also find that in the meantime you can solve your problem without swak4foam. If you only need a time-varying value boundary condition, you can define that as a uniformFixedValue (a bit of a misnomer in the meantime) with the value defined as a Function1 or PatchFunction1. This supports various types of input such as tables, common functions, coded functions. Note that the swak4foam expressions were reimplemented in OpenFOAM-v1912, and lightly extended in OpenFOAM-v2012. So now you also have the option of using a swak-like expression for spatial-temporal conditions (eg, unformFixedValue) as well as for defining an exprMixed boundary condition. The expressions also happen to be what powers the #eval dictionary directive. Some docs: |
||
November 16, 2020, 10:58 |
|
#3 |
New Member
Join Date: Sep 2019
Posts: 18
Rep Power: 7 |
Hi, DaniEng, do you install swak4foam in OF8 sucessfully?
|
|
November 17, 2020, 04:22 |
|
#4 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Just came aware of this thread. swak4Foam compiles with OF8. Just not the released branch but the develop (which currently is stable. I just don't have the time to make the tests to call it a release). Just follow the instructions at the top of https://openfoamwiki.net/index.php/Contrib/swak4Foam just do the "hg update develop" before the Allwmake
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
November 17, 2020, 07:33 |
|
#5 | |
New Member
Join Date: Sep 2019
Posts: 18
Rep Power: 7 |
Quote:
|
||
November 18, 2020, 10:47 |
|
#6 |
Member
ESI
Join Date: Sep 2017
Posts: 49
Rep Power: 9 |
||
November 18, 2020, 20:12 |
|
#7 |
New Member
Join Date: Sep 2019
Posts: 18
Rep Power: 7 |
||
December 7, 2020, 12:05 |
Installation error
|
#8 |
New Member
Join Date: Jun 2018
Posts: 20
Rep Power: 8 |
Hello,
I tried to install swak4foam on OF8 with the commands suggested by B. Gschaider: Code:
hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam swak4Foam cd swak4Foam hg update develop ./AllwmakeAll Code:
/usr/bin/env: ‘python’: No such file or directory /usr/bin/env: ‘python’: No such file or directory In file included from ../filesThatAreOnlyInSomeDistributions/OutputFilerDropin/outputFilterOutputControl.C:26: lnInclude/swak.H:48:2: error: #error "This swak4Foam-version is only used for the 2.x-versions of OpenFOAM. For lower versions there is a special branch" 48 | #error "This swak4Foam-version is only used for the 2.x-versions of OpenFOAM. For lower versions there is a special branch" | ^~~~~ make: *** [/home/user1/OpenFOAM/OpenFOAM-8/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/../filesThatAreOnlyInSomeDistributions/OutputFilerDropin/outputFilterOutputControl.o] Error 1 Code:
Reading variables from 'swakConfiguration' Looking for Python 2 Looking for Python 3 Using our own Lua at /home/user1/OpenFOAM/swak4Foam/privateRequirements Checking swak4Foam-version and generating file hg info: 0dd63e72a56f (develop) tip No 'bear' installed Bison: /home/user1/OpenFOAM/swak4Foam/privateRequirements/bin/bison Flex: /usr/bin/flex Bison at /home/user1/OpenFOAM/swak4Foam/privateRequirements/bin/bison is version 3.4 (Major 3 Minor 4) Flex is version 2.6.4 (Minor version: 4) No swak4FoamParsers/foamVersion4swak.H. Generated Thanks in advance. |
|
December 7, 2020, 18:01 |
|
#9 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
I'm afraid Python is necessary because it is used to generates some headers files automagically. It was never mentioned in the requirements as I hardly ever seen a Linux system without it (mostly because a lot of distros rely on it for their packaging system and other system tools). But the scripts in question don't mind if it Python 2 or 3 PS: which distro do you use that manages to live without Python? Just curious
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
December 8, 2020, 04:49 |
|
#10 | |
New Member
Join Date: Jun 2018
Posts: 20
Rep Power: 8 |
Quote:
Thanks for your response, I am using Ubuntu 20.04.1 with python 3.8.5 installed. When swak is ok with python3 then this shouldn´t be the problem, should it? |
||
December 8, 2020, 18:37 |
|
#11 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
It is. If the python3 is also found as "python". Seems that this is not the case in the new Ubuntus. But there seems to be a package for that https://askubuntu.com/questions/1224...-20-04#1224710
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
December 9, 2020, 11:34 |
|
#12 | |
New Member
Join Date: Jun 2018
Posts: 20
Rep Power: 8 |
Quote:
you are right. Thanks! Ubuntu 20.04 is not shipped with python2 anymore. Code:
sudo apt-get install python-is-python3 It might be beneficial to add this information to the wiki as others will face the same error when trying to build on the newest Ubuntu. |
||
May 27, 2021, 01:30 |
|
#13 |
New Member
Nipin L
Join Date: Nov 2012
Location: Canada
Posts: 23
Rep Power: 13 |
I have installed swak4Foam in v2012 after installing
python-is-python3 in the following way, hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam swak4Foam cd swak4Foam hg update develop ./AllwmakeAll During installation it complained for missing pythonInterpreterWrapper.H which then I copied from /opt/swak4Foam/Libraries/languageIntegration/swakPythonIntegration Second time it complained missing Python.h file during the compiling process of funkyPythonPostproc. Adding the path /usr/include/python3.8 to Make/option of funkyPythonPostproc gave another error as not recognizing "PyIntAsLong" Finally, replacing the path by adding -I/usr/include/python2.7/ in the option file solved the issue. |
|
June 8, 2022, 17:29 |
swak + OF8
|
#14 |
Member
Clint Bedick
Join Date: May 2011
Posts: 43
Rep Power: 15 |
Hi, I am also trying to get swak compiled for OF8.
I thought I got it compiled successfully (no actual errors), but I ended up with some strange errors when running a decomposed case w/ groovyBC and a timelines entry. This same case ran fine 1) using OF6 + swak and 2) using OF8 + swak, in serial mode (no decomposition). Upon inspection, I noticed the decomposed BC in the processor0/0 folder was incomplete - specifically the 'name' entry in timelines did not carry over to the decomposed folders. I also noted that I got an error saying OF8 could not load libsimpleSwakFunctionObjects.so. But most all of the other library files could be found in the $FOAM_USER_LIBBIN. Any thoughts? Thanks! -Clint |
|
June 14, 2022, 12:47 |
|
#15 |
Member
Clint Bedick
Join Date: May 2011
Posts: 43
Rep Power: 15 |
Just to update this thread - I got swak to compile fine.
I did (3) things different and don't know which made it work. (I suspect #2) 1. I did NOT do hg update develop 2. I completely removed the swak4Foam directory and re-downloaded it (instead of just cleaning and remaking) 3. I did not change the name of the swak4Foam directory -I had previously been calling it swak4Foam_OF8, as I had a separate swak installation for OF6. I did not think this would matter, as it seems to detect the directory you are in. It also seemed OK when I recompiled swak for OF6 within swak4Foam_OF6. BUT, none of this fixed the original issue I had. My decomposed timelines entry (under groovyBC, OF8) looks like: Code:
timelines ( { file "$FOAM_CASE/H2frac.txt"; format foam; } Code:
timelines ( { name XH2; file "$FOAM_CASE/H2frac.txt"; outOfBounds clamp; } |
|
August 25, 2022, 18:09 |
|
#16 |
New Member
Augusto
Join Date: Jul 2022
Posts: 1
Rep Power: 0 |
I'm also facing problems installing Sweak4Foam with openFOAM 8.
I'm getting the following error. Code:
Current OpenFOAM version is 8. Previously compiled for OpenFOAM (8) /home/agt/OpenFOAM/OpenFOAM-8/applications/swak4Foam/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison) Reading variables from 'swakConfiguration' Looking for Python 2 Looking for Python 3 Using our own Lua at /home/agt/OpenFOAM/OpenFOAM-8/applications/swak4Foam/privateRequirements Checking swak4Foam-version and generating file Swak version is 202x.yy.0 hg info: 481d96f16780 (develop) tip Using /usr/bin/bear to build compilation database Bison: /home/agt/OpenFOAM/OpenFOAM-8/applications/swak4Foam/privateRequirements/bin/bison Flex: /usr/bin/flex Bison at /home/agt/OpenFOAM/OpenFOAM-8/applications/swak4Foam/privateRequirements/bin/bison is version 3.4 (Major 3 Minor 4) Flex is version 2.6.4 (Minor version: 4) OpenFOAM-version: Major 8 Minor 0 Patch -1 (-1 == x / 98) Fork: org No change to swak4FoamParsers/foamVersion4swak.H Please include the output above when reporting a problem in the compilation. It helps diagnosing the problem Unrecognized parameter: "--cdb=/home/agt/OpenFOAM/OpenFOAM-8/applications/swak4Foam/compile_commands.json" Usage: bear [--output <arg>] [--verbose] -- ... Parser library did not compile OK. No sense continuing as everything else depends on it |
|
Tags |
compatibility, openfoam 8, swak4foam |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting Started with OpenFOAM | wyldckat | OpenFOAM | 26 | June 21, 2024 07:54 |
[swak4Foam] swak4foam for OpenFOAM 4.0 | mnikku | OpenFOAM Community Contributions | 80 | May 17, 2022 09:06 |
[swak4Foam] swak4foam openfoam 7 installation problem | Andrea23 | OpenFOAM Community Contributions | 1 | February 17, 2020 19:11 |
OpenFOAM 4.0 Released | CFDFoundation | OpenFOAM Announcements from OpenFOAM Foundation | 2 | October 6, 2017 06:40 |
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 | cfd.direct | OpenFOAM Announcements from Other Sources | 0 | September 14, 2016 04:19 |