CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   msha solve Eqn programming in C using FOAM (

msha December 27, 2007 06:59

Any Help is deeply appreciated
Any Help is deeply appreciated;

I have these

volSymmTensorField R;
volSymmTensorField P = - twoSymm(R & fvc::grad(U_));
volScalarField G = 0.5 * tr(P);
solve (R == 2*I/3 - G*(P+2*I)) ;

written in foam file.
but in compile I recieve following error:

"invalid use of void funcion"

it seems that "solve" does not work in this way.

what can I do to solve an "implicit algebraic matrix equation" like this(i.e. without div,grad,laplacian,... )?

hjasak December 27, 2007 07:14

You cannot do: volSymmTensorFi
You cannot do: volSymmTensorField R; : the field does not allow a null constructor.


msha December 30, 2007 03:39

volSymmTensorField R; is only
volSymmTensorField R; is only a declaration in header file not in C++ source file

All times are GMT -4. The time now is 14:01.