有关calculatedFvPatchField


  • 网格教授 OpenFOAM教授 管理员

    某同学来信的错误代码如下:

    Starting time loop
    
    Courant Number mean: 0 max: 0
    Time = 0.01
    
    time:0.01 curMotionVel_:(0.001 0 0) curLeft:0.099 curRight:0.1
    No topology change
    Executing mesh motion
    GAMG:  Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0
    time step continuity errors : sum local = 0, global = 0, cumulative = 0
    PIMPLE: iteration 1
    DILUPBiCGStab:  Solving for Ux, Initial residual = 0, Final residual = 0, No Iterations 0
    DILUPBiCGStab:  Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
    
    
    --> FOAM FATAL ERROR: 
    cannot be called for a calculatedFvPatchField
        on patch bottom of field p in file "/home/sh/OpenFOAM/sh-5.0/run/171109DyM/HH/0/p"
        You are probably trying to solve for a field with a default boundary condition.
    
        From function Foam::tmp<Foam::Field<Type> > Foam::calculatedFvPatchField<Type>::gradientInternalCoeffs() const [with Type = double]
        in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 187.
    
    FOAM aborting
    
    #0  Foam::error::printStack(Foam::Ostream&) at ??:?
    #1  Foam::error::abort() at ??:?
    #2  Foam::calculatedFvPatchField<double>::gradientInternalCoeffs() const at ??:?
    #3  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 ??:?
    #4  Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
    #5  Foam::fv::laplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
    #6  Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::laplacian<double, double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::word const&) at ??:?
    #7  Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::laplacian<double, double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
    #8  ? at ??:?
    #9  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
    #10  ? at ??:?
    已放弃 (核心已转储)
    
    

    原因在于你在求解p压力场,因此你不能给定calculatedFvPatchField边界条件。