IGA modeling

class yeti_iga.IgaModel(model_type)
__init__(model_type)
Parameters:

model_type (string) – Model type : ‘2D solid’, ‘3D solid’ or ‘3D shell’

__weakref__

list of weak references to the object

add_boundary_condition(ipatch, bc)

Add a boundary condition to the model

Parameters:
  • ipatch (int) – Patch index on which boundary condition is applied

  • bc (BoundaryCondition) – Boundary condition to add

add_distributed_load(ipatch, dload)

Add a distributed load

Parameters:
  • ipatch (int) – Patch index on which distributed load is applied

  • dload (DistributedLoad) – Distributed load to add

add_patch(patch)

Add a patch to model

Parameters:

patch (Patch) – patch to add

Returns:

index – index of added patch

Return type:

int

build_stiffness_matrix()

Build stiffness matrix and right hand member

Returns:

  • stiff (scipy.sparse.csc_matrix) – Assembled stifness matrix

  • rhs (numpy.array) – Rught hans side vector

property cp_coordinates

Returns all control points coordinates of the model

Returns:

cp_coordinates – Coordinates of control points

Return type:

numpy.array(shape=(., 3), dtype=float)

property cp_indices

Returns an array containing all control points indices of the model

Returns:

cp_indices – All control points indices

Return type:

numpy.array(dtype=int)

get_corners_cp_indices(ipatch=0)

Return global indices of control points corresponding to a given patch corners

Parameters:

ipatch (int (default = 0)) – index of patch

Returns:

indices – indices of corners control points

Return type:

numpy.array

get_face_cp_indices(id_face, ipatch=0)

Return global indices of control points corresponding to a face of a given patch

Parameters:
  • id_face (int) – identifier of face : 1, 2, 3, 4, 5 or 6

  • ipatch (int (default = 0)) – index of patch

Returns:

indices – indices of face control points

Return type:

numpy.array(dtype=int)

property idof_free

Return indices of free degrees of freedom

property nb_patch

Return the number of patchs of the model

refine_patch(ipatch, nb_degree_elevation=array([0., 0., 0.]), nb_subdivision=array([0., 0., 0.]), additional_knots=None)
Refine a patch of the model with k-refinement:

1 - degree elevation 2 - knot insertion 3 - subdivision

Parameters:
  • ipatch (int) – Index of patch to refine

  • nb_degree_elevation (numpy.array(shape=(3,), dtype=numpy.intp)) – Number of degree elevation for each parametric direction default = numpy.zeros(3)

  • nb_subdivision (numpy.array(shape=(3,), dtype=numpy.intp)) – Number of knot vector subdivision for each parametric direction default = numpy.zeros(3)

  • additional_knots (list of np.array(dtype=float)) – knots to insert for each parametric direction default = None

write_control_mesh_vtk(filename, ipatch=0)

Write control mesh of the model in a VTU file A separate file is generated for each patch

Parameters:
  • filename (string) – File name

  • ipatch (int) – Index of patch to write, default=0

write_solution_vtu(x, filename, per_patch=False, refinement=array([3, 3, 3]), data_flag=array([True, False, False]))

Write the solution of an IGA analysis to a VTU file TODO: make BSpline output when possible

Parameters:
  • x (numpy.array(dtype=float)) – Array containing the result of an IGA analysis

  • filename (string) – File name

  • per_patch (bool (default=False)) – If set to true, a separate file is generated for each patch. Non-embedded patchs are generated using Bezier extraction feature of VTK format. Produced files will have a _pxxx suffix.

  • refinement (numpy.array(shape=(3,), dtype=int) (default=[3, 3, 3])) – Refinement applied when files are egenerated using a classical FE data structure

  • data_flag (numpy.array(shape=(3,), dtype=bool)) – (default=[True, False, False]) Boolean array indicating generated fields : [0] : displacement, [1] : stress, [2] : strain

class yeti_iga.Patch(element_type, degrees, knot_vectors, control_points, weights, connectivity, spans, material, properties=array([], dtype=float64))

Object handling a patch

__init__(element_type, degrees, knot_vectors, control_points, weights, connectivity, spans, material, properties=array([], dtype=float64))
Parameters:
  • element_type (string) – type of element

  • degrees (numpy.array) – degree in each direction of parametric space

  • knot_vectors (list of numpy.array) – knot vectors for each direction of parametric space

  • control_points (numpy.array) – control points coordinates : control_points[.,.]

  • weights (numpy.array) – control points weights

  • connectivity (numpy.array) – connectivity matrix, indexing starts at 0, numbering is local to patch

  • spans (numpy.array) – spans values for each element, numbering starts at 0

  • material (Material) – material properties

  • properties (numpy.array(dtype=float)) – extra patch properties (thickness, hull index, …)

__weakref__

list of weak references to the object

class yeti_iga.Material(density=0.0)

Object handling a material

__init__(density=0.0)
__weakref__

list of weak references to the object

class yeti_iga.ElasticMaterial(young_modulus, poisson_ratio, density=0.0)

Object handling an elastic material

__init__(young_modulus, poisson_ratio, density=0.0)
class yeti_iga.BoundaryCondition(cp_index, dof, value)

Object handling boundary contion for an IGA model A BC applies on a set of control points and set prescribed value on degrees of freedom

__init__(cp_index, dof, value)
Parameters:
  • cp_index (numpy.array([], dtype=int)) – local indices of control points on which boundary condition is applied

  • dof (numpy.array([], dtype=int)) – indices of degrees of freedom on which the boundary condition is applied

  • value (float) – prescribed value of degree of freedom

__weakref__

list of weak references to the object

class yeti_iga.DistributedLoad(el_index, dl_type, magnitude)

Object handling distributed load on an IGA model A distributed load applies on a set of elements, has a type and a magnitude

__init__(el_index, dl_type, magnitude)
Parameters:
  • el_index (np.array([], dtype=int)) – local indices of elements on which distributed load is applied

  • dl_type (int) – Type of applied dload (U10, U11, etc.)

  • magnitude (float) – Magnitude of applied distributed load

__weakref__

list of weak references to the object