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

Field Function Question. Need help writing it :(((

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 6, 2012, 16:44
Question Field Function Question. Need help writing it :(((
  #1
New Member
 
kj878
Join Date: Feb 2012
Posts: 10
Rep Power: 14
kj878 is on a distinguished road


So I'm fairly knew to StarCCM and I need to set up my initial wall temperature such that it decreases as it goes along the length. I believe i need to write a field function for this but unfortunately I have zero experience in writing programs/codes and I have no idea how to write field function formula for my problem.

Wont someone be kind enough to help me write a field function?

My problem statement is a fluid flowing through a pipe, length say 1m and the temperature of the wall varies through the length.

From L=0 to L=.5 I need my wall temp to be at 150C. From L=.5 to L=.75, the wall temp needs to drop from 150C to 70C, linearly. Similarly, from L=.75 to L=1m, the wall temp needs to drop from 70C to 35C, linearly as well.

Can someone please help me with this??
Many thanks in advance!

Last edited by kj878; February 7, 2012 at 11:34.
kj878 is offline   Reply With Quote

Old   February 14, 2012, 18:30
Default
  #2
New Member
 
Thomas Ziegenhein
Join Date: Feb 2012
Posts: 8
Rep Power: 14
ThomasZiegenhein is on a distinguished road
Another option is to create an extern Table and read it in Star-ccm+.

With Field Functions it should work also. You get the values of the standard Field Functions through their names, e.g. $$Position[0] gives the i-th coordinate (x in Cartesian). IF-ELSE is like the short form in java, (Expression) ? statement1(if true) : statement2(if false) . You can make the linear drop in an extra Field Function and use it as statement. For further information take a look in the help.
ThomasZiegenhein 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
LiencubiclowRemodel nzy102 OpenFOAM Bugs 14 January 10, 2012 08:53
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 13:06
user field function girishg STAR-CCM+ 5 May 13, 2010 09:21
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 04:37
Question about wall function Gary Main CFD Forum 1 December 3, 2007 10:54


All times are GMT -4. The time now is 02:38.