GenericUnitCell

The GenericUnitCell class provides required information for inclusion-based unit cells. It inherits from the InclusionRVE class and extends its attributes and methods to handle the boolean operations and the definition of physical groups.

All unit cell allow to create “real” unit cells by passing the inclusion distance to the classes initialization method. If the cells size is specified instead, the distance is calculated automatically: this allows for unit cells with an inclusion distribution that is close to physical unit cells but gives more flexibility in their generation.

Class Definition

class gmshModel.Model.GenericUnitCell.GenericUnitCell(distance=None, radius=None, numberCells=[1, 1, 1], size=None, inclusionType=None, inclusionAxis=None, origin=[0, 0, 0], periodicityFlags=[1, 1, 1], domainGroup='domain', inclusionGroup='inclusions', gmshConfigChanges={})[source]

Bases: InclusionRVE

Class definition for unit cells

This class provides required information for inclusion-based unit cells. It inherits from the InclusionRVE class and extends its attributes and methods to handle the boolean operations and the definition of physical groups.

All unit cell allow to create “real” unit cells by passing the inclusion distance to the classes initialization method. If the cells size is specified instead, the distance is calculated automatically: this allows for unit cells with an inclusion distribution that is close to physical unit cells but gives more freedom in their generation.

Attributes:

dimension: int

dimension of the model instance

distance: float

distance of the inclusions within the unit cell (for automatic size calculation)

radius: float

radius of the unit cells inclusions

numberCells: list/array

array providing the number of cells in the individual axis directions -> numberCells=[nx, ny, (nz)]

size: list/array

size of the unit cell (allow box-shaped cells) -> size=[Lx, Ly, (Lz)]

origin: list/array

origin of the unit cell -> origin=[Ox, Oy, (Oz)]

inclusionType: string

string defining the type of inclusion -> iunclusionType= “Sphere”/”Cylinder”/”Circle”

inclusionAxis:list/array

array defining the inclusion axis (only relevant for inclusionType “Cylinder”) -> currently restricted to Cylinders parallel to one of the coordinate axes -> inclusionAxis=[Ax, Ay, Az]

relevantAxes: list/array

array defining the relevant axes for distance calculations

periodicityFlags: list/array

flags indicating the periodic axes of the unit cell -> periodicityFlags=[0/1, 0/1, 0/1]

inclusionInfo: array

array containing relevant inclusion information (center, radius) for distance calculations

domainGroup: string

name of the group the unit cells domain should belong to

inclusionGroup: string

name of the group the unit cells inclusions should belong to

gmshConfigChanges: dict

dictionary for user updates of the default Gmsh configuration

defineBooleanOperations()[source]

Overwritten method of the GenericModel class to define the required boolean operations for the model generation

defineGeometricObjects()[source]

Overwritten method of the GenericModel class to define and create the required geometric objects for the model generation

definePhysicalGroups(**args)[source]

Overwritten method of the GenericModel class to define the required physical groups for the model mesh generation

In order to be able to assign different material properties to different regions in the generated mesh, physical groups are used in Gmsh to combine different regions into one group. The additional definition of a boundary group allows to identify the boundary of the mesh without searching for elements on the boundary within the solver.

placeInclusions()[source]

Placeholder method to place inclusions for the inclusion-based unit cell