CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Siemens (
-   -   Field Function Question. Need help writing it :((( (

kj878 February 6, 2012 17:44

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

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?:D

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!

ThomasZiegenhein February 14, 2012 19:30

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.

All times are GMT -4. The time now is 09:48.