class model:
associated methods:
Methods
check(self) | checks if mandatory options are present |
listeOptions() |
checks if mandatory options are present
class models(mapping_container):
this class defines a container of models
methods:
overridden operators:
Methods
addModel | |
check | |
clear | |
copy | Generic (shallow and deep) copying operations. |
fromkeys | |
get | |
getKey | |
has_key | |
items | |
iteritems | |
iterkeys | |
itervalues | |
keys | |
listeElements | |
listeType | |
pop | |
popitem | |
setdefault | |
sortedKeys | |
update | |
values | |
viewitems | |
viewkeys | |
viewvalues |
addModel(self, * mo):
this function adds a model in the model container
parameters:
check(self):
this function checks all the models in the model container
parameters:
listeType(self):
this function returns the list of elements defined in the model container
parameters:
listeType(self):
this function returns the list of models defined in the model container
parameters:
class material class permettant de definir un materiau methodes associees: - __init__ - addProperties - addProperty
Methods
check() |
class materials: permet de stocker l’ensemble des materiaux
Methods
addMaterial(self,*mat) |
|
clear(() -> None. Remove all items from D.) | |
copy(() -> a shallow copy of D) | |
fromkeys(...) | v defaults to None. |
get((k[,d]) -> D[k] if k in D, ...) | |
getKey(value) | getKey(self, value): |
has_key((k) -> True if D has a key k, else False) | |
items(() -> list of D’s (key, value) pairs, ...) | |
iteritems(() -> an iterator over the (key, ...) | |
iterkeys(() -> an iterator over the keys of D) | |
itervalues(...) | |
keys(() -> list of D’s keys) | |
pop((k[,d]) -> v, ...) | If key is not found, d is returned if given, otherwise KeyError is raised |
popitem(() -> (k, v), ...) | 2-tuple; but raise KeyError if D is empty. |
setdefault((k[,d]) -> D.get(k,d), ...) | |
sortedKeys(self) | this function returns the sorted list of keys giving |
update(([E, ...) | If E present and has a .keys() method, does: for k in E: D[k] = E[k] |
values(() -> list of D’s values) | |
viewitems(...) | |
viewkeys(...) | |
viewvalues(...) |
Methods
addBulk | |
addBulks | |
addContactors | |
addGroupUsingPredicate | |
addNode | |
addNodes | |
checkModelAndMaterialDefinitions | |
computeRigidProperties | |
defineGroups | |
defineMaterial | |
defineModel | |
findNode | |
getNodebyGroup | |
hasGroup | |
imposeDrivenDof | |
imposeInitValue | |
mirror | |
relaxDrivenDof | |
rotate | |
translate((s,table [,deletions]) -> string) | Return a copy of the string s, where all characters occurring in the optional argument deletions are removed, and the remaining characters have been mapped through the given translation table, which must be a string of length 256. |
Usage : avatar.addBulk(Ele)
where Ele is a bulk
Usage : avatar.addBulks(Eles)
where Eles is a bulk iterator
define contactors for the elements of a group
parameters:
optional parameters:
adddGroupUsingPredicate(self, name, predicate, super_group=’all’):
this function builds and add a new group to the avatar, by selecting nodes verifying a given predicate. All nodes verifying the predicate are added to the new group. If all nodes supporting an element are in the new group, this element is also added to the new group.
parameters:
optional parameters:
Usage : avatar.addNode(noeud)
where noeud is a node object
Usage : avatar.addNodes(noeuds)
where noeuds is a node iterator
checkModelAndMaterialDefinitions(self):
this functions checks if all volumic (or surfacic, in 2D) elements of the given avatar are associated to a model and a material. If any of the elements of tha given avatar is not associated to a model or a material it stops the exectution of the script.
computeRigidProperties(self):
this function computes rigid properties of a rigid avatar : mass, inertia and mass center, from the contactors
parameters:
define groups linked to each elements ! beware the method is not robuste for too many mesh elements
associate a material or a material container to the element
match a model (class model) or a set of models (class model) to a group
findNode(self, n, atol=1.e-8):
this function return the index of the node which coordinates are coor, subject to the absolute tolerance atol, if it exists; None otherwise
parameters:
returned value:
getNodebyGroup(self,group): this functions return the node list by physical group to this avatar
hasGroup(self,group):
this functions return “True” iff the given group belongs to the given avatar
this function associate a boundary conditiojn to each node of the considered group of the considered avatar
parameters:
impose a value to a degree of freedom
mirror(slef, n, center, atol=1.e-8):
this function changes an avatar to its symmetrical through the given plane
parameters:
optional parameters:
relaxDrivenDof(self, group=’all’, component=1):
this function relax driven dof
this function rotates the considered avatar, according to the given rotation parameters and a rotation center. Supported rotation paramters are: Euler’s angles or an axis and an angle
parameters:
N.B. all angles are in radians
usage self.tranlsate(dx=0.,dy=0.,dz=0.)
where dx,dy, dz are components of translation vector
avatar container class
Methods:
Methods
addAvatar | |
append | |
count((s, sub[, start[,end]]) -> int) | Return the number of occurrences of substring sub in string s[start:end]. |
extend | |
getFemAvatar | |
getKey | |
getRigidAvatar | |
index((s, sub [,start [,end]]) -> int) | Like find but raises ValueError when the substring is not found. |
insert | |
keys | |
pop | |
remove | |
reverse | |
rotate | |
sort | |
sortedKeys | |
translate((s,table [,deletions]) -> string) | Return a copy of the string s, where all characters occurring in the optional argument deletions are removed, and the remaining characters have been mapped through the given translation table, which must be a string of length 256. |
addAvatar(self,avatar):
this function adds the input avatar to the container
parameters:
get the list of avatar of MAILx type
get the list of avatar of RBDY2 or RBDY3 type
this function rotates every avatar in the set, according to the given rotation parameters and a rotation center. Supported rotation paramters are: Euler’s angles or an axis and an angle
parameters:
usage self.tranlsate(dx=0., dy=0., dz=0.)
where dx, dy, dz are components of translation vector
Class defining the node entity
Methods
applyAffineMapToCoor(q, center) | applyAffineMapToCoor(self, q, center): |
checkType() | |
defineDof(mod) | |
getCoor(self) | returns coor |
get_anonymous_shape() | |
imposeDrivenDof(composantes[, type, ct, ...]) | |
imposeInitValue(composantes, values) | |
relaxDrivenDof(composantes) | |
translate(dx, dy, dz) |
applyAffineMapToCoor(self, q, center):
this function applies an affine map to the node coordinates.
parameters:
returns coor
node container
inherits from container class ‘iterator’ key is the number of the node
Methods
addNode(self,noeud) | add a node to the container and index it with its number |
clear(() -> None. Remove all items from D.) | |
copy(() -> a shallow copy of D) | |
fromkeys(...) | v defaults to None. |
get((k[,d]) -> D[k] if k in D, ...) | |
getKey(value) | getKey(self, value): |
has_key((k) -> True if D has a key k, else False) | |
items(() -> list of D’s (key, value) pairs, ...) | |
iteritems(() -> an iterator over the (key, ...) | |
iterkeys(() -> an iterator over the keys of D) | |
itervalues(...) | |
keys(() -> list of D’s keys) | |
pop((k[,d]) -> v, ...) | If key is not found, d is returned if given, otherwise KeyError is raised |
popitem(() -> (k, v), ...) | 2-tuple; but raise KeyError if D is empty. |
setdefault((k[,d]) -> D.get(k,d), ...) | |
sortedKeys(self) | this function returns the sorted list of keys giving |
update(([E, ...) | If E present and has a .keys() method, does: for k in E: D[k] = E[k] |
values(() -> list of D’s values) | |
viewitems(...) | |
viewkeys(...) | |
viewvalues(...) |
add a node to the container and index it with its number usage: nodes.addNode(node)
Methods
defineMaterial(mat) | ‘mat’ is either a string or a of the class ‘material’ |
defineModel(mod) | ‘mod’ is a model |
‘mat’ is either a string or a of the class ‘material’
‘mod’ is a model
bulk container
inherits from container class ‘sequence_container’ i.e. keys are automatically attributed
Methods
addBulk(self,new) | add a bulk to the container and index it with its number |
append | L.append(object) – append object to end |
count(...) | |
draw(Nodes, fen) | |
extend | L.extend(iterable) – extend list by appending elements from the iterable |
getKey(value) | getKey(self, value): |
index((value, [start, ...) | Raises ValueError if the value is not present. |
insert | L.insert(index, object) – insert object before index |
keys(self) | this function returns the list of keys (i.e. indices) giving |
pop(...) | Raises IndexError if list is empty or index is out of range. |
remove | L.remove(value) – remove first occurrence of value. |
reverse | L.reverse() – reverse IN PLACE |
sort | L.sort(cmp=None, key=None, reverse=False) – stable sort IN PLACE; |
sortedKeys(self) | this function returns the sorted list of keys giving |
add a bulk to the container and index it with its number
class contactor
attributs:
methods:
Methods
getOption(self,attribut) | |
get_anonymous_shape() | get_anonympous_shape(self, number): |
strInBodiesFile(number) | strInBodiesFile(self, number): |
writeOpt() |
get_anonympous_shape(self, number):
this function returns the contactor type (type), the contactor color (color), a list of integers (i4_vector) and a list of real numbers (r8_vector) describing the contactor.
parameters:
returned value: the tuple (type, color, i4_vector, r8_vector).
strInBodiesFile(self, number):
this function returns a string used to represent the contactor in the BODIES.DAT file.
parameters:
returned value: a string used to represent the contactor in the BODIES.DAT file.
contactor container
inherits from container class ‘sequence container’ i.e. keys are automatically attributed
Methods
addContactor(self,tact) | assign a number to a contactor and add it to the container |
append | L.append(object) – append object to end |
count(...) | |
extend | L.extend(iterable) – extend list by appending elements from the iterable |
getKey(value) | getKey(self, value): |
index((value, [start, ...) | Raises ValueError if the value is not present. |
insert | L.insert(index, object) – insert object before index |
keys(self) | this function returns the list of keys (i.e. indices) giving |
lastContactor(self) | returns last contactor number of the list |
pop(...) | Raises IndexError if list is empty or index is out of range. |
remove | L.remove(value) – remove first occurrence of value. |
reverse | L.reverse() – reverse IN PLACE |
sort | L.sort(cmp=None, key=None, reverse=False) – stable sort IN PLACE; |
sortedKeys(self) | this function returns the sorted list of keys giving |
assign a number to a contactor and add it to the container
returns last contactor number of the list
class behav definit un comportement d interaction defini dans ‘behavOptions’ methodes associees: -__init__ -addOption
classe behavs : conteneur de comportement methodes associees: -addBehav
Methods
addBehav | |
clear | |
copy | Generic (shallow and deep) copying operations. |
fromkeys | |
get | |
getKey | |
has_key | |
items | |
iteritems | |
iterkeys | |
itervalues | |
keys | |
pop | |
popitem | |
setdefault | |
sortedKeys | |
update | |
values | |
viewitems | |
viewkeys | |
viewvalues |
ajoute un comportement au conteneur
class see_table
this class defines objects to store the see tables used by the contact detection
methods:
classe see_tables derive de ‘sequence_container’ methodes definies: -addSeeTable
Methods
addSeeTable(self,st) | ou st est une table de visu |
append | L.append(object) – append object to end |
count(...) | |
extend | L.extend(iterable) – extend list by appending elements from the iterable |
getKey(value) | getKey(self, value): |
index((value, [start, ...) | Raises ValueError if the value is not present. |
insert | L.insert(index, object) – insert object before index |
keys(self) | this function returns the list of keys (i.e. indices) giving |
pop(...) | Raises IndexError if list is empty or index is out of range. |
remove | L.remove(value) – remove first occurrence of value. |
reverse | L.reverse() – reverse IN PLACE |
sort | L.sort(cmp=None, key=None, reverse=False) – stable sort IN PLACE; |
sortedKeys(self) | this function returns the sorted list of keys giving |
ou st est une table de visu
Generate a list of radii following a monodisperse distribution
Generate a list of radii bewteen r_min and r_max following a uniform distribution in number
Generate a list of radii between r_min and r_max following a uniform distribution in surface
Generate a granulometry composed of two radii, r_min and r_max. The distribution is binomial in number
Generate a granulometry composed of two radii, r_min and r_max. The distribution is binomial in surface
Read a granulometry from a file
[nb_remaining_particles, coor]=depositInBox2D(radii, lx, ly, deposited_radii=None, deposited_coor=None):
this function deposits circular particles in a box
parameters:
optional parameters:
returned values:
WARNING:
[nb_remaining_particles, coor]=depositInDisk2D(radii, r, deposited_radii=None, deposited_coor=None):
this function deposits circular particles in a circular container
parameters:
optional parameters:
returned values:
WARNING: this function changes the radii list since it nullifies radii of the particles out of the box. So, after calling this function, only the first nb_remaining_particles particles are of interest
[nb_remaining_particles, coor]=depositInCouetteD(radii, rint, rext, deposited_radii=None, deposited_coor=None):
this function deposits circular particles in container designed for a Couette shear
parameters:
optional parameters:
returned values:
WARNING:
[nb_remaining_particles, coor]=depositInDrum2D(radii, deposited_radii=None, deposited_coor=None):
this function deposits circular particles in the lower half part of a drum
parameters:
optional parameters:
returned values:
WARNING:
[nb_remaining_particles, coor]=depositInBox3D(radii, lx, ly, lz, deposited_radii=None, deposited_coor=None):
this function deposits spherical particles in a box
parameters:
N.B. a point (x, y, z) is in the box iff x is in [-lx/2, lx/2], y is in [-ly/2, ly/2] and z is in [0, lz]
optional parameters:
returned values:
WARNING: this function changes the radii list since it nullifies radii of the particles out of the box. So, after calling this function, only the first nb_remaining_particles particles are of interest
[nb_remaining_particles, coor]=depositInCylinder3D(radii, R, lz, deposited_radii=None, deposited_coor=None):
this function deposits spherical particles in a cylinder
parameters:
N.B. a point (x, y, z) is in the cylinder iff x^2 + y^2 is in [0, R^2] and z is in [0, lz]
optional parameters:
returned values:
WARNING: this function changes the radii list since it nullifies radii of the particles out of the box. So, after calling this function, only the first nb_remaining_particles particles are of interest
[nb_remaining_particles, coor]=depositInSphere3D(radii, R, center, deposited_radii=None, deposited_coor=None):
this function deposits spherical particles in a cylinder
parameters:
N.B. a point (x, y, z) is in the sphere iff (x - x_C)^2 + (y - y_C)^2 + (z - z_C)^2 is in [0, R^2]
optional parameters:
returned values:
WARNING: this function changes the radii list since it nullifies radii of the particles out of the box. So, after calling this function, only the first nb_remaining_particles particles are of interest
coor=squareLattice2D(nb_ele, nb_layer, l, x0=0., y0=0.):
this function compute a list of positions on a square lattice
parameters:
optional parameters:
return value:
N.B.: the total number of positions is nb_ele*nb_layer
WARNING:
coor=triangularLattice2D(nb_ele, nb_layer, l, x0=0., y0=0., orientation=’up’):
this function compute a list of positions on an equilateral triangular lattice
parameters:
optional parameters:
return value:
WARNING: the maximal radius of the particles to be deposited max_radius must verify: max_radius <= l/2
coor=cubicLattice3D(nb_ele_x, nb_ele_y, nb_layer, l, x0=0., y0=0., z0=0.):
this function compute a list of positions on a cubic lattice
parameters:
optional parameters:
return value:
N.B.: the total number of positions is nb_ele_x*nb_ele_y*nb_layer
WARNING:
usage:
body=rigidDisk(r, center, model, material, color=’BLEUx’, number=None, is_Hollow=False, is_Pneum=False)
this function builds a rigid disk and returns the generated body
parameters :
optional parameters :
usage:
body=rigidCluster(r, center, nb_disk, model, material, color=’BLEUx’, number=None)
this function builds a rigid cluster of disks and returns the generated body
parameters :
optional parameters :
body=rigidDiscreteDisk(r, center, model, material, color=’BLEUx’, number=None):
this function builds a rigid cluster of diskx contained in a disk and returns the generated body
parameters :
optional parameters :
usage:
body=rigidJonc(axe1, axe2, center, model, material, color=’BLEUx’, number=None)
this function builds an horizontal rigid jonc and returns the generated body
parameters :
optional parameters :
usage:
body=rigidPolygon(model, material, center, theta=0., color=’BLEUx’, generation_type, nb_vertices, vertices, radius, number=None)
This function builds a rigid polygon using 2 methods (see below).
Some parameters are common to the methods and mandatory:
Some parameters are common but optional:
One way (generation_type =’regular’) consists in generating a polygon with its nodes located on a circle:
parameters :
The other way (generation_type =’full’) consists in generating a polygon giving a list of vertices:
parameters :
usage :
body=rigidOvoidPolygon(ra, rb, nb_vertices, center, model, material, theta=0., color=’BLEUx’, number=None)
this function builds a rigid polygon and returns the generated body
parameters :
- ra : radius along x of the bounding disk
- rb : radius along y of the bounding disk
- nb_vertices : number of vertices of the polygon
- center : position of the center of inertia in the global frame
- model : rigid model for the particle
- material : the particle is made of this material
optional parameters :
- theta=0. : rotation angle in the inertial frame
- color=’BLEUx’ : color of the polygon contactor
- number=None : index of the body
usage:
body=deformableParticle2D(r, center, type_part, model, material, color=’BLEUx’, number=None)
this function builds a deformable particle and returns the generated body
N.B. elements on the skin of the particle belong to the group ‘skin’
parameters :
optional parameters :
usage:
body=rigidSphere(r, center, model, material, color=’BLEUx’, number=None)
this function builds a rigid sphere and returns the generated body
parameters :
optional parameters :
usage:
body=rigidPlan(axe1, axe2, axe3, center, model, material, color=’BLEUx’, number=None)
this function builds an horizontal rigid plan and returns the generated body
parameters :
optional parameters :
usage:
body=rigidCylinder(r, h, center, model, material, color=’BLEUx’, number=None, is_Hollow=False)
this function builds a rigid cylinder and returns the generated body
parameters :
optional parameters :
usage:
This function builds a rigid convex polyhedron using 4 methods (see below).
Some parameters are common to the methods and mandatory:
Some parameters are common but optional:
Generation methods:
First method (generation_type =’regular’) consists in generating vertices of the polyhedron regularly disposed on a sphere (of radius ‘radius’). For Platon’s polyhedra (number of vertices is 4, 6, 8, 12 or 20) the number of vertices used is exactly the one given in input, otherwise the number of vertices found by the generator may differ from the one in input (especially for low number of vertices).
parameters :
Second method (generation_type =’random’) consists in generating vertices of the polyhedron randomly disposed on a sphere (of radius ‘radius’). The number of vertices used is exactly the one given in input (contrary to the first method).
Third method (generation_type =’vertices’) generates the polyhedron defined by the convex hull of the vertices given in input. The ‘vertices’ array may be modified on output if the vertices set given was not convex.
Fourth method (generation_type =’full’|’bevel’) generates the polyhedron using the vertices and connectivity given in input. Using ‘bevel’ will cut corners.
body=roughWall(center, l, r, model, material, theta=0., color=’WALLx’, nb_vertex=0, number=None):
this function builds a 2D rough wall: it returns a body made of a cluster of disks or polygons
parameters:
optional parameters:
body=roughWall(center, l, r, model, material, theta=0., color=’WALLx’, nb_vertex=0, number=None):
this function builds a 2D not too rough wall: it returns a body made of a cluster of disks or polygons but with contactors overlapping each others to reduce the roughness
parameters:
optional parameters:
body=RoughWall(center, l, h, nb_polyg, model, material, theta=0., color=’WALLx’, number=None):
this function builds a 2D smooth wall: it returns a body made of a cluster of rectangular polygons
parameters :
optional parameters:
body=granuloRoughWall(center, l, rmin, rmax, model, material, theta=0., color=’WALLx’, nb_vertex=0):
this function builds a 2D rough wall: it returns a body made of a cluster of disks or polygons. The radii of the particles defining the cluster are randomly distrubuted in the interval [rmin, rmax]
parameters:
optional parameters:
body=roughWall3D(center, l, r, model, material, color=’WALLx’):
this function builds a 3D rough wall: it returns a body made of a cluster of spheres
parameters:
optional parameters:
body=granuloRoughWall3D(center, l, rmin, rmax, model, material, color=’WALLx’):
this function builds a 3D rough wall using the same granulometry than the sample: it returns a body made of a cluster of spheres of different radius
parameters:
optional parameters:
class designed to build rigid or deformable bricks in 2D
Methods:
Methods
deformableBrick(center, material, model[, ...]) | deformableBrick(self, center, material, model, number, type=‘4T3’, |
explodedDeformableBrick(center, material, model) | explodedDeformableBrick(self, center, material, model, type=‘4T3’, |
rigidBrick(center, model, material[, color, ...]) | rigidBrick(self, center, model, material, color=’BLEUx’, number=None): |
deformableBrick(self, center, material, model, number, type=‘4T3’, nb_elem_x=1, nb_elem_y=1, apabh=[], apabv=[], apabhc=0.25, apabvc=0.25, colors=[‘HORIx’, ‘VERTx’, ‘HORIx’, ‘VERTx’]):
this function builds and returns a deformable brick
parameters:
optional parameters :
explodedDeformableBrick(self, center, material, model, type=‘4T3’, nb_elem_x=1, nb_elem_y=1, apabh=[], apabv=[], apabhc=0.25, apabvc=0.25, colors=[‘HORIx’, ‘VERTx’, ‘HORIx’, ‘VERTx’], color=’BLEUx’, shift=0):
this function builds and returns a deformable brick
parameters:
optional parameters :
rigidBrick(self, center, model, material, color=’BLEUx’, number=None):
this function build and returns a rigid brick
parameters:
optional parameter :
class designed to build rigid bricks in 3D Methods:
Methods
rigidBrick(center, model, material[, color]) | rigidBrick(self, center, model, material, color=’BLEUx’): |
rigidBrick(self, center, model, material, color=’BLEUx’): this function build and returns a rigid brick
parameters:
optional parameter :
class paneresse_simple:
this class defines an objet representing a brick wall, using the so called “apareil en paneresses, simple”
Methods
buildRigidWall(origin, model, material[, ...]) | buildRigidWall(self, origin, model, material, color, rtol=1e-5): |
buildRigidWallWithoutHalfBricks(origin, ...) | buildRigidWallWithoutHalfBricks(self, origin, model, material, color, rtol=1e-5): |
computeHeight() | computeHeight(self): |
computeJointThickness() | computeJointThickness(self): |
computeNbRows([trend, rtol]) | commputeNbRows(self, trend=”max”, rtol=1e-5): |
evaluateHeight(nb_rows, joint_thickness) | evaluateHeight(self, nb_rows, joint_thickness): |
getLength() | getLength(self): |
getThickness() | getThickness(self): |
limitNbRows(height, joint_thickness) | limitNbRows(self, height, joint_thickness): |
setFirstRowByLength(first_brick_type, ...) | setFirstRowByLength(self, first_brick_type, length, joint_thickness): |
setFirstRowByNumberOfBricks(...) | setFirstRowByNumberOfBricks(self, first_brick_type, nb_bricks, joint_thickness): |
setHeight(height) | setHeight(self, length): |
setJointThicknessBetweenRows(joint_thickness) | setJointThicknessBetweenRows(self, joint_thickness): |
setNumberOfRows(nb_rows[, rtol]) | setNumberOfRows(self, nb_rows, rtol=1e-5): |
buildRigidWall(self, origin, model, material, color, rtol=1e-5):
this function builds the wall, as it generates a list of rigid avatars representing bricks of the wall
parameters:
optional parameters:
buildRigidWallWithoutHalfBricks(self, origin, model, material, color, rtol=1e-5):
this function builds the wall, as it generates a list of rigid avatars representing bricks of the wall ; the built wall is “harpage” ready, since half bricks have been removed
parameters:
optional parameters:
class paneresse_double:
this class defines an objet representing a brick wall, using the so called “apareil en paneresses, double”
Methods
buildRigidWall(origin, model, material[, ...]) | buildRigidWall(self, origin, model, material, colors, rtol=1e-5): |
computeHeight() | computeHeight(self): |
computeJointThickness() | computeJointThickness(self): |
computeNbRows([trend, rtol]) | commputeNbRows(self, trend=”max”, rtol=1e-5): |
evaluateHeight(nb_rows, joint_thickness) | evaluateHeight(self, nb_rows, joint_thickness): |
getLength() | getLength(self): |
getThickness() | getThickness(self): |
limitNbRows(height, joint_thickness) | limitNbRows(self, height, joint_thickness): |
setFirstRowByLength(first_brick_type, ...) | setFirstRowByLength(self, first_brick_type, length, joint_thickness): |
setFirstRowByNumberOfBricks(...) | setFirstRowByNumberOfBricks(self, first_brick_type, nb_bricks, joint_thickness): |
setHeight(height) | setHeight(self, length): |
setJointThicknessBetweenRows(joint_thickness) | setJointThicknessBetweenRows(self, joint_thickness): |
setNumberOfRows(nb_rows[, rtol]) | setNumberOfRows(self, nb_rows, rtol=1e-5): |
buildRigidWall(self, origin, model, material, colors, rtol=1e-5):
this function builds the wall, as it generates a list of rigid avatars representing bricks of the wall
parameters:
optional parameters:
lecture(name, dim):
this function builds sets of nodes and elements by reading a file wherein a mesh is stored
parameters:
optional parameters:
returned value:
buildMesh2D=buildMesh2D(type_mesh, x0, y0, lx, ly, nb_elem_x, nb_elem_y, vertices=[], number=None):
this function meshes a given rectangle, and returns the generated mesh
WARNING: this function automaticaly defines four groups of surfacic elements: ‘left’, ‘down’, ‘right’, ‘up’
parameters:
optional parameters:
buildMeshH8(x0, y0, z0, lx, ly, lz, nb_elem_x, nb_elem_y, nb_elem_z):
this function meshes a given box, and returns the generated mesh
WARNING: this function automaticaly defines four groups of surfacic elements: ‘left’ (y=y0), ‘down’ (z=z0), ‘right’ (y=y0 + lx), ‘up’ (z=z0 + lz), ‘front’ (x=x0 + lx), ‘rear’ (x=x0)
parameters:
optional parameters:
class mesh:
this class defines a mesh object, as a couple of a nodes set and a bulk set.
Methods
addBulk(ele) | addBulk(ele): |
addNode(noeud) | addNode(noeud): |
computeNormal(n, e, reverse) | Compute normal of a node of an element |
extrudePhysicalEntity(pE, length[, reverse]) | Extrude an external layer of mesh. |
getSubMeshes([entity_type]) | getSubMeshes(self, entity_type=”geometricalEntity”): |
rankRenumbering() | rankRenumbering(self): |
removeFreeNodes(self) | removes nodes not attached to an element |
separateMeshes(dim[, entity_type, ...]) | separateMeshes(self, dim, entity_type=”geometricalEntity”): |
addBulk(ele):
this function add an element to the mesh
parameters:
addNode(noeud):
this function add a node to the mesh
parameters:
Compute normal of a node of an element
Extrude an external layer of mesh.
This functions use the nodes of a physical entity to create the node extrusion and the corresponding element in the mesh. Linear elements only !!! Physical entities are created with prefix ‘E’ for the extruded elements and ‘P’ for the projected nodes.
To work, the rankRenumbering function must have been called beforehand, and the elements correctly oriented. At this time only ‘S2xxx’ and ‘T3xxx’ element are supported.
parameters: - pE : physical entity name to extrude from - length : size of extrusion along the computed normals
getSubMeshes(self, entity_type=”geometricalEntity”):
this function computes handles to sub-meshes of the given mesh and returns the computed meshes. Elements of a mesh share a same physical or geometrical entity. N.B.: nodes and elements of the generated meshes are references of nodes and elements of the original mesh and not deep copies!
parameters:
optional parameters:
returned values: a dictionnary mapping enities value on separated meshes.
rankRenumbering(self):
this function renumbers the nodes of the mesh, in order to avoid holes in the numbering, i.e. nodes number are in [1, nbNodes]
parameters:
removes nodes not attached to an element
separateMeshes(self, dim, entity_type=”geometricalEntity”):
this function separates several meshes, stored in a single one (read from a mesh), and returns the extracted meshes, as meshes. Elements of a mesh share a same physical or geometrical entity.
parameters:
optional parameters:
returned values: a dictionnary mapping enities value on separated meshes.
extractFreeSurface(volumic_mesh):
this function computes and returns the free surface of a volumic mesh, as a surfacic mesh.
N.B.: this function handles tetrahedra and prism
parameters:
returned value: the built surfacic mesh
reorientSurfacicElements(volumic_mesh):
this function reorient surfacic elements of a 3D mesh, using orientation of volumic elements
N.B.: this function only handle tetrahedra
parameters:
buildMeshedAvatar(mesh, model, material):
this function builds a meshed avatar from the mesh.
parameters:
rigidFromMesh2D(surfacic_mesh, model, material, color=’BLEUx’, reverse=False):
this function build a rigid from a 2D mesh, each contactor is a polygon made from an element of the given mesh
parameters:
optional parameter:
rigidsFromMesh2D(surfacic_mesh, model, material, color=’BLEUx’, reverse=False, shrink=0.):
this function build a set of rigids from a 2D mesh, each rigid is a polygon made from an element of the given mesh
parameters:
optional parameter:
bodies=explodeMeshedAvatar2D(body, nbPoints=2, color=’BLEUx’):
this function “explodes” a given 2D meshed avatar, i.e. gets a meshed avatar and returns a list of bodies, where each body is a cell of the given meshed avatar. Each new body have a list of contactor inherited from the connectivity of the given meshed avatar.
parameters:
optional parameters:
volumicMeshToRigid3D(volumic_mesh, model, material, color=’BLEUx’):
this function builds a rigid body from a volumic mesh, by extracting the skin mesh and compute mass and inertia from volumic elements.
N.B.: this function only handle tetrahedra
parameters:
optional parameters:
returned value: the built rigid body
surfacicMeshToRigid3D(surfacic_mesh, model, material, color=’BLEUx’):
this function builds a rigid body from a surfacic mesh, by computing mass and inertia from surfacic elements (amazing, isn’t it ^^).
N.B.: this function only handle triangles
parameters:
optional parameters:
returned value: the built rigid body
surfacicMeshesToRigid3D(surfacic_meshes, model, material, color=’BLEUx’):
this function builds a rigid body from a list of surfacic mesh, by computing mass and inertia from surfacic elements
N.B.: this function only handle triangles
parameters:
optional parameters:
returned value: the built rigid body
visuAvatars(cont):
Create a visualization window of a container of avatars using vtk.
parameter:
writeEvolution(f, instants, path=’‘, name=’evolution.dat’): this function writes an evolution file used to apply specific boundary conditions. parameters:
f: a function of time
- instants: for each instant t in the list, the function
f is evaluated and the couple (t, f(t)) is write in the file
file
name=’evolution.dat’: name of the evolution file
extrudeRigid(body2D, model3D, depth, factor=1.e0, number=None):
this function builds a 3D rigid body by extruding a given 2D rigid avatar and returns the generated body. The extruded body is made of the same material as the given one. The colors of each contactor of the body is the same as those of the coresponding contactor of the given body.
Warning: extrusion follow axis Oz, except for the JONCx, which are placed in xOz plane
parameters:
optional paramters:
extrudeRigids(bodies2D, model3D, depth, factor=1.e0, number=None):
this function extrudes each avatar in a given avatar container and returns the generated list of 3D avatars in a new avatar container.
Warning: extrusion follow axis Oz, except for the JONCx, which are placed in xOz plane
parameters:
optional paramters: