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 )
-
@李东岳 李老师,在使用openFOAM-V2006版本的buoyantBoussinesqFoam求解器,出现如下报错:
--> FOAM FATAL ERROR:request for basicThermo thermophysicalProperties from objectRegistry region0 failed available objects of type basicThermo are
0()
From const Type& Foam::objectRegistry::lookupObject(const Foam::word&, bool) const [with Type = Foam::basicThermo] in file /home/lyc/OpenFOAM/OpenFOAM-v2006/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 463.
FOAM aborting
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::error::exitOrAbort(int, bool) at ??:?
#2 Foam::basicThermo const& Foam::objectRegistry::lookupObjectFoam::basicThermo(Foam::word const&, bool) const at ??:?
#3 Foam::fv::fixedTemperatureConstraint::fixedTemperatureConstraint(Foam::word const&, Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:?
#4 Foam::fv::option::adddictionaryConstructorToTableFoam::fv::fixedTemperatureConstraint::New(Foam::word const&, Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:?
#5 Foam::fv::option::New(Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:?
#6 Foam::fv::optionList::reset(Foam::dictionary const&) at ??:?
#7 Foam::fv::optionList::optionList(Foam::fvMesh const&, Foam::dictionary const&) at ??:?
#8 Foam::fv::options::options(Foam::fvMesh const&) at ??:?
#9 Foam::fv::options::New(Foam::fvMesh const&) at ??:?
#10 ? in ~/OpenFOAM/OpenFOAM-v2006/platforms/linux64GccDPInt32Opt/bin/buoyantBoussinesqPimpleFoam
#11 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#12 ? in ~/OpenFOAM/OpenFOAM-v2006/platforms/linux64GccDPInt32Opt/bin/buoyantBoussinesqPimpleFoam
请问是什么原因呢,我的constant 和0文件与tutorials一致,还是报错。