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

Fundamental Operations for Source Terms

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 22, 2014, 22:31
Default Fundamental Operations for Source Terms
  #1
Member
 
james wilson
Join Date: Aug 2014
Location: Orlando, Fl
Posts: 39
Rep Power: 11
jameswilson620 is on a distinguished road
I have a question pertaining to operations in openFOAM. I have experienced some compiling errors when trying to modify UEqn.H according to another thread I started: http://www.cfd-online.com/Forums/ope...interfoam.html

This question comes about as I would like to simply multiply or divide, as was the case in the thread above, however the operator "/" was not valid.

I see in another thread, bare with me here : http://www.cfd-online.com/Forums/ope...-alpha-eq.html

that the multiplication operation "..U*grad(alpha)..." was defined as: "fvc::grad(alpha1) & Ug"

volScalarField Su
(
IOobject
(
"Su",
runTime.timeName(),
mesh
),
// Divergence term is handled explicitly to be
// consistent with the explicit transport solution
fvc::grad(alpha1) & Ug

);

I know this is trivial but Im having difficulties finding a list of "operators" such as * and /. Why is multiplication:* represented as & ?

Could someone kindly provide an explanation for whats happening here and provide some information for what to di in scenarios like this?

Thanks, James
jameswilson620 is offline   Reply With Quote

Old   August 24, 2014, 22:43
Default
  #2
Member
 
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 12
chrisb2244 is on a distinguished road
This link is pretty great for this kind of problem:

http://www.foamcfd.org/Nabla/guides/ProgrammersGuidese4.html


Pretty sure it's accurate, at least it used to be. Haven't checked recently but doubt either it or OF have changed their operators.
chrisb2244 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
Implicit treatment of advection terms and pressure correction nikosb Main CFD Forum 0 January 17, 2010 16:07
Using source terms jsm Main CFD Forum 4 August 20, 2009 06:44
Question in definition of terms in solve titio OpenFOAM Running, Solving & CFD 0 March 19, 2009 16:02
Source terms in local coordinate frames CF CFX 2 August 29, 2006 02:30
K-Epsilon model? Brindaban Ghosh Main CFD Forum 2 June 24, 2000 04:22


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