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

Star ccm doesn't show user defined function in velocity field function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2024, 21:09
Default Star ccm doesn't show user defined function in velocity field function
  #1
New Member
 
Join Date: Jul 2024
Posts: 2
Rep Power: 0
cloudysky is on a distinguished road
I am trying to put across a user defined function(parabolic velocity profile) to a rectangular cross section as input velocity(no Z-directional changes, just x and y parabolic velocity). My function doesn't show up at all in the velocity field function tree. How do i apply parabolic velocity using user defined function to the geometry?
Attached Images
File Type: jpg Screenshot 2024-07-17 210521.jpg (81.8 KB, 8 views)
File Type: jpg 2.jpg (57.0 KB, 7 views)
File Type: jpg 3.jpg (74.6 KB, 9 views)
cloudysky is offline   Reply With Quote

Old   July 18, 2024, 23:10
Default
  #2
f-w
Senior Member
 
f-w's Avatar
 
Join Date: Apr 2009
Posts: 159
Rep Power: 17
f-w is on a distinguished road
Your field function doesn't show up in the tree because it is a scalar type. When creating the field function, select a vector type. Also, make sure to specify dimensions that are appropriate for velocity, and define it in the form of [Vx,Vy,0], where Vx and Vy are equations for x and y components of your custom velocity profile.
f-w is offline   Reply With Quote

Old   July 22, 2024, 21:01
Default
  #3
New Member
 
Join Date: Jul 2024
Posts: 2
Rep Power: 0
cloudysky is on a distinguished road
Quote:
Originally Posted by f-w View Post
Your field function doesn't show up in the tree because it is a scalar type. When creating the field function, select a vector type. Also, make sure to specify dimensions that are appropriate for velocity, and define it in the form of [Vx,Vy,0], where Vx and Vy are equations for x and y components of your custom velocity profile.
Thank you for your reply. However, I am having difficulties making a parabolic velocity profile function and then implementing as the code i use always has an error. Can you please guide me on how to make a parabolic velocity profile for a rectangular cross section(can be scalar or vector). The velocity need not have vector definition as all flow is normal to surface just varying across the height in a parabolic function. The function i use in scalar type is '(${Vm} * (1 - pow(${Position}[1], 2) / pow(${thickness}, 2)))'
cloudysky is offline   Reply With Quote

Old   July 22, 2024, 21:23
Default
  #4
f-w
Senior Member
 
f-w's Avatar
 
Join Date: Apr 2009
Posts: 159
Rep Power: 17
f-w is on a distinguished road
Position is a vector, so ${Position} should be corrected to $${Position}; this should get you going, assuming "Vm" and "thickness" variables are defined.
f-w is offline   Reply With Quote

Old   August 20, 2024, 13:52
Default
  #5
New Member
 
Join Date: Oct 2023
Posts: 6
Rep Power: 2
Voluped is on a distinguished road
Hi,

Ensure Variable Definitions:

${Vm}: Maximum velocity
${Position}[1]: y-coordinate (height direction)
${thickness}: Half the height of the rectangle (if the profile is centered at y = 0)

Correct the Function:
The function should correctly represent the parabolic profile. Your function seems almost correct but ensure that ${Position}[1] ranges correctly within the domain.

Here's an example of a scalar field function for a parabolic velocity profile:
${Vm} * (1 - pow(${Position}[1] / ${thickness}, 2))

Create the User-Defined Field Function:
Go to Tools > Field Functions.
Right-click and select New > Field Function.
Name the field function (e.g., ParabolicVelocity).
Set the function type to Scalar.
Define the function using the above expression.

Assign the Field Function to the Inlet Boundary:
Go to Regions > Boundaries and select the boundary where you want to apply the velocity.
Under the Physics Conditions tab, set the Velocity Specification to Field Function.
For the Velocity property, select the user-defined field function (ParabolicVelocity) you created.

Example Implementation:
If ${Vm} is 1 m/s and ${thickness} is 0.05 m (assuming the height of the rectangular cross-section is 0.1 m), your function would look like:
1 * (1 - pow(${Position}[1] / 0.05, 2))
Voluped 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
Point Set Profile User Function with Field Function Arguments wcj1n18 STAR-CCM+ 0 March 23, 2022 05:47
Wrong units of user defined field function FliegenderZirkus FLUENT 0 July 19, 2020 11:21
velocity field function in star ccm rahulpawar STAR-CCM+ 2 September 21, 2016 02:55
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15


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