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/)
-   -   Could you please help me (http://www.cfd-online.com/Forums/openfoam-solving/60375-could-you-please-help-me.html)

liugx212 December 18, 2005 22:24

Dear All, I am also trying
 
Dear All,

I am also trying to change the value of the X,Y and Z of U. I add the code in icoFoam.C, but it does not work yet. Could you please help me?

Thanks a lot.
code:
forAll (centers, celli)
{
double angle = 45;
U.component(vector::X) = U.component(vector::X) * Foam::sin(angle);
U.component(vector::Y) = U.component(vector::Y) * Foam::cos(angle);
U.component(vector::Z) = U.component(vector::Z) * 0;
}


All times are GMT -4. The time now is 04:42.