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

body force with a phase shift

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools 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

Thread Tools
Display Modes

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 On
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 8 July 3, 2014 10:54
About body force in UDF Yanlong Li Fluent UDF and Scheme Programming 0 January 15, 2013 05:28
Help: How to add a source term (body force) to icoFoam? chris Liu OpenFOAM 3 February 17, 2012 07:51
UDF for defining a body force in Singel ROtating Reference Frame teymourj FLUENT 2 July 28, 2011 17:45
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:22.