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

Velocity Profile

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 7, 2022, 11:25
Default Velocity Profile
  #1
New Member
 
Daniel
Join Date: Feb 2022
Posts: 9
Rep Power: 4
DP3103 is on a distinguished road
I want to add the power law velocity profile as a field function vector,

when I add it it says there's a syntax error. the Velocity is changing in the y coordinate i.e. as y increases so does the velocity. x and z are 0.

my input is

[0, 12*({Position}/300)^0.28,0]

the equation for the y coordinate is V = KnownV at Known Z * (Z/KnownZ) ^0.28.
my known z is 300 and known v is 12

can you please help thanks
DP3103 is offline   Reply With Quote

Old   March 7, 2022, 13:32
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,677
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Position is a vector.

You need to grab just the y-component it of it using {Position}[1]. I forget off the top of my head if 1 is the y-coordinate, it might be {Position}[2]. You should check. The graphical interface will also let you select (i,j,k components) this if you click in the right places.
LuckyTran is offline   Reply With Quote

Old   March 7, 2022, 15:22
Default
  #3
New Member
 
Daniel
Join Date: Feb 2022
Posts: 9
Rep Power: 4
DP3103 is on a distinguished road
Ive just checked 2 is the y coordinate. so does that mean my vector will just be

[0, 12*(({Position}[2])/300)^0.28, 0]

and that will give me a velocity profile on the velocity inlet boundary condition? My domain is from coordinat 0 to 300 so should this be ok for this?

Thanks
DP3103 is offline   Reply With Quote

Old   March 7, 2022, 15:39
Default
  #4
New Member
 
Daniel
Join Date: Feb 2022
Posts: 9
Rep Power: 4
DP3103 is on a distinguished road
Error: function 'User Field Function 1 (UserFieldFunction_1)' compilation error: syntax error
Unable to compile expression "[0,12*(pow((({position}[2])/300),0.28),0]"

this is my input and i am getting this error. can you please help ive been trying with the velocity profile all day and im getting nowhere!

thanks
DP3103 is offline   Reply With Quote

Old   March 8, 2022, 22:42
Default
  #5
cwl
Senior Member
 
Chaotic Water
Join Date: Jul 2012
Location: Elgrin Fau
Posts: 436
Rep Power: 17
cwl is on a distinguished road
1) Too many parenthesis - also an odd number of them.
2) User '$$' wheh using vector-type Field Function (like Position or Velocity) and single '$' when using scalar-type Field Function.

Code:
[0, 12*pow($${Position}[2]/300, 0.28), 0]
Quote:
can you please help ive been trying with the velocity profile all day and im getting nowhere!
3) Please read the corresponding section of the user guide - Field Functions are very well described there.
It takes just couple of hourse to read it, I have no idea what you were doing all day.
cwl 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
[UDF] Relative coordinates in logarithmic velocity profile cfdworker Fluent UDF and Scheme Programming 25 July 13, 2017 03:44
InterFoam - Validation for velocity profile in simple channel me.ouda OpenFOAM Running, Solving & CFD 0 October 19, 2015 06:42
Logarithmic velocity profile cfdworker Fluent UDF and Scheme Programming 0 April 23, 2009 19:09
[boundary condition] logarithmic velocity profile cfdworker FLUENT 2 April 17, 2009 23:36
Prescribed inflow velocity profile - how to? Alan Main CFD Forum 10 October 28, 2005 12:14


All times are GMT -4. The time now is 10:20.