CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Waves2Foam Related Topics

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

Like Tree76Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   July 17, 2014, 06:19
Default
  #821
New Member
 
Olivier Giroux
Join Date: Jun 2014
Location: France
Posts: 1
Rep Power: 0
daxt29 is on a distinguished road
Hello everyone,

I am working on a improved version of the waveFlume to study the free surface elevation of an oscillating water columns. I created the device with FreeCad and I generated the mesh with SnappyHexMesh.

I am running my model in parallel with a cluster. All the first step which initialise the model work well but when I start the first iteration, they stop after 5 sec because of a segmentation fault. I am still a new user of waves2Foam and I would like to know what what can be the origin of this problem.

Here is my error message:

[0] #0 Foam::error:rintStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0] #1 Foam::sigSegv::sigHandler(int) in "/opt/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0] #2
[0] at sigaction.c:0
[0] #3 Foam::sampledSurfaceElevation::sampleIntegrateAndW rite(Foam::sampledSurfaceElevation::fieldGroup<dou ble>&) in "/home/ogiroux/OpenFOAM/ogiroux-2.1.1/platforms/linux64GccDPOpt/lib/libwaves2Foam.so"
[0] #4 Foam::OutputFilterFunctionObject<Foam::sampledSurf aceElevation>::execute(bool) in "/home/ogiroux/OpenFOAM/ogiroux-2.1.1/platforms/linux64GccDPOpt/lib/libwaves2Foam.so"
[0] #5 Foam::functionObjectList::execute(bool) in "/opt/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0] #6 Foam::Time::run() const in "/opt/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0] #7
[0] in "/home/ogiroux/OpenFOAM/ogiroux-2.1.1/platforms/linux64GccDPOpt/bin/waveFoam"
[0] #8 __libc_start_main in "/lib64/libc.so.6"
[0] #9
[0] in "/home/ogiroux/OpenFOAM/ogiroux-2.1.1/platforms/linux64GccDPOpt/bin/waveFoam"
[compute-0-37:14938] *** Process received signal ***
[compute-0-37:14938] Signal: Segmentation fault (11)
[compute-0-37:14938] Signal code: (-6)
[compute-0-37:14938] Failing at address: 0x23e00003a5a
[compute-0-37:14938] [ 0] /lib64/libc.so.6() [0x3d70a329a0]
[compute-0-37:14938] [ 1] /lib64/libc.so.6(gsignal+0x35) [0x3d70a32925]
[compute-0-37:14938] [ 2] /lib64/libc.so.6() [0x3d70a329a0]
[compute-0-37:14938] [ 3] /home/ogiroux/OpenFOAM/ogiroux-2.1.1/platforms/linux64GccDPOpt/lib/libwaves2Foam.so(_ZN4Foam23sampledSurfaceElevation 23sampleIntegrateAndWriteERNS0_10fieldGroupIdEE+0x 77b) [0x2b3cec78eb8b]
[compute-0-37:14938] [ 4] /home/ogiroux/OpenFOAM/ogiroux-2.1.1/platforms/linux64GccDPOpt/lib/libwaves2Foam.so(_ZN4Foam26OutputFilterFunctionObj ectINS_23sampledSurfaceElevationEE7executeEb+0x88) [0x2b3cec797dc8]
[compute-0-37:14938] [ 5] /opt/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam18functionObjectList7execut eEb+0xf9) [0x2b3cecbf4da9]
[compute-0-37:14938] [ 6] /opt/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZNK4Foam4Time3runEv+0xb0) [0x2b3cecbf86c0]
[compute-0-37:14938] [ 7] waveFoam() [0x429f6b]
[compute-0-37:14938] [ 8] /lib64/libc.so.6(__libc_start_main+0xfd) [0x3d70a1ed1d]
[compute-0-37:14938] [ 9] waveFoam() [0x4277a9]
[compute-0-37:14938] *** End of error message ***
[compute-0-40][[41936,1],8][btl_tcp_frag.c:215:mca_btl_tcp_frag_recv] mca_btl_tcp_frag_recv: readv failed: Connection reset by peer (104)
--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 14938 on node compute-0-37 exited on signal 11 (Segmentation fault).
daxt29 is offline   Reply With Quote

Old   July 17, 2014, 15:22
Default Wave Flume tutorial
  #822
New Member
 
Dmitrijs Gavrilovs-Stepanovs
Join Date: Jun 2014
Posts: 15
Rep Power: 3
Dmitrjs is on a distinguished road
Hi everyone,

First of all, Niels, thank you very much for the tool and your effort in helping everyone to solve their problems.
My problem is the following:
I am using waveFlume tutorial to simulate waves propagating in a wave tank. I had to change the length of the tank and the depth so that it matches the required dimensions. I need to simulate a wave with a period of 0.913 seconds and a wave height of 0.033 metres. The depth of the wave tank is now 1 metre and the length is 17.965.
The problem I experience is that the wave's amplitude decreases with the length of the tank (x-coordinate) and it is also out of the phase when I compare it to the analytical solution of the Stokes First Wave theory (this is what I am using). The following graphs demonstrate it (surface elevation at x=0, x=4, x=7.46 metres).

x_0.jpg

x_4.jpg

x_746.jpeg

I am also attaching my case files:

https://www.dropbox.com/s/glv29onc0k2ehof/My_case.zip

What I tried to do was refining the mesh significantly, but it made absolutely no difference. I also tried to use Stokes Second Wave Theory, but it gave exactly the same results.
I also went through this thread and found a discussion of the similar problem to mine. It was posted by JanL (Jan Lohrmann), post #57, page 3.

Quote:
Originally Posted by JanL View Post
Hi Niels,


I'm very interested in your tool and have been testing it recently. I'd like to use it for seakeeping-analysis and hence I'm interested in Stokes-theories at first. I calculated different cases, compared them with the analytical solutions and unfortunately got some strange results. I specifically analysed the results at x=2.5 (middle of inlet-relaxation-zone), x=5 (end of inlet-relaxation-zone) and x=9 (middle of free computational domain). Here is what I have done:


  1. I have been solving the standard tutorial of waveFlume for StokesFirst. The standardised amplitude changes by the distance from the inlet-relaxation-zone quite dramatically (see figure 1).
  2. Since that case is designed for shallow water, I modified the domain to a depth of 2m (which I also changed in waveProperties.org) to have a deepwater case. Now the amplitude generally decreases by the distance from the inlet-relaxation-zone and the wave-length increases, so that the waves get out-of-phase from the analytical solution (see figure 2).
  3. Afterwards I tried StokesSecond in the standard waveFlume case which gives almost perfect results (see figure 3)!
  4. Running the same case for deepwater (2m) again produces results with lower amplitudes and longer wave-lengths (see figure 4).


Have you, or anybody else experienced similar results? I already tested different settings like refining the mesh or the time-step or calculating under turbulent conditions which had different minor effects on the solution.
Have you any ideas what could have gone wrong?


Regards


Jan
It seems like he had some problems with using the inappropriate amplitude with the deep water case which was not valid for Stokes First Theory. After he changed the wave height to 0.02 (with the depth of 2) it worked out for him. In my case I am having a wave height of 0.033 with the depth of 1 and it should be valid for Airy Stokes Theory.

I would really appreciate if someone would take a look at my problem or maybe someone has had it already? Thank you in advance!
Dmitrjs is offline   Reply With Quote

Old   July 19, 2014, 05:01
Default
  #823
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Good morning

@Betsy: I am not quite sure, what you are asking, since you talk about total pressure, but the example you gave sets the gauge pressure (p_rgh). Nonetheless, the free surface and velocities are independent on whether you specify total or gauge pressure as primitive variable. Therefore, it is merely a matter of making a pre-processing tool, which sets the total pressure as well. Try to look in the existing setWaveFields, because it does set the pressure (for a limited number of cases), but it is only the gauge pressure. It should be straight forward for you to add the hydrostatic component in setWaveFields directly. Something like the following:

Code:
Switch addHydrostatic = someDictName.lookupOrDefault<Switch>("addHydrostatic", "false");

if (addHydrostatic)
{
    // Perform the pressure correction
}
I have suggested it like that, since it retains the gauge pressure definition in waveTheories and it is backward compatible for all, who uses the incompressible interFoam.

Furthermore, I have seen your recent articles in Coastal Engineering. Do you think that there would be an opportunity for you to share the solitary wave description, which you used?

@Olivier: Something is wrong with your surface elevation extraction at run-time. At least that is where the code fails. Check the validity of the wave gauges.

@Dimitrij: When you are having less than 2 cells over the wave height, I am not surprised that you are having dissipation of wave energy.

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 online now   Reply With Quote

Old   July 21, 2014, 11:19
Default Dissipation of the wave energy
  #824
New Member
 
Dmitrijs Gavrilovs-Stepanovs
Join Date: Jun 2014
Posts: 15
Rep Power: 3
Dmitrjs is on a distinguished road
Hi Niels,
Thank you very much for your quick reply to my post (post #822). I refined the mesh to get around 13 cells over the wavelength, but still I get the same results and the amplitude decreases with time. The graph from this simulation is shown below which compares the solution at 2 metres and 7.46 metres:

0.913_13_cells.jpeg

I am also attaching my case files:
https://www.dropbox.com/sh/6mhys9pci...iNmfXNaXho7yoa

Could there be any other reasons why I am getting such results? What else can I try to resolve this problem?

Thank you in advance,
Dmitrijs
Dmitrjs is offline   Reply With Quote

Old   July 21, 2014, 12:18
Default
  #825
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi Dimitrij,

Try more points per wave length, 13 are way too little. If the problem continues, could you please try another version of OF. The VOF scheme was change from 2.2 to 2.3, so there might have been introduced some additional diffusion.

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 online now   Reply With Quote

Old   July 21, 2014, 18:20
Default
  #826
New Member
 
Betsy
Join Date: Jul 2014
Location: Honolulu, HI
Posts: 5
Rep Power: 3
betsybrite is on a distinguished road
Hi Niels,
Thank you for your reply, I will look into this. As far as the description of the solitary wave used in the coastal engineering paper, I would like to refer you to my co-author Masoud Hayatdavoodi (masoud@hawaii.edu). If I can get waves2Foam working with compressible air, I will be happy to share this with you as well.
Thanks again!
Betsy
ngj likes this.
betsybrite is offline   Reply With Quote

Old   July 22, 2014, 08:51
Default
  #827
New Member
 
Dmitrijs Gavrilovs-Stepanovs
Join Date: Jun 2014
Posts: 15
Rep Power: 3
Dmitrjs is on a distinguished road
Hi Niels,
Thank you again for your replies! Can I just ask what would be the recommended number of points per both wave length and wave height to get reasonable results?
Thanks,
Dmitrijs
Dmitrjs is offline   Reply With Quote

Old   July 23, 2014, 08:15
Default Reflection control
  #828
New Member
 
Dmitrijs Gavrilovs-Stepanovs
Join Date: Jun 2014
Posts: 15
Rep Power: 3
Dmitrjs is on a distinguished road
Quote:
Originally Posted by Dmitrjs View Post
Hi Niels,
Thank you again for your replies! Can I just ask what would be the recommended number of points per both wave length and wave height to get reasonable results?
Thanks,
Dmitrijs
I addition to this question, may I ask is it possible to control the reflection from the relaxation zone (e.g by specifying some damping coefficient)? Would that mean making changes to the source code?

Thanks,
Dmitrijs
Dmitrjs is offline   Reply With Quote

Old   July 24, 2014, 20:21
Default volVectorField& U = db().lookupObject<volVectorField>("U") , runtime error
  #829
Senior Member
 
kumar
Join Date: Mar 2009
Posts: 112
Rep Power: 8
kumar2 is on a distinguished road
Hi Niels and all Foamers,

I have a question on modifying the linearSpring class when applying to floating bodies in waveDyMFoam. I am trying to modify linearSpring.C
so that the code sees the finite volume mesh and can access all points in it.

I did the following modifications in linearSpring.C and was able to make the
modified dynamic library, mylibforcesNEW.so.
///////////////////////////////////Modifications to linearSpring.C //////////////
const objectRegistry& db();
const volVectorField& U = db().lookupObject<volVectorField>("U");
const fvMesh & mesh = U.mesh();
const pointField & pp = mesh.points(); // Thanks to Niels post
(http://www.cfd-online.com/Forums/ope...tml#post275193)
/////////////////////////////////////////////////////////
I then used this library in waveDyMFoam by including the
name in system/controlDict. But when I run the solver, I get the following
error
////////RUNTIME ERROR ///////////////
waveDyMFoam: symbol lookup error: /share/gecko/krishnak/OpenFOAM/krishnak-2.1.0/
platforms/linux64GccDPOpt/lib/mylibforcesNEW.so: undefined symbol: _Z2dbv
///////////////////////////////////////

Also the run time error disappears if I do not include lines starting from const volVectorField& U = db().lookupObject<volVectorField>("U");

Any help is welcome. Also if there is a better way to access the mesh within linearSpring.C, please let me know.

Thanks and best regards

Kumar

PS: Runtime include libs for waveDyMFoam:
libs
(
"libOpenFOAM.so"
"libfvMotionSolvers.so"
"mylibforcesNEW.so"
);
kumar2 is offline   Reply With Quote

Old   August 1, 2014, 16:11
Default accessing streamFunction class from main
  #830
Senior Member
 
kumar
Join Date: Mar 2009
Posts: 112
Rep Power: 8
kumar2 is on a distinguished road
Hi Niels and all,

I was trying to access member function printCoeffs() of class streamFunction from main (waveFoam). In waveFoam, I write,
///CODE BELOW///
Info<< " Coeff = " << Foam::waveTheories::streamFunction.printCoeffs() << nl << endl;

And the error I get is

error: 'streamFunction' is not a member of 'Foam::waveTheories' .


( I checked streamFunction.H where it is given Foam::waveTheories::streamFunction )

Thanks in advance

Kumar
kumar2 is offline   Reply With Quote

Old   August 1, 2014, 18:56
Default accessing streamFunction class from main
  #831
Senior Member
 
kumar
Join Date: Mar 2009
Posts: 112
Rep Power: 8
kumar2 is on a distinguished road
I posted the wrong error in the post just before !

This is the error...

error: expected primary-expression before '.' token


Thanks again

Kumar
kumar2 is offline   Reply With Quote

Old   August 2, 2014, 04:55
Default
  #832
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi Kumar,

What you are trying does not make sense. You will have to construct the object, before you use the method.

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 online now   Reply With Quote

Old   August 2, 2014, 20:41
Default
  #833
Senior Member
 
kumar
Join Date: Mar 2009
Posts: 112
Rep Power: 8
kumar2 is on a distinguished road
Hi Niels,

Thank so much for your reply. I see what you mean ( for example in createFields.H , i see an example for trubulence, interface, also this link helped me ; http://eprints.soton.ac.uk/200155/1/WorkShopFOAM.pdf) .

I hope I can bug you with one other question: Suppose I create an object of streamFunction class in my main program. I think this object will be another object that will be DIFFERENT from the object (of streamFunction class) created by the waves2foam lib. Am I correct ?(this means there is no way of accessing the object of streamFunction class from main !!)

Best regards

Kumar
kumar2 is offline   Reply With Quote

Old   August 3, 2014, 02:13
Default
  #834
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hallo Kumar,

Yes, it will be another, but identical object, if you create it with the same properties. For instance, both the relaxation zones and boundary conditions have separate but identical waveTheory objects.

Besides that, there is no way of accessing the wave theory from the waveFoam-solver, unless you perform a somewhat large re-write of the code.

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 online now   Reply With Quote

Old   August 4, 2014, 01:22
Default
  #835
Senior Member
 
kumar
Join Date: Mar 2009
Posts: 112
Rep Power: 8
kumar2 is on a distinguished road
Hi Niels,

Thanks again for your reply. Just this last question I have . It would be great if you can give me some pointers ...

Actually I am stuck with a library ( not waves2foam ), which cannot see the mesh or any other fields(U,p). I read in one of the posts that Istream can be used to access these fields. Are you aware of any code snippets that does this.

Have a great week

Best regards

Kumar
kumar2 is offline   Reply With Quote

Old   August 4, 2014, 03:40
Default
  #836
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi Kumar,

This thread is dedicated to waves2Foam, so I would recommend you to start a new thread. Furthermore do an effort in describing your problems in more detail, as it is otherwise impossible to help with your actual problem.

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 online now   Reply With Quote

Old   August 4, 2014, 16:06
Default
  #837
Senior Member
 
kumar
Join Date: Mar 2009
Posts: 112
Rep Power: 8
kumar2 is on a distinguished road
Dear Niels,

My apologies for the misplaced posting and lack of info. As suggested by you, I have opened a new thread under programming&development. Here is a link if you choose to take a look, Accessing Mesh, Fields in Foam::sixDoFRigidBodyMotionRestraints::linearSprin g . I have to thank you again for your continued eagerness for keeping this wave2foam thread as active and informational as it possibly can be.

Best regards

Kumar
kumar2 is offline   Reply With Quote

Old   August 13, 2014, 09:53
Default waveDyMFoam on OF230
  #838
Member
 
carlos
Join Date: Apr 2011
Posts: 37
Rep Power: 6
CFD-Palma is on a distinguished road
Dear All,

I have spent three days trying to compile wavwDyMFoam in OF230. A lot of time reading the posts on installation problems.
I wonder if any body did succeed in this compilation.
Previously, I had it working on OF211 and OF220.
I attach the error file and would appreciate any help as the error messages have no clear meaning for my little experience in compiling solvers.
(waves2Foam did compile well and waveFoam is installed)

I wander if Niels will have some day the time to include also waveDiMFoam in the installation script (If possible)

Thanks in advance,
Carlos.
Attached Files
File Type: txt Errors.txt (5.2 KB, 12 views)
CFD-Palma is offline   Reply With Quote

Old   August 20, 2014, 12:48
Default
  #839
Member
 
Join Date: Dec 2009
Posts: 42
Rep Power: 7
katakgoreng is on a distinguished road
Hi Niels,

Could you explain a bit about this "timeShift" in the "waveProperties" dictionary. Will "timeShift" introduce a lag if it is set to non-zero value?

Kind regards,
katakgoreng
katakgoreng is offline   Reply With Quote

Old   August 20, 2014, 13:01
Default
  #840
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi Katakgoreng,

If you are thinking of the parameter in the main part of the waveProperties file it is an artefact, which does no longer have any meaning.

Any other occurrence of timeShift would be unknown to me.

Thank you for pointing it out. I will try to remember to clean it up, when I update the repository next time.

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 online now   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Other Topics at OpenFOAM Workshop Milan 2008 hjasak OpenFOAM 2 October 26, 2013 04:33
Sections / Topics in CFD Wiki Roberthealy1 CFD-Wiki 6 August 23, 2007 17:58
CFD Related Educational Programmes Jonas Larsson Main CFD Forum 3 February 9, 2007 11:11
project topics vivekanand CFX 0 October 27, 2004 05:17
Advanced Topics in Aerodynamics Antonio Filippone Main CFD Forum 0 August 28, 1999 12:16


All times are GMT -4. The time now is 15:25.