|
[Sponsors] |
April 11, 2022, 21:57 |
Field function in StarCCM
|
#1 |
New Member
Hamed
Join Date: Mar 2017
Location: Iran
Posts: 29
Rep Power: 9 |
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 |
|
April 11, 2022, 22:55 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66 |
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. |
|
April 11, 2022, 23:09 |
|
#3 |
New Member
Hamed
Join Date: Mar 2017
Location: Iran
Posts: 29
Rep Power: 9 |
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! |
|
April 11, 2022, 23:15 |
|
#4 |
New Member
Hamed
Join Date: Mar 2017
Location: Iran
Posts: 29
Rep Power: 9 |
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 |
|
April 11, 2022, 23:20 |
|
#5 |
New Member
Hamed
Join Date: Mar 2017
Location: Iran
Posts: 29
Rep Power: 9 |
Dear Tran,
I don't know why the output shows zero! Regards, |
|
April 11, 2022, 23:52 |
|
#6 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66 |
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 |
|
April 12, 2022, 00:21 |
|
#7 |
New Member
Hamed
Join Date: Mar 2017
Location: Iran
Posts: 29
Rep Power: 9 |
Dear Tran
ooh how could u spot that! Thanks alot btw. That means a lot to me🙋 Regards |
|
Tags |
starccm+ |
|
|
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 06:47 |
Implement field function with data from previous time steps as boundary condition | Faraam | STAR-CCM+ | 0 | August 20, 2021 16:33 |
[Other] dynamicTopoFVMesh and pointDisplacement | RandomUser | OpenFOAM Meshing & Mesh Conversion | 6 | April 26, 2018 08:30 |
[mesh manipulation] RefineMesh Error and Foam warning | jiahui_93 | OpenFOAM Meshing & Mesh Conversion | 4 | March 3, 2018 12:32 |
[mesh manipulation] refineMesh Error | mohsen.boojari | OpenFOAM Meshing & Mesh Conversion | 3 | March 1, 2018 23:07 |