The Vector and Scaler

 Register Blogs Members List Search Today's Posts Mark Forums Read

 June 19, 2006, 16:07 Hi Friends, I have a proble #1 Senior Member   Guoxiang Join Date: Mar 2009 Posts: 109 Rep Power: 10 Sponsored Links 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&) [with Type = Foam::scalar]() - Foam::operator*(const Foam::GeometricField&, const Foam::GeometricField&) [with Type = Foam::scalar, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::GeometricField&)((const Foam::GeometricField*)(& 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.

 June 20, 2006, 06:21 Is it possible, that your g is #2 Assistant Moderator   Bernhard Gschaider Join Date: Mar 2009 Posts: 4,005 Rep Power: 43 Is it possible, that your g is only a scalar? It should be a vector (gravity is pointing somewhere). __________________ Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request

 June 20, 2006, 06:45 Why are you building a matrix #3 Senior Member   Eugene de Villiers Join Date: Mar 2009 Posts: 725 Rep Power: 14 Why are you building a matrix when the equation is explicit? In any case, you haven't included U in the UEqn. What do you think you will be solving for?

 June 20, 2006, 09:54 Hi, freinds, Many thanks fo #4 Senior Member   Guoxiang Join Date: Mar 2009 Posts: 109 Rep Power: 10 Hi, freinds, Many thanks for your help. I solve the UEqn for the Darcy`s velocity which is depended on the gradient pressure and gravity (for buoyancy). My whole solver is linked by (http://www.cfd-online.com/cgi-bin/Op...cus/discus.cgi). So if not like my wroten, what it should be? Could you give more advice? Thanks again.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post olivia FLUENT 5 December 3, 2012 15:40 Nitin Dewangan CFX 0 September 12, 2008 00:56 bhuve OpenFOAM Running, Solving & CFD 2 June 2, 2008 07:14 Eisa FLUENT 4 May 16, 2006 06:54 Min-Hua Wang CFX 4 April 5, 2002 09:23