11.3. 模块 godem

11.3.1. 类预览

BONDCONTACTSTATE

Bonded contact state.

Godem

The GPU-based DEM solver, GPU-Object-Oriented Discret Element Modeling (GoDEM).

RVETYPEBIT

RVE type regarding particle shape.

11.3.2. API函数

class pygodem.BONDCONTACTSTATE

Bonded contact state.

Members:

NOBOND : No bonds

ELASTICBOND : Elastic bonds

PLASTICBOND : Plastic bonds

ELASTICBOND = BONDCONTACTSTATE.ELASTICBOND
NOBOND = BONDCONTACTSTATE.NOBOND
PLASTICBOND = BONDCONTACTSTATE.PLASTICBOND
__init__(self: pygodem.BONDCONTACTSTATE, arg0: int) None
property name
class pygodem.Godem

The GPU-based DEM solver, GPU-Object-Oriented Discret Element Modeling (GoDEM).

CellVerts(self: pygodem.Godem) tuple

get cell vertexes of the simcell

ParRadii(self: pygodem.Godem) List[float]
PtsPos(self: pygodem.Godem) List[float]
RunPthread(self: pygodem.Godem, arg0: int) None

running the host CPU thread in another thread

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pygodem.Godem, arg0: int) -> None

  2. __init__(self: pygodem.Godem, arg0: int, arg1: int) -> None

property bondNormalStrength

normal bond strength at contact [Pa]

property bondShearStrength

tangential bond strength at contact [Pa]

consolSetting(self: pygodem.Godem, arg0: float, arg1: float, arg2: float) None

confining stress setting for consolidation

consolWithPos(self: pygodem.Godem, arg0: str, arg1: int, arg2: int, arg3: float) None

consolidate a sample with initial position data

property damping

damping coefficient [0.3]

deadSetting(self: pygodem.Godem) None

deactivate the peribiaxial engine

property dt

time step [1e-5]

dumpParPos(self: pygodem.Godem, arg0: int, arg1: str) None

dump particle positions into VTK files an RVE by specifying its id.

generatePacking(self: pygodem.Godem, arg0: pySudoMath.Vector2f, arg1: pySudoMath.Vector2f, arg2: int) List[pySudoMath.Vector3f]

generate a packing within a box para: const Vector2r& boxsize, const Vector2r radius_range, int particleNum return: a list of pos_radius

generatePackingOttawa(self: pygodem.Godem, arg0: pySudoMath.Vector2f, arg1: int) List[pySudoMath.Vector3f]

generate a packing within a box Ottawa PSD para: const Vector2r& boxsize, int particleNum return: a list of pos_radius

generateRVEs(*args, **kwargs)

Overloaded function.

  1. generateRVEs(self: pygodem.Godem, arg0: List[pySudoMath.Vector3f], arg1: pySudoMath.Vector2f) -> None

generate RVEs

  1. generateRVEs(self: pygodem.Godem, arg0: List[pySudoMath.Vector3f], arg1: pySudoMath.Vector2f, arg2: List[pySudoMath.Vector3f]) -> None

generate RVEs

generateSphereCapPacking(self: pygodem.Godem, arg0: pySudoMath.Vector2f, arg1: pySudoMath.Vector2f, arg2: int) List[float]

generate a packing within a box for spherecap shape para: boxsize, radius range, int particleNum return: spherecap shape states

generateSpherecapRVEs(*args, **kwargs)

Overloaded function.

  1. generateSpherecapRVEs(self: pygodem.Godem, arg0: List[float], arg1: pySudoMath.Vector2f) -> None

generate sphere cap rves

  1. generateSpherecapRVEs(self: pygodem.Godem, arg0: List[pySudoMath.Vector3f], arg1: pySudoMath.Vector2f, arg2: List[pySudoMath.Vector3f], arg3: List[pySudoMath.Vector3f]) -> None

generate sphere cap rves

getBondNumberDebug(self: pygodem.Godem, arg0: int) int

get bond number of an RVE with an id for debug only. Caution: this function is not applicable to bonds with zero strength.

getInertiaStressDebug(self: pygodem.Godem, arg0: int) tuple

get inertial stress of an RVE with an id for debug only

getInertiaStressGPU(self: pygodem.Godem, arg0: int) tuple

get inertial stress of an RVE with an id via a GPU kernel

getRVEContactNum(self: pygodem.Godem, arg0: int) int

get RVE contact num

getRVEContactNumPair(self: pygodem.Godem, arg0: int, arg1: int) list

get RVE pair at given contact id

getRVEContactNumPre(self: pygodem.Godem, arg0: int) int

get RVE previous contact num

getRVEnum(self: pygodem.Godem) int

get the total amount of RVEs in the godem.

getRveVoidRatio(self: pygodem.Godem, arg0: int) float
getStrainTensor(self: pygodem.Godem, arg0: int) tuple

get strain of an RVE with an id for debug only

getStressTensor(self: pygodem.Godem, arg0: int) tuple

get stress of an RVE with an id for debug only

getThermalTensorDebug(self: pygodem.Godem, arg0: int) tuple

get thermal conductivity tensor (without deviding by resistance) of an RVE with an id for debug only

isRunning(self: pygodem.Godem) bool

check if the simulation is running

iter(self: pygodem.Godem) int

get the current time step

property kn

normal contact stiffness [1e6]

property ks

tangential contact stiffness [1e6]

load(self: pygodem.Godem, arg0: str) None

loading RVEs from a saved state

loadSingleRVE(self: pygodem.Godem, arg0: int, arg1: str) None

load rve i from a state file.

property mu

coefficient of friction [0.5]

property plasticiter

bond plastic iteration steps

property plasticphi

bond plastic friction angle (rad)

property plasticpsi

bond plastic dilation angle (rad)

property plasticresdn

bond plastic residual plastic normal distance

property plasticresdt

bond plastic residual plastic shear distance

prefetchData(self: pygodem.Godem) None

prefetch all RVE data to GPU

printCellList(self: pygodem.Godem, arg0: int, arg1: int) None

print the cell list info of a particle within RVE cid, debug only

printParInfo(self: pygodem.Godem, arg0: int) None

print the particle info with id

printSimcellInfo(self: pygodem.Godem, arg0: int) None

print the simcell info with id, debug only

printStressTensors(self: pygodem.Godem) None

print stress tensor

property rho

material density [2650.0]

run(self: pygodem.Godem, arg0: int) None

Run the simulation with n steps

save(*args, **kwargs)

Overloaded function.

  1. save(self: pygodem.Godem, arg0: str) -> None

save the simulation state

  1. save(self: pygodem.Godem, arg0: int, arg1: str) -> None

save the simulation state of an rve i

saveGeometry(self: pygodem.Godem, arg0: int) list

output the position and radius information from rve

saveVTK(*args, **kwargs)

Overloaded function.

  1. saveVTK(self: pygodem.Godem, arg0: str) -> None

save the simulation state VTK

  1. saveVTK(self: pygodem.Godem, arg0: str, arg1: int) -> None

save the simulation state VTK

setBondContacts(self: pygodem.Godem) bool

set bonds for all contacts

setVelAng(self: pygodem.Godem, arg0: int, arg1: float, arg2: float, arg3: float) None

set tanslational and angular velocities by a specified pid followed by values.

setVelGrad(self: pygodem.Godem, arg0: List[float]) None

set velocity gradient

shearSetting(self: pygodem.Godem, arg0: int, arg1: float, arg2: float, arg3: float, arg4: float) None

setting parameters for shearing

shearTest(self: pygodem.Godem, arg0: int, arg1: int, arg2: int, arg3: int, arg4: bool) None

shear test

property simType

simulation types with different kernels: 1 for normal, 2 for bond contact.

snapshot(*args, **kwargs)

Overloaded function.

  1. snapshot(self: pygodem.Godem, arg0: int, arg1: str) -> None

snapshot an RVE by specifying its id.

  1. snapshot(self: pygodem.Godem, arg0: int, arg1: str, arg2: bool) -> None

snapshot an RVE by specifying its id.

property threadsPerBlock

threads per block, need to be consistent with that used in radixsort

updateAttrs(self: pygodem.Godem) None

update the attributes

property z_dim

dimension size in the z axis for 2D [0.075]

class pygodem.RVETYPEBIT

RVE type regarding particle shape.

Members:

SPHERERVE : Sphere particle

SPHERECAPRVE : Spherecap particle

HYPOSPHERERVE : Hyposphere particle

HYPOSPHERERVE = RVETYPEBIT.HYPOSPHERERVE
SPHERECAPRVE = RVETYPEBIT.SPHERECAPRVE
SPHERERVE = RVETYPEBIT.SPHERERVE
__init__(self: pygodem.RVETYPEBIT, arg0: int) None
property name