itasca.zonearray

Array interface for FLAC3D zones.

Functions

itasca.zonearray.extra(slot: int) array float{zone} or float{zone,3}.

Get the zone extra data in the given slot as an array. Extra variables accessed by array must be of type float or vec.

itasca.zonearray.faces() array int{nzone,6,4} in 3D and array int{nzone,4,2} in 2D.

Return an array containing the gridpoint indices of each face of each zone. Indices of -1 indicate a non-existant face. The indicies are relative to the ordering of the itasca.gridpointarray return values.

itasca.zonearray.fill_pos(data: array float{zone, 3}) None.

Fill an existing array with the zone centroid location. The array must be the correct shape.

itasca.zonearray.flow() array double{nzone,3} and array double{nzone,2} in 2D.

Return an array of the zone specific discharge vectors.

itasca.zonearray.fluid_prop(prop_name: str) array double{nzone}.

Return an array of the fluid property prop_name.

itasca.zonearray.gridpoints() array int{nzone,8} in 3D and array int{nzone,4} in 2D.

Return an array containing the gridpoint indices of each zone. Indices of -1 indicate a non-existant gridpoint. The indices are relative to the ordering of the itasca.gridpointarray return values.

itasca.zonearray.ids() array int{zone}.

Get the zone ids as an array.

itasca.zonearray.in_group(group_name: str, slot='default') array bool{nzone}.

Return zone group membership as a Boolean array.

itasca.zonearray.live_mechanical() array bool{nzone}.

Return an array of True/False values, True values correspond to zones which have an active mechanical model.

itasca.zonearray.neighbors() array int{nzone,6} in 3D and array int{nzone,4} in 2D.

Return an array containing the indices of the zone adjacent to each zone. Indices of -1 indicate non-existant neighbor zone. The indicies are relative to the ordering of the itasca.zonearray return values.

itasca.zonearray.overlay_stresses() array double{nzone,2,5,6} in 3D and array double{nzone,2,2,6} in 2D.

Get a multidimensional numpy array of the zone overlay stresses. Non-existant tets have a stress of zero. The return value is a 4 dimentional array with sub-arrays: zone, overlay, tet (3D) or triangle (2D), stress tensor components. The tensor component ordering is xx,yy,zz,xy,yz,xz.

itasca.zonearray.pos() array float{zone,3}.

Get a numpy array of the zone centroid location.

itasca.zonearray.prop_scalar(prop_name: str, fill_value=0.0) array double{nzone}.

Return an array of the property prop_name for each zone. Only properties of type double are supported by this function. If a property is not specified in a zone, fill_value is given for that zone. fill_value is an optional argument and defaults to zero.

itasca.zonearray.set_extra(slot: int, data: array float{zone} or float{zone, 3}) None.

Set the zone extra data in the given slot with an array. Extra variables set by array must be of type float or vec.

itasca.zonearray.set_fluid_prop(prop_name: str, data: array double{nzone}) None.

Set the fluid property prop_name with values from an array.

itasca.zonearray.set_group(membership: array bool{nzone}, group_name: str, slot="default") None.

Set zone group from an array. Where membership True set the corresponding zone to be a member of group group_name in the given slot.

itasca.zonearray.set_prop_scalar(prop_name: str, array) None.

Set the property prop_name of each zone. Only properties of type double or vec3 are supported. The input array should be shape (nzone,).

itasca.zonearray.set_stress(array double{nzone, 3, 3}) None.

Set the zone stresses.

itasca.zonearray.set_stress_flat(array double{nzone, 6}) None.

Set the zone stresses. Component ordering in the array should xx,yy,zz,xy,yz,xz.

itasca.zonearray.state(average: bool) array int{nzones}.

Get the current plasticity state indicators of all zones. The argument average, if true, indicates that the state indicator will be set if 50% or more of the volume averaged tetra/triangles have that indicator. If false then the state indicator will be set if any tetra/triangles in the zone have that indicator. For more information, see \(zone.state\) FISH function.

itasca.zonearray.strain() array double{nzone,3,3}.

Get an array containing the zone strain-increment tensor.

itasca.zonearray.strain_flat() array double{nzone,6}.

Get an array containing the zone strain-increment tensor. The return value is a 2D array where the component ordering is xx,yy,zz,xy,yz,xz.

itasca.zonearray.stress() array double{nzone,3,3}.

Get an array of the zone stresses.

itasca.zonearray.stress_flat() array double{nzone,6}.

Get an array of the zone stresses. The return value is a 2D array where the component ordering is xx,yy,zz,xy,yz,xz.

itasca.zonearray.stress_max() array double{nzone}.

Return an array of the maximum (most positive) principal value of the volume averaged tetra/triangle stress for each zone. Note that compressive stresses are negative in FLAC3D/FLAC2D.

itasca.zonearray.stress_min() array double{nzone}.

Return an array of the minimum (most negative) principal value of the volume averaged tetra/triangle stress for each zone. Note that compressive stresses are negative in FLAC3D/FLAC2D.

itasca.zonearray.temperature() array double{nzone}.

Return an array of the zone tempertures.

itasca.zonearray.volume() array double{nzone}.

Return an array of the undeformed zone volumes (in 3D) or areas (in 2D).

itasca.zonearray.volume_deformed() array double{nzone}.

Return an array of the deformed zone volumes (in 3D) or areas (in 2D).