:class:`DynaBase` ================= .. py:class:: ansys.dyna.core.pre.dynabase.DynaBase Contains methods for creating a general LS-DYNA keyword. .. !! processed by numpydoc !! .. py:currentmodule:: DynaBase Overview -------- .. tab-set:: .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~get_stub` - Get the stub of the ``DynaBase`` object. * - :py:attr:`~set_parent` - * - :py:attr:`~set_timestep` - Set the structural time step size control using different options. * - :py:attr:`~set_accuracy` - Define control parameters that can improve the accuracy of the calculation. * - :py:attr:`~set_energy` - Provide controls for energy dissipation options. * - :py:attr:`~set_output` - Set miscellaneous output parameters. * - :py:attr:`~set_hourglass` - Redefine the default values for the hourglass control type and coefficient. * - :py:attr:`~set_bulk_viscosity` - Reset the default values of the bulk viscosity coefficients globally. * - :py:attr:`~set_init_temperature` - Define initial nodal point temperatures on all nodes. * - :py:attr:`~create_control_shell` - Provide controls for computing shell response. * - :py:attr:`~create_control_solid` - Provide controls for a solid element response. * - :py:attr:`~create_control_contact` - Change defaults for computation with contact surfaces. * - :py:attr:`~create_damping_global` - Define mass-weighted nodal damping. * - :py:attr:`~get_solid_elements` - Get solid elements. * - :py:attr:`~create_general_keyword` - Create general keyword. * - :py:attr:`~add` - Add entities to an object. * - :py:attr:`~set_transform` - Include independent input files containing model data, allow for node, element, and set * - :py:attr:`~save_file` - Save keyword files. .. tab-item:: Attributes .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~stub` - * - :py:attr:`~mainname` - * - :py:attr:`~implicitanalysis` - * - :py:attr:`~parts` - * - :py:attr:`~boundaryconditions` - * - :py:attr:`~initialconditions` - * - :py:attr:`~constraints` - * - :py:attr:`~contacts` - * - :py:attr:`~entities` - * - :py:attr:`~have_accuracy` - * - :py:attr:`~have_energy` - * - :py:attr:`~have_hourglass` - * - :py:attr:`~have_bulk_viscosity` - * - :py:attr:`~have_control_shell` - * - :py:attr:`~init_velocity` - * - :py:attr:`~bdy_spc` - Import detail ------------- .. code-block:: python from ansys.dyna.core.pre.dynabase import DynaBase Attribute detail ---------------- .. py:attribute:: stub .. py:attribute:: mainname :value: '' .. py:attribute:: implicitanalysis .. py:attribute:: parts .. py:attribute:: boundaryconditions .. py:attribute:: initialconditions .. py:attribute:: constraints .. py:attribute:: contacts .. py:attribute:: entities :value: [] .. py:attribute:: have_accuracy :value: False .. py:attribute:: have_energy :value: False .. py:attribute:: have_hourglass :value: False .. py:attribute:: have_bulk_viscosity :value: False .. py:attribute:: have_control_shell :value: False .. py:attribute:: init_velocity :type: List :value: None .. py:attribute:: bdy_spc :type: List :value: None Method detail ------------- .. py:method:: get_stub() Get the stub of the ``DynaBase`` object. .. !! processed by numpydoc !! .. py:method:: set_parent(parent=None) .. py:method:: 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** : :class:`python:float`, :obj:`optional` Scale factor for computed time step. The default is ``0.9``. **isdo** : :class:`python:int`, :obj:`optional` Basis of the time size calculation for four-node shell elements. The default is ``0``. **timestep_size_for_mass_scaled** : :class:`python:float`, :obj:`optional` Time step size for mass scaled solutions. The default is ``0.0``. **max_timestep** : :obj:`Curve`, :obj:`optional` Load curve that limits the maximum time step size. The default is ``None``. :Returns: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. !! processed by numpydoc !! .. py:method:: 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** : :class:`python:int` Global flag for 2nd order objective stress updates. **invariant_node_number** : :class:`python:int` Invariant node numbering for shell and solid elements. **partsetid_for_objective_stress_updates** : :class:`python:int`, :obj:`optional` Part set ID for objective stress updates. The default is ``0``. **implicit_accuracy_flag** : :class:`python:int` Implicit accuracy flag. **explicit_accuracy_flag** : :class:`python:float` Explicit accuracy parameter. - EQ.0.0: Off - GT.0.0: On :Returns: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. !! processed by numpydoc !! .. py:method:: 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** : :obj:`enum` Hourglass energy calculation option. **rigidwall_energy** : :class:`python:int` Rigidwall energy dissipation option. - EQ.1: Energy dissipation is not computed. - EQ.2: Energy dissipation is computed. **sliding_interface_energy** : :class:`python:int` Sliding interface energy dissipation option. - EQ.1: Energy dissipation is not computed. - EQ.2: Energy dissipation is computed. **rayleigh_energy** : :class:`python:int` Rayleigh energy dissipation option. - EQ.1: Energy dissipation is not computed. - EQ.2: Energy dissipation is computed. **initial_reference_geometry_energy** : :class:`python:int` Initial reference geometry energy option. - EQ.1: Initial reference geometry energy is not computed. - EQ.2: Initial reference geometry energy is computed. :Returns: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. !! processed by numpydoc !! .. py:method:: set_output(print_suppression_d3hsp=False, print_suppression_echo=OutputEcho.ALL_DATA_PRINTED) Set miscellaneous output parameters. :Parameters: **print_suppression_d3hsp** : :ref:`bool `, :obj:`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_echo** : :obj:`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. .. !! processed by numpydoc !! .. py:method:: set_hourglass(controltype=HourglassControl.STANDARD_VISCOSITY_FORM, coefficient=0.1) Redefine the default values for the hourglass control type and coefficient. :Parameters: **controltype** : :obj:`enum` Default hourglass control type. **coefficient** : :class:`python:float`, :obj:`optional` Default hourglass coefficient. The default is ``0.``. :Returns: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. !! processed by numpydoc !! .. py:method:: 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: **quadratic_viscosity_coeff** : :class:`python:float`, :obj:`optional` Default quadratic viscosity coefficient. The default is ``1.5``. **linear_viscosity_coeff** : :class:`python:float`, :obj:`optional` Default linear viscosity coefficient. The default is ``0.06``. **bulk_viscosity_type** : :obj:`enum` Default bulk viscosity type. :Returns: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. !! processed by numpydoc !! .. py:method:: set_init_temperature(temp=0) Define initial nodal point temperatures on all nodes. :Parameters: **temp** : :class:`python:float`, :obj:`optional` Temperature at node. The default is ``0``. :Returns: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. !! processed by numpydoc !! .. py:method:: 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** : :class:`python:int`, :obj:`optional` Shell element warpage angle in degrees. The default is ``20``. **esort** : :class:`python:int` Sorting of triangular shell elements to automatically switch degenerate quadrilateral shell formulations to more suitable triangular shell formulations. The default is ``0``. **irnxx** : :class:`python:int`, :obj:`optional` Shell normal update option. The default is ``1``. **istupd** : :class:`python:int`, :obj:`optional` Shell thickness change option for deformable shells. The default is ``0``. **theory** : :class:`python:int`, :obj:`optional` Default shell formulation. The default is ``2``. **bwc** : :class:`python:int`, :obj:`optional` Warping stiffness for Belytschko-Tsay shells. The default is ``2``. **miter** : :class:`python:int`, :obj:`optional` Plane stress plasticity option. The default is ``1``. **proj** : :class:`python:int`, :obj:`optional` Projection method for the warping stiffness in the Belytschko-Tsay shell and the Belytschko-Wong-Chiang elements. The default is ``0``. **irquad** : :class:`python:int`, :obj:`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: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. !! processed by numpydoc !! .. py:method:: 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** : :class:`python:int`, :obj:`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** : :class:`python:int`, :obj:`optional` Method to use in the calculation of the deformation gradient matrix. The default is ``1``. **niptets** : :class:`python:int`, :obj:`optional` Number of integration points used in the quadratic tetrahedron elements. The default is ``4``. **swlocl** : :class:`python:int`, :obj:`optional` Output option for stresses in solid elements used as spot welds with material ``\*MAT_SPOTWELD``. The default is ``1``. **psfail** : :class:`python:int`, :obj:`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** : :class:`python:float`, :obj:`optional` Tolerance for Jacobian in four-point, 10-noded quadratic tetrahedra. The default is ``0.0``. **icoh** : :class:`python:int`, :obj:`optional` Breaking LS-DYNA convention ICOH is interpreted digit-wise. The default is ``0``. **tet13k** : :class:`python:int`, :obj:`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: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. !! processed by numpydoc !! .. py:method:: create_control_contact(rwpnal, shlthk=0, orien=1, ssthk=0, ignore=0, igactc=0) Change defaults for computation with contact surfaces. :Parameters: **rwpnal** : :class:`python:float` Scale factor for rigid wall penalties, which treat nodal points interacting with rigid walls. **shlthk** : :class:`python:int`, :obj:`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. **orien** : :class:`python:int`, :obj:`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. **ssthk** : :class:`python:int`, :obj:`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. **ignore** : :class:`python:int`, :obj:`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. **igactc** : :class:`python:int`, :obj:`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: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. !! processed by numpydoc !! .. py:method:: 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. :Parameters: **lcid** : :class:`python:int`, :obj:`optional` Load curve ID, which specifies the system damping constant versus the time. The default is ``0``. **valdmp** : :class:`python:float`, :obj:`optional` System damping constant. The default is ``0.0``. :Returns: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. !! processed by numpydoc !! .. py:method:: get_solid_elements() Get solid elements. :Returns: :class:`python: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],...] .. !! processed by numpydoc !! .. py:method:: create_general_keyword(opcode, keyworddata) Create general keyword. :Parameters: **opcode** : :class:`python:str` Keyword card name. keyworddata : string 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) .. !! processed by numpydoc !! .. py:method:: add(obj) Add entities to an object. .. !! processed by numpydoc !! .. py:method:: 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** : :class:`python:str` Name of file to include in the keyword file. **idnoff** : :class:`python:int` Offset to node ID. **ideoff** : :class:`python:int` Offset to element ID. **idpoff** : :class:`python:int` Offset to part ID. **idmoff** : :class:`python:int` Offset to material ID. **idsoff** : :class:`python:int` Offset to set ID. **idfoff** : :class:`python:int` Offset to function ID, table ID, and curve ID. **transform** : :obj:`Transform` Definition for the transformation. .. !! processed by numpydoc !! .. py:method:: save_file() Save keyword files. :Returns: :ref:`bool ` ``True`` when successful, ``False`` when failed. .. !! processed by numpydoc !!