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

Wave Tank

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 17, 2008, 17:47
Default Niels, you are right, it would
  #41
New Member
 
Luca Liberti
Join Date: Mar 2009
Location: Rome, Italy
Posts: 22
Rep Power: 17
fugu is on a distinguished road
Niels, you are right, it would certainly be more computationally expensive. The main reason for me to use the moving boundary is to reproduce laboratory flumes in order to make some comparisons with experimental data. It might be also interesting on the design side for situations where continuous waves are not required.
I looked at your BC and I will try to use it for
continuous generation.
As for the tsunamis it might be interesting to use OF to model extreme wave/structure interaction or extreme wave generation due to bodies falling in the water.

Hrvoje, the swirling glass is amazing. Was it made with bc provided in the regular OF release ?

Regards,
Luca
fugu is offline   Reply With Quote

Old   March 17, 2008, 18:34
Default What do you mean a "boundary c
  #42
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
What do you mean a "boundary condition"? What you are looking at is a moving mesh simulation, with mesh motion specified in any way you want it. This is just one of the "prescribed motion" classes. I also have some more sophisticated ones, like 3-DOF translation + solid body motion, used with the same VOF solver. Have a look at a:

bobbing cylinder DOF + free surface + automatic mesh motion

I am still playing with that one.

All this stuff is checked into the public SVN version; if something is missing, please drop me a line and I'll make it available in some way.

Enjoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   March 17, 2008, 19:38
Default Hrvoje, sorry no bc other tha
  #43
New Member
 
Luca Liberti
Join Date: Mar 2009
Location: Rome, Italy
Posts: 22
Rep Power: 17
fugu is on a distinguished road
Hrvoje,
sorry no bc other than walls and atmosphere there! What I really meant was the moving boundary algorithm. Do you have to recompile the solver in order to specify a moving mesh like that?

I have looked at the repo at
https://openfoam-extend.svn.sourceforge.net/
svnroot/openfoam-extend/trunk/Core/
OpenFOAM-1.4.1-dev
but couldn't locate examples like that in the tutorials. On the other hand I noticed a bunch
of classes in /src/dynamicFvMesh/ and /topoChangerFvMesh/
but not being a C++ programmer doesn't make the whole business of setting up the simulation easy.
I guess one should be able to infer what to put in the dynamicMeshDict by reading the classes code.
Although I consider myself a decent java programmer I still find C++ syntax obscure
maybe time has come to finally dive in the C++ realm.

Best regards
Luca
fugu is offline   Reply With Quote

Old   March 27, 2008, 11:20
Default Ok, after playing around with
  #44
New Member
 
Luca Liberti
Join Date: Mar 2009
Location: Rome, Italy
Posts: 22
Rep Power: 17
fugu is on a distinguished road
Ok, after playing around with the moving cone tutorial in icoDyMFoam I tried to create very simple moving boundary case in interFoam. Basically my case is a 2D box with atmosphere at the top boundary, walls at right and bottom boundaries and moving wall at the left. I managed to get a similar case working in icoDyMFoam with outlet at the right boundary, fixed wall at the top and obviously a single phase. In the interFoam run the moving wall at the left seems to stay put. Also I don't get any pointMotionU and cellMotionU in the output directories for t>0.
Any suggestion ? I am running the standard OF 1.4 binary distribution.
Best regards
Luca Liberti
fugu is offline   Reply With Quote

Old   August 13, 2008, 12:36
Default Gentlemen: I am newbie to o
  #45
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Gentlemen:

I am newbie to openFoam and tyring to figure out how to model sloshing in a tank. I see there has been a good amount of discussion on this topic. However I was unable to download or open the trz files by Eugene De Villers to look at the BC conditions proposed by him and apparently used by others on this forum. I would appreciate it very much if anyone tell me how to download this file.

http://www.cfd-online.com/cgi-bin/Op...3236#POST13236
musahossein is offline   Reply With Quote

Old   August 13, 2008, 13:31
Default I tried to play the mpg files
  #46
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
I tried to play the mpg files in the following link posted in the following link. But Kaffiene in SuSe linux wont open it. Does anyone know whether there are patches avaiable to fix this? Thanks.

http://www.cfd-online.com/cgi-bin/Op...3243#POST13243
musahossein is offline   Reply With Quote

Old   August 15, 2008, 06:22
Default Right-click, save-as. Then cha
  #47
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
Right-click, save-as. Then change the extensions from "-4256.unk" to ".tgz" before decompressing with this command:

tar xzf <filename>.tgz

However, I suggest you contact Eric to try and get hold of his latest version of this boundary which is much better than my original posting.
eugene is offline   Reply With Quote

Old   September 10, 2008, 14:22
Default Hi all I am currently looki
  #48
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 all

I am currently looking into further extending my wave boundary condition to include a sponge layer, so reflected waves does not interact with the wave-maker.

The sponge layer work as follows:

1) Locate cells within the sponge.
2) Remove the reflected part of the velocity/pressure signal through a filtering process with the wanted, i.e. incoming, signal.

The issue is as since the wave generation and the filtering is closely related, I would like to apply the filter from within the boundary condition. I have looked in Doxygen and I have not been able to find a way to access the volFields from a fvPatchField ... all, I have been able to find, return const volField.

If any know how to deal with this, I would be very greatful.

The goal is that everything in connection with the wave generation is lifted out of the solver and into the boundary condition.

Thanks,

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   September 10, 2008, 14:56
Default You might be interested to see
  #49
liu
Senior Member
 
Xiaofeng Liu
Join Date: Mar 2009
Location: State College, PA, USA
Posts: 118
Rep Power: 17
liu is on a distinguished road
You might be interested to see the waveTransmissive (check the spelling) boundary condition. Essentially, from my understanding, you want a non-reflective BC. This has been discussed sometime ago. I don't know if anybody has come up with a better idea.
__________________
Xiaofeng Liu, Ph.D., P.E.,
Assistant Professor
Department of Civil and Environmental Engineering
Penn State University
223B Sackett Building
University Park, PA 16802


Web: http://water.engr.psu.edu/liu/
liu is offline   Reply With Quote

Old   September 10, 2008, 15:22
Default Hi Xiaofeng Thanks for the
  #50
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 Xiaofeng

Thanks for the suggestion, but the thing is somewhat more complex. If I have a steep sloping bottom or surface piercing objects, which take up a lot of the cross section, my incoming waves will be reflected, such as the standing wave test we discussed some time ago. Thus I want to avoid this reflected wave to hit my wave-inlet boundary.

If I have understood waveTransmissive-BC correct, then it allows a wave to move through, but a combination of wave generation and wave transmission on one patch, is that possible?

Thanks,

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   September 10, 2008, 15:27
Default Hi Niels, I implemented you
  #51
Member
 
Kevin Maki
Join Date: Mar 2009
Location: Ann Arbor, MI, USA
Posts: 43
Rep Power: 17
kjmaki is on a distinguished road
Hi Niels,

I implemented your suggestion of a sponge layer into my multiphase solver. I had to modify the solver itself, but I specify the parameters for the beach, namely the strength and starting position, from the same place I specify my wave conditions, in the environmentalProperties dictionary. It was rather painless, and I have been happy with it, though I have not carefully documented its performance.

Thanks for the suggestion at the meeting in Milan!

Kevin
kjmaki is offline   Reply With Quote

Old   September 11, 2008, 04:59
Default Hi Kevin Glad to hear that
  #52
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 Kevin

Glad to hear that you got it working

/ 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   December 17, 2008, 09:43
Default sorry guys, for this maybe ban
  #53
erik023
Guest
 
Posts: n/a
sorry guys, for this maybe banal question but i do not get it:

void surfaceWavePhaseFvPatchScalarField::extrapolateGra dient()
{
// const fvPatchField<vector>& gradGamma =
// lookupPatchField<volvectorfield,>("gradGamma");

const Field<vector>& gradGamma = this->patch().lookupPatchField
(
"gradGamma",
reinterpret_cast<const>(NULL),
reinterpret_cast<const>(NULL)
);

scalar alpha = 0.0;
this->refGrad() = this->refGrad()*alpha +
(1-alpha)*(gradGamma.patchInternalField()
& (patch().Sf()/patch().magSf()));

}

however, i get this error: surfaceWaveVelocity/surfaceWaveVelocityFvPatchVectorField.C:83: error: 'lookupPatchField' was not declared in this scope
surfaceWaveVelocity/surfaceWaveVelocityFvPatchVectorField.C:83: error: expected primary-expression before ',' token
surfaceWaveVelocity/surfaceWaveVelocityFvPatchVectorField.C:83: error: expected initializer before '>' token

what to do you think?

as you see i tried to rewrite this to run on 1.5.
any ideas?
  Reply With Quote

Old   January 27, 2009, 08:19
Default hi friends, I am attempting t
  #54
New Member
 
kalaivani.M
Join Date: Mar 2009
Location: INDIA
Posts: 3
Rep Power: 17
kalaim is on a distinguished road
hi friends,
I am attempting to model a wave tank . i have applied 2 boundary conditions at free surface (kinematic and dynamic ) ... remaining walls are solid wall boundary conditions . i am doing formulations in FDM by writing the code.

still i am confusing to develope the code further .. Can i get any model code like this problem? please any one here ? ....
kalaim is offline   Reply With Quote

Old   January 27, 2009, 08:23
Default hi friends, I am attempting t
  #55
New Member
 
kalaivani.M
Join Date: Mar 2009
Location: INDIA
Posts: 3
Rep Power: 17
kalaim is on a distinguished road
hi friends,
I am attempting to model a wave tank . i have applied 2 boundary conditions at free surface (kinematic and dynamic ) ... remaining walls are solid wall boundary conditions . i am doing formulations in FDM by writing the code.

still i am confusing to develope the code further .. Can i get any model code like this problem? please any one here ? ....
kalaim is offline   Reply With Quote

Old   January 27, 2009, 08:48
Default kalaivani, Don't post the s
  #56
egp
Senior Member
 
egp's Avatar
 
Eric Paterson
Join Date: Mar 2009
Location: Blacksburg, VA
Posts: 197
Blog Entries: 1
Rep Power: 18
egp is on a distinguished road
kalaivani,

Don't post the same question under two threads. You posted it under "Wave Tank" and "Surface Tracking"!

To your question: Explicitly applying KFSBC and DFSBC implies that you want to use a tracking scheme with dynamic mesh, as opposed to a capturing scheme with homogeneous multiphase (such as VOF or level-set). If this is what you want, look at the 1.5-dev version, under applications/solvers/surfaceTracking.

Look for OpenFOAM-1.5-dev out on sourceforge.
egp is offline   Reply With Quote

Old   February 16, 2009, 09:19
Default Please could someone direct me
  #57
New Member
 
Gareth
Join Date: Mar 2009
Posts: 24
Rep Power: 17
gareth__it_power is on a distinguished road
Please could someone direct me to somewhere where I can learn how to apply the boundary conditions posted above? I'm quite new to OF, and haven't really got to grips with how to 'compile' new commands/boundary conditions.

I'm only interested in the inlet for now!

Many thanks

Gareth
gareth__it_power is offline   Reply With Quote

Old   February 26, 2009, 15:06
Default I am also interested in wave t
  #58
New Member
 
Lukas Fischer
Join Date: Mar 2009
Location: Innsbruck, Austria
Posts: 15
Rep Power: 17
lukasfischer is on a distinguished road
I am also interested in wave tank modelling and tried a very basic simulation of an OWC chamber with the compressibleLesInterFoam solver. As the reflected waves strongly interfere with my boundaries I would also be happy to have that sponge layer for a wave maker boundary as Kevin Maki and Niels Gjoel Jacobsen discussed. Is the code available somewhere?
Thanks, Lukas.
lukasfischer is offline   Reply With Quote

Old   February 27, 2009, 04:26
Default Hi FOAMers, I am trying an
  #59
Member
 
Su Xiaohui
Join Date: Mar 2009
Location: Singapore
Posts: 30
Rep Power: 17
sxhdhi is on a distinguished road
Send a message via Skype™ to sxhdhi
Hi FOAMers,

I am trying an open channel flow case by using InterFOAM. but I am failure with bc setup below.

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.5 |
| \ / A nd | Web: http://www.OpenFOAM.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1.0;

vertices
(

(0 0 0) //point0
(20 0 0) //point1
(0 2 0) //point2
(20 2 0) //point3
(0 0 0.1) //point4
(20 0 0.1) //point5
(0 2 0.1) //point6
(20 2 0.1) //point7

);

blocks
(

hex (0 1 3 2 4 5 7 6) (200 20 1) simpleGrading (1 1 1)

);

edges
(
);

patches
(
patch Inlet
(

(0 4 6 2)

)

patch Outlet
(

(1 3 7 5)

)

patch Atmosphere
(

(2 6 7 3)

)
patch Bottom
(

(0 1 5 4)

)
);

mergePatchPairs
(
);

// ************************************************** *********************** //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.5 |
| \ / A nd | Web: http://www.OpenFOAM.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0.1 0 0);

boundaryField
{
Inlet
{
type fixedValue;
value uniform (0.1 0 0);
}
Outlet
{
type zeroGradient;
}
Atmosphere
{
type pressureInletOutletVelocity;
phi phi;
value uniform (0.1 0 0);
}
Bottom
{
type fixedValue;
value uniform (0.1 0 0);
}
defaultFaces
{
type empty;
}
}


// ************************************************** *********************** //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.5 |
| \ / A nd | Web: http://www.OpenFOAM.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object gamma;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField nonuniform List<scalar>
4000
(
1
etcetc
);

boundaryField
{
Inlet
{
type zeroGradient;
}
Outlet
{
type fixedValue;
value nonuniform List<scalar>
20
(
1
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
);
}
Atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
Bottom
{
type zeroGradient;
}
defaultFaces
{
type empty;
}
}

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.5 |
| \ / A nd | Web: http://www.OpenFOAM.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object pd;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
Inlet
{
type fixedValue;
value uniform 0;
}

Outlet
{
type fixedValue;
value uniform 0;
}
Atmosphere
{
type totalPressure;
U U;
phi phi;
rho none;
psi none;
gamma 1;
p0 uniform 0;
value uniform 0;
}
Bottom
{
type zeroGradient;
}
defaultFaces
{
type empty;
}
}


// ************************************************** *********************** //

error information is
MULES: Solving for gamma
Liquid phase volume fraction = 0.493981 Min(gamma) = -0.00197787 Max(gamma) = 1
MULES: Solving for gamma
Liquid phase volume fraction = 0.493981 Min(gamma) = -0.00181447 Max(gamma) = 1
DICPCG: Solving for pd, Initial residual = 0.951035, Final residual = 0.0368047, No Iterations 11
DICPCG: Solving for pd, Initial residual = 0.277992, Final residual = 0.00971876, No Iterations 11
DICPCG: Solving for pd, Initial residual = 0.624551, Final residual = 9.92305e-08, No Iterations 51
time step continuity errors : sum local = 1.31837e-09, global = -2.23413e-10, cumulative = 4.58463e-05
ExecutionTime = 5.11 s ClockTime = 11 s

Courant Number mean: 0.00402776 max: 11.3122
#0 Foam::error::printStack(Foam:stream&) in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xb7ff5400]
#3 Foam::Time::adjustDeltaT() in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#4 Foam::Time::setDeltaT(double) in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#5 main in "/home/user/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/interFoam"
#6 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#7 _start in "/home/user/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/interFoam"
Floating point exception

it would be appreciated if anyone can give suggestion, thanks in advance

Su Xiaohui
sxhdhi is offline   Reply With Quote

Old   February 27, 2009, 05:35
Default Lucas, Su, Have you managed
  #60
New Member
 
Gareth
Join Date: Mar 2009
Posts: 24
Rep Power: 17
gareth__it_power is on a distinguished road
Lucas, Su,

Have you managed to get wave input, or are you using constant velocity input?
gareth__it_power is offline   Reply With Quote

Reply

Tags
wavetank


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
Help! Compiled UDF problem 4 Wave tank tutorial Shane FLUENT 1 September 3, 2010 03:32
Numerical wave tank michaelp OpenFOAM Installation 1 December 17, 2008 09:27
Numerical wave tank Bridget FLUENT 0 March 27, 2006 17:09
Sea Waves/Wave tank Phil FLUENT 3 October 9, 2003 07:55
Virtual wave tank Murali.K Main CFD Forum 1 March 17, 1999 03:18


All times are GMT -4. The time now is 18:59.