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   June 5, 2015, 02:07
Default Linking wave boundary conditions with multiphaseInterFoam
  #121
New Member
 
Mohamed Elshahat Ouda
Join Date: May 2010
Posts: 29
Rep Power: 16
me.ouda is on a distinguished road
Dear Pablo,

Sorry for too many questions.

I am trying to link the ihFoam Wave B.C. with multiphaseInterFoam. I am trying to model sediment transport in free surface flow under waves action so I need to include at least 3 phases so I decided to use multiphaseInterFoam. I attached a picture for my simple model configuration.

My first question, is it possible to use the boundary condition in ihFoam with this solver.

If yes, So I already tried doing that with interFoam and it worked very well but I couldn't do that with multiphaseInterFoam.

I am using OF 2.4 in one machine and OF 2.2.2 in other machine both with Ubuntu 14.04 I get different error message in each case so I will just include the error message appears with OF 2.4.

Code:
Create time

Create mesh for time = 0

Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#5  Foam::multiphaseMixture::multiphaseMixture(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:?
#6  ? at ??:?
#7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8  ? at ??:?
Floating point exception (core dumped)
Also, I've attached the case files, please take a look at especially the boundary conditions for the 3 phases.

Thanks in advance.
Attached Images
File Type: png aa.png (2.3 KB, 66 views)
Attached Files
File Type: zip sedimentransport1.zip (11.6 KB, 23 views)
me.ouda is offline   Reply With Quote

Old   June 5, 2015, 08:55
Default
  #122
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Mohamed,

most likely it is possible and I do not expect it to take a lot of changes in the code, since multiphaseInterFoam is quite similar to interFoam. Probably is just a matter of referencing the correct name alpha.water in memberFun.H as a starting point.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   June 5, 2015, 09:46
Default
  #123
New Member
 
Mohamed Elshahat Ouda
Join Date: May 2010
Posts: 29
Rep Power: 16
me.ouda is on a distinguished road
Thanks for this hint I will try to make the required changes, But what about the boundary conditions for the other two phases (air and sand) are the attached files describe a suitable boundary conditions because in the multiphaseInterFoam tutorial there are different set of boundary conditions especially for the air phase.

Quote:
Originally Posted by Phicau View Post
Hi Mohamed,

most likely it is possible and I do not expect it to take a lot of changes in the code, since multiphaseInterFoam is quite similar to interFoam. Probably is just a matter of referencing the correct name alpha.water in memberFun.H as a starting point.

Best,

Pablo
me.ouda is offline   Reply With Quote

Old   June 5, 2015, 13:12
Default
  #124
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Mohamed,

unfortunately I have never had a deep look inside multiphaseInterFoam, so I guess I cannot be of help here.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   June 16, 2015, 08:57
Default porosity dict
  #125
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

I have a question about the porosity modulation, I already ask a question about this subject but i still have some doubts. I want to ask which recommendation (lui, lara, van gent etc) of the resistence coefficents where used in IHFOAM. I read in the manual that were used the same as anderson burchardt, but can you say me where the calibration of this coefficente are made because I dont have the paper from anderson and burchardt, so i dont know if/how they calibrated the coefficients.

I am trying to calibrate the alpha and beta for a porous wave break and I am getting to high wave heights int the porous media and at the toe of the wavebreaker, I dont know the right porosity and the resistence coeffiecients I only know the D50, the geometry and the wave parameters for the model, so I want to ask if somebody have some sugestions?

Greets
Rafa
rafa13 is offline   Reply With Quote

Old   June 22, 2015, 17:57
Default Attenuation of waves in 3D case
  #126
Member
 
Join Date: Apr 2015
Posts: 42
Rep Power: 11
HosseinB is on a distinguished road
Hi guys,

I am modelling a StokesV wave in an ihFoam flume and see attenuation of wave as function of time. However, when I run the case in 2D, I don't see that behavior. Do you have any clue what is happening?

The 3D case has a symmetry wall on one side, and a zero-slip wall on the other. The inlet is absorptive while generative, and the outlet is 3D_3D absorptive.

Cheers,
Hossein
Attached Images
File Type: jpg 2Dvs3D_water_level.jpg (57.0 KB, 58 views)
HosseinB is offline   Reply With Quote

Old   June 25, 2015, 12:18
Default
  #127
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Rafa,

please take a look at my PhD for a complete description of porous media calibration:

http://www.tesisenred.net/handle/10803/288368

I would suggest fixing an approximate porosity beforehand.

Hi Hossein,

it is difficult to assess what's happening, I have never experienced such behaviour. There are lots of factors that can play a role here: different schemes, tolerances, cAlpha, mesh discretization, 3D effects (number of paddles)...

Best,

Pablo
rafa13 likes this.
Phicau is offline   Reply With Quote

Old   June 25, 2015, 15:10
Default
  #128
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 a lot!

Greets
Rafa
rafa13 is offline   Reply With Quote

Old   July 1, 2015, 09:08
Default floating object
  #129
New Member
 
Agnese Paci
Join Date: May 2015
Location: Bologna, Italy
Posts: 14
Rep Power: 11
agnip is on a distinguished road
Dear all,
I'm a new IHFOAM user.
I'd like to simulate a floating object subject to waves.
I think it is possible in IHFOAM, am I right? but I can't do it yet.
could you suggest me any tutorials?

Thank you very much

Agnese
agnip is offline   Reply With Quote

Old   July 1, 2015, 11:44
Default
  #130
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Agnese,

let me respond to this comment and that in http://www.cfd-online.com/Forums/ope...g-objects.html here.

It is indeed possible to simulate floating objects with ihDyMFoam, take a look:

https://www.youtube.com/watch?v=OnjGPbCNF7g

However, it is not straightforward to set up and master floating body simulations. At this moment we do not provide any free tutorial, as we only cover this topic in our training courses.

With respect to your error, it is impossible to assess what is happening, I can only tell that OpenFOAM may be dividing by zero somewhere. I suggest searching the forum for interDyMFoam simulations (and issues), as there is plenty of information.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   July 2, 2015, 10:37
Default
  #131
Member
 
Join Date: Apr 2015
Posts: 42
Rep Power: 11
HosseinB is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi Rafa,

please take a look at my PhD for a complete description of porous media calibration:

http://www.tesisenred.net/handle/10803/288368

I would suggest fixing an approximate porosity beforehand.

Hi Hossein,

it is difficult to assess what's happening, I have never experienced such behaviour. There are lots of factors that can play a role here: different schemes, tolerances, cAlpha, mesh discretization, 3D effects (number of paddles)...

Best,

Pablo

Dear Pablo,

Thanks for your reply.

I could figure out what is causing the wave attenuation by time. The 2D case with which I compared the wave time series was a laminar case, but the 3D model had turbulence on; when turbulence is off (laminar model), the waves do not attenuate as before and the results are very similar to the 2D case.

Does this make sense? I am attaching a figure showing the 3D laminar case for four gauge locations. As you see, at each location, the wave height is almost constant.

However, as you'll also see in the attached figure, the wave height drops by location. VOF1 is closer to wave generating boundary, VOF4 is farther from the boundary, and so on. The domain and boundary and wave conditions are also attached in another file here.

Could you help me understand why the wave height is dropping by location as I move away from the wave generating BC?

Cheers,
Hossein
Attached Images
File Type: jpg VOF1_4_comp_3D_Lam.jpg (53.0 KB, 67 views)
File Type: jpg 3D_flume.jpg (37.8 KB, 55 views)
HosseinB is offline   Reply With Quote

Old   July 7, 2015, 11:27
Default
  #132
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Hossein,

turbulence dissipates the energy from the domain, making the wave height smaller and smaller. Although turbulence was not formulated for transient simulations, or two phase flows, I have never experienced such a dramatic effect in any of my simulations.

I suggest that you check your boundary conditions and initial levels.

Best,

Pablo
mo_na likes this.
Phicau is offline   Reply With Quote

Old   July 13, 2015, 10:52
Default ihDyMFoam problem
  #133
New Member
 
Ricardo Lopez
Join Date: Oct 2013
Posts: 19
Rep Power: 13
RicardoLB is on a distinguished road
Hello!

I have been working on floating body simulations the last weeks, and when it comes to floating cubes everythings works pretty well. I have been trying to work with cylindrical geometries, but in 3D the simulations explode continuously. I get a very strange water profile aroudn the object. I first thought it had something to do with dynamicMeshDict, so after trying out many things I decided to "freeze" my floating object.

The attached images illustrates what happens in the firs 0.05 seconds of simulation... The interface between the liquid and the body (in green) is very very strange.

Any comments? I can of course give further details, but I did not know really where to start.

Greetings,
Ricardo

Screenshot from 2015-07-13 15:42:25.jpg

Screenshot from 2015-07-13 15:42:51.jpg

Screenshot from 2015-07-13 15:43:01.jpg

Screenshot from 2015-07-13 15:43:39.jpg

Screenshot from 2015-07-13 15:43:13.jpg
RicardoLB is offline   Reply With Quote

Old   July 13, 2015, 12:40
Default
  #134
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Ricardo,

it seems to me that there is a problem of the boundary conditions that you apply to the moving object wall. Without taking a look at the case I can only suggest using the boundary conditions of a static wall (zero gradient for alpha, zero fixed value for velocity and buoyant/fixedFlux pressure for pressure).

Also to note: you can expect small disturbances on the free surface where the mesh becomes non conformal (i.e. the interface between different refinement levels), but nothing like is shown in your images.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   July 14, 2015, 05:34
Default ihDyMFoam problem - files
  #135
New Member
 
Ricardo Lopez
Join Date: Oct 2013
Posts: 19
Rep Power: 13
RicardoLB is on a distinguished road
I tried doing what you recommended, but I get the exact same mistake... If you have the time, here is the case; you have to run blockMesh and snappyHexMesh and then the 0 folder can be setup and the simulation launched with ihDyMFoam.

Saludos,
Ricardo

Last edited by RicardoLB; July 14, 2015 at 07:30.
RicardoLB is offline   Reply With Quote

Old   July 14, 2015, 07:22
Default ihDyMFoam problem - solved
  #136
New Member
 
Ricardo Lopez
Join Date: Oct 2013
Posts: 19
Rep Power: 13
RicardoLB is on a distinguished road
Hello!

After surfing through the forums, I think I found out what was happening. Initially, I was using blockMesh to generate my floating body (like in the floatingObject tutorial), and the simulation worked. The problem was switching to snappyHexMesh! I modified the fvSolution file, inspired on the DTCHull tutorial (I am now using GAMG as the solver), and things (for the moment), seem to work. I am not having errors, the time steps are not tending to zero and the linear speed in the x-axis is not exploding.

Ricardo
RicardoLB is offline   Reply With Quote

Old   July 14, 2015, 08:03
Default
  #137
New Member
 
Agnese Paci
Join Date: May 2015
Location: Bologna, Italy
Posts: 14
Rep Power: 11
agnip is on a distinguished road
Hi Ricardo,
I'm working on the same topic, but I can't run ihDyMFoam with a floating body.
I downloaded your model and I saw I have the same set up,
but I always get this error:

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:?
#4 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMa trix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:?
#5 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#6 Foam::fvMatrix<double>::solveSegregated(Foam::dict ionary const&) at ??:?
#7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
#8
at ??:?
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10
at ??:?
Floating point exception (core dumped)

Did you ever get it? how did you solve it?
I can't understand my mistakes....
Thank you very very much!
Agnese
agnip is offline   Reply With Quote

Old   July 14, 2015, 08:06
Default
  #138
New Member
 
Ricardo Lopez
Join Date: Oct 2013
Posts: 19
Rep Power: 13
RicardoLB is on a distinguished road
Agnese, mi sa che ci siamo conosciuti al corso di OpenFOAM a Monaco...

Regarding your question, please see what I just wrote: modify your fvSolution file based on the DTCHull tutorial (multiphase>interDyMFoam>ras).

Saluti!
Ricardo
RicardoLB is offline   Reply With Quote

Old   July 14, 2015, 08:14
Default
  #139
New Member
 
Agnese Paci
Join Date: May 2015
Location: Bologna, Italy
Posts: 14
Rep Power: 11
agnip is on a distinguished road
Ciao Ricardo!!!
guarda te! tutto bene?

I tried to change the solver, but I get the same error, and I get this error also without SnappyhexMesh... just with the floatingObkect (as the tutorial)

thank you!
Agnese
agnip is offline   Reply With Quote

Old   July 14, 2015, 14:23
Default
  #140
Member
 
Join Date: Apr 2015
Posts: 42
Rep Power: 11
HosseinB is on a distinguished road
Hi Pablo and thanks for your reply.

I figured out what was causing the wave attenuation by location; it was a large Courant number. When I reduced it from 0.5 for a base case to a lower value of 0.2 (for both maxCo and maxAlphaCo), the results improved significantly. See the attached please.

Have you seen such a dependance on the Courant before?

A question for you re: "Although turbulence was not formulated for transient simulations, or two phase flows":

Does this mean the ihFoam is not able (or not fully able?) to model turbulence for a wave-structure interaction problem? Please elaborate on this.


Cheers,
Hossein



Quote:
Originally Posted by Phicau View Post
Hi Hossein,

turbulence dissipates the energy from the domain, making the wave height smaller and smaller. Although turbulence was not formulated for transient simulations, or two phase flows, I have never experienced such a dramatic effect in any of my simulations.

I suggest that you check your boundary conditions and initial levels.

Best,

Pablo
Attached Images
File Type: jpg VOF1_AND_VOF7_Low_base_COURANT.jpg (52.2 KB, 48 views)
mo_na likes this.
HosseinB 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:34.