fedoo.constraint.PeriodicBC

class PeriodicBC(node_cd, var_cd, dim=None, tol=1e-08, meshperio=True, name='Periodicity')

Class defining periodic boundary conditions

__init__(node_cd, var_cd, dim=None, tol=1e-08, meshperio=True, name='Periodicity')

Create a perdiodic boundary condition object using several multi-points constraints. Some constraint driver (cd) dof are used to define mean strain or mean displacement gradient. The dof associated to a contraint driver is difined by the node indice (defined in node_cd) and the associated variable (defined in var_vd).

The constraint drivers can be defined in several way
  • [Eps_XX] or [[Eps_XX]] -> strain dof for 1D periodicity

  • [Eps_XX, Eps_YY, 2*Eps_XY] -> strain dof for 2D periodicity using Voigt notation for shear components

  • [Eps_XX, Eps_YY, Eps_ZZ, 2*Eps_XY, 2*Eps_XZ, 2*Eps_YZ] -> strain dof for 3D periodicity using Voigt notation for shear components

  • [[DU_XX, DU_XY], [DU_YX, DU_YY]] -> gradient of displacement for 2D periodicity

  • [[DU_XX, DU_XY, DU_XZ], [DU_YX, DU_YY, DU_YZ], [DU_ZX, DU_ZY, DU_ZZ]]

-> gradient of displacement for 3D periodicity

Parameters:
  • crd (The list of nodes in terms of coordinates of the mesh)

  • node_cd (list of nodes (small strain), or list of list of nodes (finite strain).) – Nodes used as constraint drivers for each strain component. The dof used as contraint drivers are defined in var_cd.

  • var_cd (list of str (small strain), or list of list of str (finite strain).) – Variables used as constraint drivers. The len of lists should be the same as node_cd.

  • dim (int in [1,2,3] (default = assess from the constraint drivers dimension)) – Number of dimensions with periodic condition. If dim = 1: the periodicity is assumed along the x coordinate If dim = 2: the periodicity is assumed along x and y coordinates

  • tol (float, optional) – Tolerance for the periodic nodes detection. The default is 1e-8.

  • name (str, optional) – Name of the created boundary condition. The default is “Periodicity”.

Remarks

  • The boundary condition object needs to be used with a problem associated to

either a a periodic mesh, either * The periodic nodes are automatically detected using the given tolerance (tol). * The nodes of the Xp (x=xmax), Yp (y=ymax) and Zp (z=zmax) faces are eliminated from the system (slave nodes) and can’t be used in another mpc.

Example

import fedoo as fd

mesh = fd.mesh.box_mesh()

#add nodes not associated to any element for constraint driver
node_cd = fd.Mesh["Domain2"].add_nodes(crd_center, 3)

list_strain_nodes = [StrainNodes[0], StrainNodes[0], StrainNodes[0],
                        StrainNodes[1], StrainNodes[1], StrainNodes[1]]
list_strain_var = ['DispX', 'DispY', 'DispZ','DispX', 'DispY', 'DispZ']

# or using the displacement gradient formulation (in this case the shear strain are true strain component):
# list_strain_nodes = [[StrainNodes[0], StrainNodes[1], StrainNodes[1]],
#                      [StrainNodes[1], StrainNodes[0], StrainNodes[1]],
#                      [StrainNodes[1], StrainNodes[1], StrainNodes[0]]]
# list_strain_var = [['DispX', 'DispX', 'DispY'],
#                    ['DispX', 'DispY', 'DispZ'],
#                    ['DispY', 'DispZ', 'DispZ']]

bc_periodic = fd.homogen.PeriodicBC(list_strain_nodes, list_strain_var)

Methods

PeriodicBC.generate(problem[, t_fact, ...])

PeriodicBC.get_all()

PeriodicBC.initialize(problem[, ...])

PeriodicBC.str_condensed()

Return a condensed one line str describing the object

PeriodicBC.name