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

SixDoFRigidBodyMotion under OF2.3 ( self oscillating cylinder)

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 21, 2014, 04:30
Default SixDoFRigidBodyMotion under OF2.3 ( self oscillating cylinder)
  #1
Member
 
Join Date: Dec 2013
Location: Newcastle
Posts: 54
Rep Power: 12
Scabbard is on a distinguished road
Dear Foamers,

I just start to learn how to use the SixDoFRigidBodyMotion to solve a self oscillating cylinder case. I let the cylinder can oscillating in transverse side without rotation. However during the simulation, the cylinder keeping moving on one side, even I set 2 spring to restrain it.

Here is the error

Code:
Courant Number mean: 0.0109312387968 max: 1.08925409942
Time = 10.3


Restraint verticalSpring1:  attachmentPt - anchor (0 -1.0799209127 0) spring length 1.0799209127 force (-0 0.449064904401 -0)
Restraint verticalSpring2:  attachmentPt - anchor (0 0.920079087297 0) spring length 0.920079087297 force (0 0.449064904401 0)
Centre of mass: (0 -0.0799209127033 0.1875)
Linear velocity: (0 -0.0532063906146 0)
Angular velocity: (0 0 0)
DILUPBiCG:  Solving for Ux, Initial residual = 9.04437162716e-05, Final residual = 2.65680565916e-07, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.000267538785308, Final residual = 1.36657039582e-06, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.000155422991715, Final residual = 3.50471070684e-07, No Iterations 1
DICPCG:  Solving for p, Initial residual = 0.00519447486232, Final residual = 5.14668562099e-05, No Iterations 37
DICPCG:  Solving for p, Initial residual = 0.000828384358588, Final residual = 8.18767989941e-06, No Iterations 80
time step continuity errors : sum local = 4.06532945873e-12, global = -9.22735778686e-14, cumulative = 1.60535882438e-10
DICPCG:  Solving for p, Initial residual = 0.000311192366693, Final residual = 3.10976258001e-06, No Iterations 84
DICPCG:  Solving for p, Initial residual = 5.90847533569e-05, Final residual = 9.91055128904e-07, No Iterations 258
time step continuity errors : sum local = 4.92101045989e-13, global = -1.4595937013e-14, cumulative = 1.60521286501e-10
DILUPBiCG:  Solving for k, Initial residual = 3.65228017521e-05, Final residual = 3.54219785688e-07, No Iterations 1
ExecutionTime = 20639.33 s  ClockTime = 20761 s

fieldAverage fieldAverage1 output:
    Calculating averages

Courant Number mean: 0.0106133975758 max: 21.0445882013
Time = 13.696


Restraint verticalSpring1:  attachmentPt - anchor (0 -1.22101441506 0) spring length 1.22101441506 force (-0 1.02646479668 -0)
Restraint verticalSpring2:  attachmentPt - anchor (0 0.778985584937 0) spring length 0.778985584937 force (0 1.02646479668 0)
Centre of mass: (0 -0.221014415063 0.1875)
Linear velocity: (0 -0.00171786018482 0)
Angular velocity: (0 0 0)
DILUPBiCG:  Solving for Ux, Initial residual = 0.000981734792019, Final residual = 5.08165819999e-06, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 0.0197041717416, Final residual = 7.16491372836e-06, No Iterations 3
DILUPBiCG:  Solving for Uz, Initial residual = 0.005202940185, Final residual = 4.18296491457e-06, No Iterations 3
DICPCG:  Solving for p, Initial residual = 0.732227583455, Final residual = 0.00731362161027, No Iterations 23
DICPCG:  Solving for p, Initial residual = 0.0619699691031, Final residual = 0.000604818066356, No Iterations 61
time step continuity errors : sum local = 7.22207466644e-08, global = -1.86004765892e-13, cumulative = 1.81335038201e-10
DICPCG:  Solving for p, Initial residual = 0.320262352751, Final residual = 0.0031161672658, No Iterations 30
DICPCG:  Solving for p, Initial residual = 0.0452874168867, Final residual = 9.81923937282e-07, No Iterations 504
time step continuity errors : sum local = 1.46216565128e-10, global = 4.21289409294e-13, cumulative = 1.81756327611e-10
DILUPBiCG:  Solving for k, Initial residual = 0.542737284326, Final residual = 4.91709917765e-07, No Iterations 6
bounding k, min: -320.225630407 max: 3160.9004272 average: 0.0228930866665
ExecutionTime = 27277.92 s  ClockTime = 27417 s

fieldAverage fieldAverage1 output:
    Calculating averages

Courant Number mean: 0.0107215198588 max: 84.1974069195
Time = 13.698


Restraint verticalSpring1:  attachmentPt - anchor (0 -1.22101775679 0) spring length 1.22101775679 force (-0 1.02634097701 -0)
Restraint verticalSpring2:  attachmentPt - anchor (0 0.778982243211 0) spring length 0.778982243211 force (0 1.02634097701 0)
Centre of mass: (0 -0.221017756789 0.1875)
Linear velocity: (0 -0.00158230773631 0)
Angular velocity: (0 0 0)
DILUPBiCG:  Solving for Ux, Initial residual = 0.00673451447727, Final residual = 4.24583889248e-07, No Iterations 5
DILUPBiCG:  Solving for Uy, Initial residual = 0.100125393852, Final residual = 5.78370299627e-07, No Iterations 6
DILUPBiCG:  Solving for Uz, Initial residual = 0.0394256338853, Final residual = 6.85940002997e-06, No Iterations 5
DICPCG:  Solving for p, Initial residual = 0.748736219048, Final residual = 0.00746554410887, No Iterations 30
DICPCG:  Solving for p, Initial residual = 0.0519635582214, Final residual = 0.000513419210323, No Iterations 132
time step continuity errors : sum local = 1.72054986051e-07, global = 8.12991642331e-09, cumulative = 8.31167275093e-09
DICPCG:  Solving for p, Initial residual = 0.247753969483, Final residual = 0.00235112009563, No Iterations 22
DICPCG:  Solving for p, Initial residual = 0.0356436546234, Final residual = 9.92662333369e-07, No Iterations 486
time step continuity errors : sum local = 3.42556826514e-10, global = -5.13481427704e-13, cumulative = 8.3111592695e-09
DILUPBiCG:  Solving for k, Initial residual = 0.577722517719, Final residual = 8.89588409476e-06, No Iterations 8
bounding k, min: -145.00281533 max: 25832.2022178 average: 0.159463524258
ExecutionTime = 27284.38 s  ClockTime = 27423 s

fieldAverage fieldAverage1 output:
    Calculating averages

Courant Number mean: 0.0112451548724 max: 128.020077496
Time = 13.7


Restraint verticalSpring1:  attachmentPt - anchor (0 -1.22102074429 0) spring length 1.22102074429 force (-0 1.02609233939 -0)
Restraint verticalSpring2:  attachmentPt - anchor (0 0.778979255706 0) spring length 0.778979255706 force (0 1.02609233939 0)
Centre of mass: (0 -0.221020744294 0.1875)
Linear velocity: (0 -0.00163579550348 0)
Angular velocity: (0 0 0)
DILUPBiCG:  Solving for Ux, Initial residual = 0.0260753175353, Final residual = 9.89829065521e-06, No Iterations 8
DILUPBiCG:  Solving for Uy, Initial residual = 0.250839697688, Final residual = 7.15796413028e-06, No Iterations 10
DILUPBiCG:  Solving for Uz, Initial residual = 0.106251779796, Final residual = 9.15101050695e-06, No Iterations 11
DICPCG:  Solving for p, Initial residual = 0.787515538158, Final residual = 0.00778539070755, No Iterations 39
DICPCG:  Solving for p, Initial residual = 0.0705072051515, Final residual = 0.000694330803838, No Iterations 111
time step continuity errors : sum local = 5.60486267258e-07, global = 6.82022557025e-09, cumulative = 1.51313848397e-08
DICPCG:  Solving for p, Initial residual = 0.426501354857, Final residual = 0.00390156619624, No Iterations 40
DICPCG:  Solving for p, Initial residual = 0.0618570371929, Final residual = 9.91201036366e-07, No Iterations 527
time step continuity errors : sum local = 9.08211203163e-10, global = 2.87831689472e-12, cumulative = 1.51342631566e-08
DILUPBiCG:  Solving for k, Initial residual = 0.583036768961, Final residual = 1.65629079001, No Iterations 1001
bounding k, min: -160992.181824 max: 283946.686233 average: 1.34641967111
ExecutionTime = 27308.97 s  ClockTime = 27448 s

fieldAverage fieldAverage1 output:
    Calculating averages

Courant Number mean: 0.0119781088857 max: 347.604475264
Time = 13.702


Restraint verticalSpring1:  attachmentPt - anchor (0 -1.22102429997 0) spring length 1.22102429997 force (-0 1.02652982604 -0)
Restraint verticalSpring2:  attachmentPt - anchor (0 0.778975700029 0) spring length 0.778975700029 force (0 1.02652982604 0)
Centre of mass: (0 -0.221024299971 0.1875)
Linear velocity: (0 -0.00284836446883 0)
Angular velocity: (0 0 0)
DILUPBiCG:  Solving for Ux, Initial residual = 0.0982341712235, Final residual = 4.45903351925e-06, No Iterations 26
DILUPBiCG:  Solving for Uy, Initial residual = 0.409462000123, Final residual = 3.86441059993e-06, No Iterations 21
DILUPBiCG:  Solving for Uz, Initial residual = 0.335905464232, Final residual = 9.14172833687e-06, No Iterations 25
DICPCG:  Solving for p, Initial residual = 0.888020796374, Final residual = 0.00827370568873, No Iterations 49
DICPCG:  Solving for p, Initial residual = 0.0718109060567, Final residual = 0.00067471345493, No Iterations 142
time step continuity errors : sum local = 1.91139587882e-06, global = -1.62091143245e-07, cumulative = -1.46956880089e-07
DICPCG:  Solving for p, Initial residual = 0.525498466427, Final residual = 0.00498104449879, No Iterations 47
DICPCG:  Solving for p, Initial residual = 0.0792089781293, Final residual = 9.95034005181e-07, No Iterations 571
time step continuity errors : sum local = 2.86061368525e-09, global = -3.61199521261e-11, cumulative = -1.46993000041e-07
DILUPBiCG:  Solving for k, Initial residual = 0.818441261845, Final residual = 0.831303805649, No Iterations 1001
bounding k, min: -1374675.08971 max: 2075441.99778 average: 17.086673809
ExecutionTime = 27335.15 s  ClockTime = 27474 s

fieldAverage fieldAverage1 output:
    Calculating averages

Courant Number mean: 0.0159705393611 max: 2131.89878069
Time = 13.704


Restraint verticalSpring1:  attachmentPt - anchor (0 -1.22103213775 0) spring length 1.22103213775 force (-0 1.029739174 -0)
Restraint verticalSpring2:  attachmentPt - anchor (0 0.778967862248 0) spring length 0.778967862248 force (0 1.029739174 0)
Centre of mass: (0 -0.221032137752 0.1875)
Linear velocity: (0 0.00174067934966 0)
Angular velocity: (0 0 0)
DILUPBiCG:  Solving for Ux, Initial residual = 0.361380147815, Final residual = 9.7336612789e-06, No Iterations 43
DILUPBiCG:  Solving for Uy, Initial residual = 0.71095276755, Final residual = 4.55302559739e-06, No Iterations 37
DILUPBiCG:  Solving for Uz, Initial residual = 0.505356221838, Final residual = 8.48014310685e-06, No Iterations 39
DICPCG:  Solving for p, Initial residual = 0.937083546566, Final residual = 0.00927643781904, No Iterations 73
DICPCG:  Solving for p, Initial residual = 0.0774371477986, Final residual = 0.000720015011389, No Iterations 140
time step continuity errors : sum local = 1.24288006078e-05, global = -8.62398331206e-07, cumulative = -1.00939133125e-06
DICPCG:  Solving for p, Initial residual = 0.500949169502, Final residual = 0.00470319735647, No Iterations 39
DICPCG:  Solving for p, Initial residual = 0.0660866709647, Final residual = 9.5764418153e-07, No Iterations 527
time step continuity errors : sum local = 1.47065754022e-08, global = -3.38323363926e-11, cumulative = -1.00942516358e-06
DILUPBiCG:  Solving for k, Initial residual = 0.902538467373, Final residual = 0.0189633224455, No Iterations 1001
bounding k, min: -5835637.83141 max: 12943805.3498 average: 291.91211712
ExecutionTime = 27360.46 s  ClockTime = 27499 s

fieldAverage fieldAverage1 output:
    Calculating averages

Courant Number mean: 0.0456887140939 max: 8344.68736926
Time = 13.706


Restraint verticalSpring1:  attachmentPt - anchor (0 -1.22101733725 0) spring length 1.22101733725 force (0 1.01289564537 0)
Restraint verticalSpring2:  attachmentPt - anchor (0 0.778982662747 0) spring length 0.778982662747 force (0 1.01289564537 0)
Centre of mass: (0 -0.221017337253 0.1875)
Linear velocity: (0 0.0389519586898 0)
Angular velocity: (0 0 0)
DILUPBiCG:  Solving for Ux, Initial residual = 0.578815755824, Final residual = 9.06929629318e-06, No Iterations 31
DILUPBiCG:  Solving for Uy, Initial residual = 0.661732278364, Final residual = 1.92735011577e-06, No Iterations 39
DILUPBiCG:  Solving for Uz, Initial residual = 0.60627751069, Final residual = 5.03433336641e-06, No Iterations 39
DICPCG:  Solving for p, Initial residual = 0.942145370572, Final residual = 0.00932981596287, No Iterations 142
DICPCG:  Solving for p, Initial residual = 0.145055141634, Final residual = 0.00144934655699, No Iterations 323
time step continuity errors : sum local = 0.000145834682691, global = 1.89661474403e-06, cumulative = 8.87189580444e-07
DICPCG:  Solving for p, Initial residual = 0.448655212254, Final residual = 0.00385821698642, No Iterations 52
DICPCG:  Solving for p, Initial residual = 0.0773656115561, Final residual = 9.81992226334e-07, No Iterations 545
time step continuity errors : sum local = 1.01029619804e-07, global = -4.31866480992e-12, cumulative = 8.87185261779e-07
DILUPBiCG:  Solving for k, Initial residual = 0.722784419631, Final residual = 8604.31406405, No Iterations 1001
bounding k, min: -1.06682692781e+12 max: 702527041717 average: -11285490.945
ExecutionTime = 27387.68 s  ClockTime = 27527 s

fieldAverage fieldAverage1 output:
    Calculating averages

Courant Number mean: 0.437784340694 max: 18673.1207543
Time = 13.708


Restraint verticalSpring1:  attachmentPt - anchor (0 -1.22087632992 0) spring length 1.22087632992 force (0 0.918723162238 0)
Restraint verticalSpring2:  attachmentPt - anchor (0 0.779123670083 0) spring length 0.779123670083 force (0 0.918723162238 0)
Centre of mass: (0 -0.220876329917 0.1875)
Linear velocity: (0 -1.42921474716 0)
Angular velocity: (0 0 0)
DILUPBiCG:  Solving for Ux, Initial residual = 0.825010891958, Final residual = 4.25291821493e-06, No Iterations 134
DILUPBiCG:  Solving for Uy, Initial residual = 0.880025015236, Final residual = 8.32614599604e-06, No Iterations 80
DILUPBiCG:  Solving for Uz, Initial residual = 0.759046120698, Final residual = 6.51395506138e-06, No Iterations 111
DICPCG:  Solving for p, Initial residual = 0.84751761744, Final residual = 0.00843329923351, No Iterations 166
DICPCG:  Solving for p, Initial residual = 0.0247560662329, Final residual = 0.000243293447222, No Iterations 327
time step continuity errors : sum local = 0.000878428953653, global = 3.35137197345e-05, cumulative = 3.44009049963e-05
DICPCG:  Solving for p, Initial residual = 0.0443514290475, Final residual = 0.000430525341493, No Iterations 84
DICPCG:  Solving for p, Initial residual = 0.0354620151593, Final residual = 9.78799544816e-07, No Iterations 511
time step continuity errors : sum local = 1.19416306863e-06, global = 3.07981790882e-08, cumulative = 3.44317031754e-05
DILUPBiCG:  Solving for k, Initial residual = 0.995406417042, Final residual = 6.45552929182e-06, No Iterations 31
bounding k, min: -35367714623.7 max: 31143213775.9 average: 672355.609645
ExecutionTime = 27403.17 s  ClockTime = 27542 s

fieldAverage fieldAverage1 output:
    Calculating averages

Courant Number mean: 1.55644669094 max: 39992.2311908
Time = 13.71


Restraint verticalSpring1:  attachmentPt - anchor (0 -1.22673419624 0) spring length 1.22673419624 force (-0 5.39102511079 -0)
Restraint verticalSpring2:  attachmentPt - anchor (0 0.773265803758 0) spring length 0.773265803758 force (0 5.39102511079 0)
Centre of mass: (0 -0.226734196242 0.1875)
Linear velocity: (0 -16.0199907538 0)
Angular velocity: (0 0 0)
DILUPBiCG:  Solving for Ux, Initial residual = 0.892427485833, Final residual = 8.14219573621e-06, No Iterations 118
DILUPBiCG:  Solving for Uy, Initial residual = 0.920370219391, Final residual = 1.88441933973e-06, No Iterations 110
DILUPBiCG:  Solving for Uz, Initial residual = 0.87089733049, Final residual = 9.5301214064e-06, No Iterations 100
DICPCG:  Solving for p, Initial residual = 0.895087839364, Final residual = 0.00775997586915, No Iterations 233
DICPCG:  Solving for p, Initial residual = 0.129722691674, Final residual = 0.00128850330874, No Iterations 193
time step continuity errors : sum local = 0.221081440384, global = 0.0509201671096, cumulative = 0.0509545988128
DICPCG:  Solving for p, Initial residual = 0.171649125421, Final residual = 0.00164633645554, No Iterations 452
DICPCG:  Solving for p, Initial residual = 0.0754234436705, Final residual = 9.40248708645e-07, No Iterations 677
time step continuity errors : sum local = 0.0119021213653, global = 4.23279607414e-06, cumulative = 0.0509588316088
DILUPBiCG:  Solving for k, Initial residual = nan, Final residual = nan, No Iterations 1001
ExecutionTime = 27437.91 s  ClockTime = 27577 s

fieldAverage fieldAverage1 output:
    Calculating averages

Courant Number mean: 36576.9239654 max: 24004482042.8
Time = 13.712


Restraint verticalSpring1:  attachmentPt - anchor (0 -1.28495629293 0) spring length 1.28495629293 force (-0 44.4626336745 -0)
Restraint verticalSpring2:  attachmentPt - anchor (0 0.715043707068 0) spring length 0.715043707068 force (0 44.4626336745 0)
Centre of mass: (0 -0.284956292932 0.1875)
Linear velocity: (-nan -nan -nan)
Angular velocity: (-nan -nan -nan)
DILUPBiCG:  Solving for Ux, Initial residual = nan, Final residual = nan, No Iterations 1001
DILUPBiCG:  Solving for Uy, Initial residual = nan, Final residual = nan, No Iterations 1001
DILUPBiCG:  Solving for Uz, Initial residual = nan, Final residual = nan, No Iterations 1001
DICPCG:  Solving for p, Initial residual = nan, Final residual = nan, No Iterations 1001
DICPCG:  Solving for p, Initial residual = nan, Final residual = nan, No Iterations 1001
For the courant number, is keep stable in the first 13s around 1, then it keep increasing

Here is the dynamicMeshDict
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      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh      dynamicMotionSolverFvMesh;

motionSolverLibs ("libsixDoFRigidBodyMotion.so");

solver            sixDoFRigidBodyMotion;

sixDoFRigidBodyMotionCoeffs
{
    patches         (CYLINDER);
    innerDistance   0.001;
    outerDistance   1.5;

    mass            9.97;
    centreOfMass    (0 0 0.1875);
    momentOfInertia (1 1 0.03);
    g               (0 0 0);
    orientation
    (
        1 0 0
        0 1 0
        0 0 1
    );
    angularMomentum (0 0 0);
    rhoName         rhoInf;
    rhoInf          1000;
    report          on;

    constraints
    {

        noRotate1
        {
            sixDoFRigidBodyMotionConstraint axis;
            axis            (0 0 1);
        }
        noRotate2
        {
            sixDoFRigidBodyMotionConstraint axis;
            axis            (1 0 0);
        }
        noRotate3
        {
            sixDoFRigidBodyMotionConstraint axis;
            axis            (0 1 0);
        }
        yLine
        { 
            sixDoFRigidBodyMotionConstraint line;
            direction          (0 1 0);
        }
    }

    restraints
    {
        verticalSpring1
        {
            sixDoFRigidBodyMotionRestraint linearSpring;

            anchor          (0 1.092 0.1875);
            refAttachmentPt (0 0.092 0.1875);
            stiffness       4.6325;
            damping         1.482;
            restLength      1;
        }
        verticalSpring2
        {
            sixDoFRigidBodyMotionRestraint linearSpring;

            anchor          (0 -1.092 0.1875);
            refAttachmentPt (0 -0.092 0.1875);
            stiffness       4.6325;
            damping         1.482;
            restLength      1;
        }
    }
}


// ************************************************************************* //
My finite cylinder's diameter is 0.184m and height is 0.375m. Here is my case
https://drive.google.com/file/d/0B1v...it?usp=sharing

Could you give me some recommendations to solve this problem? Thank you so much for you help.

Best regards,
Scabbard
Scabbard is offline   Reply With Quote

Old   July 22, 2014, 04:50
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 646
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Well, once your Courant number is above 1, it is possible that your simulation starts to diverge, so you should make sure it always keeps below 1. I am not sure which solver you use, but if it is pimpleDyMFoam you can probably use a variable time step that fulfills this Courant no. condition all the time using and using

Code:
maxCo 1;
runTimeModifiable true;
in your controlDict. You may even want to lower your maxCo a bit.

Regards,
Tom
tomf is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Oscillating Cylinder One Way FSI problem vplpaul CFX 1 August 20, 2013 18:59
Oscillating Cylinder in Parallel Flow: Analytical Solution startingcfd Main CFD Forum 7 March 23, 2012 05:49
problem with oscillating cylinder ammi FLUENT 0 December 18, 2006 04:06
problem with oscillating cylinder zonexo FLUENT 3 September 14, 2006 10:13
UDF for oscillating cylinder fredD FLUENT 0 July 16, 2004 09:32


All times are GMT -4. The time now is 12:51.