overInterDyMFoam求解器报错



  • 我在openfoam-v1702版本中使用求解器overInterDyMFoam模拟一个两相流问题,添加了一个温度方程,网格用ICEM和starccm+分别做了一遍,导入openfoam后,求解过程中报错。结果如下:请问是什么问题?大概从哪方面入手解决。谢谢。

    Create time
    
    Create mesh for time = 0
    
    Selecting dynamicFvMesh dynamicOversetFvMesh
    Selecting motion solver: multiSolidBodyMotionSolver
    Selecting solid-body motion function linearMotion
    Applying solid body motion linearMotion to 8709 points of cellZone movingZone
    
    PIMPLE: no residual control data found. Calculations will employ 2 corrector loops
    
    Reading field p_rgh
    
    Reading field U
    
    Reading/calculating face flux field phi
    
    Creating cellMask field to block out hole cells
    
    inverseDistance : detected 1 mesh regions
        zone:0 nCells:294994  voxels:(66 66 66) bb:(-0.500003 -0.200003 -0.600003) (2.5 0.800003 0.600003)
    Overset analysis : nCells : 294994
        calculated   : 288000
        interpolated : 0 (interpolated from local:0  mixed local/remote:0  remote:0)
        hole         : 6994
    
    Creating interpolatedCells field 
    
    Reading transportProperties
    
    Selecting incompressible transport model Newtonian
    Selecting incompressible transport model Newtonian
    Reading field T
    
    Selecting turbulence model type laminar
    Selecting laminar stress model Stokes
    
    Reading g
    
    Reading hRef
    Calculating field g.h
    
    No MRF models present
    
    No finite volume options present
    
    DICPCG:  Solving for pcorr, Initial residual = 1, Final residual = 5.02939e+06, No Iterations 1001
    Reading/calculating face velocity Uf
    
    Courant Number mean: 0 max: 0
    
    Starting time loop
    
    Courant Number mean: 0 max: 0
    Interface Courant Number mean: 0 max: 0
    deltaT = 0.0120482
    Time = 0.0120482
    
    PIMPLE: iteration 1
    inverseDistance : detected 1 mesh regions
        zone:0 nCells:294994  voxels:(66 66 66) bb:(-0.500003 -0.200003 -0.600003) (2.5 0.800003 0.600003)
    Overset analysis : nCells : 294994
        calculated   : 288000
        interpolated : 0 (interpolated from local:0  mixed local/remote:0  remote:0)
        hole         : 6994
    
    Execution time for mesh.update() = 3.08 s
    smoothSolver:  Solving for alpha.water, Initial residual = 0, Final residual = 0, No Iterations 0
    Phase-1 volume fraction = 1  Min(alpha.water) = 1  Max(alpha.water) = 1
    MULES: Correcting alpha.water
    MULES: Correcting alpha.water
    Phase-1 volume fraction = 1  Min(alpha.water) = 1  Max(alpha.water) = 1
    DILUPBiCG:  Solving for T, Initial residual = 0.449627, Final residual = 1.05799e-09, No Iterations 4
    Begin change rhok
    End change rhok
    
    
    --> FOAM FATAL ERROR: 
    
        request for volScalarField none from objectRegistry region0 failed
        available objects of type volScalarField are
    
    20
    (
    rhok
    alpha.water_0
    interfaceProperties:K
    alpha.water
    rho
    rAU
    cellMask
    p_rgh
    interpolatedCells
    nu
    gh
    nu1
    p
    rho_0
    nu2
    T
    T_0
    alpha.air
    ((alpha.water*Cp)+(alpha.air*Cp))
    div(phiHbyA)
    )
    
    
        From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&, bool) const [with Type = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>]
        in file /home/tan/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 239.
    
    FOAM aborting
    
    #0  Foam::error::printStack(Foam::Ostream&) at ??:?
    #1  Foam::error::abort() at ??:?
    #2  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&, bool) const at ??:?
    #3  ? at totalPressureFvPatchScalarField.C:?
    #4  Foam::totalPressureFvPatchScalarField::updateCoeffs(Foam::Field<double> const&, Foam::Field<Foam::Vector<double> > const&) at ??:?
    #5  Foam::fvMatrix<double>::fvMatrix(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:?
    #6  Foam::fv::gaussLaplacianScheme<double, Foam::SymmTensor<double> >::fvmLaplacianUncorrected(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
    #7  Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
    #8  ? at ??:?
    #9  ? at ??:?
    #10  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
    #11  ? at ??:?
    已放弃 (核心已转储)
    

    之后只用overInterDyMFoam求解,还是相同的问题 request for volScalarField none from objectRegistry region0 failed。请问是什么问题?大概从哪方面入手解决。谢谢。



  • 某个边界的压力边条用了totalPressure吧?你的代码里面是不是没有psi这个变量?



  • 是的,我设置的水池顶部的边界条件是totalPressure,代码里也没有psi变量。



  • 把压力的边界条件贴出了看看吧



  • top
        {
            type            totalPressure;
            p0              uniform 0;
            U               U;
            phi             phi;
            rho             none;
            psi             none;
            gamma           1;
            value           uniform 0;
    
        }
    

    改成top

        {
            type            totalPressure;
            p0              uniform 0;
        }
    

    就不报错了,不知道是什么原因。



  • 举个相关的例子,比如我们要给a赋值,公式是a等于b乘以c,那么有两种方式:
    第一种,最普通的:

    a = b*c;
    

    还有第二种,调用lookUpObject:

    a = b*b.db().lookUpObject("c");
    

    这样,lookUpObject可以从已经注册的变量中去寻找需要的那一个,如果找不到就会报你看到的那种错误。
    可想而知,如果用的是第一种方式,没有定义变量c就会导致编译时提示错误。而如果用的是第二种方式,就算没有定义变量c,编译时也不会报错,但计算时就会出错。
    totalPressureFvPatchScalarField.C 中虽然调用的是lookupPatchField<surfaceScalarField, scalar>(“xxxxxx”),但情况是类似的



  • 明白了,谢谢!