##### Page tree
Go to start of banner

# Semi-intrinsic Function

You are able to create semi-intrinsic functions in Quaestor when you want to use the pattern of a user-defined function in different ways.

For instance, the general definition of a Froude number is speed divided by the square root of the gravitational acceleration and length. However, you can also specify a Froude number for depth in which you use clearance between the botom of a hull and the bottom of a canal or lake. In that case you can use the same semi-intrinsic function with clearance instead of length as input.

## Syntax

FunctionParameterName(GoalParameterName, Argument1, ..., ArgumentN)

Arguments

• FuctionParameterName is the function name that will be available als semi-intrinsic function;

• GoalParameterName is the parameter that will be computed by the function and returned as function value;

• Argument1, ..., ArgumentN are the parameters specified as input (it is not required to provide all parameter values that are required to calculate GoalParameterName).

## Remarks

1. As noted above you are not required to provide all parameter of the expressions used to calculated as GoalParameterName. However, note that the value for any parameter you do not specify should be either available while you use the function or will be requested as additional input that may be stored on the top level of your solution and become (sometimes undesired) global values for your solution. Therefore, the safe way of use is to provide all needed input parameters for GoalParameterName explicitly in the syntax description.

## Examples

Assume you have created the expression:
fn=speed/SQRT(g*length)

To make a semi-intrinsic function from this expression. Define the following in the New Parameter, Object, Function window:
F_fn(fn, speed, g, length)

In which F_fn is the name of the intrinsic function, using fn as top goal and require speedg and length as input.

When you use this function for another expression you can now write:
fn_depth=F_fn(V, g, GroundClearance)

with V the ship speed in [m/s], g the grav. acc. in [m/s^2] and GroundClearance the distance in [m] between ship bottom and bottom of the water it is sailing in.

Function overview

• No labels