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

New Wave BC bContinuousb over the Interface for OF 141

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 3, 2008, 09:20
Default I don't think so. I tried to a
  #21
New Member
 
ben wraight
Join Date: Mar 2009
Posts: 4
Rep Power: 8
ben_wraight is on a distinguished road
I don't think so. I tried to adapt the test example conditions for the mesh I wanted to use. I assumed that the waves would be generated at the face I assigned as the inlet.
ben_wraight is offline   Reply With Quote

Old   October 3, 2008, 09:33
Default Well, they should be. Otherwis
  #22
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,620
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Well, they should be. Otherwise there is a bug I have not tested for.

/ 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   Reply With Quote

Old   October 4, 2008, 07:32
Default Niels, looks like you have so
  #23
erik023
Guest
 
Posts: n/a
Niels,
looks like you have some really nice BC's and to install them i followed the instructions above.
i did try to compile interFoam adding to the "files" (last two lines):
EXE_LIBS = \
-linterfaceProperties \
-lincompressibleTransportModels \
-lfiniteVolume \
-libsurfaceWavePressureFvPatchScalarField.so \
-libsurfaceWaveVelocityFvPatchScalarField.so

also tried:
-$(FOAM_USER_LIBBIN)libsurfaceWavePressureFvPatchSc alarField.so
and so.
but it does, in the first case, find:
/usr/bin/ld: cannot find -libsurfaceWavePressureFvPatchScalarField.so
in the second case:
g++: unrecognized option '-/home/erik/OpenFOAM/erik-1.5/lib/linuxGccDPOpt/libsurfaceWaveVelocityFvPatchSc alarField'

what can be wrong?
i used the Allmake you made for the catalog i placed in my catalog as you see in the path above.

would be grateful for help!
thank you
Erik
  Reply With Quote

Old   October 4, 2008, 08:25
Default Hi Under the options EXE_LI
  #24
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,620
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi

Under the options EXE_LIBS add it in the following form:

-lsurfaceWavePressureFvPatchScalarField \
-lsurfaceWaveVelocityFvPatchVectorField

Enjoy your weekend,

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

Old   October 5, 2008, 05:00
Default Niels - Brilliant! Thank you!
  #25
erik023
Guest
 
Posts: n/a
Niels - Brilliant!
Thank you!

Looking forward to trying this out with my boat in there!

Erik
  Reply With Quote

Old   October 13, 2008, 11:08
Default Hi Niels, I am looking at y
  #26
New Member
 
Nicola Parolini
Join Date: Mar 2009
Posts: 4
Rep Power: 8
nicoparo is on a distinguished road
Hi Niels,

I am looking at your BC implementation and I'd like to use it combined with a non-zero inflow mean velocity (to simulate a boat advancing in a wavy sea). How would you set your 0/U properties for your BC in that case ?

Thanks a lot.

Nicola
nicoparo is offline   Reply With Quote

Old   October 15, 2008, 12:47
Default hi! Niels, i have tried to fi
  #27
erik023
Guest
 
Posts: n/a
hi!
Niels, i have tried to figure out what the sampleSurfaceDict and sampleDict is used for, could you lease explain?
also i run into an error (only when i run first order, but for second order nothing happens but no error either) it says:
MULES: Solving for gamma
Liquid phase volume fraction = 0.4498884 Min(gamma) = 0 Max(gamma) = 1
MULES: Solving for gamma
Liquid phase volume fraction = 0.4498895 Min(gamma) = -8.762161e-22 Max(gamma) = 1
This routine has not yet been implemented
...and so on.
what can i do you think, it seems to come from evaluateFace.H!?
it is when i use snappyhexmesh to make a box (six walls) hanging inside another bigger box and then run it with this setup. could it be the size of the mesh, it is quite big cells?

any help would be appreciated!
thank you
Erik
  Reply With Quote

Old   October 17, 2008, 11:26
Default Hi Sorry for the late resp
  #28
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,620
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi

Sorry for the late response, but I am currently out-of-sync with the forum and will continue to be so for some time.

@Nicola

I would locate an appropriate theory for wave and currents and implement it.
I would suggest to start looking for a potential theory solution, even though one could question the validity of the vertical velocity profile.

@Erik

The reason for "This routine has not yet been implemented" is, that the "horizontal" edges in your boundary faces are not truly horizontal. It is a missing piece, which I know needs to be implemented, but have not had the time and/or need to do it.

sample*Dict are for postprocessing purposes only and will properly not work for 1.5, as the sample utility has been reimplemented by combined both sample and sampleSurfaces into one.

Hope it clears the uncertainties.

Have a nice weekend,

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

Old   October 17, 2008, 15:40
Default Hi Nicola To be a little bi
  #29
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,620
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi Nicola

To be a little bit more specific, you need to find a theory which takes the current into consideration when determining the dispersion relation, as the current will come in as a first order contribution, and it will result in multiple solutions to the dispersion relations, where one or the other will come into play when/if wave blocking occur, e.g. change of propagation direction and wave number with waves over a bar with an opposing current.

Unfortunately I cannot think of any references, but hopefully the above have given you come clues.

Best 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   Reply With Quote

Old   November 21, 2008, 12:10
Default Hi Niels, thanks for sharin
  #30
New Member
 
Franziska Verworn
Join Date: Mar 2009
Posts: 3
Rep Power: 8
fverworn is on a distinguished road
Hi Niels,

thanks for sharing your wave bc! I looked at your testEx and it worked out perfectly (in parallel on four cpus).

I am thinking of using it for my case, but I have triangular faces on the boundary patch (and I need to generate a solitary wave but that's another problem). As I'm new to OpenFoam and C++ - has someone already looked at the "minor part of the method, which hasn't been implemented yet" in order to use arbitrary polygons or are there by any chance updates of your bc?

Thank for any helpful comments in advance.
Franziska
fverworn is offline   Reply With Quote

Old   November 25, 2008, 14:19
Default Hi Franziska Well, first of
  #31
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,620
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi Franziska

Well, first of all, I need to admit that you do not need to have extensive knowledge in C++ to extend the code to cover arbitrary polygons, as my own experience back then was limited and it is therefor written in a C-flavor style.

Further, I can promise you that I will not have time to consider it at least before February;) To explain it in short terms, the part which has not been implemented looks at polygons, which has only one node which intersects the water surface, the rest are either wet or dry. This is not possible to occur if you have horizontally aligned hex-faces as there will either be two or zero intersecting nodes.

The implementation of a solitary wave should be rather straight forward.

Good luck,

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

Old   January 9, 2009, 03:50
Default Hello All, Great work. Also
  #32
Senior Member
 
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 8
markc is on a distinguished road
Hello All,

Great work. Also for me very useful. Some questions and comments:
1. Regarding speed: many of us want to simulate some object in the middle of the domain moving at some speed. This speed is usually supplied at the inlet BC. If I am right Niels tells that he does not know any theory about how to implement this speed. However, isn't this just a matter of adding a fixedValue for Ux on top of the calculated values? You do not change the waves with that, you only make the entire reference frame moving. Or am I wrong?

2. Without having studied the subject very much I had the idea to implement waves by simply supplying a gamma field for every time step at the inlet. Apparantly this thought is too simple but can anyone explain me why this is not correct?

3. Implementation in interFoam: in the user manual, 3.2.6, an explanation is given about how to implement a user created library without having to recompile all individual applications. Has anyone tried this? And secondly: the manual speaks about a src/foamUser directory which is meant for this purpose. However, in my OF-1.5 there is no such directory. Any ideas here?

Brgds,

Mark
markc is offline   Reply With Quote

Old   January 9, 2009, 05:27
Default Hi Mark Thanks for the posi
  #33
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,620
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi Mark

Thanks for the positive response

ad 1.: Since my last post I have discussed this with one of my supervisors. In stream-function theory by Fenton (cannot recall the year, but it is in the last of the 1980'ies), you can specify a certain flux integrated over the vertical, which is identical to a mean current.
The reason that you cannot add a current directly on top of the solution is, that the current effects the dispersion relation as a first order term! So you could solve the stream function theory coefficients and apply those on your boundary and then you will have some sort of current.
This current will most definitely not be the one you see in nature, as the profile originates from potential theory and thus do not include turbulence, which is indeed present - though it is a good first approximation to get things started.

ad 2.: I do not have a thourough answer, but only applying the gamma field (and I suppose zeroGradient for U and pd?), it would be the same as having a free surface channel flow with no body-force and only zeroGradient on all terms, which will not drive the wanted flow, as you do not apply neither momentum nor acceleration at the boundary.

ad 3.: I have not looked into it as it has been less prioritated than anything else, thus I cannot help you with that.

Best 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   Reply With Quote

Old   January 10, 2009, 03:45
Default Hi Niels, it is also possib
  #34
Senior Member
 
Tian
Join Date: Mar 2009
Location: Berlin, germany
Posts: 103
Rep Power: 8
tian is on a distinguished road
Hi Niels,

it is also possible to use your libs for OF 1.5? I tried it but I always got this error also:

/usr/bin/ld: cannot find -libsurfaceWavePressureFvPatchScalarField.so

this happen if I try to recompile interFoam. I adjusted the "option" file like as per description.

Maybe somebody was successfull in OF 1.5 and can give me some advice.

Thanks a lot

Bye
Thomas
__________________
BIM HVACTool, The Green Building Simulation Tool for OpenFOAM, Energy Plus and Radiance.
tian is offline   Reply With Quote

Old   January 11, 2009, 23:37
Default Hi Mark, I am also trying t
  #35
New Member
 
Su Xiaohui
Join Date: Mar 2009
Location: Singapore
Posts: 29
Rep Power: 8
sxhdhi is on a distinguished road
Send a message via Skype™ to sxhdhi
Hi Mark,

I am also trying to add Niels's new Wave BC to interFoam using OF 1.5 on Ubuntu 8.10.

Now I have recompiled interFOAM already. I am about to run it...

I think you should meet a problem because I've got them during my doing. Regarding "foamUser", Yes, your are right, there is no such folder in OF 1.5. Therefore, my treatment is to recompile interFOAM. You may meet the problem when you wmake those new BC libs, there are no such files cpuTime.H and cpuTime.C. Then again my treatment is to search them through OpenFOAM document and copy them into ..\OpenFOAM-1.5\src\finiteVolume\InInclude\. After that you can try to recompile interFOAM following Niels's suggestion.

--------------------------------------------------------------


Hi Niels,

Thanks a lot for your new Wave BC. I am trying to run it then apply it into a real case.

I have successfully recompiled interFOAM. But there is an error when I run it:

Create time

Create mesh for time = 0


Reading environmentalProperties
Reading field pd



keyword waveType is undefined in dictionary "/home/user/OpenFOAM/OpenFOAM-1.5/sxh-1.5/run/VOF_BC/testExample/constant/enviro nmentalProperties"

file: /home/user/OpenFOAM/OpenFOAM-1.5/sxh-1.5/run/VOF_BC/testExample/constant/environ mentalProperties from line 25 to line 30.

From function dictionary::lookupEntry(const word& keyword) const
in file db/dictionary/dictionary.C at line 213.

FOAM exiting

May I get your advice about this, Thanks in advance.

Regards

Xiaohui
sxhdhi is offline   Reply With Quote

Old   January 12, 2009, 02:53
Default Hello All, I managed to bui
  #36
Senior Member
 
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 8
markc is on a distinguished road
Hello All,

I managed to build the BC in OF1.5, I do not have access to that specific computer right now, there was indeed something with a name change or so but anyway it worked very easy.
But still my question: is it possible to build the BC as a user_lib so that it is accessible for all solvers? Well, as time allows I will just try it.
Last thing Xiaohui: your error message says exactly what is going wrong: as Niels you have to define waveType in the dictionary.

Brgds,

Mark
markc is offline   Reply With Quote

Old   January 12, 2009, 02:54
Default Dear Niels, Your new BC is
  #37
New Member
 
Su Xiaohui
Join Date: Mar 2009
Location: Singapore
Posts: 29
Rep Power: 8
sxhdhi is on a distinguished road
Send a message via Skype™ to sxhdhi
Dear Niels,

Your new BC is working by adding waveType into EnvironmentalProperties file. The test case is running now. I run the case by serial not Parallel, so a bit of slowly.

I am thinking of adding uniform flux BC in inlet based on your code. Do you think it is feasible?

Regards

Xiaohui
sxhdhi is offline   Reply With Quote

Old   January 12, 2009, 07:58
Default ----------------- I am thinki
  #38
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,620
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
-----------------
I am thinking of adding uniform flux BC in inlet based on your code. Do you think it is feasible?
-----------------

If you want to add a uniform flux inlet, then wouldn't it be significantly more easy to used fixedValue on the velocity field?

Otherwise you need to elaborate on the question.

Best 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   Reply With Quote

Old   January 29, 2009, 07:16
Default Hi Niels, sorry for asking
  #39
New Member
 
Franziska Verworn
Join Date: Mar 2009
Posts: 3
Rep Power: 8
fverworn is on a distinguished road
Hi Niels,

sorry for asking again, you said earlier you were setting the velocity in the air to zero in each time step in your bc. I'm probably at a complete loss, but how did you achieved that.

Thanks in advance,
Franziska
fverworn is offline   Reply With Quote

Old   January 29, 2009, 07:19
Default Hi Niels, sorry for asking
  #40
New Member
 
Franziska Verworn
Join Date: Mar 2009
Posts: 3
Rep Power: 8
fverworn is on a distinguished road
Hi Niels,

sorry for asking again, you said earlier you were setting the velocity in the air to zero in each time step in your bc. I'm probably at a complete loss, but how did you achieved that.

Thanks in advance,
Franziska
fverworn is offline   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
help me for"wave maker"&"wave absorber" bestrcsekhar Main CFD Forum 0 November 28, 2008 05:57
cut wave Julian CFX 1 April 30, 2007 13:36
Wave equation Pratap Main CFD Forum 4 October 20, 2004 23:51
Sin Wave Síle FLUENT 3 May 2, 2003 10:00
Is "Void wave" same as "density wave"??? two phase flow Main CFD Forum 0 April 30, 2003 10:45


All times are GMT -4. The time now is 07:56.