# Help creating a field function to create a sine pressure wave

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

 February 16, 2011, 07:56 Help creating a field function to create a sine pressure wave #1 New Member   Imran Join Date: Oct 2010 Posts: 9 Rep Power: 8 Sponsored Links Hi all, i'm having problems creating a fluctuating pressure inlet through a pipe. I need to create a sine wave of around 1000 Hz with an amplitude of 10 Pa and a mean pressure of 100 Pa. This is what i have done below in Matlab: t=0:0.01:10; Pmean=100; Pamplitude=10; f=1000; w=2*3.14*f; Ptime=Pmean+Pamplitude*sin(w*t); How on earth do i transfer this into a field function? Is a field function the right way to go about this? Thanks in advance!

 February 16, 2011, 10:24 #2 New Member   Join Date: Jul 2010 Posts: 11 Rep Power: 9 Yes a field function is the right way. The definition of your field function should be something like the following: 100+10*sin(2*3.14*1000*\$Time)

February 17, 2011, 13:16
#3
New Member

Imran
Join Date: Oct 2010
Posts: 9
Rep Power: 8
Quote:
 Originally Posted by and_ Yes a field function is the right way. The definition of your field function should be something like the following: 100+10*sin(2*3.14*1000*\$Time)

That appears to work perfectly, thanks a lot!

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post prapanj OpenFOAM Running, Solving & CFD 3 April 12, 2012 01:49 matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51 Dan Moskal Main CFD Forum 0 October 24, 2002 22:02 DS & HB Main CFD Forum 0 January 8, 2000 16:00 david Main CFD Forum 5 July 21, 1999 02:38