
[Sponsors] 
June 30, 2009, 19:21 
creating a field function

#1 
New Member
Join Date: Jun 2009
Posts: 7
Rep Power: 10 
Sponsored Links
I am working on a project where I have to simulate the flow of air through a pipeline. I want to create the velocity inlet profile on star ccm+. How do I implement this function into the program. funktion : 2E08z^4 + 2E05z^3  0,007z^2 + 1,03z 4,578 Thanks in advance. Can Last edited by can_yas; July 1, 2009 at 03:26. 

Sponsored Links 
July 1, 2009, 05:37 

#2 
Member
Join Date: Mar 2009
Posts: 55
Rep Power: 10 
(2*pow(10,8)*(pow($$Centroid[2],4))) + (2*pow(10,5)*(pow($$Centroid[2],3)))  (0.007*(pow($$Centroid[2],2))) + (1.03*($$Centroid[2]))  4.578
In the above formulation you can also use $$Position[2] instead of $$Centroid[2] is thats what you need. To implement the field function on the boundary Region > Boundaries> Physics Values > Velocity Magnitude (Method > field function) Last edited by SKK; July 1, 2009 at 06:58. 

July 1, 2009, 06:59 

#3 
New Member
Join Date: Jun 2009
Posts: 7
Rep Power: 10 
(2 * Pow (10.8) * (pow ($ $ Centroid [2], 4))) + (2 * pow (10.5) * (pow ($ $ Centroid [2], 3)))  (0.007 * (pow ($ $ Centroid [2], 2))) + (1.03 * (pow ($ $ Centroid [2], 1)))  4.578
I have the equation changed(red color), ist dies correct? and if I have this equation enter into the program, I get error message "Compiled field function type is not vector " Thanks in advance. Can 

July 1, 2009, 07:06 

#4  
Member
Join Date: Mar 2009
Posts: 55
Rep Power: 10 
Quote:
(2 * pow (10,8) * (pow ($$ Centroid [2], 4))) + (2 * pow (10,5) * (pow ($$ Centroid [2], 3)))  (0.007 * (pow ($$ Centroid [2], 2))) + (1.03 * ($$ Centroid [2]))  4.578 In the pow command variables are separated with commas. Also, no space between the two $$ signs. 

July 1, 2009, 07:41 

#5 
New Member
Join Date: Jun 2009
Posts: 7
Rep Power: 10 
Thank you for your effort, unfortunately, does not again.diese equation is a velocity distribution in a Pipe.
I have descriped cylindrical coordinatesystem in the Inlet .it must be the Origin in the middle? Part(Pipe) has a symmetry Plane Last edited by can_yas; July 1, 2009 at 09:03. 

July 1, 2009, 08:30 

#6 
Senior Member
Join Date: Mar 2009
Posts: 203
Rep Power: 11 
Sure that he need to write the E8 as a pow?
Normally it works without this fine?! 

July 1, 2009, 08:53 

#7 
New Member
Join Date: Jun 2009
Posts: 7
Rep Power: 10 
Hi,
I have changed the equation again. 0.00000002 * (pow ($$ Centroid [2], 4)) + 0.00002 * (pow ($$ Centroid [2], 3))  0.007 *(pow($$ Centroid [2], 2)) + 1.03 * ($$ Centroid [2])  4.578 Unfortunately, I get the same error message again,"Compiled field function type is not vector " Thanks 

July 1, 2009, 09:01 

#8 
Member
Join Date: Mar 2009
Posts: 55
Rep Power: 10 
Have you changed the field function 'Type' to vector?
I don't get this error message. I am using an older version of STAR CCM+. I will check it with the new version later and let you know. 

July 1, 2009, 09:02 

#9 
Senior Member
Join Date: Mar 2009
Posts: 203
Rep Power: 11 
Hmm is the function set a scalar?


July 1, 2009, 09:18 

#10 
New Member
Join Date: Jun 2009
Posts: 7
Rep Power: 10 
No, I have field function 'Type' Scalar. I am using version 4.2 of STAR CCM+. how did they coordinate system defined?


July 1, 2009, 09:23 

#11 
Member
Join Date: Mar 2009
Posts: 55
Rep Power: 10 
for vector definition, the three velocity components are described [x,y,z]. I guess in your case it would be
[0,0,0.00000002 * (pow ($$ Centroid [2], 4)) + 0.00002 * (pow ($$ Centroid [2], 3))  0.007 *(pow($$ Centroid [2], 2)) + 1.03 * ($$ Centroid [2])  4.578] 

July 1, 2009, 09:27 

#12 
Senior Member
Join Date: Mar 2009
Posts: 203
Rep Power: 11 
4.2? You mean 4.02?
In the properties you have the function type. Make a screenshot. 

July 1, 2009, 09:32 

#13 
Member
Join Date: Mar 2009
Posts: 55
Rep Power: 10 

July 1, 2009, 09:39 

#14  
New Member
Join Date: Jun 2009
Posts: 7
Rep Power: 10 
Quote:
That is really unbelievable. This works. I am very grateful for their help 

July 1, 2009, 09:41 

#15 
New Member
Join Date: Jun 2009
Posts: 7
Rep Power: 10 

July 1, 2009, 10:11 

#16 
Senior Member
Join Date: Mar 2009
Posts: 203
Rep Power: 11 
@SKK: Maybe you should make a benchmark for this extra pow function
A other way would be to use $Centroid_i (maybe a "cleaner" way). Of cource you need the vector "style" for the velocity I make too much 2D 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Moving mesh  Niklas Wikstrom (Wikstrom)  OpenFOAM Running, Solving & CFD  122  June 15, 2014 06:20 
Compile problem  ivanyao  OpenFOAM Running, Solving & CFD  1  October 12, 2012 09:31 
Error with Wmake  skabilan  OpenFOAM Installation  3  July 28, 2009 00:35 
Problem with rhoSimpleFoam  matteo_gautero  OpenFOAM Running, Solving & CFD  0  February 28, 2008 07:51 
Axisymmetrical mesh  Rasmus Gjesing (Gjesing)  OpenFOAM Native Meshers: blockMesh  10  April 2, 2007 14:00 
Sponsored Links 