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

problem writing field function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2013, 14:01
Default problem writing field function
  #1
New Member
 
shoumo
Join Date: Jun 2013
Posts: 16
Rep Power: 13
amarjogot is on a distinguished road
Hello everyone, I am having some problem using star CCM+ for my model. I was trying to use a specific function for my velocity inlet. As my model is a cylinder. It has two velocity component. One with the radial and another one with the tangential. I used a code while using it in the fluent (attached file). I am also not sure how to compile user defined function in star ccm+. Thanks in advance for the assistance.

Zoheb
Attached Images
File Type: jpg user defined function.jpg (22.5 KB, 149 views)
Attached Files
File Type: c zohebvelnew.c (935 Bytes, 63 views)
amarjogot is offline   Reply With Quote

Old   January 5, 2014, 22:16
Default
  #2
New Member
 
phanh
Join Date: Feb 2011
Posts: 20
Rep Power: 15
phanh is on a distinguished road
Quote:
Originally Posted by amarjogot View Post
Hello everyone, I am having some problem using star CCM+ for my model. I was trying to use a specific function for my velocity inlet. As my model is a cylinder. It has two velocity component. One with the radial and another one with the tangential. I used a code while using it in the fluent (attached file). I am also not sure how to compile user defined function in star ccm+. Thanks in advance for the assistance.

Zoheb
Hi Zobeb,

Did you solve your problem? I have the similar problem but I have not yet know how to do it. Can you give me some advises?

Thank you so much.
phanh is offline   Reply With Quote

Old   January 6, 2014, 21:23
Default
  #3
New Member
 
DSK
Join Date: Jan 2014
Posts: 8
Rep Power: 12
dsk2 is on a distinguished road
Phanh,

You may have resurrected an old thread.

In order to specify the inlet velocity as a variable, you can use a field function in "Tools->Field Functions"

Create 3 field functions for velocity, say, Velx, Vely and Velz.

In order to specify variable components for velocity, change the velocity from constant to composite. Then you will have to an option to specify x, y and z velocity components. Change the velocity component from constant to field function for x, y and z velocity component and assign the corresponding field functions- Velx, Vely and Velz.

Note: the function $$Position("Cylindrical 1") returns a cartesian vector of the position coordinates in local coordinate system Cylindrical 1; the subscript operator [] is appended to access a single component of the position vector (with an index of [0], [1], or [2]).
dsk2 is offline   Reply With Quote

Old   January 6, 2014, 23:03
Default
  #4
New Member
 
phanh
Join Date: Feb 2011
Posts: 20
Rep Power: 15
phanh is on a distinguished road
Quote:
Originally Posted by dsk2 View Post
Phanh,

You may have resurrected an old thread.

In order to specify the inlet velocity as a variable, you can use a field function in "Tools->Field Functions"

Create 3 field functions for velocity, say, Velx, Vely and Velz.

In order to specify variable components for velocity, change the velocity from constant to composite. Then you will have to an option to specify x, y and z velocity components. Change the velocity component from constant to field function for x, y and z velocity component and assign the corresponding field functions- Velx, Vely and Velz.

Note: the function $$Position("Cylindrical 1") returns a cartesian vector of the position coordinates in local coordinate system Cylindrical 1; the subscript operator [] is appended to access a single component of the position vector (with an index of [0], [1], or [2]).
Hi DSK,

Thank you for your recommendation. Using user field function, I have succeeded for my requirement. But your suggestion is a good way that I should try it. Could you tell me how to do it with user code in STAR CCM+? For some reason, I prefer definition of velocity profile by user code (by C language) rather than user field function.

Best regards.
phanh is offline   Reply With Quote

Reply

Tags
star ccm+, user defined function, velocity


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
foamToTecplot360 thomasduerr OpenFOAM Post-Processing 121 June 11, 2021 11:05
Problem with Field Function gmoehl STAR-CCM+ 2 August 18, 2012 05:17
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 15:11
Compilation errors in ThirdPartymallochoard feng_w OpenFOAM Installation 1 January 25, 2009 07:59
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51


All times are GMT -4. The time now is 18:54.