CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] interFoam groovyBC from other data (https://www.cfd-online.com/Forums/openfoam-community-contributions/117833-interfoam-groovybc-other-data.html)

haze_1986 May 16, 2013 01:57

interFoam groovyBC from other data
 
Hi all, I am starting out on a near-field free surface simulation using data from another depth averaged data. I wanted to test out interFoam first with groovyBC feeding in surface elevation and velocities from all 4 boundaries NESW.

I have successfully ran modifying from damBreak and groovyWaveTank and it works fine when there is only one BC from the left and the rest are either empty or zeroGradient. I have tried for both linear Airy and 2nd order Stokes wave with deep water assumptions for the velocities.

When I tried to use groovyBC for both left and right, interFoam crashes, sometimes immediately and sometimes after quite a number of time steps. Am I missing out something here? Please advise, thanks.

gschaider May 16, 2013 06:37

Quote:

Originally Posted by haze_1986 (Post 427885)
Hi all, I am starting out on a near-field free surface simulation using data from another depth averaged data. I wanted to test out interFoam first with groovyBC feeding in surface elevation and velocities from all 4 boundaries NESW.

I have successfully ran modifying from damBreak and groovyWaveTank and it works fine when there is only one BC from the left and the rest are either empty or zeroGradient. I have tried for both linear Airy and 2nd order Stokes wave with deep water assumptions for the velocities.

When I tried to use groovyBC for both left and right, interFoam crashes, sometimes immediately and sometimes after quite a number of time steps. Am I missing out something here? Please advise, thanks.

I think the problem is not groovyBC but the physics you're trying to impose. For instance setting Dirichlet-conditions on all four boundaries is almost never a good idea as it is bound to violate mass conservation (even if the data you use is "good": numerical inaccuracies are inevitable and will add up)

haze_1986 May 16, 2013 09:02

Quote:

Originally Posted by gschaider (Post 427957)
I think the problem is not groovyBC but the physics you're trying to impose. For instance setting Dirichlet-conditions on all four boundaries is almost never a good idea as it is bound to violate mass conservation (even if the data you use is "good": numerical inaccuracies are inevitable and will add up)

While I fully agree on your point, I've narrowed down the issue to setting the inlet to the right hand side. It does not seem to work the way as the left hand inlet, thus causing the crash. I used the same boundary condition except adding a negative sign in front of u-velocity. The left hand BC has been changed to zeroGradient. Am I doing something wrong?


All times are GMT -4. The time now is 12:27.