- **OpenFOAM Pre-Processing**
(*http://www.cfd-online.com/Forums/openfoam-pre-processing/*)

- - **Math form expressed in OpenFoam**
(*http://www.cfd-online.com/Forums/openfoam-pre-processing/62251-math-form-expressed-openfoam.html*)

volVectorField A = (a, b, c)
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? |

original form:
a¶xu + b¶
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. |

http://foam.sourceforge.net/dohttp://foam.sourceforge.net/doc/Guid...mmersGuide.pdf
Check section one for a general overview of OpenFOAM tensor algebra and notation. Very useful document IMO. |

Thank you so much.
I mixed Thank you so much.
I mixed * and &. and operator calculation order is the written/appearing order, *, /, ect, do not have precedence to +, -. |

Yes - the one thing you can't 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 |

All times are GMT -4. The time now is 16:37. |