- **STAR-CCM+**
(*http://www.cfd-online.com/Forums/star-ccm/*)

- - **Help creating a field function to create a sine pressure wave**
(*http://www.cfd-online.com/Forums/star-ccm/85052-help-creating-field-function-create-sine-pressure-wave.html*)

Help creating a field function to create a sine pressure waveHi 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! :) |

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) |

Quote:
That appears to work perfectly, thanks a lot! :) |

All times are GMT -4. The time now is 09:40. |