|
[Sponsors] |
June 19, 2006, 16:07 |
Hi Friends,
I have a proble
|
#1 |
Senior Member
Guoxiang
Join Date: Mar 2009
Posts: 109
Rep Power: 17 |
Hi Friends,
I have a problem of the Vector and scalar when I process the Darcy velocity. The Darcy velocity is depended on the gradient of pressure. Pressure is the SCALAR, but Darcy VELOCITY is the VECTOR. So when I complier, I was told the operator is error. My equation of the Darcy velocity is: U = -K/nu(grad(P) - rho*g) where K is the permeability, nu is the viscosity, P is pressure and g is gravity. I encoded as followsing in FOAM: fvVectorMatrix UEqn // solving Darcy velocity ( - (K/nu)*(fvc::grad(P) - rho*g) ); UEqn.solve(); The complier error is: buoyantFoam.C:81: error: no match for 'operator-' in 'Foam::fvc::grad(const Foam::GeometricField<type,>&) [with Type = Foam::scalar]() - Foam::operator*(const Foam::GeometricField<foam::scalar,>&, const Foam::GeometricField<type,>&) [with Type = Foam::scalar, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::GeometricField<foam::scalar,>&)((const Foam::GeometricField<foam::scalar,>*)(& gh))))' /home/liu/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/dimensionSet.H:176: note: candidates are: Foam::dimensionSet Foam::operator-(const Foam::dimensionSet&) /home/liu/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/dimensionSet.H:188: note: Foam::dimensionSet Foam::operator-(const Foam::dimensionSet&, const Foam::dimensionSet&) /home/liu/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/dimensionedScalar.H:55: note: Foam::dimensionedScalar Foam::operator-(const Foam::dimensionedScalar&, Foam::scalar) /home/liu/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/dimensionedScalar.H:56: note: Foam::dimensionedScalar Foam::operator-(Foam::scalar, const Foam::dimensionedScalar&) /home/liu/OpenFOAM/OpenFOAM-1.2/src/cfdTools/general/lnInclude/initContinuityErr s.H:38: warning: unused variable 'cumulativeContErr' make: *** [Make/linuxGcc4Opt/buoyantFoam.o] Error 1 Could any friend help me? Thanks so much. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to define unsteady term in scaler function? | olivia | FLUENT | 5 | December 3, 2012 14:40 |
velocity vector | Nitin Dewangan | CFX | 0 | September 12, 2008 00:56 |
Vector devide by vector | bhuve | OpenFOAM Running, Solving & CFD | 2 | June 2, 2008 07:14 |
Scaler | Eisa | FLUENT | 4 | May 16, 2006 06:54 |
How to impose user scaler onto wall boundary | Min-Hua Wang | CFX | 4 | April 5, 2002 09:23 |