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

Field Function shows an error

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By jfcorbett

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 23, 2011, 02:42
Default Field Function shows an error
  #1
New Member
 
Niaz Ali Ahmed
Join Date: Jun 2010
Posts: 14
Rep Power: 15
niazaliahmed is on a distinguished road
I am trying to write a vector field function to calculate 17/(Velocity^2)

I have tried

17/(pow($$Velocity,2))
17/($$Velocity*$$Velocity)

Both have failed. Is this because vector division is not possible, or some other error?

However when I use a single dollar Velocity it shows assembly code.

Please help me asap.
niazaliahmed is offline   Reply With Quote

Old   September 23, 2011, 04:12
Default
  #2
New Member
 
Jean-François Corbett
Join Date: Aug 2011
Posts: 8
Rep Power: 14
jfcorbett is on a distinguished road
There is no such thing as vector division.

I'm guessing you want to divide by the magnitude of the velocity vector? STAR-CCM+ provides two ways to calculate the magnitude of a vector:

vector magnitude: mag($$u)
vector magnitude squared: mag2($$u)

So for you, the most straightforward expression is: 17/mag2($$Velocity)

For more, see STAR-CCM+ help:
Using Tools > Using Field Functions > Field Function Programming Reference > Vector Functions
siara817 and Paola like this.
jfcorbett is offline   Reply With Quote

Old   September 23, 2011, 08:17
Default
  #3
New Member
 
Niaz Ali Ahmed
Join Date: Jun 2010
Posts: 14
Rep Power: 15
niazaliahmed is on a distinguished road
@jfcorbett
Thank you very much. The problem is solved now.
niazaliahmed 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
polynomial thermophysical properties II sebastian OpenFOAM Running, Solving & CFD 54 November 21, 2019 07:12
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 18:00
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 18:44
checking the system setup and Qt version vivek070176 OpenFOAM Installation 22 June 1, 2010 12:34
[swak4Foam] groovyBC: problems compiling: "flex: not found" and "undefined reference to ..." sega OpenFOAM Community Contributions 12 February 17, 2010 09:30


All times are GMT -4. The time now is 05:07.