Hi everyone,

I’m trying to connect a shell element (SHELL181) with multiple beam elements (BEAM188) in ANSYS MAPDL.

My current approach:

  • I generate the initial and final coordinates for the beam elements.
  • I create a shell mesh with a density of 0.1, which results in multiple nodes within the shell and unnecessary elements.
  • I ensure the connection by aligning the beam nodes with the shell mesh nodes and then merging them.

This method works, but I’m wondering if there is a more efficient way to achieve this.

My questions:

  • Is there a better approach to connect shell and beam elements without manually aligning nodes?
  • Can the automatic meshing option be used in this case, considering the constraints of meshing different element types (1D, 2D, and 3D)?
  • Would it be possible to use contact elements instead of merging nodes? I found this PyMAPDL example on contact elements, but I’m not sure how to apply it to my case. - (https://mapdl.docs.pyansys.com/version/stable/examples/gallery_examples/00-mapdl-examples/contact_elements.html#sphx-glr-examples-gallery-examples-00-mapdl-examples-contact-elements-py)
  • Any insights or best practices would be greatly appreciated!

    Thanks in advance!

    Note: You may see several warnings about non-ascending coordinates, but this is expected, and the code will run correctly.

    CODE:

    FINISH

    /CLEAR,NOSTART

    /PREP7

    /TITLE, Pile and Shell Analysis

    ! Units in N and m

    /UNITS, SI

    ! Define the element type (BEAM188) and its properties

    ET, 1, BEAM188

    ! Material properties

    MP, EX, 1, 0.85*5600*SQRT(40)*1e+6 ! Elastic modulus in Pa (N/m²) - 30104.88332 MPa

    MP, PRXY, 1, 0.2 ! Poisson's ratio

    MP, DENS, 1, 2500 ! Density in kg/m³ (adjust as needed)

    ! Beam section properties in centimeters

    SECTYPE, 1, BEAM, CSOLID

    SECOFFSET, CENT

    SECDATA, 0.5

    ! Define initial points

    *SET, x_initials, 0.8, 0.8, 0.8, 3.3, 4.2, 4.2, 7.4, 7.4

    *SET, y_initials, -1.8, 0.0, 1.8, 0.0, 1.8, -1.8, -2.5, 2.5

    *SET, z_initials, -0.01, -0.01, -0.01, -0.01, -0.01, -0.01, -0.01, -0.01

    ! Define final points with 35 m long vectors (rounded to 2 decimal places)

    *SET, x_finals, -7.12, 9.33, -7.12, 11.83, 10.66, 10.66, 2.47, 2.47

    *SET, y_finals, -4.67, 0.00, 4.63, 0.00, 7.21, -7.21, -9.45, 9.45

    *SET, z_finals, -33.94, -33.94, -33.94, -33.94, -33.94, -33.94, -33.94, -33.94

    ! Number of intermediate nodes to be created

    num_intermediate_nodes = 9

    ! Initialize node_id

    node_id = 1

    *DO, i, 1, 8, 1

    x_initial = x_initials(i)

    y_initial = y_initials(i)

    z_initial = z_initials(i)

    x_final = x_finals(i)

    y_final = y_finals(i)

    z_final = z_finals(i)

    ! Add the initial node

    N, node_id, x_initial, y_initial, z_initial

    ! Add the final node

    node_id_final = node_id + num_intermediate_nodes + 1

    N, node_id_final, x_final, y_final, z_final

    ! Constrain the final nodes

    D, node_id_final, ALL, 0

    ! Fill intermediate nodes

    FILL, node_id, node_id_final, num_intermediate_nodes

    ! Update node_id for the next iteration

    node_id = node_id_final + 1

    *ENDDO

    ! Generate elements

    n_element = 1

    *DO, i, 1, 8, 1

    *DO, j, 1, num_intermediate_nodes+1, 1

    N_1 = j + (num_intermediate_nodes+2)*(i-1)

    N_2 = N_1 + 1

    EN, n_element, N_1, N_2

    n_element = n_element + 1

    *ENDDO

    *ENDDO

    ! Select BEAM188 elements

    ESEL, S, TYPE, , 1

    ! Get the number of selected elements and store in a variable

    *GET, num_elem, ELEM, 0, COUNT

    k = num_elem

    ! Create load application element (Bollard)

    N, 1000, 6.5, 0, 0

    N, 1001, 6.5, 0, 1.5

    EN, k+1, 1000, 1001

    l=9

    ! Create load application element (Fender)

    N, 1002, l, 0, 0

    N, 1003, l, 0, -1

    EN, k+2, 1002, 1003

    ! Define element type (SHELL181) and material properties for the shell

    ET, 2, SHELL181

    KEYOPT, 2, 8, 2

    KEYOPT, 2, 3, 2

    ! Material properties for SHELL181

    MP, EX, 2, 0.85*5600*SQRT(20)*1e+6

    MP, PRXY, 2, 0.2

    MP, DENS, 2, 2500

    ! Define shell section

    SECTYPE, 2, SHELL

    SECDATA, 1.5

    ! Create rectangle and shell mesh

    RECTNG, 0, l, -3.5, 3.5

    ESIZE, 0.1

    AMESH, ALL

    ! Select elements whose centers are within the Z range

    ESEL, S, TYPE,,2

    ! Modify section of selected elements

    EMODIF, ALL, SECNUM, 2

    ! Merge nodes

    NSEL, S, LOC, Z, -0.01, 0.01

    NUMMRG, NODE, 0.01

    NSEL, ALL

    ! Output nodes and elements

    ALLSEL,ALL

    /STAT,GLOBAL

    NLIST,ALL, , ,XYZ,NODE,NODE,NODE

    ELIST,ALL,,,0,0

    ACEL, 0, 0, -9.81

    FINISH

    ! Solution

    /SOLU

    ANTYPE,0

    j = 1

    ! Calculate angle in radians for j=1

    Rad = (j-1)*10*3.14159265359/180

    ! Define force (1 million N, negative sign)

    f = -1000000

    ! Calculate horizontal force components

    FX = SIN(Rad)*f

    FY = COS(Rad)*f

    ! Select all elements

    ALLSEL, ALL

    ! Apply horizontal forces at node 1001

    F, 1001, FX, FX

    F, 1001, FY, FY

    ! Solve the model

    SOLVE

    ! Save solution results for load step 1

    SAVE, 'load_step_1'

    FINISH

    !POST

    /POST1

    set,1

    ESEL, S, TYPE, , 1 ! Select only BEAM188 elements

    ETABLE, Fx_MAX, SMISC, 1, ABSMAX ! Maximum axial force

    ETABLE, My_MAX, SMISC, 2, MAX ! Maximum bending moment in Y

    ETABLE, Mz_MAX, SMISC, 3, MAX ! Maximum bending moment in Z

    ETABLE, Fx_MIN, SMISC, 1, ABSMIN ! Minimum axial force

    ETABLE, My_MIN, SMISC, 2, MIN ! Minimum bending moment in Y

    ETABLE, Mz_MIN, SMISC, 3, MIN ! Minimum bending moment in Z

    ETABLE, U_X, U, X

    ETABLE, U_Y, U, Y

    ETABLE, U_Z, U, Z

    ! Display ETABLE results for bending moments, axial force, and displacements

    PRETAB, Fx_MAX, Fx_MIN, My_MAX, My_MIN, Mz_MAX, Mz_MIN, U_X, U_Y, U_Z

    ! Display displacement vector field

    PRNSOL, U

    ! Display displacement, rotation, and stress vectors

    PRVECT, U ! Displacement vectors

    PRVECT, ROT ! Rotation vectors

    ! Print nodal results for displacements, rotations, and stresses

    PRNSOL, U, COMP ! Displacements by component

    PRNSOL, ROT, COMP ! Rotations by component

    PRNSOL, S, COMP ! Stresses by component

    ! Constrained nodes

    PRRSOL,F

    More Vinicius Borges Balansin's questions See All
    Similar questions and discussions