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/)
-   -   [waves2Foam] Trying to compile the Wave2Foam tools in the OF-3.0.1 (https://www.cfd-online.com/Forums/openfoam-community-contributions/205850-trying-compile-wave2foam-tools-3-0-1-a.html)

phmusi May 20, 2016 10:17

Trying to compile the Wave2Foam tools in the OF-3.0.1
 
Hello everyone,

After a bit of struggle, I want to share with you the way I manage to compile waves2Foam with openFOAM 3.0.1 (which is the one recommended nowadays by openfoam.org)

- Error in solver 301 " No solver 301"
=> change name of the folder waves2foam/applications/solvers/solver300 to solver301

Then I get a second error in compiling the solvers waveFoam "ld permission denied in the directory /opt/openfoam30/platforms/linux64GccDPInt32Opt/bin/"
=> before running the ./Allwmake :
Code:

sudo chown -R username:username /path/to/the/directory
(more info on: http://askubuntu.com/questions/46660...mission-denied

example for me:
Code:

sudo chown -R phmusi:phmusi /opt/openfoam30/platforms/linux64GccDPInt32Opt/bin/
Now everything seems to compile correctly

Then in order to run the tutorial waveFoam/waveFlume, add the line:
Code:

div(((rho*nuEff)*dev2(T(grad(U)))))

in the dictionary system/fvSchemes.divSchemes
like in the damBreak user-guide: http://cfd.direct/openfoam/user-guide/dambreak/

Cheers

Peter Ko May 24, 2016 04:08

Trying to compile the Wave2Foam tools in the OF-3.0.1
 
1 Attachment(s)
Hi there,

I had trying to compile the Wave2Foam tools in the OF-3.0.1,
but it seems that the path was wrong or the files loses.

attachment is the log by Allwmake

Any common will be very helpful! I will really appreciate it.

Best Regards,
Peter Ko

phmusi May 24, 2016 04:49

Hello Peter,

The log.txt only shows what has worked - so it is difficult to conclude anything

But if it is link to a wrong path, the first step to look is the waves2Foam/bin/bashrc: "user defined environmental variables"

Cheers

Pierre-Henri

Peter Ko May 24, 2016 06:04

1 Attachment(s)
Quote:

Originally Posted by phmusi (Post 601486)
Hello Peter,

The log.txt only shows what has worked - so it is difficult to conclude anything

But if it is link to a wrong path, the first step to look is the waves2Foam/bin/bashrc: "user defined environmental variables"

Cheers

Pierre-Henri

Thanks for your kindly reply, I upload another error log, I just can't figure out that the application can't found the commands, is that I put the waveFoam.C in the wrong folder? OR I totally download the wrong edition of waves2Foam tool box?? my OF is -3.0.1

best regards,

Peter Ko

phmusi May 24, 2016 06:33

You don't have compiled waves2foam - obviously as nothing seems to work

Let's try to sort this out: (I supposed you are on linux and you had follow the steps to install openFOAM)
1/ be sure your OpenFOAM 3.0.1 is working: run the damBreak tutorial for example
At this point you have a folder opt/openfoam30
and home/OpenFOAM/username-3.0.1/run

2/ Download waves2Foam with all the dependencies
This gives you a waves2Foam/ folder in home/

3/ Copy-paste it in home/OpenFOAM/username-3.0.1/

4/ Go in home/OpenFOAM/username-3.0.1/waves2Foam/bin and edit the bashrc ###User Defined Environmental variables
it looks like this for me:
### USER DEFINED ENVIRONMENTAL VARIABLES
export WAVES_DIR=$WM_PROJECT_USER_DIR/waves2Foam
export WAVES_APPBIN=$FOAM_USER_APPBIN
export WAVES_LIBBIN=$FOAM_USER_LIBBIN

save and close it

5/ in a terminal command enter the waves2Foam folder and run ./Allwclean then ./Allwmake
(good to clean before make if you made any changes)

6/ Go back up on this page and follow the instruction I wrote previously OpenFOAM 3.0.1 with waves2Foam : issues compiling solved

7/ Hope it works

Pierre-henri

Peter Ko May 25, 2016 04:38

Hi phmusi, cause I still cannot found the folder "opt", so I re-install the OF-3.0.1 and encounter the problems as follows...
(further explain: I was completed the several tutorial tasks, like dambreak and etc.)
root@Linux-PC:~/OpenFOAM# uname -m
x86_64
root@Linux-PC:~/OpenFOAM# source $HOME/OpenFOAM/OpenFOAM-3.0.1/etc/bashrc WM_LABEL_SIZE=64
bash: /opt/OpenFOAM-3.0.1/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-3.0.1/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-3.0.1/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-3.0.1/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-3.0.1/etc/config/settings.sh: No such file or directory
bash: /opt/OpenFOAM-3.0.1/etc/config/aliases.sh: No such file or directory
bash: /opt/OpenFOAM-3.0.1/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-3.0.1/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-3.0.1/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-3.0.1/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-3.0.1/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-3.0.1/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-3.0.1/bin/foamCleanPath: No such file or directory
root@Linux-PC:~/OpenFOAM#


How should I do to solve this problems?? I need to create the folder "opt" myself??? or the package which I download was wrong?? I very sure that I do the some command as the "https://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-3.0.1/Ubuntu" told

best regards to every one,
Peter Ko

phmusi May 25, 2016 04:44

Hello Peter,

This is how you should install OpenFOAM on linux :

http://openfoam.org/download/3-0-1-ubuntu/

Ths opt/ folder is a folder already existing in Ubuntu (one of the basic folder) so you must have it

Pierre-Henri

ngj May 25, 2016 04:44

Good morning,

@Pierre-Henri: Thanks for helping out with the compilation issues.

Kind regards,

Niels

Peter Ko May 28, 2016 02:04

Quote:

Originally Posted by phmusi (Post 601729)
Hello Peter,

This is how you should install OpenFOAM on linux :

http://openfoam.org/download/3-0-1-ubuntu/

Ths opt/ folder is a folder already existing in Ubuntu (one of the basic folder) so you must have it

Pierre-Henri

Hi Phmusi, first, thank you for your kindly replied, and I was re-install the system and OF-3.0.1
I was fallow your steps, it's was clearly.
However I still encounter some errors.
In the step 5, the command ./Allwclean will kept my machine running for 1 day and all I can do was shut the terminal down.
Than I do the command ./Allwmake, it was encounter the error in the end.
like:
make[1]: *** [/home/peter/OpenFOAM/peter-3.0.1/platforms/linux64GccDPInt32Opt/bin/postProcessWaves2Foam] Error 1
make[1]: Leaving directory `/home/peter/OpenFOAM/peter-3.0.1/waves2Foam/applications/utilities/postProcessing/postProcessWaves2Foam'
make: *** [postProcessWaves2Foam] Error 2

=====================================
COMPILATION DONE
=====================================

If I ignore the errors, I tried to run the waveFlume->blockMesh
I got my core dumped as fallows:


/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 3.0.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 3.0.1-119cac7e8750
Exec : blockMesh
Date : May 28 2016
Time : 13:35:06
Host : "Peter-Linux"
PID : 17691
Case : /home/peter/OpenFOAM/peter-3.0.1/waves2Foam/tutorials/waveFoam/waveFlume
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

fileName::stripInvalid() called for invalid fileName 0
For debug level (= 2) > 1 this is considered fatal
Aborted (core dumped)


Does anyone got the same dilemma??

Any recommendations would be very thankful

Best regards,
Peter Ko


All times are GMT -4. The time now is 17:59.