CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   Star CCM+ Exponentials Syntax?? (https://www.cfd-online.com/Forums/star-ccm/94219-star-ccm-exponentials-syntax.html)

RobH November 9, 2011 11:43

Star CCM+ Exponentials Syntax??
 
I trying to create my own viscosity field function. The definition is to be set as k*$StrainRate^n. k and n are known constants. My problem is, what is the correct syntax in Star CCM+ for the exponent. Start CCM+ does not seem to recognise '^' and I can't find the right operator else where.

Thanks for your help (I'm new at CFD)

Pauli November 9, 2011 12:32

pow($x,$y) -x raised to the power of y

willimanili November 10, 2011 02:01

In your case the fieldfunction should be k*pow($StrainRate,n)

RobH November 10, 2011 06:06

Thanks for your help

sabrina January 29, 2015 07:22

Quote:

Originally Posted by Pauli (Post 331408)
pow($x,$y) -x raised to the power of y

please and here

$AbsoluteTotalPressure*1.2*pow($MachNumber,2)*((1. 2*pow($MachNumber,2))/((2.4*pow($MachNumber,2))-0.166666667))^2.5

it's a long formula, and I cant find the errors

for power is always used "pow"? and "^"?

Arthur February 5, 2015 05:43

Quote:

Originally Posted by sabrina (Post 529513)
please and here

$AbsoluteTotalPressure*1.2*pow($MachNumber,2)*((1. 2*pow($MachNumber,2))/((2.4*pow($MachNumber,2))-0.166666667))^2.5

it's a long formula, and I cant find the errors

for power is always used "pow"? and "^"?

Sabrina the operator "^" is not used in star-ccm the error in your formula is exactly this one at the end.

Take a look at the user guide in Using Tools > Using Field Functions > Field Function Programming Reference > Miscellaneous Functions for reference...

sabrina February 5, 2015 06:53

Quote:

Originally Posted by Arthur (Post 530516)
Sabrina the operator "^" is not used in star-ccm the error in your formula is exactly this one at the end.

Take a look at the user guide in Using Tools > Using Field Functions > Field Function Programming Reference > Miscellaneous Functions for reference...

thank you Arthur, I have corrected, can you tell me if you have idea, in star CCM+, we can do a new field function with derivative like (dT/dy) or (dV/dy) ?


All times are GMT -4. The time now is 00:14.