body force with a phase shift
Hello,
I would like to add body force to my 2D equation: F(x,z,t)= F0(x,z)*cos(wt- z/d)^2, where F0(x,z) - the matrix with constant coefficients, which is reading from file, w - constant frequency, d - constant, and x,z - coordinates. I have some trouble with phase shift term in cos(wt- z/d). How I can get z - coordinate? Without the term responsible for the phase shift I have next code, It's works: volVectorField F ( IOobject ( "F", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); volVectorField F1 ( IOobject ( "F1", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), F*pow((Foam::cos(2*M_PI*5*runTime.value())),2) ); |
All times are GMT -4. The time now is 11:32. |