
我在做openfoam的求解器,在编译的时候我加入了
Info<< "Creating combustion model\n" << endl;
autoPtr<combustionModels::psiChemistryCombustionModel> combustion
(
combustionModels::psiChemistryCombustionModel::New
(
mesh
)
);
psiChemistryModel& chemistry = combustion->pChemistry();
hsCombustionThermo& thermo = chemistry.thermo();
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
word inertSpecie(thermo.lookup("inertSpecie"));
,并且在主程序中加入了#include "psiChemistryCombustionModel.H",编译读到这一段时显示报错,错误的文件是combustionModel,程序如下
#ifndef combustionModel_H
#define combustionModel_H
#include "IOdictionary.H"
#include "turbulenceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class combustionModel Declaration
\*---------------------------------------------------------------------------*/
class combustionModel
:
public IOdictionary
{
protected:
// Protected data
//- Reference to the turbulence model
compressible::turbulenceModel* turbulencePtr_;
//- Reference to the mesh database
const fvMesh& mesh_;
//- Active
Switch active_;
//- Dictionary of the model
dictionary coeffs_;
//- Model name
const word modelType_;
private:
// Private Member Functions
//- Disallow copy construct
combustionModel(const combustionModel&);
//- Disallow default bitwise assignment
void operator=(const combustionModel&);
public:
//- Runtime type information
TypeName("combustionModel");
// Constructors
//- Construct from components
combustionModel(const word& modelType, const fvMesh& mesh);
//- Destructor
virtual ~combustionModel();
// Member Functions
// Access
//- Return const access to the mesh database
inline const fvMesh& mesh() const;
//- Return const access to phi
inline const surfaceScalarField& phi() const;
//- Return const access to rho
virtual tmp<volScalarField> rho() const = 0;
//- Return access to turbulence
inline const compressible::turbulenceModel& turbulence() const;
//- Set turbulence
inline void setTurbulence
(
compressible::turbulenceModel& turbModel
);
//- Is combustion active?
inline const Switch& active() const;
//- Return const dictionary of the model
inline const dictionary& coeffs() const;
// Evolution
//- Correct combustion rate
virtual void correct() = 0;
//- Fuel consumption rate matrix, i.e. source term for fuel equation
virtual tmp<fvScalarMatrix> R(const volScalarField& Y) const = 0;
//- Heat release rate calculated from fuel consumption rate matrix
virtual tmp<volScalarField> dQ() const = 0;
//- Return source for enthalpy equation [kg/m/s3]
virtual tmp<volScalarField> Sh() const;
// I-O
//- Update properties from given dictionary
virtual bool read();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//#include "combustionModelI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
但是显示说compressible没有定义,请问这个应该要怎么改啊,这个文档是自带的我没有修改过,为什么程序就不能识别呢?
万分感谢!