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/)
-   -   Combining rotatingMotion + displacementLaplacian (https://www.cfd-online.com/Forums/openfoam-solving/238526-combining-rotatingmotion-displacementlaplacian.html)

egebat7 September 17, 2021 11:03

Combining rotatingMotion + displacementLaplacian
 
I would like to simulate a morphing VAWT (Vertical Axis Wind Turbine). I need to combine rotatingMotion and displacemetLaplacian where rotatingMotion is for the Rotor and displacementLaplacian is for the morphing.

Without combining them they work perfectly. However, after combining both functions I am getting the error below:

Code:

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:?
#4  Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:?
#5  Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#6  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
#7  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam8/platforms/linux64GccDPInt32Opt/bin/pimpleFoam"
#8  Foam::fvMatrix<double>::solve() in "/opt/openfoam8/platforms/linux64GccDPInt32Opt/bin/pimpleFoam"
#9  ? in "/opt/openfoam8/platforms/linux64GccDPInt32Opt/bin/pimpleFoam"
#10  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11  ? in "/opt/openfoam8/platforms/linux64GccDPInt32Opt/bin/pimpleFoam"

I am also sharing my dynamicMeshDict:

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

/*
dynamicFvMesh dynamicMotionSolverFvMesh;

solvers
(

        Rotor
        {
                motionSolverLibs ("libfvMotionSolvers.so");

                motionSolver            solidBody;

                cellZone                rotor_MRF_zone;

                solidBodyMotionFunction  rotatingMotion;

               

                origin        (0.02145 -0.515 0.00429);
                axis        (0 0 1);
                omega      43.689;

        }

        Morphing
        {

                motionSolverLibs ("libfvMotionSolvers.so");

                motionSolver displacementLaplacian;

                diffusivity  quadratic inverseDistance 1 ("(wing.*)");

        }

);

I am currently using OpenFOAM v8.

Do you have any suggestions?

Best Regards,

Ege

erickmartinez September 17, 2021 22:30

Is there any reason why you want to use mesh morphing instead of sliding mesh method? I am not an expert but I think for full rotations you might be better off with either sliding mesh, overset mesh or automatic remeshing. That's just my opinion though! I am working on something similar to a VAWT. :)

egebat7 September 18, 2021 03:25

Quote:

Originally Posted by erickmartinez (Post 812479)
Is there any reason why you want to use mesh morphing instead of sliding mesh method? I am not an expert but I think for full rotations you might be better off with either sliding mesh, overset mesh or automatic remeshing. That's just my opinion though! I am working on something similar to a VAWT. :)

Hello Erik,

Thanks for the reply! :) Actually my project is related with the optimization of the wing according to the specific azimuthal degrees. I already have the optimized coordinates of the wing for some time-steps so I need to interpolate between the initial shape to another shape (every mesh point on the wing one by one for example). That's why I want to use "displacementLaplacian" motion solver which makes me able to use "uniformInterpolatedDisplacement" as a pointDisplacement Boundary Condition for specific time-steps. That's why I need to rotate the airfoil (where I am using sliding mesh method) and morph it at the same time. However, I am getting an error when I combine both motion solvers. I've checked the internet a lot but couldn't really found any solution yet.

Bloerb September 18, 2021 06:00

I don't know about the foundation version, but this should be possible using multiMotion
Code:

dynamicFvMesh dynamicMultiMotionSolverFvMesh;


// Specification of rotation around centre
rotation1
{
    solidBodyMotionFunction  rotatingMotion;
    rotatingMotionCoeffs
    {
        origin      (0 0 0);
        axis        (0 0 1);
        omega      10; // rad/s, 1rad/s=9.5rpm
    }
}


dynamicMultiMotionSolverFvMeshCoeffs
{
    rotor1
    {
        solver solidBody;
        cellZone rotor;
        solidBodyCoeffs
        {
            $rotation1;
        }
    }

    dualWing1
    {
        cellZone dualWing;

        // Solve displacement on top of solid-body rotation
        solver solidBodyDisplacementLaplacian;

        solidBodyDisplacementLaplacianCoeffs
        {
            solidBodyMotionFunction  multiMotion;
            multiMotionCoeffs
            {
                rotation_1
                {
                    $rotation1;
                }
                rotation_2
                {
                    // Apply counter rotation to keep dualWing aligned
                    solidBodyMotionFunction rotatingMotion;
                    rotatingMotionCoeffs
                    {
                        origin      (-0.43 0 0);
                        axis        (0 0 1);
                        omega      -10; // rad/s, 1rad/s=9.5rpm
                    }
                }
            }
            diffusivity quadratic inverseDistance (wing2);
        }
    }
}



check the tutorials. The above is from the following tutorial mesh/moveDynamicMesh/relativeMotion/box2D_moveDynamicMesh/

egebat7 September 20, 2021 10:07

Quote:

Originally Posted by Bloerb (Post 812494)
I don't know about the foundation version, but this should be possible using multiMotion
Code:

dynamicFvMesh dynamicMultiMotionSolverFvMesh;


// Specification of rotation around centre
rotation1
{
    solidBodyMotionFunction  rotatingMotion;
    rotatingMotionCoeffs
    {
        origin      (0 0 0);
        axis        (0 0 1);
        omega      10; // rad/s, 1rad/s=9.5rpm
    }
}


dynamicMultiMotionSolverFvMeshCoeffs
{
    rotor1
    {
        solver solidBody;
        cellZone rotor;
        solidBodyCoeffs
        {
            $rotation1;
        }
    }

    dualWing1
    {
        cellZone dualWing;

        // Solve displacement on top of solid-body rotation
        solver solidBodyDisplacementLaplacian;

        solidBodyDisplacementLaplacianCoeffs
        {
            solidBodyMotionFunction  multiMotion;
            multiMotionCoeffs
            {
                rotation_1
                {
                    $rotation1;
                }
                rotation_2
                {
                    // Apply counter rotation to keep dualWing aligned
                    solidBodyMotionFunction rotatingMotion;
                    rotatingMotionCoeffs
                    {
                        origin      (-0.43 0 0);
                        axis        (0 0 1);
                        omega      -10; // rad/s, 1rad/s=9.5rpm
                    }
                }
            }
            diffusivity quadratic inverseDistance (wing2);
        }
    }
}



check the tutorials. The above is from the following tutorial mesh/moveDynamicMesh/relativeMotion/box2D_moveDynamicMesh/

Dear Bloerb,

As you mentioned, I tried it with v1706 and it worked, thanks a lot! If somebody knows how to achieve it with the foundation version, it would be helpful to share just in case.

Kind Regards,

Ege


All times are GMT -4. The time now is 13:02.