|
[Sponsors] |
April 16, 2013, 02:09 |
body force with a phase shift
|
#1 |
New Member
Pavel
Join Date: Apr 2013
Location: Russia
Posts: 2
Rep Power: 0 |
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) ); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ActuatorDiskExplicitForce in OF2.1. Help | be_inspired | OpenFOAM Programming & Development | 10 | September 14, 2018 11:12 |
UDF for defining a body force in Singel ROtating Reference Frame | teymourj | Fluent UDF and Scheme Programming | 9 | August 18, 2016 15:33 |
How to add a source term (body force) to icoFoam? | chris Liu | OpenFOAM Programming & Development | 4 | October 27, 2014 15:38 |
About body force in UDF | Yanlong Li | Fluent UDF and Scheme Programming | 0 | January 15, 2013 05:28 |
Body force at the cell face | Souviktor | Fluent UDF and Scheme Programming | 0 | March 31, 2009 08:54 |