CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Fundamental Operations for Source Terms

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 22, 2014, 23:31
Default Fundamental Operations for Source Terms
  #1
New Member
 
james wilson
Join Date: Aug 2014
Posts: 11
Rep Power: 2
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: Adding porosity to UEqn.H in porousInterFoam

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 : InterFoam: add a source term in alpha eq.

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, 23:43
Default
  #2
Member
 
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 84
Rep Power: 3
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

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
Implicit treatment of advection terms and pressure correction nikosb Main CFD Forum 0 January 17, 2010 17:07
Using source terms jsm Main CFD Forum 4 August 20, 2009 07:44
Question in definition of terms in solve titio OpenFOAM Running, Solving & CFD 0 March 19, 2009 18:02
Source terms in local coordinate frames CF CFX 2 August 29, 2006 03:30
K-Epsilon model? Brindaban Ghosh Main CFD Forum 2 June 24, 2000 05:22


All times are GMT -4. The time now is 11:48.