CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   interDymFoam: the sinking ship smiles (https://www.cfd-online.com/Forums/openfoam-solving/130596-interdymfoam-sinking-ship-smiles.html)

wouter March 1, 2014 05:29

interDymFoam: the sinking ship smiles
 
5 Attachment(s)
Hello All,
I try the floatingObject tutorial for interDyMFoam with OF2.3.x. I changed the weight so the object sinks. I also removed the initial wave from setFields.
I would expect the 10l object to sink at a weight of 10.5 kg but it does not. The weight has to be approx 12.5 kg. (meshsize?) Then it sinks but the mesh gets all contracted under the object and the simulation crashes.

Can any one help me changing the parameters I need.

wyldckat March 1, 2014 05:36

Greetings Wouter,

Just to give you a heads-up on past experiences on this tutorial, here's a quote from an old post of mine:
Quote:

Originally Posted by wyldckat (Post 447952)
The latest talk I know of this topic is at this thread: http://www.cfd-online.com/Forums/ope...-tutorial.html
You can jump to the post #9 on that thread, if you want a very quick summary.

I have no idea if these issues have been somewhat fixed and/or figured out. Although you might want contact the original poster on the following thread: http://www.cfd-online.com/Forums/ope...tml#post462679 - since he's been going around this tutorial since back in November.

Best regards,
Bruno

wouter March 1, 2014 08:02

Hello Wyldckat,

thank you for the quick reply.

I had read the post, but I thought it was about multi processor so I ran in single processor. I could run up to a weight of 12 kg but the box just sank until the top was under water and there it stayed for 12 seconds even with waves. So I concluded that this problem was with the moving mesh not updating in the region where the mesh is contracted and I hoped this was a parameter what I had to change. I do not know what parameter but I will try to find out otherwise I have to find another way to let a object sink.

Best regards
Wouter

wyldckat March 1, 2014 09:17

Hi Wouter,

I've taken a better look into the 3rd image and that very compressed mesh at the base of the box is very suspicious, specially for Courant related simulations.
Are you able to change the dynamic mesh settings to have a wider distance on the propagation/compression of the cells?

Best regards,
Bruno

wouter March 1, 2014 14:49

Hello wyldckat,

Thanks again for checking. I have no idea (yet) to change the dynamic mesh but I will try to find out.

Best Regards
Wouter

wouter March 2, 2014 09:38

1 Attachment(s)
Hello All,
I thought to have a remedy for the symptom of contracting cells: mapFields
first change position of object in topoSetDict with the help of sixDoFRigidBodyMotionState in time/uniform but the mapping does not work correctly so I have to find something else.

If anyone knows something else please let me know.
Best regards
Wouter

wouter March 13, 2014 17:31

Hello All,

Just an update. I tried to run the same problem in foam-3.0. It looks like it runs all the way but I am not able to look at the results in paraview. I saw in the forum that there was a way using the case.openFoam twice but that did not work either. The object stayed in the same place only the surface moved.

any help is appreciated
regards
wouter

wyldckat March 23, 2014 12:24

Hi Wouter,

Indeed, the "floatingObject" tutorial seems to be broken in FOAM-Extend 3.0. Feel free to report this issue at their bug tracker: http://sourceforge.net/apps/mantisbt/openfoam-extend/

In the meantime, you might want to try out the latest OpenFOAM 2.3.x, because they've made an interesting update to at particular tutorial: https://github.com/OpenFOAM/OpenFOAM...4d6c746a5a1d02 - The tutorial in question is "multiphase/potentialFreeSurfaceFoam/oscillatingBox" and it is, as of that commit, using a new boundary condition they implemented recently in 2.3.x, namely "fixedNormalInletOutletVelocity".

Best regards,
Bruno

wouter March 23, 2014 12:57

thank you wyldckat.

I tried that tutorial you mentioned, but I do not think that this helps me. My ultimate goal is to model the lemon pip in a glass of tonic (with or without the gin). This pip sinks after a while and than starts to float again because of the CO2 bubbles attaching themselves to the pip. When the pip reaches the surface the bubbles detaches themselves and the pip sinks again. This is a very ambitious endeavour and will probably take forever. So my first step was to make the pip sink and/or rise. I need to figure out how to attach a bubble and make it grow by diffusion of the CO2. The pip will tumble because the bubble will not always attach in the line of cog so there will be a momentum on the pip. A lot to do and so little knowledge of OpenFoam still.

Thanks again for the support
Best regards
Wouter

vava10 March 15, 2021 05:59

sinking ship
 
Hey,

I am simulating a kayak and my ship is sinking as well.:(

Can you help? I only have 2 more week to submit it:(

dynamicMeshDict
Code:


/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v2012                                |
|  \\  /    A nd          | Website:  www.openfoam.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh  dynamicMotionSolverFvMesh;

motionSolverLibs ("libsixDoFRigidBodyMotion.so");

motionSolver    sixDoFRigidBodyMotion;

patches        (hull);
innerDistance  0.3;
outerDistance  1;

centreOfMass    (-2.63034697966 0.0 0.0244732718937);
mass            38.5;
momentOfInertia (0.222320255589 41.6518680701 41.5667249019);
rhoInf          1;
report          on;

value          uniform (0 0 0);

accelerationRelaxation 0.4;

solver
{
    type Newmark;
}

ramp
{
    type    quadraticRamp;//this
    start    0;
    duration 10;
}

constraints
{
    zAxis
    {
        sixDoFRigidBodyMotionConstraint line;
        direction    (0 0 1);
    }
    yPlane
    {
        sixDoFRigidBodyMotionConstraint axis;
        axis          (0 1 0);
    }
}

restraints
{
    translationDamper
    {
        sixDoFRigidBodyMotionRestraint linearDamper;
        coeff        8596;
    }
    rotationDamper
    {
        sixDoFRigidBodyMotionRestraint sphericalAngularDamper;
        coeff        11586;
    }
}


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

fvScheme

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v2012                                |
|  \\  /    A nd          | Website:  www.openfoam.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default        Euler;
}

gradSchemes
{
    default        Gauss linear;
}

divSchemes
{
    div(rhoPhi,U)  Gauss linearUpwind grad(U);
    div(phi,alpha)  Gauss vanLeer;
    div(phirb,alpha) Gauss linear;
    div(phi,k)      Gauss linearUpwind limitedGrad;
    div(phi,omega)  Gauss linearUpwind limitedGrad;
    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default        Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        corrected;
}

wallDist
{
    method meshWave;
}


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


fvSolution
Code:


/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v2012                                |
|  \\  /    A nd          | Website:  www.openfoam.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    "alpha.water.*"
    {
        nAlphaCorr      3;
        nAlphaSubCycles 1;
        cAlpha          1;
        icAlpha        0;

        MULESCorr      yes;
        nLimiterIter    15;
        alphaApplyPrevCorr  yes;

        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance      1e-10;
        relTol          0;
        minIter        1;
    }

    "pcorr.*"
    {
        solver          GAMG;

        smoother        DIC;

        tolerance      1e-3;
        relTol          0;
    };

    p_rgh
    {
        solver          GAMG;

        smoother        DIC;

        tolerance      5e-8;
        relTol          0;
    };

    p_rghFinal
    {
        $p_rgh;
        relTol          0;
    }

    "(U|k|omega).*"
    {
        solver          smoothSolver;

        smoother        symGaussSeidel;
        nSweeps        1;

        tolerance      1e-7;
        relTol          0;
        minIter        1;
    };
}

PIMPLE
{
    momentumPredictor no;

    nOuterCorrectors 2;
    nCorrectors      2;
    nNonOrthogonalCorrectors 0;

    correctPhi      yes;
    moveMeshOuterCorrectors yes;
    turbOnFinalIterOnly yes;

 residualControl
 {
        p_rgh
        {
            tolerance 1e-04;//this
            relTol 0;
            absTol 0;
        }
 }

}

relaxationFactors
{
    equations
    {
        ".*" 1;
    }
}

cache
{
    grad(U);
}


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



controlDict

Code:


/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v2012                                |
|  \\  /    A nd          | Website:  www.openfoam.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application    interFoam;

startFrom      startTime;

startTime      0;

stopAt          endTime;

endTime        5;

deltaT          0.0001;

writeControl    adjustable;

writeInterval  1;

purgeWrite      0;

writeFormat    binary;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision  6;

runTimeModifiable yes;

adjustTimeStep  yes;

maxCo          0.95;

maxAlphaCo      0.95;

maxDeltaT      0.1;


functions
{
    forces
    {
        type            forces;
        libs            ("libforces.so");
        patches        (hull);
        rhoInf          1000.0;
        log            on;
        writeControl    timeStep;
        writeInterval  2;
        CofR            (-2.4453 0 0.1155);
    }
    yPlus
    {
        type            yPlus;
        libs            ("libfieldFunctionObjects.so");
        writeControl    writeTime;
        patches        (hull);
    }

}


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





Thank you in advance

wouter March 15, 2021 18:24

hello vava10,
I am sorry to tell you that I did not succeeded in solving this problem. It has been a long time I worked with OF.


Hope you find the solution,
Best
Wouter



All times are GMT -4. The time now is 21:29.