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

generate Waves in openfoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 18, 2009, 06:07
Default generate Waves in openfoam
  #1
Disabled
 
Join Date: Jul 2009
Posts: 63
Rep Power: 17
anon_c is on a distinguished road
hello!

i am very very new in the field of numerical simulation spcialy in CFD and even in OpenFoam, but i wanne thank all people how make it possible that an opensurce projeckt get such a powerful like comercial CFDṕrogrammes


now: i studied matherialtheorie, and i worked allways only anayltical and know there is something i have to check numerical:

i would like to use the VOF mithod ( discriped in decoumentation: 2.3 Breaking of dam)

but i wanne do it like this

water is only 5m high on the bottom and the domain is (200m lengh x 50m high) and i wane generate a wave with a moving piston (v=v(t), v is the speed of the moving wall i.e. piston) that is even 50m high on the left wall

that means the left wall is a moving wall (the pisto) in the x-direction (in the lengh direction) to generate the wave


is that posible with openfoam?? i reallyyy dont have an idee to make that moving wall (i.e. piston)

the geometrie and the 2phases are allready done (and i even do the RASproperties to get the kepsilon standard modell)


plz i would like to get your help, but i am really new in openfoam and i dont understand alout of the things that have been wirten in this fourm


thank you
anon_c is offline   Reply With Quote

Old   July 18, 2009, 07:54
Default
  #2
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 620
Blog Entries: 6
Rep Power: 24
elvis will become famous soon enough
Dear Amar,

read the articles http://www.openfoamworkshop.org/2009/4th_Workshop/
from Ship hydrodynamics and Fluid-structure interaction
further take a look at http://openfoamwiki.net/index.php/Co...yBC#User-Cases =>groovyWaveTank
and take a look at http://openfoamwiki.net/index.php/Si..._Hydrodynamics

i don't understand exactly if you want to use piston and moving wall to generate the BoundaryConditions to generate the waves (that is not necessary and needs more computation power) or do you want to dimension via FSI your WaveTank

google for wave tank site:www.cfd-online.com wave tank
http://www.cfd-online.com/Forums/ope...ace-141-a.html
elvis is offline   Reply With Quote

Old   July 18, 2009, 10:24
Default
  #3
Disabled
 
Join Date: Jul 2009
Posts: 63
Rep Power: 17
anon_c is on a distinguished road
thank you for helping



i wanne that the moving wall going to be the piston



i mean like this


I___________________I
I>__________________I
I___________________I

__I_________________I
_>I_________________I
__I_________________I


i would read the pages and if there is a problem i would wirte here again

thank you very much
anon_c is offline   Reply With Quote

Old   July 18, 2009, 11:07
Default
  #4
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 620
Blog Entries: 6
Rep Power: 24
elvis will become famous soon enough
http://www.openfoamworkshop.org/2009...son_slides.pdf
page 19/35 - 24/35 are very good for starting
elvis is offline   Reply With Quote

Old   July 18, 2009, 11:16
Default
  #5
Disabled
 
Join Date: Jul 2009
Posts: 63
Rep Power: 17
anon_c is on a distinguished road
hi elvis



that is not what i need (they are generating waves really )

i wanne check the breaking of a wave front on a wall that moves! i calculate this analytical and i have allrady simulate it in fluent by help from my freand how is a fluent expert (bcz that is not my working doman)

i only need to do a wall that moves in openfoam and could be solved by interFoam ??
and the inlet condition is water that is about 5m high in a square doman that is not moving (inlet) then by t=0s the wall (piston) on the left side moves and in theorie it could be break the wave even on the wall if the wall get a high speed
anon_c is offline   Reply With Quote

Old   July 18, 2009, 12:35
Default
  #6
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 620
Blog Entries: 6
Rep Power: 24
elvis will become famous soon enough
hi ammar,

take a look at something that has a *dyn*foam in it's name, because there are solvers there dynamics are included.

So your purpose is to break a wave "actively" by a moving wall driven by a piston against a wave?

=>with the dynamic mesh stuff you have 6 degree of freedom but i never used that stuff.

sorry that i thought you wanted a just a wave tank

elvis
elvis is offline   Reply With Quote

Old   July 18, 2009, 12:48
Default
  #7
Disabled
 
Join Date: Jul 2009
Posts: 63
Rep Power: 17
anon_c is on a distinguished road
hi

no no problem i just have to thankyou


yeh, i wirte for one year my diplom theyses on this problem and know i am a phd student and i wanne wirte a paper so my prof. told me if it is posible to simulate this to get a valdation

so i wanne look how fast the wall could be without breaking the wave ahead the wall the analytical solution was very hard, and the simulation with fluent was ok but it was slow and i can only calculate on one or tow prozessors that is why i am traing to do this with openfoam

yes the piston is the moving wall

ok i would lock after that

thank you i would wirte later
anon_c is offline   Reply With Quote

Old   July 18, 2009, 12:59
Default
  #8
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 620
Blog Entries: 6
Rep Power: 24
elvis will become famous soon enough
so it is more or less
http://www.dhcae-tools.de/images/Cas...penfoam_de.ppt (take a look at the last slides)
with a moving wall
elvis is offline   Reply With Quote

Old   July 18, 2009, 13:10
Default
  #9
Disabled
 
Join Date: Jul 2009
Posts: 63
Rep Power: 17
anon_c is on a distinguished road
you speek german? sprichst du deutsch
anon_c is offline   Reply With Quote

Old   July 18, 2009, 13:57
Default
  #10
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 620
Blog Entries: 6
Rep Power: 24
elvis will become famous soon enough
Yes that's my motherlanguage
elvis is offline   Reply With Quote

Old   July 18, 2009, 14:03
Default
  #11
Disabled
 
Join Date: Jul 2009
Posts: 63
Rep Power: 17
anon_c is on a distinguished road
ja meine fast auch ich bin seit 13 jahre in deutschland

arbeitest du auch in cfd bereich mit openfoam?? promovierst du auch ?? wenn du vieleicht interesse und spass hast dan können wir über icq oder msn reden und arbeiten
anon_c is offline   Reply With Quote

Old   July 18, 2009, 18:01
Default
  #12
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 620
Blog Entries: 6
Rep Power: 24
elvis will become famous soon enough
I did only easy cfd calculations in the polymer sector using OF, right now i'm in automotive sector doing non cfd stuff in a R&D department. But i'm very interessed what's going on in CFD and especially OF.

If you live in germany take the opportuny to visit a OpenFOAM-Stammtisch there are several over the country so it does not take to much effort to meet other people. which part of germany do you live?
elvis is offline   Reply With Quote

Old   July 18, 2009, 18:09
Default
  #13
Disabled
 
Join Date: Jul 2009
Posts: 63
Rep Power: 17
anon_c is on a distinguished road
hessen north i would like to do more, but i am not on numerics or simulations interested i am doning only materialtheorie, and once a year i do some calculations i am training now some thing if it work i would post it here

thank you
anon_c is offline   Reply With Quote

Old   July 20, 2009, 06:02
Default
  #14
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 Ammar

I would recommend that you look at the tutorials for movingCone in icoDymFoam and combine it with interDymFOAM. As I understand it, all you need is a moving wall of constant velocity, hence it should be fairly simple to combine the two tutorials into what you need.
A note of caution! When using interDymFoam together with moving mesh, then the number of gamma evaluations per timestep needs to be 1.

Good luck,

Niels
ngj is offline   Reply With Quote

Old   August 4, 2009, 14:30
Default
  #15
Disabled
 
Join Date: Jul 2009
Posts: 63
Rep Power: 17
anon_c is on a distinguished road
hello!

yeh that is the best

to compine the movinCone with the interDy...

but it is even beter to compine the movingConeTopo with the VOF solver interDy

but the problem ist i dont need only a constant velocity of the moving wall i need also a linear time dependent velocity of the wall

and i wanne do it like this

if (CURRENT_TIME<=1)
velocity of moving wall is v=v(t)
else
v=0
anon_c is offline   Reply With Quote

Old   August 13, 2009, 06:56
Default
  #16
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
You might want to take a look here:

OpenFOAM/OpenFOAM-1.5.x/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement

Best regards,

Niels
ngj is offline   Reply With Quote

Old   September 12, 2009, 10:38
Default
  #17
Member
 
Gautami Erukulla
Join Date: Mar 2009
Posts: 71
Rep Power: 17
gautami is on a distinguished road
Hello,

I am using OpenFOAM-1.5 on Suse linux 10.3

I am trying to model a wave tank as in the groovyBC wave tank case using interDyMFoam.I am trying to create the waves by moving the inlet of the wave tank with the wave velocity equations.

Can I do something like that?


I am doing the following

My dynamicDict file in the constant folder is as follows:

dynamicFvMesh dynamicMotionSolverFvMesh;
twoDMotion yes;
motionSolverLibs ("libfvMotionSolvers.so");
solver velocityLaplacian;
diffusivity uniform;
frozenDiffusion off;

The U,pd gamma in 0 folder are the same as groovyBC wave tank case,except I changed inlet as movingWall.
I want to move the inlet of the wave tank with the velocities as in groovyBC wave case.

The pointMotionU in 0 folder is as follows:


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!pointMotionU!!!!!! !!!!!!!!!!!
FoamFile
{
version 2.0;
format ascii;
class pointVectorField;
object pointMotionU;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform (0 0 0);

boundaryField
{
movingWall
{
type groovyBC;
refValue uniform (0 0 0);
refGradient uniform (0 0 0);
valueFraction uniform 1;
value uniform (0 0 0);
valueExpression "(pos().z<=A*cos(-w*time())+0.5*k*A*A*cos(2*(-w*time()))) ? vector( A*w*exp(k*pos().z)*cos(-w*time()), 0, A*w*exp(k*pos().z)*sin(-w*time())) : vector(0,0,0)";
gradientExpression "vector(0,0,0)";
fractionExpression "1";
variables "l=5;A=0.1;g=vector(0,0,-9.81);k=2*pi/l;w=sqrt(k*mag(g));";
timelines (
);
}
outlet
{
type zeroGradient;
}
bottom
{
type slip;
}
atmosphere
{

type pressureInletOutletVelocity;
phi phi;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!


After executing the command interDyMFoam,I get the following error..

Create time

Create mesh for time = 0

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: velocityLaplacian


Not Implemented
Trying to construct an genericFvPatchField on patch atmosphere of field cellMotionU#0 Foam::error:rintStack(Foam::Ostream&) in "/home/gali/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/gali/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Foam::genericFvPatchField<Foam::Vector<double> >::genericFvPatchField(Foam::fvPatch const&, Foam:imensionedField<Foam::Vector<double>, Foam::volMesh> const&) in "/home/gali/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libfiniteVolume.so"
#3 Foam::fvPatchField<Foam::Vector<double> >::addpatchConstructorToTable<Foam::genericFvPat ch Field<Foam::Vector<double> > >::New(Foam::fvPatch const&, Foam:imensionedField<Foam::Vector<double>, Foam::volMesh> const&) in "/home/gali/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libfiniteVolume.so"
#4 Foam::fvPatchField<Foam::Vector<double> >::New(Foam::word const&, Foam::fvPatch const&, Foam:imensionedField<Foam::Vector<double>, "/home/gali/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/interDyMFoam"
#14 __libc_start_main in "/lib/libc.so.6"
#15 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/gali/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/interDyMFoam"


From function genericFvPatchField<Type>::genericFvPatchField(con st fvPatch& p, const DimensionedField<Type, volMesh>& iF)
in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 45.

FOAM aborting

Aborted
gali@SAI:~/OpenFOAM/gali-1.5/run/tutorials/interDyMFoam/growavmovinsb>

Can someone please suggest as to what I can do.

Thank You,
Gautami.
gautami is offline   Reply With Quote

Old   September 15, 2009, 10:39
Default
  #18
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by gautami View Post
Can I do something like that?
Yep. There is an example with a moving mesh in the example-folder that comes with groovyBC. Nevertheless you'll have to be very careful with the boundary conditions for the flow at the moving inlet

Quote:
Originally Posted by gautami View Post

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!pointMotionU!!!!!! !!!!!!!!!!!
FoamFile
{
version 2.0;
format ascii;
class pointVectorField;
object pointMotionU;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform (0 0 0);

boundaryField
{
movingWall
{
type groovyBC;
refValue uniform (0 0 0);
refGradient uniform (0 0 0);
valueFraction uniform 1;
value uniform (0 0 0);
valueExpression "(pos().z<=A*cos(-w*time())+0.5*k*A*A*cos(2*(-w*time()))) ? vector( A*w*exp(k*pos().z)*cos(-w*time()), 0, A*w*exp(k*pos().z)*sin(-w*time())) : vector(0,0,0)";
gradientExpression "vector(0,0,0)";
fractionExpression "1";
variables "l=5;A=0.1;g=vector(0,0,-9.81);k=2*pi/l;w=sqrt(k*mag(g));";
timelines (
);
}
outlet
{
type zeroGradient;
}
bottom
{
type slip;
}
atmosphere
{

type pressureInletOutletVelocity;
phi phi;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!


After executing the command interDyMFoam,I get the following error..


Not Implemented
Trying to construct an genericFvPatchField on patch atmosphere of field cellMotionU#0 Foam::error:rintStack(Foam::Ostream&) in "/home/gali/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
That is not a problem with groovyBC. What OF is trying to tell you (granted, it has a funny way of saying this) is: "On the boundary atmosphere you are specifying a type that I don't know FOR THAT FIELD". In other words pressureInletOutletVelocity is not defined for pointVectorFields. And what sense would it make for a mesh-motion anyway?

Bernhard

BTW: please don't duplicate public questions by sending me a "Private Message". I only answer public questions ... if I have time. So it doesn't speed things up
gschaider is offline   Reply With Quote

Old   September 15, 2009, 18:41
Default
  #19
Member
 
Gautami Erukulla
Join Date: Mar 2009
Posts: 71
Rep Power: 17
gautami is on a distinguished road
Hello Mr Gschaider,

Thank you very much for your reply.I am really sorry for that private message.

I have changed the atmosphere type as follows in the pointMotionU dictionary

atmosphere
{

type fixedValue;
value uniform (0 0 0);
}

but now I get this error.

A point-field was wanted but we got a face
#0 Foam::error:rintStack(Foam::Ostream&) in "/home/gali/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/gali/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Foam::tmp<Foam::Field<Foam::Vector<double> > > Foam::PatchValueExpressionDriver::getResult<Foam:: Vector<double> >(bool) in "/home/gali/OpenFOAM/gali-1.5/lib/linuxGccDPOpt/libgroovyBC.so"
#3 Foam::groovyBCPointPatchField<Foam::Vector<double> >::updateCoeffs() in "/home/gali/OpenFOAM/gali-1.5/lib/linuxGccDPOpt/libgroovyBC.so"
#4 Foam::velocityLaplacianFvMotionSolver::solve() in "/home/gali/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libfvMotionSolvers.so"
#5 Foam::motionSolver::newPoints() in "/home/gali/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libdynamicMesh.so"
#6 Foam::dynamicMotionSolverFvMesh::update() in "/home/gali/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libdynamicFvMesh.so"
#7 main in "/home/gali/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/interDyMFoam"
#8 __libc_start_main in "/lib/libc.so.6"
#9 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/gali/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/interDyMFoam"


From function PatchValueExpressionDriver::getResult(bool qPoint)
in file PatchValueExpressionDriverI.H at line 73.

FOAM aborting


any advice will be very helpful.

Can someone please suggest some documentation or references for understanding the dynamic mesh motion.

Thank you,
Gautami.
gautami is offline   Reply With Quote

Old   September 16, 2009, 05:46
Default
  #20
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by gautami View Post
but now I get this error.

A point-field was wanted but we got a face
The "problem" is that by default the values groovy calculates are defined on the patch-faces. The pointMotionU is defined on the points. The easiest fix is to use "toPoints" to interpolate the face-values to point-values. But you should try to "go to" point values as early as possible to avoid interpolation artifacts.Have (for instance) a look at the distortedCone-example that comes with groovyBC

Bernhard
gschaider is offline   Reply With Quote

Reply

Tags
generate wave


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
Can OpenFoam deal with pressure waves in pipe? coompressor OpenFOAM Running, Solving & CFD 4 September 27, 2016 17:36
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 06:56
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07
OpenFOAM Debian packaging current status problems and TODOs oseen OpenFOAM Installation 9 August 26, 2007 14:50


All times are GMT -4. The time now is 17:41.