fedoo.constraint.PeriodicBC
- class PeriodicBC(periodicity_type: str = 'small_strain', off_axis_rotation: Rotation | None = None, dim: int | None = None, meshperio: bool = True, tol: float = 1e-08, name: str = 'Periodicity')
Periodic boundary conditions constraint.
Perdiodic boundary condition object using several multi-points constraints. Some global dofs are added to define mean strain or mean displacement gradient. These dof are defined. The added global dof are:
For “small_strain” the linearized strain tensor components are introduced. The following global variables are therefore accessible: ‘E_xx’, ‘E_yy’, ‘E_zz’, ‘E_xy’, ‘E_xz’, ‘E_yz’ in 3d (only the in-plane component in 2d) The whole component can also be extracted using the vector name ‘MeanStrain.’
For “finite_strain”, the displacement gradient is utilized: ‘DU_xx’, ‘DU_xy’, ‘DU_xz’, ‘DU_yx’, ‘DU_yy’, ‘DU_yz’, ‘DU_zx’, ‘DU_zy’, ‘DU_zz’ ie 9 components in 3D and only 4 in-plane component in 2D. The whole component can also be extracted using the vector name ‘MeanGradDisp’.
If off_axis_rotation is used, the local dof are also added for small and finite strain respectiveley: ‘E_ij’ or ‘DU_ij’ with i and j taking values in {1,2,3} and the vectors ‘LocalMeanStrain’ or ‘LocalMeanGradDisp’.
- Parameters:
periodicity_type ('small_strain' or 'finite_strain'.) –
The type of periodicity : * If small_strain is selected, the constraint is directly expressed in terms
of linearized strain components.
If ‘finite_strain’ is selected, the constraint is expressed in terms of displacement gradient.
off_axis_rotation (scipy.spatial.transform object Rotation) – Rotation between the reference frame and the off-axis loading frame where boundary conditions are applied.
dim (int in [1,2,3] (default = 3)) – 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”.
Notes
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() bc_periodic = fd.constraint.PeriodicBC(periodicity_type = 'small_strain')
- __init__(periodicity_type: str = 'small_strain', off_axis_rotation: Rotation | None = None, dim: int | None = None, meshperio: bool = True, tol: float = 1e-08, name: str = 'Periodicity')
Methods
PeriodicBC.generate
(problem[, t_fact, ...])PeriodicBC.initialize
(problem[, ...])Initialize a periodic boundary condition object using several multi-point constraints. The constraint drivers are constructed as follows, depending on periodicity_type and dim: - For periodicity_type="small_strain": - dim=1: - global_dof is created for ['E_xx'] (1 DOF). - node_cd = [problem.virtual_dof['E_xx']] - var_cd = ['E_xx'] - dim=2: - virtual_dof is created for ['E_xx', 'E_yy', 'E_xy'] (3 DOF). - node_cd = [[problem.virtual_dof['E_xx'], problem.virtual_dof['E_xy']], [problem.virtual_dof['E_xy'], problem.virtual_dof['E_yy']]] - var_cd = [['Virtual', 'Virtual'], ['Virtual', 'Virtual']] - dim=3: - virtual_dof is created for ['E_xx', 'E_yy', 'E_zz', 'E_xy', 'E_xz', 'E_yz'] (6 DOF). - node_cd = [[problem.virtual_dof['E_xx'], problem.virtual_dof['E_xy'], problem.virtual_dof['E_xz']], [problem.virtual_dof['E_xy'], problem.virtual_dof['E_yy'], problem.virtual_dof['E_yz']], [problem.virtual_dof['E_xz'], problem.virtual_dof['E_yz'], problem.virtual_dof['E_zz']]] - var_cd = [['Virtual', 'Virtual', 'Virtual'], ['Virtual', 'Virtual', 'Virtual'], ['Virtual', 'Virtual', 'Virtual']] - For periodicity_type="finite_strain": - dim=1: - virtual_dof is created for ['DU_xx'] (1 DOF). - node_cd = [problem.virtual_dof['DU_xx']] - var_cd = ['Virtual'] - dim=2: - virtual_dof is created for ['DU_xx', 'DU_xy', 'DU_yx', 'DU_yy'] (4 DOF). - node_cd = [[problem.virtual_dof['DU_xx'], problem.virtual_dof['DU_xy']], [problem.virtual_dof['DU_yx'], problem.virtual_dof['DU_yy']]] - var_cd = [['Virtual', 'Virtual'], ['Virtual', 'Virtual']] - dim=3: - virtual_dof is created for ['DU_xx', 'DU_xy', 'DU_xz', 'DU_yx', 'DU_yy', 'DU_yz', 'DU_zx', 'DU_zy', 'DU_zz'] (9 DOF). - node_cd = [[problem.virtual_dof['DU_xx'], problem.virtual_dof['DU_xy'], problem.virtual_dof['DU_xz']], [problem.virtual_dof['DU_yx'], problem.virtual_dof['DU_yy'], problem.virtual_dof['DU_yz']], [problem.virtual_dof['DU_zx'], problem.virtual_dof['DU_zy'], problem.virtual_dof['DU_zz']]] - var_cd = [['Virtual', 'Virtual', 'Virtual'], ['Virtual', 'Virtual', 'Virtual'], ['Virtual', 'Virtual', 'Virtual']] The node_cd and var_cd structures define the virtual DOFs and their associated variables for the constraint drivers, depending on the periodicity type and dimension.
Return a condensed one line str describing the object