DynaBase
#
- class ansys.dyna.core.pre.dynabase.DynaBase#
Contains methods for creating a general LS-DYNA keyword.
Overview#
Get the stub of the |
|
Set the structural time step size control using different options. |
|
Define control parameters that can improve the accuracy of the calculation. |
|
Provide controls for energy dissipation options. |
|
Set miscellaneous output parameters. |
|
Redefine the default values for the hourglass control type and coefficient. |
|
Reset the default values of the bulk viscosity coefficients globally. |
|
Define initial nodal point temperatures on all nodes. |
|
Provide controls for computing shell response. |
|
Provide controls for a solid element response. |
|
Change defaults for computation with contact surfaces. |
|
Define mass-weighted nodal damping. |
|
Get solid elements. |
|
Create general keyword. |
|
Add entities to an object. |
|
Include independent input files containing model data, allow for node, element, and set |
|
Save keyword files. |
Import detail#
from ansys.dyna.core.pre.dynabase import DynaBase
Attribute detail#
- DynaBase.stub#
- DynaBase.mainname = ''#
- DynaBase.implicitanalysis#
- DynaBase.parts#
- DynaBase.boundaryconditions#
- DynaBase.initialconditions#
- DynaBase.constraints#
- DynaBase.contacts#
- DynaBase.entities = []#
- DynaBase.have_accuracy = False#
- DynaBase.have_energy = False#
- DynaBase.have_hourglass = False#
- DynaBase.have_bulk_viscosity = False#
- DynaBase.have_control_shell = False#
- DynaBase.init_velocity: List = None#
- DynaBase.bdy_spc: List = None#
Method detail#
- DynaBase.get_stub()#
Get the stub of the
DynaBase
object.
- DynaBase.set_parent(parent=None)#
- DynaBase.set_timestep(tssfac=0.9, isdo=0, timestep_size_for_mass_scaled=0.0, max_timestep=None)#
Set the structural time step size control using different options.
- Parameters:
- tssfac
float
,optional
Scale factor for computed time step. The default is
0.9
.- isdo
int
,optional
Basis of the time size calculation for four-node shell elements. The default is
0
.- timestep_size_for_mass_scaled
float
,optional
Time step size for mass scaled solutions. The default is
0.0
.- max_timestep
Curve
,optional
Load curve that limits the maximum time step size. The default is
None
.
- tssfac
- Returns:
- bool
True
when successful,False
when failed.
- DynaBase.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)#
Define control parameters that can improve the accuracy of the calculation.
- Parameters:
- objective_stress_updates
int
Global flag for 2nd order objective stress updates.
- invariant_node_number
int
Invariant node numbering for shell and solid elements.
- partsetid_for_objective_stress_updates
int
,optional
Part set ID for objective stress updates. The default is
0
.- implicit_accuracy_flag
int
Implicit accuracy flag.
- explicit_accuracy_flag
float
Explicit accuracy parameter.
EQ.0.0: Off
GT.0.0: On
- objective_stress_updates
- Returns:
- bool
True
when successful,False
when failed.
- DynaBase.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)#
Provide controls for energy dissipation options.
- Parameters:
- hourglass_energy
enum
Hourglass energy calculation option.
- rigidwall_energy
int
Rigidwall energy dissipation option.
EQ.1: Energy dissipation is not computed.
EQ.2: Energy dissipation is computed.
- sliding_interface_energy
int
Sliding interface energy dissipation option.
EQ.1: Energy dissipation is not computed.
EQ.2: Energy dissipation is computed.
- rayleigh_energy
int
Rayleigh energy dissipation option.
EQ.1: Energy dissipation is not computed.
EQ.2: Energy dissipation is computed.
- initial_reference_geometry_energy
int
Initial reference geometry energy option.
EQ.1: Initial reference geometry energy is not computed.
EQ.2: Initial reference geometry energy is computed.
- hourglass_energy
- Returns:
- bool
True
when successful,False
when failed.
- DynaBase.set_output(print_suppression_d3hsp=False, print_suppression_echo=OutputEcho.ALL_DATA_PRINTED)#
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. IfFalse
, no suppression occurs.- print_suppression_echo
OutputEcho
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.
- print_suppression_d3hspbool,
- DynaBase.set_hourglass(controltype=HourglassControl.STANDARD_VISCOSITY_FORM, coefficient=0.1)#
Redefine the default values for the hourglass control type and coefficient.
- DynaBase.set_bulk_viscosity(quadratic_viscosity_coeff=1.5, linear_viscosity_coeff=0.06, bulk_viscosity_type=BulkViscosity.STANDARD_BULK_VISCOSITY)#
Reset the default values of the bulk viscosity coefficients globally.
- Parameters:
- Returns:
- bool
True
when successful,False
when failed.
- DynaBase.set_init_temperature(temp=0)#
Define initial nodal point temperatures on all nodes.
- DynaBase.create_control_shell(wrpang=20, esort=0, irnxx=-1, istupd=0, theory=2, bwc=2, miter=1, proj=0, irquad=0)#
Provide controls for computing shell response.
- Parameters:
- wrpang
int
,optional
Shell element warpage angle in degrees. The default is
20
.- esort
int
Sorting of triangular shell elements to automatically switch degenerate quadrilateral shell formulations to more suitable triangular shell formulations. The default is
0
.- irnxx
int
,optional
Shell normal update option. The default is
1
.- istupd
int
,optional
Shell thickness change option for deformable shells. The default is
0
.- theory
int
,optional
Default shell formulation. The default is
2
.- bwc
int
,optional
Warping stiffness for Belytschko-Tsay shells. The default is
2
.- miter
int
,optional
Plane stress plasticity option. The default is
1
.- proj
int
,optional
Projection method for the warping stiffness in the Belytschko-Tsay shell and the Belytschko-Wong-Chiang elements. The default is
0
.- irquad
int
,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
- wrpang
- Returns:
- bool
True
when successful,False
when failed.
- DynaBase.create_control_solid(esort=0, fmatrx=0, niptets=4, swlocl=1, psfail=0, t10jtol=0.0, icoh=0, tet13k=0)#
Provide controls for a solid element response.
- Parameters:
- esort
int
,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
- fmatrx
int
,optional
Method to use in the calculation of the deformation gradient matrix. The default is
1
.- niptets
int
,optional
Number of integration points used in the quadratic tetrahedron elements. The default is
4
.- swlocl
int
,optional
Output option for stresses in solid elements used as spot welds with material
\*MAT_SPOTWELD
. The default is1
.- psfail
int
,optional
Solid element erosion from negative volume is limited only to solid elements in the part set indicated by PSFAIL. The default is
0
.- t10jtol
float
,optional
Tolerance for Jacobian in four-point, 10-noded quadratic tetrahedra. The default is
0.0
.- icoh
int
,optional
Breaking LS-DYNA convention ICOH is interpreted digit-wise. The default is
0
.- tet13k
int
,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 to1
, this matrix is invoked.
- esort
- Returns:
- bool
True
when successful,False
when failed.
- DynaBase.create_control_contact(rwpnal, shlthk=0, orien=1, ssthk=0, ignore=0, igactc=0)#
Change defaults for computation with contact surfaces.
- Parameters:
- rwpnal
float
Scale factor for rigid wall penalties, which treat nodal points interacting with rigid walls.
- shlthk
int
,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 to1
, these offsets are considered.- orien
int
,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 to0
, reorientation does not occur.- ssthk
int
,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 to1
, default contact thickness is determined.- ignore
int
,optional
Flag for whether to ignore initial penetrations in the
\*CONTACT_AUTOMATIC
options. The default is0
, in which case initial penetrations are ignored. If this parameter is set to1
, initial penetrations are not ignored.- igactc
int
,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 to1
, isogeometric shells are used.
- rwpnal
- Returns:
- bool
True
when successful,False
when failed.
- DynaBase.create_damping_global(lcid=0, valdmp=0.0)#
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.
- DynaBase.get_solid_elements()#
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],…]
- DynaBase.create_general_keyword(opcode, keyworddata)#
Create general keyword.
- Parameters:
- opcode
str
Keyword card name.
- keyworddatastring
Keyword data.
- Example::
Create a
\*INITIAL_VELOCITY
keyword.$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ *INITIAL_VELOCITY
& vx vy vz vxr vyr vzr 1.480E+01 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
opcode = “INITIAL_VELOCITY” keyworddata = “0
- 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)
- opcode
- DynaBase.add(obj)#
Add entities to an object.
- DynaBase.set_transform(filename=None, idnoff=0, ideoff=0, idpoff=0, idmoff=0, idsoff=0, idfoff=0, transform=None)#
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:
- filename
str
Name of file to include in the keyword file.
- idnoff
int
Offset to node ID.
- ideoff
int
Offset to element ID.
- idpoff
int
Offset to part ID.
- idmoff
int
Offset to material ID.
- idsoff
int
Offset to set ID.
- idfoff
int
Offset to function ID, table ID, and curve ID.
- transform
Transform
Definition for the transformation.
- filename