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中文网

E

ewz

@ewz
关于
帖子
14
主题
4
群组
0
粉丝
0
关注
1

帖子

最新

  • 如何在计算过程输出每一时间步两个量的乘积
    E ewz

    @东岳 老师好,如何在指定时间范围内对新变量求平均,我尝试在controldict添加fieldaverage,但是计算时没有Mean和prime2mean文件输出,应该如何解决?


  • 如何在计算过程输出每一时间步两个量的乘积
    E ewz

    @东岳 哦哦,已解决,在foam.C添加上述语段就可以了


  • 如何在计算过程输出每一时间步两个量的乘积
    E ewz

    @东岳 是写在createFields.H中吗?还是在Foam.C中?


  • 如何在计算过程输出每一时间步两个量的乘积
    E ewz

    好的,谢谢老师,不过这个是写到哪个文件中呢?


  • 如何在计算过程输出每一时间步两个量的乘积
    E ewz

    如题,例如温度场和速度场,如何在计算过程中输出每一时间步T和U的乘积;


  • 关于更改oscillatingDisplacement实现边界运动的问题
    E ewz

    之前的错误通过以下可以解决:

    scalarField xCoord = patch().localPoints().component(vector::X);
    

    获取边界位置点的坐标;
    这次同样编译成功了,但是一试算,就出现问题了;

    #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&) at ??:?
    #8  ? at ??:?
    #9  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
    #10  ? at ??:?
    浮点数例外 (核心已转储)
    

  • 关于更改oscillatingDisplacement实现边界运动的问题
    E ewz

    @东岳 老师你好
    对边界运动的代码修改后,又出现了以下错误:

    --> FOAM FATAL ERROR: 
    given patch field does not correspond to the meshPoints. Field size: 0 meshPoints size: 4221
    
        From function void Foam::pointPatchField<Type>::setInInternalField(Foam::Field<Type2>&, const Foam::Field<Type2>&, const labelList&) const [with Type1 = Foam::Vector<double>; Type = Foam::Vector<double>; Foam::labelList = Foam::List<int>]
        in file /home/dyfluid/OpenFOAM/OpenFOAM-6/src/OpenFOAM/lnInclude/pointPatchField.C at line 283.
    
    FOAM aborting
    
    #0  Foam::error::printStack(Foam::Ostream&) at ??:?
    #1  Foam::error::abort() at ??:?
    #2  void Foam::pointPatchField<Foam::Vector<double> >::setInInternalField<Foam::Vector<double> >(Foam::Field<Foam::Vector<double> >&, Foam::Field<Foam::Vector<double> > const&) const at ??:?
    #3  Foam::oscillatingDynamicPointPatchVectorField::updateCoeffs() at ??:?
    #4  Foam::displacementLaplacianFvMotionSolver::solve() at ??:?
    #5  Foam::motionSolver::newPoints() at ??:?
    #6  Foam::dynamicMotionSolverFvMesh::update() at ??:?
    #7  ? at ??:?
    #8  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
    #9  ? at ??:?
    已放弃 (核心已转储)
    

    好像是边界位置没有对应的网格点......


  • 关于更改oscillatingDisplacement实现边界运动的问题
    E ewz

    编译成功后,试算出现如下问题:

    #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::smoothSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
    #4  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
    #5  Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
    #6  Foam::fvMatrix<double>::solve() at ??:?
    #7  Foam::SolverPerformance<double> Foam::solve<double>(Foam::tmp<Foam::fvMatrix<double> > const&) at ??:?
    #8  Foam::LESModels::kEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correct() at ??:?
    #9  ? at ??:?
    #10  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
    #11  ? at ??:?
    浮点数例外 (核心已转储)
    

    应该是fvsolution里的设置有问题,但不清楚如何更改,求助


  • 关于更改oscillatingDisplacement实现边界运动的问题
    E ewz

    在oscillatingDisplacement的基础上更改,希望实现边界运动方式是时间和空间的函数f(x,t);

    void oscillatingDynamicPointPatchVectorField::updateCoeffs()
    {
        if (this->updated())
        {
            return;
        }
    
        const pointPatch& p = this->patch();
        const polyMesh& mesh = this->internalField().mesh()();
        const Time& t = mesh.time();
        
           scalar x = p.x();
        
           Field<vector>::operator=(amplitude_*cos(omega_*t.value()))*sin((x-0.1)*6.28/0.1));
        
        fixedValuePointPatchField<vector>::updateCoeffs();
    }
    

    编译后报错:

    pointPatchFields/derived/oscillatingDynamic/oscillatingDynamicPointPatchVectorField.C: In member function ‘virtual void Foam::oscillatingDynamicPointPatchVectorField::updateCoeffs()’:
    pointPatchFields/derived/oscillatingDynamic/oscillatingDynamicPointPatchVectorField.C:112:21: error: ‘const class Foam::pointPatch’ has no member named ‘x’
            scalar x = p.x();
                         ^
    pointPatchFields/derived/oscillatingDynamic/oscillatingDynamicPointPatchVectorField.C:114:87: error: invalid operands of types ‘void’ and ‘Foam::doubleScalar {aka double}’ to binary ‘operator*’
     ld<vector>::operator=(amplitude_*cos(omega_*t.value()))*sin((x-0.1)*6.28/0.1));
                                                                                 ^
    
    

    主要是不知如何定义调用空间位置;求助各位老师同学们。谢谢


  • 大涡模拟壁湍流雷诺剪切应力
    E ewz

    @东岳 好的,谢谢老师!我调试参数再算一下;
    我模拟的是wave surface壁面湍流,因为目前是验证LES的阶段,就找了一篇关于实验的文献;
    红线数据是三维计算域的实验结果;


  • 大涡模拟壁湍流雷诺剪切应力
    E ewz

    @东岳 老师,目前在试算,所以我用的是一套二维网格,亚格子模型为WALE

    simulationType LES;
    
    LES
    {
        LESModel        WALE;
    
        turbulence      on;
    
        printCoeffs     on;
    
        delta           cubeRootVol ;
    
        cubeRootVolCoeffs
        {
            deltaCoeff      1;
        }
    
        PrandtlCoeffs
        {
            delta           cubeRootVol;
            cubeRootVolCoeffs
            {
                deltaCoeff      1;
            }
    
            smoothCoeffs
            {
                delta           cubeRootVol;
                cubeRootVolCoeffs
                {
                    deltaCoeff      1;
                }
    
                maxDeltaRatio   1.1;
            }
    
            Cdelta          0.158;
        }
    
        vanDriestCoeffs
        {
            delta           cubeRootVol;
            cubeRootVolCoeffs
            {
                deltaCoeff      1;
            }
    
            smoothCoeffs
            {
                delta           cubeRootVol;
                cubeRootVolCoeffs
                {
                    deltaCoeff      1;
                }
    
                maxDeltaRatio   1.1;
            }
    
            Aplus           26;
            Cdelta          0.158;
        }
    
        smoothCoeffs
        {
            delta           cubeRootVol;
            cubeRootVolCoeffs
            {
                deltaCoeff      1;
            }
    
            maxDeltaRatio   1.1;
        }
    }
    

    您说的van driest damping是vanDriestCoeffs里的设置吗?
    1562635936(1).jpg
    上面的图是平均速度,实验数据为黑线,下方的正弦曲线是底部边界;5-30s我开始认为湍流没有完全发展,所以一直算到200s,又对100-200s取时均,定性上看,两个时间段的平均速度变化差不多;
    雷诺应力的图被我删掉了,有关于湍动能的结果,实验数据为黑线,这个就完全不一致,而且不同时间段的湍动能时均值也不一致;
    1562635976(1).jpg
    以下是我的设置:

    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volScalarField;
        object      nut;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 2 -1 0 0 0 0];
    
    internalField   uniform 0;
    
    boundaryField
    {
        INLET
        {
            type            cyclicAMI;
        }
    
        OUTLET
        {
            type            cyclicAMI;
        }
    
        BOTTOMWALL
        {
            type            nutUSpaldingWallFunction;
            value           uniform 0;
        }
    
        ATMOSPHERE
        {
            type            nutUSpaldingWallFunction;
            value           uniform 0;
          
        }
        
        frontAndBackPlanes
        {
            type            empty;
        }
    
       
    }
    
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volScalarField;
        object      p;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 2 -2 0 0 0 0];
    
    internalField   uniform 0;
    
    boundaryField
    {
        INLET
        {
            type            cyclicAMI;
        }
    
        OUTLET
        {
            type            cyclicAMI;
        }
    
        BOTTOMWALL
        {
            type            zeroGradient;
        }
    
        ATMOSPHERE
        {
            type            zeroGradient;
            //p0              uniform 0;
        }
        
        frontAndBackPlanes
        {
            type            empty;
        }
    
     
    }
    
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volVectorField;
        object      U;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 1 -1 0 0 0 0];
    
    internalField   uniform (0 0 0);
    
    boundaryField
    {
        INLET
        {
            type                cyclicAMI;
        }
    
        OUTLET
        {
            type                cyclicAMI;
        }
    
        ATMOSPHERE
        {
            type                noSlip;
            //value               uniform (0 0 0);
        }
    
        BOTTOMWALL
        {
            type                noSlip;
            
        }
    
        frontAndBackPlanes
        {
            type            empty;
        }
    }
    
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        location    "constant";
        object      fvOptions;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    momentumSource
    {
        type            meanVelocityForce;
    
        selectionMode   all;
    
        fields          (U);
        Ubar            (0.08 0 0);
    }
    
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        location    "system";
        object      fvSchemes;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    ddtSchemes
    {
        default         Euler;
    }
    
    gradSchemes
    {
        default         Gauss linear;
    }
    
    divSchemes
    {
        default         none;
        div(phi,U)      bounded Gauss linearUpwind grad(U);
        div(phi,k)      bounded Gauss limitedLinear 1;
        div(phi,epsilon) bounded Gauss limitedLinear 1;
        div(phi,omega)  bounded Gauss limitedLinear 1;
        div(phi,v2)     bounded Gauss limitedLinear 1;
        div((nuEff*dev2(T(grad(U))))) Gauss linear;
        div(nonlinearStress) Gauss linear;
    }
    
    laplacianSchemes
    {
        default         Gauss linear corrected;
    }
    
    interpolationSchemes
    {
        default         linear;
    }
    
    snGradSchemes
    {
        default         corrected;
    }
    
    wallDist
    {
        method meshWave;
    }
    
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        location    "system";
        object      fvSolution;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    solvers
    {
        p
        {
            solver          PCG;
            preconditioner  DIC;
            tolerance       1e-06
            relTol          0.05;
        }
    
        pFinal
        {
            $p;
            relTol          0;
        };
    
        "(U|k|B|nuTilda)"
        {
            solver          smoothSolver;
            smoother        GaussSeidel;
            tolerance       1e-05;
            relTol          0;
        }
    }
    
    PISO
    {
        nCorrectors     2;
        nNonOrthogonalCorrectors 0;
        pRefCell        0;
        pRefValue       0;
    }
    

    希望得到老师的回复,谢谢。


  • 大涡模拟壁湍流雷诺剪切应力
    E ewz

    最近验证算例,LES模拟壁面湍流,与文献结果对比,雷诺应力偏离较大;
    采用边界层网格,第一层网格尺寸满足y+=1,入口出口cyclicAMI周期边界条件,因为是不可压缩,所以fvoption直接给出的是Ubar,大概算了80个周期后,做时均,平均速度与文献结果差不多,但关于速度脉动的湍动能和雷诺应力完全不一致,这个问题一直也没有解决,求教高手解答;
    注:关于雷诺剪切应力我是通过uprime2mean_xy+turbulencefieldsR_xy得到的,模拟输出的turbulencefieldsR相比uprime2mean来说很小;


  • 关于入口湍流边界条件
    E ewz

    @东岳 嗯嗯,谢谢李老师,昨天周老师帮我向您请教了一些,我目前研究大气湍流流动,所以希望入口能满足真实环境的条件;我再研究一下相关文献,谢谢。


  • 关于入口湍流边界条件
    E ewz

    请问,boxturb工具只能在dnsfoam中实现吗?还有对入口边界施加满足某风谱的脉动速度条件可以通过codedfixedvalue实现吗?谢谢

  • 登录

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