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

User Function

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 7, 2011, 17:04
Default User Function
  #1
New Member
 
Ryan
Join Date: Sep 2010
Posts: 6
Rep Power: 15
racerdude777 is on a distinguished road
I'm modeling a 3-D wing in a wind tunnel and am looking to oscillate the flow direction in a sinusoidal fashion. I am looking to use a simple user function to accomplish this but Star-CCM+ can't compile it. Can somebody take a look and shed some light on whats wrong with it? Thank you.

First Code:
($Time > 0) :
$$Velocity[0] = 24.218*COS*(0.2094395+0.174533*SIN*((0.2079*$Time) ));
$$Velocity[1] = 24.218*SIN*(0.2094395+0.174533*SIN*((0.2079*$Time) ));
$$Velocity[2] = 0;

Second Code:
($Time > 0)? [24.218*COS*(0.2094395+0.174533*SIN*((0.2079*$Time) )), 24.218*SIN*(0.2094395+0.174533*SIN*((0.2079*$Time) )), 0] : [0,0,0])


racerdude777
racerdude777 is offline   Reply With Quote

Old   April 7, 2011, 18:17
Default
  #2
f-w
Senior Member
 
Join Date: Apr 2009
Posts: 153
Rep Power: 16
f-w is on a distinguished road
Try:

[($Time > 0) ? 24.218*cos(0.2094395+0.174533*sin(0.2079*$Time)) : 0, ($Time > 0) ? 24.218*sin(0.2094395+0.174533*sin(0.2079*$Time) ) : 0, 0]
f-w is offline   Reply With Quote

Old   April 14, 2011, 03:58
Default
  #3
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 21
abdul099 is on a distinguished road
$$Velocity[x] with x = 0,1,2 (from the first code) adresses the velocity field generated by the solver. You can not assign any values to one of the default field functions, so the statement "$$Velocity[0] = " can not work.
In general, your second code should work, but there are some * too much between the sin and cos functions and the following brackets. Even on your calculator, you don't type "sin * (5*PI)", you type sin(5*PI).

Try
($Time > 0)? [24.218*COS(0.2094395+0.174533*SIN((0.2079*$Time) )), 24.218*SIN(0.2094395+0.174533*SIN((0.2079*$Time) )), 0] : [0,0,0])
abdul099 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 14:06
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 21:50
[OpenFOAM] Could you please help me liugx212 ParaView 4 December 22, 2005 17:55
User Defined Function for convection coefficient ereiss FLUENT 1 July 8, 2004 17:10
User define flux function kethireddy FLUENT 0 July 5, 2004 05:53


All times are GMT -4. The time now is 04:56.