- **OpenFOAM Running, Solving & CFD**
(*http://www.cfd-online.com/Forums/openfoam-solving/*)

- - **transmissive BC / numerical beach**
(*http://www.cfd-online.com/Forums/openfoam-solving/82074-transmissive-bc-numerical-beach.html*)

transmissive BC / numerical beachHi guys,
I have a problem with my BC. I want to have a simple two phase simulation of water flowing around a ship. Therfore I use interFoam with the k-Omega-SST turbulence model. As BC I use a seperate water-inlet beside an airinlet, for the water domain I have defined BC called freestream and for the air domain I have defined an atmosphere. Actually freestream and atmosphere should be transmissve, but for some reason (I think) I get waves reflecting from the 'outlet' or somthing is wrong with the inlet. The BC are as follows: U freestream: inletOutlet uniform ( X Y Z) uniform ( X Y Z) waterInlet fixedValue uniform ( X Y Z) p_rgh freestream: zeroGradient waterInlet: zeroGradient However I discussed that problem with some people and finally got the hint to use a numerical beach instead of transmissive BC and related to that I found some slides from Eric Paterson with an added damping term for the solver but I don't know how to include this into my problem and how to tell the solver that it just shall add this term for x< a certain value. The slides I read you find here: http://powerlab.fsb.hr/ped/kturbo/op...nNuTTS2009.pdf jump to slide 17 I hope somebody can help me If more information is required let me know I will provide it. best regards Colin |

Hey Colin,
I think we are working on a similar task - and might have the same problem! I'm not simulating flow around a ship, but around an offshore structure, using interFoam and (later) k-omega-sst as well. For the inlet, I'm using groovyBC to define U and alpha1, which works quite well for waves and currents. The problem with the outlet BC still remains, as zeroGradient for U and alpha do not work because of reflections. See also my post http://www.cfd-online.com/Forums/ope...am-solver.html. Unfortunately, no answer until now... What kind of outlet conditions have you yet tried? For waves, an extended grid (in x-direction) to the outlet works for some time/waves. For long-term simulations it's also not working in my case, as some reflections still occur and result in simulation crashes. I also had a closer look at Eric Patersons slides on his groovyWaveTank. Some paper on 'absorbing beaches' might explain the idea behind the numerical beach, see e.g. - A. Clément: Coupling of Two Absorbing Boundary Conditions for 2D Time-Domain Simulations of Free Surface Gravity Waves - Stéphan T. Grilli and Juan Horrillo: Numerical generation and absorption of fully nonlinear periodic waves which look quite similar to what has been done for the groovyWaveTank. I'd say it might be a good idea working together on this topic? Temporarily I'm using the 'workaround' with the extended mesh until finding/implementing a better solution... Arne |

Hi Arne,
well I tried several things to get rid of the reflections. My first try were the 'special' outlet BC: p_rgh for outlet: type buoyantPressure gradient uniform 0 rho rho value uniform 0 U for outlet type zeroGradient alpha1 at the outlet: type zeroGradient Then later I changed to the freestream BC also for the outlet hoping that they are transmissive. They are not :( So my current try is the same like yours. Make the domain that big that the reflections do not matter within the given time span. Yesterday I read about waveTransmissive BC in the documentation. But they are just mentioned in an example code and not in the official listing of the original and derived patch types. Thats anoying as well. So this is where I'm now. Im'm still awaiting some answers from some people and I hope they can help me. As soon as I have something I will let you know. best regards Colin PS: thanks for the hint with the papers I will have a look at them. |

Ok. Btw: Do you have steady current or waves? In the first case, setting inlet and outlet to a fixed value e.g. using groovyBC works - at least if the reflections coming from your ship are not too large.
I also had a look at waveTransmissive, but this might not have been coded for multiphase flow... |

yes I have an unifrom velocity field in the whole domain so I suppose this is a steady current.
However I haven't used groovyBC. But defining the velocity uniform for the complete inlet patch works out fine so far (if this is not the reason for the reflections). Waves are just generated from the ship hull and not at the inlet, for I try to get the calm water resistance of the vessel and the generated wave pattern. Large in what terms you mean (long wave length or big amplitudes ?) |

Hey. By 'large' I mean not in terms of wavelength or height (did not calculate it), just small enough that they are not influencing your boundary conditions themselves, so that the simulation could crash.
Btw: Are you setting the initial velocity in the whole water domain using setFields for time 0? 2nd: For your mesh extension, what factor (in terms of increasing cell size/edge length) are you using? 3rd: A bit 'off-topic'. How do you look at your wave heights/time at certain probe locations (eg. for comparison with analytic solutions)? I have started using the sample tool and pyFoam, but can't get really familiar with it... |

Hi Arne,
1) yes I use setFields to get a certain velocity in the whole domain. currently it is about 7.1 m/s in x-direction like at the inlet. 2) this part I don't get. Actually I don't know much about my mesh. I'm working with a simple graded blockMesh which is fairly coarse (1 cell is several cubic meter big the whole domain is 3510000 m³ big) And finally I'm refining the mesh in the parts I'm interested in eg free surface and close to the hull so my final mesh has about 1.9 M cells. I hope the information you are looking for is mentioned above, otherwise just ask again. 3) That is actually very easy. I don't use pyFoam but paraFoam to get the x y z coordinates of the plane where alpha1 equals 0.5 and this data I can export to excell and calculate the wave hight, with the other information I have from my domain / ship. This I especialy use for the wave elevation along the hull for example. Edit: The simulation up to now never crashedeverything looks very stable and nothing is exceeding. |

Thanks Colin.
2: I did not mean your overall mesh size, but was only interested in the area of the 'extended mesh' size near to the outlet, in order to numerically damp the waves. But now I see, you are using a constant (and sometimes refined) mesh size, also near the outlet, right? So forget about my question... 3: Ok, will have a try with ParaView again. But I think its not (at least easily) possible to write about wave heights in an xy plot only for certain probe locations over time. Or am I wrong? |

1 Attachment(s)
2) now I understand. Well since I'm not using the beach yet I don't have
such a part now. But as soon as I figure out how to use it I will let you know. 3) Over time I'm not sure. I would guess it is possible. I describe a procedure and hope that is what you want: You create a wave pattern. (contur of alpha1 = 0.5 maybe elevation on that filter as well) You cut out a slice where you want to observe the wave hight. You switch of the elevation filter and should have now a line with the wave elevation. Then you can either export this data for each time step and do something with excell or you create an animation and see what happens. Or you simply flip around between the time steps in paraview to get a movie Attached you find a pdf which clearify what I mean. Focus on the green line. This is the wave hight with the x axis as still water level and the y axis giving the wave hight in meters (actually the z values). This are the exported data from paraview and they als can be shown there also as a 'movie' (which I think you mean with over time) |

Hi Colin,
I was wondering if you have found a solution to get rid of those reflection waves coming from the hull? I'm playing around with LTSInterFoam and still get those doggy little waves... Thanks, Ben |

All times are GMT -4. The time now is 08:31. |