11.4. 模块 mpm

11.4.1. 类预览

Analysis

The simulation class

BCDIR

Boundary direction

BCFIXSTATE

Boundary fix state

CamClay

The Cam-Clay model

ContactEngine

The contact engine to handle contact force between material points and DEM bodies.

DemLine

Line define as a DEM body

DemPolygon

Polygon defined as a DEM body

DemSphere

Sphere defined as DEM body

Dp

The drucker-prager model

Elastic

Elastic material

Element

The element of background grid.

Ghostmat

Ghost material for hosting DEM RVEs in DEMPM

Grid

The background grid that uses a regular grid.

MPMETHOD

MPM method/shape function for solution

MatType

Material type/constitutive model

Material

Material/constitutive model

Mc

MC model

McOrigin

The original MC model

MpmWriter

Writer to output data into files

Mpts

The non-rigid material points

MptsBase

The base class for material points

NeoHookean

NeoHookean model

NewtonLiquid

Newtonian fluid

Node

The node for the background grid.

PeriodicHook

The base class for periodic hook.

PhaseTrsfMpts

Phase transformation material points

PhaseTrsfNode

The node with consideration of phase transformation.

Polygon

Polygon shape

Rectangle

Rectangle shape

RigidMpts

Rigid material points

Ring

Ring shape

SIMTYPEMASK

Mask for simulation type

Shape

Shape to define material points

ShapeType

Shape type

Sphere

Sphere shape

SplitRigidMpts

The material points that can be split.

TreeElement

The element of the tree-structured background grid.

TreeGrid

The background grid in a tree structure.

TreeNode

The node for the tree-structured background grid.

postProcess

For post-processing.

11.4.2. API函数

class mpm.Analysis

The simulation class

NodesPos(self: mpm.Analysis) List[float]

get positions of all nodes

NodesTemperature(self: mpm.Analysis) List[float]
PreAnalysis(self: mpm.Analysis) None

before run, generate pts and set bc first

PtsMeanStress(self: mpm.Analysis) List[float]

get the mean stress for all particles, especially for gui view

PtsPos(self: mpm.Analysis) List[float]
PtsShearStrain(self: mpm.Analysis) List[float]

get shear strain for all particles, especially for gui view

PtsStressYY(self: mpm.Analysis) List[float]

get the yy-component stress for all particles, especially for gui view

PtsTemperature(self: mpm.Analysis) List[float]
PtsTemperatureRemapped(self: mpm.Analysis) List[float]
Run(*args, **kwargs)

Overloaded function.

  1. Run(self: mpm.Analysis) -> None

Run the simulation until reaching the tottime

  1. Run(self: mpm.Analysis, arg0: int) -> None

Run the simulation with n steps

RunPthread(self: mpm.Analysis, arg0: int) None

Run the simulation for n steps with detached threads

property USL
__init__(self: mpm.Analysis) None
addMats(self: mpm.Analysis, arg0: mpm.Material) None

push back material

addShapes(self: mpm.Analysis, arg0: mpm.Shape) None

push back shapes

property contactengine
property demstep
property dt

time step

getElements(self: mpm.Analysis) list
getNodeById(self: mpm.Analysis, *args) object

get node by id.

getNodes(self: mpm.Analysis) list
getNonrPts(self: mpm.Analysis) list
getParById(self: mpm.Analysis, *args) object

get particle by id. Note: particles are in two containers (Mpts followed by RigidMpts)

getRigidPts(self: mpm.Analysis) list
getShapeReactForce(self: mpm.Analysis, arg0: int, arg1: int) float

get reactforce of specific shape

getThermalCriticalTimeStep(self: mpm.Analysis) float

get the critical time step for the thermal analysis.

getTimeStep(self: mpm.Analysis) float

get the current time step in the simulation.

getTrElements(self: mpm.Analysis) list
getTrNodes(self: mpm.Analysis) list
property grid
property hooks

getHooks setHooks

isRunning(self: mpm.Analysis) bool

get the isRunnning flag to check if the core simulation is running

iter(self: mpm.Analysis) int

get the current time step

property mapOnce
property mats
property nrpts
pause(self: mpm.Analysis) None

pause the simulation

printNodesTemperature(self: mpm.Analysis) None

print temperature at all nodes

property rigidpts
property sdfengine
setHigherPicOrder(self: mpm.Analysis, arg0: int) None
setMethod(*args, **kwargs)

Overloaded function.

  1. setMethod(self: mpm.Analysis, arg0: int) -> None

mpm method

  1. setMethod(self: mpm.Analysis, arg0: int, arg1: bool) -> None

mpm method

setNumThreads(self: mpm.Analysis, arg0: int) None

set the number of threads in parallel

setPicEngineIterperiod(self: mpm.Analysis, arg0: int) None
setTimeDt(self: mpm.Analysis, arg0: float, arg1: float) None

set total time and time step

property shapes
property simTypeMasks

mask for simulation type

speed(self: mpm.Analysis) int
property splitpts
property trgrid
useContact(self: mpm.Analysis) None

use the contact algorithm

useNFGrid(self: mpm.Analysis) None

use the non uniform grid

usePtSplit(self: mpm.Analysis, arg0: bool) None

use the non uniform grid

useSDF(self: mpm.Analysis) None

use the SDF for the separate field

property writer
class mpm.BCDIR

Boundary direction

Members:

XDIR : The x-direction.

YDIR : The y-direction.

NORMALDIR : The normal direction.

TANGENTDIR : The tangential direction.

NORMALDIR = BCDIR.NORMALDIR
TANGENTDIR = BCDIR.TANGENTDIR
XDIR = BCDIR.XDIR
YDIR = BCDIR.YDIR
__init__(self: mpm.BCDIR, arg0: int) None
property name
class mpm.BCFIXSTATE

Boundary fix state

Members:

BCFREE : Free boundary.

BCFIXALL : All fixed boundary.

BCFIXPLUS : Fix the + direction.

BCFIXMINUS : Fix the - direction.

BCFIXALL = BCFIXSTATE.BCFIXALL
BCFIXMINUS = BCFIXSTATE.BCFIXMINUS
BCFIXPLUS = BCFIXSTATE.BCFIXPLUS
BCFREE = BCFIXSTATE.BCFREE
__init__(self: mpm.BCFIXSTATE, arg0: int) None
property name
class mpm.CamClay

基类:Material

The Cam-Clay model

property E

Young’s modulous

__init__(self: mpm.CamClay) None
property base_e

reference void ratio

property base_p

reference spherical stress

getStress(self: mpm.CamClay, arg0: list, arg1: list) list
property init_p

spherical stress at the initial state

property kappa

slope of the swollen normal compression line

property lambda

slope of the virgin normal compression line

property lodeang

stress ratio versus the lode angle

property nu

Poisson’s ratio

property ocr

over-consolidation ratio

printInfo(self: mpm.CamClay) None

print the mechanical property

printSState(self: mpm.CamClay) None
class mpm.ContactEngine

The contact engine to handle contact force between material points and DEM bodies.

__init__(self: mpm.ContactEngine) None
property addforce2pt
property potential

get contact potential

property radiusscale
class mpm.DemLine

基类:Shape

Line define as a DEM body

__init__(self: mpm.DemLine, arg0: float, arg1: float, arg2: float, arg3: float) None
printInfo(self: mpm.DemLine) None
printVTKInfo(self: mpm.DemLine) None
property splitnum

resolution for the partition

class mpm.DemPolygon

基类:Shape

Polygon defined as a DEM body

__init__(self: mpm.DemPolygon, arg0: float, arg1: int, arg2: int, arg3: float, arg4: float, arg5: float) None
addForce2Pt(self: mpm.DemPolygon, arg0: bool) None

how the dem polygon add the force. True: add to pt, False: add to nodes

addPts(self: mpm.DemPolygon, arg0: float, arg1: float) None

Add one point to polygon

getDemForce(self: mpm.DemPolygon) tuple

get reaction force

getPts(self: mpm.DemPolygon) List[float]

Get points array to polygon

getReactionForce(self: mpm.DemPolygon) tuple

get reaction force

printInfo(self: mpm.DemPolygon) None
setContactMatfield(self: mpm.DemPolygon, arg0: List[int]) None
setDt(self: mpm.DemPolygon, arg0: float) None

set timestep for dempolygon

setForceNormalDir(self: mpm.DemPolygon, arg0: int, arg1: int) None

set the fixed contact normal direction

setGravity(self: mpm.DemPolygon, arg0: float, arg1: float) None

add the gravity for DemPolygon and note that the value is reserved for velocity

setInterval(self: mpm.DemPolygon, arg0: int) None

set interval of neighbour list update

setPts(self: mpm.DemPolygon, arg0: List[float]) None

Set points array to polygon

setRange(self: mpm.DemPolygon, arg0: int) None

set search radius of mpts for dem polygon

setRotFix(self: mpm.DemPolygon, arg0: bool) None

fix the polygon rotation

setShapeErr(self: mpm.DemPolygon, arg0: float) None

set the resolution of DemPolygon shape outline

usePolygonContact(self: mpm.DemPolygon, arg0: bool) None

set the contact detection type: sphere or polygon

class mpm.DemSphere

基类:Shape

Sphere defined as DEM body

__init__(self: mpm.DemSphere, arg0: float, arg1: int, arg2: int, arg3: float, arg4: float, arg5: float) None
addForce2Pt(self: mpm.DemSphere, arg0: bool) None

how the dem polygon add the force. True: add to pt, False: add to nodes

getPts(self: mpm.DemSphere) List[float]

Get points array to polygon

getReactionForce(self: mpm.DemSphere) tuple

get reaction force

printInfo(self: mpm.DemSphere) None
setArc(self: mpm.DemSphere, arg0: float, arg1: float) None

cut a arc from sphere

setPts(self: mpm.DemSphere, arg0: List[float]) None

Set points array to polygon

class mpm.Dp

基类:Material

The drucker-prager model

property E

Young’s modulous

__init__(self: mpm.Dp) None
property c

cohesion

getStress(self: mpm.Dp, arg0: list, arg1: list) list
property nu

Poisson’s ratio

property phi

friction angle

printInfo(*args, **kwargs)

Overloaded function.

  1. printInfo(self: mpm.Dp) -> None

print the mechanical property

  1. printInfo(self: mpm.Dp) -> None

print the mechanical property

printSState(self: mpm.Dp) None
property psi

dilation angle

class mpm.Elastic

基类:Material

Elastic material

property E

Young’s modulous

__init__(self: mpm.Elastic) None
property nu

Poisson’s ratio

printInfo(self: mpm.Elastic) None

print the mechanical property

class mpm.Element

The element of background grid.

__init__(self: mpm.Element) None
getMembers(self: mpm.Element) list
printInfo(self: mpm.Element) None

print information of base element class

class mpm.Ghostmat

基类:Material

Ghost material for hosting DEM RVEs in DEMPM

__init__(self: mpm.Ghostmat) None
printInfo(self: mpm.Ghostmat) None

print the mechanical property

property thermalResistance
class mpm.Grid

The background grid that uses a regular grid.

__init__(self: mpm.Grid) None
getNumEle(self: mpm.Grid) tuple

get the number of elements along x and y directions

getSpace(self: mpm.Grid) tuple

get the space of the grid

getXrange(self: mpm.Grid) tuple

get xrange

getYrange(self: mpm.Grid) tuple

get yrange

property nodes

nodes of the grid

printElements(self: mpm.Grid) None

print element information for debug

printInfo(self: mpm.Grid) None

print information for debug

setContactDisratio(self: mpm.Grid, arg0: int, arg1: float) None

set the contact detection ratio

setFriction(self: mpm.Grid, arg0: float) None

set the frictoin sliding coefficient

setNumEle(self: mpm.Grid, arg0: int, arg1: int) None

element dimensions in x and y direction

setRange(self: mpm.Grid, arg0: float, arg1: float, arg2: float, arg3: float) None

grid xmin, xmax, ymin, ymax

class mpm.MPMETHOD

MPM method/shape function for solution

Members:

NONEMETHOD : Not solving.

LINEAR : Linear interpolation.

GIMP : The GIMP method.

LINEARCPDI : The linear CPDI method.

MIXMETHOD : The mix method.

BSPLINECPDI : The B-Spline CPDI method.

BSPLINECPDI = MPMETHOD.BSPLINECPDI
GIMP = MPMETHOD.GIMP
LINEAR = MPMETHOD.LINEAR
LINEARCPDI = MPMETHOD.LINEARCPDI
MIXMETHOD = MPMETHOD.MIXMETHOD
NONEMETHOD = MPMETHOD.NONEMETHOD
__init__(self: mpm.MPMETHOD, arg0: int) None
property name
class mpm.MatType

Material type/constitutive model

Members:

RIGIDMAT : Rigid material

ELASTICMAT : Elastic material

MCMAT : MC material

GHOSTMAT : Ghost material for hosting DEM RVEs, for DEMPM only.

NEOMAT : Neoelstic material

DPMAT : Drucker-Prager model

NEWTONMAT : Newton liquid

CAMCLAYMAT : Cam-Clay model

CAMCLAYMAT = MatType.CAMCLAYMAT
DPMAT = MatType.DPMAT
ELASTICMAT = MatType.ELASTICMAT
GHOSTMAT = MatType.GHOSTMAT
MCMAT = MatType.MCMAT
NEOMAT = MatType.NEOMAT
NEWTONMAT = MatType.NEWTONMAT
RIGIDMAT = MatType.RIGIDMAT
__init__(self: mpm.MatType, arg0: int) None
property name
class mpm.Material

Material/constitutive model

property Kn

Contact normal stiffness

property Ks

Contact tangential stiffness

property Tres
__init__(*args, **kwargs)
property coarsegrain
property freezepoint

determine the freeze point

property friction

Contact friction coefficient

property heatCapacity

set the heat capacity

property infinistate

whether infinitesimal or not

property latentratio

determine the latent ratio

property oned
property planestrain

determine whether plane strain or plane stress

property rho

density

setIndex(self: mpm.Material, arg0: int) None
setInitDensity(self: mpm.Material, arg0: List[float]) None
setInitFraction(self: mpm.Material, arg0: List[float]) None
setThermalProp(*args, **kwargs)

Overloaded function.

  1. setThermalProp(self: mpm.Material, arg0: float, arg1: List[float]) -> None

set themal properties

  1. setThermalProp(self: mpm.Material, arg0: List[float], arg1: List[float]) -> None

set themal properties

property thermalExpCoeff

linear thermal expansion coefficient.

property unfrozenlimit
property unfrozenratio
property usecontentfrozen
property usemultiplek
class mpm.Mc

基类:Material

MC model

property E

Young’s modulous

__init__(self: mpm.Mc) None
property c

cohesion

property cpeak

peak cohesion

property cres

residual cohesion

getStress(self: mpm.Mc, arg0: list, arg1: list) list
property nu

Poisson’s ratio

property phi

friction angle

property phipeak

peak fricton angle

property phires

residual cohesion

printInfo(self: mpm.Mc) None

print the mechanical property

property psi

dilation angle

property psipeak

peak dilation angle

property psires

dilation cohesion

property pstrainpeak

peak plastic strain

property pstrainres

residual peak plastic strain

property softenstate

soften flag

property tension

tension cut-off

class mpm.McOrigin

基类:Material

The original MC model

property E

Young’s modulous

__init__(self: mpm.McOrigin) None
property c

cohesion

getStress(self: mpm.McOrigin, arg0: list, arg1: list) list
property nu

Poisson’s ratio

property phi

friction angle

printInfo(self: mpm.McOrigin) None

print the mechanical property

property psi

dilation angle

property tension

tension cut-off

class mpm.MpmWriter

基类:PeriodicHook

Writer to output data into files

__init__(self: mpm.MpmWriter) None
saveCurrentMesh(self: mpm.MpmWriter, arg0: str) None

save current mesh file

saveCurrentPtsBin(self: mpm.MpmWriter, arg0: str) None

save current pts binary

setDir(self: mpm.MpmWriter, arg0: str, arg1: str) None

dir path and name for result files

setEndTime(self: mpm.MpmWriter, arg0: float) None

end time of writing vtk

setIntervalTime(self: mpm.MpmWriter, arg0: float) None

save interval of writing vtk

setStartTime(self: mpm.MpmWriter, arg0: float) None

start time of writing vtk

writePtsPos(self: mpm.MpmWriter, arg0: str) None

write particle positions into a file in binary

class mpm.Mpts

基类:MptsBase

The non-rigid material points

__init__(*args, **kwargs)
getDeformMatrix(self: mpm.Mpts) list

get deformation matrix of material point

getInitPos(self: mpm.Mpts) tuple

get particle position in 2D

getPos(self: mpm.Mpts) tuple

get particle position in 2D

getStrainEnergy(self: mpm.Mpts) float

get strain energy of non-rigid pts

getVel(self: mpm.Mpts) tuple

get particle velocity in 2D

printInfo(self: mpm.Mpts) None
printMatInfo(self: mpm.Mpts) None

print material info

setVel(self: mpm.Mpts, arg0: float, arg1: float) None
class mpm.MptsBase

The base class for material points

__init__(*args, **kwargs)
getIndex(self: mpm.MptsBase) int
getNodeList(self: mpm.MptsBase) List[int]

get the list of node indexes associated with this particle

getNodeSF(self: mpm.MptsBase) List[float]

get the list of node indexes associated with this particle

getPos(self: mpm.MptsBase) tuple

get particle position in 2D

getRemappedT(self: mpm.MptsBase) float

get the remapped temperature on the particle

getShearStrain(self: Mpts) float
getStrain(self: mpm.MptsBase) list

get strain on this material point

getStress(self: mpm.MptsBase) list

get stress on this material point

getTemperature(self: mpm.MptsBase) float

get the temperature on the particle

getThermalConductivity(self: mpm.MptsBase) list

get thermal conductivity tensor on this material point

getVel(self: mpm.MptsBase) tuple

get particle velocity in 2D

getVol(self: mpm.MptsBase) float

get particle volume in 2D

property heatCapacity

specific heat capacity

property heatSource

heat source or sink

property mass

particle mass

printInfo(self: mpm.MptsBase) None
property temperature

temperature: becareful to change it during simulation

class mpm.NeoHookean

基类:Material

NeoHookean model

property E

Young’s modulous

__init__(self: mpm.NeoHookean) None
property nu

Poisson’s ratio

printInfo(self: mpm.NeoHookean) None

print the mechanical property

property uopt

Different way to calculate the strain energy

class mpm.NewtonLiquid

基类:Material

Newtonian fluid

__init__(self: mpm.NewtonLiquid) None
property bulk

Bulk modulus

printInfo(self: mpm.NewtonLiquid) None

print the mechanical property

property visco

Dynamic viscosity

class mpm.Node

The node for the background grid.

__init__(self: mpm.Node) None
getId(self: mpm.Node) int

get the node index

getParNum(self: mpm.Node) int

get particle number associated with this node

getTemperature(self: mpm.Node) float

get the temperature at the node

property pos

get the nodal position

printInfo(self: mpm.Node) None

print info of a node

printMatfInfo(self: mpm.Node, arg0: int) None

print Material field information.

class mpm.PeriodicHook

The base class for periodic hook.

__init__(self: mpm.PeriodicHook) None
property dead

the hook is dead (True) or not.

property iterLast

iteration of last run

property iterPeriod

iter Periodicity

property realLast

real time of last run

property realPeriod

real Periodicity

reset(self: mpm.PeriodicHook, **kwargs) None

reset the period of the hook

property totalRuns

the total runs for the hook

property virtLast

virtual time of last run

property virtPeriod

virtual Periodicity

class mpm.PhaseTrsfMpts

基类:Mpts

Phase transformation material points

__init__(*args, **kwargs)
getCurrentWaterFraction(self: mpm.PhaseTrsfMpts, arg0: float) float
getDIcefractionDTemp(self: mpm.PhaseTrsfMpts, arg0: float) float
getPhaseFraction(self: mpm.PhaseTrsfMpts, arg0: int) float
getPhaseState(self: mpm.PhaseTrsfMpts) int
getPos(self: mpm.PhaseTrsfMpts) tuple

get particle position in 2D

getStrainEnergy(self: mpm.PhaseTrsfMpts) float

get strain energy of non-rigid pts

getVel(self: mpm.PhaseTrsfMpts) tuple

get particle velocity in 2D

property localbondratio
printInfo(self: mpm.PhaseTrsfMpts) None
printMatInfo(self: mpm.PhaseTrsfMpts) None

print material info

testTheUpdateVol(self: mpm.PhaseTrsfMpts, arg0: int) None
class mpm.PhaseTrsfNode

基类:Node

The node with consideration of phase transformation.

__init__(self: mpm.PhaseTrsfNode) None
getId(self: mpm.PhaseTrsfNode) int

get the node index

getParNum(self: mpm.PhaseTrsfNode) int

get particle number associated with this node

getTemperature(self: mpm.PhaseTrsfNode) float

get the temperature at the node

property pos

get the nodal position

printInfo(self: mpm.PhaseTrsfNode) None

print info of a node

printMatfInfo(self: mpm.PhaseTrsfNode, arg0: int) None

print Material field information.

class mpm.Polygon

基类:Shape

Polygon shape

__init__(self: mpm.Polygon, arg0: int) None
printInfo(self: mpm.Polygon) None
setPts(self: mpm.Polygon, arg0: List[float]) None
class mpm.PyHook

基类:PeriodicHook

Hook for Python functions at the user end.

__init__(self: mpm.PyHook) None
property command

command for the pyhook. WARNING: you cannot use the print function in the hook, or else it may encounter a crash in detached multi-threads. FIXEME in the future. As a workaround, we use app.print in GUI.

class mpm.Rectangle

基类:Shape

Rectangle shape

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: mpm.Rectangle) -> None

  2. __init__(self: mpm.Rectangle, arg0: float, arg1: float, arg2: float, arg3: float, arg4: int) -> None

printInfo(self: mpm.Rectangle) None
class mpm.RigidMpts

基类:MptsBase

Rigid material points

__init__(*args, **kwargs)
getPos(self: mpm.RigidMpts) tuple

get particle position in 2D

getVel(self: mpm.RigidMpts) tuple

get particle velocity in 2D

printInfo(self: mpm.RigidMpts) None
class mpm.Ring

基类:Shape

Ring shape

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: mpm.Ring) -> None

  2. __init__(self: mpm.Ring, arg0: float, arg1: float, arg2: float, arg3: float, arg4: int) -> None

printInfo(self: mpm.Ring) None
class mpm.SDFengine

Signed distance function-based contact detection engine

__init__(self: mpm.SDFengine) None
printInfo(self: mpm.SDFengine) None
queryState(self: mpm.SDFengine, arg0: bool, arg1: int) None
class mpm.SIMTYPEMASK

Mask for simulation type

Members:

MANAL : For mechanical analysis

TANAL : For thermal analysis

PHASEANAL : For phase transformation

MANAL = SIMTYPEMASK.MANAL
PHASEANAL = SIMTYPEMASK.PHASEANAL
TANAL = SIMTYPEMASK.TANAL
__init__(self: mpm.SIMTYPEMASK, arg0: int) None
property name
class mpm.Shape

Shape to define material points

Rotate(self: mpm.Shape, arg0: float) None

rotate shape

__init__(*args, **kwargs)
setBc(*args, **kwargs)

Overloaded function.

  1. setBc(self: mpm.Shape, arg0: int, arg1: float, arg2: int, arg3: float) -> None

  2. setBc(self: mpm.Shape, arg0: int, arg1: str, arg2: int, arg3: str) -> None

  3. setBc(self: mpm.Shape, arg0: int, arg1: float, arg2: int, arg3: float, arg4: bool, arg5: bool) -> None

setBcMatfield(self: mpm.Shape, arg0: List[int]) None
setConsolidation(*args, **kwargs)

Overloaded function.

  1. setConsolidation(self: mpm.Shape, arg0: str, arg1: str) -> None

set initial consolidation stress

  1. setConsolidation(self: mpm.Shape, arg0: float, arg1: float) -> None

set initial consolidation stress

setDamping(self: mpm.Shape, arg0: float, arg1: float, arg2: float) None
setInitTemperature(self: mpm.Shape, arg0: float) None
setMatProperty(*args, **kwargs)

Overloaded function.

  1. setMatProperty(self: mpm.Shape, arg0: int, arg1: int, arg2: int) -> None

  2. setMatProperty(self: mpm.Shape, arg0: int, arg1: int, arg2: int, arg3: int) -> None

setMethod(self: mpm.Shape, arg0: int, arg1: bool) None

set interpolation method

setThermalBc(self: mpm.Shape, arg0: float) None

set the prescribed temperature on Dirichlet BC for thermal field.

setTracBc(*args, **kwargs)

Overloaded function.

  1. setTracBc(self: mpm.Shape, arg0: int, arg1: int, arg2: float) -> None

  2. setTracBc(self: mpm.Shape, arg0: int, arg1: int, arg2: str) -> None

setUserContactNormal(self: mpm.Shape, arg0: float, arg1: float) None

set user defined contact normal

unsetThermalBc(self: mpm.Shape) None
class mpm.ShapeType

Shape type

Members:

NONEBC : No boundary conditions will be applied to the shape.

NDSHAPE : Boundary conditions will be applied to the normal direction of the shape surface.

MPTLOADSHAPE : Load will be applied to the material points of the shape.

MPTTRACSHAPE : Traction will be applied to the material points of the shape.

RIGIDSHAPE : The shape will be a rigid body such that no deformation will be considered.

GRAVITYSHAPE : Gravity will be applied to the shape.

DEMSHAPE : The shape will be served as a discrete element body.

MPTVELSHAPE : Velecity will be applied to the shape.

NDHEATSHAPE : Thermal conditions will be applied on the normal direction of the shape surface.

DEMSHAPE = ShapeType.DEMSHAPE
GRAVITYSHAPE = ShapeType.GRAVITYSHAPE
MPTLOADSHAPE = ShapeType.MPTLOADSHAPE
MPTTRACSHAPE = ShapeType.MPTTRACSHAPE
MPTVELSHAPE = ShapeType.MPTVELSHAPE
NDHEATSHAPE = ShapeType.NDHEATSHAPE
NDSHAPE = ShapeType.NDSHAPE
NONEBC = ShapeType.NONEBC
RIGIDSHAPE = ShapeType.RIGIDSHAPE
__init__(self: mpm.ShapeType, arg0: int) None
property name
class mpm.Sphere

基类:Shape

Sphere shape

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: mpm.Sphere) -> None

  2. __init__(self: mpm.Sphere, arg0: float, arg1: float, arg2: float, arg3: int) -> None

printInfo(self: mpm.Sphere) None
class mpm.SplitRigidMpts

基类:MptsBase

The material points that can be split.

__init__(*args, **kwargs)
getGeomId(self: mpm.SplitRigidMpts) int
printInfo(self: mpm.SplitRigidMpts) None
class mpm.TreeElement

基类:Element

The element of the tree-structured background grid.

__init__(self: mpm.TreeElement) None
printInfo(self: mpm.TreeElement) None

print information of base element class

class mpm.TreeGrid

基类:Grid

The background grid in a tree structure.

__init__(self: mpm.TreeGrid) None
clearLevelConfig(self: mpm.TreeGrid) None

clear the mesh configuration

generate(self: mpm.TreeGrid, arg0: int) None

generate initialize mesh

getNumEle(self: mpm.TreeGrid) tuple

get the number of elements along x and y directions

getSpace(self: mpm.TreeGrid) tuple

get the space of the grid

getXrange(self: mpm.TreeGrid) tuple

get xrange

getYrange(self: mpm.TreeGrid) tuple

get yrange

printElements(self: mpm.TreeGrid) None

print element information for debug

printInfo(self: mpm.TreeGrid) None

print information for debug

printNodes(self: mpm.TreeGrid) None

print nfnode information for debug

runLevelSet(self: mpm.TreeGrid) None

activate the cached mesh refinement configuration

runRefinement(self: mpm.TreeGrid) None

run the mesh refinement

setContactDisratio(self: mpm.TreeGrid, arg0: int, arg1: float) None

set the contact detection ratio

setFriction(self: mpm.TreeGrid, arg0: float) None

set the frictoin sliding coefficient

setLevel(*args, **kwargs)

Overloaded function.

  1. setLevel(self: mpm.TreeGrid, arg0: int, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float, arg6: float, arg7: float, arg8: float) -> None

set refine level

  1. setLevel(self: mpm.TreeGrid, arg0: int, arg1: float, arg2: float, arg3: float, arg4: float) -> None

set refine level

  1. setLevel(self: mpm.TreeGrid, arg0: int, arg1: float, arg2: float, arg3: float) -> None

set refine level

  1. setLevel(self: mpm.TreeGrid, arg0: int, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float, arg6: float) -> None

set refine level

setNumEle(self: mpm.TreeGrid, arg0: int, arg1: int) None

element dimensions in x and y direction

setRange(self: mpm.TreeGrid, arg0: float, arg1: float, arg2: float, arg3: float) None

grid xmin, xmax, ymin, ymax

class mpm.TreeNode

基类:Node

The node for the tree-structured background grid.

__init__(self: mpm.TreeNode) None
getId(self: mpm.TreeNode) int

get the node index

getParNum(self: mpm.TreeNode) int

get particle number associated with this node

getSignSize(self: mpm.TreeNode, arg0: int) float

get the signed size of node

getTemperature(self: mpm.TreeNode) float

get the temperature at the node

property pos

get the nodal position

printInfo(self: mpm.TreeNode) None

print info of a node

printMatfInfo(self: mpm.TreeNode, arg0: int) None

print Material field information.

class mpm.postProcess

For post-processing.

__init__(self: mpm.postProcess) None
extractdemshape(self: mpm.postProcess, arg0: str) None

extract data from dem shapes with a given file

extractdisrigid(self: mpm.postProcess, arg0: str) None

extract data from rigid material points with a given file

extractpts(self: mpm.postProcess, arg0: str) None

extract data from material points with a given file

extractptsPos(self: mpm.postProcess, arg0: str) List[float]

extract particle positions from material points with a given file

property outputDir

the output directory for processed data

property sourceDir

the source directory for the input data