CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

Help creating a field function to create a sine pressure wave

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 16, 2011, 07:56
Default Help creating a field function to create a sine pressure wave
  #1
New Member
 
Imran
Join Date: Oct 2010
Posts: 9
Rep Power: 16
Pleb is on a distinguished road
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!
Pleb is offline   Reply With Quote

Old   February 16, 2011, 10:24
Default
  #2
New Member
 
Join Date: Jul 2010
Posts: 11
Rep Power: 16
and_ is on a distinguished road
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)
and_ is offline   Reply With Quote

Old   February 17, 2011, 13:16
Default
  #3
New Member
 
Imran
Join Date: Oct 2010
Posts: 9
Rep Power: 16
Pleb is on a distinguished road
Quote:
Originally Posted by and_ View Post
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!
Pleb 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
Pitz Daily oodles pressure field problem prapanj OpenFOAM Running, Solving & CFD 3 April 12, 2012 02:49
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51
Gas pressure question Dan Moskal Main CFD Forum 0 October 24, 2002 23:02
Hydrostatic pressure in 2-phase flow modeling (long) DS & HB Main CFD Forum 0 January 8, 2000 16:00
Using SIMPLE david Main CFD Forum 5 July 21, 1999 03:38


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