CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Tsunami modelling (https://www.cfd-online.com/Forums/openfoam-solving/193522-tsunami-modelling.html)

aji September 26, 2017 17:19

Tsunami modelling
 
Hi
I am a new OpenFoam user already have practiced the dambreak example.:) Now I am looking to stimulate The wave force due to tsunami on a coastal dyke. Please advice me how I can do that? :confused:Which tutorial I need to practice and what are the solvers I need to have a look? please direct me in the right direction.

Phicau September 26, 2017 22:48

Hi aji,

you can try olaFoam. You have a breakwater example in which you can change the boundary conditions to generate a solitary wave easily:

https://github.com/phicau/OLAFOAM

Cheers,

Pablo

aji September 27, 2017 18:34

Quote:

Originally Posted by Phicau (Post 665793)
Hi aji,

you can try olaFoam. You have a breakwater example in which you can change the boundary conditions to generate a solitary wave easily:

https://github.com/phicau/OLAFOAM

Cheers,

Pablo

Thank you very much phicau

aji September 28, 2017 21:36

Quote:

Originally Posted by aji (Post 665906)
Thank you very much phicau

Hi what is the code for run the solver and what is the solver for basewave flume? to practice the tutorial 1) I run the blockmesh 2) setfields
how to run the simulation? :confused:(I was just tried it like dambreak example).:rolleyes:

Phicau October 1, 2017 21:32

Dear Aji,

I suggest that you read the olaFoam wiki site, it will answer some of your questions and help you to progress:

https://openfoamwiki.net/index.php/Contrib/OLAFOAM

For your reference, there is also a compiling guide here:

https://sites.google.com/site/olafoamcfd/source-code

What you need to do is, source OpenFOAM and compile the code, then every time that you source OpenFOAM, the solvers olaFoam and olaDyMFoam will be available.

The github release also includes tutorials. You need to choose the version of the tutorials according to the version of OpenFOAM that you have installed, this is very important because at some point alpha1 changed to alpha.water, so old tutorials do not run with the new versions.

All the tutorials include a runCase script with all the instructions necessary to run the case; they also include a cleanCase script to reset the case into the small size example.

Please read the wiki and look for answers in the olaFoam Thread ( https://www.cfd-online.com/Forums/op...-thread-9.html ) before asking, most of the times your questions have already been solved and you will get going immediately.

Best,

Pablo

aji October 1, 2017 22:30

Hi Phicau
I am stuck in this.
1) I could not set it up initially. it is showing when I compile in the base folder. please see the error message.

aji@myfirstlaptop MINGW64 OpenFOAM-4.x ~/OLAFOAM
$ ./allMake
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file wavemakerMovement/wavemakerMovement.C
-- line 317 col 2: "\n" expected
Making dependency list for source file waveVelocity/waveVelocityFvPatchVectorField.C
-- line 366 col 10: "\n" expected
-- line 83 col 10: "\n" expected
-- line 83 col 10: "\n" expected
-- line 83 col 10: "\n" expected
-- line 65 col 10: "\n" expected
-- line 210 col 10: "\n" expected
Making dependency list for source file waveAlpha/waveAlphaFvPatchScalarField.C
-- line 366 col 10: "\n" expected
x86_64-w64-mingw32-g++ -std=c++0x -Dmingw_w64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -DWIN64 -DLITTLE_ENDIAN -DWIN64 -DLITTLE_ENDIAN -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O2 -DNDEBUG -Wl,--strip-all -DNoRepository -ftemplate-depth-100 -DOFVERSION=490 -DOFFLAVOUR=3 -I/home/ofuser/blueCFD/OpenFOAM-4.x/src/finiteVolume/lnInclude -I./waveVelocity/velProfiles -I../common -I../common/checks -I../common/calculateWaterLevel @Make/mingw_w64GccDPInt32Opt/includeHeaderPaths -IlnInclude -I. -I/home/ofuser/blueCFD/OpenFOAM-4.x/src/OpenFOAM/lnInclude -I/home/ofuser/blueCFD/OpenFOAM-4.x/src/OSspecific/MSwindows/lnInclude -c waveAlpha/waveAlphaFvPatchScalarField.C -o C:\\Program Files\\blueCFD-Core-2016\\msys64\\home\\ofuser\\OLAFOAM\\genAbs\\waveG eneration\\Make\\mingw_w64GccDPInt32Opt\\waveAlpha \\waveAlphaFvPatchScalarField.o
x86_64-w64-mingw32-g++.exe: error: Files\blueCFD-Core-2016\msys64\home\ofuser\OLAFOAM\genAbs\waveGenerat ion\Make\mingw_w64GccDPInt32Opt\waveAlpha\waveAlph aFvPatchScalarField.o: No such file or directory
/home/ofuser/blueCFD/OpenFOAM-4.x/wmake/rules/General/transform:8: recipe for target 'Make/mingw_w64GccDPInt32Opt/waveAlpha/waveAlphaFvPatchScalarField.o' failed
make: *** [Make/mingw_w64GccDPInt32Opt/waveAlpha/waveAlphaFvPatchScalarField.o] Error 1
\n\nWave generation boundary conditions compilation failed

aji@myfirstlaptop MINGW64 OpenFOAM-4.x ~/OLAFOAM
$

2) how to find my openfoam version? ( I am a windows user using blucfd core OpenFoam-4.x=> which version of tutorial can I use?

Phicau October 2, 2017 00:21

Hi Aji,

the problem is that the code is not compatible with the windows version. As far as I know it can only be compiled under Linux and Mac.

Nevertheless, I remember the guys from bluecfd adapting ihfoam some versions ago. You can take a look at their efforts here:

https://github.com/phicau/IHFOAM/network

and check if you can make the appropriate changes for it to compile.

Best,

Pablo


All times are GMT -4. The time now is 00:34.