Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

  1. CFD中文网
  2. OpenFOAM
  3. 使用overInterDyMFoam计算均匀来流的圆柱入水问题

使用overInterDyMFoam计算均匀来流的圆柱入水问题

已定时 已固定 已锁定 已移动 OpenFOAM
2 帖子 1 发布者 2.2k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • 一 离线
    一 离线
    一朵苍凉
    写于 最后由 李东岳 编辑
    #1

    参照一篇论文在做圆柱入水问题,该论文是基于star CCM+计算了均匀风和流速下,圆柱垂直入水问题。想学着使用OpenFOAM复现一下。
    网格是基于snappyHexMesh和blockMesh生成的,几何比较简单,网格如下图所示。使用KOmegaSST湍流模型进行计算,近壁面处理使用全壁面函数。发现CN的时间离散格式不支持MULES方法的SubCycles,所以将时间离散格式又改成了Euler,对流项的离散格式除了湍流相关物理量使用upwind格式,其余都使用二阶格式。扩散项使用中心差分格式,oversetInterpolation使用inverseDistance。fvSchemes和fvSolution的设置贴于下方。现在的问题是静水计算没有问题。之前做的其他使用overInterDyMFoam和波浪入射条件的也都没啥问题。因为均匀来流的问题和DTCHull计算船舶阻力的问题很相似,所以边界条件是参照DTCHull算例进行设置的,按照我的理解应该是没有问题的。但是加上来流之后计算就几乎是一提交就崩溃退出。麻烦各位前辈帮忙分析一下原因和解决方法。防沉,手动艾特一下大佬~ @队长别开枪 , @wwzhao
    :143:
    网格布置
    ������1.jpeg
    ������2.jpeg
    ������3.jpeg
    初边值条件

    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volScalarField;
        location    "0";
        object      alpha;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 0 0 0 0 0 0];
    
    internalField   uniform 0;
    
    boundaryField
    {
        #includeEtc "caseDicts/setConstraintTypes"//为基类型提供自动的边界条件,oversetPatch和sides
        inlet
        {
            type            fixedValue; //提供一个固定值约束
            value           $internalField;      
        }
        outlet
        {
            type            variableHeightFlowRate;//提供基于局部流动条件的相分数条件,其中值被限制在用户定义的下限和上限之间。
            lowerBound      0;
            upperBound      1;
            value           $internalField;
        }
        stationaryWalls
        {
            type            zeroGradient; //从边界面内部场向边界面应用零梯度边界条件
        }
        atmosphere
        {
            type            inletOutlet;//提供一般流出条件,在有回流的情况下具有指定的流入量
            inletValue      uniform 0;
            value           uniform 0;
        }
        floatingObject
        {
            type            zeroGradient; //从边界面内部场向边界面应用零梯度边界条件
        }
    }
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volScalarField;
        object      p_rgh;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [1 -1 -2 0 0 0 0];
    
    internalField   uniform 0;
    
    boundaryField
    {
        #includeEtc "caseDicts/setConstraintTypes"//为oversetPatch和sides指定默认基类型,这里是oversetPatch和sides
        
        inlet
        {
            type            fixedFluxPressure;
            value           $internalField;
        }
        
        outlet
        {
            type            zeroGradient;
        }
        
        stationaryWalls
        {
            type            fixedFluxPressure;
            value           $internalField;
        }
        atmosphere
        {
            type            totalPressure;
            p0              uniform 0;
            U               U;
            phi             phi;
            rho             rho;
            psi             none;
            gamma           1;
            value           uniform 0;
        }
        floatingObject
        {
            type            fixedFluxPressure;
            value           $internalField;
        }
    }
    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"//为基类型提供默认边界条件,oversetPatch和sides
        
        inlet
        {
            type            fixedValue;
            value           uniform (0 0 0);
        }
        
        outlet
        {
            type            fixedValue;
            value           uniform (0 0 0);
        }
    
        stationaryWalls
        {
            type            fixedValue;
            value           uniform (0 0 0);
        }
        atmosphere
        {
            type            fixedValue;
            value           uniform (0 0 0);
        }
        floatingObject
        {
            type            calculated;
            value           uniform (0 0 0);
        }
        oversetPatch
        {
            patchType       overset;
            type            zeroGradient;
        }
        sides
        {
            patchType       overset;
            type            zeroGradient;
        }
    }
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volVectorField;
        object      U;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    Umean 1.525;
    mUmean -1.525;
    
    dimensions      [0 1 -1 0 0 0 0];
    
    internalField   uniform ($mUmean 0 0);
    
    boundaryField
    {
        #includeEtc "caseDicts/setConstraintTypes"//为基类型提供自动的边界条件,主要指oversetPatch和sides
        
        inlet
        {
            type            fixedValue;
            value           $internalField;
            
        }
        
        outlet
        {
            type            outletPhaseMeanVelocity;
            alpha           alpha.water;
            Umean           $Umean;   
            value           $internalField;
        }
        
        stationaryWalls
        {
            type            fixedValue;
            value           uniform (0 0 0);
        }
        
        atmosphere
        {
            type            pressureInletOutletVelocity;
            tangentialVelocity  $internalField;
            value           uniform (0 0 0);
        }
        
        floatingObject
        {
            type            movingWallVelocity;
            value           uniform (0 0 0);
        }
    }
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volScalarField;
        object      zoneID;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 0 0 0 0 0 0];
    
    internalField   uniform 0;
    
    boundaryField
    {
        #includeEtc "caseDicts/setConstraintTypes"//为基类型提供自动的边界条件
        
        inlet
        {
            type            zeroGradient;
        }
        outlet
        {
            type            zeroGradient;
        }
        stationaryWalls
        {
            type            zeroGradient;
        }
        atmosphere
        {
            type            zeroGradient;
        }
        floatingObject
        {
            type            zeroGradient;
        }
    }
    

    运动属性定义

    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      dynamicMeshDict;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    motionSolverLibs    (sixDoFRigidBodyMotion);
    dynamicFvMesh       dynamicOversetFvMesh;
    solver          sixDoFRigidBodyMotion;
    solver
    {
        type Newmark;
    }
    sixDoFRigidBodyMotionCoeffs
    {
    
        patches         (floatingObject);
        innerDistance   100.0;
        outerDistance   101.0;
    
        centreOfMass    (0 0 0.1);
        velocity        (0 0 -6.1);//下落速度
    
        // Density of the solid
        rhoSolid        898.38;
        D    0.05;
        L    0.2;
    
        // Cuboid mass
        mass            0.3528;
    
        // 关于质心的物体转动惯量
        momentOfInertia (0.00123 0.00123 1.1025e-4);
        rhoInf          1;
        report          on;
        accelerationRelaxation 0.5;
        accelerationDamping    1.0;
    
        solver
        {
            type Newmark;
        }
    
      constraints
      {
       }
       restraints
      {
      }
    }
    

    离散格式和求解设置

    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      fvSchemes;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    ddtSchemes
    {
        //default   CrankNicolson 0.5;
        default    Euler;
    }
    
    gradSchemes
    {
        //default         cellLimited Gauss linear 1;
        default         cellLimited Gauss linear 0.5;
        grad(U)         cellLimited Gauss linear 1;
        //grad(k)         cellLimited Gauss linear 1;
        //grad(omega)         cellLimited Gauss linear 1;   
          grad(yPsi)      cellLimited Gauss linear 1.0;
    }
    
    divSchemes
    {
        default    none;
        div(rhoPhi,U)   Gauss linearUpwind grad(U);
        div(U)          Gauss linear;
        div(phi,alpha)  Gauss vanLeer;
        div(phirb,alpha) Gauss linear;
        div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
    
        //div(phi,k)      Gauss linearUpwind default;
        //div(phi,omega) Gauss linearUpwind default;
        div(phi,k)      Gauss upwind;
        div(phi,omega) Gauss upwind;
    }
    
    laplacianSchemes
    {
        default         Gauss linear limited 0.5;
    }
    
    interpolationSchemes
    {
        default         linear;
    }
    
    snGradSchemes
    {
        default         limited 0.5;
    }
    
    oversetInterpolation
    {
        //method          cellVolumeWeight;//一阶精度
          method          inverseDistance;//二阶精度
    }
    
    /*
    oversetInterpolationRequired
    {
        //omega;
        //k;
        //nut;
    }
    */
    
    oversetInterpolationSuppressed
    {
        grad(p_rgh);
        surfaceIntegrate(phiHbyA);
    }
    
    fluxRequired
    {
        default         no;
        p_rgh;
        pcorr;
        alpha.water;
    }
    wallDist//湍流近壁面距离计算
    {
        //method  meshWave;
        method Poisson;
    }
    
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      fvSolution;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    solvers
    {
    
        "cellDisplacement.*"
        {
            solver          PCG;
            preconditioner  DIC;
    
            tolerance       1e-06;
            relTol          0;
            maxIter         100;
        }
    
        "alpha.water.*"
        {
            nAlphaCorr      3;
            nAlphaSubCycles 2;
            cAlpha          1;
            icAlpha         0;
    
            MULESCorr       yes;
            nLimiterIter    5;
            alphaApplyPrevCorr  no;
    
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-8;
            relTol          0;
        }
    
        "pcorr.*"
        {
            solver          PCG;
            preconditioner  DIC;
            tolerance       1e-9;
            relTol          0;
        }
    
        p_rgh
        {
            solver          PBiCGStab;
            preconditioner  DILU;
            tolerance       1e-9;
            relTol          0.01;//松迭代
        }
    
        p_rghFinal//使用PISO和PIMPLE的时候需要定义最后一个压力修正步
        {
            $p_rgh;
            relTol          0;
        }
        
        yPsi
        {
                solver          PBiCGStab;
                preconditioner  DILU;
                tolerance       1e-6;
                relTol          0.0;
        }
    
        "(U|k|omega|epsilon).*"
        {
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-08;
            relTol          0;
        }
    }
    
    PIMPLE
    {
        momentumPredictor   yes;
        nOuterCorrectors    5;
        nCorrectors         2;
        nNonOrthogonalCorrectors 1;
    
        ddtCorr                    yes;
        correctPhi                 no;
        checkMeshCourantNo 		yes;	//D no
        moveMeshOuterCorrectors no;
        turbOnFinalIterOnly no;
    
        oversetAdjustPhi    no;
    }
    
    relaxationFactors
    {
        fields
        {
        }
        equations
        {
                ".*" 1;
        }
    }
    
    cache
    {}
    
    1 条回复 最后回复
  • 一 离线
    一 离线
    一朵苍凉
    写于 最后由 编辑
    #2

    速度出口边界条件有问题,改成防止回流的边界条件就可以。

    1 条回复 最后回复

  • 登录

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]