CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   msha solve Eqn programming in C using FOAM (https://www.cfd-online.com/Forums/openfoam/60878-msha-solve-eqn-programming-c-using-foam.html)

msha December 27, 2007 05: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 06:14

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

Hrv

msha December 30, 2007 02: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 20:26.