从objectRegistry中无法获得输运字典问题
-
使用了湍流模型的流固耦合求解器计算一个流固耦合算例(封闭方腔传热问题)时出现了如下报错:
Region: fluid Courant Number mean: 0 max: 0 Region: fluid Courant Number mean: 0 max: 0 Time = 0.01 Solving for fluid region fluid DILUPBiCG: Solving for Ux, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for Uz, Initial residual = 0, Final residual = 0, No Iterations 0 GAMGPCG: Solving for p, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 0, global = 0, cumulative = 1(0) DILUPBiCG: Solving for omega, Initial residual = 0.3364115726, Final residual = 9.041867288e-08, No Iterations 81 DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 9.098095726e-08, No Iterations 158 bounding k, min: -36.19837748 max: -14.87872514 average: -18.05165843 [6] [6] [1] --> FOAM FATAL ERROR: [1] request for dictionary transportProperties from objectRegistry fluid failed available objects of type dictionary are 5 ( RASProperties// fvSchemes fvSolution data turbulenceModel ) [1] [1] [1] From function objectRegistry::lookupObject<Type>(const word&) const [1] in file /home/kdd/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 198. [1] FOAM parallel run aborting
算例接下去是求解温度方程,无法获得输运字典的参数进而不能往下计算。
查看了一些相关的帖子,一般都是某个变量没有注册对象导致错误。但我这个报错直接是输运字典错误,并且对于提示的五个可获得的字典也看不出有任何关联。
在求解器的流体区创建场的相关代码也写了:如下forAll(fluidRegions, i) { Info<< "*** Reading fluid mesh thermophysical properties for region " << fluidRegions[i].name() << nl << endl; IOdictionary transportProperties ( IOobject ( "transportProperties", runTime.constant(), fluidRegions[i], IOobject::MUST_READ, IOobject::NO_WRITE ) ); Info<< " Adding to TFluid\n" << endl; TFluid.set ( i, new volScalarField ( IOobject ( "T", runTime.timeName(), fluidRegions[i], IOobject::MUST_READ, IOobject::AUTO_WRITE ), fluidRegions[i] ) ); laminarTransportFluid.set//jiade ( i, new singlePhaseTransportModel(UFluid[i], phiFluid[i]) ); Info<< " Adding to turbulence\n" << endl;//jiade turbulenceFluid.set ( i, incompressible::turbulenceModel::New ( UFluid[i], phiFluid[i], laminarTransportFluid[i] ).ptr() ); Info<< " Adding to alphatFluid\n" << endl;//jiade alphatFluid.set//jiade ( i, new volScalarField ( IOobject ( "alphat", runTime.timeName(), fluidRegions[i], IOobject::MUST_READ, IOobject::AUTO_WRITE ), fluidRegions[i] ) );
这个报错第一次遇到,有没有小伙伴和大佬能指点指点,感激不尽。
-
PtrList<IOdictionary> transportProperties(fluidRegions.size()); forAll(fluidRegions, i) { Info<< "*** Reading fluid mesh thermophysical properties for region " << fluidRegions[i].name() << nl << endl; Info<< "Reading transportProperties\n" << endl; transportProperties.set ( i, new IOdictionary ( IOobject ( "transportProperties", //runTime.timeName(), runTime.constant(), fluidRegions[i], IOobject::MUST_READ, IOobject::NO_WRITE ) ) ); } forAll(fluidRegions, i) { //const IOdictionary& dict = fluidRegions[i].thisDb() // .lookupObject<IOdictionary>("transportProperties"); const IOdictionary& dict = fluidRegions[i].thisDb() .lookupObject<IOdictionary>("transportPropertie"); }
Log, appear in the List:
Reading transportProperties --> FOAM FATAL ERROR: request for dictionary transportPropertie from objectRegistry bottomAir failed available objects of type dictionary are 3 ( fvSchemes fvSolution transportProperties //get it! )