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 add a new wave theory (https://www.cfd-online.com/Forums/openfoam-community-contributions/208031-trying-add-new-wave-theory.html)

Olbap March 19, 2015 03:19

Trying to add a new wave theory
 
Hello everyone,
I started using OpenFOAM (2.3.0) recently and enjoyed it a lot. I really like the development of the waveFoam package, congratulations! Everything is built perfectly and I managed to run every tutorial, but now I have encountered a problem.
I want to add a new wave theory which is just a first order Stokes wave with modulation. So I wrote the .C and the header corresponding, and tried to run my case, which is for now the tutorial 3DWaves but with FirstOrderModulated for the wave theory.
I got the following error

Code:

setWaveParameters

Create time


Reading g

Reading waveProperties



--> FOAM FATAL ERROR:
Unknown wave property type stokesFirstModulationProperties

Valid wave property types are :

14
(
solitaryFirstProperties
stokesSecondProperties
cnoidalFirstProperties
combinedWavesProperties
potentialCurrentProperties
irregularProperties
bichromaticFirstProperties
stokesSecondModulationProperties
streamFunctionProperties
bichromaticSecondProperties
stokesFirstStandingProperties
externalSourceProperties
stokesFirstProperties
stokesFifthProperties
)


    From function setWaveProperties::New(const fvMesh&, const Time&, ...)
    in file preProcessing/setWaveProperties/setWaveProperties.C at line 261.

FOAM exiting

so I searched on the forum and I saw that one should add the wave properties files (code and header) in /waves2Foam/src/waves2FoamProcessing/preProcessing/setWaveProperties/ and /regular/ in my case. So I did, and modified the Make/files in waves2FoamProcessing, and built it without error. However, I still have the same error when I try to run my case. Do you know what could be the issue? Thanks in advance!

AR91 February 8, 2021 12:00

Quote:

Originally Posted by Olbap (Post 537113)
Hello everyone,
I started using OpenFOAM (2.3.0) recently and enjoyed it a lot. I really like the development of the waveFoam package, congratulations! Everything is built perfectly and I managed to run every tutorial, but now I have encountered a problem.
I want to add a new wave theory which is just a first order Stokes wave with modulation. So I wrote the .C and the header corresponding, and tried to run my case, which is for now the tutorial 3DWaves but with FirstOrderModulated for the wave theory.
I got the following error

Code:

setWaveParameters

Create time


Reading g

Reading waveProperties



--> FOAM FATAL ERROR:
Unknown wave property type stokesFirstModulationProperties

Valid wave property types are :

14
(
solitaryFirstProperties
stokesSecondProperties
cnoidalFirstProperties
combinedWavesProperties
potentialCurrentProperties
irregularProperties
bichromaticFirstProperties
stokesSecondModulationProperties
streamFunctionProperties
bichromaticSecondProperties
stokesFirstStandingProperties
externalSourceProperties
stokesFirstProperties
stokesFifthProperties
)


    From function setWaveProperties::New(const fvMesh&, const Time&, ...)
    in file preProcessing/setWaveProperties/setWaveProperties.C at line 261.

FOAM exiting

so I searched on the forum and I saw that one should add the wave properties files (code and header) in /waves2Foam/src/waves2FoamProcessing/preProcessing/setWaveProperties/ and /regular/ in my case. So I did, and modified the Make/files in waves2FoamProcessing, and built it without error. However, I still have the same error when I try to run my case. Do you know what could be the issue? Thanks in advance!

Hello,
I am facing the same issue. Did you find a solution!?
Thanks,
Arun.

AR91 February 16, 2021 16:29

Quote:

Originally Posted by AR91 (Post 795631)
Hello,
I am facing the same issue. Did you find a solution!?
Thanks,
Arun.

Once again I stumbled onto the solution on my own. It is probably the 7th time this has happened after having asked a question on the forum and receiving no help. :p

To anyone who might be in this trouble. Check your WAVES_APPBIN and WAVES_LIBBIN in bin/bashrc inside waves2Foam. I set these to $FOAM_USER_APPBIN and $FOAM_USER_LIBBIN respectively. That fixed the issue.
Regards,
Arun.

irengclenk October 8, 2021 04:20

Hi guys,

I am a beginner and was able to solve this by doing this:
1. check the options file is avalaible in the make folder. So if we want to modify the set wave properties
check the make folder here /home/u0142217/OpenFOAM/waves2Foam-master/src/waves2FoamProcessing/preProcessing
chosse the correct option version and rename it into options
2. Make sure the modified folder is written in the files
3. ./Allwmake

That worked for me. Hope it helps :)


All times are GMT -4. The time now is 13:58.