CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   STAR-CCM+ (http://www.cfd-online.com/Forums/star-ccm/)
-   -   Help with Field Function describing Force (http://www.cfd-online.com/Forums/star-ccm/114492-help-field-function-describing-force.html)

VinayKS March 12, 2013 04:25

Help with Field Function describing Force
 
Hi,

I am attempting to model the motion of a vehicle that behaves as follows -- While above a certain Depth (say, 2.5m), there is a force acting downwards. And when it goes below 2.5m, the force begins to act upwards.

I have tried modeling this by using a field function for a Force acting on the CM of the object. However, I am getting the following error --

"Error: field function 'Simulation>BodyManager>Body("Body 1")>ExternalForceAndMomentManager>ExternalForceCM( "Force CM 1")>VectorPhysicalQuantity>InlineFieldFunction("In lineFieldFunction")' compilation error: syntax error
Cannot evaluate expression"

The expression I am using is

[50.0, ($$Centroid [1] > -2.5) ? -25.0, 0.0]

This is given in the DFBI --> 6-DOF Bodies --> External Forces and Moments --> <Name of Force> --> Force space.

Any idea why this is happening?

VinayKS March 12, 2013 04:27

Apologies - the expression I used was

[50.0, ($$Centroid [1] > -2.5) ? -25.0 : 25.0 , 0.0]

lava12005 March 12, 2013 23:59

The centroid field function is used for getting the centroid of the mesh.
You need to refer to the centroid of the vehicle I believe.


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