Static structural analysis#

Using supplied files, this example shows how to insert a static structural analysis into a new Mechanical session and execute a sequence of Python scripting commands that define and solve the analysis. The example then shows how to report deformation results.

Download required files#

Download the required files. Print the file path for the geometry file.

import os

from ansys.mechanical.core import launch_mechanical
from ansys.mechanical.core.examples import download_file

geometry_path = download_file("example_01_geometry.agdb", "pymechanical", "00_basic")
print(f"Downloaded the geometry file to: {geometry_path}")
Downloaded the geometry file to: /home/runner/.local/share/ansys_mechanical_core/examples/example_01_geometry.agdb

Launch Mechanical#

Launch a new Mechanical session in batch, setting the cleanup_on_exit argument to False. To close this Mechanical session when finished, this example must call the mechanical.exit() method.

mechanical = launch_mechanical(batch=True, cleanup_on_exit=False)
print(mechanical)
Ansys Mechanical [Ansys Mechanical Enterprise]
Product Version:241
Software build date: 11/27/2023 10:24:20

Initialize variable for workflow#

Set the part_file_path variable on the server for later use. Make this variable compatible for Windows, Linux, and Docker containers.

project_directory = mechanical.project_directory
print(f"project directory = {project_directory}")

# Upload the file to the project directory.
mechanical.upload(file_name=geometry_path, file_location_destination=project_directory)

# Build the path relative to project directory.
base_name = os.path.basename(geometry_path)
combined_path = os.path.join(project_directory, base_name)
part_file_path = combined_path.replace("\\", "\\\\")
mechanical.run_python_script(f"part_file_path='{part_file_path}'")

# Verify the path.
result = mechanical.run_python_script("part_file_path")
print(f"part_file_path on server: {result}")
project directory = /tmp/ANSYS.root.1/AnsysMech15DD/Project_Mech_Files/

Uploading example_01_geometry.agdb to dns:///127.0.0.1:10000:/tmp/ANSYS.root.1/AnsysMech15DD/Project_Mech_Files/.:   0%|          | 0.00/17.0k [00:00<?, ?B/s]
Uploading example_01_geometry.agdb to dns:///127.0.0.1:10000:/tmp/ANSYS.root.1/AnsysMech15DD/Project_Mech_Files/.: 100%|██████████| 17.0k/17.0k [00:00<00:00, 48.0MB/s]
part_file_path on server: /tmp/ANSYS.root.1/AnsysMech15DD/Project_Mech_Files/example_01_geometry.agdb

Run the script#

Run the Mechanical script to attach the geometry and set up and solve the analysis.

output = mechanical.run_python_script(
    """
import json

# Section 1: Read geometry information
geometry_import_group_11 = Model.GeometryImportGroup
geometry_import_19 = geometry_import_group_11.AddGeometryImport()

geometry_import_19_format = Ansys.Mechanical.DataModel.Enums.GeometryImportPreference.\
    Format.Automatic
geometry_import_19_preferences = Ansys.ACT.Mechanical.Utilities.GeometryImportPreferences()
geometry_import_19_preferences.ProcessNamedSelections = True
geometry_import_19_preferences.ProcessCoordinateSystems = True

geometry_import_19.Import(part_file_path, geometry_import_19_format, geometry_import_19_preferences)

Model.AddStaticStructuralAnalysis()
STAT_STRUC = Model.Analyses[0]
CS_GRP = Model.CoordinateSystems
ANALYSIS_SETTINGS = STAT_STRUC.Children[0]
SOLN= STAT_STRUC.Solution

# Section 2: Set up the unit system.

ExtAPI.Application.ActiveUnitSystem = MechanicalUnitSystem.StandardMKS
ExtAPI.Application.ActiveAngleUnit = AngleUnitType.Radian

# Section 3: Define named selection and coordinate system.

NS1 = Model.NamedSelections.Children[0]
NS2 = Model.NamedSelections.Children[1]
NS3 = Model.NamedSelections.Children[2]
NS4 = Model.NamedSelections.Children[3]
GCS = CS_GRP.Children[0]
LCS1 = CS_GRP.Children[1]

# Section 4: Define remote point.

RMPT_GRP = Model.RemotePoints
RMPT_1 = RMPT_GRP.AddRemotePoint()
RMPT_1.Location = NS1
RMPT_1.XCoordinate=Quantity("7 [m]")
RMPT_1.YCoordinate=Quantity("0 [m]")
RMPT_1.ZCoordinate=Quantity("0 [m]")

#  Section 5: Define mesh settings.

MSH = Model.Mesh
MSH.ElementSize =Quantity("0.5 [m]")
MSH.GenerateMesh()

#  Section 6: Define boundary conditions.

# Insert fixed support.
FIX_SUP = STAT_STRUC.AddFixedSupport()
FIX_SUP.Location = NS2

# Insert frictionless support.
FRIC_SUP = STAT_STRUC.AddFrictionlessSupport()
FRIC_SUP.Location = NS3

#  Section 7: Define remote force.

REM_FRC1 = STAT_STRUC.AddRemoteForce()
REM_FRC1.Location = RMPT_1
REM_FRC1.DefineBy =LoadDefineBy.Components
REM_FRC1.XComponent.Output.DiscreteValues = [Quantity("1e10 [N]")]

#  Section 8: Define thermal condition.

THERM_COND = STAT_STRUC.AddThermalCondition()
THERM_COND.Location = NS4
THERM_COND.Magnitude.Output.DefinitionType=VariableDefinitionType.Formula
THERM_COND.Magnitude.Output.Formula="50*(20+z)"
THERM_COND.XYZFunctionCoordinateSystem=LCS1
THERM_COND.RangeMinimum=Quantity("-20 [m]")
THERM_COND.RangeMaximum=Quantity("1 [m]")

#  Section 9: Insert directional deformation.

DIR_DEF = STAT_STRUC.Solution.AddDirectionalDeformation()
DIR_DEF.Location = NS1
DIR_DEF.NormalOrientation =NormalOrientationType.XAxis

# Section 10: Add total deformation and force reaction probe.

TOT_DEF = STAT_STRUC.Solution.AddTotalDeformation()

# Add force reaction.
FRC_REAC_PROBE = STAT_STRUC.Solution.AddForceReaction()
FRC_REAC_PROBE.BoundaryConditionSelection = FIX_SUP
FRC_REAC_PROBE.ResultSelection =ProbeDisplayFilter.XAxis

# Section 11: Solve and get the results.

# Solve static analysis.
STAT_STRUC.Solution.Solve(True)

dir_deformation_details = {
"Minimum": str(DIR_DEF.Minimum),
"Maximum": str(DIR_DEF.Maximum),
"Average": str(DIR_DEF.Average),
}

json.dumps(dir_deformation_details)
"""
)
print(output)
{"Maximum": "0.10480716079473495 [m]", "Minimum": "0.10404270887374878 [m]", "Average": "0.10450263818105061 [m]"}

Download output file from solve and print contents#

Download the solve.out file from the server to the current working directory and print the contents. Remove the solve.out file.

def get_solve_out_path(mechanical):
    solve_out_path = ""
    for file_path in mechanical.list_files():
        if file_path.find("solve.out") != -1:
            solve_out_path = file_path
            break

    return solve_out_path


def write_file_contents_to_console(path):
    with open(path, "rt") as file:
        for line in file:
            print(line, end="")


solve_out_path = get_solve_out_path(mechanical)

if solve_out_path != "":
    current_working_directory = os.getcwd()

    local_file_path_list = mechanical.download(
        solve_out_path, target_dir=current_working_directory
    )
    solve_out_local_path = local_file_path_list[0]
    print(f"Local solve.out path : {solve_out_local_path}")

    write_file_contents_to_console(solve_out_local_path)

    os.remove(solve_out_local_path)
Downloading dns:///127.0.0.1:10000:/tmp/ANSYS.root.1/AnsysMech15DD/Project_Mech_Files/StaticStructural/solve.out to /home/runner/work/pymechanical-examples/pymechanical-examples/examples/00_basic/solve.out:   0%|          | 0.00/42.2k [00:00<?, ?B/s]
Downloading dns:///127.0.0.1:10000:/tmp/ANSYS.root.1/AnsysMech15DD/Project_Mech_Files/StaticStructural/solve.out to /home/runner/work/pymechanical-examples/pymechanical-examples/examples/00_basic/solve.out: 100%|██████████| 42.2k/42.2k [00:00<00:00, 174MB/s]
Local solve.out path : /home/runner/work/pymechanical-examples/pymechanical-examples/examples/00_basic/solve.out

 Ansys Mechanical Enterprise


 *------------------------------------------------------------------*
 |                                                                  |
 |   W E L C O M E   T O   T H E   A N S Y S (R)  P R O G R A M     |
 |                                                                  |
 *------------------------------------------------------------------*




 ***************************************************************
 *         ANSYS MAPDL 2024 R1          LEGAL NOTICES          *
 ***************************************************************
 *                                                             *
 * Copyright 1971-2024 Ansys, Inc.  All rights reserved.       *
 * Unauthorized use, distribution or duplication is            *
 * prohibited.                                                 *
 *                                                             *
 * Ansys is a registered trademark of Ansys, Inc. or its       *
 * subsidiaries in the United States or other countries.       *
 * See the Ansys, Inc. online documentation or the Ansys, Inc. *
 * documentation CD or online help for the complete Legal      *
 * Notice.                                                     *
 *                                                             *
 ***************************************************************
 *                                                             *
 * THIS ANSYS SOFTWARE PRODUCT AND PROGRAM DOCUMENTATION       *
 * INCLUDE TRADE SECRETS AND CONFIDENTIAL AND PROPRIETARY      *
 * PRODUCTS OF ANSYS, INC., ITS SUBSIDIARIES, OR LICENSORS.    *
 * The software products and documentation are furnished by    *
 * Ansys, Inc. or its subsidiaries under a software license    *
 * agreement that contains provisions concerning               *
 * non-disclosure, copying, length and nature of use,          *
 * compliance with exporting laws, warranties, disclaimers,    *
 * limitations of liability, and remedies, and other           *
 * provisions.  The software products and documentation may be *
 * used, disclosed, transferred, or copied only in accordance  *
 * with the terms and conditions of that software license      *
 * agreement.                                                  *
 *                                                             *
 * Ansys, Inc. is a UL registered                              *
 * ISO 9001:2015 company.                                      *
 *                                                             *
 ***************************************************************
 *                                                             *
 * This product is subject to U.S. laws governing export and   *
 * re-export.                                                  *
 *                                                             *
 * For U.S. Government users, except as specifically granted   *
 * by the Ansys, Inc. software license agreement, the use,     *
 * duplication, or disclosure by the United States Government  *
 * is subject to restrictions stated in the Ansys, Inc.        *
 * software license agreement and FAR 12.212 (for non-DOD      *
 * licenses).                                                  *
 *                                                             *
 ***************************************************************



 *------------------------------------------------------------------*
 |                    Ansys Product Improvement                     |
 |                                                                  |
 |   Ansys Product Improvement Program helps improve Ansys          |
 |   products. Participating in this program is like filling out a  |
 |   survey. Without interrupting your work, the software reports   |
 |   anonymous usage information such as errors, machine and        |
 |   solver statistics, features used, etc. to Ansys. We never      |
 |   use the data to identify or contact you.                       |
 |   The data does NOT contain:                                     |
 |   - Any personally identifiable information including names,     |
 |     IP addresses, file names, part names, etc.                   |
 |   - Any information about your geometry or design specific       |
 |     inputs.                                                      |
 |   You can stop participation at any time. To change your         |
 |   selection go to Help >> Ansys Product Improvement Program      |
 |   in the GUI.                                                    |
 |   For more information about the Ansys Privacy Policy, please    |
 |   check: http://www.ansys.com/privacy                            |
 |                                                                  |
 *------------------------------------------------------------------*


 2024 R1

 Point Releases and Patches installed:

 Ansys, Inc. License Manager 2024 R1
 Structures 2024 R1
 LS-DYNA 2024 R1
 Mechanical Products 2024 R1


          *****  MAPDL COMMAND LINE ARGUMENTS  *****
  BATCH MODE REQUESTED (-b)    = NOLIST
  INPUT FILE COPY MODE (-c)    = COPY
  DISTRIBUTED MEMORY PARALLEL REQUESTED
       4 PARALLEL PROCESSES REQUESTED WITH SINGLE THREAD PER PROCESS
    TOTAL OF     4 CORES REQUESTED
  INPUT FILE NAME              = /tmp/ANSYS.root.1/AnsysMech15DD/Project_Mech_Files/StaticStructural/dummy.dat
  OUTPUT FILE NAME             = /tmp/ANSYS.root.1/AnsysMech15DD/Project_Mech_Files/StaticStructural/solve.out
  START-UP FILE MODE           = NOREAD
  STOP FILE MODE               = NOREAD

 RELEASE= 2024 R1              BUILD= 24.1      UP20231106   VERSION=LINUX x64
 CURRENT JOBNAME=file0  08:53:36  MAY 06, 2024 CP=      0.231


 PARAMETER _DS_PROGRESS =     999.0000000

 /INPUT FILE= ds.dat  LINE=       0



 *** NOTE ***                            CP =       0.293   TIME= 08:53:36
 The /CONFIG,NOELDB command is not valid in a distributed memory
 parallel solution.  Command is ignored.

 *GET  _WALLSTRT  FROM  ACTI  ITEM=TIME WALL  VALUE=  8.89333333

 TITLE=
 --Static Structural

  ACT Extensions:
      LSDYNA, 2024.1
      5f463412-bd3e-484b-87e7-cbc0a665e474, wbex


 SET PARAMETER DIMENSIONS ON  _WB_PROJECTSCRATCH_DIR
  TYPE=STRI  DIMENSIONS=      248        1        1

 PARAMETER _WB_PROJECTSCRATCH_DIR(1) = /tmp/ANSYS.root.1/AnsysMech15DD/Project_Mech_Files/StaticStructural/

 SET PARAMETER DIMENSIONS ON  _WB_SOLVERFILES_DIR
  TYPE=STRI  DIMENSIONS=      248        1        1

 PARAMETER _WB_SOLVERFILES_DIR(1) = /tmp/ANSYS.root.1/AnsysMech15DD/Project_Mech_Files/StaticStructural/

 SET PARAMETER DIMENSIONS ON  _WB_USERFILES_DIR
  TYPE=STRI  DIMENSIONS=      248        1        1

 PARAMETER _WB_USERFILES_DIR(1) = /tmp/ANSYS.root.1/AnsysMech15DD/Project_Mech_Files/UserFiles/
 --- Data in consistent MKS units. See Solving Units in the help system for more

 MKS UNITS SPECIFIED FOR INTERNAL
  LENGTH        (l)  = METER (M)
  MASS          (M)  = KILOGRAM (KG)
  TIME          (t)  = SECOND (SEC)
  TEMPERATURE   (T)  = CELSIUS (C)
  TOFFSET            = 273.0
  CHARGE        (Q)  = COULOMB
  FORCE         (f)  = NEWTON (N) (KG-M/SEC2)
  HEAT               = JOULE (N-M)

  PRESSURE           = PASCAL (NEWTON/M**2)
  ENERGY        (W)  = JOULE (N-M)
  POWER         (P)  = WATT (N-M/SEC)
  CURRENT       (i)  = AMPERE (COULOMBS/SEC)
  CAPACITANCE   (C)  = FARAD
  INDUCTANCE    (L)  = HENRY
  MAGNETIC FLUX      = WEBER
  RESISTANCE    (R)  = OHM
  ELECTRIC POTENTIAL = VOLT

 INPUT  UNITS ARE ALSO SET TO MKS

 *** MAPDL - ENGINEERING ANALYSIS SYSTEM  RELEASE 2024 R1          24.1     ***
 Ansys Mechanical Enterprise
 00000000  VERSION=LINUX x64     08:53:36  MAY 06, 2024 CP=      0.297

 --Static Structural



          ***** MAPDL ANALYSIS DEFINITION (PREP7) *****
 *********** Nodes for the whole assembly ***********
 *********** Nodes for all Remote Points ***********

 *** WARNING ***                         CP =       0.332   TIME= 08:53:36
 -1 is not a recognized PREP7 command, abbreviation, or macro.
  This command will be ignored.
 *********** Elements for Body 1 "Part1" ***********
 *********** Elements for Body 2 "Part2" ***********
 *********** Elements for Body 3 "Part3" ***********
 *********** Elements for Body 4 "Part4" ***********
 *********** Send User Defined Coordinate System(s) ***********
 *********** Set Reference Temperature ***********
 *********** Send Materials ***********
 *********** Create Contact "Contact Region" ***********
             Real Constant Set For Above Contact Is 6 & 5
 *********** Create Contact "Contact Region 2" ***********
             Real Constant Set For Above Contact Is 8 & 7
 *********** Create Contact "Contact Region 3" ***********
             Real Constant Set For Above Contact Is 10 & 9
 *********** Send Named Selection as Node Component ***********
 *********** Send Named Selection as Node Component ***********
 *********** Send Named Selection as Node Component ***********
 *********** Send Named Selection as Element Component ***********
 *********** Fixed Supports ***********
 ********* Frictionless Supports X *********
 *********** Node Rotations ***********
 *********** Create Remote Point "Remote Point" ***********
 *********** Construct Remote Force ***********
 *********** Define Body Force Temperature ***********


 ***** ROUTINE COMPLETED *****  CP =         0.451


 --- Number of total nodes = 5853
 --- Number of contact elements = 330
 --- Number of spring elements = 0
 --- Number of bearing elements = 0
 --- Number of solid elements = 1120
 --- Number of condensed parts = 0
 --- Number of total elements = 1451

 *GET  _WALLBSOL  FROM  ACTI  ITEM=TIME WALL  VALUE=  8.89333333
 ****************************************************************************
 *************************    SOLUTION       ********************************
 ****************************************************************************

 *****  MAPDL SOLUTION ROUTINE  *****


 PERFORM A STATIC ANALYSIS
  THIS WILL BE A NEW ANALYSIS

 PARAMETER _THICKRATIO =     1.000000000

 USE PRECONDITIONED CONJUGATE GRADIENT SOLVER
  CONVERGENCE TOLERANCE = 1.00000E-08
  MAXIMUM ITERATION     = NumNode*DofPerNode*  1.0000

 CONTACT INFORMATION PRINTOUT LEVEL       1

 CHECK INITIAL OPEN/CLOSED STATUS OF SELECTED CONTACT ELEMENTS
      AND LIST DETAILED CONTACT PAIR INFORMATION

 SPLIT CONTACT SURFACES AT SOLVE PHASE

    NUMBER OF SPLITTING TBD BY PROGRAM

 DO NOT COMBINE ELEMENT MATRIX FILES (.emat) AFTER DISTRIBUTED PARALLEL SOLUTION

 DO NOT COMBINE ELEMENT SAVE DATA FILES (.esav) AFTER DISTRIBUTED PARALLEL SOLUTION

 NLDIAG: Nonlinear diagnostics CONT option is set to ON.
         Writing frequency : each ITERATION.

 DO NOT SAVE ANY RESTART FILES AT ALL
 ****************************************************
 ******************* SOLVE FOR LS 1 OF 1 ****************

 SELECT       FOR ITEM=NODE COMPONENT=
  IN RANGE      5853 TO       5853 STEP          1

          1  NODES (OF       5853  DEFINED) SELECTED BY  NSEL  COMMAND.

 SPECIFIED NODAL LOAD FX   FOR SELECTED NODES         1 TO     5853 BY        1
  REAL= 1.000000000E+10   IMAG=  0.00000000

 SPECIFIED NODAL LOAD FY   FOR SELECTED NODES         1 TO     5853 BY        1
  REAL=  0.00000000       IMAG=  0.00000000

 SPECIFIED NODAL LOAD FZ   FOR SELECTED NODES         1 TO     5853 BY        1
  REAL=  0.00000000       IMAG=  0.00000000

 ALL SELECT   FOR ITEM=NODE COMPONENT=
  IN RANGE         1 TO       5853 STEP          1

       5853  NODES (OF       5853  DEFINED) SELECTED BY NSEL  COMMAND.

 PRINTOUT RESUMED BY /GOP

 USE       1 SUBSTEPS INITIALLY THIS LOAD STEP FOR ALL  DEGREES OF FREEDOM
 FOR AUTOMATIC TIME STEPPING:
   USE      1 SUBSTEPS AS A MAXIMUM
   USE      1 SUBSTEPS AS A MINIMUM

 TIME=  1.0000

 ERASE THE CURRENT DATABASE OUTPUT CONTROL TABLE.


 WRITE ALL  ITEMS TO THE DATABASE WITH A FREQUENCY OF NONE
   FOR ALL APPLICABLE ENTITIES

 WRITE NSOL ITEMS TO THE DATABASE WITH A FREQUENCY OF ALL
   FOR ALL APPLICABLE ENTITIES

 WRITE RSOL ITEMS TO THE DATABASE WITH A FREQUENCY OF ALL
   FOR ALL APPLICABLE ENTITIES

 WRITE EANG ITEMS TO THE DATABASE WITH A FREQUENCY OF ALL
   FOR ALL APPLICABLE ENTITIES

 WRITE ETMP ITEMS TO THE DATABASE WITH A FREQUENCY OF ALL
   FOR ALL APPLICABLE ENTITIES

 WRITE VENG ITEMS TO THE DATABASE WITH A FREQUENCY OF ALL
   FOR ALL APPLICABLE ENTITIES

 WRITE STRS ITEMS TO THE DATABASE WITH A FREQUENCY OF ALL
   FOR ALL APPLICABLE ENTITIES

 WRITE EPEL ITEMS TO THE DATABASE WITH A FREQUENCY OF ALL
   FOR ALL APPLICABLE ENTITIES

 WRITE EPPL ITEMS TO THE DATABASE WITH A FREQUENCY OF ALL
   FOR ALL APPLICABLE ENTITIES

 WRITE EPTH ITEMS TO THE DATABASE WITH A FREQUENCY OF ALL
   FOR ALL APPLICABLE ENTITIES

 WRITE CONT ITEMS TO THE DATABASE WITH A FREQUENCY OF ALL
   FOR ALL APPLICABLE ENTITIES

 *GET  ANSINTER_  FROM  ACTI  ITEM=INT        VALUE=  0.00000000

 *IF  ANSINTER_                         ( =   0.00000     )  NE
      0                                 ( =   0.00000     )  THEN

 *ENDIF

 *** NOTE ***                            CP =       0.592   TIME= 08:53:36
 The automatic domain decomposition logic has selected the MESH domain
 decomposition method with 4 processes per solution.

 *****  MAPDL SOLVE    COMMAND  *****

 *** WARNING ***                         CP =       0.601   TIME= 08:53:36
 Element shape checking is currently inactive.  Issue SHPP,ON or
 SHPP,WARN to reactivate, if desired.

 *** NOTE ***                            CP =       0.622   TIME= 08:53:36
 The model data was checked and warning messages were found.
  Please review output or errors file (
 /tmp/ANSYS.root.1/AnsysMech15DD/Project_Mech_Files/StaticStructural/fil
 le0.err ) for these warning messages.

 *** SELECTION OF ELEMENT TECHNOLOGIES FOR APPLICABLE ELEMENTS ***
      --- GIVE SUGGESTIONS AND RESET THE KEY OPTIONS ---

 ELEMENT TYPE         1 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED AND HAS BEEN RESET.
  KEYOPT(1-12)=    0    0    0    0    0    0    0    0    0    0    0    0

 ELEMENT TYPE         2 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED AND HAS BEEN RESET.
  KEYOPT(1-12)=    0    0    0    0    0    0    0    0    0    0    0    0

 ELEMENT TYPE         3 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED AND HAS BEEN RESET.
  KEYOPT(1-12)=    0    0    0    0    0    0    0    0    0    0    0    0

 ELEMENT TYPE         4 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED AND HAS BEEN RESET.
  KEYOPT(1-12)=    0    0    0    0    0    0    0    0    0    0    0    0



 *** MAPDL - ENGINEERING ANALYSIS SYSTEM  RELEASE 2024 R1          24.1     ***
 Ansys Mechanical Enterprise
 00000000  VERSION=LINUX x64     08:53:36  MAY 06, 2024 CP=      0.624

 --Static Structural



                       S O L U T I O N   O P T I O N S

   PROBLEM DIMENSIONALITY. . . . . . . . . . . . .3-D
   DEGREES OF FREEDOM. . . . . . UX   UY   UZ   ROTX ROTY ROTZ
   ANALYSIS TYPE . . . . . . . . . . . . . . . . .STATIC (STEADY-STATE)
   OFFSET TEMPERATURE FROM ABSOLUTE ZERO . . . . .  273.15
   EQUATION SOLVER OPTION. . . . . . . . . . . . .PCG
      TOLERANCE. . . . . . . . . . . . . . . . . . 1.00000E-08
   GLOBALLY ASSEMBLED MATRIX . . . . . . . . . . .SYMMETRIC

 *** NOTE ***                            CP =       0.631   TIME= 08:53:36
 The conditions for direct assembly have been met.  No .emat or .erot
 files will be produced.

 CHECK INITIAL OPEN/CLOSED STATUS OF SELECTED CONTACT ELEMENTS
      AND LIST DETAILED CONTACT PAIR INFORMATION

 *** NOTE ***                            CP =       0.638   TIME= 08:53:36
 Internal nodes from 5854 to 5854 are created.
 1 internal nodes are used for handling degrees of freedom on pilot
 nodes of rigid target surfaces.

 *** NOTE ***                            CP =       0.649   TIME= 08:53:36
 Internal nodes from 5854 to 5854 are created.
 1 internal nodes are used for handling degrees of freedom on pilot
 nodes of rigid target surfaces.

      76 CONTACT ELEMENTS &      76 TARGET ELEMENTS ARE UNSELECTED FOR PREPARATION OF          SPLITTING.
       3 CONTACT PAIRS ARE UNSELECTED.

 *** NOTE ***                            CP =       0.856   TIME= 08:53:36
 The maximum number of contact elements in any single contact pair is
 26, which is smaller than the optimal domain size of 120 elements for
 the given number of CPU domains (4).  Therefore, no contact pairs are
 being split by the CNCH,DMP logic.

 BECAUSE SPLIT WAS NOT DONE FOR CONNECT REGION(S), UNSELECTED ELEMENTS ARE REVERTED (SELECTED).

 *** NOTE ***                            CP =       0.864   TIME= 08:53:36
 Internal nodes from 5854 to 5854 are created.
 1 internal nodes are used for handling degrees of freedom on pilot
 nodes of rigid target surfaces.

 *** NOTE ***                            CP =       0.881   TIME= 08:53:36
 Internal nodes from 5854 to 5854 are created.
 1 internal nodes are used for handling degrees of freedom on pilot
 nodes of rigid target surfaces.

 *** NOTE ***                            CP =       1.075   TIME= 08:53:36
 Symmetric Deformable- deformable contact pair identified by real
 constant set 5 and contact element type 5 has been set up.  The
 companion pair has real constant set ID 6.  Both pairs should have the
 same behavior.
 MAPDL will keep the current pair and deactivate its companion pair,
 resulting in asymmetric contact.
 Linear contact is defined
 Contact algorithm: Augmented Lagrange method
 Contact detection at: Gauss integration point
 Contact stiffness factor FKN                  10.000
 The resulting initial contact stiffness      0.88000E+14
 Default penetration tolerance factor FTOLN   0.10000
 The resulting penetration tolerance          0.40000E-01
 Default opening contact stiffness OPSF will be used.
 Default tangent stiffness factor FKT          1.0000
 Use constant contact stiffness
 Default Max. friction stress TAUMAX          0.10000E+21
 Average contact surface length               0.35821
 Average contact pair depth                   0.40000
 Average target surface length                0.34527
 Default pinball region factor PINB           0.25000
 The resulting pinball region                 0.10000
 Initial penetration/gap is excluded.
 Bonded contact (always) is defined.

 *** NOTE ***                            CP =       1.075   TIME= 08:53:36
 Max.  Initial penetration 4.440892099E-16 was detected between contact
 element 1965 and target element 2013.
 ****************************************


 *** NOTE ***                            CP =       1.076   TIME= 08:53:36
 Symmetric Deformable- deformable contact pair identified by real
 constant set 6 and contact element type 5 has been set up.  The
 companion pair has real constant set ID 5.  Both pairs should have the
 same behavior.
 MAPDL will deactivate the current pair and keep its companion pair,
 resulting in asymmetric contact.
 Linear contact is defined
 Contact algorithm: Augmented Lagrange method
 Contact detection at: Gauss integration point
 Contact stiffness factor FKN                  10.000
 The resulting initial contact stiffness      0.88000E+14
 Default penetration tolerance factor FTOLN   0.10000
 The resulting penetration tolerance          0.45455E-01
 Default opening contact stiffness OPSF will be used.
 Default tangent stiffness factor FKT          1.0000
 Use constant contact stiffness
 Default Max. friction stress TAUMAX          0.10000E+21
 Average contact surface length               0.33904
 Average contact pair depth                   0.45455
 Average target surface length                0.36302
 Default pinball region factor PINB           0.25000
 The resulting pinball region                 0.11364
 Initial penetration/gap is excluded.
 Bonded contact (always) is defined.

 *** NOTE ***                            CP =       1.076   TIME= 08:53:36
 Max.  Initial penetration 4.440892099E-16 was detected between contact
 element 1988 and target element 1959.
 ****************************************


 *** NOTE ***                            CP =       1.076   TIME= 08:53:36
 Symmetric Deformable- deformable contact pair identified by real
 constant set 7 and contact element type 7 has been set up.  The
 companion pair has real constant set ID 8.  Both pairs should have the
 same behavior.
 MAPDL will keep the current pair and deactivate its companion pair,
 resulting in asymmetric contact.
 Linear contact is defined
 Contact algorithm: Augmented Lagrange method
 Contact detection at: Gauss integration point
 Contact stiffness factor FKN                  10.000
 The resulting initial contact stiffness      0.84000E+14
 Default penetration tolerance factor FTOLN   0.10000
 The resulting penetration tolerance          0.45455E-01
 Default opening contact stiffness OPSF will be used.
 Default tangent stiffness factor FKT          1.0000
 Use constant contact stiffness
 Default Max. friction stress TAUMAX          0.10000E+21
 Average contact surface length               0.35806
 Average contact pair depth                   0.45455
 Average target surface length                0.34573
 Default pinball region factor PINB           0.25000
 The resulting pinball region                 0.11364
 Initial penetration/gap is excluded.
 Bonded contact (always) is defined.

 *** NOTE ***                            CP =       1.077   TIME= 08:53:36
 Max.  Initial penetration 1.776356839E-15 was detected between contact
 element 2072 and target element 2126.
 ****************************************


 *** NOTE ***                            CP =       1.077   TIME= 08:53:36
 Symmetric Deformable- deformable contact pair identified by real
 constant set 8 and contact element type 7 has been set up.  The
 companion pair has real constant set ID 7.  Both pairs should have the
 same behavior.
 MAPDL will deactivate the current pair and keep its companion pair,
 resulting in asymmetric contact.
 Linear contact is defined
 Contact algorithm: Augmented Lagrange method
 Contact detection at: Gauss integration point
 Contact stiffness factor FKN                  10.000
 The resulting initial contact stiffness      0.84000E+14
 Default penetration tolerance factor FTOLN   0.10000
 The resulting penetration tolerance          0.47619E-01
 Default opening contact stiffness OPSF will be used.
 Default tangent stiffness factor FKT          1.0000
 Use constant contact stiffness
 Default Max. friction stress TAUMAX          0.10000E+21
 Average contact surface length               0.36299
 Average contact pair depth                   0.47619
 Average target surface length                0.34527
 Default pinball region factor PINB           0.25000
 The resulting pinball region                 0.11905
 Initial penetration/gap is excluded.
 Bonded contact (always) is defined.

 *** NOTE ***                            CP =       1.077   TIME= 08:53:36
 Max.  Initial penetration 2.664535259E-15 was detected between contact
 element 2093 and target element 2042.
 ****************************************


 *** NOTE ***                            CP =       1.077   TIME= 08:53:36
 Symmetric Deformable- deformable contact pair identified by real
 constant set 9 and contact element type 9 has been set up.  The
 companion pair has real constant set ID 10.  Both pairs should have
 the same behavior.
 MAPDL will keep the current pair and deactivate its companion pair,
 resulting in asymmetric contact.
 Linear contact is defined
 Contact algorithm: Augmented Lagrange method
 Contact detection at: Gauss integration point
 Contact stiffness factor FKN                  10.000
 The resulting initial contact stiffness      0.84000E+14
 Default penetration tolerance factor FTOLN   0.10000
 The resulting penetration tolerance          0.47619E-01
 Default opening contact stiffness OPSF will be used.
 Default tangent stiffness factor FKT          1.0000
 Use constant contact stiffness
 Default Max. friction stress TAUMAX          0.10000E+21
 Average contact surface length               0.33559
 Average contact pair depth                   0.47619
 Average target surface length                0.36304
 Default pinball region factor PINB           0.25000
 The resulting pinball region                 0.11905
 Initial penetration/gap is excluded.
 Bonded contact (always) is defined.

 *** NOTE ***                            CP =       1.078   TIME= 08:53:36
 Max.  Initial penetration 3.552713679E-15 was detected between contact
 element 2171 and target element 2222.
 ****************************************


 *** NOTE ***                            CP =       1.078   TIME= 08:53:36
 Symmetric Deformable- deformable contact pair identified by real
 constant set 10 and contact element type 9 has been set up.  The
 companion pair has real constant set ID 9.  Both pairs should have the
 same behavior.
 MAPDL will deactivate the current pair and keep its companion pair,
 resulting in asymmetric contact.
 Linear contact is defined
 Contact algorithm: Augmented Lagrange method
 Contact detection at: Gauss integration point
 Contact stiffness factor FKN                  10.000
 The resulting initial contact stiffness      0.84000E+14
 Default penetration tolerance factor FTOLN   0.10000
 The resulting penetration tolerance          0.42857E-01
 Default opening contact stiffness OPSF will be used.
 Default tangent stiffness factor FKT          1.0000
 Use constant contact stiffness
 Default Max. friction stress TAUMAX          0.10000E+21
 Average contact surface length               0.38169
 Average contact pair depth                   0.42857
 Average target surface length                0.34573
 Default pinball region factor PINB           0.25000
 The resulting pinball region                 0.10714
 Initial penetration/gap is excluded.
 Bonded contact (always) is defined.

 *** NOTE ***                            CP =       1.078   TIME= 08:53:36
 Max.  Initial penetration 3.552713679E-15 was detected between contact
 element 2194 and target element 2158.
 ****************************************


 *** NOTE ***                            CP =       1.079   TIME= 08:53:36
 Force-distributed-surface identified by real constant set 11 and
 contact element type 11 has been set up.  The pilot node 5853 is used
 to apply the force.  Internal MPC will be built.
 The used degrees of freedom set is  UX   UY   UZ   ROTX ROTY ROTZ
 Please verify constraints (including rotational degrees of freedom)
  on the pilot node by yourself.
 ****************************************




 *** NOTE ***                            CP =       1.085   TIME= 08:53:36
 Internal nodes from 5854 to 5854 are created.
 1 internal nodes are used for handling degrees of freedom on pilot
 nodes of rigid target surfaces.



     D I S T R I B U T E D   D O M A I N   D E C O M P O S E R

  ...Number of elements: 1451
  ...Number of nodes:    5854
  ...Decompose to 4 CPU domains
  ...Element load balance ratio =     1.046


                      L O A D   S T E P   O P T I O N S

   LOAD STEP NUMBER. . . . . . . . . . . . . . . .     1
   TIME AT END OF THE LOAD STEP. . . . . . . . . .  1.0000
   NUMBER OF SUBSTEPS. . . . . . . . . . . . . . .     1
   STEP CHANGE BOUNDARY CONDITIONS . . . . . . . .    NO
   PRINT OUTPUT CONTROLS . . . . . . . . . . . . .NO PRINTOUT
   DATABASE OUTPUT CONTROLS
      ITEM     FREQUENCY   COMPONENT
       ALL       NONE
      NSOL        ALL
      RSOL        ALL
      EANG        ALL
      ETMP        ALL
      VENG        ALL
      STRS        ALL
      EPEL        ALL
      EPPL        ALL
      EPTH        ALL
      CONT        ALL


 SOLUTION MONITORING INFO IS WRITTEN TO FILE= file.mntr


 *** NOTE ***                            CP =       1.576   TIME= 08:53:36
 The PCG solver has automatically set the level of difficulty for this
 model to 2.


                         ***********  PRECISE MASS SUMMARY  ***********

   TOTAL RIGID BODY MASS MATRIX ABOUT ORIGIN
               Translational mass               |   Coupled translational/rotational mass
        0.49319E+06    0.0000        0.0000     |     0.0000       0.71581E-03  -0.99840E-03
         0.0000       0.49319E+06    0.0000     |   -0.71581E-03    0.0000       0.49319E+07
         0.0000        0.0000       0.49319E+06 |    0.99840E-03  -0.49319E+07    0.0000
     ------------------------------------------ | ------------------------------------------
                                                |         Rotational mass (inertia)
                                                |    0.24657E+06  -0.10441E-01  -0.84927E-02
                                                |   -0.10441E-01   0.65882E+08   0.38797E-02
                                                |   -0.84927E-02   0.38797E-02   0.65882E+08

   TOTAL MASS = 0.49319E+06
     The mass principal axes coincide with the global Cartesian axes

   CENTER OF MASS (X,Y,Z)=    10.000       0.20244E-08   0.14514E-08

   TOTAL INERTIA ABOUT CENTER OF MASS
        0.24657E+06  -0.45689E-03  -0.13346E-02
       -0.45689E-03   0.16563E+08   0.38797E-02
       -0.13346E-02   0.38797E-02   0.16563E+08
     The inertia principal axes coincide with the global Cartesian axes


  *** MASS SUMMARY BY ELEMENT TYPE ***

  TYPE      MASS
     1   49318.9
     2   123297.
     3   246594.
     4   73978.3

 Range of element maximum matrix coefficients in global coordinates
 Maximum = 4.56569776E+12 at element 2188.
 Minimum = 7.008802843E+10 at element 81.

   *** ELEMENT MATRIX FORMULATION TIMES
     TYPE    NUMBER   ENAME      TOTAL CP  AVE CP

        1       120  SOLID186      0.032   0.000264
        2       286  SOLID186      0.063   0.000219
        3       546  SOLID186      0.214   0.000391
        4       168  SOLID186      0.029   0.000171
        5        50  CONTA174      0.011   0.000222
        6        50  TARGE170      0.000   0.000002
        7        52  CONTA174      0.014   0.000275
        8        52  TARGE170      0.000   0.000002
        9        50  CONTA174      0.011   0.000212
       10        50  TARGE170      0.000   0.000002
       11        26  CONTA174      0.000   0.000006
       12         1  TARGE170      0.000   0.000008
 Time at end of element matrix formulation CP = 1.90005589.
 Iteration=     5 Ratio=  0.259618     Limit=  1.000000E-08 Wall=     0.0
 Iteration=    40 Ratio=  8.829007E-04 Limit=  1.000000E-08 Wall=     0.0
 Iteration=   120 Ratio=  2.445520E-06 Limit=  1.000000E-08 Wall=     0.1

 DISTRIBUTED PCG SOLVER SOLUTION CONVERGED

 DISTRIBUTED PCG SOLVER SOLUTION STATISTICS

   NUMBER OF ITERATIONS=         205
   NUMBER OF EQUATIONS =       17568
   LEVEL OF CONVERGENCE=           1
   CALCULATED NORM     = 0.86449E-08
   SPECIFIED TOLERANCE = 0.10000E-07
   TOTAL CPU TIME (sec)=        0.17
   TOTAL WALL TIME(sec)=        0.18
   TOTAL MEMORY (GB)   =        0.02


   *** ELEMENT RESULT CALCULATION TIMES
     TYPE    NUMBER   ENAME      TOTAL CP  AVE CP

        1       120  SOLID186      0.011   0.000088
        2       286  SOLID186      0.026   0.000089
        3       546  SOLID186      0.048   0.000088
        4       168  SOLID186      0.014   0.000086
        5        50  CONTA174      0.002   0.000047
        7        52  CONTA174      0.003   0.000050
        9        50  CONTA174      0.002   0.000049
       11        26  CONTA174      0.000   0.000002

   *** NODAL LOAD CALCULATION TIMES
     TYPE    NUMBER   ENAME      TOTAL CP  AVE CP

        1       120  SOLID186      0.002   0.000016
        2       286  SOLID186      0.005   0.000016
        3       546  SOLID186      0.009   0.000016
        4       168  SOLID186      0.003   0.000015
        5        50  CONTA174      0.000   0.000010
        7        52  CONTA174      0.001   0.000014
        9        50  CONTA174      0.001   0.000010
       11        26  CONTA174      0.000   0.000000
 *** LOAD STEP     1   SUBSTEP     1  COMPLETED.    CUM ITER =      1
 *** TIME =   1.00000         TIME INC =   1.00000      NEW TRIANG MATRIX


 *** MAPDL BINARY FILE STATISTICS
  BUFFER SIZE USED= 16384
        0.562 MB WRITTEN ON ELEMENT SAVED DATA FILE: file0.esav
        0.750 MB WRITTEN ON RESULTS FILE: file0.rst
 *************** Write FE CONNECTORS *********

 WRITE OUT CONSTRAINT EQUATIONS TO FILE= file.ce
 ****************************************************
 *************** FINISHED SOLVE FOR LS 1 *************

 *GET  _WALLASOL  FROM  ACTI  ITEM=TIME WALL  VALUE=  8.89361111

 PRINTOUT RESUMED BY /GOP

 *GET  _PCGITER  FROM  ACTI  ITEM=SOLU CGIT  VALUE=  205.000000

 FINISH SOLUTION PROCESSING


 ***** ROUTINE COMPLETED *****  CP =         2.151



 *** MAPDL - ENGINEERING ANALYSIS SYSTEM  RELEASE 2024 R1          24.1     ***
 Ansys Mechanical Enterprise
 00000000  VERSION=LINUX x64     08:53:37  MAY 06, 2024 CP=      2.152

 --Static Structural



          ***** MAPDL RESULTS INTERPRETATION (POST1) *****

 *** NOTE ***                            CP =       2.153   TIME= 08:53:37
 Reading results into the database (SET command) will update the current
 displacement and force boundary conditions in the database with the
 values from the results file for that load set.  Note that any
 subsequent solutions will use these values unless action is taken to
 either SAVE the current values or not overwrite them (/EXIT,NOSAVE).

 Set Encoding of XML File to:ISO-8859-1

 Set Output of XML File to:
     PARM,     ,     ,     ,     ,     ,     ,     ,     ,     ,     ,     ,
         ,     ,     ,     ,     ,     ,     ,

 DATABASE WRITTEN ON FILE  parm.xml

 EXIT THE MAPDL POST1 DATABASE PROCESSOR


 ***** ROUTINE COMPLETED *****  CP =         2.155



 PRINTOUT RESUMED BY /GOP

 *GET  _WALLDONE  FROM  ACTI  ITEM=TIME WALL  VALUE=  8.89361111

 PARAMETER _PREPTIME =     0.000000000

 PARAMETER _SOLVTIME =     1.000000000

 PARAMETER _POSTTIME =     0.000000000

 PARAMETER _TOTALTIM =     1.000000000

 *GET  _DLBRATIO  FROM  ACTI  ITEM=SOLU DLBR  VALUE=  1.04573171

 *GET  _COMBTIME  FROM  ACTI  ITEM=SOLU COMB  VALUE= 0.583940285E-02

 *GET  _SSMODE   FROM  ACTI  ITEM=SOLU SSMM  VALUE=  0.00000000

 *GET  _NDOFS    FROM  ACTI  ITEM=SOLU NDOF  VALUE=  15136.0000

 *GET  _SOL_END_TIME  FROM  ACTI  ITEM=SET  TIME  VALUE=  1.00000000

 *IF  _sol_end_time                     ( =   1.00000     )  EQ
      1.000000                          ( =   1.00000     )  THEN

 /FCLEAN COMMAND REMOVING ALL LOCAL FILES

 *ENDIF
 --- Total number of nodes = 5853
 --- Total number of elements = 1451
 --- Element load balance ratio = 1.04573171
 --- Time to combine distributed files = 5.839402851E-03
 --- Sparse memory mode = 0
 --- Number of DOF = 15136

 EXIT MAPDL WITHOUT SAVING DATABASE


 NUMBER OF WARNING MESSAGES ENCOUNTERED=          2
 NUMBER OF ERROR   MESSAGES ENCOUNTERED=          0

+--------------------- M A P D L   S T A T I S T I C S ------------------------+

Release: 2024 R1            Build: 24.1       Update: UP20231106   Platform: LINUX x64
Date Run: 05/06/2024   Time: 08:53     Process ID: 1580
Operating System: Ubuntu 20.04.6 LTS

Processor Model: AMD EPYC 7763 64-Core Processor

Compiler: Intel(R) Fortran Compiler Classic Version 2021.9  (Build: 20230302)
          Intel(R) C/C++ Compiler Classic Version 2021.9  (Build: 20230302)
          Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122
          BLAS Library supplied by AMD BLIS

Number of machines requested            :    1
Total number of cores available         :    8
Number of physical cores available      :    4
Number of processes requested           :    4
Number of threads per process requested :    1
Total number of cores requested         :    4 (Distributed Memory Parallel)
MPI Type: INTELMPI
MPI Version: Intel(R) MPI Library 2021.10 for Linux* OS


GPU Acceleration: Not Requested

Job Name: file0
Input File: dummy.dat

  Core                Machine Name   Working Directory
 -----------------------------------------------------
     0                d0781433be37   /tmp/ANSYS.root.1/AnsysMech15DD/Project_Mech_Files/StaticStructural
     1                d0781433be37   /tmp/ANSYS.root.1/AnsysMech15DD/Project_Mech_Files/StaticStructural
     2                d0781433be37   /tmp/ANSYS.root.1/AnsysMech15DD/Project_Mech_Files/StaticStructural
     3                d0781433be37   /tmp/ANSYS.root.1/AnsysMech15DD/Project_Mech_Files/StaticStructural

Latency time from master to core     1 =    2.222 microseconds
Latency time from master to core     2 =    2.231 microseconds
Latency time from master to core     3 =    1.941 microseconds

Communication speed from master to core     1 = 11372.79 MB/sec
Communication speed from master to core     2 = 16092.39 MB/sec
Communication speed from master to core     3 = 15263.70 MB/sec

Total CPU time for main thread                    :        1.2 seconds
Total CPU time summed for all threads             :        2.8 seconds

Elapsed time spent obtaining a license            :        0.3 seconds
Elapsed time spent pre-processing model (/PREP7)  :        0.0 seconds
Elapsed time spent solution - preprocessing       :        0.2 seconds
Elapsed time spent computing solution             :        0.4 seconds
Elapsed time spent solution - postprocessing      :        0.0 seconds
Elapsed time spent post-processing model (/POST1) :        0.0 seconds

Equation solver used                              :            PCG (symmetric)
Equation solver computational rate                :       27.2 Gflops

Sum of disk space used on all processes           :       18.7 MB

Sum of memory used on all processes               :      216.0 MB
Sum of memory allocated on all processes          :     2880.0 MB
Physical memory available                         :         31 GB
Total amount of I/O written to disk               :        0.0 GB
Total amount of I/O read from disk                :        0.0 GB

+------------------ E N D   M A P D L   S T A T I S T I C S -------------------+


 *-----------------------------------------------------------------------------*
 |                                                                             |
 |                               RUN COMPLETED                                 |
 |                                                                             |
 |-----------------------------------------------------------------------------|
 |                                                                             |
 |  Ansys MAPDL 2024 R1         Build 24.1         UP20231106    LINUX x64     |
 |                                                                             |
 |-----------------------------------------------------------------------------|
 |                                                                             |
 |  Database Requested(-db)     1024 MB     Scratch Memory Requested   1024 MB |
 |  Max Database Used(Master)      6 MB     Max Scratch Used(Master)     60 MB |
 |  Max Database Used(Workers)     1 MB     Max Scratch Used(Workers)    49 MB |
 |  Sum Database Used(All)         9 MB     Sum Scratch Used(All)       207 MB |
 |                                                                             |
 |-----------------------------------------------------------------------------|
 |                                                                             |
 |        CP Time      (sec) =          2.752       Time  =  08:53:37          |
 |        Elapsed Time (sec) =          3.000       Date  =  05/06/2024        |
 |                                                                             |
 *-----------------------------------------------------------------------------*

Close Mechanical#

Close the Mechanical session.

mechanical.exit()

Total running time of the script: (0 minutes 17.355 seconds)

Gallery generated by Sphinx-Gallery