# siconos.fclib¶

Module documentation

class siconos.fclib.fclib_info[source]

Bases: object

This structure allows the user to enter a problem information as a title, a short description and known mathematical properties of the problem

property title

title of the problem

property description

short decription of the problem

property math_info

known properties of the problem (existence, uniqueness, …)

class siconos.fclib.fclib_matrix_info[source]

Bases: object

This structure allows the user to enter a description for a given matrix (comment, conditionning, determinant, rank.) if they are known.

property comment

comment on the matrix properties

property conditioning
property determinant
property rank
class siconos.fclib.fclib_matrix[source]

Bases: object

matrix in compressed row/column or triplet form

property nzmax

maximum number of entries

property m

number of rows

property n

number of columns

property p

row indices (size nz)

Type

compressed

Type

row (size m+1) or column (size n+1) pointers; triplet

property i

column indices (size nz)

Type

compressed

Type

column or row indices, size nzmax; triplet

property x

numerical values, size nzmax

property nz

# of entries in triplet matrix, -1 for compressed columns, -2 for compressed rows

property info

info for this matrix

class siconos.fclib.fclib_global[source]

Bases: object

The global frictional contact problem defined by

Given

• a symmetric positive definite matrix $${M} \in {\mathrm{I\!R}}^{n \times n}$$

• a vector $${f} \in {\mathrm{I\!R}}^n$$,

• a matrix $${H} \in {\mathrm{I\!R}}^{n \times m}$$

• a matrix $${G} \in {\mathrm{I\!R}}^{n \times p}$$

• a vector $$w \in {\mathrm{I\!R}}^{m}$$,

• a vector $$b \in {\mathrm{I\!R}}^{p}$$,

• a vector of coefficients of friction $$\mu \in {\mathrm{I\!R}}^{n_c}$$

the Global Mixed 3DFC problem is to find four vectors $${v} \in {\mathrm{I\!R}}^n$$, $$u\in{\mathrm{I\!R}}^m$$, $$r\in {\mathrm{I\!R}}^m$$ and $$\lambda \in {\mathrm{I\!R}}^p$$ denoted by $$\mathrm{GM3DFC}(M,H,G,w,b,\mu)$$ such that

$\begin{split}\begin{cases} M v = {H} {r} + G\lambda + {f} \\ \\ G^T v +b =0 \\ \ \hat u = H^T v + w +\left[ \left[\begin{array}{c} \mu \|u^\alpha_T\| \\ 0 \\ 0 \end{array}\right]^T, \alpha = 1 \ldots n_c \right]^T \\ \\ C^\star_{\mu} \ni {\hat u} \perp r \in C_{\mu} \end{cases}\end{split}$

where the Coulomb friction cone for a contact $$\alpha$$ is defined by

$C_{\mu^\alpha}^{\alpha} = \{r^\alpha, \|r^\alpha_T \| \leq \mu^\alpha |r^\alpha_N| \}$

and the set $$C^{\alpha,\star}_{\mu^\alpha}$$ is its dual.

property M

the matrix M (see mathematical description below)

property H

the matrix M (see mathematical description below)

property G

the matrix M (see mathematical description below)

property mu

the vector $$\mu$$ of coefficient of friction (see mathematical description below)

property f

the vector f (see mathematical description below)

property b

the vector b (see mathematical description below)

property w

the vector w (see mathematical description below)

property spacedim

the dimension , 2 or 3, of the local space at contact (2d or 3d friction contact laws)

property info

info on the problem

class siconos.fclib.fclib_global_rolling[source]

Bases: object

The global rolling frictional contact problem defined by

Given

• a symmetric positive definite matrix $${M} \in {\mathrm{I\!R}}^{n \times n}$$-

• a vector $${f} \in {\mathrm{I\!R}}^n$$ ,

• a matrix $${H} \in {\mathrm{I\!R}}^{n \times m}$$

• a matrix $${G} \in {\mathrm{I\!R}}^{n \times p}$$

• a vector $$w \in {\mathrm{I\!R}}^{m}$$ ,

• a vector $$b \in {\mathrm{I\!R}}^{p}$$ ,

• a vector of coefficients of friction $$\mu \in {\mathrm{I\!R}}^{n_c}$$

• a vector of coefficients of rolling friction $$\mu_r \in {\mathrm{I\!R}}^{n_c}$$

the Global Mixed 3DFC problem is to find four vectors $${v} \in {\mathrm{I\!R}}^n$$, $$u\in{\mathrm{I\!R}}^m$$ , $$r\in {\mathrm{I\!R}}^m$$ and $$\lambda \in {\mathrm{I\!R}}^p$$ denoted by $$\mathrm{GM3DFC}(M,H,G,w,b,\mu)$$ such that

$\begin{split}\begin{cases} M v = {H} {r} + G\lambda + {f} \\ \\ G^T v +b =0 \\ \\ \hat u = H^T v + w +\left[ \left[\begin{array}{c} \mu \|u^\alpha_T\|\\ 0 \\ 0 \end{array}\right]^T, \alpha = 1 \ldots n_c \right]^T \\ \\ C^\star_{\mu,\mu_r} \ni {\hat u} \perp r \in C_{\mu,\mu_r} \end{cases}\end{split}$

where the Coulomb friction cone for a contact $$\alpha$$ is defined by

$C_{\mu^\alpha}^{\alpha} = \{r^\alpha, \|r^\alpha_T \| \leq \mu^\alpha |r^\alpha_N| \}$

and the set $$C^{\alpha,\star}_{\mu^\alpha}$$ is its dual.

property M

the matrix M (see mathematical description below)

property H

the matrix M (see mathematical description below)

property G

the matrix M (see mathematical description below)

property mu

the vector $$\mu$$ of coefficient of friction (see mathematical description below)

property mu_r

the vector $$\mu$$ of rolling coefficient of friction (see mathematical description below)

property f

the vector f (see mathematical description below)

property b

the vector b (see mathematical description below)

property w

the vector w (see mathematical description below)

property spacedim

the dimension , 2 or 3, of the local space at contact (2d or 3d friction contact laws)

property info

info on the problem

class siconos.fclib.fclib_local[source]

Bases: object

The local frictional contact problem defined by given

• a positive semi–definite matrix $${W} \in {\mathrm{I\!R}}^{m \times m}$$

• a matrix $${V} \in {\mathrm{I\!R}}^{m \times p}$$

• a matrix $${R} \in {\mathrm{I\!R}}^{p \times p}$$

• a vector $$q \in {\mathrm{I\!R}}^{m}$$ ,

• a vector $$s \in {\mathrm{I\!R}}^{p}$$ ,

• a vector of coefficients of friction $$\mu \in {\mathrm{I\!R}}^{n_c}$$

the Mixed 3DFC problem is to find three vectors $$u\in{\mathrm{I\!R}}^m$$ , $$r\in {\mathrm{I\!R}}^m$$ and $$\lambda \in {\mathrm{I\!R}}^p$$ denoted by $$\mathrm{M3DFC}(R,V,W,q,s,\mu)$$ such that

$\begin{split}\begin{cases} V^T {r} + R \lambda + s = 0 \\ \\ \hat u = W {r} + V\lambda + q +\left[ \left[\begin{array}{c} \mu^\alpha \|u^\alpha_T\|\\ 0 \\ 0 \end{array}\right]^T, \alpha = 1 \ldots n_c \right]^T \\ \\ C^\star_{\mu} \ni {\hat u} \perp r \in C_{\mu} \end{cases}\end{split}$

where the Coulomb friction cone for a contact $$\alpha$$ is defined by

$C_{\mu^\alpha}^{\alpha} = \{r^\alpha, \|r^\alpha_T \| \leq \mu^\alpha |r^\alpha_N| \}$

and the set $$C^{\alpha,\star}_{\mu^\alpha}$$ is its dual.

property W

the matrix W (see mathematical description below)

property V

the matrix V (see mathematical description below)

property R

the matrix R (see mathematical description below)

property mu

the vector $$\mu$$ of coefficient of friction (see mathematical description below)

property q

the vector q (see mathematical description below)

property s

the vector s (see mathematical description below)

property spacedim

the dimension , 2 or 3, of the local space at contact (2d or 3d friction contact laws)

property info

info on the problem

class siconos.fclib.fclib_solution[source]

Bases: object

A solution or a guess for the frictional contact problem.

This structure allows to store a solution vector of a guess vector for the various frictional contact problems.

property v

global velocity (or position/displacement for quasi-static problems) solution vector

property u

local velocity (or position/displacement for quasi-static problems) solution vector

property r

local contact forces (or impulses) solution vector

property l

multiplier for equlity constraints ( $$\lambda$$ ) solution vector

siconos.fclib.fclib_write_global(problem, path)[source]

write global problem

Return type

int

Returns

1 on success, 0 on failure

siconos.fclib.fclib_write_local(problem, path)[source]

write local problem

Return type

int

Returns

1 on success, 0 on failure

siconos.fclib.fclib_write_global_rolling(problem, path)[source]

write global rolling problem

Return type

int

Returns

1 on success, 0 on failure

siconos.fclib.fclib_write_solution(solution, path)[source]

write solution

Return type

int

Returns

1 on success, 0 on failure

siconos.fclib.fclib_write_guesses(number_of_guesses, guesses, path)[source]

write initial guesses

Return type

int

Returns

1 on success, 0 on failure

Return type

fclib_global

Returns

problem on success; NULL on failure

Return type

fclib_local

Returns

problem on success; NULL on failure

Return type

fclib_global_rolling

Returns

problem on success; NULL on failure

Return type

fclib_solution

Returns

solution on success; NULL on failure

Return type

fclib_solution

Returns

vector of guesses on success; NULL on failure output number of guesses in the variable pointed by ‘number_of_guesses’

siconos.fclib.fclib_delete_global(problem)[source]

delete global problem

siconos.fclib.fclib_delete_local(problem)[source]

delete local problem

siconos.fclib.fclib_delete_global_rolling(problem)[source]

delete global rolling problem

siconos.fclib.fclib_delete_solutions(data, count)[source]

delete solutions or guesses

siconos.fclib.fclib_create_int_attributes_in_info(path, attr_name, attr_value)[source]

create and set attributes of tyoe int in info