CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to represents terms (http://www.cfd-online.com/Forums/openfoam-solving/65983-how-represents-terms.html)

titio July 2, 2009 11:58

How to represents terms
 
Hi Foamers,

I have a question concerning C++ programing, when considering OpenFoam. In my modelling I have to consider
a term in the form grad(U)+Transpose(Grad(U)), that corresponds to the deformation rate. What I do is:

volTensorField DU = fvc::grad(U)
volTensorField DUT = DU.T()

I think in this way that when I do fvc::grad(U) for DU, the second expressions is equivalent to write
DUT = fvc::grad(U.T()). The first form works without problems, the second gives me a compilation error.

Am I doing something wrong? If so, somebody has some idea on how I should made the calculation of this term?

Regards,

Titio

henrik July 3, 2009 03:38

Hi Titio,

Code:

volTensorField DU = fvc::grad(U)
 volTensorField DUT = DU.T()

Here you are missing ";". Please post the complete code if this is not the problem.

Henrik


All times are GMT -4. The time now is 08:15.