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 Community New Posts Updated Threads Search

Like Tree57Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 5, 2021, 12:37
Default
  #361
New Member
 
Benjamin Norris
Join Date: Oct 2020
Location: California
Posts: 17
Rep Power: 5
bknorris is on a distinguished road
Quote:
Originally Posted by victor13165 View Post

EDIT: My question is pretty much similar to Benjamin's question above, sorry for that. After some testing, it looks like the simulation is running with 1-column matrices as inputs, and waveDirs(i,j) = 0 (also thanks to Benjamin's attached waveProperties file), but I am running into the same issue of maximum period being too large compared to the desired maximum period.
Victor,

I'm glad you were able to get the 2D irregular wave model to work. I still haven't worked out why the model was producing longer maximum wave periods than is specified in waveProperties. Ultimately, my workaround was to supply the model with a smaller number of input frequencies between [0.03 - 0.33] Hz, and use a rampTime that was about two times the max period (64 s). I then ran the model so two complete wave cycles occurred (another 64 s). My experimentation indicated that running the model for more than 128 s total did not produce significantly different results.

Best,

Ben
bknorris is offline   Reply With Quote

Old   August 15, 2021, 21:11
Default
  #362
New Member
 
Valerio
Join Date: Apr 2011
Posts: 1
Rep Power: 0
graziosov is on a distinguished road
Quote:
Originally Posted by Aunura View Post
Good idea. Thank you very much!

Another questions is a problem of debugging. Recently I want to debug OpenFOAM using gdb. Then, I turn on the WM_COMPILE_OPTION to Debug in bashrc, and compile the OpenFOAM again. However, it seems that something is wrong. The error message is:


Both OpenFOAM-v1812 and OpenFOAM v1806 will encounter this problem.Neverthelss, everything is Ok when I turn the WM_COMPILE_OPTION to Opt in bashrc. But I am unable to debug the OpenFOAM if I do so. In this case, I want to find a better solution.
Hi, after a couple of years (more or less...): did you solve this problem? I am having exactly the same behavior...
graziosov is offline   Reply With Quote

Old   August 19, 2021, 08:28
Default IHFoam installation suggestions
  #363
New Member
 
Scott Hicks
Join Date: Aug 2021
Posts: 3
Rep Power: 4
shicks99 is on a distinguished road
Hello,

I'm new to IHFoam and working through getting it installed. Does anybody have suggestions for tutorials for successful installation? I'm hacking my way through it but haven't found a definitive approach. Also, is IHFoam compatible with the latest versions of OpenFOAM? If not, what it is the latest version of OpenFOAM that I should have up and running first?

Thanks!
Scott
shicks99 is offline   Reply With Quote

Old   August 20, 2021, 13:47
Default IHFOAM/OpenFOAM installation
  #364
New Member
 
Benjamin Norris
Join Date: Oct 2020
Location: California
Posts: 17
Rep Power: 5
bknorris is on a distinguished road
Hi Scott,

IHFOAM comes packaged with all modern versions of OpenFOAM, so no additional installation is necessary to use the toolbox. To me, this ease-of-use is one of the key advantages over other wave generators (e.g., waves2Foam, olaFlow).

If you installed OpenFOAM in /opt/, tutorials for IHFOAM can be found in the "tutorials" folder. For me, with OpenFOAM v-1912 installed, the path is

/opt/OpenFOAM/OpenFOAM-v1912/tutorials/multiphase/interFoam/laminar/waves

IHFOAM also has some tutorials on their website, https://ihfoam.ihcantabria.com/source-code/tutorials/

In my experience, these tutorials are enough to get you started for a range of different use cases. However, they do not cover more advanced issues like obtaining model convergence, turbulence modeling, advanced sampling, and so on. To learn these other topics, I had to read forums, reports, and theses. Model development takes time, so my advice is be patient and willing to try (and fail) a lot before finding a solution that works.

Best,

Ben
IHFOAM Team likes this.
bknorris is offline   Reply With Quote

Old   August 24, 2021, 09:32
Default
  #365
New Member
 
Scott Hicks
Join Date: Aug 2021
Posts: 3
Rep Power: 4
shicks99 is on a distinguished road
Thanks Ben. This was helpful.

Now I'm trying to work through the tutorial cases. It seems the waves/laminar tutorial cases all have a "0.orig" folder rather than the "0" folder that the other OpenFoam tutorials seem to have. Is this because of the solver that we use for IHFoam? If I try to run with interFoam, I get an error that it can not find the p_rgh file (because p_rgh is really in the '0.orig' folder and the interFoam solver is looking in '0' folder.

I've tried running the solvers ihFoam and ihDyMFoam but both provide the following error in that it can't find the associated files for those solvers. Am I missing something with the installation?

~/OpenFOAM/OpenFOAM-v1906/tutorials/multiphase/interFoam/laminar/waves/solitary$ ihFoam
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 28, in <module>
from CommandNotFound import CommandNotFound
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 19, in <module>
from CommandNotFound.db.db import SqliteDatabase
File "/usr/lib/python3/dist-packages/CommandNotFound/db/db.py", line 5, in <module>
import apt_pkg
ImportError: /home/shicks33/OpenFOAM/ThirdParty-v1906/platforms/linux64/gcc-6.3.0/lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /lib/x86_64-linux-gnu/libapt-pkg.so.6.0)


~/OpenFOAM/OpenFOAM-v1906/tutorials/multiphase/interFoam/laminar/waves/solitary$ ihDyMFoam
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 28, in <module>
from CommandNotFound import CommandNotFound
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 19, in <module>
from CommandNotFound.db.db import SqliteDatabase
File "/usr/lib/python3/dist-packages/CommandNotFound/db/db.py", line 5, in <module>
import apt_pkg
ImportError: /home/shicks33/OpenFOAM/ThirdParty-v1906/platforms/linux64/gcc-6.3.0/lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /lib/x86_64-linux-gnu/libapt-pkg.so.6.0)



EDIT: I've also added the error that results from using the interFoam solver since as reading through the forum that it appears to be the correct one to use for the wave tutorials. To me, it looks like the solver is trying to find the "p_rgh" file in a "0" folder. However, those tutorials all include a "0.orig" folder instead of a "0" folder. Is this a problem with the install or the solver that I'm using?

--> FOAM FATAL ERROR:
cannot find file "/home/shicks33/OpenFOAM/OpenFOAM-v1906/tutorials/multiphase/interFoam/laminar/waves/solitary/0/p_rgh"

From function virtual Foam::autoPtr<Foam::ISstream> Foam::fileOperations::uncollatedFileOperation::rea dStream(Foam::regIOobject&, const Foam::fileName&, const Foam::word&, bool) const
in file global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C at line 548.

FOAM exiting



Thanks for any help you can give!

Last edited by shicks99; August 25, 2021 at 13:59. Reason: Updated information
shicks99 is offline   Reply With Quote

Old   October 11, 2021, 11:16
Default
  #366
Senior Member
 
IHFOAM Team's Avatar
 
IHFOAM The Environmental Hydraulics Institute "IHCantabria"
Join Date: Sep 2017
Location: Santander (Spain)
Posts: 120
Rep Power: 8
IHFOAM Team is on a distinguished road
Hi Scott,

Can you check if you have compiled correctly the ThirParty folder and OpenFOAM folder?
Please check:
https://develop.openfoam.com/Develop...r/doc/Build.md

Once you have done it, test any given tutorial case. For example:
foamTestTutorial -full incompressible/simpleFoam/pitzDaily

It looks to me that you are missing something.

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

Old   November 10, 2021, 13:55
Default Stream Function
  #367
New Member
 
Kayhan
Join Date: Jun 2014
Posts: 8
Rep Power: 12
ulgenk is on a distinguished road
Hi,

I'm trying to run current with waves around DTC hull via stream function. However, the wave height increases immensely at the inlet. I am using the boundary conditions mentioned in the tutorials of IHFOAM but I am not sure what's wrong with the simuation. I am using Fenton's exe program to compute the Ej and Bj coefficients. Can you help me with this problem. Thanks.
ulgenk is offline   Reply With Quote

Old   November 17, 2021, 11:32
Default
  #368
Senior Member
 
IHFOAM Team's Avatar
 
IHFOAM The Environmental Hydraulics Institute "IHCantabria"
Join Date: Sep 2017
Location: Santander (Spain)
Posts: 120
Rep Power: 8
IHFOAM Team is on a distinguished road
Hi ulgenk,

Quote:
I'm trying to run current with waves
Unfortunately we have not released the code of waves+currents.

Please, send me a direct message if you might be interested in a potential collaboration.

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

Old   January 5, 2022, 16:01
Default High velocities in air phase above waves
  #369
New Member
 
Benjamin Norris
Join Date: Oct 2020
Location: California
Posts: 17
Rep Power: 5
bknorris is on a distinguished road
Hi IHFOAM team,

I have a curiosity about interFoam/IHFOAM that I have not been able to solve myself, and I wonder if you have any insight into this issue. I am currently simulating low frequency waves over a field of hemispheres representing bed roughness. The models are running fine, albeit a bit slowly. The model residuals look fine to me.

I've noticed that there are very large air-side velocities in my models (please see attached images--this is a single timestep for both the alpha.water and Umag screen shots).

I've gathered from other forum posts that this behavior could be intrinsic to VOF solvers and can be mitigated by adjusting the UEqn.C file in interFoam. I have attempted this solution, but it produced weird results, and so I abandoned it. The attached results were generated with a "standard" (unmodified) version of interFoam.

For what it's worth, the water phase velocities look fine to me, and I discard the results above the free surface anyway. But, I would like to optimize my models to run a little faster if possible

I have also included my boundary conditions, in case they are useful.

Thank you in advance for any and all insight.

Ben
Attached Images
File Type: jpg Model_alphaWater.jpg (66.0 KB, 28 views)
File Type: jpg Model_Umag_issue.jpg (68.7 KB, 29 views)
Attached Files
File Type: zip modelBoundaryConditions.zip (3.5 KB, 5 views)

Last edited by bknorris; January 5, 2022 at 16:09. Reason: Minor edits for clarity.
bknorris is offline   Reply With Quote

Old   January 6, 2022, 16:59
Default Limit air velocities
  #370
New Member
 
Christopher Goody
Join Date: Sep 2018
Location: Koolauloa, Oahu, Hawaii
Posts: 14
Rep Power: 7
goodstah is on a distinguished road
Hi Ben,
Have you tried experimenting with using a limiter in fvOptions? I think limitU or limitVelocity routine might help to keep the air velocity from growing beyond realistic levels. From what I've read, one needs to be careful not to limit too much b/c you might be dumping too much energy from the system and end up with nice but maybe unrealistic results. Try check out the source code and google examples...

Hope this helps.
mahalo
chris

HTML Code:
https://develop.openfoam.com/Development/openfoam/-/tree/master/src/fvOptions/corrections/limitVelocity

Quote:
Originally Posted by bknorris View Post
I've noticed that there are very large air-side velocities in my models (please see attached images--this is a single timestep for both the alpha.water and Umag screen shots).
bknorris likes this.
goodstah is offline   Reply With Quote

Old   January 13, 2022, 19:50
Default Update on limiting high air-side velocities
  #371
New Member
 
Benjamin Norris
Join Date: Oct 2020
Location: California
Posts: 17
Rep Power: 5
bknorris is on a distinguished road
Quote:
Originally Posted by goodstah View Post
Hi Ben,
I think limitU or limitVelocity routine might help to keep the air velocity from growing beyond realistic levels.
HTML Code:
https://develop.openfoam.com/Development/openfoam/-/tree/master/src/fvOptions/corrections/limitVelocity
Chris,

Thank you for that recommendation! I have run an efficiency test with my models and wanted to share the results in case anyone else is running into this same issue.

First off, I think it is important to note that this solution really only works so long as the air-phase velocities are much larger than the water-phase velocities. Applying a velocity limiter across the entire model domain will, of course, limit velocities in both phases, so it is critical to pick a threshold that is above the magnitude of velocities that you care about. In my cases, the air-phase velocities are in the range of 0.20 - 0.75 m/s, and the water-phase velocities are < 0.1 m/s.

I constructed two test cases from one of my models, one with limitU and one without. These models were set to run for a short interval (5 s of simulation time). I set the max velocity threshold in the model with limitU to 0.3 m/s, which is conservatively larger than the water-phase velocities in my model. After running both cases, I found that the limitU model runs about 40% faster than the model without the limiter! Considering that a single, full model run takes around 70 hours to complete, this is a massive increase in efficiency.

I took the results from the test cases and computed depth profiles of Umag and epsilon in the water phase. As you can see (attached), there are very minor differences between the model with limitU and the one without. I expect this difference would be larger if I used a smaller max velocity threshold, or if the water-phase velocities were closer in magnitude to the air-phase velocities. In other words, it is worthwhile to run a couple test-cases before applying the velocity limiter broad-scale, to ensure you have set the max velocity threshold appropriately.

Happy FOAM-ing.

Ben
Attached Images
File Type: png CPUTest_limitU_Umag_profile.png (29.3 KB, 13 views)
File Type: png CPUTest_limitU_EPS_profile.png (26.8 KB, 11 views)
bknorris is offline   Reply With Quote

Old   January 14, 2022, 03:10
Default Issue of the solitary wave tutorials.
  #372
New Member
 
Peiwei
Join Date: Jul 2019
Posts: 1
Rep Power: 0
xpwforj is on a distinguished road
Hi IH team members,

I have been learning IHFOAM on OpenFOAM 1812 and 2012. A strange issue I found is that the solitary wave tutorials (solitary/solitaryGrimshaw/solitaryMcCowan) can not be compiled. The simulations always end like this:
*************************
Courant Number mean: 0 max: 0
Interface Courant Number mean: 0 max: 0
deltaT = 0.011
Time = 0.011

PIMPLE: iteration 1
Selecting waveModel Boussinesq
--------------------------------------------------------------------------
Primary job terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
[1] #0 Foam::error:rintStack(Foam::Ostream&) at ??:?
[1] #1 Foam::sigSegv::sigHandler(int) at ??:?
[1] #2 ? in /lib/x86_64-linux-gnu/libpthread.so.0
[1] #3 Foam::waveModels::solitaryWaveModel::solitaryWaveM odel(Foam::dictionary const&, Foam::fvMesh const&, Foam:olyPatch const&, bool) at ??:?
[1] #4 Foam::waveModels::Boussinesq::Boussinesq(Foam::dic tionary const&, Foam::fvMesh const&, Foam:olyPatch const&, bool) at ??:?
[1] #5 Foam::waveModel::addpatchConstructorToTable<Foam:: waveModels::Boussinesq>::New(Foam::dictionary const&, Foam::fvMesh const&, Foam:olyPatch const&) at ??:?
[1] #6 Foam::waveModel::New(Foam::word const&, Foam::fvMesh const&, Foam:olyPatch const&)--------------------------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

Process name: [[60199,1],0]
Exit code: 144
--------------------------------------------------------------------------
[DESKTOP-E69PS59:05727] 1 more process has sent help message help-btl-vader.txt / cma-permission-denied
[DESKTOP-E69PS59:05727] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
**************************

I have tried a lot to work it out, including re-install ubuntu, openfoam but none of them could solve the issue.

Could you kindly tell me that what could be the problem?
BTW all the other tutorial cases can be compiled well.

Thanks in advance.

Peiwei
xpwforj is offline   Reply With Quote

Old   June 29, 2022, 05:40
Default
  #373
Member
 
Haoran Zhou
Join Date: Nov 2019
Posts: 49
Rep Power: 6
Stan Zhou is on a distinguished road
Quote:
Originally Posted by rafa13 View Post
Hi Pablo and Ihfoamers,

In a earlier post i was struggling to obtaining the massflow of the water over a certain section and now i figured it out, so here is the link to what i did to get the massflow. Then i used it for a overtopping sampling.

http://www.cfd-online.com/Forums/ope...code-do-2.html

at post 25

Greets to everbody

Rafa Marques

Hi Rafa,
Currently I have a problem with wave overtopping over the breakwater. However, the post 25 in the link has gone. Could you please share the post 25 again?


Best

Stan
Stan Zhou is offline   Reply With Quote

Old   September 6, 2022, 02:10
Default IHFoam nPaddle
  #374
Member
 
Join Date: Apr 2021
Posts: 41
Rep Power: 5
AlxB is on a distinguished road
Hello,
what is the physical meaning of nPaddle in the waveProperties dictionary ?

Is a 3D simulation with nPaddle=1 correct ?

thanks

Last edited by AlxB; September 7, 2022 at 06:06.
AlxB is offline   Reply With Quote

Old   September 12, 2022, 03:26
Default
  #375
Senior Member
 
IHFOAM Team's Avatar
 
IHFOAM The Environmental Hydraulics Institute "IHCantabria"
Join Date: Sep 2017
Location: Santander (Spain)
Posts: 120
Rep Power: 8
IHFOAM Team is on a distinguished road
Hi,

Quote:
Originally Posted by AlxB View Post
Hello,
what is the physical meaning of nPaddle in the waveProperties dictionary ?
Is the number of wave paddles in which you are going to split your generation patch

Quote:
Originally Posted by AlxB View Post
Is a 3D simulation with nPaddle=1 correct ?
Yes, if you re not generating directional waves, decrease the number of wave paddle to speed-up the simulations.

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

Old   October 10, 2022, 13:29
Default Time series as input
  #376
New Member
 
Benjamin Norris
Join Date: Oct 2020
Location: California
Posts: 17
Rep Power: 5
bknorris is on a distinguished road
Hi IHFOAM team,

I am working on a new project with IHFOAM, where I will be recreating some laboratory test cases from a wave flume inside OpenFOAM. I am being provided a water level time series from downstream of the wave maker, and so I am wondering if IHFOAM can use a water level time series as the upstream boundary condition?

I am familiar with the irregular wave model in IHFOAM, in that I have used it in the past by discretizing a pressure time series into a spectrum (with components of wave height, period, direction, and phase). I could do this with the flume data, but I am wondering if this approach isn't as precise for simulating monochromatic waves in OpenFOAM?

Thank you for any and all insight.

Ben
bknorris is offline   Reply With Quote

Old   October 13, 2022, 17:43
Default Re: Time series as input
  #377
New Member
 
Christopher Goody
Join Date: Sep 2018
Location: Koolauloa, Oahu, Hawaii
Posts: 14
Rep Power: 7
goodstah is on a distinguished road
Quote:
Originally Posted by bknorris View Post
I am wondering if IHFOAM can use a water level time series as the upstream boundary condition?
Hi Ben--not sure what version of OF you use and whether this will work for you, but there is a tool that does this in a similar package called olaFlow. In its wavemaker theories, there is one called TVETA where the user supplies inlet BC with time series of depth averaged velocity and freesurface elevation. It has a good manual, so you should be able to figure it out fairly quickly. I've used it a lot lately with OF v2112 and it seems to work really well. Could be worth a shot. Good luck

Chris
bknorris likes this.
goodstah is offline   Reply With Quote

Old   October 28, 2022, 15:36
Default
  #378
New Member
 
Benjamin Norris
Join Date: Oct 2020
Location: California
Posts: 17
Rep Power: 5
bknorris is on a distinguished road
Quote:
Originally Posted by goodstah View Post
there is a tool that does this in a similar package called olaFlow. In its wavemaker theories, there is one called TVETA where the user supplies inlet BC with time series of depth averaged velocity and freesurface elevation.
Hi Chris, thank you for your reply!

I am currently using IHFOAM in OF-v2206. To be more specific about my problem, I am working with a colleague who will be simulating the same case in XBEACH Non-Hydrostatic (XBNH). XBNH takes a water level and velocity time series as input, so ideally I would do the same with my OpenFOAM model so we can directly compare results. At the moment, I am forcing my model using a monochromatic wave that is similar--but not the same--as the wave tank data my colleague is using for their inlet BC.

Thanks for the tip about olaFlow, though I think ideally I would find a solution that allows me to modify my current IHFOAM case without needing to redevelop the case with a different set of solvers. I will investigate this further and will consider other options if I get stuck.

Best,

Ben
IHFOAM Team likes this.

Last edited by bknorris; October 28, 2022 at 18:14. Reason: edited for formatting; clarity
bknorris is offline   Reply With Quote

Old   January 23, 2023, 08:57
Default wave run-up
  #379
New Member
 
Join Date: Sep 2020
Posts: 25
Rep Power: 5
paulathikalam is on a distinguished road
Hiii,

do you guys have any idea on calculating the wave run-up on a structure?

Does this approach work ?

functions
{

freeSurface
{
type surfaces;
functionObjectLibs
(
"libsampling.so"
);
writeControl outputTime;
writeInterval 1;
surfaceFormat stl;
interpolationScheme cellPoint;
surfaces
(
topFreeSurface
{
type isoSurface;
isoField alpha.water;
isoValue 0.9;
interpolate true;
}
);
fields
(
alpha.water
);

}
}
and slicing the corresponding stl file in y direction (in paraview) and saving it??
paulathikalam is offline   Reply With Quote

Old   March 2, 2023, 15:45
Default cnoidal wave height
  #380
Member
 
Join Date: Apr 2021
Posts: 41
Rep Power: 5
AlxB is on a distinguished road
Hello,
I am running a turbulent k-omega 2D simulation based on the cnoidal wave tutorial of OF2112.
In that wave flume channel, when I set 40mm for the wave height in the waveProperties then I got a wave height five times bigger, so 200mm.
Another issue is that the water mean level is progressively going down as the time goes along.

Where could these come from ?

Best,

Last edited by AlxB; March 6, 2023 at 07:24.
AlxB is offline   Reply With Quote

Reply


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 00:51.