InclusionRVE

The InclusionRVE provides a class definition for a generation of RVEs with inclusions using Python and Gmsh. The class inherits from the GenericRVE class and extends it in order to handle distance and refinement calculations

Currently, the class is restricted to RVEs with rectangular (2D)/ box-shaped (3D) domains (explicitly assumed within the setupPeriodicity() method) which comprise inclusions that are all of the same type (explicitly assumed by using one inclusionInformation array and one inclusionAxis variable).

Class Definition

class gmshModel.Model.InclusionRVE.InclusionRVE(size=None, inclusionType=None, inclusionAxis=None, origin=[0, 0, 0], periodicityFlags=[1, 1, 1], gmshConfigChanges={})[source]

Bases: GenericRVE

Generic class for RVEs with inclusions created using the Gmsh-Python-API

Based on the GenericRVE class, this class provides extra attributes and methods that all box-shaped RVEs with inclusions should have: the definition of an inclusion information array and relevant inclusion axes allows to provide additional methods for distance and refinement field calculations.

Attributes:

dimension: int

dimension of the model instance

size: list/array

size of the box-shaped RVE model -> size=[Lx, Ly, (Lz)]

origin: list/array

origin of the box-shaped RVE model -> 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 box-shaped RVE model -> periodicityFlags=[0/1, 0/1, 0/1]

inclusionInfo: array

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

gmshConfigChanges: dict

dictionary for user updates of the default Gmsh configuration

defineRefinementFields(refinementOptions={})[source]

Method to calculate refinement information for the RVE

For inclusion-based RVEs, the inclusionInfo array can be used to calculate refinement fields based on inclusion radii and distances. These calculations are defined here so that every child class of InclusionRVE can use them to define refinement fields.

Parameters:

refinementOptions: dict

user-defined updates for the default refinement options

getInclusionInfoForRefinement(relDistBnd=2)[source]

Method to calculate an “extended” inclusionInfo for the refinement methods

In order to ensure a periodicity of not only the geometry but also the mesh, the fields defined in the refinement methods, have to be periodic, i.e. present on both sides of periodic boundaries. Within this method, inclusions that are close to the domain boundaries are copied and stored in an “extended” inclusionInfo array that is only used within the refinement methods. This ensures that refinement fields that are found on one boundary will also be present on its periodic counterpart.

Parameters:

relDistBnd: int/float

distance (relative to inclusion radius) for which inclusion is considered to be “far” from the boundary if it is exceeded

inclusionRefinement(incInfo)[source]

Method to perform refinement of inclusions and their boundaries

Within this method, the inclusions are refined using a function similar to the normal distribution. This method ensures that especially the inclusion boundaries are refined whereas the inclusion centers and the surrounding matrix material generally remain coarse. The applied refinement function of type “gaussian” is described in the function definition of “_gaussianRefinement()”.

Parameters:

incInfo: array

extended inclusionInfo array containing information on inclusions within the RVE model as well as outside but close to the model boundaries

interInclusionRefinement(incInfo)[source]

Method to perform refinement between inclusions

Within this method, the matrix between close inclusions is refined using a tanh-function. This method ensures that the space between inclusions comprises the user-defined amount of elements. The applied refinement function of type “tanh” is described in the function definition of “_tanhRefinement()”.

Parameters:

incInfo: array

extended inclusionInfo array containing information on inclusions within the RVE model as well as outside but close to the model boundaries

updateRefinementOptions(optionsUpdate)[source]

Method to update refinement options

Parameters:

optionsUpdate: dict

dictionary containing user updates of the set refinement options