|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Niaz Ali Ahmed
Join Date: Jun 2010
Posts: 13
Rep Power: 5 ![]() |
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. |
|
|
|
|
|
|
|
|
#2 |
|
New Member
Jean-François Corbett
Join Date: Aug 2011
Posts: 8
Rep Power: 3 ![]() |
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 |
|
|
|
|
|
|
|
|
#3 |
|
New Member
Niaz Ali Ahmed
Join Date: Jun 2010
Posts: 13
Rep Power: 5 ![]() |
@jfcorbett
Thank you very much. The problem is solved now. |
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh | gschaider | OpenFOAM | 284 | April 8, 2013 09:19 |
| polynomial thermophysical properties II | sebastian | OpenFOAM Running, Solving & CFD | 49 | August 1, 2011 03:38 |
| 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 |
| groovyBC | sega | OpenFOAM Running, Solving & CFD | 12 | February 17, 2010 09:30 |