CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Meshing & Mesh Conversion

[dynamicMesh] Implementing a linear oscillating wall BC???

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 21, 2014, 08:12
Default [dynamicMesh] Implementing a linear oscillating wall BC???
  #1
New Member
 
Miha Pogačar
Join Date: Jun 2014
Posts: 3
Rep Power: 5
miha.pog is on a distinguished road
Hello,

I'm a dynamicMesh newbie trying to simulate (in 2D) an ultrasonic horn in water. I've been trying to implement a moving wall BC - the horn face zone oscillating in the vertical direction, but failed to do so.
I've searched through the forum and found some relevant info, but I can't make out what is the most effective way to prescribe sinusoidal oscillation of the horn.

My blockMeshDict file:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1e-3;

vertices                     // P : (X Y Z)
(
// * * * * * * * * * * * * * // Ravnina Z = 0 mm
    (0 0 0)            // 00 
    (6.15 0 0)        // 01
    (18.85 0 0)        // 02
    (25    0 0)        // 03
    (25 1 0)        // 04
    (18.85 1 0)        // 05
    (6.15 1 0)        // 06
    (0 1 0)            // 07
// * * * * * * * * * * * * * // Ravnina Z = 120 mm
    (0 0 120)        // 08 
    (6.15 0 120)    // 09
    (18.85 0 120)    // 10
    (25    0 120)        // 11
    (25 1 120)        // 12
    (18.85 1 120)    // 13
    (6.15 1 120)    // 14
    (0 1 120)        // 15
// * * * * * * * * * * * * * // Ravnina Z = 150 mm
    (0 0 150)        // 16 
    (6.15 0 150)    // 17
    (18.85 0 150)    // 18
    (25    0 150)        // 19
    (25 1 150)        // 20
    (18.85 1 150)    // 21
    (6.15 1 150)    // 22
    (0 1 150)        // 23
// * * * * * * * * * * * * * //
);

blocks
(
    hex (0 1 6 7 8 9 14 15)            (7 1 120)    simpleGrading (1 1 1)    // 00
    hex (1 2 5 6 9 10 13 14)        (13 1 120)    simpleGrading (1 1 1)    // 01
    hex (2 3 4 5 10 11 12 13)        (7 1 120)    simpleGrading (1 1 1)    // 02
    hex (10 11 12 13 18 19 20 21)    (7 1 30)    simpleGrading (1 1 1)    // 03
    hex (8 9 14 15 16 17 22 23)        (7 1 30)    simpleGrading (1 1 1)    // 04
);

edges
(
);

boundary
(
    /* Stene posode */

    leftWall                // Stena - Levo
    {
        type wall;
        faces
        (
            (0 7 15 8)        /* Spodaj */
            (8 15 23 16)    /* Zgoraj */
        );
    }
    rightWall                // Stena - Desno
    {
        type wall;
        faces
        (
            (3 4 12 11)        /* Spodaj */
            (11 12 20 19)    /* Zgoraj */
        );
    }
    bottomWall                // Dno
    {
        type wall;
        faces
        (
            (0 1 6 7)         /* Levo */
            (1 2 5 6)         /* Sredina */
            (2 3 4 5)         /* Desno */
        );
    }

    /* Vrhnja ploskev (gl. vode) */

    lidIOLeft
    {
        type patch;
        faces
        (
            (16 17 22 23)    /* Levo */
        );
    }
    lidIORight
    {
        type patch;
        faces
        (
            (18 19 20 21)    /* Desno */
        );
    }

    /* Sonotroda */

    cavHornFace                // Celna ploskev
    {
        type wall;
        faces
        (
            (9 10 13 14)
        );
    }
    cavHornWallLeft            // Stena - Levo
    {
        type wall;
        faces
        (
            (9 14 22 17)
        );
    }
    cavHornWallRight        // Stena - Desno
    {
        type wall;
        faces
        (
            (10 13 21 18)
        );
    }
);

mergePatchPairs
(
);


// ************************************************************************* //
My dynamicMeshDict file:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh         solidBodyMotionFvMesh;

motionSolverLibs     ("libfvMotionSolvers.so");

solidBodyMotionFvMeshCoeffs
{
    cellZone                        cavHornFace;

    solidBodyMotionFunction            oscillatingLinearMotion;

    oscillatingLinearMotionCoeffs
    {
        amplitude    (0 0 2);
        omega        12.56;        // rad/s  (.5 rps)
    }

}

// ************************************************************************* //
I've found some sources telling that one should change the source code (using .H files and compiling it in the working directory) and others that a relevant function already exists (i.e. oscillatingLinearMotion.C)

I could be missing some additional case setup, but so far I'm out of ideas...

Any help/suggestions would be very welcome.

Miha
miha.pog is offline   Reply With Quote

Old   September 15, 2015, 20:47
Default
  #2
New Member
 
Nevada
Join Date: Apr 2014
Posts: 24
Rep Power: 5
razi.me05 is on a distinguished road
Hi could you figure out how to put the wall as moving face? I'm stuck in same problem
razi.me05 is offline   Reply With Quote

Reply

Tags
boundary, condition, linear, oscillating, wall

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
Divergence in AMG solver! marina FLUENT 18 August 17, 2017 01:25
suitable boundary condition for scavenging process? immortality OpenFOAM Running, Solving & CFD 3 January 25, 2013 20:10
IdeasUnvToFoam Bug amp Fix benru OpenFOAM Bugs 42 November 13, 2009 08:59
UDF for oscillating wall Rajneesh FLUENT 0 February 21, 2006 22:44
Wall functions Abhijit Tilak Main CFD Forum 6 February 5, 1999 02:16


All times are GMT -4. The time now is 05:01.