CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Overset mesh with deformable front mesh (https://www.cfd-online.com/Forums/openfoam/225675-overset-mesh-deformable-front-mesh.html)

mecbertin April 4, 2020 04:18

Overset mesh with deformable front mesh
 
Hi All,

I am hoping to get some suggestions for the OpenFOAM implementation of an overset mesh with deformable front mesh (e.g. using the displacementLaplacian solver).

I have seen this following presentation wrote about foam-extend 4.1 in November 2018:
https://foam-extend.fsb.hr/wp-conten...solid4Foam.pdf

In there, on slide 19, they are explaining "Front mesh deformation for FSI simulation", and how the mesh deformation is limited to the front mesh using subsetMotionSolverFvMesh.

I am finding foam-extend 4.1 challenging to understand compared to the traditional OpenFoam.
Would anyone have any suggestions for any material or course that could help me to set up/run my case (an overset mesh with deformable front mesh)?
Ideally, I would prefer to set up my case in OpenFOAM v1912. Would someone know what type of setup I should use with the overPimpleDyMfoam solver? Or any material or course that could help me with this?

Cheers,

Celia

Michael@UW July 21, 2020 12:26

Hello Celia,
I am also interested in coupling overset with morphing. It seems we can use displacementLaplacian to deform the front body.

Code:

dynamicFvMesh      dynamicOversetFvMesh;

motionSolverLibs ( "libfvMotionSolvers.so" );

solver          displacementLaplacian;

displacementLaplacianCoeffs
{
    diffusivity    uniform 1;
}

But if I want to move the solid body (front) and deform the background patches at the same time. Do you know how to define the solid body motion at the same time in dynamicMeshDict?

Regards,
Michael

louisgag July 22, 2021 08:38

This is old but we had the same problem here and I had to read the code a few times before we could get this working, so here's the heads up:


solidBodyDisplacementLaplacian and displacementLaplacian are not coded to support acting on different zones, so you have to split the solvers in your dynamicMeshDict as such:


Code:

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



dynamicFvMesh      dynamicOversetFvMesh;
solvers
{
    c1Block
    {
        motionSolverLibs (fvMotionSolvers "libcontrolled6DoFMotion.so");
        motionSolver solidBody;
        cellZone c1;
        solidBodyMotionFunction  rotatingMotion;
                origin      (0.005 0.005 0.005);
                axis        (0 0 1);
                omega      10;
    }
 
 deformations
 {
    motionSolverLibs (fvMotionSolvers "libcontrolled6DoFMotion.so");
    motionSolver displacementLaplacian;
    diffusivity uniform 1;
 }

}




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

and keep in mind that setting a zone for the deformation part will not bring much...

quarkz February 27, 2022 21:29

Hi louisgag,

my objective is simulate a plane with deforming folding wing which pitches up due to 6dof. i want the wing deformation to cause the front overset mesh to deform internally. I would like to use 6dof to determine its pitching response and cause the front mesh to rotate as a whole due to the pitching.

I tried using your dynamicMeshDict as a starting point. It seems that I can get internal mesh deformation of the front overset mesh due to the wing folding. However, OpenFOAM doesn't seem to allow the front mesh to pitch (whole mesh rotates without deformation) due to 6dof.

Is this so? Is there anyway to circumvent it? I have attached my pointDisplacement and dynamicMeshDict

Code:

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

dimensions      [0 1 0 0 0 0 0];

internalField  uniform (0 0 0);

boundaryField
{

        #includeEtc "caseDicts/setConstraintTypes"

        overset_p1
    {
        patchType      overset;
        type            zeroGradient;
    }


    wing
    {
    type        prototype_retract_motion;
    //type        myAngularOscillatingDisplacement;
        axis                (0 -1 0);
        origin (0.03 0 0.235);
        angle0                0;
        amplitude      1.571;  //units of rad
        reverse_pitch  0;//0.7854;
    maximum_retract_angle 0.7854;
        omega          1.5708;      //units of rad/s
        value          uniform (0 0 0);
    }
   
    body_tail
    {
        type            calculated;
        value          uniform (0 0 0);
    }       

    ".*"
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
       

}


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

Code:

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

dynamicFvMesh      dynamicOversetFvMesh;

/*motionSolverLibs ( "libfvMotionSolvers.so" );

solver          displacementLaplacian;

displacementLaplacianCoeffs
{
    diffusivity    uniform 1;
    //diffusivity inverseDistance 1(wing|overset_p1|body_tail);
}

dynamicOversetFvMeshCoeffs
{
//    layerRelax 0.3;
}
*/

solvers
{
    sixdof_pitch
    {
        motionSolverLibs (sixDoFRigidBodyMotion);
        motionSolver sixDoFRigidBodyMotion;
        cellSet wing_body_tail;
        patches        (wing body_tail);
            innerDistance  100.0;
            outerDistance  101.0;
       
            centreOfMass    (0. 0. 0.);
            g              (0 -9.81 0);
            velocity        (13.89 0. 0.);
            rho            rhoInf;
                rhoInf          1.2;
       
            // Cuboid mass
            mass            1.6;
       
            // Cuboid moment of inertia about the centre of mass
            //momentOfInertia (0.028173316 0.047624436 0.073855382);
            momentOfInertia (0.028173316 0.073855382 0.047624436);
       
            report          on;
            accelerationRelaxation 0.6;
            accelerationDamping    0.9;
       
            solver
            {
                type Newmark;
            }
       
            constraints
            {
       
               
                fixedPoint
                {
                    sixDoFRigidBodyMotionConstraint point;
                    centreOfRotation (0. 0. 0.);
                }
               
       
                fixedAxis
                {
                    sixDoFRigidBodyMotionConstraint axis;
                    axis (0 0 1);
                }
               
            }
       
       
    }
 
    wing_deformations
        {
            motionSolverLibs (fvMotionSolvers);
                motionSolver displacementLaplacian;
                cellZone wing_body_tail;
                //diffusivity uniform 1;
                diffusivity inverseDistance 1(wing);
                //diffusivity quadratic inverseDistance 1(wing);
    }

}
// ************************************************************************* //


louisgag March 16, 2022 08:02

Hi,
i don't have experience with the 6dof solver, but usually you have to project the pointDisplacement motion so that they match you rigid body motion.
Maybe you can find an example here: $FOAM_TUT/multiphase/compressibleInterDyMFoam/laminar/sphereDrop and try to adapt it overset...
Not sure I can help more than that, feel free to inspire yourself from python-based or MBDyn-based solutions:
https://darus.uni-stuttgart.de/datas...419/darus-2191

https://darus.uni-stuttgart.de/datas...419/darus-2232

quarkz March 16, 2022 23:36

Hi louisgag,

Sure, thanks for the recommendations. I'll take a look.

quarkz April 13, 2022 02:27

1 Attachment(s)
Hi everyone,

I'm now trying to run a simple test case to see if it works.

It consists of a background rectangle domain and a front cylinder overset mesh.

I want to test if it is possible to run a simulation such that the front cylinder overset mesh:

1. move entire overset mesh vertically up and down without deformation

and

2. move cylinder boundary vertically up and down with deformation. boundary of overset mesh is not moving.

I managed to get (1) working using the codes below but not (2). Objective is to do (1) + (2) together.

Is it possible?

I tried Michael@UW suggestions:

dynamicMeshDict

Code:

dynamicFvMesh      dynamicOversetFvMesh;

motionSolverLibs ( "libfvMotionSolvers.so" );

solver          displacementLaplacian;

displacementLaplacianCoeffs
{
    diffusivity    uniform 1;
}

pointDisplacement

Code:

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"

    oversetPatch
    {
        patchType      overset;
        type            zeroGradient;
    }

   
       
        cyl
    {
        type            oscillatingDisplacement;
        amplitude      (0 0.5 0);
        omega          3.142;
        value          uniform (0 0 0);
    }


    ".*"
    {
        type            fixedValue;
        value                uniform    (0 0 0);
    }
}

I also tried louisgag's suggestions:

dynamicMeshDict

Code:

dynamicFvMesh      dynamicOversetFvMesh;

solvers         

{
        cylinder_overset
        {
        motionSolverLibs (fvMotionSolvers  "libcontrolled6DoFMotion.so");
               
                motionSolver            solidBody;
        solidBodyMotionFunction oscillatingLinearMotion;
               
                cellSet                cyl_overset;
                oscillatingLinearMotionCoeffs
                {
                        amplitude      (0.0 0.5 0.0);
                        omega          6.2831853;//-0.7854;//-0.1745;    //5.52 rad/s
                }

       
    }
       
        deformations
        {
            motionSolverLibs (overset fvMotionSolvers  "libcontrolled6DoFMotion.so");
                motionSolver displacementLaplacian;
                diffusivity uniform 1;
                //diffusivity inverseDistance 1(cyl);
        }

}

pointDisplacement

Code:

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"

    oversetPatch
    {
        patchType      overset;
        type            zeroGradient;
    }

   
        cyl
    {
        type            oscillatingDisplacement;
        amplitude      (0 0.5 0);
        omega          3.142;
        value          uniform (0 0 0);
    }


    ".*"
    {
        type            fixedValue;
        value                uniform    (0 0 0);
    }
}

Can anyone help?

Thanks


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