CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] Dynamically morphing airfoil using groovyBC (https://www.cfd-online.com/Forums/openfoam-community-contributions/242941-dynamically-morphing-airfoil-using-groovybc.html)

toolpost May 20, 2022 04:35

Dynamically morphing airfoil using groovyBC
 
2 Attachment(s)
Hello

I am trying to simulate 2D flow around a dynamically morphing airfoil using OpenFOAM-v2106. The airfoil surface near the trailing edge is supposed to morphed downwards with time. I believe this can be achieved using groovyBC. I set everything up and the mesh seems to move, but I am facing a weird issue.

The original C-type mesh is created in ICEM CFD, and exported to OpenFOAM. I want to keep the first cell height near the wall as constant throughout the simulation in order to keep a constant y+. But as you can see from the screenshots, in the very first iteration something weird happens and the mesh moves in an abnormal way. In the first time step, the airfoil wall didn't move, but the mesh around it moved. This results in a deformed mesh where the wall distance become reduced on the top side but keeps as expected in the bottom side. Later from the next time-step on-wards, the mesh deforms in the same manner I expected, and from thereon the wall distance no longer changes.

I cannot post the case file here, because the mesh size is large. A minimalistic cellDisplacementDict to reproduce this is given below.

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    object      cellDisplacement;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 0 0 0 0 0];

internalField  uniform (0 0 0);

boundaryField
{
    TOP
    {
          type          groovyBC;
        value        uniform (0 0 0);
          valueExpression    "vector(0,df,0)";
   
          variables
          (
        "df=-0.3*time();"
          );
    }

    BOTTOM
    {
          type          groovyBC;
        value        uniform (0 0 0);
          valueExpression    "vector(0,df,0)";
   
          variables
          (
        "df=-0.3*time();"
          );
    }
   
    FIXEDWALLS
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    INLET
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }

    OUTLET
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }

    frontAndBack
    {
        type            empty;
    }
}

This is dynamicMeshDict
Code:

FoamFile
{
    format      ascii;
    class      dictionary;
    location    "system";
    object      dynamicMeshDict;
}

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

 dynamicFvMesh  dynamicMotionSolverFvMesh;

 motionSolverLibs ("libfvMotionSolvers.so");

 motionSolver    displacementLaplacian;

 diffusivity  directional (20 0.1 0);

What am I doing wrong? Any suggestions would be greatly appreciated.

toolpost May 20, 2022 11:47

Deleted.....


All times are GMT -4. The time now is 01:24.