ansys.dyna.core.pre.dynabase#

Module for creating a DYNA input deck.

Classes#

Motion

Generic enumeration.

RWMotion

Generic enumeration.

DOF

Generic enumeration.

Switch

Generic enumeration.

InvariantNode

Generic enumeration.

EnergyFlag

Generic enumeration.

HourglassControl

Generic enumeration.

BulkViscosity

Generic enumeration.

CaseType

Generic enumeration.

OutputEcho

Generic enumeration.

Box

Defines a box-shaped volume.

Curve

Defines a curve as a function of time.

Function

Defines a function that can be referenced by a limited number of keyword options.

Table2D

Define a table,a curve ID is specified for each value defined in the table.

Point

Defines a point.

Direction

Defines a direction.

Transform

Defines a transformation.

Velocity

Defines a translational velocity.

RotVelocity

Defines a rotational velocity.

BaseObj

Define the base object.

ParameterType

Contains the parameter types.

DynaBase

Contains methods for creating a general LS-DYNA keyword.

BaseSet

Defines the base class for all set classes.

NodeSet

Defines a nodal set with some identical or unique attributes.

SetType

Contains the enums for setting types.

NodesetGeneral

Includes nodal points of element sets.

NodeSetBox

include the nodes inside boxes.

PartSet

Defines a set of parts with optional attributes.

SegmentSet

Defines a set of segments with optional identical or unique attributes.

BeamFormulation

Generic enumeration.

ShellFormulation

Generic enumeration.

IGAFormulation

Generic enumeration.

SolidFormulation

Generic enumeration.

HourglassType

Generic enumeration.

BeamSection

Defines cross-sectional properties for beams, trusses, discrete beams, and cable elements.

ShellSection

Defines section properties for shell elements.

IGASection

Defines section properties for isogeometric shell elements.

Part

Defines the part object.

BeamPart

Defines a beam part.

ShellPart

Defines a shell part.

IGAPart

Defines an isogeometric shell part.

SolidPart

Defines a solid part.

DRO

Generic enumeration.

DiscretePart

Defines a discrete part.

Parts

Stores the part list.

AnalysisType

Generic enumeration.

TimestepCtrol

Generic enumeration.

Integration

Generic enumeration.

ImplicitAnalysis

Activates implicit analysis and defines associated control parameters.

ThermalAnalysisType

Generic enumeration.

ThermalAnalysisTimestep

Generic enumeration.

ThermalAnalysis

Activates thermal analysis and defines associated control parameters.

ContactCategory

Generic enumeration.

ContactType

Generic enumeration.

OffsetType

Generic enumeration.

ContactFormulation

Generic enumeration.

SBOPT

Generic enumeration.

ContactSurface

Defines a contact interface.

Contact

Provide a way of treating interaction between disjoint parts.

ContactGroup

Create a contact group.

Constraint

Provides a way of constraining degrees of freedom to move together in some way.

BoundaryCondition

Provides a way of defining imposed motions on boundary nodes.

InitialCondition

Provides a way of initializing velocities and detonation points.

RigidwallCylinder

Defines a rigid wall with a cylinder form.

RigidwallSphere

Defines a rigid wall with a sphere form.

RigidwallPlanar

Defines planar rigid walls with either finite or infinite size.

GravityOption

Generic enumeration.

Gravity

Defines body force loads using global axes directions.

Module Contents#

class ansys.dyna.core.pre.dynabase.Motion[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

VELOCITY = 0[source]#
ACCELERATION = 1[source]#
DISPLACEMENT = 2[source]#
class ansys.dyna.core.pre.dynabase.RWMotion[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

VELOCITY = 0[source]#
DISPLACEMENT = 1[source]#
class ansys.dyna.core.pre.dynabase.DOF[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

X_TRANSLATIONAL = 1[source]#
Y_TRANSLATIONAL = 2[source]#
Z_TRANSLATIONAL = 3[source]#
X_ROTATIONAL = 5[source]#
Y_ROTATIONAL = 6[source]#
Z_ROTATIONAL = 7[source]#
class ansys.dyna.core.pre.dynabase.Switch[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

OFF = 0[source]#
ON = 1[source]#
class ansys.dyna.core.pre.dynabase.InvariantNode[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

OFF = 1[source]#
ON_FOR_SHELL_TSHELL = 2[source]#
ON_FOR_SOLID = 3[source]#
ON_FOR_SHELL_TSHELL_SOLID = 4[source]#
class ansys.dyna.core.pre.dynabase.EnergyFlag[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

NOT_COMPUTED = 1[source]#
COMPUTED = 2[source]#
class ansys.dyna.core.pre.dynabase.HourglassControl[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

STANDARD_VISCOSITY_FORM = 1[source]#
FLANAGAN_BELYTSCHKO_INTEGRATION_SOLID = 2[source]#
class ansys.dyna.core.pre.dynabase.BulkViscosity[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

STANDARD_BULK_VISCOSITY = 1[source]#
RICHARDS_WILKINS_BULK_VISCOSITY = 2[source]#
COMPUTE_INTERNAL_ENERGY_DISSIPATED[source]#
class ansys.dyna.core.pre.dynabase.CaseType[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

STRUCTURE = 1[source]#
ICFD = 2[source]#
SALE = 3[source]#
EM = 4[source]#
IGA = 5[source]#
class ansys.dyna.core.pre.dynabase.OutputEcho[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

ALL_DATA_PRINTED = 0[source]#
SUPPRESSED_NODAL_PRINTING = 1[source]#
SUPPRESSED_ELEMENT_PRINTING = 2[source]#
SUPPRESSED_NODAL_AND_ELEMENT_PRINTING = 3[source]#
class ansys.dyna.core.pre.dynabase.Box(xmin=0, xmax=0, ymin=0, ymax=0, zmin=0, zmax=0)[source]#

Defines a box-shaped volume.

xmin[source]#
xmax[source]#
ymin[source]#
ymax[source]#
zmin[source]#
zmax[source]#
create(stub)[source]#

Create box.

class ansys.dyna.core.pre.dynabase.Curve(sfo=1, x=[], y=[], func=None, title='')[source]#

Defines a curve as a function of time.

For example, load (ordinate value).

sfo[source]#
abscissa[source]#
ordinate[source]#
func[source]#
title[source]#
create(stub=None)[source]#

Create a curve.

class ansys.dyna.core.pre.dynabase.Function(Function=None)[source]#

Defines a function that can be referenced by a limited number of keyword options.

function[source]#
tabulated = False[source]#
set_tabulated(heading='', function='', x=[], y=[])[source]#
create(stub)[source]#

Create function.

class ansys.dyna.core.pre.dynabase.Table2D(title='')[source]#

Define a table,a curve ID is specified for each value defined in the table.

title[source]#
valuecurvelist = [][source]#
append(value=0, curve=None)[source]#
create(stub=None)[source]#

Create Table2D.

class ansys.dyna.core.pre.dynabase.Point(x=0, y=0, z=0)[source]#

Defines a point.

x[source]#
y[source]#
z[source]#
class ansys.dyna.core.pre.dynabase.Direction(x=0, y=0, z=0)[source]#

Defines a direction.

x[source]#
y[source]#
z[source]#
class ansys.dyna.core.pre.dynabase.Transform(option=None, param1=0, param2=0, param3=0, param4=0, param5=0, param6=0, param7=0)[source]#

Defines a transformation.

param[source]#
paramlist = [][source]#
add_transform(option=None, param1=0, param2=0, param3=0, param4=0, param5=0, param6=0, param7=0)[source]#

Defines a transformation matrix.

create(stub)[source]#

Create a transformation.

class ansys.dyna.core.pre.dynabase.Velocity(x=0, y=0, z=0)[source]#

Defines a translational velocity.

x[source]#
y[source]#
z[source]#
class ansys.dyna.core.pre.dynabase.RotVelocity(x=0, y=0, z=0)[source]#

Defines a rotational velocity.

x[source]#
y[source]#
z[source]#
class ansys.dyna.core.pre.dynabase.BaseObj[source]#

Define the base object.

type = ''[source]#
subtype = ''[source]#
get_data() List[source]#

Get the data of the object.

class ansys.dyna.core.pre.dynabase.ParameterType[source]#

Bases: enum.Enum

Contains the parameter types.

R = 1[source]#
I = 2[source]#
C = 3[source]#
class ansys.dyna.core.pre.dynabase.DynaBase[source]#

Contains methods for creating a general LS-DYNA keyword.

stub[source]#
mainname = ''[source]#
implicitanalysis[source]#
parts[source]#
boundaryconditions[source]#
initialconditions[source]#
constraints[source]#
contacts[source]#
entities = [][source]#
have_accuracy = False[source]#
have_energy = False[source]#
have_hourglass = False[source]#
have_bulk_viscosity = False[source]#
have_control_shell = False[source]#
init_velocity: List = None[source]#
bdy_spc: List = None[source]#
get_stub()[source]#

Get the stub of the DynaBase object.

set_parent(parent=None)[source]#
set_timestep(tssfac=0.9, isdo=0, timestep_size_for_mass_scaled=0.0, max_timestep=None)[source]#

Set the structural time step size control using different options.

Parameters:
tssfacfloat, optional

Scale factor for computed time step. The default is 0.9.

isdoint, optional

Basis of the time size calculation for four-node shell elements. The default is 0.

timestep_size_for_mass_scaledfloat, optional

Time step size for mass scaled solutions. The default is 0.0.

max_timestepCurve, optional

Load curve that limits the maximum time step size. The default is None.

Returns:
bool

True when successful, False when failed.

set_accuracy(objective_stress_updates=Switch.OFF, invariant_node_number=InvariantNode.OFF, partsetid_for_objective_stress_updates=0, implicit_accuracy_flag=Switch.OFF, explicit_accuracy_flag=Switch.OFF)[source]#

Define control parameters that can improve the accuracy of the calculation.

Parameters:
objective_stress_updatesint

Global flag for 2nd order objective stress updates.

invariant_node_numberint

Invariant node numbering for shell and solid elements.

partsetid_for_objective_stress_updatesint, optional

Part set ID for objective stress updates. The default is 0.

implicit_accuracy_flagint

Implicit accuracy flag.

explicit_accuracy_flagfloat

Explicit accuracy parameter.

  • EQ.0.0: Off

  • GT.0.0: On

Returns:
bool

True when successful, False when failed.

set_energy(hourglass_energy=EnergyFlag.NOT_COMPUTED, rigidwall_energy=EnergyFlag.COMPUTED, sliding_interface_energy=EnergyFlag.NOT_COMPUTED, rayleigh_energy=EnergyFlag.NOT_COMPUTED, initial_reference_geometry_energy=EnergyFlag.COMPUTED)[source]#

Provide controls for energy dissipation options.

Parameters:
hourglass_energyenum

Hourglass energy calculation option.

rigidwall_energyint

Rigidwall energy dissipation option.

  • EQ.1: Energy dissipation is not computed.

  • EQ.2: Energy dissipation is computed.

sliding_interface_energyint

Sliding interface energy dissipation option.

  • EQ.1: Energy dissipation is not computed.

  • EQ.2: Energy dissipation is computed.

rayleigh_energyint

Rayleigh energy dissipation option.

  • EQ.1: Energy dissipation is not computed.

  • EQ.2: Energy dissipation is computed.

initial_reference_geometry_energyint

Initial reference geometry energy option.

  • EQ.1: Initial reference geometry energy is not computed.

  • EQ.2: Initial reference geometry energy is computed.

Returns:
bool

True when successful, False when failed.

set_output(print_suppression_d3hsp=False, print_suppression_echo=OutputEcho.ALL_DATA_PRINTED)[source]#

Set miscellaneous output parameters.

Parameters:
print_suppression_d3hspbool, optional

Whether to suppress printing during the input phase flag for the D3HSP file. The default is True, which means that none of these are printed: nodal coordinates, element connectivities, rigid wall definitions, nodal SPCs, initial velocities, initial strains, adaptive constraints, and SPR2/SPR3 constraints. If False, no suppression occurs.

print_suppression_echoOutputEcho

Print suppression setting during the input phase flag for the echo file. Options are:

  • ALL_DATA_PRINTED: All data is printed.

  • SUPPRESSED_NODAL_PRINTING: Nodal printing is suppressed.

  • SUPPRESSED_ELEMENT_PRINTING: Element printing is suppressed.

  • SUPPRESSED_NODAL_AND_ELEMENT_PRINTING : Both nodal and element printing is suppressed.

set_hourglass(controltype=HourglassControl.STANDARD_VISCOSITY_FORM, coefficient=0.1)[source]#

Redefine the default values for the hourglass control type and coefficient.

Parameters:
controltypeenum

Default hourglass control type.

coefficientfloat, optional

Default hourglass coefficient. The default is 0..

Returns:
bool

True when successful, False when failed.

set_bulk_viscosity(quadratic_viscosity_coeff=1.5, linear_viscosity_coeff=0.06, bulk_viscosity_type=BulkViscosity.STANDARD_BULK_VISCOSITY)[source]#

Reset the default values of the bulk viscosity coefficients globally.

Parameters:
quadratic_viscosity_coefffloat, optional

Default quadratic viscosity coefficient. The default is 1.5.

linear_viscosity_coefffloat, optional

Default linear viscosity coefficient. The default is 0.06.

bulk_viscosity_typeenum

Default bulk viscosity type.

Returns:
bool

True when successful, False when failed.

set_init_temperature(temp=0)[source]#

Define initial nodal point temperatures on all nodes.

Parameters:
tempfloat, optional

Temperature at node. The default is 0.

Returns:
bool

True when successful, False when failed.

create_control_shell(wrpang=20, esort=0, irnxx=-1, istupd=0, theory=2, bwc=2, miter=1, proj=0, irquad=0)[source]#

Provide controls for computing shell response.

Parameters:
wrpangint, optional

Shell element warpage angle in degrees. The default is 20.

esortint

Sorting of triangular shell elements to automatically switch degenerate quadrilateral shell formulations to more suitable triangular shell formulations. The default is 0.

irnxxint, optional

Shell normal update option. The default is 1.

istupdint, optional

Shell thickness change option for deformable shells. The default is 0.

theoryint, optional

Default shell formulation. The default is 2.

bwcint, optional

Warping stiffness for Belytschko-Tsay shells. The default is 2.

miterint, optional

Plane stress plasticity option. The default is 1.

projint, optional

Projection method for the warping stiffness in the Belytschko-Tsay shell and the Belytschko-Wong-Chiang elements. The default is 0.

irquadint, optional

In-plane integration rule for the eight-node quadratic shell element. The default is 0.

  • EQ.2: 2*2 Gauss quadrature

  • EQ.3: 3*3 Gauss quadrature

Returns:
bool

True when successful, False when failed.

create_control_solid(esort=0, fmatrx=0, niptets=4, swlocl=1, psfail=0, t10jtol=0.0, icoh=0, tet13k=0)[source]#

Provide controls for a solid element response.

Parameters:
esortint, optional

Automatic sorting of tetrahedral and pentahedral elements to avoid use of degenerate formulations for these shapes. The default is 0.

  • EQ.0: No sorting

  • EQ.1: Sort

fmatrxint, optional

Method to use in the calculation of the deformation gradient matrix. The default is 1.

niptetsint, optional

Number of integration points used in the quadratic tetrahedron elements. The default is 4.

swloclint, optional

Output option for stresses in solid elements used as spot welds with material \*MAT_SPOTWELD. The default is 1.

psfailint, optional

Solid element erosion from negative volume is limited only to solid elements in the part set indicated by PSFAIL. The default is 0.

t10jtolfloat, optional

Tolerance for Jacobian in four-point, 10-noded quadratic tetrahedra. The default is 0.0.

icohint, optional

Breaking LS-DYNA convention ICOH is interpreted digit-wise. The default is 0.

tet13kint, optional

Flag for whether to invoke a consistent tangent stiffness matrix for the pressure averaged tetrahedron. The default is 0, in which case this matrix is not invoked. If this parameter is set to 1, this matrix is invoked.

Returns:
bool

True when successful, False when failed.

create_control_contact(rwpnal, shlthk=0, orien=1, ssthk=0, ignore=0, igactc=0)[source]#

Change defaults for computation with contact surfaces.

Parameters:
rwpnalfloat

Scale factor for rigid wall penalties, which treat nodal points interacting with rigid walls.

shlthkint, optional

Flag for whether to consider shell thickness offsets in non-automatic surface-to-surface and non-automatic nodes-to-surface type contacts. The default is 0, in which case these offsets are not considered. If this parameter is set to 1, these offsets are considered.

orienint, optional

Flag for whether to automatically reorient contact interface segments during initialization. The default is 1, in which case reorientation automatically occurs. If this parameter is set to 0, reorientation does not occur.

ssthkint, optional

Flag for whether to determine default contact thickness for shells in single surface contact types. The default is 0, in which case default contact thickness is not determined. If this parameter is set to 1, default contact thickness is determined.

ignoreint, optional

Flag for whether to ignore initial penetrations in the \*CONTACT_AUTOMATIC options. The default is 0, in which case initial penetrations are ignored. If this parameter is set to 1, initial penetrations are not ignored.

igactcint, optional

Flag for whether to use isogeometric shells for contact detection when the contact involves isogeometric shells. The default is 0, which means isogeometric shells are not used. If this parameter is set to 1, isogeometric shells are used.

Returns:
bool

True when successful, False when failed.

create_damping_global(lcid=0, valdmp=0.0)[source]#

Define mass-weighted nodal damping.

Mass-weighted nodal damping applies globally to the nodes of deformable bodies and to the mass center of rigid bodies.

Parameters:
lcidint, optional

Load curve ID, which specifies the system damping constant versus the time. The default is 0.

valdmpfloat, optional

System damping constant. The default is 0.0.

Returns:
bool

True when successful, False when failed.

get_solid_elements()[source]#

Get solid elements.

Returns:
list

list[0],solid element connectivity,list[0] = [[n1,n2,n3,n4,n5,n6,n7,n8],[…],…] list[1],node coordinates,list[1] = [[x1,y1,z1],[x2,y2,z2],…]

create_general_keyword(opcode, keyworddata)[source]#

Create general keyword.

Parameters:
opcodestr

Keyword card name.

keyworddatastr

Keyword data.

1.480E+01,0.000E+00,0.000E+00,0.000E+00,0.000E+00,0.000E+00”

create_general_keyword(opcode = opcode,keyworddata=keyworddata)

add(obj)[source]#

Add entities to an object.

set_transform(filename=None, idnoff=0, ideoff=0, idpoff=0, idmoff=0, idsoff=0, idfoff=0, transform=None)[source]#

Include independent input files containing model data, allow for node, element, and set IDs to be offset and for coordinates and constitutive parameters to be transformed and scaled.

Parameters:
filenamestr

Name of file to include in the keyword file.

idnoffint

Offset to node ID.

ideoffint

Offset to element ID.

idpoffint

Offset to part ID.

idmoffint

Offset to material ID.

idsoffint

Offset to set ID.

idfoffint

Offset to function ID, table ID, and curve ID.

transformTransform

Definition for the transformation.

save_file()[source]#

Save keyword files.

Returns:
bool

True when successful, False when failed.

class ansys.dyna.core.pre.dynabase.BaseSet[source]#

Defines the base class for all set classes.

type = 'PARTSET'[source]#
id = 0[source]#
class ansys.dyna.core.pre.dynabase.NodeSet(nodes=[])[source]#

Defines a nodal set with some identical or unique attributes.

nodes[source]#
type = 'NODESET'[source]#
create(stub)[source]#

Create a node set.

num()[source]#

Get the number of nodes in the node set.

id(pos)[source]#

Get the node ID by position.

get_nid()[source]#

Get the node ID.

class ansys.dyna.core.pre.dynabase.SetType[source]#

Bases: enum.Enum

Contains the enums for setting types.

SHELL = 'SET_SHELL'[source]#
SOLID = 'SET_SOLID'[source]#
BEAM = 'SET_BEAM'[source]#
TSHELL = 'SET_TSHELL'[source]#
DISCRETE = 'SET_DISCRETE'[source]#
class ansys.dyna.core.pre.dynabase.NodesetGeneral(settype=SetType.SHELL, setids=[])[source]#

Bases: BaseSet

Includes nodal points of element sets.

Element sets are defined by SET_XXXX_LIST, where XXXX can be SHELL, SOLID, BEAM, TSHELL or DISCRETE.

settype[source]#
setids[source]#
create(stub)[source]#

Create a node set.

class ansys.dyna.core.pre.dynabase.NodeSetBox(boxes=[])[source]#

Bases: BaseSet

include the nodes inside boxes.

Parameters:
boxeslist

A list of BOX.

boxes[source]#
type = 'NODESETBOX'[source]#
create(stub)[source]#

Create a node set.

class ansys.dyna.core.pre.dynabase.PartSet(parts=[])[source]#

Bases: BaseSet

Defines a set of parts with optional attributes.

parts[source]#
create(stub)[source]#

Create a part set.

num()[source]#

Get the number of parts in the part set.

pos(pos)[source]#

Get a part ID by position.

get_pid()[source]#

Get the part ID.

class ansys.dyna.core.pre.dynabase.SegmentSet(segments=[])[source]#

Bases: BaseSet

Defines a set of segments with optional identical or unique attributes.

Parameters:
segmentslist [[point1,point2,point3,point4],[point5,point6,point7,point8]…]

Define segments.

segments[source]#
type = 'SEGMENTSET'[source]#
create(stub)[source]#

Create a segment set.

class ansys.dyna.core.pre.dynabase.BeamFormulation[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

SPOTWELD = 9[source]#
class ansys.dyna.core.pre.dynabase.ShellFormulation[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

FULLY_INTEGRATED[source]#
BELYTSCHKO_TSAY = 2[source]#
SR_HUGHES_LIU = 6[source]#
FULLY_INTEGRATED_BELYTSCHKO_TSAY_MEMBRANE = 9[source]#
PLANE_STRESS = 12[source]#
class ansys.dyna.core.pre.dynabase.IGAFormulation[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

REISSNER_MINDLIN_FIBERS_AT_CONTROL_POINTS = 0[source]#
KIRCHHOFF_LOVE_FIBERS_AT_CONTROL_POINTS = 1[source]#
KIRCHHOFF_LOVE_FIBERS_AT_INTEGRATION_POINTS = 2[source]#
REISSNER_MINDLIN_FIBERS_AT_INTEGRATION_POINTS = 3[source]#
class ansys.dyna.core.pre.dynabase.SolidFormulation[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

EIGHT_POINT_ENHANCED_STRAIN_SOLID_ELEMENT[source]#
CONSTANT_STRESS_SOLID_ELEMENT = 1[source]#
EIGHT_POINT_HEXAHEDRON = 2[source]#
FULLY_INTEGRATED_QUADRATIC_EIGHT_NODE_ELEMENT = 3[source]#
ONE_POINT_COROTATIONAL = 0[source]#
IMPLICIT_9_POINT_ENHANCED_STRAIN = 18[source]#
class ansys.dyna.core.pre.dynabase.HourglassType[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

STANDARD_LSDYNA_VISCOUS = 1[source]#
FLANAGAN_BELYTSCHKO_VISOCOUS = 2[source]#
FLANAGAN_BELYTSCHKO_VISOCOUS_WITH_EXTRA_VOLUME_INTEGRATION = 3[source]#
FLANAGAN_BELYTSCHKO_STIFFNESS = 4[source]#
FLANAGAN_BELYTSCHKO_STIFFNESS_WITH_EXTRA_VOLUME_INTEGRATION = 5[source]#
BELYTSCHKO_BINDEMAN = 6[source]#
ACTIVATES_FULL_PROJECTION_WARPING_STIFFNESS = 8[source]#
class ansys.dyna.core.pre.dynabase.BeamSection(element_formulation, shear_factor=1, cross_section=0, thickness_n1=0, thickness_n2=0)[source]#

Defines cross-sectional properties for beams, trusses, discrete beams, and cable elements.

stub[source]#
ret[source]#
id[source]#
class ansys.dyna.core.pre.dynabase.ShellSection(element_formulation, shear_factor=1, integration_points=5, printout=0, thickness1=0, thickness2=0, thickness3=0, thickness4=0)[source]#

Defines section properties for shell elements.

stub[source]#
ret[source]#
id[source]#
class ansys.dyna.core.pre.dynabase.IGASection(element_formulation, shear_factor=1, thickness=1)[source]#

Defines section properties for isogeometric shell elements.

stub[source]#
ret[source]#
id[source]#
class ansys.dyna.core.pre.dynabase.Part(id)[source]#

Defines the part object.

stub[source]#
type = ''[source]#
id[source]#
secid = 0[source]#
mid = 0[source]#
eosid = 0[source]#
hgid = 0[source]#
grav = 0[source]#
adpopt = 0[source]#
tmid = 0[source]#
formulation = 0[source]#
stiffness_damping = 0[source]#
rigidbody_initial_velocity = False[source]#
translation[source]#
rotation[source]#
extra_nodes_defined = False[source]#
set_material(mat, mat_thermal=None)[source]#

Set the material.

set_element_formulation(formulation)[source]#

Set the element formulation.

set_stiffness_damping_coefficient(coefficient)[source]#

Set the stiffness damping coefficient.

set_extra_nodes(nodeset)[source]#

Set extra nodes for the rigid body.

Parameters:
nodesetNodeSet

Extra nodes list.

set_rigidbody_initial_velocity(translation=Velocity(0, 0, 0), rotation=RotVelocity(0, 0, 0))[source]#

Set initial translational and rotational velocities for the rigid body.

Initial translational and rotational velocities are set at the center of gravity for a rigid body or a nodal rigid body.

set_property()[source]#

Set properties for the part.

class ansys.dyna.core.pre.dynabase.BeamPart(pid)[source]#

Bases: Part

Defines a beam part.

A beam part definition consists of the combined material information, section properties, hourglass type, thermal properties, and a flag for part adaptivity.

stub[source]#
type = 'BEAM'[source]#
crosstype = 1[source]#
set_cross_type(cross)[source]#

Set the type for the cross section.

set_diameter(diameter)[source]#

Set the outer diameter for the cross section.

set_property()[source]#

Set properties for the beam part.

class ansys.dyna.core.pre.dynabase.ShellPart(pid)[source]#

Bases: Part

Defines a shell part.

A shell part definition consists of the combined material information, section properties, hourglass type, thermal properties, and a flag for part adaptivity.

stub[source]#
type = 'SHELL'[source]#
shear_factor = 1[source]#
intpoints = 5[source]#
print = 0[source]#
thickness = 1[source]#
hourglasstype[source]#
defined_des_surface = False[source]#
despid = 0[source]#
desxid = 0[source]#
des_nquad = 1[source]#
des_nsid = 0[source]#
des_rsf = 1[source]#
set_hourglass(type=HourglassType.STANDARD_LSDYNA_VISCOUS, coefficient=0.1)[source]#

Set the hourglass type, which identifies the bulk viscosity.

Parameters:
typeenum

Default hourglass control type.

coefficientfloat, optional

Default hourglass coefficient. The default is 0..

set_shear_factor(factor)[source]#

Set the shear correction factor, which scales the transverse shear stress.

set_integration_points(points=5)[source]#

Set the number of through thickness integration points.

set_printout(print)[source]#

Set the printout option.

set_thickness(thickness)[source]#

Set the shell thickness.

set_des_surface(despid=0, desxid=0, nquad=1, nsid=0, rsf=-1)[source]#

Generate and place discrete element sphere (DES) elements on the surface of shell elements.

Parameters:
despidint, optional

Part ID for the generated DES elements. The default is 0.

desxidint, optional

Section ID for the generated DES elements. The default is 0.

nquadint, optional

Number of equally spaced DES elements to create on a shell element in each local shell direction. The default is 1.

nsidint, optional

If defined, this card creates a node set with ID NSID for the nodes generated by this card. The default is 0.

rsffloat, optional

Scale factor for determining the DES radius. The default is 1.

set_property()[source]#

Set properties for the shell part.

class ansys.dyna.core.pre.dynabase.IGAPart(pid)[source]#

Bases: Part

Defines an isogeometric shell part.

The part definition consists of the combined material information, section properties, hourglass type, thermal properties, and a flag for part adaptivity.

stub[source]#
type = 'IGA'[source]#
shear_factor = 1[source]#
thickness = 1[source]#
set_shear_factor(factor)[source]#

Set the shear correction factor, which scales the transverse shear stress.

set_thickness(thickness)[source]#

Set the shell thickness.

set_property()[source]#

Set properties for the IGA part.

class ansys.dyna.core.pre.dynabase.SolidPart(pid)[source]#

Bases: Part

Defines a solid part.

The part definition consists of the combined material information, section properties, hourglass type, thermal properties, and a flag for part adaptivity.

stub[source]#
type = 'SOLID'[source]#
hourglasstype[source]#
set_hourglass(type=HourglassType.STANDARD_LSDYNA_VISCOUS, coefficient=0.1)[source]#

Set the hourglass type, which identifies the bulk viscosity.

Parameters:
typeenum

Default hourglass control type.

coefficientfloat, optional

Default hourglass coefficient. The default is 0..

set_property()[source]#

Set the properties for the solid part.

class ansys.dyna.core.pre.dynabase.DRO[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

DESCRIBES_TRANSLATIONAL_SPRING = 0[source]#
DESCRIBES_TORSIONAL_SPRING = 1[source]#
class ansys.dyna.core.pre.dynabase.DiscretePart(pid)[source]#

Bases: Part

Defines a discrete part.

The part definition consists of the combined material information, section properties, hourglass type, thermal properties, and a flag for part adaptivity.

type = 'DISCRETE'[source]#
stub[source]#
displacement_option = 0[source]#
set_displacement_option(displacement_option=DRO.DESCRIBES_TRANSLATIONAL_SPRING)[source]#

Set the displacement, which defines the rotation.

set_property()[source]#

Set properties for the discrete part.

class ansys.dyna.core.pre.dynabase.Parts[source]#

Stores the part list.

beamlist = [][source]#
shelllist = [][source]#
solidlist = [][source]#
igalist = [][source]#
icfdlist = [][source]#
icfdvolumelist = [][source]#
discretelist = [][source]#
isphstructlist = [][source]#
isphfluidlist = [][source]#
add(part)[source]#

Add a part to the part list.

get_num_shellpart()[source]#

Get the number of shell parts.

set_property()[source]#

Set properties for added parts.

class ansys.dyna.core.pre.dynabase.AnalysisType[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

EXPLICIT = 0[source]#
IMPLICIT = 1[source]#
EXPLICIT_FOLLOWED_BY_IMPLICIT = 2[source]#
class ansys.dyna.core.pre.dynabase.TimestepCtrol[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

CONSTANT_TIMESTEP_SIZE = 0[source]#
AUTOMATICALLY_ADJUST_TIMESTEP_SIZE = 1[source]#
class ansys.dyna.core.pre.dynabase.Integration[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

NEWMARK_TIME_INTEGRATION = 1[source]#
MODAL_SUPERPOSITION_FOLLOWING_EIGENVALUE = 2[source]#
class ansys.dyna.core.pre.dynabase.ImplicitAnalysis(analysis_type=AnalysisType.IMPLICIT, initial_timestep_size=0)[source]#

Activates implicit analysis and defines associated control parameters.

defined = False[source]#
defined_auto = False[source]#
defined_dynamic = False[source]#
defined_eigenvalue = False[source]#
defined_solution = False[source]#
defined_mass_matrix = False[source]#
imflag[source]#
dt0[source]#
stub[source]#
set_initial_timestep_size(size=0)[source]#

Define the initial time step size.

set_timestep(control_flag=TimestepCtrol.CONSTANT_TIMESTEP_SIZE, Optimum_equilibrium_iteration_count=11)[source]#

Define parameters for automatic time step control during implicit analysis.

Parameters:
control_flagint

Automatic time step control flag.

Optimum_equilibrium_iteration_countint, optional

Optimum equilibrium iteration count per time step. The default is 11.

Returns:
bool

True when successful, False when failed.

set_dynamic(integration_method=Integration.NEWMARK_TIME_INTEGRATION, gamma=0.5, beta=0.25)[source]#

Activate implicit dynamic analysis and define time integration constants.

Parameters:
integration_methodenum

Implicit analysis type.

gammafloat, optional

Newmark time integration constant. The default is 0.5.

betafloat, optional

Newmark time integration constant. The default is 0.25.

Returns:
bool

True when successful, False when failed.

set_eigenvalue(number_eigenvalues=0, shift_scale=0)[source]#

Activate implicit eigenvalue analysis and define associated input parameters.

Parameters:
number_eigenvaluesint, optional

Number of eigenvalues to extract. The default is 0.

shift_scalefloat, optional

Shift scale. The default is 0.

Returns:
bool

True when successful, False when failed.

set_solution(solution_method=12, iteration_limit=11, stiffness_reformation_limit=55, absolute_convergence_tolerance=1e-10)[source]#

Specify whether a linear or nonlinear solution is desired.

Parameters:
solution_methodint, optional

Solution method for implicit analysis. The default is 12.

iteration_limitint, optional

Iteration limit between automatic stiffness reformations. The default is 11.

stiffness_reformation_limitint, optional

Stiffness reformation limit per time step. The default is 55.

absolute_convergence_tolerancefloat, optional

Absolute convergence tolerance. The default is 1e-10.

Returns:
bool

True when successful, False when failed.

set_consistent_mass_matrix()[source]#

Use the consistent mass matrix in implicit dynamics and eigenvalue solutions.

create()[source]#

Create an implicit analysis.

class ansys.dyna.core.pre.dynabase.ThermalAnalysisType[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

STEADY_STATE = 0[source]#
TRANSIENT = 1[source]#
class ansys.dyna.core.pre.dynabase.ThermalAnalysisTimestep[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

FIXED = 0[source]#
VARIABLE = 1[source]#
class ansys.dyna.core.pre.dynabase.ThermalAnalysis[source]#

Bases: BaseObj

Activates thermal analysis and defines associated control parameters.

defined_solver = False[source]#
defined_timestep = False[source]#
defined_nonlinear = False[source]#
stub[source]#
type = 'analysis_thermal'[source]#
set_timestep(timestep_control=ThermalAnalysisTimestep.FIXED, initial_timestep=0)[source]#

Set time step controls for the thermal solution in a thermal only or coupled structural/thermal analysis.

Parameters:
timestep_controlThermalAnalysisTimestep

Time step control.

initial_timestepfloat, optional

Initial thermal time step. The default is 0.

set_solver(analysis_type=ThermalAnalysisType.STEADY_STATE)[source]#

Set options for the thermal solution in a thermal only or coupled structural-thermal analysis.

Parameters:
analysis_typeImplicitAnalysis

Thermal analysis type.

set_nonlinear(convergence_tol=0.0001, divergence=0.5)[source]#

Set parameters for a nonlinear thermal or coupled structural/thermal analysis.

Parameters:
convergence_tolfloat

Convergence tolerance for temperature.

divergencefloat

Divergence control parameter.

create()[source]#

Create a thermal analysis.

class ansys.dyna.core.pre.dynabase.ContactCategory[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

SURFACE_TO_SURFACE_CONTACT = 2[source]#
SINGLE_SURFACE_CONTACT = 3[source]#
SHELL_EDGE_TO_SURFACE_CONTACT = 4[source]#
NODES_TO_SURFACE = 5[source]#
class ansys.dyna.core.pre.dynabase.ContactType[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

NULL = 0[source]#
AUTOMATIC = 1[source]#
GENERAL = 2[source]#
RIGID = 3[source]#
TIED = 4[source]#
TIED_WITH_FAILURE = 5[source]#
ERODING = 6[source]#
EDGE = 7[source]#
class ansys.dyna.core.pre.dynabase.OffsetType[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

NULL = ''[source]#
OFFSET = 'OFFSET'[source]#
BEAM_OFFSET = 'BEAM_OFFSET'[source]#
CONSTRAINED_OFFSET = 'CONSTRAINED_OFFSET'[source]#
class ansys.dyna.core.pre.dynabase.ContactFormulation[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

STANDARD_PENALTY = 0[source]#
SOFT_CONSTRAINT_PENALTY = 1[source]#
SEGMENT_BASED_CONTACT_PENALTY = 2[source]#
class ansys.dyna.core.pre.dynabase.SBOPT[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

ASSUME_PLANER_SEGMENTS = 2[source]#
WRAPED_SEGMENT_CHECKING = 3[source]#
SLDING_OPTION = 4[source]#
class ansys.dyna.core.pre.dynabase.ContactSurface(set)[source]#

Defines a contact interface.

stub[source]#
id[source]#
thickness = 0[source]#
penalty_stiffness = 1.0[source]#
set_contact_region(box)[source]#

Include in the contact definition only those SURFA nodes/segments within a box.

Parameters:
boxBox

Box-shaped volume.

set_contact_thickness(thickness)[source]#

Set the contact thickness for the SURFA surface.

Parameters:
thicknessfloat

Contact thickness.

set_penalty_stiffness_scale_factor(scalefactor=1.0)[source]#

Set the scale factor on the default surface penalty stiffness.

Parameters:
scalefactorint, optional

Scale factor. The default is 1.0.

class ansys.dyna.core.pre.dynabase.Contact(type=ContactType.NULL, category=ContactCategory.SINGLE_SURFACE_CONTACT, offset=OffsetType.NULL)[source]#

Provide a way of treating interaction between disjoint parts.

stub[source]#
rigidwall_penalties_scale_factor = 1[source]#
max_penetration_check_multiplier = 4[source]#
initial_penetrations = 0[source]#
rigidwall_gap_stiffness = 0[source]#
category[source]#
type[source]#
mortar = False[source]#
ignore = 0[source]#
offset[source]#
static_friction_coeff = 0[source]#
dynamic_friction_coeff = 0[source]#
birth_time = 0[source]#
death_time = 1e+20[source]#
option_tiebreak = False[source]#
optionres = 0[source]#
contact_formulation = 0[source]#
segment_based_contact_option = 2[source]#
set_mortar()[source]#

Set the mortar contact.

A mort contact is a segment-to-segment, penalty-based contact.

set_tiebreak()[source]#

Set the contact allow for failure.

A tieback is a special case of this. After failure, the contact usually becomes a normal one-way, two-way, or single surface version.

set_friction_coefficient(static=0, dynamic=0)[source]#

Set the coefficient of friction.

Parameters:
staticfloat, optional

Static coefficient of friction. The default is 0.

dynamicfloat, optional

Dynamic coefficient of friction. The default is 0.

set_active_time(birth_time=0, death_time=1e+20)[source]#

Set the birth and death time to active and deactivate the contact.

Parameters:
birth_timeint, optional

Time to activate the contact. The default is 0.

death_timefloat, optional

Time to deactivate the contact. The default is 1e20.

set_initial_penetration()[source]#

Ignore initial penetrations.

set_slave_surface(surface)[source]#

Set the slave contact interface.

set_master_surface(surface)[source]#

Set the master contact interface.

set_penalty_algorithm(formulation=ContactFormulation.STANDARD_PENALTY, segment_based_contact_option=SBOPT.ASSUME_PLANER_SEGMENTS)[source]#

Set the contact formulation.

create()[source]#

Create a contact.

class ansys.dyna.core.pre.dynabase.ContactGroup[source]#

Create a contact group.

stub[source]#
contactlist = [][source]#
add(contact)[source]#

Add a contact in the group.

create()[source]#

Create contacts.

num()[source]#

Get the number of contact objects.

class ansys.dyna.core.pre.dynabase.Constraint[source]#

Provides a way of constraining degrees of freedom to move together in some way.

spotweldlist = [][source]#
cnrbsetidlist = [][source]#
jointsphericallist = [][source]#
mergerigidlist = [][source]#
create_spotweld(nodeid1, nodeid2)[source]#

Define massless spot welds between non-contiguous nodal pairs.

Parameters:
nodeid1int

ID for the first node.

nodeid2int

ID for the second node.

Returns:
bool

True when successful, False when failed.

create_cnrb(nodeset)[source]#

Create a nodal rigid body, which is a rigid body that consists of defined nodes.

Parameters:
nodesetNodeSet

Node set that defines the rigid body.

Returns:
bool

True when successful, False when failed.

create_joint_spherical(nodes, relative_penalty_stiffness=1.0, damping_scale_factor=1.0)[source]#

Create a joint between two rigid bodies.

Parameters:
nodeslist

List of nodes for creating the joint.

relative_penalty_stiffnessint, optional

Relative penalty stiffness. The default is 1.0.

damping_scale_factorint, optional

Damping scale factor on the default damping value. The default is 1.0.

merge_two_rigid_bodies(lead_rigidbody=0, constrained_rigidbody=0)[source]#

Merge two rigid bodies.

One rigid body, called the constrained rigid body, is merged into another rigid body, called the lead rigid body.

Parameters:
lead_rigidbodyint, optional

Part ID for the lead rigid body. The default is 0.

constrained_rigidbodyint

Part ID for the constrained rigid body. The default is 0.

create()[source]#

Create a constraint.

class ansys.dyna.core.pre.dynabase.BoundaryCondition[source]#

Provides a way of defining imposed motions on boundary nodes.

stub[source]#
spclist = [][source]#
imposedmotionlist = [][source]#
templist = [][source]#
convectionlist = [][source]#
assign_model(model)[source]#
create_spc(nodeset, tx=True, ty=True, tz=True, rx=True, ry=True, rz=True, cid=0, birth=0, death=1e+20)[source]#

Define nodal single point constraints.

Parameters:
nodesetNodeSet.

Node set.

contraint_x/y/z_directionint

Translational constraint in local x/y/z-direction.

contraint_x/y/zaxis_rotateint

Rotational constraint about local x/y/z-axis.

create_imposed_motion(set, curve, motion=Motion.DISPLACEMENT, dof=DOF.X_TRANSLATIONAL, scalefactor=1, birthtime=0)[source]#

Create an imposed nodal motion on a node or set of nodes.

An imposed nodal motion can be a velocity, acceleration, or displacement.

Parameters:
partsetPartSet.

Part set.

curveCurve

Curve ID or function ID to describe the motion value as a function of time.

motionenum

Velocity/Acceleration/Displacement flag.

dofenum

Applicable degrees of freedom.

scalefactorint, optional

Load curve scale factor. The default is 1.

birthtimeint, optional
create_temperature(nodeset, curve=None, scalefactor=1)[source]#

Create temperature boundary conditions for a thermal or coupled thermal/structural analysis.

Parameters:
nodesetNodeSet.

Node set.

curveCurve, optional

Temperature, T, specification. The default is None.

scalefactorfloat, optional

Temperature, T, curve multiplier. The default is 1.

create_convection(segmentset=None, convection_heat_transfer_coefficient=None, convection_heat_transfer_coefficient_multiplier=0.0, environment_temperature=None, environment_temperature_multiplier=0.0)[source]#

Apply a convection boundary condition on SEGMENT_SET for a thermal analysis.

Parameters:
segmentsetSegmentSet.

Segment set.

convection_heat_transfer_coefficientCurve

Convection heat transfer coefficient.

convection_heat_transfer_coefficient_multiplierfloat

Curve multiplier for convection heat transfer coefficient.

environment_temperatureCurve

Environment temperature.

environment_temperature_multiplierfloat

Curve multiplier for environment temperature.

create()[source]#

Create a boundary condition.

class ansys.dyna.core.pre.dynabase.InitialCondition[source]#

Provides a way of initializing velocities and detonation points.

stub[source]#
velocitylist = [][source]#
velocitynodelist = [][source]#
temperaturelist = [][source]#
assign_model(model)[source]#
create_velocity(velocityset, angular_velocity=0, velocity=Velocity(0, 0, 0), direction=Direction(0, 0, 0), stime=0)[source]#

Create initial velocities for rotating and/or translating bodies.

create_velocity_node(nodeid, trans=Velocity(0, 0, 0), rot=RotVelocity(0, 0, 0))[source]#

Define initial nodal point velocities for a node.

create_temperature(nodeset=None, temperature=0)[source]#

Create an initial nodal point temperature.

create()[source]#

Create an initial condition.

class ansys.dyna.core.pre.dynabase.RigidwallCylinder(tail=Point(0, 0, 0), head=Point(0, 0, 0), radius=1, length=10)[source]#

Bases: BaseObj

Defines a rigid wall with a cylinder form.

Parameters:
tailPoint, optional

Coordinates of the tail of the normal vector. The default is (0, 0, 0).

headPoint, optional

Coordinates of the head of the normal vector. The default is (0, 0, 0).

radiusfloat, optional

Radius of the cylinder. The default is 1.

lengthfloat, optional

Length of cylinder. The default is 10.

stub[source]#
tail[source]#
head[source]#
radius[source]#
length[source]#
motion[source]#
lcid = 0[source]#
dir[source]#
type = 'rigidwall_cylinder'[source]#
set_motion(curve, motion=RWMotion.VELOCITY, dir=Direction(1, 0, 0))[source]#

Set the prescribed motion.

get_data() List[source]#

Get the rigidwall data.

create()[source]#

Create a rigidwall cylinder.

class ansys.dyna.core.pre.dynabase.RigidwallSphere(center=Point(0, 0, 0), orient=Point(0, 0, 0), radius=1)[source]#

Bases: BaseObj

Defines a rigid wall with a sphere form.

Parameters:
centerPoint, optional

The center of sphere. The default is (0, 0, 0).

orientPoint, optional

Vector n determines the orintation of the rigidwall,the center define the tail of normal n, the orient define the head of normal n. The default is (0, 0, 0).

radiusfloat, optional

Radius of the sphere. The default is 1.

stub[source]#
center[source]#
orient[source]#
radius[source]#
motion[source]#
lcid = 0[source]#
dir[source]#
type = 'rigidwall_sphere'[source]#
set_motion(curve, motion=RWMotion.VELOCITY, dir=Direction(1, 0, 0))[source]#

Set the prescribed motion.

get_data() List[source]#

Get the rigidwall data.

create()[source]#

Create a rigidwall sphere.

class ansys.dyna.core.pre.dynabase.RigidwallPlanar(tail=Point(0, 0, 0), head=Point(0, 0, 0), coulomb_friction_coefficient=0.5)[source]#

Bases: BaseObj

Defines planar rigid walls with either finite or infinite size.

Parameters:
tailPoint

Coordinate of the tail of the normal vector. The default is (0, 0, 0).

headPoint

Coordinate of the head of the normal vector. The default is (0, 0, 0).

coulomb_friction_coefficientfloat, optional

Friction coefficieint in coulomb units. The default is 0.5.

stub[source]#
tail[source]#
head[source]#
fric[source]#
type = 'rigidwall_planar'[source]#
get_data() List[source]#

Get the rigidwall data.

create()[source]#

Create planar rigid walls.

class ansys.dyna.core.pre.dynabase.GravityOption[source]#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

DIR_X = 'X'[source]#
DIR_Y = 'Y'[source]#
DIR_Z = 'Z'[source]#
class ansys.dyna.core.pre.dynabase.Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 0], y=[0, 0]))[source]#

Bases: BaseObj

Defines body force loads using global axes directions.

Body force loads are due to a prescribed base acceleration or angular velocity.

stub[source]#
dir[source]#
load[source]#
type = 'gravity'[source]#
create()[source]#

Define a body force.