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   July 16, 2015, 11:40
Default
  #141
Member
 
Join Date: Apr 2015
Posts: 42
Rep Power: 11
HosseinB is on a distinguished road
Quote:
Originally Posted by kobelak View Post
Hi all,

I'm trying this new wave generation system for OpenFOAM. Thank you for making the code open-source.

Actually i'm validating the wave generation boundary. I just compiled the generation/absorption libraries and I'm still using interFoam (it is the same as using IHFoam without any porosity, isn'it?)

This is the case I run:
DOMAIN
a 2D wave flume 8m long and 1.2 high (still water level = 1m) with cell size = 0.01m (aspect ratio =1) over all the domain

BOUNDARIES
I followed the baseWaveFlume tutorial, then
inlet: "IH_Waves_InletVelocity" for U, "buoyantPressure" for p, "IH_Waves_InletAlpha" for alpha

outlet
: "IH_3D_2DAbsorption_InletVelocity for U, "buoyantPressure" for p, "zeroGradient" for alpha

bottom and atmosphere: as in the baseWaveFlume tutorial for U,p,alpha

IHWAVESDICT
waveType regular;
waveTheory StokesV;
genAbs 1;
absDir 0.0;
nPaddles 1;
waveHeight 0.1;
wavePeriod 0.767;
waveDir 0.0;
wavePhase 4.71238898;

SETTINGS
fvSchemes and fvSolution as baseWaveFlume tutorial

I ran the case, but the surface elevation results are not so satisfying. According to Fenton solver, the wave should have crest at 0.06m and trough at -0.04m. The solution I got doesn't look like this: there are differences up to 30% both for crest and trough. Moreover it is quite irregular and a bit damped.

I think the mesh is fine enough to get acceptable results and the wave theory is appropriate.
Maybe I have some errors in the settings I'm using...

Has anyone experienced anything similar? Could anyone run the same case to compare my results?

Thanks in advance.

Cheers,

Danilo
Hi Danilo,

Any solution for the problem you were facing? Your reply will benefit me since I am experiencing simialr behaviour for a StokesV wave that I am interetesd in.

This is my obseravtions so far: Attenuation with time could be significantly reduced when using laminar model. Attenuation with location could be significantly reduced when Courant number is reduced.

Cheers,
Hossein
HosseinB is offline   Reply With Quote

Old   August 3, 2015, 06:45
Default baseWaveflume
  #142
New Member
 
Gizela
Join Date: May 2015
Posts: 11
Rep Power: 11
Gizazu is on a distinguished road
Hi everbody, I´m new to OpenFoam and Ihfoam. I have installed the solver with success and now i´m learning how it works, but i had some problems running the basewaveflume tutorial.

I didn´t change anything at the dict files. But when i received the following error:

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

Reading field porosityIndex

Porosity NOT activated

Reading field p_rgh



--> FOAM FATAL IO ERROR:
cannot find file

file: /home/costas-portos/Zazu-2.4.0_RUN/openfoam240/IHFOAM/ihFoam/tutorials/OF230_240/of230_240/basewaveflume/0/p_rgh at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting

costas-portos@ObrasCosteiras:~/Zazu-2.4.0_RUN/openfoam240/IHFOAM/ihFoam/tutorials/OF230_240/of230_240/basewaveflume$

Could someone tell me why i received this error, and how can i solve the problem?

Waiting for your reply...

Kind regards
Gizazu is offline   Reply With Quote

Old   August 3, 2015, 07:26
Default
  #143
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Gizela,

it seems that you lack some steps before running the simulation. Please take a look at the runCase file.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   August 3, 2015, 09:39
Default
  #144
New Member
 
Gizela
Join Date: May 2015
Posts: 11
Rep Power: 11
Gizazu is on a distinguished road
Hello Pablo,
Thanks for your quick reply.

I did exactly what is written at the runcase file, but it is stilll returning the error.
Maybe it´s an installation problem but even if it is, i don´t know how to solve it.



Any idea?
Gizazu is offline   Reply With Quote

Old   August 3, 2015, 11:29
Default
  #145
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Gizela,

without further information I can only think that something failed while following all the steps. Check if there is a folder 0 and a p_rgh file inside. The 0 folder should have all the files present in 0.org prior to performing setFields.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   August 3, 2015, 19:27
Default
  #146
New Member
 
Pietro Danilo Tomaselli
Join Date: Oct 2012
Location: Lyngby, DTU
Posts: 9
Rep Power: 14
kobelak is on a distinguished road
Hi Pablo,

I am looking at the code of IHFOAM. In particular, I am interested in the generation of waves, hence in the way how alpha and U are treated.

Following the manual at pag. 28 and the file IH_Waves_InletAlphaFvPatchScalarField.C, this is what I understand:

For the case T > M:

- if (zSup[cellIndex] <= measuredLevels[cellGroup[cellIndex]-1])
This is zone "c" and alpha = 1 for in flux and zeroGradient for out flux.

- else if ( zInf[cellIndex] < measuredLevels[cellGroup[cellIndex]-1])
This is interface "b-c". Again, alpha = 1 for in flux and zeroGradient for out flux.

- else
alpha = 0 both for in flux and out flux.
I think this is zone "a"

My question is: where is the calculation of zone "b" and of the interface "a-b"? Could you please help me to find the lines of the code where "The intersection between the theoretical water level and the cell is calculated to obtain the corresponding alpha of the cell" ?

Thank you in advance for your help.

Cheers,
Danilo

@ Hossein
Sorry for the late reply, I just saw your post. However, I have not found any solution for that problem yet.
kobelak is offline   Reply With Quote

Old   August 4, 2015, 06:57
Default
  #147
Member
 
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12
rafa13 is on a distinguished road
Hi everybody,

I am simulating a wave breaker and i am interested in obtaining the overtopping but at the moment i only have one way to do it. To sample the alpha field and the velocity x field and then i wrote a script in matlab to make threshold if alpha>=0.5 them multiply alpha and Ux then i make the integrate in the vertical direction to obtain the massflow per meter. The problem is that in have a lot of folder because i am simulating all timestep. i am wondering if there is a better way to do it?


Thanks to everybody

Rafa Marques
shincoast and Stan Zhou like this.
rafa13 is offline   Reply With Quote

Old   August 7, 2015, 11:52
Default
  #148
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Kobelak,

actually, the reference manual is quite outdated. Recent improvements allow us to work without calculating transition zones a-b and b-c. Some of the old infrastructure remains in IH_Waves_InletAlphaFvPatchScalarField.C, though.

Hi Rafa,

there are countless other ways, including the integration of a faceSet within a function object.

Best regards,

Pablo
rafa13 and Stan Zhou like this.
Phicau is offline   Reply With Quote

Old   August 8, 2015, 09:21
Default
  #149
Member
 
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12
rafa13 is on a distinguished road
Hi Pablo,

thanks for your quick reply, i will try it, because with the method explaind in the earlier post it is possible but it is also to time consuming.


Greets

Rafa Marques
rafa13 is offline   Reply With Quote

Old   August 20, 2015, 07:43
Default need urgent help for running ihfoam test case
  #150
New Member
 
nirbhay tiwary
Join Date: Aug 2015
Posts: 24
Rep Power: 11
nctiwary is on a distinguished road
hi guys,
as i m a new user of ihfoam i am able to run any of the test cases provided in the tutorial directory of ihfoam....can any body list the step by step procedure for runny any of the test cases.For ur information my ihfoam installation is fine.
thanx in advance.
nctiwary is offline   Reply With Quote

Old   August 21, 2015, 06:39
Default
  #151
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Nirbhay,

each case has a runCase script that includes all the steps necessary to prepare/run/postprocess it.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   August 21, 2015, 07:45
Angry not able to run the test case file
  #152
New Member
 
nirbhay tiwary
Join Date: Aug 2015
Posts: 24
Rep Power: 11
nctiwary is on a distinguished road
while running the test case i m getting the following error.....this error happens only for interFoam and ih Foam case....i don't know why......pls guys help me

Create time

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

Reading field porosityIndex

Porosity NOT activated

Reading field p_rgh



--> FOAM FATAL IO ERROR:
cannot find file

file: /home/user/ihfoam_materials/tutorials/OF230_240/irreg45degTank/0/p_rgh at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting
nctiwary is offline   Reply With Quote

Old   August 21, 2015, 11:34
Default
  #153
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi,

the same question has been answered a couple of posts before. Please use the search tools before asking questions, as some of them can be already answered.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   August 21, 2015, 18:23
Default
  #154
Member
 
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12
rafa13 is on a distinguished road
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
rafa13 is offline   Reply With Quote

Old   September 5, 2015, 02:22
Default need help to generate 3 D wave tank containing fixed cylinder
  #155
New Member
 
nirbhay tiwary
Join Date: Aug 2015
Posts: 24
Rep Power: 11
nctiwary is on a distinguished road
hi guys........as i m new to IhFoam......so i need a complete tutorial on generation of 3 D wave tank containing fixed cylinder using stokes 1st order....pls help me guys....i need this very urgently......as i wanted to use openFoam fr validation of my experimental work.
thnx in advance.
nctiwary is offline   Reply With Quote

Old   September 8, 2015, 12:47
Default
  #156
Member
 
Join Date: Apr 2015
Posts: 42
Rep Power: 11
HosseinB is on a distinguished road
Hi Pablo,

May you please further explain what numerics could be adjusted to more realistically model the waves? I am experiencing damping of waves with time and location.

What fvSchemes do you recommend for steep waves?

Cheers,
Hossein



Quote:
Originally Posted by Phicau View Post
Hi Danilo,

your case setup seems reasonable to me.

However, the damping that you are experiencing is well known and happens with quite steep waves. You may want to play around with the numerics and mesh to obtain better solutions for your case. You can also try applying the streamfunction or cnoidal (although a little bit off) wave theories to see if things get better.

Best regards,

Pablo
HosseinB is offline   Reply With Quote

Old   September 24, 2015, 04:02
Default How can i generate a wave with known velocity profile at inlet using OpenFOAM or IhF
  #157
New Member
 
nirbhay tiwary
Join Date: Aug 2015
Posts: 24
Rep Power: 11
nctiwary is on a distinguished road
hi friends,
I want to generate a velocity profile at the inlet condition of my numerical wave tank generated using OpenFoam/ihFoam by giving the ordinates of velocity.As i m a new user of OpenFoam kindly give your reply in detail.
nctiwary is offline   Reply With Quote

Old   September 30, 2015, 22:36
Default
  #158
New Member
 
Join Date: Apr 2015
Posts: 14
Rep Power: 11
Rising Star is on a distinguished road
Dear Pablo

I'm trying to reproduce a 2D wavetank with a floating panel: I'm using OpenFOAM 2.4.0 and ihDyMFoam compiled for this version.

I've set up the dynamic mesh dictionary on the same way of the floating object tutorial, with two constraints, a 1x0.4 m2 box and the same mesh of the original tutorial.






BTW, if I try to run a simulation with a 0.4 m thick box, it runs pretty straightforward without particular issues, if I try instead with a thinner plate (I need 0.01 m for my purposes, but even with 0.2 m I've troubles), the simulation diverges almost immediately and I obtain senseless values of linear velocity and pressure (see picture below)



I'm desperately trying to understand what it could be the problem, but I dont' know if it's a problem of coarse mesh, or I'm missing something else. Could you please give any suggestion? Any help will be very appreciated

Cheers
Rising Star is offline   Reply With Quote

Old   October 1, 2015, 04:26
Default coupling my Fnpt code with OpenFoam
  #159
New Member
 
nirbhay tiwary
Join Date: Aug 2015
Posts: 24
Rep Power: 11
nctiwary is on a distinguished road
Thanks for reply .

I want to couple my fully non-linear potential flow theory code(which will be used for wave generation ) with Open Foam(which will be used for calculating wave forces on my offshore structure).My FNPT code is giving the follwing results

x * *y * z * * u * * *v * * *w * * *px * * py * * *pz * * * *ax * * * ay * * * *az * *

So how i can couple my FNPT code with that of OpenFoam .One more thing is there any GUI software which uses Fully Non Linear Potential Flow theory .*

How can I generate a wave with known velocity profile at inlet using OpenFOAM or IhFOAM? - ResearchGate. Available from: https://www.researchgate.net/post/Ho...FOAM_or_IhFOAM [accessed Oct 1, 2015].
nctiwary is offline   Reply With Quote

Old   October 7, 2015, 12:23
Default
  #160
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 15
haze_1986 is on a distinguished road
Hi All, I have a simple clarification I wish to make regarding the wave phase. For waves travelling horizontally I wish to generate Stokes first order waves (sine). I used a wavePhase of pi/2 which gave me the results I need. I'm quite surprised since it is different from the training manual pdf.

Another situation I was required to generate waves vertically pointing to the North (y +ve). Similarly stokes first order (sine) as well. I wasn't able to obtain the results I need until I change the wavePhase to pi. I have no idea if I'm missing something theoretical here. Please advise if you know, thanks.
haze_1986 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 8, 2019 00:34
udf problem jane Fluent UDF and Scheme Programming 37 February 20, 2018 05:17
UDF velocity profile willroca Fluent UDF and Scheme Programming 2 January 10, 2016 04:13
Error messages atg enGrid 7 August 30, 2013 12:16
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 15:37


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