|
[Sponsors] |
November 10, 2005, 04:34 |
volVectorField A = (a, b, c)
|
#1 |
Member
VVqf
Join Date: Mar 2009
Location: Braunschweig
Posts: 66
Rep Power: 17 |
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? |
|
November 10, 2005, 08:26 |
original form:
a¶xu + b¶
|
#2 |
Member
VVqf
Join Date: Mar 2009
Location: Braunschweig
Posts: 66
Rep Power: 17 |
original form:
a¶xu + b¶<font size="-1">xv + c¶xw</font> a¶yu + b¶<font size="-1">yv + c¶yw</font> a¶zu + b¶<font size="-1">zv + c¶zw</font> Thanks a lot. |
|
November 10, 2005, 08:35 |
http://foam.sourceforge.net/do
|
#3 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
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. |
|
November 10, 2005, 09:50 |
Thank you so much.
I mixed
|
#4 |
Member
VVqf
Join Date: Mar 2009
Location: Braunschweig
Posts: 66
Rep Power: 17 |
Thank you so much.
I mixed * and &. and operator calculation order is the written/appearing order, *, /, ect, do not have precedence to +, -. |
|
November 10, 2005, 10:38 |
Yes - the one thing you can't
|
#5 |
Senior Member
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17 |
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 |
|
|
|
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 09:37 |
Has anyone tried a delta form of pressure equation pressurecorrection equation with OpenFOAM | sek | OpenFOAM Running, Solving & CFD | 2 | July 24, 2007 08:53 |
Math notation in OpenFoam a gradb gradb a | vvqf | OpenFOAM | 0 | November 24, 2005 08:17 |
Generalized Math. Form of Turbulence | Nomad | Main CFD Forum | 38 | March 22, 2004 10:03 |
MATH * MATH + MATH - MATH | Mehdi BEN ELHADJ | Main CFD Forum | 2 | October 9, 2000 17:02 |