CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

body force with a phase shift

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 16, 2013, 02:09
Default body force with a phase shift
  #1
New Member
 
Pavel
Join Date: Apr 2013
Location: Russia
Posts: 2
Rep Power: 0
paul_oborin is on a distinguished road
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)
);
paul_oborin is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 14:43.