generate Waves in openfoam
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 :) |
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 |
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 |
http://www.openfoamworkshop.org/2009...son_slides.pdf
page 19/35 - 24/35 are very good for starting |
hi elvis
that is not what i need (they are generating waves really :D ) 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 |
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 |
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 |
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 |
you speek german? sprichst du deutsch :)
|
Yes that's my motherlanguage
|
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 :) |
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? |
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 |
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 |
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 |
You might want to take a look here:
OpenFOAM/OpenFOAM-1.5.x/src/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement Best regards, Niels |
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::printStack(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::DimensionedField<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::DimensionedField<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::DimensionedField<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. http://www.cfd-online.com/Forums/ima...ser_online.gif http://www.cfd-online.com/Forums/ima...ns/forward.gif |
Quote:
Quote:
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 |
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::printStack(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. |
Quote:
Bernhard |
Hello Mr Gschaider,
Thank you. I think I will first try to understand and work with the distorted Cone example, and then I will implement it for the wave tank. In your reply you said “But you should try to "go to" point values as early as possible to avoid interpolation artifacts”. I am sorry I did not understand this sentence. If you don’t mind can you please explain. Thank you, Gautami. |
Quote:
|
Hello,
thank you for the topic, it was really useful for my work on waves. Maybe it was said before and I didn't see it, but using movingCone AND interDymFoam, but not groovyBC, I don't manage to modify the movingWall velocity. Is there a way to modify it directly with the solver? I cannot find the name of the object pointMotionU in interDymFoam, so I cannot modify it. Anyone can help me please? I just miss this variable name. Thanks a lot, Regards, Julien |
Hello Mr Gschaider,
At last I could model a wave tank with a piston type wave maker in InterDyMFoam using groovyBC. Thank you very much for your guidance and prompt replies. Thankyou, Gautami. |
Hi Niels:
I'm really want to know what do you mean by "the number of gamma evaluations per timestep needs to be 1" and how to set for this? Thank you! |
Can any one tel me how can i generate wave in OpenFoam?
Hello,
I read all threads but still not understand how to generate waves in OpenFoam and links given in this thread is not working so can anyone please provide me. Can i generate waves in shallowwater Foam? if yes then please let me know Thanks in advance Regards, Premal Sheth Senior research Fellow |
waves with groovyBC
I managed to simulate nice waves using the following boundary conditions together with a solver that takes into account buoyancy:
file pointmotionU: outlet { type groovyBC; value uniform (0 0 0); valueExpression "toPoint((U&normal())/(normal()&vector(0,0,1))*vector(0,0,1))"; } file U: outlet { type pressureInletOutletVelocity; value uniform (0 0 0); } file p_rgh: outlet { type prghPressure; p uniform 0; } I have obtained nice waves, but the solver required very small time steps. The problem seems to be in the fact that the mesh is changed explicitly between time steps. |
Hi all,
I'm doing a similar project with the thread starter, on breaking waves. I'm trying to use the 'focussed waves method' to generate a breaking waves. I did managed to generate a breaking wave in real life experiment, however when I tried to duplicate it in OpenFOAM, I found out that when I tried using combinedWaves with a varying phase to generate breaking wave, I encountered some problems with the phasing as OpenFOAM would reduce all phase shift to < 2pi. Hence i'm trying to input TSoft and phase shift for all my wave components to achieve the desired breaking waves, --------------- I would also love to use the (displacement vs time history) of the piston strokes to produce the same results as I got for my breaking wave experimental work, However my displacement vs time history of the piston is very irregular (since it involves as much as 28 waves components), any idea how I advance from here? Any inputs appreciated! Thanks, Chia |
Hi Chia,
no idea about the combinedWaves issue, but for generating a wave focussing (or any other waves) with time series from a piston wavemaker check olaFoam: https://www.youtube.com/watch?v=WF9zKCgsx5w https://github.com/phicau/OLAFOAM Best, Pablo |
Good morning Chia,
The generation of focussed waves can be done with the irregular wave type, where you should choose focusing rather than random wave phases: https://openfoamwiki.net/index.php/C...hasing_Methods You can also use OceanWave3D to use your steering signal and couple with waves2Foam with the dedicated method. OceanWave3D has much better propagation properties, because of better discretization. There is a tutorial in waves2Foam on the coupling of these models. Kind regards Niels |
Thanks all for the reply,
Hi Niels, I'm actually using the focussing of multiple regular waves for achieving a focussed wave. The chosen wave frequencies are arbitrary, I'm not using any specific spectrum. (had done experimental work using focussed regular waves packages) Guess i'll look directly at the Oceanwaves3D for inputing the piston signals, thanks again! Chia |
All times are GMT -4. The time now is 16:18. |