CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Running, Solving & CFD

time vary boundary condition to simulate waves in interFoam or equivalent

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

LinkBack Thread Tools Display Modes
Old   June 9, 2014, 03:27
Default time vary boundary condition to simulate waves in interFoam or equivalent
Join Date: Jul 2011
Posts: 99
Rep Power: 6
haze_1986 is on a distinguished road
Hi all,

I am currently required to run a simulation that takes in boundary conditions that are time varying from a data file, basically with alpha1 and velocity beneath the surface of the water at every time step. Would like to find out what is the best way I can achieve this.
Generally, from many wave tank simulations we normally use groovy BC for regular waves, which we have been using for a while now: From

For a surface elevation following the second order stokes wave,
       type            groovyBC;
       valueExpression "(pos().z<=A*cos(-w*time())+0.5*k*A*A*cos(2*(-w*time()))) ? 1 : 0";
       variables       "l=5;A=0.1;g=vector(0,0,-9.81);k=2*pi/l;w=sqrt(k*mag(g));";
       timelines       ();
And for the velocity under the surface elevation,

       type            groovyBC;
       valueExpression "(pos().z<=A*cos(-w*time())+0.5*k*A*A*cos(2*(-w*time()))) ? vector( A*w*exp(k*pos().z)*cos(-w*time()), 0, A*w*exp(k*pos().z)*sin(-w*time())) : vector(0,0,0)";
       variables       "l=5;A=0.1;g=vector(0,0,-9.81);k=2*pi/l;w=sqrt(k*mag(g));";
       timelines       ();
I am thus not sure in the current case how I can proceed if the parameters are irregular and known, stored in a data file of the surface elevation and velocities at the inlet boundary.

haze_1986 is offline   Reply With Quote


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
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 02:20
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
Boundary condition varying in space and time jasouza1974 OpenFOAM 0 January 17, 2012 10:06
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM 6 April 12, 2011 11:24

All times are GMT -4. The time now is 22:37.