request for volScalarField from objectRegistry failed



  • 在寻找对象的时候,初始化成员这样写的话:

    rhoc_(mesh.time().lookupObject<volScalarField>("rhoc")),
    或者
    rhoc_(mesh.time().db().lookupObject<volScalarField>("rhoc")),
    等等等,报错如下

    --> FOAM FATAL ERROR: 
    
        request for volScalarField rhod from objectRegistry QMOM failed
        available objects of type volScalarField are
    0()
    

    更改为

    rhoc_(mesh.lookupObject<volScalarField>("rhoc")),

    即可,这样寻找的对象注册体为region不是是类型。

    --> FOAM FATAL ERROR: 
    
        request for volScalarField rhod from objectRegistry region0 failed
        available objects of type volScalarField are
    available objects of type volScalarField are
    
    8
    (
    k
    rhoc
    muc
    alpha
    rhod
    d32
    mud
    epsilon
    )
    
    

登录后回复
 

与 CFD中文网 的连接断开,我们正在尝试重连,请耐心等待