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 Community New Posts Updated Threads Search

Like Tree162Likes

Closed Thread
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 29, 2013, 08:24
Default
  #481
Member
 
Ed Ransley
Join Date: Jul 2012
Posts: 30
Rep Power: 14
Ed R is on a distinguished road
Dear all,

I'm trying to make a new wave type which combines waves with the addition of second order interactions (much like the bichromaticSecond wave type but with an arbitrary number of wave components). Unfortunately I'm new to C++ and I'm finding OpenFOAM restrictive. I'm trying to use coeffDict_.lookup to read in a vector with an arbitrary number of elements. It seams OpenFOAM restricts vectors to 3 elements. I want a vectors for the wave heights, the phases and the frequencies, all with arbitrary length. Is there anyway I can use coeffDict_.lookup to read in such an input? I don't understand why it does not work the same as the combinedWavesNames (which is an arbitrary long vector of names).

I've tried to define the waveHeights in the waveProperties File as a list like so.

inletCoeffs
{
waveType edsWave;
Tsoft 2;
depth 1.73;
period1 3.12198;
period2 3.04757;
direction1 ( 1 0 0 );
direction2 ( 1 0 0 );
waveHeights (0.058912 0.053362);
phi1 119.84;
phi2 124.75;

but I get this error because it wants there to be 3 elements (i.e. a vector)

--> FOAM FATAL IO ERROR:
wrong token type - expected Scalar, found on line 36 the punctuation token ')'

file: /home/eransley/OpenFOAM/eransley-2.1.1/run/focussedWaveWork/EWTEC2013/waveOnly/newWaveTypeTest2/constant/waveProperties::inletCoeffs::waveHeights at line 36.

From function operator>>(Istream&, Scalar&)
in file lnInclude/Scalar.C at line 91.

FOAM exiting

Any help would be greatly appreciated.

Thanks

Ed

Last edited by Ed R; July 29, 2013 at 11:32.
Ed R is offline  

Old   July 29, 2013, 08:36
Default
  #482
Member
 
Ed Ransley
Join Date: Jul 2012
Posts: 30
Rep Power: 14
Ed R is on a distinguished road
Dear Vince,

I have had the problem you have posted many times. This typically happens when you change the mesh but still have the old files within the 0 directory. I have an Allrun script which copies the .org files (eg alpha1.org) over the top of the other files (eg alpha1). I think from your error message you still have the old p_rgh files in the 0 directory form your previous run. Also you will need to remove the relaxationZoneLayout files in the 0 directory if you are going to change the mesh. then re-run blockMesh and the relaxationZoneLayout before setWaveFields.

I hope that helps,

Ed
ngj likes this.
Ed R is offline  

Old   August 13, 2013, 15:28
Default How to impot surface elevation over time?
  #483
New Member
 
Mohammad Ghandali
Join Date: Jan 2013
Posts: 8
Rep Power: 13
Mohamad(AUT) is on a distinguished road
Hi niels
first i must gives my thank to you for your academic characteristic.

i want to import surface elevation over time in plot after some runs in waveflume tutorial but i dont know how can you help me please?

best regards
Mohamad(AUT) is offline  

Old   August 13, 2013, 17:08
Default
  #484
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Mohamad,

I am sorry, but is quite difficult to understand what you would like to achieve.

Besides the first line, the outputted surface elevations are formatted as a rectangular matrix, so it should be straight forward to load the data in your favourite plotting utility. Once this is achieved you can process it in any way you like.

Kind regards

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline  

Old   August 14, 2013, 00:30
Default
  #485
New Member
 
Hf
Join Date: Nov 2012
Posts: 29
Rep Power: 14
jasonchen is on a distinguished road
Hi Niels,

I installed two versions of openfoam v211 and v221 on my desktop. Whenever a new terminal window is opened, simply type in the alias (already included in .bashrc) for the version I want to use. But now comes the question: can I install / compile 2 versions of waves2Foam on the same desktop, in corresponding with of v211 and v221? So that when I use either version of openfoam, the corresponding waves2Foam is linked and executed.

Thanks.

Best,
Jason
jasonchen is offline  

Old   August 14, 2013, 01:23
Default
  #486
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
@Jason : Yes.

Have a nice day,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline  

Old   August 14, 2013, 02:19
Default
  #487
New Member
 
Mohammad Ghandali
Join Date: Jan 2013
Posts: 8
Rep Power: 13
Mohamad(AUT) is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi Mohamad,

I am sorry, but is quite difficult to understand what you would like to achieve.

Besides the first line, the outputted surface elevations are formatted as a rectangular matrix, so it should be straight forward to load the data in your favourite plotting utility. Once this is achieved you can process it in any way you like.

Kind regards

Niels
hi niels
i use paraview and i want to gather free surface elevation over time in specific point...how can i do it?
thanks for your fast answering
king regards.
Mohamad(AUT) is offline  

Old   August 14, 2013, 03:00
Default
  #488
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good morning Mohamad,

I am never using ParaView for line plots, for which I prefer Matlab, so I will not be able to help you.
If you do not have Matlab, you would probably benefit by looking into e.g. python or gnuplot.

Kind regards

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline  

Old   August 14, 2013, 03:36
Default
  #489
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 14
Sagun is on a distinguished road
Hi Niels,

I was wondering if the relaxation zone at the inlet has to be at least as large as the wavelength of the waves being generated. I'm trying to simulate a very large time period wave (T = 10s) which has a wavelength of over 100m.

Thanks,
Sagun
Sagun is offline  

Old   August 14, 2013, 12:33
Default
  #490
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Sagun,

The one wave length is at least the rule of thump that I am always using. Though, it might be reduced depending on the case. I would test that, if I was to use somewhat shorter domains.

Kind regards

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline  

Old   August 14, 2013, 14:41
Default
  #491
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 14
Sagun is on a distinguished road
Hi Niels,

Well, that's what I thought and I have been doing the same so far. But as you can imagine, if I were to have a wave generation relaxation zone of almost 100m and another one almost as big for absorption, my computational domain would be huge! Same goes for the number of cells if I want to get any meaningful results. What do you think should be the best approach in this case?

Thanks,
Sagun
Sagun is offline  

Old   August 15, 2013, 02:10
Default
  #492
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good morning,

I agree that the relaxation zone can be very expensive, so the alternative would be to implement active absorbing/generating boundaries.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline  

Old   August 15, 2013, 13:57
Default
  #493
Member
 
Sagun Tripathi
Join Date: Aug 2012
Location: Amherst, USA
Posts: 78
Rep Power: 14
Sagun is on a distinguished road
Hi Niels,

Could you advise me as to how should I go about doing that?

Thanks,
Sagun
Sagun is offline  

Old   August 16, 2013, 16:08
Default
  #494
New Member
 
Hf
Join Date: Nov 2012
Posts: 29
Rep Power: 14
jasonchen is on a distinguished road
Quote:
Originally Posted by ngj View Post
@Jason : Yes.

Have a nice day,

Niels
Thanks a lot, Niels. I successfully compliled waves2Foam with of v211 and v221, the waves2Foam package complied into v211 and v221 directories, respectively. But since there are now 2 vesions of libwaves2Foam on my desktop, can you briefly explain how it can find the right version every time when I run a case in the terminal. Whenever I open a new terminal, I use alias to specify the openfoam environment, but only openfoam env not waves2Foam.

Another thing: I find wavesFoam is a good example to learn C++ programming in the openfoam framework. I wonder how did you achieve this without delving too much into the vast lines of code of openfoam. Have you ever received any kind of training on openfoam? Any suggestions on programming in openfoam?

Thanks,
Jason
jasonchen is offline  

Old   August 17, 2013, 05:25
Default
  #495
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good morning,

@Sagun: No, I cannot be that helpful in this context. The only thing is that I can point you to the work by Higuera et al. (2012 or 2013), where an implementation for OpenFoam is presented. They, however, only seem to distribute the code along with seminars.

@Jason: Your welcome. The sourcing of waves2Foam will happen automatically, unless you have modified the WAVES_LIBBIN and WAVES_APPBIN in waves2Foam/bin/bashrc.
Secondly, I have simply looked a lot into all (?) of the source files in the OF-distributions, and I also had a beginners class in C++, which helped a lot to better understand the object oriented structure. Besides that I have not received any training on programming in neither C++ nor specifically in OpenFoam.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline  

Old   August 22, 2013, 22:23
Default Questions on the wind generated waves
  #496
lin
Senior Member
 
Hua Zen
Join Date: Mar 2009
Posts: 138
Rep Power: 17
lin is on a distinguished road
As I see this toolbox is used to generate waves via lateral boundary conditions. Any experts could shed some light on whether it is possible to model wind generated waves with OpenFOAM (wave generation and later breaking)?

There are two difficulties in my opinion.

1) Is it possible to model the drag force at the air sea interface accurately with the VOF method, which should be important for the wave generation.

2) Since the air velocity is much larger than that of the water, the time step should be very small with the CFL constraint, which demands huge computational resources.

Any comment?

Best wishes.
lin is offline  

Old   August 23, 2013, 03:43
Default
  #497
rye
New Member
 
Romain Euvrard
Join Date: Jul 2013
Location: Saint-Nazaire, France
Posts: 4
Rep Power: 13
rye is on a distinguished road
Thanks to people from this forum who helped me (ngj, kev4573, kilroy and mf.), I was able to compile the wave2Foam and waveDyMFoam solvers, and to run cases. Nothing but stupid mistakes were done by myself when it didn't worked.

For waveDyMFoam :
I had to modify one file from the movingDyMBox3org tutorial found in this forum, i had to change some lines of the fvSolution file : adding the cellDisplacement solver inside the brackets, and the PISO and PIMPLE solvers outside of the brackets. I don't know why, but now it is running.
Attached Files
File Type: zip fvSolution.zip (855 Bytes, 16 views)
ngj likes this.
rye is offline  

Old   August 23, 2013, 07:57
Default
  #498
New Member
 
Jorge Gadelho
Join Date: Feb 2013
Posts: 22
Rep Power: 13
JGadelho is on a distinguished road
Hello everyone,
I'm using waves2foam to simulate a numerical wave flume.
I need to validate the numerical wave flume to read forces on a floating stationary object. Does anyone knows any documented experimental results?

Thank you very much.
Jorge
JGadelho is offline  

Old   August 24, 2013, 21:11
Unhappy Error in modifying the interfoam for using the waves2Foam
  #499
New Member
 
rz
Join Date: Mar 2012
Posts: 25
Rep Power: 0
rezacfd1361 is on a distinguished road
Hi Niels,

I installed OpenFOAM 2.1.1 on ubuntu11.04 for installing the waves2Foam I followed your instruction to make a wavedoam from interFoam, but after several time when I wmake in the newfolder which I made and copied interFoam files I got this error, I search in this froum and I did not find an error like this. I will be appreciated you if you tell me how can I fix it.

The error:

SOURCE=waveFoam.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -DOFVERSION=211 -I./../../../../src/lnInclude -I/opt/openfoam211/src/transportModels -I/opt/openfoam211/src/transportModels/incompressible/lnInclude -I/opt/openfoam211/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam211/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam211/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/waveFoam.o
waveFoam.C:48:28: fatal error: relaxationZone.H: No such file or directory
compilation terminated.
make: *** [Make/linuxGccDPOpt/waveFoam.o] Error 1
rezacfd1361 is offline  

Old   August 25, 2013, 04:06
Default
  #500
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good morning RZ,

The question is, why you want to make waveFoam on your own, since it is already distributed for OF2.1.1 (Also see here: http://openfoamwiki.net/index.php/Co...Versions_of_OF).

If that is not the case, then you have a very old version of waves2Foam and I would stress that you should make an update of the svn repository.

Kind regards

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline  

Closed Thread


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 10 September 2, 2021 06:29
Re-Project topics protocol STAR-CCM+ 0 March 22, 2016 06:25
Waves2Foam Related Topics seoseonguk OpenFOAM Running, Solving & CFD 0 March 1, 2016 23:18
Waves2Foam Related Topics seoseonguk OpenFOAM Running, Solving & CFD 0 March 1, 2016 23:14
Error: "Cannot find file points" related to changing parallelized code to serial? Suyf OpenFOAM Running, Solving & CFD 0 February 12, 2015 05:31


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