StructureGene#

msgpi.sg.sg.StructureGene
class msgpi.sg.sg.StructureGene(name, sgdim, smdim=None)#

A finite element level structure gene model in the theory of MSG.

Parameters
  • name (str) – Name of the SG.

  • sgdim (int) – Dimension of the SG.

  • smdim (int) – Dimension of the material/structural model. Beam (1), plate/shell (2), 3D continuum (3).

analysis#

Analysis configurations

  • 0 - homogenization (default)

  • 1 - dehomogenization/localization/recover

  • 2 - failure (SwiftComp only)

Type

int

damping#

Flag of damping computation

Type

int

degen_element#

Flag of the type of elements (SC)

Type

int

elem_orient#

Element local orientations.

{eid: [[a1, a2, a3], [b1, b2, b3], [c1, c2, c3]], …}

Type

dict of {int, list of lists of floats}

elem_prop#

Material/Combination id for each element.

{eid: mid/cid, …}

Type

dict of {int, int}

elementids#

Element ids

Type

list of ints

elementids1d#

1D element ids

Type

list of ints

elementids2d#

2D element ids

Type

list of ints

elementids3d#

3D element ids

Type

list of ints

elements#

Elemental connectivities

{eid: [nid1, nid2, …], …}, no zeros

Type

dict of {int, list of ints}

findComboByMaterialOrientation(name, angle)#

Find material-orientation combination.

Parameters
  • name (str) – Material name.

  • angle (float) – Orientation angle.

Returns

Combination id. 0 if not found.

Return type

int

findMaterialByName(name)#

Find material by name.

Parameters

name (str) – Material name.

Returns

Material id. 0 if not found.

Return type

int

fn_gmsh_msh#

File name of the Gmsh mesh file

global_displacements#

Global displacements.

[u1, u2, u3]

Type

list of floats

global_loads#

Global loads

Model

Generalized stresses

Generalized strains

Continuum

[s11, s22, s33, s23, s13, s12]

[e11, e22, e33, e23, e13, e12]

Kirchhoff-Love plate/shell

[N11, N22, N12, M11, M22, M12]

[e11, e22, 2e12, k11, k22, 2k12]

Reissner-Mindlin plate/shell

[N11, N22, N12, M11, M22, M12, N13, N23]

[e11, e22, 2e12, k11, k22, 2k12, g13, g23]

Euler-Bernoulli beam

[F1, M1, M2, M3]

[e11, k11, k12, k13]

Timoshenko beam

[F1, F2, F3, M1, M2, M3]

[e11, g12, g13, k11, k12, k13]

Type

list of floats

global_loads_dist#

list of lists of floats: Distributed loads for Timoshenko beam model (VABS only)

global_loads_type#

Global load type.

  • 0 - generalized stresses

  • 1 - generalized strains

Type

int

global_rotations#

Global rotation matrix.

[[C11, C12, C13], [C21, C22, C23], [C31, C32, C33]]

Type

list of lists floats

initial_curvature#

Initial curvature

Type

list of floats

initial_twist#

Initial twist (beam only)

Type

float

lame_params#

Lame parameters for geometrically corrected shell model

Type

list of floats

materials#

Materials

Type

dict of {int, msgpi.sg.MaterialProperty}

mocombos#

Material-orientation (deg) combinations

{cid: [mid, orientation], …}

Type

dict of {int, list of (int, float)}

model#

Macroscopic structural model

  • 0 - classical (default)

  • 1 - refined (e.g. generalized Timoshenko)

  • 2 - Vlasov model (beam only)

  • 3 - trapeze effect (beam only)

Type

int

name#

Name of the SG.

Type

str

nodes#

Nodal coordinates

  • 3D SG: {nid: [y1, y2, y3], …}

  • 2D SG: {nid: [y2, y3], …}

  • 1D SG: {nid: [y3], …}

Type

dict of {int, list of floats}

nonuniform_temperature#

Flag of uniform temperature

Type

int

num_slavenodes#

Number of slave nodes

Type

int

oblique#

Oblique (beam only)

Type

list of floats

omega#

Omega (see SwiftComp manual).

Type

float

physics#

Physics included in the analysis

  • 0 - elastic (default)

  • 1 - thermoelastic

  • 2 - conduction

  • 3 - piezoelectric/piezomagnetic

  • 4 - thermopiezoelectric/thermopiezomagnetic

  • 5 - piezoelectromagnetic

  • 6 - thermopiezoelectromagnetic

Type

int

prop_elem#

Element id for each material/combination.

{mid/cid: [eid, …], …}

Type

dict of {int, int}

sgdim#

Dimension of the SG.

Type

int

smdim#

Dimension of the material/structural model.

Type

int

summary()#

Print a brief summary of the SG.

trans_element#

Flag of transformation of elements

Type

int

writeGmshElements(fo, nid_begin=1, eid_begin=1)#
writeGmshMsh(fo, nid_begin=1, eid_begin=1, loc=[0, 0, 0], *args, **kwargs)#
writeGmshNodes(fo, nid_begin=1, loc=[0, 0, 0])#
writeInput(fn, solver, analysis='h', sg_fmt=1) str#

Write analysis input

Parameters
  • fn (str) – Name of the input file

  • solver ({'vabs' (or 'v'), 'swfitcomp' (or 'sc', 's')}) – Solver of the analysis

  • analysis ({0, 1, 2, 3, '', 'h', 'dn', 'dl', 'd', 'l', 'fi'}, optional) – Analysis type, by default ‘h’

  • sg_fmt ({0, 1}, optional) – Format for the VABS input, by default 1

Returns

Name of the input file

Return type

str

writeInputGlobal(fn, sfi, sff, solver, analysis)#
writeInputSG(fn, sfi, sff, solver, sg_fmt)#