CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Problem with "variableHeightFlowRateInletVelocity" BC and Tetrahedral Mesh-interFoaM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 13, 2023, 07:02
Default Problem with "variableHeightFlowRateInletVelocity" BC and Tetrahedral Mesh-interFoaM
  #1
Senior Member
 
KGN
Join Date: Oct 2009
Location: Chennai, India
Posts: 121
Rep Power: 17
mecbe2002 is on a distinguished road
Hi all,

I am trying to simulate open channel flow with variable height inlet (based on intet flow rate the water level will change) boundary condition using interFoam. The simulation runs fine with HEX mesh; but with TET mesh the alpha.water plot is weird at inlet.

I cannot share the actual geometry, so I ran the simulation with simple open channel bend with same simulation setup for both HEX and TET mesh. I have attached the plots and solver setup.

Please let me know what is the issue with the problem setup?
Code:
Boundary Condition - U
inlet - variableHeightFlowRateInletVelocity
outlet - pressureInletOutletVelocity
wall - noSlip
atmosphere - pressureInletOutletVelocity

Boundary Condition - p_rgh
inlet - zeroGradient
outlet - prghTotalPressure
wall - fixedFluxPressure
atmosphere - prghTotalPressure

Boundary Condition - k
inlet - fixedValue
outlet - inletOutlet
wall - kqRWallFunction
atmosphere - inletOutlet

Boundary Condition - epsilon
inlet - fixedValue
outlet - inletOutlet
wall - epsilonWallFunction
atmosphere - inletOutlet

Boundary Condition - alpha.water
inlet - variableHeightFlowRate
outlet - inletOutlet
wall - inletOutlet
atmosphere - zeroGradient
Code:
ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         cellLimited Gauss linear 1;
}

divSchemes
{
    div(rhoPhi,U)  Gauss upwind;//linearUpwind grad(U);
    div(phi,alpha)  Gauss PLIC interfaceCompression vanLeer 1; //vanLeer;
    div(phi,k)      Gauss upwind;
    div(phi,epsilon) Gauss upwind;
    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

wallDist
{
    method meshWave;
}
Code:
solvers
{
    "alpha.water.*"
    {
        nAlphaCorr      1;
        nAlphaSubCycles 1;
        cAlpha          1;
        MULESCorr       yes;
        nLimiterIter    5;

        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-06;
        relTol          0.0;
    }
    
    
    "pcorr.*"
    {
        solver           PCG;
        preconditioner   DIC;
        tolerance        1e-6;
        relTol           0.0;
    }

    p_rgh
    {
        
        solver           PCG;
        preconditioner   DIC;
        tolerance        1e-6;
        relTol           0.0;
    };

    p_rghFinal
    {
        $p_rgh;
        tolerance       1e-6;
        relTol          0;
    }

    "(U|k|epsilon)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-06;
        relTol          0.0;
    }
    
    "(U|k|epsilon)Final"
    {
        $U;
        relTol          0;
    }
    
}

PIMPLE
{
    momentumPredictor no;
    nOuterCorrectors  1;
    nCorrectors     2;
    nNonOrthogonalCorrectors 0;
}

relaxationFactors
{
    /**equations
    {
        ".*" 1;
    }**/
    equations
    {
        "U.*"                       0.7;
        "p.*"                       0.7;
        "(k|epsilon).*"             0.7;
        "alpha.water.*"             0.7;
    }
}
Initial Condition : Attachment 95362

Hex Mesh result : Attachment 95363

Tet Mesh result : Attachment 95364
mecbe2002 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



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