CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   floatingObject in 2D or axi-symmetric (http://www.cfd-online.com/Forums/openfoam-solving/86130-floatingobject-2d-axi-symmetric.html)

jordi.muela March 15, 2011 05:59

floatingObject in 2D or axi-symmetric
 
Hi everyone,

i'm trying to solve the floatingObject case (interDyMFoam solver) in 2D and 2D Axi-symmetric.
I have modified de mesh, the boundary conditions and I have added the necessary constraints at the models.
The problem is that i get divergence in a few time-steps because the object falls down very quickly. I'm 'playing' with the mass at patch pointDisplacement, but the body falls quickly, no matter if the mass is very high or low (differences in magnitude orders).
Where is the problem? The boundary type "sixDoFRigidBodyDisplacement" only works fine in 3D models?
Somebody has already implemented a similar model?
Any response and helpfull will be welcome!

Thank you everyone! :)

sharonyue April 9, 2013 20:48

Quote:

Originally Posted by jordi.muela (Post 299460)
Hi everyone,

i'm trying to solve the floatingObject case (interDyMFoam solver) in 2D and 2D Axi-symmetric.
I have modified de mesh, the boundary conditions and I have added the necessary constraints at the models.
The problem is that i get divergence in a few time-steps because the object falls down very quickly. I'm 'playing' with the mass at patch pointDisplacement, but the body falls quickly, no matter if the mass is very high or low (differences in magnitude orders).
Where is the problem? The boundary type "sixDoFRigidBodyDisplacement" only works fine in 3D models?
Somebody has already implemented a similar model?
Any response and helpfull will be welcome!

Thank you everyone! :)

Hi,

I am facing the same problem,the box is sinking. How to handle this?

neiht May 20, 2013 06:59

hi!
I think that u need restraints the object with low factor to reduce motion and increase the relaxation factor.
Maybe i'm wrong!

kilroy May 22, 2013 10:47

I am having the same problem. My object is sinking very fast. I will try to restraint the object with a low factor with increasing the relaxation factor and see what happens.

Thanks for the help,

sharonyue May 22, 2013 19:43

I tried restrain it in verticalspring. looks like it can deal with the sinking . But this is not DOF. I dont know how to deal with DOF to make it normally.
http://zhan.renren.com/openfoam There is a non-newtonian fluid free surface flow

kilroy May 23, 2013 12:14

I found the problem. My "rhoInf" variable was "1000" in the "pointDisplacement" file. When I changed it into "1", my object started to float again.

sharonyue May 23, 2013 19:28

Quote:

Originally Posted by kilroy (Post 429560)
I found the problem. My "rhoInf" variable was "1000" in the "pointDisplacement" file. When I changed it into "1", my object started to float again.

Woo!congrats!Is it a 2D case?

kilroy May 23, 2013 19:39

Yes, it is 2D. But the results I am getting are weird. I don't know if it is because of "rhoInf" or there is another thing wrong somewhere else.

sharonyue May 23, 2013 19:46

Quote:

Originally Posted by kilroy (Post 429640)
Yes, it is 2D. But the results I am getting are weird. I don't know if it is because of "rhoInf" or there is another thing wrong somewhere else.

Umm,I have played that 2D floatingobject some weeks age but failed.I have to use lots of restrains and constrains.If not the object is sinking fast.In a 3D case it looks like normal but its unstable.Anyway its not my major so I give up.But you seems like get something succeed which inspire my interests...Wish you can simulate you case successfully and share you experience and I will check my 2D case again another day.

Reagrds

JGadelho October 31, 2013 11:15

Hello everyone,
I've made the changes has described in the first post to the floatingObject tutorial to transform it to a 2D problem.

Like described, I'm facing the same problem. The object falls very fast. I've tried to change the rhoInf, but with no luck. Any news?

thank you.

MarcelK July 18, 2014 07:11

1 Attachment(s)
Although this thread is now quite old, I still try to add something to the discussion.
I also modified the floatingObject tutorial and reduced the dimensionality of the problem by one by modifying the mesh and introducing appropriate 6 DoF constraints. To summarize,

  1. I modified the mesh to be only one cell deep. Since I use my own blockMeshDict.m4 to construct two-dimensional meshes, my mesh now ranges from (-0.01, -0.5, -0.5) to (0.01, 0.5, 0.5) and the box ranges from (-0.01, -0.15, -0.06) to (0.01, 0.15, 0.06). The sea level is at 0.0368, thus the water depth is 0.5368.
  2. I added
    Code:

    twoDMotion yes;
    to the dynamicMeshDict.
  3. I changed the pointDisplacement as follows
Code:

        type            sixDoFRigidBodyDisplacement;
        centreOfMass    (0 0 0);
        momentOfInertia (0.005568 0.0007893333333 0.00482133333333);
        mass            0.64;       
        rhoInf          1;  // needed only for solvers solving for kinematic pressure
        report          on;
        value          uniform (0 0 0);
       
        constraints
        {
            maxIterations 500;
           
            fixedLine1
            {
                sixDoFRigidBodyMotionConstraint fixedLine;
                tolerance 1e-6;
                relaxationFactor 0.7;
                fixedLineCoeffs
                {
                    refPoint $centreOfMass;
                    direction (0 0 1);
                }
            }
       
            fixedAxis1
            {
                sixDoFRigidBodyMotionConstraint fixedAxis;
                tolerance 1e-3;
                relaxationFactor 0.7;
                fixedAxisCoeffs
                {
                    axis (1 0 0);
                }
            }
        }

When running the case, I receive exploding velocities of the rigid body and the computation quits with a floating point exception:


Code:

--> FOAM Warning :
    From function Time::operator++()
    in file db/Time/Time.C at line 982
    Increased the timePrecision from 16 to 17 to distinguish between timeNames at time 0.0648223531977
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  in "/lib64/libc.so.6"
#3  void Foam::MULES::limiter<Foam::geometricOneField, Foam::zeroField, Foam::zeroField>(Foam::Field<double>&, Foam::geometricOneField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::zeroField const&, Foam::zeroField const&, double, double, int) at ??:?
#4  void Foam::MULES::limit<Foam::geometricOneField, Foam::zeroField, Foam::zeroField>(Foam::geometricOneField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::zeroField const&, Foam::zeroField const&, double, double, int, bool) at ??:?
#5  Foam::MULES::explicitSolve(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, double, double) at ??:?
#6 
 at ??:?
#7  __libc_start_main in "/lib64/libc.so.6"
#8 
 at ??:?
./run.sh: Zeile 16: 45533 Gleitkomma-Ausnahme    interDyMFoam

I would be interested if I missed something in the case setup or if the error is due to numerical difficulties. If the latter should apply, it would be enlightening if anybody could comment on why these difficulties arise.


P.S.: Since I think it is instructive if others can compare to their settings, I uploaded my whole case.

ashim March 10, 2015 08:37

Hi,

I am trying to use waveDyMFoam (Modified according to instruction from waves2foam) to simulate 6DOF for a ship in waves at zero speed. I have run simple cases for 2D and 3D block. both cases are working fine. But when I am trying to use for ship, it is sinking very quickly. From the last time step, I found that free surface is not getting updated , it just goes downward with ship. I couldn't solve the problem for last 2 weeks. I appreciate any kind of help and suggestion.

Ali

MarcelK March 13, 2015 08:44

This looks like a problem with your case setting. A bit more information would be helpful, otherwise it is difficult for us to help you. Did you check your
Code:

U
file and make sure to have
Code:

type movingWallVelocity;
as boundary condition type for the patch associated to your rigid body?

ashim March 14, 2015 07:35

Hi MarcelK,

Thank you very much for your reply. I have checked the U boundary condition for rigid body and it is movigwallVelocity. I have correct the box property and it is not sinking now, But the force is increasing so rapidly after some times and ends with crash. Here is link of case folder. I am running the case in OF 2.3.1. I need to solve this problem within very short time. Any kind of advice is highly appreciated.

Ali

https://www.dropbox.com/sh/i0eg20ywb...fSJd778Ka?dl=0


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