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

Field function in StarCCM

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 11, 2022, 20:57
Default Field function in StarCCM
  #1
New Member
 
Hamed
Join Date: Mar 2017
Location: Iran
Posts: 29
Rep Power: 9
hamed1983 is on a distinguished road
Hi all,

I am a newbie in StarCCM, and I am simulating a model in a virtual wind tunnel. I wanted to apply a specific velocity profile in the inlet using the field function but I have come across a problem. First, the equation of the wind profile is pretty simple in Matlab and it is U=@(x) 45*((z/0.0222).^0.11); while z is the position in z-direction ranging z=(1:100)/1000. Now I want to write a field function that can be input into the inlet but the star ccm keeps showing syntax error:
here is my code in starccm: (45*(pow($$Position[2]/0.0222,0.11 )))

Also, I don't know why the field function does not pop up in physic value-velocity!

So any help would be so welcome and highly appreciated.
regards,
Hamed
hamed1983 is offline   Reply With Quote

Old   April 11, 2022, 21:55
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,665
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
You have three closing parentheses ))) and only two opening ones ((

Your field function will result in a scalar field and not a vector field so of course it won't show up. Vectors have i,j,k components.

Note that a velocity profile can be specified using a vector field function or you can specify the x,y,z components using scalar functions. The vector route you need to fix your field function into an actual vector. The component route you need to click a few buttons and then you can use your field function. Go to Physics Values and in Methods choose composite. But make sure you create a new scalar field function with this definition and not a vector field function.
LuckyTran is offline   Reply With Quote

Old   April 11, 2022, 22:09
Default
  #3
New Member
 
Hamed
Join Date: Mar 2017
Location: Iran
Posts: 29
Rep Power: 9
hamed1983 is on a distinguished road
Dear Tran,

Thanks for your prompt reply. Well, these are three parentheses if you check again, even though the code itself is correct, right? and I was wondering if it can be the right approach for the given case explained in the previous question (profile of velocity inlet in a wind tunnel)?

Thanks a billion!
hamed1983 is offline   Reply With Quote

Old   April 11, 2022, 22:15
Default
  #4
New Member
 
Hamed
Join Date: Mar 2017
Location: Iran
Posts: 29
Rep Power: 9
hamed1983 is on a distinguished road
Dear Tran,

As you can see in the attached, why the wind velocity does not show the logarithmic profile. I know something is wrong but don't know what? I would be grateful if you give me a hand in this issue since I have nobody around to ask.

Kind regards
Attached Images
File Type: jpg Screenshot (1780).jpg (130.1 KB, 90 views)
hamed1983 is offline   Reply With Quote

Old   April 11, 2022, 22:20
Default
  #5
New Member
 
Hamed
Join Date: Mar 2017
Location: Iran
Posts: 29
Rep Power: 9
hamed1983 is on a distinguished road
Dear Tran,

I don't know why the output shows zero!

Regards,
hamed1983 is offline   Reply With Quote

Old   April 11, 2022, 22:52
Default
  #6
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,665
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Dear 1983 read my post again

Btw if you're going to use a cracked windows, at least learn to turn off the activator.

You need to put in the range for V[2] not V[0]. Your field function isn't defined over the range of Position[0]


Also there's examples in the help file
LuckyTran is offline   Reply With Quote

Old   April 11, 2022, 23:21
Talking
  #7
New Member
 
Hamed
Join Date: Mar 2017
Location: Iran
Posts: 29
Rep Power: 9
hamed1983 is on a distinguished road
Dear Tran

ooh how could u spot that! Thanks alot btw. That means a lot to me🙋

Regards
hamed1983 is offline   Reply With Quote

Reply

Tags
starccm+

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
Point Set Profile User Function with Field Function Arguments wcj1n18 STAR-CCM+ 0 March 23, 2022 05:47
Implement field function with data from previous time steps as boundary condition Faraam STAR-CCM+ 0 August 20, 2021 15:33
[Other] dynamicTopoFVMesh and pointDisplacement RandomUser OpenFOAM Meshing & Mesh Conversion 6 April 26, 2018 07:30
[mesh manipulation] RefineMesh Error and Foam warning jiahui_93 OpenFOAM Meshing & Mesh Conversion 4 March 3, 2018 11:32
[mesh manipulation] refineMesh Error mohsen.boojari OpenFOAM Meshing & Mesh Conversion 3 March 1, 2018 22:07


All times are GMT -4. The time now is 12:08.