CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

interfoam:a problem with Air-phase convective-term treatment

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By Phicau

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 31, 2014, 03:10
Exclamation interfoam:a problem with Air-phase convective-term treatment
  #1
Member
 
xuhe-openfoam
Join Date: Aug 2013
Location: DaLian,china
Posts: 82
Rep Power: 13
bieshuxuhe is on a distinguished road
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!
bieshuxuhe is offline   Reply With Quote

Old   March 31, 2014, 03:44
Default
  #2
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Xuhe,

fvm:: corresponds to the implicit part, i.e. the U matrix coefficients. Although both ways should work in theory, only the first one is defined programmatically.

Best,

Pablo
vsammartano and bieshuxuhe like this.
Phicau is offline   Reply With Quote

Old   March 31, 2014, 03:52
Default
  #3
Member
 
xuhe-openfoam
Join Date: Aug 2013
Location: DaLian,china
Posts: 82
Rep Power: 13
bieshuxuhe is on a distinguished road
thank you !
bieshuxuhe is offline   Reply With Quote

Reply

Tags
interfoam;ueqn


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with two phase flow (air injected in water) miles_davis OpenFOAM 15 March 31, 2021 10:36
Thermal phase change set up problem Danial Q Main CFD Forum 1 July 10, 2014 15:41
Two phase flow problem jignesh_thaker2007 OpenFOAM 2 August 2, 2012 17:59
two phase reaction problem pan_zh OpenFOAM Programming & Development 0 February 6, 2012 00:50
Help - Two Phase Flow - Convergence Problem R.Sureshkumar Main CFD Forum 1 February 22, 2000 04:24


All times are GMT -4. The time now is 05:44.