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

Massless 6DOF Simulation

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 13, 2016, 07:43
Lightbulb Massless 6DOF Simulation
  #1
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Zanjan, Iran
Posts: 306
Rep Power: 12
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Hello,
My question is as simple as it appears. Whenever I use zero mass in my 6DOF simulations, the solver (namely pimpleDyMFoam) blows up at the start of the process with Floating point exception. However zero mass in a sixDOF problem isn't impossible. Here is my DynamicMeshDict:

Code:
dynamicFvMesh      dynamicMotionSolverFvMesh;

motionSolverLibs ("libsixDoFRigidBodyMotion.so");

solver            sixDoFRigidBodyMotion;

sixDoFRigidBodyMotionCoeffs
{
    patches         (cylinder);
    innerDistance   1;
    outerDistance   20;

    mass            0;
    momentOfInertia (0.01 0.01 0.01);
    centreOfMass    (0 0 0);
    orientation
    (
        1 0 0
        0 1 0
        0 0 1
    );
    velocity        (0 0 0);
    acceleration    (0 0 0);
    angularMomentum (0 0 0);
    torque          (0 0 0);
    g               (0 0 0);
    rhoName         rhoInf;
    rhoInf          1;
    report          on;
    accelerationRelaxation 0.3;
    value           uniform (0 0 0);

    solver
    {
        type symplectic;
    }

    constraints
    {
    transverse
    {
        sixDoFRigidBodyMotionConstraint line;
        tolerance 1e-6;
        relaxationFactor 0.7;
        refPoint (0 0 0);
        direction (0 1 0);
    }

    noRotation
    {
        sixDoFRigidBodyMotionConstraint orientation;
        orientation (1 0 0 0 1 0 0 0 1);
    }

        zAxis
        {
            sixDoFRigidBodyMotionConstraint axis;
            axis                (0 0 1);
        }

    }

    restraints
    {
    translationSpring&Damper
    {
        sixDoFRigidBodyMotionRestraint linearSpring;
        anchor          (0 -10 0);
        refAttachmentPt (0 0 0);
        stiffness       0;
        damping         0;
        restLength      10;
    }
    }
}
It doesn't have any problems with a non-zero mass. Well This means that mass parameter is in a denominator somewhere in the main code. So I checked the code and found this:

Code:
void Foam::::updateAcceleration
(
    const vector& fGlobal,
    const vector& tauGlobal
)
{
    static bool first = false;

    // Save the previous iteration accelerations for relaxation
    vector aPrevIter = a();
    vector tauPrevIter = tau();

    // Calculate new accelerations
    a() = fGlobal/mass_;
    tau() = (Q().T() & tauGlobal);
    applyRestraints();

    // Relax accelerations on all but first iteration
    if (!first)
    {
        a() = aRelax_*a() + (1 - aRelax_)*aPrevIter;
        tau() = aRelax_*tau() + (1 - aRelax_)*tauPrevIter;
    }

    first = false;
}
This is the only place where mass in in the denominator. From Newton's Second law a = F/m.
Any Ideas how I can solve a 6DOF problem with zero mass?
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   February 14, 2016, 07:54
Default
  #2
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Zanjan, Iran
Posts: 306
Rep Power: 12
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
The only workaround I have found so far is to set very low amounts of mass and accelerationRelaxation:

Quote:
mass 0.001;

accelerationRelaxation 0.001;
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"

Last edited by Mojtaba.a; February 14, 2016 at 13:33.
Mojtaba.a is offline   Reply With Quote

Reply

Tags
6dof, sixdofrigidbodymotion, zero mass

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
Waterbell Simulation o.b.m Fluent Multiphase 1 November 5, 2015 05:55
setting up a simulation with multiple interactions phandy OpenFOAM Running, Solving & CFD 1 October 6, 2014 03:16
mass flow rate issue in supersonic nozzle simulation xkang FLUENT 0 July 31, 2014 16:06
Simulation of a complex wing in solidworks flow simulation niels1900 FloEFD, FloWorks & FloTHERM 6 April 20, 2011 10:44
GUI crash and simulation engine still running RPJones FLOW-3D 2 November 9, 2010 08:18


All times are GMT -4. The time now is 15:31.