miha.pog |
October 21, 2014 08:12 |
[dynamicMesh] Implementing a linear oscillating wall BC???
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
|