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

[IHFOAM] The IHFOAM Thread

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

Like Tree33Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2020, 10:59
Default
  #321
New Member
 
saeed barzegar
Join Date: Feb 2012
Posts: 12
Rep Power: 10
saeed.barzegar.v is on a distinguished road
Hi Jente,

Quote:
Originally Posted by Jekke123456789 View Post
Hi IHFOAM,

I am modelling a wave flume with a berm, I would like to do is in three steps.
1. Current only
2. Waves only
3. Combined waves and current
The basics are a rectangular blockmesh, with a stl file adde of a berm with the use of SnapyHexMesh. I have some problems in these steps, is it possible to help me?

For the first step, I had a similar case (a sea current in a domain) but for a three-phase flow problem (current passing the domain interacting with gas injection at the bottom of the sea (look at attached fig1)). The problem you are having is probably because of the boundary conditions you are using. I've attached mine and you can give it a shot.


For the step two and irregular waves, you need to provide all information (H, T, phase, and direction) of all wave components in your irregular wave. You have more control over your inputs in this way comparing to using the JONSWAP shortcut and providing just Hm0 and Tp (specially the input for phase difference is important when you want to do some validation studies). You can write a small code and create those components.


For the step three, I didn't have time to do this by myself and I am still waiting for IHFOAM/OpenFOAM to make it available in their new release (really appreciate their effort and significant works). However, if you need it immediately, you can have a look at Pablo's olaFlow work (https://github.com/phicau/olaFlow/tr...rrentWaveFlume).

Hope you find this post useful and please let me know if the first step works with those boundary conditions.

Cheers,
Saeed
Attached Images
File Type: jpg fig1.jpg (26.9 KB, 9 views)
Attached Files
File Type: zip 0.orig_Step1.zip (2.1 KB, 3 views)
saeed.barzegar.v is offline   Reply With Quote

Old   May 11, 2020, 13:07
Default wave and current
  #322
Member
 
Ali
Join Date: Oct 2013
Location: St John's Canada
Posts: 31
Rep Power: 8
ashim is on a distinguished road
Hello,


If anyone interested in wave and current simulation at the same time in OpenFAOM-1912, you can use the attached files. I have changed the source code directly. That mean you need to replace the original files with attached files in waveModel directory. After recompiling the code, you just need to add the following entry in your waveProperties file.



uCurrent (2.196 0.0 0.0); // values are positive



I have already tested the code for two cases. It works fine. I hope it will help someone.


Ali
Attached Files
File Type: zip waveModel.zip (5.7 KB, 5 views)
saeed.barzegar.v likes this.
ashim is offline   Reply With Quote

Old   May 11, 2020, 17:54
Default
  #323
Member
 
IHFOAM Team's Avatar
 
IHFOAM The Environmental Hydraulics Institute "IHCantabria"
Join Date: Sep 2017
Location: Santander (Spain)
Posts: 80
Rep Power: 4
IHFOAM Team is on a distinguished road
Hi Saeed

Quote:
However, if you need it immediately, you can have a look at Pablo's olaFlow work
This is the IHFOAM thread, please add to this thread just open source codes that can improve IHFOAM or/and that have been fully validated.

Cheap copies of IHFOAM with well-known numerical issues and wrong implementations have their own threads.

Regards,
IHFOAM Team
__________________
http://ihfoam.ihcantabria.com/
IHFOAM Team is offline   Reply With Quote

Old   May 11, 2020, 17:59
Default
  #324
Member
 
IHFOAM Team's Avatar
 
IHFOAM The Environmental Hydraulics Institute "IHCantabria"
Join Date: Sep 2017
Location: Santander (Spain)
Posts: 80
Rep Power: 4
IHFOAM Team is on a distinguished road
Hi Ali,

Quote:
Originally Posted by ashim View Post
If anyone interested in wave and current simulation at the same time in OpenFAOM-1912, you can use the attached files. I have changed the source code directly.
This numerical approach is wrong. Please, try to validate with some laboratory data ( Kemp&Simmons [1982] or Umeyama [2005]) and you will see that it does not work.

Regards,
IHFOAM Team.
saeed.barzegar.v likes this.
__________________
http://ihfoam.ihcantabria.com/
IHFOAM Team is offline   Reply With Quote

Old   May 26, 2020, 14:56
Default Long crested wave
  #325
New Member
 
milad
Join Date: Jun 2013
Posts: 5
Rep Power: 9
majid_m87 is on a distinguished road
Hi
I am using OpenFoam v1812 and I was wondering how I can modify waveDict that I get a Long Crested wave (irregular waves in one direction)? What is the maximum number of wave components for multidirectional irregular waves?

Thank you and I look forward to hearing from you.

Best regards

Majid
majid_m87 is offline   Reply With Quote

Old   May 29, 2020, 12:35
Default
  #326
Member
 
IHFOAM Team's Avatar
 
IHFOAM The Environmental Hydraulics Institute "IHCantabria"
Join Date: Sep 2017
Location: Santander (Spain)
Posts: 80
Rep Power: 4
IHFOAM Team is on a distinguished road
Hi Majid,

Quote:
how I can modify waveDict that I get a Long Crested wave (irregular waves in one direction)? What is the maximum number of wave components for multidirectional irregular waves?
If you want to generate irregular waves in one direction, you have to define the wave frequency spectrum for the target direction, and 0 density for the others directions.

There is not a predefined maximum number of wave components. Please, take a look to the tutorial:
~/OpenFOAM/OpenFOAM-v1912/tutorials/multiphase/interFoam/laminar/waves/irregularMultiDirection/

Regards,
IHFOAM Team
__________________
http://ihfoam.ihcantabria.com/
IHFOAM Team is offline   Reply With Quote

Old   June 3, 2020, 09:53
Post Wave simulations irregular waves
  #327
New Member
 
Jente Vercammen
Join Date: Mar 2020
Posts: 9
Rep Power: 2
Jekke123456789 is on a distinguished road
Hello IHFOAM,


I am trying to create irregular waves and calculate the wallshear stress at the bottom at a bump. This is happening in a wave flume of 25 m and the berm located at 17 m .
Can you help me to set up the correct boundary conditions? with OpenFOAM-v1812



The waves are made with a series of sinus waves which repsresent a wave train wit H_s 0.19 m and T_p = 1.8s



I have the following:
for alpha water:

Code:
dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type            waveAlpha;
        value           uniform 0;
    }

    outlet
    {
        type            zeroGradient;
    }

    ground
    {
        type            zeroGradient;
    }

    sides 
    {
        type            empty;
    }

    top
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;
    }
}
For k:

Code:
dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0.0030375;  // or should this be better like 0.000001

boundaryField
{
    inlet
    {
        type            zeroGradient; // or a fixed value???
    }

    outlet
    {
        type            zeroGradient;
    }

    ground
    {
        type            kqRWallFunction;
        value           $internalField;
    }

    top
    {
        type            inletOutlet;
        inletValue      $internalField;
        value           $internalField;
    }

    sides
    {
        type            empty;
    }

}
for omega:

Code:
dimensions      [0 0 -1 0 0 0 0];

internalField   uniform 0.1470;


boundaryField
{
    
    inlet
    {
        type            fixedValue; // or should this be also a zero gradient
        value           $internalField;
    }

    outlet
    {
        type            zeroGradient;
    }

    top
    {
        type            inletOutlet;
        inletValue      $internalField;
        value           $internalField;
    }

    ground
    {
        type            omegaWallFunction;
        value           $internalField;
    }
    

    sides
    {
        type            empty;
    }
}
for nut

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

internalField   uniform 0; //uniform 4.822e-3;

boundaryField
{
    inlet
    {
        type            calculated;
        value           $internalField;
    }

    outlet
    {
        type            calculated;
        value           $internalField;
    }
    ground
    {
        type            nutkRoughWallFunction;
        Ks              uniform 0.0083;
        Cs              uniform 0.5;
        value           $internalField;
    }
    top
    {
        type            calculated;
        value           $internalField;
    }

    sides 
    {
        type            empty;
    }
}
for p_rgh
Code:
dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type            fixedFluxPressure;
        value           $internalField;
    }

    outlet
    {
        type            fixedFluxPressure;
        value           $internalField;
    }

    ground
    {
        type            fixedFluxPressure;
        value           $internalField;
    }

    sides 
    {
        type            empty;
    }

    top
    {
        type            totalPressure;
        p0              $internalField;
    }
}
for U
Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    inlet
    {
        type            waveVelocity;
        value           $internalField;
    }

    outlet
    {
        type            waveVelocity; //noSlip
        value           $internalField;
    }

    sides 
    {
        type            empty;
    }

    ground
    {
        type            fixedValue;
        value           $internalField;
    }


    top
    {
        type            pressureInletOutletVelocity;
        value           uniform (0 0 0);
    }
}
Is this correct or should i change some things? I don't know how I should take a value of omega and k and nut. Can you help me with that?




Thanks in advance.


Jente
Jekke123456789 is offline   Reply With Quote

Old   June 3, 2020, 10:39
Default
  #328
Member
 
IHFOAM Team's Avatar
 
IHFOAM The Environmental Hydraulics Institute "IHCantabria"
Join Date: Sep 2017
Location: Santander (Spain)
Posts: 80
Rep Power: 4
IHFOAM Team is on a distinguished road
Hi Jente,

Quote:
Can you help me to set up the correct boundary conditions? with OpenFOAM-v1812
We suggest you to update to the latest version (v1912), as you can use the same boundary conditions.
We recommend you to use in the inlet the zeroGradient boundary conditions.

Quote:
I don't know how I should take a value of omega and k and nut. Can you help me with that?
You can use this script:
https://github.com/GabiBarajas/Gener...kOmegaVALUES.m

It is based on:
https://www.cfd-online.com/Wiki/Turb...ary_conditions

Regards,
IHFOAM Team
__________________
http://ihfoam.ihcantabria.com/
IHFOAM Team is offline   Reply With Quote

Old   June 3, 2020, 10:51
Default wave simulation
  #329
New Member
 
Jente Vercammen
Join Date: Mar 2020
Posts: 9
Rep Power: 2
Jekke123456789 is on a distinguished road
Quote:
Originally Posted by IHFOAM Team View Post
Hi Jente,

We suggest you to update to the latest version (v1912), as you can use the same boundary conditions.
We recommend you to use in the inlet the zeroGradient boundary conditions.

You can use this script:
https://github.com/GabiBarajas/Gener...kOmegaVALUES.m

It is based on:
https://www.cfd-online.com/Wiki/Turb...ary_conditions

Regards,
IHFOAM Team
I am not able to update as the company is working with this version for now. The other boundary condition are correct? (Is there so much differences)

For the values of k and omega, should I use the value of the near-bad wave orbital velocity? For the turbulence length is it correct to use 0.4 * height of the water = 0.4*0.75 ? Just a small question, is this value only a initial guess and will it change during the simulation?

I will already try to run this, as I am using wall functions and this means y+ should be higher than 30 but since my mesh is very small and the bump is only 3 cm high. My value of y+ descend to 12 at the start of the berm. Should this be a problem because I read somewhere that the k omega SST could also work with lower than 30 and still give good results.


Thanks in advance,
Kind regards,
Jente
Jekke123456789 is offline   Reply With Quote

Old   June 19, 2020, 12:09
Default OpenFoam generation of waves
  #330
New Member
 
Jente Vercammen
Join Date: Mar 2020
Posts: 9
Rep Power: 2
Jekke123456789 is on a distinguished road
Hi IHFoam team,


I have done some simulations with previous shown set-ups. I have only the problem that the waves are decreasing in wave heights to much. Even with laminar turbulence model the wave height is drastically reduced. Is there some way to adjust the interaction with the air and the water to have less energy dissipation?


Further I have some small questions:
  1. I would like to have some information to read about the wave generation and absorption of IHFoam such as Stokes II and the irregular model. Are there some interesting papers ?
  2. I read something about reaxation methods and zone where the waves are build ub and than a working zone and a zone for damping.Is this the same for what interfoam does in Openfoam.com
  3. what is the role of the active wave absorption at the inlet of the wave properties
    and the absorption is only available with shallow water but my waves ar just located in transitional water. Will this play a big role?
I hope that you can help with my questions, These are more important to understand the model. I didn't found so much information for these tutorials (whereas for waves2Foam and olaflow there is some information but I think interfoam (and the tutorials from ihfoam) are somthing different)


Thanks in advance!
Kind regards
Jente
Jekke123456789 is offline   Reply With Quote

Old   July 1, 2020, 09:16
Default
  #331
New Member
 
Masoumeh
Join Date: Oct 2019
Posts: 12
Rep Power: 2
ms.hashempour is on a distinguished road
Dear IHFoam team:

In my thesis I need combination of wave and current + multiphaseInterFoam. But I cant find any tutorial of this.

Do we have any solver of wave+current?


Would you please help me?
ms.hashempour is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Divergence detected in AMG solver: k when udf loaded google9002 Fluent UDF and Scheme Programming 3 November 7, 2019 23:34
udf problem jane Fluent UDF and Scheme Programming 37 February 20, 2018 04:17
UDF velocity profile willroca Fluent UDF and Scheme Programming 2 January 10, 2016 03:13
Error messages atg enGrid 7 August 30, 2013 11:16
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 14:37


All times are GMT -4. The time now is 19:06.