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

help needed with fvc::div()

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By niklas

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 31, 2009, 04:54
Question help needed with fvc::div()
  #1
New Member
 
Johanna Airaksinen
Join Date: Mar 2009
Posts: 5
Rep Power: 17
johanna is on a distinguished road
I have tried to do an equation that is solved using fvScalarMatrix. One of the terms in this equation is (Ua+Ub)div(kab),
where Ua and Ub are volVectorField and kab is volScalarField and also the unknown of this equation.

I have tried to do this term by using the following
(Ua+Ub) & fvc::div(kab) in the fvScalarMatrix.

I also tried to do this fvc::div(kab) outside the ScalarMatrix to see if it works that way. I get an error message.
"createFields.H:332: error: no matching function for call to 'div(Foam::volScalarField&)' "

Could someone help me and tell me what I'm doing wrong? I don't have a lot of experience with OpenFoam yet.
There are similar equations in my code, that work just fine, but in those the divergence term is normal.

Johanna
johanna is offline   Reply With Quote

Old   August 31, 2009, 05:36
Default
  #2
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
divergence of a scalar!!!
The error message cant be much clearer.

divergence works on vectors...returns a scalar.
grad works on scalars....returns a vector
atulkjoy likes this.
niklas is offline   Reply With Quote

Old   August 31, 2009, 08:12
Default
  #3
New Member
 
Johanna Airaksinen
Join Date: Mar 2009
Posts: 5
Rep Power: 17
johanna is on a distinguished road


I have been laughing at myself here when I read your reply.

Thanks!
johanna is offline   Reply With Quote

Reply


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
Mesh generation software is needed H.Dou Main CFD Forum 12 May 4, 2011 16:20
Windows XP Batch file help needed DL123 Main CFD Forum 2 July 3, 2009 09:53
Help needed on homogeneous isotropic turbulence an Guoping Xia Main CFD Forum 0 March 12, 2006 22:54
a dissertation in ETD needed very much LiQiang Main CFD Forum 0 March 11, 2005 04:09
CFD Software Engineer needed in Fort Worth, Texas Ross Main CFD Forum 0 November 19, 2001 15:48


All times are GMT -4. The time now is 13:32.