|
[Sponsors] |
August 22, 2014, 22:31 |
Fundamental Operations for Source Terms
|
#1 |
Member
james wilson
Join Date: Aug 2014
Location: Orlando, Fl
Posts: 39
Rep Power: 11 |
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 |
|
August 24, 2014, 22:43 |
|
#2 |
Member
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 12 |
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. |
|
|
|
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 |