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/)
-   -   Rotating a square between water and air!!! please help me (https://www.cfd-online.com/Forums/openfoam-solving/107752-rotating-square-between-water-air-please-help-me.html)

adambarfi October 5, 2012 15:27

Rotating a square between water and air!!! please help me
 
Hi everybody

I'm trying to simulate a rotating square between water and air. but when I ran it, whole of my model started to rotate. I want to rotate only the square.
I'm using interDyMFoam and my dynamicMeshDict is as follow:

Code:

dynamicFvMesh  solidBodyMotionFvMesh;

motionSolverLibs ( "libfvMotionSolvers.so" );

solidBodyMotionFvMeshCoeffs
{
//    cellZone        z0;

    solidBodyMotionFunction  rotatingMotion;
    rotatingMotionCoeffs
    {
        CofG        (1.5 1 0);
        radialVelocity (0 0 600); // deg/s
    }
}

and my topoSet is:

Code:

actions
(
    {
        name    c0;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (1 0.75 0) (2 1.25 1);
        }
    }
    {
        name    c0;
        type    cellSet;
        action  invert;
    }
);

anybody know how can where is my mistake???

thank you

adambarfi October 6, 2012 13:16

hi again,
I approached some success but still there is another error!!! :(

I remove my box from the mesh, so I have just a rectangular. instead I create the box with topoSet:
Code:

actions
(
    {
        name    c0;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (1 0.75 0) (2 1.25 1);
        }
    }
    {
        name    c0;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set c0;
        }
    }

);

and create a MRFZones in constant:
Code:

1
(
    cellZone      c0;
    {
        // Fixed patches (by default they 'move' with the MRF zone)
        nonRotatingPatches ();

        origin    origin [0 1 0 0 0 0 0]  (1.5 1 0);
        axis      axis  [0 0 0 0 0 0 0]  (0 0 1);
        omega    omega  [0 0 -1 0 0 0 0] 104.72;
    }
)

and the dynamicMeshDict:
Code:

dynamicFvMesh  solidBodyMotionFvMesh;

motionSolverLibs ( "libfvMotionSolvers.so" );

solidBodyMotionFvMeshCoeffs
{
    cellZone        c0;

    solidBodyMotionFunction  rotatingMotion;
    rotatingMotionCoeffs
    {
        CofG        (1.5 1 0);
        radialVelocity (0 0 360); // deg/s
    }
}

when I ran it after some iterate the following errors appeared:
Code:

MULES: Solving for alpha1
Liquid phase volume fraction = 0.500578  Min(alpha1) = -3.18487e-13  Max(alpha1) = 1
--> FOAM Warning :
    From function Time::operator++()
    in file db/Time/Time.C at line 982
    Increased the timePrecision from 12 to 13 to distinguish between timeNames at time 0.00823197
MULES: Solving for alpha1
Liquid phase volume fraction = 0.500578  Min(alpha1) = -3.18487e-13  Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 0.500578  Min(alpha1) = -3.18487e-13  Max(alpha1) = 1
GAMG:  Solving for p_rgh, Initial residual = 0.322617, Final residual = 0.00186789, No Iterations 2
time step continuity errors : sum local = 4.29278e-35, global = -6.25487e-38, cumulative = -1.63983e-12
GAMGPCG:  Solving for p_rgh, Initial residual = 0.00377318, Final residual = 2.5956e-09, No Iterations 7
time step continuity errors : sum local = 7.89155e-41, global = 1.65503e-42, cumulative = -1.63983e-12
ExecutionTime = 11.66 s  ClockTime = 11 s

Interface Courant Number mean: 1.23621e-14 max: 1.90583e-10
Courant Number mean: 1.71623e-13 max: 0.498603
deltaT = 7.02395e-15
Time = 0.008231967303353

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.00823197 transformation: ((0.0537059 -0.0762125 0) (0.999666 (0 0 0.0258586)))
Execution time for mesh.update() = 0.03 s
time step continuity errors : sum local = 8.40744e-15, global = 1.25511e-32, cumulative = -1.63983e-12
GAMGPCG:  Solving for pcorr, Initial residual = 1, Final residual = 6.72386e-06, No Iterations 7
time step continuity errors : sum local = 8.71776e-15, global = 2.16723e-24, cumulative = -1.63983e-12
MULES: Solving for alpha1
Liquid phase volume fraction = 0.500578  Min(alpha1) = -3.18487e-13  Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 0.500578  Min(alpha1) = -3.18487e-13  Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 0.500578  Min(alpha1) = -3.18487e-13  Max(alpha1) = 1
GAMG:  Solving for p_rgh, Initial residual = 0.320425, Final residual = 0.00185845, No Iterations 2
time step continuity errors : sum local = 2.11983e-35, global = -3.2799e-38, cumulative = -1.63983e-12
GAMGPCG:  Solving for p_rgh, Initial residual = 0.00373144, Final residual = 2.53592e-09, No Iterations 7
time step continuity errors : sum local = 3.82037e-41, global = 8.38953e-43, cumulative = -1.63983e-12
ExecutionTime = 11.97 s  ClockTime = 12 s

Interface Courant Number mean: 6.19464e-15 max: 9.70649e-11
Courant Number mean: 8.60789e-14 max: 0.499017
deltaT = 3.51889e-15
Time = 0.008231967303356

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.00823197 transformation: ((0.0537059 -0.0762125 0) (0.999666 (0 0 0.0258586)))
Execution time for mesh.update() = 0.04 s
time step continuity errors : sum local = 4.36747e-15, global = -2.00572e-32, cumulative = -1.63983e-12
GAMGPCG:  Solving for pcorr, Initial residual = 1, Final residual = 5.83869e-06, No Iterations 8
time step continuity errors : sum local = 4.66468e-15, global = 1.53072e-22, cumulative = -1.63983e-12
MULES: Solving for alpha1
Liquid phase volume fraction = 0.500578  Min(alpha1) = -3.18487e-13  Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 0.500578  Min(alpha1) = -3.18487e-13  Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 0.500578  Min(alpha1) = -3.18487e-13  Max(alpha1) = 1
GAMG:  Solving for p_rgh, Initial residual = 0.320982, Final residual = 0.00186428, No Iterations 2
#0  Foam::error::printStack(Foam::Ostream&) in "/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2  Uninterpreted:
#3  Foam::inv(Foam::Field<Foam::SymmTensor<double> >&, Foam::UList<Foam::SymmTensor<double> > const&) in "/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4 
 in "/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/platforms/linuxGccDPOpt/bin/interDyMFoam"
#5 
 in "/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/platforms/linuxGccDPOpt/bin/interDyMFoam"
#6 
 in "/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/platforms/linuxGccDPOpt/bin/interDyMFoam"
#7  __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#8 
 in "/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/platforms/linuxGccDPOpt/bin/interDyMFoam"
Floating point exception

when I execute the paraFoam, there was just a rectangular that at its center some meshes have been rotating which they were what I defined in topoSet. but after a little the some meshes expand and some compact. there wasn't any thing like remeshing in FLUENT!!!!

anybody knows how can I solve this problem? and how can I have a separated rotating box instead of a moving mesh that has no boundary with its surrounding fluids?
please help me.
thank you.

adambarfi October 8, 2012 02:49

anyone has any idea?!?!?!? please.

adambarfi October 10, 2012 05:10

actually, there is nobody to help me?!! I just want to rotate a square in a fluid.

does the OpenFoam has the remeshing capability?

Ivanet October 16, 2012 06:35

Hi Mostafa,
I am not sure if I understand properly what you are trying to do. Could you send some sketch?
I would also suggest to check the general grid interface (GGI), which should allow you to rotate the square.

Greetings
Iván

adambarfi October 16, 2012 10:24

1 Attachment(s)
Quote:

Originally Posted by Ivanet (Post 386851)
Hi Mostafa,
I am not sure if I understand properly what you are trying to do. Could you send some sketch?
I would also suggest to check the general grid interface (GGI), which should allow you to rotate the square.

Greetings
Iván

Hi Ivan,
Thank you for your reply. I attach you a mesh that I have solved it in FLUENT.
I tried ggi before, but I couldn't find it in src or internet. I'm using OF-2.1.0.

Ivanet October 16, 2012 10:46

If you are using OF210 you should have a look at AMI, which is very similar to GGI.
GGI is only available in OF1.6-ext (maybe also in OF1.5-dev, I am not sure).

Greetings
Ivan

nimasam May 15, 2013 01:45

dear mostafa, did you find why this error happens?

adambarfi May 15, 2013 03:30

Quote:

Originally Posted by nimasam (Post 427609)
dear mostafa, did you find why this error happens?

Dear Nima,

Which error? the GGI is only available in OF1.6-ext and I decided to simulate it with Fluent and I did it, but I'm waiting for summer vacation to test it with openFOAM.

best,
Mostafa


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