CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM

Boundary condition problems

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   July 1, 2011, 06:46
Question Boundary condition problems
New Member
Rose Lambert
Join Date: Jun 2011
Posts: 6
Rep Power: 8
Rose2011 is on a distinguished road
Hi Everyone,

I hope someone can help me with some problems I am having producing waves using groovyBC in OpenFOam 1.7.1. I have successfully installed groovyBC and can run the GroovyWaveTank example and successfully produce waves. However when I enter my equations (Stokes second order, involving several terms and hyperbolic functions for both the surface elevation and velocity) the simulation crashes when it starts to model the trough of the wave. I don't think this is related to the hyperbolic functions but to the pos().z condition.

I have tried simplifying the equations by removing the second terms. If I do this and change the initial level of water to z=0.5m (originally water was initially at z=0m with a depth of 1m like in GroovyWaveTank) I can produce waves but this scenario is not physically correct.

I realise this may be a logic problem with the way I have entered the equations but I am only an OpenFoam novice and I have spent the better part of two weeks working on this problem. I would really appreciate a fresh perspective or some ideas on how to fix this problem. I do not have a form of the velocity equation that uses the surface elevation (such as in the GrooveWaveTank example).

The code I am using for the velocity is:

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

type groovyBC;
refValue uniform (0 0 0);
refGradient uniform (0 0 0);
valueFraction uniform 1;
value uniform (0 0 0);
valueExpression "(pos().z<= q*cos(-phi*time())+ (pow(H,2)*k/16) * cos (2*-phi*time()) * (2+cosh(2*k*h))*cosh(k*h)/ pow(sinh(k*h),3) )? vector( cos(k*s-phi*time())*q*mag(g)*k/phi* cosh(k*c)/cosh(k*h) +3/16*cos(2*(k*s-phi*time()))*pow(H,2)*phi*k*cosh(2*k*c)/pow(sinh(k*h),4), 0, sin(k*s-phi*time())*q*mag(g)*k/phi* sinh(k*c)/cosh(k*h) +3/16*sin(2*(k*s-phi*time()))*pow(H,2)*phi*k*sinh(2*k*c)/pow(sinh(k*h),4) ) : vector(0,0,0)";
gradientExpression "vector(0,0,0)";
fractionExpression "1";
variables "L=2;s=0;H=0.2;q=H/2;h=1;c=h+q;g=vector(0,0,-9.81);k=2*pi/L;phi=sqrt(k*mag(g)*tanh(k*h));";
timelines (
type zeroGradient;
type slip;
type pressureInletOutletVelocity;
tangentialVelocity uniform (1 0 0);
value uniform (0 0 0);
type empty;


Rose2011 is offline   Reply With Quote

Old   July 1, 2011, 07:21
Join Date: Jul 2009
Location: Germany
Posts: 54
Rep Power: 10
David* is on a distinguished road
Hi Rose,
as a first approach you can try to simulate Linear Waves with e. g. the equations given in the Coastal Engineering Manual (free download available). I made the experience that it is very useful to keep the initial water level at z=0 and to fit the surrounding mesh to this condition. It makes the equations easier. Also check if your wave parameters fit with the wave theory you want to apply.
David* is offline   Reply With Quote

Old   July 1, 2011, 12:00
New Member
Rose Lambert
Join Date: Jun 2011
Posts: 6
Rep Power: 8
Rose2011 is on a distinguished road
Thanks to your suggestions David (going back to basics!), I found the mistake I had in my formula. Guess it always pays to take a step back sometimes.

Many thanks,
Rose2011 is offline   Reply With Quote


boundary condition, groovybc, wave tank

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Boundary condition problems (OpenFOAM) Milos OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 13 October 13, 2016 19:58
How exactly the "pressure outlet" bdry condition compute properties on the boundary? yating9901 FLUENT 3 June 28, 2010 12:26
Boundary condition problems imported msh milos OpenFOAM Running, Solving & CFD 8 October 6, 2009 08:50
Airfoil boundary condition Frank Main CFD Forum 1 April 21, 2008 18:36
How to set boundary condition in Fluent for the fo Peiyong FLUENT 1 November 10, 2006 12:44

All times are GMT -4. The time now is 20:13.