bieshuxuhe |
March 31, 2014 02:10 |
interfoam:a problem with Air-phase convective-term treatment
hello!
i modify the convective-term of the UEqn of interfoam. the "alpha1" is volume fraction!
there are two ways that i test.
the first way:
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ alpha1*fvm::div(rhoPhi, U)
+ turbulence->divDevRhoReff(rho, U)
);
and, type "wmake" in the terminal. then , i success !:)
the second way:
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ (fvm::div(rhoPhi, U)) *alpha1
+ turbulence->divDevRhoReff(rho, U)
);
and type "wmake" in the terminal. then , i failed !!!:(
there are some information come out in the terminal:
Code:
/home/sxh/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude/fvMatrix.C:2293:34: 附注: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::operator*(const Foam::dimensioned<double>&, const Foam::tmp<Foam::fvMatrix<Type> >&)
/home/sxh/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude/fvMatrix.C:2293:34: 附注: template argument deduction/substitution failed:
In file included from interFoam.C:90:0:
UEqn.H:4:31: 附注: cannot convert ‘Foam::fvm::div(const surfaceScalarField&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Vector<double>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>]((*(const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>*)(& U)))’ (type ‘Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > >’) to type ‘const Foam::dimensioned<double>&’
In file included from /home/sxh/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/one.H:64:0,
from /home/sxh/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude/fvmDdt.H:40,
from /home/sxh/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude/fvm.H:43,
from /home/sxh/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude/fvCFD.H:10,
from interFoam.C:40:
/home/sxh/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/oneI.H:36:20: 附注: template<class Type> const Type& Foam::operator*(const Type&, const Foam::one&)
/home/sxh/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/oneI.H:36:20: 附注: template argument deduction/substitution failed:
In file included from interFoam.C:90:0:
UEqn.H:4:31: 附注: cannot convert ‘alpha1’ (type ‘Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}’) to type ‘const Foam::one&’
In file included from /home/sxh/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/one.H:64:0,
from /home/sxh/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude/fvmDdt.H:40,
from /home/sxh/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude/fvm.H:43,
from /home/sxh/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude/fvCFD.H:10,
from interFoam.C:40:
/home/sxh/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/oneI.H:42:20: 附注: template<class Type> const Type& Foam::operator*(const Foam::one&, const Type&)
/home/sxh/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude/oneI.H:42:20: 附注: template argument deduction/substitution failed:
In file included from interFoam.C:90:0:
UEqn.H:4:31: 附注: cannot convert ‘Foam::fvm::div(const surfaceScalarField&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Vector<double>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>]((*(const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>*)(& U)))’ (type ‘Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > >’) to type ‘const Foam::one&’
In file included from interFoam.C:61:0:
/home/sxh/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude/readTimeControls.H:38:8: 警告: 未使用的变量‘maxDeltaT’ [-Wunused-variable]
make: *** [Make/linux64GccDPOpt/interFoam.o] 错误 1
sxh@sxh-virtual-machine:~/OpenFOAM/sxh-2.2.0/project/fsi/src/xuheinterFoam$
could you help me ? why the second way is wrong ?
thanks!
|