# Math form expressed in OpenFoam

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

 November 10, 2005, 04:34 volVectorField A = (a, b, c) #1 Member   VVqf Join Date: Mar 2009 Location: Braunschweig Posts: 66 Rep Power: 10 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: 10 original form: a¶xu + b¶xv + c¶xw a¶yu + b¶yv + c¶yw a¶zu + b¶zv + c¶zw 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: 14 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: 10 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: 10 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

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post jens_klostermann OpenFOAM 0 February 4, 2008 09:37 sek OpenFOAM Running, Solving & CFD 2 July 24, 2007 07:53 vvqf OpenFOAM 0 November 24, 2005 08:17 Nomad Main CFD Forum 38 March 22, 2004 10:03 Mehdi BEN ELHADJ Main CFD Forum 2 October 9, 2000 16:02

All times are GMT -4. The time now is 03:34.