CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Math form expressed in OpenFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 10, 2005, 03:34
Default volVectorField A = (a, b, c)
  #1
Member
 
VVqf
Join Date: Mar 2009
Location: Braunschweig
Posts: 66
Rep Power: 17
vvqf is on a distinguished road
volVectorField A = (a, b, c)
volVectorField U = (u, v, w)

a*Ñu + b*Ñv + c*Ñw

How to describe this expression in OpenFoam?

I express it as A*grad(U), grad(U) is then a tensor. Is that right?
I tried many ways to denote it in the codes, well, each time i got errors like "no match ..."

ps:
in OpenFoam,(U . Ñ)U is expressed as div(phi,U), phi = rho*U?
vvqf is offline   Reply With Quote

Old   November 10, 2005, 07:26
Default original form: a¶xu + b¶
  #2
Member
 
VVqf
Join Date: Mar 2009
Location: Braunschweig
Posts: 66
Rep Power: 17
vvqf is on a distinguished road
original form:

axu + b<font size="-1">xv + cxw</font>
ayu + b<font size="-1">yv + cyw</font>
azu + b<font size="-1">zv + czw</font>

Thanks a lot.
vvqf is offline   Reply With Quote

Old   November 10, 2005, 07:35
Default http://foam.sourceforge.net/do
  #3
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
http://foam.sourceforge.net/doc/Guid...mmersGuide.pdf

Check section one for a general overview of OpenFOAM tensor algebra and notation. Very useful document IMO.
eugene is offline   Reply With Quote

Old   November 10, 2005, 08:50
Default Thank you so much. I mixed
  #4
Member
 
VVqf
Join Date: Mar 2009
Location: Braunschweig
Posts: 66
Rep Power: 17
vvqf is on a distinguished road
Thank you so much.

I mixed * and &.

and operator calculation order is the written/appearing order, *, /, ect, do not have precedence to +, -.
vvqf is offline   Reply With Quote

Old   November 10, 2005, 09:38
Default Yes - the one thing you can't
  #5
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17
grtabor is on a distinguished road
Yes - the one thing you can't redefine (or one of the things you can't redefine) in c++ is the order of precedence for the various binary operators. Its probably worth adding lots of brackets into your expressions to compensate for this.

Gavin
grtabor 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
Can OpenFoam be made faster or which Math kernel library is used jens_klostermann OpenFOAM 0 February 4, 2008 08:37
Has anyone tried a delta form of pressure equation pressurecorrection equation with OpenFOAM sek OpenFOAM Running, Solving & CFD 2 July 24, 2007 07:53
Math notation in OpenFoam a gradb gradb a vvqf OpenFOAM 0 November 24, 2005 07:17
Generalized Math. Form of Turbulence Nomad Main CFD Forum 38 March 22, 2004 09:03
MATH * MATH + MATH - MATH Mehdi BEN ELHADJ Main CFD Forum 2 October 9, 2000 16:02


All times are GMT -4. The time now is 19:20.