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] swak4foam building problem (https://www.cfd-online.com/Forums/openfoam-community-contributions/85118-swak4foam-building-problem.html)

gschaider July 30, 2013 05:23

Quote:

Originally Posted by kilroy (Post 442684)
Hello Bernhard,

I have a question about groovyBC.

With groovyBC, is it possible to define the wave direction and the current direction different than each other?

I am trying to model a boat traveling through waves (wave speed) with constant speed (boat speed). I want to see the performance of the boat with waves coming from different directions in different cases, so I need to define the direction of the waves and the current directions different than each other.

Is it possible to do that with groovyBC? If yes, do you know a tutorial/example that I can go through?

Thank you very much for your help in advance,

Best,
kilroy

At first: How is that question related to the topic of this thread "swak4foam building problem"? Please keep threads "pure" so that people later using search engines have it easier judging which information is relevant for them.

Speaking of search engines: have you tried entering "groovyBC wave generation" into Google? There is a number of hits there were this is discussed (and I remember some presentations at past workshops were the use of groovyBC and its limitations for that purpose were discussed).

Apart from that I don't quite understand what you mean with "wave direction" as opposed to "current wave direction"

kilroy July 30, 2013 09:17

Bernhard,

I am sorry about the thread, I won't do that next time. I haven't tried to google that but I will.

About my question, I meant lets say is it possible to define uniform velocity distribution from bottom to seaLevel in x-direction and at the same time is it possible to generate my waves traveling in y-direction?

Best,
kilroy

-luk- July 30, 2013 09:51

Thanks for the quick answer and the advice with the parallel compilation. For completeness I attached the serial compilation log at the end.
With the current compiler I was able to compile other things. It was some OF related stuff. I will try to trigger the error with an other case to boil down the problem. I'll report the solution if I find one.

Thanks, Luk

Code:

No 'swakConfiguration'. Python etc won't work
Checking swak4Foam-version and generating file
/home/panek01l/OpenFOAM/Swak4Foam_2.x_release_0.2.3/Libraries
Bison is version 2.4.1
Flex is version 2.5.35 (Minor version: 35)
OpenFOAM-version: Major 2 Minor 1 Patch -1 (-1 == x)
No change to swak4FoamParsers/foamVersion4swak.H
/home/panek01l/OpenFOAM/Swak4Foam_2.x_release_0.2.3/Libraries/swak4FoamParsers
/home/panek01l/OpenFOAM/Swak4Foam_2.x_release_0.2.3/Libraries/swak4FoamParsers/Make
SOURCE=helpers/printSwakVersion.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -IMake/linux64GccDPOpt    -I/home/panek01l/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude -I/home/panek01l/OpenFOAM/OpenFOAM-2.1.x/src/sampling/lnInclude  -I/home/panek01l/OpenFOAM/OpenFOAM-2.1.x/src/triSurface/lnInclude -I/home/panek01l/OpenFOAM/OpenFOAM-2.1.x/src/surfMesh/lnInclude -I/home/panek01l/OpenFOAM/OpenFOAM-2.1.x/src/lagrangian/basic/lnInclude -I/home/panek01l/OpenFOAM/OpenFOAM-2.1.x/src/meshTools/lnInclude -IlnInclude -I. -I/home/panek01l/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/panek01l/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOpt/printSwakVersion.o
In file included from /home/panek01l/OpenFOAM/ThirdParty-2.1.x/platforms/linux64/gcc-4.6.2/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/localefwd.h:42:0,
                from /home/panek01l/OpenFOAM/ThirdParty-2.1.x/platforms/linux64/gcc-4.6.2/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/string:45,
                from /home/panek01l/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/string.H:51,
                from /home/panek01l/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/word.H:42,
                from /home/panek01l/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/int.H:39,
                from /home/panek01l/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/label.H:61,
                from /home/panek01l/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/labelList.H:47,
                from /home/panek01l/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/UPstream.H:43,
                from /home/panek01l/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/Pstream.H:42,
                from helpers/printSwakVersion.H:43,
                from helpers/printSwakVersion.C:43:
/home/panek01l/OpenFOAM/ThirdParty-2.1.x/platforms/linux64/gcc-4.6.2/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/x86_64-unknown-linux-gnu/bits/c++locale.h:53:23: error: 'uselocale' was not declared in this scope
/home/panek01l/OpenFOAM/ThirdParty-2.1.x/platforms/linux64/gcc-4.6.2/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/x86_64-unknown-linux-gnu/bits/c++locale.h:53:45: error: invalid type in declaration before ';' token
/home/panek01l/OpenFOAM/ThirdParty-2.1.x/platforms/linux64/gcc-4.6.2/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/x86_64-unknown-linux-gnu/bits/c++locale.h: In function 'int std::__convert_from_v(__locale_struct* const&, char*, int, const char*, ...)':
/home/panek01l/OpenFOAM/ThirdParty-2.1.x/platforms/linux64/gcc-4.6.2/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/x86_64-unknown-linux-gnu/bits/c++locale.h:76:53: error: '__gnu_cxx::__uselocale' cannot be used as a function
/home/panek01l/OpenFOAM/ThirdParty-2.1.x/platforms/linux64/gcc-4.6.2/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/x86_64-unknown-linux-gnu/bits/c++locale.h:101:33: error: '__gnu_cxx::__uselocale' cannot be used as a function
make: *** [Make/linux64GccDPOpt/printSwakVersion.o] Error 1
Parser library did not compile OK. No sense continuing as everything else depends on it
Requirements for Library not satisfied. I see no sense in going on


gschaider July 30, 2013 12:55

Quote:

Originally Posted by -luk- (Post 442834)
Thanks for the quick answer and the advice with the parallel compilation. For completeness I attached the serial compilation log at the end.
With the current compiler I was able to compile other things. It was some OF related stuff. I will try to trigger the error with an other case to boil down the problem. I'll report the solution if I find one.

Searching the MessageBoard with "uselocale" (which showed up in the error message) turned up this posting http://www.cfd-online.com/Forums/ope...tml#post309283 (maybe that will help)

gschaider July 30, 2013 12:59

Quote:

Originally Posted by kilroy (Post 442822)
Bernhard,

I am sorry about the thread, I won't do that next time. I haven't tried to google that but I will.

About my question, I meant lets say is it possible to define uniform velocity distribution from bottom to seaLevel in x-direction and at the same time is it possible to generate my waves traveling in y-direction?

Best,
kilroy

I guess it is. Something like "vector(0,pos().z,0)" (as long as you can write the components of the vector as expressions you're in business). And now take this discussion please to a thread that is better suited for it

kilroy July 30, 2013 15:08

Will do. Thank you for the help.

Best,
kilroy

Shayansh March 30, 2015 10:16

Swak4Foam set up issue
 
Hi all,

I am a new user on OpenFOAM. While software works fine with already installed libraries, it fails for Swak4Foam. The facts that I don't understands are:
1. Where do we need to copy the downloaded Swak4Foam folder?
2. What are the steps for installation of the library?

I have copied it to the OpenFOAM folder itself
OpenFOAM-2.2.0/swak4Foam/
and when I run wmake in the directory:
OpenFOAM-2.2.0/swak4Foam/Utilities/funkySetFields/

I receive error of:

SOURCE=funkySetFields.C ; g++ -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IMake/darwinIntel64GccDPOpt -I/Users/sshamip/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude -I/Users/sshamip/OpenFOAM/OpenFOAM-2.2.0/src/sampling/lnInclude -I/Users/sshamip/OpenFOAM/OpenFOAM-2.2.0/src/meshTools/lnInclude -I../../Libraries/swak4FoamParsers/lnInclude/ -IlnInclude -I. -I/Users/sshamip/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude -I/Users/sshamip/OpenFOAM/OpenFOAM-2.2.0/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/funkySetFields.o


However, I am not sure if I'm missing any step before running wmake.

Would appreciate your help.
Best,
Shayan

wyldckat April 3, 2015 12:37

Greetings Shayan and welcome to posting on the forum!

Uhm... that's not an error message you've given, that's only information indicating that it is going to create the object file "funkySetFields.o" from the source code file "funkySetFields.C".

Full details on how to install swak4Foam are given here:
Best regards,
Bruno

ohiagree April 4, 2015 14:52

Hi all,

I get the following error messages when trying to run Allwmake in swap4Foam:

Code:

SOURCE=swakSetValues.C ;  clang++ -m64 -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-unused-comparison -Wno-deprecated-register -O3  -DNoRepository -ftemplate-depth-100          -I../swak4FoamParsers/lnInclude -I/Users/erikstenberg/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude -I/Users/erikstenberg/OpenFOAM/OpenFOAM-2.3.1/src/sampling/lnInclude -I/Users/erikstenberg/OpenFOAM/OpenFOAM-2.3.1/src/fvOptions/lnInclude -I/Users/erikstenberg/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude -IlnInclude -I. -I/Users/erikstenberg/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude -I/Users/erikstenberg/OpenFOAM/OpenFOAM-2.3.1/src/OSspecific/POSIX/lnInclude  -fPIC -Ddarwin -std=c++11 -c $SOURCE -o Make/darwinIntel64ClangDPOpt/swakSetValues.o
In file included from swakSetValues.C:30:
In file included from ./SwakSetValue.H:108:
./SwakSetValue.C:110:37: error: use 'template' keyword to treat 'resultIsTyp' as a dependent template name
        FieldValueExpressionDriver::resultIsTyp<volScalarField>(true)
                                    ^
                                    template
./SwakSetValue.C:119:37: error: use 'template' keyword to treat 'getResult' as a dependent template name
        FieldValueExpressionDriver::getResult<volScalarField>();
                                    ^
                                    template
./SwakSetValue.C:161:37: error: use 'template' keyword to treat 'resultIsTyp' as a dependent template name
        FieldValueExpressionDriver::resultIsTyp<typename SwakSetValue<T>::resultField>()
                                    ^
                                    template
./SwakSetValue.C:172:37: error: use 'template' keyword to treat 'getResult' as a dependent template name
        FieldValueExpressionDriver::getResult<typename SwakSetValue<T>::resultField>()
                                    ^
                                    template
swakSetValues.C:41:9: error: cannot define or redeclare 'typeName' here because namespace 'fv' does not
      enclose namespace 'SwakSetValue<double>'
        makeSwakFvOption(SwakSetValue, scalar);
        ^

Anyone got an idea what the problem might be?

Best regards,
Bosse

Shayansh April 8, 2015 03:32

Thanks Bruno for the help. I managed to install it using the guides. Just maybe one point regarding the installation that could be useful to new users is that Swak4Foam is only confirmed with bison 2.x and not later versions.

Best,
Shayan

wyldckat April 12, 2015 15:38

Greetings to all!

@Bosse:
Quote:

Originally Posted by ohiagree (Post 539954)
I get the following error messages when trying to run Allwmake in swap4Foam:

[...]

Anyone got an idea what the problem might be?

Were you able to build OpenFOAM with your current set-up? Or are you using someone else's build of OpenFOAM?


@Shayan:
Quote:

Originally Posted by Shayansh (Post 540480)
Thanks Bruno for the help. I managed to install it using the guides. Just maybe one point regarding the installation that could be useful to new users is that Swak4Foam is only confirmed with bison 2.x and not later versions.

Can you please suggest where this should be indicated?

Best regards,
Bruno

ohiagree April 12, 2015 15:45

Quote:

Originally Posted by wyldckat (Post 541285)
Greetings to all!

@Bosse:

Were you able to build OpenFOAM with your current set-up? Or are you using someone else's build of OpenFOAM?

Best regards,
Bruno

I were able to build it my own

wyldckat April 12, 2015 16:02

Quote:

Originally Posted by ohiagree (Post 541288)
I were able to build it my own

I don't have experience using Clang to build OpenFOAM and swak4Foam, but my guess that there is some particular issue related to building OpenFOAM on Mac OS X that is interfering with swak4Foam being built properly.
I suggest that you ask the author of the installation instructions for installing OpenFOAM on Mac OS X, to see if that author has any experience with building swak4Foam under the same specific installation.

Shayansh April 20, 2015 23:32

@Shayan:

Can you please suggest where this should be indicated?

Hi Bruno,

As explained in the following link, after installing m4, one should download and install Bison. I had a bug complaining about the version of Bison which was later than 2.7. After changing that to 2.7 version, the problem was solved. So if one follow the instructions from the below link, (s)he would be safe.

https://openfoamwiki.net/index.php/I...g_dependencies

Best,
Shayan

wyldckat April 24, 2015 16:02

Hi Shayan,

Many thanks for the feedback. I've updated the page, by adding a few more indications about Bison 3 versions not being supported, although I'm not sure that this was what you had in mind.

Best regards,
Bruno


All times are GMT -4. The time now is 23:01.