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

Wave tutorial

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 6, 2018, 19:25
Exclamation Wave tutorial
  #1
New Member
 
Jeferson Souza
Join Date: Jan 2012
Location: Brazil
Posts: 19
Rep Power: 14
jasouza1974 is on a distinguished road
Dear all,

I'm trying to understand how to set wave parameters in the new openFoam 5.0 wave tutorial.

Basically, I do not understand what is the speed parameter. Is it the wave velocity? Description talk about "mean flow speed", but I don't know what it means?

For example for a wave with the following parameters

wave length = 65.4 m
period = 7.5 s
height = 1 m

how can I set up the waveVelocity boundary condition?

left
{
type waveVelocity;
origin (0 0 0);
direction (1 0 0);
speed ????? (what should I put here?);
waves
(
Airy
{
length 65.4;
amplitude 0.5;
phase 0;
angle 0;
}
);
scale constant 1;
crossScale constant 1;
}

Thanks,
jasouza1974 is offline   Reply With Quote

Old   June 7, 2018, 14:37
Default
  #2
Senior Member
 
JNSN's Avatar
 
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 137
Rep Power: 19
JNSN is on a distinguished road
Speed is an additional current, I.e. if you solve a ship sailing in waves with forward speed. In case you only want to have a wave without current, set speed to zero
aow likes this.
JNSN is offline   Reply With Quote

Old   June 12, 2018, 10:30
Default
  #3
New Member
 
Jeferson Souza
Join Date: Jan 2012
Location: Brazil
Posts: 19
Rep Power: 14
jasouza1974 is on a distinguished road
Thanks a lot.
jasouza1974 is offline   Reply With Quote

Old   September 25, 2018, 22:54
Default
  #4
New Member
 
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 7
insane is on a distinguished road
Hi, Jeferson
I'm trying to understand the parameters of waveVelocity recently, but a few parameters confused me a lot
1) scale table ((1200 1) (1800 0));
2) scale and crossScale(I have never seen before)
3) note that speed does not mean wave velocity how to set it
any advice would be great appreciated
thanks in advance
insane is offline   Reply With Quote

Old   October 7, 2019, 04:26
Default
  #5
Member
 
Rasmus Iwersen
Join Date: Jan 2019
Location: Denmark
Posts: 81
Rep Power: 8
Rasmusiwersen is on a distinguished road
Quote:
Originally Posted by jasouza1974 View Post
Dear all,

I'm trying to understand how to set wave parameters in the new openFoam 5.0 wave tutorial.

Basically, I do not understand what is the speed parameter. Is it the wave velocity? Description talk about "mean flow speed", but I don't know what it means?

For example for a wave with the following parameters

wave length = 65.4 m
period = 7.5 s
where is the period specified?? I can see where wave length and the amplitude. However, the period doesn't seem to be specified anywhere.
Rasmusiwersen is offline   Reply With Quote

Old   April 6, 2020, 18:14
Default
  #6
New Member
 
Thepsy20
Join Date: Apr 2020
Posts: 5
Rep Power: 6
Thepsy is on a distinguished road
did you find an answer to define the period ?
Thepsy is offline   Reply With Quote

Old   April 6, 2020, 20:46
Default
  #7
New Member
 
Jeferson Souza
Join Date: Jan 2012
Location: Brazil
Posts: 19
Rep Power: 14
jasouza1974 is on a distinguished road
Actually, period can be obtained from the Dispersion Relationship. For a linear wave we have
sig^2 = g k tanh(k h)
sig = 2 Pi/T

k = 2 Pi/L
g -> gravity
L -> wave length
T -> wave period
jasouza1974 is offline   Reply With Quote

Old   May 24, 2020, 06:27
Default
  #8
New Member
 
chenlinghao
Join Date: Apr 2020
Posts: 1
Rep Power: 0
RiderCharles is on a distinguished road
Quote:
Originally Posted by insane View Post
Hi, Jeferson
I'm trying to understand the parameters of waveVelocity recently, but a few parameters confused me a lot
1) scale table ((1200 1) (1800 0));
2) scale and crossScale(I have never seen before)
3) note that speed does not mean wave velocity how to set it
any advice would be great appreciated
thanks in advance
Hi,
I also encountered this problem.
Do you already know something about these parameters?
thanks for your sharing in advance。
RiderCharles is offline   Reply With Quote

Old   October 23, 2020, 10:34
Default
  #9
New Member
 
Join Date: Jul 2011
Posts: 14
Rep Power: 14
nasa55 is on a distinguished road
Quote:
Originally Posted by RiderCharles View Post
Hi,
I also encountered this problem.
Do you already know something about these parameters?
thanks for your sharing in advance。

scale table means between 1200m and 1800m (in x direction) the wave should be damped. In other owrds, up to 1200, the wave has scale factor 1 and at 1800, the scale factor is 0 (no wave).
nasa55 is offline   Reply With Quote

Old   February 28, 2022, 11:36
Default
  #10
Member
 
Tony Zhang
Join Date: Nov 2019
Location: soton
Posts: 45
Rep Power: 6
zyfsoton is on a distinguished road
Quote:
Originally Posted by nasa55 View Post
scale table means between 1200m and 1800m (in x direction) the wave should be damped. In other owrds, up to 1200, the wave has scale factor 1 and at 1800, the scale factor is 0 (no wave).
Hi, I am wondering if it is possible to set waves from one side of the domain e.g from the inlet boundary?

Currently, I am simulating the KCS model in calm water and waves using OpenFOAM v7.

Many thanks
Tony
zyfsoton is offline   Reply With Quote

Old   February 28, 2022, 12:21
Default
  #11
New Member
 
Jeferson Souza
Join Date: Jan 2012
Location: Brazil
Posts: 19
Rep Power: 14
jasouza1974 is on a distinguished road
Hi, yes.


You can do it easily. I prefer to use the olaFlow (https://olaflow.github.io/) instead of interFoam.



olaFlow is kind of optimized to this kind of problems. Its compilation is also straight forward.
jasouza1974 is offline   Reply With Quote

Old   February 28, 2022, 13:26
Default
  #12
New Member
 
Join Date: Jul 2011
Posts: 14
Rep Power: 14
nasa55 is on a distinguished road
Quote:
Originally Posted by zyfsoton View Post
Hi, I am wondering if it is possible to set waves from one side of the domain e.g from the inlet boundary?

Currently, I am simulating the KCS model in calm water and waves using OpenFOAM v7.

Many thanks
Tony
You can use funky SetField to define the boundary at the inlet.
nasa55 is offline   Reply With Quote

Old   March 1, 2022, 06:53
Default
  #13
Member
 
Tony Zhang
Join Date: Nov 2019
Location: soton
Posts: 45
Rep Power: 6
zyfsoton is on a distinguished road
Quote:
Originally Posted by jasouza1974 View Post
Hi, yes.


You can do it easily. I prefer to use the olaFlow (https://olaflow.github.io/) instead of interFoam.



olaFlow is kind of optimized to this kind of problems. Its compilation is also straight forward.
Hi Jeferson,

Many thanks for your reply. But I think I have to use interFoam because I have modified the solver based on interFoam. I have successfully run the KCS in calm water and Stokes2 wave. Now I am hoping to simulate the KCS in waves and use the final state of calm water as the initial state of wave condition. For example, I ran the calm water case for 50s and take the 50s state as the initial state of stokes2 wave condition, but it seems didn't add wave on from 50s. I attached some pictures of wave elevation contours for wave condition.

Since in calm water just use setFields while in wave condition have to use setWave, I think I have changed all controlDict file and waveProperities file. But it seems wave is not added on from 50s.

And I am confused about the scale table ((4 1) (12 0)) located in waveProperties, I am hoping to let wave just pass through the hull from the right handside of my domain, how should I do? Please let me know if you need more information from me.

Many thanks
Tony
Attached Images
File Type: png Screenshot from 2022-02-27 18-05-38.png (142.5 KB, 56 views)
File Type: png Screenshot from 2022-02-27 18-09-20.png (124.4 KB, 39 views)
File Type: png Screenshot from 2022-02-27 18-09-55.png (120.8 KB, 41 views)
zyfsoton is offline   Reply With Quote

Old   March 1, 2022, 06:55
Default
  #14
Member
 
Tony Zhang
Join Date: Nov 2019
Location: soton
Posts: 45
Rep Power: 6
zyfsoton is on a distinguished road
Quote:
Originally Posted by nasa55 View Post
You can use funky SetField to define the boundary at the inlet.
Hi, many thanks for your reply. I use setFields for my hull in calm water and then change to setWaves in wave conditons. Do you have any tutorial or case to use think funky setField to define the boundary at the inlet?

Many thanks
Tony
zyfsoton is offline   Reply With Quote

Old   March 1, 2022, 09:38
Default
  #15
New Member
 
Jeferson Souza
Join Date: Jan 2012
Location: Brazil
Posts: 19
Rep Power: 14
jasouza1974 is on a distinguished road
I've never been able to validate the solution (comparing to the analytical wave solution) of the wave tutorial. That's why I recommended the olaFlow.


About the restart. Did you change the boundary conditions at the 50s folder?
jasouza1974 is offline   Reply With Quote

Old   March 1, 2022, 09:51
Default
  #16
Member
 
Tony Zhang
Join Date: Nov 2019
Location: soton
Posts: 45
Rep Power: 6
zyfsoton is on a distinguished road
Quote:
Originally Posted by jasouza1974 View Post
I've never been able to validate the solution (comparing to the analytical wave solution) of the wave tutorial. That's why I recommended the olaFlow.


About the restart. Did you change the boundary conditions at the 50s folder?
Hi,

Yes, the 50s folder contains the information of alpha_water, U, p_rgh and etc of the final state of calm water. Also, I copied these variables of initial state of wave condition(alpha_water.orig, U.orig, p_rgj.orig and etc) into 50s folder. Then I do renumberMesh, setWaves, decomposePar and then interFoam. But it doesn't add wave on.
zyfsoton is offline   Reply With Quote

Old   March 1, 2022, 10:25
Default
  #17
New Member
 
Jeferson Souza
Join Date: Jan 2012
Location: Brazil
Posts: 19
Rep Power: 14
jasouza1974 is on a distinguished road
It's a long time that I did not run this kind of problem, but i think you should not run setWaves again.


Another thing, did you decomposed the right time? -> "decomposePar -latestTime"
jasouza1974 is offline   Reply With Quote

Old   March 1, 2022, 12:03
Default
  #18
Member
 
Tony Zhang
Join Date: Nov 2019
Location: soton
Posts: 45
Rep Power: 6
zyfsoton is on a distinguished road
Quote:
Originally Posted by jasouza1974 View Post
It's a long time that I did not run this kind of problem, but i think you should not run setWaves again.


Another thing, did you decomposed the right time? -> "decomposePar -latestTime"
Many thanks, I will give it a try and keep you updated!
zyfsoton is offline   Reply With Quote

Old   April 22, 2022, 09:20
Default
  #19
Member
 
Tony Zhang
Join Date: Nov 2019
Location: soton
Posts: 45
Rep Power: 6
zyfsoton is on a distinguished road
Quote:
Originally Posted by JNSN View Post
Speed is an additional current, I.e. if you solve a ship sailing in waves with forward speed. In case you only want to have a wave without current, set speed to zero
Hi Jan,

nowadays I am simulating a ship in wave with forward speed. I am using openfoamv7 and the calculation conditions are as follows:

ship speed=1.588m/s, wave speed=2.602m/s, I modified the waveProperties file which is located at constant file as follows:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      waveProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

origin          (0 0 0);

direction       (-1 0 0);

speed           1.588; 

waves
(
    Stokes2
    {
        length      4.338;
        amplitude   0.038;
        phase       0;
        angle       0;
    }
);

UxMean          -2.602;

UMean           ($UxMean 0 0);

scale           table ((10 1) (20 0));


// ************************************************************************* //
But I am not sure whether this setup is right or not? Please correct me if I am wrong.

Many thanks for your help and best regards,
Tony
zyfsoton is offline   Reply With Quote

Old   April 22, 2022, 12:35
Default
  #20
Senior Member
 
JNSN's Avatar
 
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 137
Rep Power: 19
JNSN is on a distinguished road
Hi Tony, what do you mean with wave velocity?
JNSN is offline   Reply With Quote

Reply

Tags
openfoam 5.0, speed, wave boundary conditions


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
need tutorial files(Simulation of Wave Generation in a Tank) gholamghar FLUENT 45 May 6, 2018 10:57
[Virtualization] OpenFOAM oriented tutorial on using VMware Player - support thread wyldckat OpenFOAM Installation 2 July 11, 2012 16:01
How to generate waves of particular wave height...please help nims FLUENT 0 September 21, 2010 02:48
Scaling up a wave energy converter - free surface flow mark_l CFX 3 February 17, 2010 16:57
need tutorial files(Simulation of Wave Generation in a Tank) gholamghar FLUENT 0 March 28, 2009 03:08


All times are GMT -4. The time now is 11:00.