abaqus Package

abaqus Module

Inheritance diagram of pyNastran.converters.abaqus.abaqus

Defines the Abaqus class

class pyNastran.converters.abaqus.abaqus.Abaqus(log=None, debug: Union[str, bool, None] = True)[source]

Bases: object

defines the abaqus reader

_read_elements(lines, line0, iline)[source]

*element, type=mass, elset=topc_inertia-2_mass_

read_abaqus_inp(abaqus_inp_filename)[source]

reads an abaqus model

read_assembly(lines, iline, line0, word)[source]

reads an Assembly object

read_material(lines: List[str], iline: int, word: str) → pyNastran.converters.abaqus.abaqus_cards.Material[source]

reads a Material card

read_part(lines, iline, line0, word)[source]

reads a Part object

read_spring(lines: List[str], iline: int, word: str) → pyNastran.converters.abaqus.abaqus_cards.Material[source]

*SPRING,ELSET=Eall blank line 10.

Defines a linear spring constant with value 10. for all elements in element set Eall and all temperatures. Example: *SPRING,ELSET=Eall,NONLINEAR 0.,0.,293. 10.,1.,293. 100.,2.,293. 0.,0.,393. 5.,1.,393. 25.,2.,393.

read_step(lines, iline, line0, istep)[source]

reads a step object

write(abaqus_filename_out, is_2d=False)[source]
pyNastran.converters.abaqus.abaqus._clean_lines(lines)[source]

removes comment lines and concatenates include files

pyNastran.converters.abaqus.abaqus._read_star_block(lines, iline, line0, log, debug=False)[source]

because this uses file streaming, there are 30,000 places where a try except block is needed, so this should probably be used all over.

pyNastran.converters.abaqus.abaqus._read_star_block2(lines, iline, line0, log, debug=False)[source]

because this uses file streaming, there are 30,000 places where a try except block is needed, so this should probably be used all over.

pyNastran.converters.abaqus.abaqus.get_nodes_nnodes_nelements(model: pyNastran.converters.abaqus.abaqus.Abaqus, stop_for_no_elements: bool = True)[source]

helper method

pyNastran.converters.abaqus.abaqus.get_param_map(iline: int, word: str, required_keys: Optional[List[str]] = None) → Dict[str, str][source]

get the optional arguments on a line

Examples

>>> iline = 0
>>> word = 'elset,instance=dummy2,generate'
>>> params = get_param_map(iline, word, required_keys=['instance'])
params = {
    'elset' : None,
    'instance' : 'dummy2,
    'generate' : None,
}
pyNastran.converters.abaqus.abaqus.main()[source]

tests a simple abaqus model

pyNastran.converters.abaqus.abaqus.print_data(lines, iline, word, msg, nlines=20)[source]

prints the last N lines

pyNastran.converters.abaqus.abaqus.read_abaqus(abaqus_inp_filename, log=None, debug=False)[source]

reads an abaqus model

pyNastran.converters.abaqus.abaqus.read_boundary(lines: List[str], line0: str, iline: int) → Tuple[Any, int, str][source]
pyNastran.converters.abaqus.abaqus.read_cload(line0, lines, iline) → Tuple[int, str, Any][source]
pyNastran.converters.abaqus.abaqus.read_elset(lines: List[str], iline: int, word: str, log: cpylog.SimpleLogger, is_instance: bool = True)[source]

reads *elset

pyNastran.converters.abaqus.abaqus.read_hourglass_stiffness(line0: str, lines: List[str], iline: int, log: cpylog.SimpleLogger) → None[source]

reads *hourglass stiffness

pyNastran.converters.abaqus.abaqus.read_node(lines, iline, log, skip_star=False)[source]

reads *node

pyNastran.converters.abaqus.abaqus.read_nset(lines, iline, word, log, is_instance=True)[source]

reads *nset

pyNastran.converters.abaqus.abaqus.read_set(lines, iline, line0, params_map)[source]

reads a set

pyNastran.converters.abaqus.abaqus.read_shell_section(line0: str, lines: List[str], iline: int, log: cpylog.SimpleLogger) → pyNastran.converters.abaqus.abaqus_cards.ShellSection[source]

reads *shell section

pyNastran.converters.abaqus.abaqus.read_solid_section(line0, lines, iline, log)[source]

reads *solid section

pyNastran.converters.abaqus.abaqus.split_by_equals(word, unused_lines, iline)[source]

splits ‘x = 42’ into ‘x’ and ‘42’

abaqus_cards Module

Inheritance diagram of pyNastran.converters.abaqus.abaqus_cards
defines:
  • SolidSection

  • ShellSection

  • Material

  • Assembly

  • Part

class pyNastran.converters.abaqus.abaqus_cards.Assembly(element_types, node_sets, element_sets)[source]

Bases: object

write(abq_file)[source]
class pyNastran.converters.abaqus.abaqus_cards.Material(name: str, sections: Dict[str, float], is_elastic: bool = True, density: Optional[float] = None, ndepvars: Optional[int] = None, ndelete: Optional[int] = None)[source]

Bases: object

a Material object is a series of nodes & elements (of various types)

write(abq_file) → None[source]

*Material, name=Glassy828DEA *Density 1180., *Elastic

2.14078e+09, 0.42718

*Material, name=MAT1_828DEA_Dam *Density 1180., *Depvar, delete=4

20,

User Material, constants=16 * K CTELIN C10 C01 DAM_FORM FUNC_FORM EVOLF EVMF

3.2e+09, 5.667e-05, 3.75e+08, 0., 2., 1., 50000., 0.05 **EVM0ISO EVM0VOL EVM0VM DAM_METHOD ALPHA A B C

0., 0.5, 0.5, 1., 0., 0., 0.5, 0.6

*Material, name=Steel *Density 7800., *Elastic

2e+11, 0.3

class pyNastran.converters.abaqus.abaqus_cards.Part(name: str, nids: np.ndarray, nodes: np.ndarray, element_types: Dict[str, np.ndarray], node_sets: Dict[str, np.ndarray], element_sets: Dict[str, np.ndarray], solid_sections: List[SolidSection], shell_sections: List[ShellSection], log: SimpleLogger)[source]

Bases: object

a Part object is a series of nodes & elements (of various types)

creates a Part object

Parameters
namestr

the name

element_typesDict[element_type]
element_typestr

the element type

bars:

r2d2 : (nelements, 2) int ndarray

shells:

cpe3 : (nelements, 3) int ndarray cpe4 : (nelements, 4) int ndarray cpe4r : (nelements, 4) int ndarray cps3 : (nelements, 3) int ndarray cps4 : (nelements, 4) int ndarray cps4r : (nelements, 4) int ndarray coh2d4 : (nelements, 4) int ndarray cohax4 : (nelements, 4) int ndarray cax3 : (nelements, 3) int ndarray cax4r : (nelements, 4) int ndarray

solids:

c3d10h : (nelements, 10) int ndarray

check_materials(materials)[source]

validates the materials

write(abq_file, is_2d=False)[source]

writes a Part

class pyNastran.converters.abaqus.abaqus_cards.ShellSection(material_name: str, thickness: float, log: SimpleLogger)[source]

Bases: object

A ShellSection defines thickness and a material

*SHELL SECTION, ELSET=PLATE, MATERIAL=A, ORIENTATION=GLOBAL 5.00000E-02

classmethod add_from_data_lines(param_map: Dict[str, str], data_lines: List[str], log: SimpleLogger)[source]
class pyNastran.converters.abaqus.abaqus_cards.SolidSection(material_name: str, elset: str, thickness: float, log: SimpleLogger)[source]

Bases: object

a SolidSection defines depth and a material

classmethod add_from_data_lines(param_map: Dict[str, str], data_lines: List[str], log: SimpleLogger)[source]
class pyNastran.converters.abaqus.abaqus_cards.Step(name: str, boundaries: List[Any], outputs: List[Any], cloads: Dict[str, Any], is_nlgeom: bool = False)[source]

Bases: object

*Step, name=Stretch, nlgeom=YES *Static 0.1, 1.0, 0.1, 0.1 *Boundary, op=MOD Block-1.Top, 1, 1, 0.0 Block-1.Top, 2, 2, 1.0 Block-1.Top, 3, 3, 0.0 NewBlock-1.Top, 1, 1, 0.0 NewBlock-1.Top, 2, 2, 1.0 NewBlock-1.Top, 3, 3, 0.0 *Output, field, variable=ALL *Output, history, variable=PRESELECT *End Step

write(abq_file) → None[source]

writes a Step

pyNastran.converters.abaqus.abaqus_cards.cast_nodes(nids: List[Any], nodes: List[Any], log: SimpleLogger, require: bool = True) → Tuple[np.ndarray, np.ndarray][source]
pyNastran.converters.abaqus.abaqus_cards.write_element_set_to_file(abq_file, set_name, values_array)[source]

writes an element set

pyNastran.converters.abaqus.abaqus_cards.write_name(name)[source]

Abaqus has odd rules for writing words without spaces vs. with spaces

pyNastran.converters.abaqus.abaqus_cards.write_node_set_to_file(abq_file, set_name, values_array)[source]

writes a node set

pyNastran.converters.abaqus.abaqus_cards.write_set_to_file(abq_file, values_array)[source]

writes 16 integer values per line to a set card

rpy_writer Module

pyNastran.converters.abaqus.rpy_writer.cmd_line()[source]
pyNastran.converters.abaqus.rpy_writer.write_rpy_file(fname_model, jobname, fname_user_subroutine=None, include=None)[source]