CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

slip & noslip boundary condition for dynamic mesh, how to implement?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 17, 2016, 04:24
Default slip & noslip boundary condition for dynamic mesh, how to implement?
  #1
New Member
 
Olaf Schiemann
Join Date: Feb 2016
Posts: 10
Rep Power: 2
oschi is on a distinguished road
Hello,
how would I implement a slip and noslip boundary condition on a dynamic, deforming mesh?

I have a small test case, which models the water flow inside a "bouncing cube", a rectangular mesh growing/shrinking periodically in the horizontal/vertical direction.
The motion of the walls is not transferred to the water, whatever boundary condition I use (slip, no slip, fixedValue (0 0 0 )).

Is it possible to implement a boundary condition that takes the boundary velocity into account and lets me set the relative fluid velocity, so that (0 0 0) translates into a "real" noslip condition?

I am testing with rhoPimpleDyMFoam of OpenFOAM 2.4.0. You will definitely help me as well, if you know of a solution using another solver or OpenFOAM version.

Greetings
Olaf
oschi is offline   Reply With Quote

Old   February 18, 2016, 05:18
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Delft, Netherlands
Posts: 328
Rep Power: 12
tomf is on a distinguished road
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

For dynamic mesh cases a no-slip wall is defined as movingWallVelocity, have a look here:
http://cfd.direct/openfoam/user-guide/boundaries/

Also have a look at the tutorials.

I would not know is there is a slip velocity for a moving wall.

Regards,
Tom
tomf is offline   Reply With Quote

Old   February 18, 2016, 13:47
Default
  #3
New Member
 
Olaf Schiemann
Join Date: Feb 2016
Posts: 10
Rep Power: 2
oschi is on a distinguished road
Thank you Tom,
but movingWallVelocity does not work correctly. I think it is using only the wall motion at the first simulation time step and assumes that the wall motion doesn't change.

I have attached a tiny modification of the compressible/pimpleDyMFoam/movingCone tutorial. The only change I have made is a time-dependent table for the movingWall velocity in 0/pointMotionUx:
Code:
...
boundaryField
{
    movingWall
    {
        //type            uniformFixedValue;
        //uniformValue    constant 1;
        type            uniformFixedValue;
        uniformValue    table (
          (0. 1.)
          (0.00149 1.)
          (0.00151 -1.)
          (0.003 -1.)
        );
    }...
If you run "blockMesh && pimpleDyMFoam" on this case, you will see, that the fluid attached to the movingWall is always flowing at (1 0 0) m/s, although it must change to (-1 0 0) m/s after 1.51ms.

Do you know, how to correct this bug in movingWallVelocity? Or is it a bug in the dynamicMotionSolver?

Greetings
Olaf
Attached Files
File Type: zip movingCone.zip (7.3 KB, 4 views)
oschi is offline   Reply With Quote

Old   February 19, 2016, 04:54
Default
  #4
Member
 
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 56
Rep Power: 12
JNSN is on a distinguished road
Hi Olaf,

in the attached case you have set the boundary condition for U to fixedValue. This is wrong. If you change to movingWallVelocity, then the velocities at the wall are updated according to the mesh motion, i.e. changing from 1 to -1.

Best regards,
Jan
JNSN is offline   Reply With Quote

Old   February 19, 2016, 05:31
Default
  #5
New Member
 
Olaf Schiemann
Join Date: Feb 2016
Posts: 10
Rep Power: 2
oschi is on a distinguished road
Hi Jan,
you are absolutely right.

I am sorry, I have tested so many settings that I got confused. movingWallVelocity works fine for both pimpleDyMFoam and rhoPimpleDyMFoam.

Another question:
My confusion started, because pointMotionUx translates only the boundary, not the internal points, if I use groovyBC to express arbitrary, time dependent motions:
Code:
// 0/pointMotionUx:
boundaryField
{
    movingWall
    {
        type        groovyBC;
        valueExpression "toPoint(1)"; //"toPoint(cos(pi*time()/0.003))";
    }...
This problem is still around, independent from the (now solved) relative fluid velocity question.
Do you know, why a groovyBC does not allow to move the internal mesh points, whereas e.g. uniformFixedValue works correctly?

Greetings
Olaf
oschi is offline   Reply With Quote

Old   February 19, 2016, 08:30
Default
  #6
Member
 
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 56
Rep Power: 12
JNSN is on a distinguished road
Hi Olaf,

I have no experience with groovyBC. Maybe codedFixedValue does what you want. I have used it once and it worked well. See the example code for a sinusodial motion in x-direction:
Code:
    movingWall
    {
        type codedFixedValue; 
        value uniform 0; 
        redirectType rampedFixedValue; 
        code 
        #{ 
            scalar t = this->db().time().value();
            scalar om = 0.5;
            scalar a = -1.;
            //Info << "movingWall: " << a*sin(om*t) << endl;
            operator==(a*sin(om*t)); 
        #}; 
    }
Best regards,
Jan
JNSN is offline   Reply With Quote

Reply

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
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 27 November 2, 2015 18:04
No layers in a small gap bobburnquist OpenFOAM Native Meshers: snappyHexMesh and Others 6 August 26, 2015 09:38
turbineSiting tutorial: slip condition at top boundary gives unexpected result letzel OpenFOAM 0 June 6, 2014 05:25
Implement constant heat flux boundary condition new_at_this Main CFD Forum 2 April 6, 2012 23:35
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


All times are GMT -4. The time now is 23:29.