执行Mach出现not implement的错误



  • 在后处理求解马赫数的时候,用Mach执行,但出现如下的错误:

    Time = 0.00056
    Selecting thermodynamics package 
    {
        type            hePsiThermo;
        mixture         pureMixture;
        transport       sutherland;
        thermo          eConst;
        equationOfState perfectGas;
        specie          specie;
        energy          sensibleInternalEnergy;
    }
    
    
    
    --> FOAM FATAL ERROR: 
    Not Implemented
        Trying to construct an genericFvPatchField on patch boundaryInner of field e
    
        From function genericFvPatchField<Type>::genericFvPatchField(const fvPatch& p, const DimensionedField<Type, volMesh>& iF)
        in file genericFvPatchField/genericFvPatchField.C at line 44.
    
    FOAM aborting
    
    #0  Foam::error::printStack(Foam::Ostream&) in "/WORK/app/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64IccDPOpt/lib/libOpenFOAM.so"
    #1  Foam::error::abort() in "/WORK/app/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64IccDPOpt/lib/libOpenFOAM.so"
    #2  Foam::fvPatchField<double>::addpatchConstructorToTable<Foam::genericFvPatchField<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&) in "/WORK/app/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64IccDPOpt/lib/libgenericPatchFields.so"
    #3  Foam::fvPatchField<double>::New(Foam::word const&, Foam::word const&, Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&) in "/WORK/app/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64IccDPOpt/bin/Mach"
    #4  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::GeometricBoundaryField(Foam::fvBoundaryMesh const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::List<Foam::word> const&, Foam::List<Foam::word> const&) in "/WORK/app/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64IccDPOpt/lib/libfluidThermophysicalModels.so"
    #5  Foam::heThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::eConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::heThermo(Foam::fvMesh const&, Foam::word const&) in "/WORK/app/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64IccDPOpt/lib/libfluidThermophysicalModels.so"
    #6  Foam::fluidThermo::addfvMeshConstructorToTable<Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::eConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > > >::New(Foam::fvMesh const&, Foam::word const&) in "/WORK/app/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64IccDPOpt/lib/libfluidThermophysicalModels.so"
    #7  Foam::fluidThermo::New(Foam::fvMesh const&, Foam::word const&) in "/WORK/app/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64IccDPOpt/lib/libfluidThermophysicalModels.so"
    #8  ? in "/WORK/app/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64IccDPOpt/bin/Mach"
    #9  ? in "/WORK/app/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64IccDPOpt/bin/Mach"
    #10  ? in "/WORK/app/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64IccDPOpt/bin/Mach"
    #11  __libc_start_main in "/lib64/libc.so.6"
    #12  ? in "/WORK/app/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64IccDPOpt/bin/Mach"
    Aborted (core dumped)
    

    这种情况我之前是没有遇到过的,于是检查了一下Mach.C的源码:

    #include "calc.H"
    #include "fluidThermo.H"
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
    {
        bool writeResults = !args.optionFound("noWrite");
    
        IOobject Uheader
        (
            "U",
            runTime.timeName(),
            mesh,
            IOobject::MUST_READ
        );
    
        IOobject Theader
        (
            "T",
            runTime.timeName(),
            mesh,
            IOobject::MUST_READ
        );
    
        // Check U and T exists
        if (Uheader.headerOk() && Theader.headerOk())
        {
            autoPtr<volScalarField> MachPtr;
    
            volVectorField U(Uheader, mesh);
            if
            (
                IOobject
                (
                    "thermophysicalProperties",
                    runTime.constant(),
                    mesh
                ).headerOk()
            )
            {
                // thermophysical Mach
                autoPtr<fluidThermo> thermo
                (
                    fluidThermo::New(mesh)
                );
    
                volScalarField Cp(thermo->Cp());
                volScalarField Cv(thermo->Cv());
    
                MachPtr.set
                (
                    new volScalarField
                    (
                        IOobject
                        (
                            "Ma",
                            runTime.timeName(),
                            mesh
                        ),
                        mag(U)/(sqrt((Cp/Cv)*(Cp - Cv)*thermo->T()))
                    )
                );
            }
            else
            {
                // thermodynamic Mach
                   IOdictionary thermoProps
                (
                    IOobject
                    (
                        "thermodynamicProperties",
                        runTime.constant(),
                        mesh,
                        IOobject::MUST_READ_IF_MODIFIED,
                        IOobject::NO_WRITE
                    )
                );
    
                dimensionedScalar R(thermoProps.lookup("R"));
                dimensionedScalar Cv(thermoProps.lookup("Cv"));
    
                volScalarField T(Theader, mesh);
    
                MachPtr.set
                (
                    new volScalarField
                    (
                        IOobject
                        (
                            "Ma",
                            runTime.timeName(),
                            mesh
                        ),
                        mag(U)/(sqrt(((Cv + R)/Cv)*R*T))
                    )
                );
            }
    
            Info<< "Mach max : " << max(MachPtr()).value() << endl;
            if (writeResults)
            {
                MachPtr().write();
            }
        }
        else
        {
            Info<< "    Missing U or T" << endl;
        }
    
        Info<< "\nEnd\n" << endl;
    }
    
    

    代码中只要有U,T 和热力学模型就好了,不知道为什么错误提示要构造e这个场?谢谢各位!


登录后回复
 

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