CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Basic tensor operations (https://www.cfd-online.com/Forums/openfoam-programming-development/137669-basic-tensor-operations.html)

bou June 20, 2014 07:40

Basic tensor operations
 
Dear,

I would like to define a tensor like this:

Code:

tensor D(w*Dm*I + ((alphaL-alphaT))*(U*U)/mag(U) + mag(U)*alphaT*I)
where:
- w, Dm, alphaL, alphaT are volScalarField objects,
- I, tensor I (1,0,0,0,1,0,0,0,1).

Then I would like to reuse D for example in expression like:

Code:

D*grad(C)
where C is a volScalarField.

Can you help me please?

Best regards,

Bou


All times are GMT -4. The time now is 18:29.