.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/gallery_examples/00_basic/example_01_simple_structural_solve.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end <sphx_glr_download_examples_gallery_examples_00_basic_example_01_simple_structural_solve.py>` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_gallery_examples_00_basic_example_01_simple_structural_solve.py: .. _ref_example_01_simple_structural_solve: 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. Deformation results are then reported. .. GENERATED FROM PYTHON SOURCE LINES 13-16 Download required files ~~~~~~~~~~~~~~~~~~~~~~~ Download the required files. Print the file path for the geometry file. .. GENERATED FROM PYTHON SOURCE LINES 16-24 .. code-block:: default 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}") .. rst-class:: sphx-glr-script-out .. code-block:: none Downloaded the geometry file to: /home/runner/.local/share/ansys_mechanical_core/examples/example_01_geometry.agdb .. GENERATED FROM PYTHON SOURCE LINES 25-30 Launch Mechanical ~~~~~~~~~~~~~~~~~ Launch a new Mechanical session in batch, setting ``cleanup_on_exit`` to ``False``. To close this Mechanical session when finished, this example must call the ``mechanical.exit()`` method. .. GENERATED FROM PYTHON SOURCE LINES 30-34 .. code-block:: default mechanical = launch_mechanical(batch=True, cleanup_on_exit=False) print(mechanical) .. rst-class:: sphx-glr-script-out .. code-block:: none Ansys Mechanical [Ansys Mechanical Enterprise] Product Version:231 Software build date:Sat Nov 26 20:15:28 2022 .. GENERATED FROM PYTHON SOURCE LINES 35-39 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. .. GENERATED FROM PYTHON SOURCE LINES 39-56 .. code-block:: default 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}") .. rst-class:: sphx-glr-script-out .. code-block:: none project directory = /tmp/AnsysMech59BE/Project_Mech_Files/ Uploading example_01_geometry.agdb to 127.0.0.1:10000:/tmp/AnsysMech59BE/Project_Mech_Files/.: 0%| | 0.00/17.0k [00:00<?, ?B/s] Uploading example_01_geometry.agdb to 127.0.0.1:10000:/tmp/AnsysMech59BE/Project_Mech_Files/.: 100%|##########| 17.0k/17.0k [00:00<00:00, 51.1MB/s] part_file_path on server: /tmp/AnsysMech59BE/Project_Mech_Files/example_01_geometry.agdb .. GENERATED FROM PYTHON SOURCE LINES 57-61 Execute the script ~~~~~~~~~~~~~~~~~~ Run the Mechanical script to attach the geometry and set up and solve the analysis. .. GENERATED FROM PYTHON SOURCE LINES 61-171 .. code-block:: default output = mechanical.run_python_script( """ import json 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 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) .. rst-class:: sphx-glr-script-out .. code-block:: none {"Maximum": "0.10504423081874847 [m]", "Minimum": "0.10393808782100677 [m]", "Average": "0.10450992125204239 [m]"} .. GENERATED FROM PYTHON SOURCE LINES 172-176 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. .. GENERATED FROM PYTHON SOURCE LINES 176-205 .. code-block:: default 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) .. rst-class:: sphx-glr-script-out .. code-block:: none Downloading 127.0.0.1:10000:/tmp/AnsysMech59BE/Project_Mech_Files/StaticStructural/solve.out to /home/runner/work/pymechanical/pymechanical/examples/00_basic/solve.out: 0%| | 0.00/40.5k [00:00<?, ?B/s] Downloading 127.0.0.1:10000:/tmp/AnsysMech59BE/Project_Mech_Files/StaticStructural/solve.out to /home/runner/work/pymechanical/pymechanical/examples/00_basic/solve.out: 100%|##########| 40.5k/40.5k [00:00<00:00, 240MB/s] Local solve.out path : /home/runner/work/pymechanical/pymechanical/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 2023 R1 LEGAL NOTICES * *************************************************************** * * * Copyright 1971-2023 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 | | | *------------------------------------------------------------------* 2023 R1 Point Releases and Patches installed: Ansys, Inc. License Manager 2023 R1 Ansys, Inc. Products 2023 R1 Mechanical Products 2023 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/AnsysMech59BE/Project_Mech_Files/StaticStructural/dummy.dat OUTPUT FILE NAME = /tmp/AnsysMech59BE/Project_Mech_Files/StaticStructural/solve.out START-UP FILE MODE = NOREAD STOP FILE MODE = NOREAD RELEASE= 2023 R1 BUILD= 23.1 UP20221128 VERSION=LINUX x64 CURRENT JOBNAME=file0 13:19:33 JUL 27, 2023 CP= 0.227 PARAMETER _DS_PROGRESS = 999.0000000 /INPUT FILE= ds.dat LINE= 0 *** NOTE *** CP = 0.281 TIME= 13:19:33 The /CONFIG,NOELDB command is not valid in a distributed memory parallel solution. Command is ignored. *GET _WALLSTRT FROM ACTI ITEM=TIME WALL VALUE= 13.3258333 TITLE= --Static Structural ACT Extensions: LSDYNA, 2023.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/AnsysMech59BE/Project_Mech_Files/StaticStructural/ SET PARAMETER DIMENSIONS ON _WB_SOLVERFILES_DIR TYPE=STRI DIMENSIONS= 248 1 1 PARAMETER _WB_SOLVERFILES_DIR(1) = /tmp/AnsysMech59BE/Project_Mech_Files/StaticStructural/ SET PARAMETER DIMENSIONS ON _WB_USERFILES_DIR TYPE=STRI DIMENSIONS= 248 1 1 PARAMETER _WB_USERFILES_DIR(1) = /tmp/Auser_files/ --- 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 2023 R1 23.1 *** Ansys Mechanical Enterprise 00000000 VERSION=LINUX x64 13:19:33 JUL 27, 2023 CP= 0.285 --Static Structural ***** MAPDL ANALYSIS DEFINITION (PREP7) ***** *********** Nodes for the whole assembly *********** *********** Nodes for all Remote Points *********** *** WARNING *** CP = 0.317 TIME= 13:19:33 -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.427 --- Number of total nodes = 5759 --- Number of contact elements = 320 --- Number of spring elements = 0 --- Number of bearing elements = 0 --- Number of solid elements = 1098 --- Number of condensed parts = 0 --- Number of total elements = 1419 *GET _WALLBSOL FROM ACTI ITEM=TIME WALL VALUE= 13.3258333 **************************************************************************** ************************* 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 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 5759 TO 5759 STEP 1 1 NODES (OF 5759 DEFINED) SELECTED BY NSEL COMMAND. SPECIFIED NODAL LOAD FX FOR SELECTED NODES 1 TO 5759 BY 1 REAL= 1.000000000E+10 IMAG= 0.00000000 SPECIFIED NODAL LOAD FY FOR SELECTED NODES 1 TO 5759 BY 1 REAL= 0.00000000 IMAG= 0.00000000 SPECIFIED NODAL LOAD FZ FOR SELECTED NODES 1 TO 5759 BY 1 REAL= 0.00000000 IMAG= 0.00000000 ALL SELECT FOR ITEM=NODE COMPONENT= IN RANGE 1 TO 5759 STEP 1 5759 NODES (OF 5759 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.548 TIME= 13:19:33 The automatic domain decomposition logic has selected the MESH domain decomposition method with 4 processes per solution. ***** MAPDL SOLVE COMMAND ***** *** WARNING *** CP = 0.550 TIME= 13:19:33 Element shape checking is currently inactive. Issue SHPP,ON or SHPP,WARN to reactivate, if desired. *** NOTE *** CP = 0.583 TIME= 13:19:33 The model data was checked and warning messages were found. Please review output or errors file ( /tmp/AnsysMech59BE/Project_Mech_Files/StaticStructural/file0.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 2023 R1 23.1 *** Ansys Mechanical Enterprise 00000000 VERSION=LINUX x64 13:19:33 JUL 27, 2023 CP= 0.584 --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.591 TIME= 13:19:33 The conditions for direct assembly have been met. No .emat or .erot files will be produced. *** NOTE *** CP = 0.598 TIME= 13:19:33 Internal nodes from 5760 to 5760 are created. 1 internal nodes are used for handling degrees of freedom on pilot nodes of rigid target surfaces. *** NOTE *** CP = 0.605 TIME= 13:19:33 Internal nodes from 5760 to 5760 are created. 1 internal nodes are used for handling degrees of freedom on pilot nodes of rigid target surfaces. *** NOTE *** CP = 0.731 TIME= 13:19:33 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.36294 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 = 0.731 TIME= 13:19:33 Max. Initial penetration 4.440892099E-16 was detected between contact element 1938 and target element 1989. **************************************** *** NOTE *** CP = 0.731 TIME= 13:19:33 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.38168 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 = 0.732 TIME= 13:19:33 Max. Initial penetration 4.440892099E-16 was detected between contact element 1965 and target element 1915. **************************************** *** NOTE *** CP = 0.732 TIME= 13:19:33 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.35803 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 = 0.732 TIME= 13:19:33 Max. Initial penetration 1.776356839E-15 was detected between contact element 2035 and target element 2091. **************************************** *** NOTE *** CP = 0.732 TIME= 13:19:33 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.36294 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 = 0.733 TIME= 13:19:33 Max. Initial penetration 2.664535259E-15 was detected between contact element 2065 and target element 2011. **************************************** *** NOTE *** CP = 0.733 TIME= 13:19:33 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 = 0.733 TIME= 13:19:33 Max. Initial penetration 3.552713679E-15 was detected between contact element 2134 and target element 2189. **************************************** *** NOTE *** CP = 0.733 TIME= 13:19:33 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 = 0.733 TIME= 13:19:33 Max. Initial penetration 3.552713679E-15 was detected between contact element 2161 and target element 2115. **************************************** *** NOTE *** CP = 0.734 TIME= 13:19:33 Force-distributed-surface identified by real constant set 11 and contact element type 11 has been set up. The pilot node 5759 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 = 0.741 TIME= 13:19:33 Internal nodes from 5760 to 5760 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: 1419 ...Number of nodes: 5760 ...Decompose to 4 CPU domains ...Element load balance ratio = 1.047 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.220 TIME= 13:19:33 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.70770E-03 -0.10596E-02 0.0000 0.49319E+06 0.0000 | -0.70770E-03 0.0000 0.49319E+07 0.0000 0.0000 0.49319E+06 | 0.10596E-02 -0.49319E+07 0.0000 ------------------------------------------ | ------------------------------------------ | Rotational mass (inertia) | 0.24657E+06 -0.10716E-01 -0.84562E-02 | -0.10716E-01 0.65882E+08 0.55338E-02 | -0.84562E-02 0.55338E-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.21485E-08 0.14349E-08 TOTAL INERTIA ABOUT CENTER OF MASS 0.24657E+06 -0.12030E-03 -0.13792E-02 -0.12030E-03 0.16563E+08 0.55338E-02 -0.13792E-02 0.55338E-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 2154. Minimum = 7.008802843E+10 at element 345. *** ELEMENT MATRIX FORMULATION TIMES TYPE NUMBER ENAME TOTAL CP AVE CP 1 120 SOLID186 0.022 0.000182 2 264 SOLID186 0.046 0.000173 3 546 SOLID186 0.095 0.000174 4 168 SOLID186 0.028 0.000168 5 48 CONTA174 0.009 0.000180 6 48 TARGE170 0.000 0.000002 7 50 CONTA174 0.009 0.000180 8 50 TARGE170 0.000 0.000001 9 50 CONTA174 0.009 0.000185 10 50 TARGE170 0.000 0.000001 11 24 CONTA174 0.000 0.000015 12 1 TARGE170 0.000 0.000029 Time at end of element matrix formulation CP = 1.30859804. Iteration= 5 Ratio= 0.279178 Limit= 1.000000E-08 Wall= 0.0 Iteration= 45 Ratio= 8.743562E-04 Limit= 1.000000E-08 Wall= 0.0 Iteration= 120 Ratio= 2.834161E-06 Limit= 1.000000E-08 Wall= 0.1 DISTRIBUTED PCG SOLVER SOLUTION CONVERGED DISTRIBUTED PCG SOLVER SOLUTION STATISTICS NUMBER OF ITERATIONS= 193 NUMBER OF EQUATIONS = 17286 LEVEL OF CONVERGENCE= 1 CALCULATED NORM = 0.94258E-08 SPECIFIED TOLERANCE = 0.10000E-07 TOTAL CPU TIME (sec)= 0.14 TOTAL WALL TIME(sec)= 0.17 TOTAL MEMORY (GB) = 0.02 *** ELEMENT RESULT CALCULATION TIMES TYPE NUMBER ENAME TOTAL CP AVE CP 1 120 SOLID186 0.011 0.000093 2 264 SOLID186 0.022 0.000085 3 546 SOLID186 0.048 0.000087 4 168 SOLID186 0.015 0.000087 5 48 CONTA174 0.002 0.000040 7 50 CONTA174 0.002 0.000036 9 50 CONTA174 0.002 0.000037 11 24 CONTA174 0.000 0.000001 *** NODAL LOAD CALCULATION TIMES TYPE NUMBER ENAME TOTAL CP AVE CP 1 120 SOLID186 0.002 0.000017 2 264 SOLID186 0.004 0.000014 3 546 SOLID186 0.008 0.000015 4 168 SOLID186 0.002 0.000014 5 48 CONTA174 0.001 0.000016 7 50 CONTA174 0.000 0.000008 9 50 CONTA174 0.000 0.000009 11 24 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.500 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= 13.3258333 PRINTOUT RESUMED BY /GOP *GET _PCGITER FROM ACTI ITEM=SOLU CGIT VALUE= 193.000000 FINISH SOLUTION PROCESSING ***** ROUTINE COMPLETED ***** CP = 1.518 *** MAPDL - ENGINEERING ANALYSIS SYSTEM RELEASE 2023 R1 23.1 *** Ansys Mechanical Enterprise 00000000 VERSION=LINUX x64 13:19:33 JUL 27, 2023 CP= 1.519 --Static Structural ***** MAPDL RESULTS INTERPRETATION (POST1) ***** *** NOTE *** CP = 1.520 TIME= 13:19:33 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 = 1.522 PRINTOUT RESUMED BY /GOP *GET _WALLDONE FROM ACTI ITEM=TIME WALL VALUE= 13.3258333 PARAMETER _PREPTIME = 0.000000000 PARAMETER _SOLVTIME = 0.000000000 PARAMETER _POSTTIME = 0.000000000 PARAMETER _TOTALTIM = 0.000000000 *GET _DLBRATIO FROM ACTI ITEM=SOLU DLBR VALUE= 1.04672897 *GET _COMBTIME FROM ACTI ITEM=SOLU COMB VALUE= 0.376392279E-02 *GET _SSMODE FROM ACTI ITEM=SOLU SSMM VALUE= 0.00000000 *GET _NDOFS FROM ACTI ITEM=SOLU NDOF VALUE= 14854.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 = 5759 --- Total number of elements = 1419 --- Element load balance ratio = 1.04672897 --- Time to combine distributed files = 3.763922794E-03 --- Sparse memory mode = 0 --- Number of DOF = 14854 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: 2023 R1 Build: 23.1 Update: UP20221128 Platform: LINUX x64 Date Run: 07/27/2023 Time: 13:19 Process ID: 1413 Operating System: Ubuntu 20.04.5 LTS Processor Model: AMD EPYC 7763 64-Core Processor Compiler: Intel(R) Fortran Compiler Version 19.0.0 (Build: 20190206) Intel(R) C/C++ Compiler Version 19.0.0 (Build: 20190206) 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.6 for Linux* OS GPU Acceleration: Not Requested Job Name: file0 Input File: dummy.dat Core Machine Name Working Directory ----------------------------------------------------- 0 67668c8e0c55 /tmp/AnsysMech59BE/Project_Mech_Files/StaticStructural 1 67668c8e0c55 /tmp/AnsysMech59BE/Project_Mech_Files/StaticStructural 2 67668c8e0c55 /tmp/AnsysMech59BE/Project_Mech_Files/StaticStructural 3 67668c8e0c55 /tmp/AnsysMech59BE/Project_Mech_Files/StaticStructural Latency time from master to core 1 = 1.082 microseconds Latency time from master to core 2 = 1.061 microseconds Latency time from master to core 3 = 0.978 microseconds Communication speed from master to core 1 = 13043.34 MB/sec Communication speed from master to core 2 = 17966.49 MB/sec Communication speed from master to core 3 = 18554.68 MB/sec Total CPU time for main thread : 1.2 seconds Total CPU time summed for all threads : 1.9 seconds Elapsed time spent obtaining a license : 0.4 seconds Elapsed time spent pre-processing model (/PREP7) : 0.0 seconds Elapsed time spent solution - preprocessing : 0.1 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 : 29.0 Gflops Sum of memory used on all processes : 215.0 MB Sum of memory allocated on all processes : 5184.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 2023 R1 Build 23.1 UP20221128 LINUX x64 | | | |-----------------------------------------------------------------------------| | | | Database Requested(-db) 1024 MB Scratch Memory Requested 1024 MB | | Max Database Used(Master) 6 MB Max Scratch Used(Master) 55 MB | | Max Database Used(Workers) 1 MB Max Scratch Used(Workers) 51 MB | | Sum Database Used(All) 9 MB Sum Scratch Used(All) 206 MB | | | |-----------------------------------------------------------------------------| | | | CP Time (sec) = 1.866 Time = 13:19:33 | | Elapsed Time (sec) = 2.000 Date = 07/27/2023 | | | *-----------------------------------------------------------------------------* .. GENERATED FROM PYTHON SOURCE LINES 206-209 Close Mechanical ~~~~~~~~~~~~~~~~ Close the Mechanical instance. .. GENERATED FROM PYTHON SOURCE LINES 209-211 .. code-block:: default mechanical.exit() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 14.904 seconds) .. _sphx_glr_download_examples_gallery_examples_00_basic_example_01_simple_structural_solve.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: example_01_simple_structural_solve.py <example_01_simple_structural_solve.py>` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: example_01_simple_structural_solve.ipynb <example_01_simple_structural_solve.ipynb>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_