
Introduction
The CliC module computes forces, moments (with respect to points and lines) and pressure distribution for a configuration represented by a triangulation (manifold or not). Load information and pressure distribution can be performed for a single component, a group of components or the entire geometry. By using some simple keywords, the user can build a database of components, or group of components and address them via names.
The CliC
module takes as input file <*.clic > an annotated triangulation
whose triangles are associated a component number on a triangle-by-triangle
basis. The load information are requested through a control file <*.cntl
>. The commands are defined in this control file through the usage
of keywords. The syntax of this file has been left as simple as possible
to offer the greatest flexibility.

The code can be downloaded from the AIC branch web server as a gzipped tar file. Unzip and untar this archive by:
gunzip -c clic.tar.gz | tar xovf -
Define the environment variable ARCH and in your .cshrc:
setenv ARCH IRIX (SGI 32 bit machines)
setenv ARCH IRIX64 ( SGI 64 bit machines)
setenv ARCH linux (PC running linux)
and customize the Makefile.$ARCH for your
particular machine. Then simpy type
make
to create an executable clic_$ARCH and the API library libclic.a.
NB: the command make clean can be used to clean the distribution directory of all object files and executables, while make new will recompile the whole distribution. make parser calls Lex&Yacc to create the C routines which parse the control file.

The CliC module can be used in standalone mode with the executable clic_$ARCH. It can also be started as a separate thread from any remote machine by issuing system calls from the remote running server code. Runtime options of the CliC module can be obtained by typing:
which outputs the following list of options:

In order to avoid any ambiguity for the forces and moments computed by CLiC, we have decided to adopt two classical frames of reference. The body frame Fbis linked to the aircraft body. The origin is the point of reference of the aircraft, which in general, is the center of mass. The fuselage axis xb, oriented towards th front of the aircraft, belongs to the symmetrical plane of the aircraft. Although its definition in the symmetricl plane is arbitrary, it is usually chosen such that it is parallel to a generatrix if the fuselage is cylindrical. The axis zb is in the symmetrical plane and is directed downward relative to the aircraft. The axis yb is perpendicular to the symmetrical plane and is oriented towards the right "pilot's side" of the aircraft. The user must specify in the control file the axis transformation necessary to transform the frame in which the geometry is defined to the body frame Fb.
The aerodynamical frame Fahas the same origin as the body frame. It is defined by:
Figure 1. Body frame Fband aerodynamical frame Fa

Forces
Forces coefficients in the body frame Fbare define as:

CA is the so-called coefficient of the axial force. while CN is the coefficient of the normal force. The coefficients in the aerodynamic frame are denoted:

The Lift and drag coefficients are CL and CD respectively. The relationship between the coefficients en the aerodynamic and body frames is obtained using the angles alpha and beta:

The CLiC module can output CL (Lift coefficient), CD (Drag coefficient), Cy (Lateral force coefficient), CN (Normal force coefficient), CA (Axial force coefficient), CY (Side force coefficient) for a single component, group of components or the entire geometry.
NB: Forces coefficients require the definition of surface of reference, in general the surface area of the wing. This data is a mandatory input of the CLiC module which must be present in the control file.
Moments
Moment coefficients can be computed with respect to a point whose coordinates are provided in the control file. This computation can be again performed for a single component, group of components or the entire geometry. The moment is output as vectors in the aerodynamical and body frames. Similarly a moment with respect to a line (defined by the coordinates of two points provided in the control file) can be computed. In addition to a reference surface, a reference length must also be provided.

Data are passed to the CLiC module by two files. The first file <*.clic>must contain the annotated triangulation, and pressure distribution (Cp), as well as a component number for each triangle. This file can be written as fortran free formatted file or an unformatted file. A sample <*.clic> file can be found here.
The second file is a control file (.cntl) containing the different commands for the forces and moments computation, as well as some mandatory information such as reference area and length. The file names of the input triangulation files <*.clic> which contain the annotated triangulations defining the configuration are also listed in the control file. Naming of components or group of components can also be specified in this file.
Each command present in the control file starts by a keyword and is followed by some context dependent information. This file is read by a parsing routine created by Lex&Yacc and is therefore very flexible regarding syntax. Hence, comments can be introduced anywhere in the file, a comment is a chain of characters which starts by a # sign:
Example: # this is my first control file
The keywords all and entire have specific meaning:
$_Title: (optional)
This keyword should be followed by a list of characters corresponding to the title of the problem, which is used as a header in the output files.
Usage: $_Title This is an example for the use of clic
$_Directory (optional)
This keyword should be followed by a list of strings corresponding to the directories where the clic files can be found.
Usage: $_Directory dir1 dir2 dir3
$_Ouput_Directory (optional)
This keyword should be followed by a string that specifies the output directory where CLiC will save its
output filesUsage: $_Output_Directory dir
$_ClicFileName (optional)
This keyword should be followed by a list of strings corresponding to the clic files (.clic) to be read.
Usage: $_ClicFileName file1.clic file2.clic file3.clic
$_Model_X_axis_is (optional)
This keyword defines the Model X-axis with respect to the body Frame. It should be followed by one of the following: +Xb, -Xb, Xb, +Yb, -Yb, Yb, +Zb, -Zb, Zb.
Usage: $_Model_X_axis_is -Yb #the x-axis of the mesh corresponds to the
opposite y-axis of the body frameClick here for an example.
$_Model_Y_axis_is (optional)
Same as previous except that it applies to the Y-axis
Click here for an example.
$_Model_Z_axis_is (optional)
Same as previous except that it applies to the Z-axis
Click here for an example.
This keyword should be followed a real number specifying the angle of attack as defined here.
Usage: $_Incidence_Angle 10.0
This keyword should be followed real number specifying the sideslip angle as defined here.
Usage: $_Sideslip_Angle 3.0
This keyword attributes a name to a component number. It should be followed by a number (the component number) and a character chain (the name).
Usage: $_ComponentName 2 rudder
This keyword is used to create a group of components. It should be followed by a the name given to the group and a list of component numbers or names.
Usage: $_ComponentGroup wings 1 leftWing leftFlap 2
This keyword attributes a reference area for a component, group of components given by their name or number.
Usage: $_Reference_Area 1.11 wings fuselage 10 11
This keyword attributes a reference length for a component, group of components given by their name or number.
Usage: $_Reference_Length 1.11 wings fuselage 10 11 all
This keyword requests the computation of the force coefficients for a list of components of group of components.
Usage: $_Force fuselage wing flap entire
This keyword requests the computation of the moment with respect to a point. It should be followed by the coordinates of the point and a list of components of group of components.
Usage: $_Moment_Point 1.0 1.5 -0.3 fuselage wing flap
This keyword should requests the computation of the moment with respect to a line. It should be followed by the coordinates of the two points defining the line and a list of components of group of components.
Usage: $_Moment_Line 1.0 0.0 0.9 0.0 1.5 -0.3 fuselage wing flap
This keyword should requests the computation a Cp distribution obtained by cutting a component or a group of components with a plane defined by three points whose coordinates are given after the keyword.
Usage: $_Distribution 1.0 0.0 0.9 0.0 1.5 -0.3 0.0 0.0 1.0 fuselage wing flap

The CliC module is also provided with an Application Programming Interface. The user can link his C/C++ application to the library libclic.a and include the file clicapi.h which defines the prototypes of the API routines.
The following routines can be used:
tsClicErr cliApiInit(char *controlFile,int
nVerts,int nTris, double *vtxs,
int *tris,int *cmp,void ** ClicDb)
This routine initializes the clic database by
passing the name of the contol file and the triangulation with the list
of the vertices coordinates and triangles definition. To keep track of
the database, a void pointer to it is assigned.
tsClicErr clicApiCompute(float *valuesVerts,int
nScal, void *ClicDb)
This routine passes the scalar values at each
vertex of the triangulation and compute all the requested information.
tsClicErr clicApiGetForce(double *CD,double
*Cy,double *CL,
double *CA,double *CY,double *CN,
int CmptIndex,char* CmptName,void *ClicDb)
Returns the force coefficients for a component given either by its number or name.
tsClicErr clicApiGetPointMoment(a_tsClicDbPointMnt
* a_ClicDbPointMnts,
int *nClicDbPointMnts,
int CmptIndex,char* CmptName,void *ClicDb)
Returns all point moment calculations performed for a component given either by its number or name.
Returns all line moments calculations performed for a component given either by its number or name.
tsClicErr clicApiStreamObj(char **stream,tsClicObjType
clicObjType,
int CmptIndex,char* CmptName,void *ClicDb)
Output a formatted stream for a clic object present in the database. A clic object can be:
tsClicErr clicApiWriteObj(char *outputFileName,tsClicObjType
clicObjType,
int CmptIndex,char* CmptName,void *ClicDb)
Write a clic object present in the database in a file named outputFileName. A clic object can be:
tsClicErr clicApiMemRelease(void *ClicDb)
Destroy the clic database pointed by *ClicDb (CLICDEFAULT can be used) and free the memory.
tsClicErr clicApiStreamMemRelease(char **stream)
Free the memory associated with a stream allocated by the CLiC
module.
Each routine returns an error code which can be: