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. 报错求助“Operator + is undefined for unoriented and oriented types”

报错求助“Operator + is undefined for unoriented and oriented types”

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

    在rhoCentralFoam求解中,使用动网格求解遇到错误。
    动网格设置文件

    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  v2206                                 |
    |   \\  /    A nd           | Website:  www.openfoam.com                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      dynamicMeshDict;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    
    dynamicFvMesh   dynamicMotionSolverFvMesh;
    
    motionSolver       solidBody;
    
    cellZone        PASSAGE;  // 旋转区域的cellZone名称
    
    solidBodyMotionFunction  rotatingMotion;
    
    origin      (0 0 0);     // 旋转中心坐标
    axis        (0 0 1);     // 旋转轴方向 (0 0 1) 表示绕Z轴旋转
    omega       -1700;         // 旋转角速度 [rad/s]
    
    
    // ************************************************************************* //
    

    详细的报错结果

    /*---------------------------------------------------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  2206                                  |
    |   \\  /    A nd           | Website:  www.openfoam.com                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    Build  : _76d719d1e6-20220624 OPENFOAM=2206 version=v2206
    Arch   : "LSB;label=32;scalar=64"
    Exec   : rhoCentralFoam
    Date   : Aug 27 2025
    Time   : 20:53:55
    Host   : sdu-R940xa
    PID    : 3759768
    I/O    : uncollated
    Case   : /data0/XiaoYongqing/compressSingleBlade/Test10
    nProcs : 1
    trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
    fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20)
    allowSystemOperations : Allowing user-supplied system call operations
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    Create time
    
    Create mesh for time = 0
    
    Selecting dynamicFvMesh dynamicMotionSolverFvMesh
    Selecting motion solver: solidBody
    Applying motion to cellZone: PASSAGE
    Selecting solid-body motion function rotatingMotion
    Reading thermophysical properties
    
    Selecting thermodynamics package 
    {
        type            hePsiThermo;
        mixture         pureMixture;
        transport       const;
        thermo          hConst;
        equationOfState perfectGas;
        specie          specie;
        energy          sensibleInternalEnergy;
    }
    
    AMI: Creating addressing and weights between 4515 source faces and 4515 target faces
    AMI: Patch source sum(weights) min:1 max:1 average:1
    AMI: Patch target sum(weights) min:1 max:1 average:1
    AMI: Creating addressing and weights between 5005 source faces and 5005 target faces
    AMI: Patch source sum(weights) min:1 max:1 average:1
    AMI: Patch target sum(weights) min:1 max:1 average:1
    AMI: Creating addressing and weights between 1645 source faces and 1645 target faces
    AMI: Patch source sum(weights) min:1 max:1 average:1
    AMI: Patch target sum(weights) min:1 max:1 average:1
    Reading field U
    
    Creating turbulence model
    
    Selecting turbulence model type RAS
    Selecting RAS turbulence model kOmegaSST
    Selecting patchDistMethod meshWave
    RAS
    {
        RASModel        kOmegaSST;
        turbulence      on;
        printCoeffs     on;
        alphaK1         0.85;
        alphaK2         1;
        alphaOmega1     0.5;
        alphaOmega2     0.856;
        gamma1          0.555556;
        gamma2          0.44;
        beta1           0.075;
        beta2           0.0828;
        betaStar        0.09;
        a1              0.31;
        b1              1;
        c1              10;
        F3              false;
        decayControl    false;
        kInf            0;
        omegaInf        0;
    }
    
    Creating finite volume options from "system/fvOptions"
    
    Selecting finite volume options type limitTemperature
        Source: limitT
        - selecting all cells
        - selected 598360 cell(s) with volume 5.59104e-05
    
    Starting time loop
    
    surfaceFieldValue outletMassFlow:
        operation     = sum
    
    
    AMI: Creating addressing and weights between 5005 source faces and 5005 target faces
    AMI: Patch source sum(weights) min:0.999874 max:1 average:0.999999
    AMI: Patch target sum(weights) min:0.999898 max:1 average:0.999999
    AMI: Creating addressing and weights between 4515 source faces and 4515 target faces
    AMI: Patch source sum(weights) min:1 max:1 average:1
    AMI: Patch target sum(weights) min:1 max:1 average:1
    AMI: Creating addressing and weights between 1645 source faces and 1645 target faces
    AMI: Patch source sum(weights) min:1 max:1 average:1
    AMI: Patch target sum(weights) min:1 max:1 average:1
    Mean and max Courant Numbers = 0.00114965 0.0538708
    Time = 1e-09
    
    diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
    diagonal:  Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0
    diagonal:  Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0
    diagonal:  Solving for rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0
    smoothSolver:  Solving for Ux, Initial residual = 2.72958e-05, Final residual = 6.36242e-14, No Iterations 1
    smoothSolver:  Solving for Uy, Initial residual = 1.33319e-05, Final residual = 3.54757e-14, No Iterations 1
    smoothSolver:  Solving for Uz, Initial residual = 0.00560242, Final residual = 1.89806e-11, No Iterations 1
    diagonal:  Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
    smoothSolver:  Solving for e, Initial residual = 0.00593518, Final residual = 3.01268e-11, No Iterations 1
    
    
    --> FOAM FATAL ERROR: (openfoam-2206)
    Operator + is undefined for unoriented and oriented types
    
        From Foam::orientedType Foam::operator+(const Foam::orientedType&, const Foam::orientedType&)
        in file orientedType/orientedType.C at line 488.
    
    FOAM aborting
    
    #0  Foam::error::printStack(Foam::Ostream&) at ??:?
    #1  Foam::error::simpleExit(int, bool) at ??:?
    #2  Foam::error::exiting(int, bool) at ??:?
    #3  Foam::operator+(Foam::orientedType const&, Foam::orientedType const&) at ??:?
    #4  void Foam::add<double, double, Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<Foam::typeOfSum<double, double>::type, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in ~/OpenFOAM/OpenFOAM-v2206/platforms/linux64GccDPInt32Opt/bin/rhoCentralFoam
    #5  Foam::tmp<Foam::GeometricField<Foam::typeOfSum<double, double>::type, Foam::fvsPatchField, Foam::surfaceMesh> > Foam::operator+<double, double, Foam::fvsPatchField, Foam::surfaceMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > const&) in ~/OpenFOAM/OpenFOAM-v2206/platforms/linux64GccDPInt32Opt/bin/rhoCentralFoam
    #6  Foam::fvc::absolute(Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
    #7  Foam::kOmegaSSTBase<Foam::eddyViscosity<Foam::RASModel<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > > > >::correct() at ??:?
    #8  ? in ~/OpenFOAM/OpenFOAM-v2206/platforms/linux64GccDPInt32Opt/bin/rhoCentralFoam
    #9  __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
    #10  ? in ~/OpenFOAM/OpenFOAM-v2206/platforms/linux64GccDPInt32Opt/bin/rhoCentralFoam
    
    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #2
    • rhoCentralFoam没有动网格不报错么?
    • rhoPimpleFoam+动网格报错么?

    9月CFD算法编程课: http://dyfluid.com/class.html

    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    1 条回复 最后回复
  • Y 离线
    Y 离线
    yingqing
    写于 最后由 编辑
    #3

    李老师,我尝试了rhoPimpleFoam没有问题,可以正常运行。但是rhoCentralFoam直接报方向错误。
    rhoCentralFoam在不加动网格情况下,可以运行,但最终因为浮点数溢出停止。

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #4

    这个bug看起来是湍流模型的,但是基于你的反馈,缺出现在rhoCentralFoam+动网格的情况。看起来像是个bug。

    https://cfd-china.com/topic/8018 你看看这个

    9月CFD算法编程课: http://dyfluid.com/class.html

    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    1 条回复 最后回复

  • 登录

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