CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[waves2Foam] Waves2Foam Related Topics

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree155Likes

Closed Thread
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 30, 2012, 10:01
Default
  #81
New Member
 
Join Date: Apr 2012
Posts: 5
Rep Power: 11
Nektos is on a distinguished road
Hello Niels,

First of all thanks for your work.

I have followed the installation tutorial on the openFOAM Wiki to put waves2foam on my Mac (OS X 10.6.8 Snow Leopard).
The problem is, I think the applications you created in the waves2foam directory are not taken into account when making ./Allwmake.
I have this message :
Quote:
In file included from waveTheories/waveTheory/waveTheory.C:27:
waveTheories/waveTheory/waveTheory.H:62:5: error: invalid suffix "n1n0" on integer constant
waveTheories/waveTheory/waveTheory.C:54:5: error: invalid suffix "n1n0" on integer constant
waveTheories/waveTheory/waveTheory.C:64:5: error: invalid suffix "n1n0" on integer constant
And then :
Quote:
make: Target `application' not remade because of errors.
My openFOAM version is 2.1.0, maybe that is why it gives n1n0 ?

Furthermore, there is also a dependency list problem :
Quote:
Making dependency list for source file relaxationZoneLayout.C
could not open file primitiveMeshI.H for source file relaxationZoneLayout.C
could not open file pointIOField.H for source file relaxationZoneLayout.C
My other question is : do I have to put waves2foam inside the openFOAM folder ?
Where exactly shall I put the waves2foam directory ?

Thanks in advance,
Nektos is offline  

Old   April 30, 2012, 11:11
Default
  #82
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,877
Rep Power: 34
ngj will become famous soon enoughngj will become famous soon enough
Hi Nektos

I might not be able to help you, as I am not a MAC-person, but I will give me best guess. First of all, resolving the first error is the most important thing, as the other might disappear in doing so.

To me the error suggests that the environmental variable WM_PROJECT_VERSION_NUMBER is not being set correctly in the waves2Foam/Allwmake and waves2Foam/src/Allwmake scripts. This is probably due to a difference between linux and MAC, since we have made a smooth compilation on 2.1.x on Ubuntu/Red hat.

Thus, the first step is to figure out, whether or not this environmental variable is set at all, e.g. put
Code:
echo "My variable: "$WM_PROJECT_VERSION_NUMBER
in waves2Foam/src/Allwmake and comment the following line with
Code:
#wmake libso
Go to waves2Foam/src and execute the script with './Allwmake'. Hopefully, the to first digits in the version number is written to the standard output.

With respect to the location of waves2Foam it really does not matter. I, however, always place it here:
Code:
$FOAM_RUN/../applications/utilities
Kind regards,

Niels
ngj is offline  

Old   April 30, 2012, 11:31
Default
  #83
Member
 
Björn Windén
Join Date: Feb 2012
Location: National Maritime Research Institute, Tokyo, Japan
Posts: 37
Rep Power: 11
winden is on a distinguished road
Quote:
Originally Posted by djpiro View Post
I had the same problem as Björn when doing waves+current. I noticed larger amplitudes for the waves that were slightly delayed from theory. Therefore I created a new waveTheory (stokesFirstwCurrent) that includes a current velocity.
Thank you very much for sharing this Dominic. I tried it on a coarse mesh and it looks like it works but I am trying it on a very fine mesh now to see how well the amplitude/period is recreated. I will let you know how I get along.

//Björn
winden is offline  

Old   April 30, 2012, 12:27
Default
  #84
New Member
 
Join Date: Apr 2012
Posts: 5
Rep Power: 11
Nektos is on a distinguished road
Hey Niels,

Thanks for your answer.
I have corrected manually all the "if" in the waves2foam files, it was quite long but now there is no problem with this 2n1n0.
When I use "wmake" on the application folder, the only thing that does not work is "waveFoam".

I have followed the Wiki instructions but I get this message :
Quote:
No rule to make target `interFoam.C', needed by `interFoam.dep'. Stop.
Do you have an idea what I could do ?

Thx,

Pierre.
Nektos is offline  

Old   April 30, 2012, 12:53
Default
  #85
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,877
Rep Power: 34
ngj will become famous soon enoughngj will become famous soon enough
Hi Pierre,

First of all, what was needed to succeed with the compilation?

Secondly: Have you renamed interFoam.C to waveFoam.C? If that is the case and if you have corrected waveFoam/Make/files, then do the following in this succession in the waveFoam directory:

Code:
wclean all
wmake
Kind regards,

Niels
ngj is offline  

Old   May 1, 2012, 04:45
Default
  #86
New Member
 
Join Date: Apr 2012
Posts: 5
Rep Power: 11
Nektos is on a distinguished road
Hi Niels,

First to succeed with the compilation I modified all the files in which you had the "if" concerning the openFOAM version. After that, it works.

Then, I followed the exact tutorial on the wiki (modifying interFoam.C into waveFoam.C, and Make/Options and Make/Files, but I still get the message :
Quote:
make: *** No rule to make target `interFoam.dep', needed by `Make/darwinIntel64GccDPOpt/dependencies'. Stop.
Should I modify the first line of the Make/Files,
Quote:
interFoam.C
into

Quote:
waveFoam.C
?

When I do that I get many errors like "*** was not declared in this scope".

Thanks,

Pierre.
Nektos is offline  

Old   May 1, 2012, 05:02
Default
  #87
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,877
Rep Power: 34
ngj will become famous soon enoughngj will become famous soon enough
Hi Pierre,

Could you please be more specific on what was needed in relation to the "pre-processor if"s? Did you delete the if-statements and merely kept those lines relevant for 2.1.0?

Secondly, the wiki was not completely clear on the naming. It has been updated, however, the essence is that interFoam.C -> waveFoam.C in Make/files.

Besides that, you give so little information on the compilation errors that it is not possible to help.

Regards,

Niels
ngj is offline  

Old   May 1, 2012, 05:15
Default
  #88
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,877
Rep Power: 34
ngj will become famous soon enoughngj will become famous soon enough
Hi Dominic and Björn,

I tried to have a look in the modified stokesFirstCurrent, and to me the most prominent difference is that the current is not ramped. Is that true?

In that case, I believe you should be able to reproduce the results using combinedWaves with stokesFirst and potentialCurrent, where "Tsoft 0.0;" is stated in the latter waveTheory. Otherwise, there might be a bug in combinedWaves.

Kind regards,

Niels
ngj is offline  

Old   May 1, 2012, 05:37
Default
  #89
New Member
 
Join Date: Apr 2012
Posts: 5
Rep Power: 11
Nektos is on a distinguished road
Sorry Niels, I am a beginner in computer science.
I deleted the "if-statements" and only left the condition appropriate for openFoam 2.1.0.

I changed the Make/files as you said in your last post.

The errors I have are in my .txt attached file.

I hope it will help.

Thanks for your help,
Attached Files
File Type: txt erreurs.txt (83.1 KB, 29 views)
Nektos is offline  

Old   May 1, 2012, 06:14
Default
  #90
Member
 
Björn Windén
Join Date: Feb 2012
Location: National Maritime Research Institute, Tokyo, Japan
Posts: 37
Rep Power: 11
winden is on a distinguished road
Quote:
Originally Posted by ngj View Post
In that case, I believe you should be able to reproduce the results using combinedWaves with stokesFirst and potentialCurrent, where "Tsoft 0.0;" is stated in the latter waveTheory. Otherwise, there might be a bug in combinedWaves.
Hi Niels. I had Tsoft set to zero for the potentialCurrent in my attempts using combinedWaves and I still experienced increased amplitude and a (small) shift in the wavelength.

//Björn
winden is offline  

Old   May 1, 2012, 06:18
Default
  #91
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,877
Rep Power: 34
ngj will become famous soon enoughngj will become famous soon enough
Hi Pierre

Thanks for the log file. It also helped me to identify the problem in compiling on a Mac. There will, as soon as I am on my linux installation, be made an update of the Allwmake script. The problem was a difference in the handling of newline characters between linux and Mac (Darwin) in "sed".

Secondly, you get a lot of unpleasant errors, which I really do not understand the origin of, so in order to get it working, I suggests the following:

1. Copy the needed files from the interFoam directory to your own solver directory under waves2Foam.

2. Change interFoam.C -> waveFoam.C

3. Change the Make/files into
Code:
waveFoam.C

EXE = $(FOAM_USER_APPBIN)/waveFoam
4. Compile without any changes in the context of the files. If you are successful then you can start adding the different lines as stated on the wiki.

Furthermore, note that you have put "-DOFVERSION=2n1n0" in the options file, when you compile the solver, however, it should merely read "-DOFVERSION=21".

Kind regards,

Niels
ngj is offline  

Old   May 1, 2012, 06:19
Default
  #92
New Member
 
Feng
Join Date: Oct 2011
Posts: 6
Rep Power: 11
fg118 is on a distinguished road
Quote:
Originally Posted by ngj View Post
Dear all,

This thread has been started to replace the discussions in the announcement thread for waves2Foam, as most activities are not related to actually announcements.

Please use this thread as of now for any discussions, questions, problems or suggestions in relation to waves2Foam.

Thanks a lot for your corporation,

Niels
Dear All,
I have followed the installation tutorial on the openFOAM Wiki to put waves2foam on my linux desktop. The version of openFoam I used is 2.0.1. I have modified interfoam to wavefoam in a new folder. But when I wmake it, the following error happed:

[QUOTE][Making dependency list for source file waveFoam.C
could not open file relaxationZone.H for source file waveFoam.C
could not open file readWaveProperties.H for source file waveFoam.C
SOURCE=waveFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/users/feng/OpenFOAM/OpenFOAM-2.0.1/src/transportModels -I/home/users/feng/OpenFOAM/OpenFOAM-2.0.1/src/transportModels/incompressible/lnInclude -I/home/users/feng/OpenFOAM/OpenFOAM-2.0.1/src/transportModels/interfaceProperties/lnInclude -I/home/users/feng/OpenFOAM/OpenFOAM-2.0.1/src/turbulenceModels/incompressible/turbulenceModel -I/home/users/feng/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/users/feng/OpenFOAM/OpenFOAM-2.0.1/src/OpenFOAM/lnInclude -I/home/users/feng/OpenFOAM/OpenFOAM-2.0.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/waveFoam.o
waveFoam.C:50:28: error: relaxationZone.H: No such file or directory
waveFoam.C:67:36: error: readWaveProperties.H: No such file or directory
In file included from waveFoam.C:70:
createFields.H: In function ‘int main(int, char**)’:
createFields.H:148: error: ‘relaxationZone’ was not declared in this scope
createFields.H:148: error: expected ‘;’ before ‘relaxing’
waveFoam.C:97: error: ‘relaxing’ was not declared in this scope
/home/users/feng/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/readTimeControls.H:38: warning: unused variable ‘maxDeltaT’
make: *** [Make/linux64GccDPOpt/waveFoam.o] Error 1/QUOTE]

Do you have an idea what I could do ?

Best Regards

feng
fg118 is offline  

Old   May 1, 2012, 06:21
Default
  #93
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,877
Rep Power: 34
ngj will become famous soon enoughngj will become famous soon enough
Hi Björn

Thanks, keep me posted on your progress, such that we can get these problems eliminated.

All the best,

Niels

P.S. You should be able to use the new surfaceElevation utility to track the surface elevation in your domain easily.
ngj is offline  

Old   May 1, 2012, 06:24
Default
  #94
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,877
Rep Power: 34
ngj will become famous soon enoughngj will become famous soon enough
Hi Feng,

You have not modified the Make/options file in your waveFoam directory as stated on the wiki (http://openfoamwiki.net/index.php/Co...2Foam#waveFoam).

Kind regards,

Niels
ngj is offline  

Old   May 1, 2012, 06:42
Default
  #95
Member
 
Björn Windén
Join Date: Feb 2012
Location: National Maritime Research Institute, Tokyo, Japan
Posts: 37
Rep Power: 11
winden is on a distinguished road
Hi Niels.

The only difference I can see is that combinedWaves sums up the velocity contributions from different components in

Code:
        U += combinedWavesPtr_[cI]->U(x, time);
whereas the modified stokesFirst also corrects for the frequency as we=w+kU in

Code:
scalar Uhorz = PI_ * H_ / period_ *
                   Foam::cosh(K_ * (Z + h_)) / Foam::sinh(K_ * h_) * 
                   Foam::cos(omega_ * time - (k_ & x) + (k_ & current_) * time + phi_);
as well as adding on the current velocity

Code:
return Uhorz * k_ / K_ - Uvert * direction_ + current_
In combinedWaves, I found that to get the correct frequency out I had to put, T of the wave, k of the wave and omega of the encountered wave in waveProperties which seems odd. I don't see exactly why there is an increase in amplitude though. I guess there is excess energy put in somehow by the combinedWaves approach that gets suppressed by the relaxation region but that builds up as increased amplitude when it is set free.

//Björn
winden is offline  

Old   May 1, 2012, 08:03
Default
  #96
New Member
 
Join Date: Apr 2012
Posts: 5
Rep Power: 11
Nektos is on a distinguished road
Thanks Niels for your answer, wmake worked on waveFoam when I did what you said.
I will wait for your Allwmake file, and come back if i have any further problem.
Nektos is offline  

Old   May 1, 2012, 08:17
Smile
  #97
New Member
 
Feng
Join Date: Oct 2011
Posts: 6
Rep Power: 11
fg118 is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi Feng,

You have not modified the Make/options file in your waveFoam directory as stated on the wiki (http://openfoamwiki.net/index.php/Co...2Foam#waveFoam).

Kind regards,

Niels
Dear Niels,
Thank you very for your apply. I have double cheak the Make/options file, I found that I just miss a "\" before -DOFVERSION=20 \
what a stupid mistake.
I will follow the tuitions in waves2foam to learn about it. Hope it will help me for my research.
best Rehards

Feng
fg118 is offline  

Old   May 1, 2012, 22:37
Default solitary waves with waves2Foam
  #98
New Member
 
Stefan
Join Date: Jan 2011
Location: Bremen
Posts: 20
Rep Power: 12
holodeck10 is on a distinguished road
Hi all,

I am currently playing around with the solitary waves, implemented in waves2Foam. I installed the package on a Ubuntu 11.10 system with OF210. All works fine. I already found out that its good to set x0 = -wave length. Are there already experiences and recommendations on min. length of relaxation zone and soft start option in dependency of wave length?

Cheers
Stefan
diadiadia2008 likes this.

Last edited by holodeck10; May 1, 2012 at 22:53.
holodeck10 is offline  

Old   May 2, 2012, 04:14
Default
  #99
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,877
Rep Power: 34
ngj will become famous soon enoughngj will become famous soon enough
Hi Pierre,

Allwmake and src/Allwmake is now updated to handle the problems with "sed". I hope this has solved the problems.

Kind regards,

Niels
ngj is offline  

Old   May 4, 2012, 04:12
Default
  #100
New Member
 
Philipp Lösse
Join Date: Nov 2011
Location: Germany
Posts: 2
Rep Power: 0
PLö is on a distinguished road
Hi Niels,

you asked for feedback about your post-processing utility with OF 2.1 in the old thread:
In my case it is working well and without problems.
I am currently running OF 2.1.x

Best regards
Philipp
PLö is offline  

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 9 March 30, 2017 05:19
Re-Project topics protocol STAR-CCM+ 0 March 22, 2016 05:25
Waves2Foam Related Topics seoseonguk OpenFOAM Running, Solving & CFD 0 March 1, 2016 22:18
Waves2Foam Related Topics seoseonguk OpenFOAM Running, Solving & CFD 0 March 1, 2016 22:14
Error: "Cannot find file points" related to changing parallelized code to serial? Suyf OpenFOAM Running, Solving & CFD 0 February 12, 2015 04:31


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