CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

The Vector and Scaler

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 19, 2006, 16:07
Default Hi Friends, I have a proble
  #1
Senior Member
 
Guoxiang
Join Date: Mar 2009
Posts: 109
Rep Power: 7
liugx212 is on a distinguished road
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.
liugx212 is offline   Reply With Quote

Old   June 20, 2006, 06:21
Default Is it possible, that your g is
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,809
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
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
gschaider is offline   Reply With Quote

Old   June 20, 2006, 06:45
Default Why are you building a matrix
  #3
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 724
Rep Power: 11
eugene is on a distinguished road
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?
eugene is offline   Reply With Quote

Old   June 20, 2006, 09:54
Default Hi, freinds, Many thanks fo
  #4
Senior Member
 
Guoxiang
Join Date: Mar 2009
Posts: 109
Rep Power: 7
liugx212 is on a distinguished road
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.
liugx212 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


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 08:23


All times are GMT -4. The time now is 08:37.