CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Boundary condition problems

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2011, 06:46
Question Boundary condition problems
  #1
New Member
 
Rose Lambert
Join Date: Jun 2011
Posts: 6
Rep Power: 14
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);

boundaryField
{
inlet
{
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 (
);
}
outlet
{
type zeroGradient;
}
bottom
{
type slip;
}
atmosphere
{
type pressureInletOutletVelocity;
tangentialVelocity uniform (1 0 0);
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}


Thanks,

Rose
Rose2011 is offline   Reply With Quote

Old   July 1, 2011, 07:21
Default
  #2
Member
 
David GISEN
Join Date: Jul 2009
Location: Germany
Posts: 68
Rep Power: 16
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.
Cheers
David
David* is offline   Reply With Quote

Old   July 1, 2011, 12:00
Default
  #3
New Member
 
Rose Lambert
Join Date: Jun 2011
Posts: 6
Rep Power: 14
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,
Rose
Rose2011 is offline   Reply With Quote

Reply

Tags
boundary condition, groovybc, wave tank


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
[Commercial meshers] Boundary condition problems (OpenFOAM) Milos OpenFOAM Meshing & Mesh Conversion 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 11:44


All times are GMT -4. The time now is 15:00.