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/)
-   -   how to print a vector in openfoam terminal???? (https://www.cfd-online.com/Forums/openfoam-programming-development/149942-how-print-vector-openfoam-terminal.html)

13msmemusman March 11, 2015 12:31

how to print a vector in openfoam terminal????
 
Hye i want to print a vector in openfoam which is
vector CoM = sum(mesh.V()*(alpha1*rho1 + (1-alpha1)*rho2)*mesh.C().dimensionedInternalField())/sum(mesh.V()*(alpha1*rho1+(1-alpha1)*rho2));

I tried Cout but it doesnt work as it only works for strings. please guide me how can i print it.

Cyp March 11, 2015 15:27

Info << "blah blah"<< endl;


All times are GMT -4. The time now is 07:39.