From f0d61804aa6f7409c581f0b0bfe940186d393b94 Mon Sep 17 00:00:00 2001 From: clatapie <78221213+clatapie@users.noreply.github.com> Date: Mon, 27 Oct 2025 15:35:03 +0100 Subject: [PATCH 1/3] feat: ``solution`` submodule - part 3 --- doc/source/mapdl_commands/solution/index.rst | 17 + doc/source/mapdl_commands/solution/ocean.rst | 32 +- .../mapdl_commands/solution/radiosity.rst | 34 +- .../mapdl_commands/solution/rezoning.rst | 26 +- .../solution/solid_body_loads.rst | 46 +- .../solution/solid_constraints.rst | 40 +- .../mapdl_commands/solution/solid_forces.rst | 26 +- .../solution/solid_surface_loads.rst | 34 +- .../solution/solution_status.rst | 30 - .../solution/spectrum_options.rst | 89 +- doc/source/mapdl_commands/solution/status.rst | 33 + .../mapdl/core/_commands/solution/__init__.py | 3 +- .../mapdl/core/_commands/solution/ocean.py | 844 ++++-- .../core/_commands/solution/radiosity.py | 901 +++++-- .../mapdl/core/_commands/solution/rezoning.py | 397 ++- .../_commands/solution/solid_body_loads.py | 714 +++--- .../_commands/solution/solid_constraints.py | 628 ++--- .../core/_commands/solution/solid_forces.py | 140 +- .../_commands/solution/solid_surface_loads.py | 484 ++-- .../_commands/solution/solution_status.py | 350 --- .../_commands/solution/spectrum_options.py | 2251 ++++++++++------- .../mapdl/core/_commands/solution/status.py | 361 +++ .../_commands/solution/twod_to_3d_analysis.py | 81 - src/ansys/mapdl/core/commands.py | 3 +- 24 files changed, 4529 insertions(+), 3035 deletions(-) delete mode 100644 doc/source/mapdl_commands/solution/solution_status.rst create mode 100644 doc/source/mapdl_commands/solution/status.rst delete mode 100644 src/ansys/mapdl/core/_commands/solution/solution_status.py create mode 100644 src/ansys/mapdl/core/_commands/solution/status.py delete mode 100644 src/ansys/mapdl/core/_commands/solution/twod_to_3d_analysis.py diff --git a/doc/source/mapdl_commands/solution/index.rst b/doc/source/mapdl_commands/solution/index.rst index 0822fe4b068..e148e3f8943 100644 --- a/doc/source/mapdl_commands/solution/index.rst +++ b/doc/source/mapdl_commands/solution/index.rst @@ -8,23 +8,31 @@ Solution * - :ref:`ref_analysis_options` * - :ref:`ref_inertia` + * - :ref:`ref_spectrum_options` * - :ref:`ref_dynamic_options` * - :ref:`ref_additive_manufacturing` * - :ref:`ref_misc_loads` * - :ref:`ref_nonlinear_options` + * - :ref:`ref_rezoning` + * - :ref:`ref_status` * - :ref:`ref_load_step_options` * - :ref:`ref_fe_body_loads` + * - :ref:`ref_solid_body_loads` * - :ref:`ref__nonlinear_options` * - :ref:`ref_fe_constraints` + * - :ref:`ref_solid_constraints` * - :ref:`ref_birth_and_death` * - :ref:`ref_fe_forces` + * - :ref:`ref_solid_forces` * - :ref:`ref__status` * - :ref:`ref__gap_conditions` * - :ref:`ref_radiosity` * - :ref:`ref_load_step_operations` * - :ref:`ref_master_dof` * - :ref:`ref_analysis_2d_to_3d` + * - :ref:`ref_ocean` * - :ref:`ref_fe_surface_loads` + * - :ref:`ref_solid_surface_loads` .. toctree:: @@ -33,19 +41,28 @@ Solution analysis_options inertia + spectrum_options dynamic_options additive_manufacturing misc_loads nonlinear_options + rezoning + status load_step_options fe_body_loads + solid_body_loads _nonlinear_options fe_constraints + solid_constraints birth_and_death fe_forces + solid_forces _status _gap_conditions + radiosity load_step_operations master_dof analysis_2d_to_3d + ocean fe_surface_loads + solid_surface_loads diff --git a/doc/source/mapdl_commands/solution/ocean.rst b/doc/source/mapdl_commands/solution/ocean.rst index 075200030bd..7ac9912673b 100644 --- a/doc/source/mapdl_commands/solution/ocean.rst +++ b/doc/source/mapdl_commands/solution/ocean.rst @@ -1,20 +1,24 @@ -.. _ref_ocean_commands_api: -***** +.. _ref_ocean: + + Ocean -***** +===== + -.. currentmodule:: ansys.mapdl.core +.. currentmodule:: ansys.mapdl.core._commands.solution.ocean -These SOLUTION commands define ocean load data. +.. autoclass:: ansys.mapdl.core._commands.solution.ocean.Ocean .. autosummary:: - :toctree: _autosummary/ - - Mapdl.ocdata - Mapdl.ocdelete - Mapdl.oclist - Mapdl.ocread - Mapdl.octable - Mapdl.octype - Mapdl.oczone + :template: base.rst + :toctree: _autosummary + + + Ocean.ocdata + Ocean.ocdelete + Ocean.oclist + Ocean.ocread + Ocean.octable + Ocean.octype + Ocean.oczone diff --git a/doc/source/mapdl_commands/solution/radiosity.rst b/doc/source/mapdl_commands/solution/radiosity.rst index fb5b9be438c..79c6d6f8f04 100644 --- a/doc/source/mapdl_commands/solution/radiosity.rst +++ b/doc/source/mapdl_commands/solution/radiosity.rst @@ -1,20 +1,28 @@ -.. _ref_radiosity_commands_api: -********* +.. _ref_radiosity: + + Radiosity -********* +========= -.. currentmodule:: ansys.mapdl.core -These SOLUTION commands are used to calculate the radiation view -factors and to specify the solution parameters for the Radiosity -solver method. +.. currentmodule:: ansys.mapdl.core._commands.solution.radiosity + +.. autoclass:: ansys.mapdl.core._commands.solution.radiosity.Radiosity .. autosummary:: - :toctree: _autosummary/ + :template: base.rst + :toctree: _autosummary + - Mapdl.rdec - Mapdl.rsopt - Mapdl.rsurf - Mapdl.rsymm - Mapdl.qsopt + Radiosity.hemiopt + Radiosity.qsopt + Radiosity.radopt + Radiosity.rdec + Radiosity.rsopt + Radiosity.rsurf + Radiosity.rsymm + Radiosity.spcnod + Radiosity.spctemp + Radiosity.v2dopt + Radiosity.vfopt diff --git a/doc/source/mapdl_commands/solution/rezoning.rst b/doc/source/mapdl_commands/solution/rezoning.rst index b9b0123c352..b5d5b2cfc4b 100644 --- a/doc/source/mapdl_commands/solution/rezoning.rst +++ b/doc/source/mapdl_commands/solution/rezoning.rst @@ -1,18 +1,22 @@ -.. _ref_rezoning_commands_api: -******** +.. _ref_rezoning: + + Rezoning -******** +======== -.. currentmodule:: ansys.mapdl.core -These SOLUTION commands apply to analyses that use rezoning. +.. currentmodule:: ansys.mapdl.core._commands.solution.rezoning + +.. autoclass:: ansys.mapdl.core._commands.solution.rezoning.Rezoning .. autosummary:: - :toctree: _autosummary/ + :template: base.rst + :toctree: _autosummary + - Mapdl.rezone - Mapdl.mapsolve - Mapdl.mapvar - Mapdl.remesh - Mapdl.aremesh + Rezoning.aremesh + Rezoning.mapsolve + Rezoning.mapvar + Rezoning.remesh + Rezoning.rezone diff --git a/doc/source/mapdl_commands/solution/solid_body_loads.rst b/doc/source/mapdl_commands/solution/solid_body_loads.rst index b5aef142ba5..d3c2c2a61a5 100644 --- a/doc/source/mapdl_commands/solution/solid_body_loads.rst +++ b/doc/source/mapdl_commands/solution/solid_body_loads.rst @@ -1,26 +1,30 @@ -.. _ref_solid_body_loads_commands_api: -**************** -Solid body loads -**************** +.. _ref_solid_body_loads: -.. currentmodule:: ansys.mapdl.core -These SOLUTION commands are used to define body loads on the solid model. +SolidBodyLoads +============== + + +.. currentmodule:: ansys.mapdl.core._commands.solution.solid_body_loads + +.. autoclass:: ansys.mapdl.core._commands.solution.solid_body_loads.SolidBodyLoads .. autosummary:: - :toctree: _autosummary/ - - Mapdl.bfa - Mapdl.bfadele - Mapdl.bfalist - Mapdl.bfk - Mapdl.bfkdele - Mapdl.bfklist - Mapdl.bfl - Mapdl.bfldele - Mapdl.bfllist - Mapdl.bftran - Mapdl.bfv - Mapdl.bfvdele - Mapdl.bfvlist + :template: base.rst + :toctree: _autosummary + + + SolidBodyLoads.bfa + SolidBodyLoads.bfadele + SolidBodyLoads.bfalist + SolidBodyLoads.bfk + SolidBodyLoads.bfkdele + SolidBodyLoads.bfklist + SolidBodyLoads.bfl + SolidBodyLoads.bfldele + SolidBodyLoads.bfllist + SolidBodyLoads.bftran + SolidBodyLoads.bfv + SolidBodyLoads.bfvdele + SolidBodyLoads.bfvlist diff --git a/doc/source/mapdl_commands/solution/solid_constraints.rst b/doc/source/mapdl_commands/solution/solid_constraints.rst index 8cf64cd466a..45cec822289 100644 --- a/doc/source/mapdl_commands/solution/solid_constraints.rst +++ b/doc/source/mapdl_commands/solution/solid_constraints.rst @@ -1,23 +1,27 @@ -.. _ref_solid_constraints_commands_api: -***************** -Solid constraints -***************** +.. _ref_solid_constraints: -.. currentmodule:: ansys.mapdl.core -These SOLUTION commands are used to define constraints on the solid model. +SolidConstraints +================ + + +.. currentmodule:: ansys.mapdl.core._commands.solution.solid_constraints + +.. autoclass:: ansys.mapdl.core._commands.solution.solid_constraints.SolidConstraints .. autosummary:: - :toctree: _autosummary/ - - Mapdl.da - Mapdl.dadele - Mapdl.dalist - Mapdl.dk - Mapdl.dkdele - Mapdl.dklist - Mapdl.dl - Mapdl.dldele - Mapdl.dllist - Mapdl.dtran + :template: base.rst + :toctree: _autosummary + + + SolidConstraints.da + SolidConstraints.dadele + SolidConstraints.dalist + SolidConstraints.dk + SolidConstraints.dkdele + SolidConstraints.dklist + SolidConstraints.dl + SolidConstraints.dldele + SolidConstraints.dllist + SolidConstraints.dtran diff --git a/doc/source/mapdl_commands/solution/solid_forces.rst b/doc/source/mapdl_commands/solution/solid_forces.rst index 99289110f41..118c5530852 100644 --- a/doc/source/mapdl_commands/solution/solid_forces.rst +++ b/doc/source/mapdl_commands/solution/solid_forces.rst @@ -1,17 +1,21 @@ -.. _ref_solid_forces_commands_api: -************ -Solid forces -************ +.. _ref_solid_forces: -.. currentmodule:: ansys.mapdl.core -These SOLUTION commands are used to define forces on the solid model. +SolidForces +=========== + + +.. currentmodule:: ansys.mapdl.core._commands.solution.solid_forces + +.. autoclass:: ansys.mapdl.core._commands.solution.solid_forces.SolidForces .. autosummary:: - :toctree: _autosummary/ + :template: base.rst + :toctree: _autosummary + - Mapdl.fk - Mapdl.fkdele - Mapdl.fklist - Mapdl.ftran + SolidForces.fk + SolidForces.fkdele + SolidForces.fklist + SolidForces.ftran diff --git a/doc/source/mapdl_commands/solution/solid_surface_loads.rst b/doc/source/mapdl_commands/solution/solid_surface_loads.rst index ae2e39104e9..0b10fec7db8 100644 --- a/doc/source/mapdl_commands/solution/solid_surface_loads.rst +++ b/doc/source/mapdl_commands/solution/solid_surface_loads.rst @@ -1,20 +1,24 @@ -.. _ref_solid_surface_loads_commands_api: -******************* -Solid surface loads -******************* +.. _ref_solid_surface_loads: -.. currentmodule:: ansys.mapdl.core -These SOLUTION commands are used to define surface loads on the solid model. +SolidSurfaceLoads +================= + + +.. currentmodule:: ansys.mapdl.core._commands.solution.solid_surface_loads + +.. autoclass:: ansys.mapdl.core._commands.solution.solid_surface_loads.SolidSurfaceLoads .. autosummary:: - :toctree: _autosummary/ - - Mapdl.sfa - Mapdl.sfadele - Mapdl.sfalist - Mapdl.sfl - Mapdl.sfldele - Mapdl.sfllist - Mapdl.sftran + :template: base.rst + :toctree: _autosummary + + + SolidSurfaceLoads.sfa + SolidSurfaceLoads.sfadele + SolidSurfaceLoads.sfalist + SolidSurfaceLoads.sfl + SolidSurfaceLoads.sfldele + SolidSurfaceLoads.sfllist + SolidSurfaceLoads.sftran diff --git a/doc/source/mapdl_commands/solution/solution_status.rst b/doc/source/mapdl_commands/solution/solution_status.rst deleted file mode 100644 index 54b808f8f09..00000000000 --- a/doc/source/mapdl_commands/solution/solution_status.rst +++ /dev/null @@ -1,30 +0,0 @@ -.. _ref_solution_status_commands_api: - -*************** -Solution status -*************** - -.. currentmodule:: ansys.mapdl.core - -These SOLUTION commands are for use with the STAT command. - -.. autosummary:: - :toctree: _autosummary/ - - Mapdl.atype - Mapdl.bioopt - Mapdl.deact - Mapdl.dynopt - Mapdl.gap - Mapdl.genopt - Mapdl.inrtia - Mapdl.lsoper - Mapdl.master - Mapdl.nlopt - Mapdl.outopt - Mapdl.smbody - Mapdl.smcons - Mapdl.smfor - Mapdl.smsurf - Mapdl.soluopt - Mapdl.sptopt diff --git a/doc/source/mapdl_commands/solution/spectrum_options.rst b/doc/source/mapdl_commands/solution/spectrum_options.rst index d2dccb1552e..7dc57f854be 100644 --- a/doc/source/mapdl_commands/solution/spectrum_options.rst +++ b/doc/source/mapdl_commands/solution/spectrum_options.rst @@ -1,48 +1,51 @@ -.. _ref_spectrum_options_commands_api: -**************** -Spectrum options -**************** +.. _ref_spectrum_options: -.. currentmodule:: ansys.mapdl.core -These SOLUTION commands are used to define options for spectrum analyses. +SpectrumOptions +=============== + + +.. currentmodule:: ansys.mapdl.core._commands.solution.spectrum_options + +.. autoclass:: ansys.mapdl.core._commands.solution.spectrum_options.SpectrumOptions .. autosummary:: - :toctree: _autosummary/ - - Mapdl.addam - Mapdl.coval - Mapdl.cqc - Mapdl.ddaspec - Mapdl.dsum - Mapdl.freq - Mapdl.grp - Mapdl.mmass - Mapdl.nrlsum - Mapdl.pfact - Mapdl.pivcheck - Mapdl.psdcom - Mapdl.psdfrq - Mapdl.psdgraph - Mapdl.psdres - Mapdl.psdspl - Mapdl.psdunit - Mapdl.psdval - Mapdl.psdwav - Mapdl.qdval - Mapdl.rock - Mapdl.rose - Mapdl.rigresp - Mapdl.sed - Mapdl.spdamp - Mapdl.spfreq - Mapdl.spgraph - Mapdl.spopt - Mapdl.spunit - Mapdl.spval - Mapdl.srss - Mapdl.sv - Mapdl.svplot - Mapdl.svtyp - Mapdl.vddam + :template: base.rst + :toctree: _autosummary + + + SpectrumOptions.addam + SpectrumOptions.coval + SpectrumOptions.cqc + SpectrumOptions.ddaspec + SpectrumOptions.dsum + SpectrumOptions.freq + SpectrumOptions.grp + SpectrumOptions.mmass + SpectrumOptions.nrlsum + SpectrumOptions.pfact + SpectrumOptions.psdcom + SpectrumOptions.psdfrq + SpectrumOptions.psdgraph + SpectrumOptions.psdres + SpectrumOptions.psdspl + SpectrumOptions.psdunit + SpectrumOptions.psdval + SpectrumOptions.psdwav + SpectrumOptions.qdval + SpectrumOptions.rigresp + SpectrumOptions.rock + SpectrumOptions.rose + SpectrumOptions.sed + SpectrumOptions.spdamp + SpectrumOptions.spfreq + SpectrumOptions.spgraph + SpectrumOptions.spopt + SpectrumOptions.spunit + SpectrumOptions.spval + SpectrumOptions.srss + SpectrumOptions.sv + SpectrumOptions.svplot + SpectrumOptions.svtyp + SpectrumOptions.vddam diff --git a/doc/source/mapdl_commands/solution/status.rst b/doc/source/mapdl_commands/solution/status.rst new file mode 100644 index 00000000000..afa88dc331d --- /dev/null +++ b/doc/source/mapdl_commands/solution/status.rst @@ -0,0 +1,33 @@ + +.. _ref_status: + + +Status +====== + + +.. currentmodule:: ansys.mapdl.core._commands.solution.status + +.. autoclass:: ansys.mapdl.core._commands.solution.status.Status + +.. autosummary:: + :template: base.rst + :toctree: _autosummary + + + Status.atype + Status.bioopt + Status.deact + Status.dynopt + Status.genopt + Status.inrtia + Status.lsoper + Status.master + Status.nlopt + Status.outopt + Status.smbody + Status.smcons + Status.smfor + Status.smsurf + Status.soluopt + Status.sptopt diff --git a/src/ansys/mapdl/core/_commands/solution/__init__.py b/src/ansys/mapdl/core/_commands/solution/__init__.py index 659d890f2ad..f92d1f67303 100644 --- a/src/ansys/mapdl/core/_commands/solution/__init__.py +++ b/src/ansys/mapdl/core/_commands/solution/__init__.py @@ -46,7 +46,6 @@ solid_constraints, solid_forces, solid_surface_loads, - solution_status, spectrum_options, - twod_to_3d_analysis, + status, ) diff --git a/src/ansys/mapdl/core/_commands/solution/ocean.py b/src/ansys/mapdl/core/_commands/solution/ocean.py index ac609817c96..655f71e7115 100644 --- a/src/ansys/mapdl/core/_commands/solution/ocean.py +++ b/src/ansys/mapdl/core/_commands/solution/ocean.py @@ -22,43 +22,40 @@ class Ocean: + def ocdata( - self, - val1: str = "", - val2: str = "", - val3: str = "", - val4: str = "", - val5: str = "", - val6: str = "", - val7: str = "", - val8: str = "", - val9: str = "", - val10: str = "", - val11: str = "", - val12: str = "", - val13: str = "", - val14: str = "", - **kwargs, + self, val1: str = "", val2: str = "", val3: str = "", val14: str = "", **kwargs ): - """Defines an ocean load using non-table data. + r"""Defines an ocean load using non-table data. - APDL Command: ``OCDATA`` + Mechanical APDL Command: `OCDATA `_ Parameters ---------- - val1, val2, val3, . . . , val14 + val1 : str + Values describing the basic ocean load or a wave condition. + + val2 : str + Values describing the basic ocean load or a wave condition. + + val3 : str + Values describing the basic ocean load or a wave condition. + + val14 : str Values describing the basic ocean load or a wave condition. Notes ----- - The ``OCDATA`` command specifies non-table data that defines the ocean - load, such as the depth of the ocean to the mud line, the ratio of - added mass over added mass for a circular cross section, or the wave - type to apply. The terms VAL1, VAL2, etc. are specialized according to - the input set required for the given ocean load. - The program interprets the data input via the ``OCDATA`` command within the - context of the most recently issued ``OCTYPE`` command. + .. _OCDATA_notes: + + The :ref:`ocdata` command specifies non-table data that defines the ocean load, such as the depth of + the ocean to the mud line, the ratio of added mass over added mass for a circular cross section, or + the wave type to apply. The terms ``VAL1``, ``VAL2``, etc. are specialized according to the input + set required for the given ocean load. + + The program interprets the data input via the :ref:`ocdata` command within the context of the most + recently issued :ref:`octype` command. Input values in the order indicated. @@ -66,387 +63,714 @@ def ocdata( You can define the following ocean data types: - For a better understanding of how to set up a basic ocean type, see - Figure: 5:: Basic Ocean Data Type Components . + .. _ocdataBASIC: + + For a better understanding of how to set up a basic ocean type, see :ref:`ocdatafigbasic`. + + * ``VAL1`` - ``DEPTH`` -- The depth of the ocean (that is, the distance between the mean sea level + and the mud line). The water surface is assumed to be level in the XY plane, with Z being positive + upwards. This value is required and must be positive. + + * ``VAL2`` - ``MATOC`` -- The material number of the ocean. This value is required and is used to + input the required density. It is also used to input the viscosity if the Reynolds number is used ( + :ref:`octable` ). + + * ``VAL3`` - ``KFLOOD`` -- The inside-outside fluid-interaction key: + + * 0 -- The density and pressure of fluid inside and outside of the pipe element ( ``PIPE288`` or + ``PIPE289`` ) are independent of each other. This behavior is the default. + * 1 -- The density and pressure of fluid inside of the pipe element ( ``PIPE288`` or ``PIPE289`` ) + are set to equal the values outside of the pipe element. + + For beam subtype CTUBE and HREC used with ``BEAM188`` or ``BEAM189`` and ocean loading, ``KFLOOD`` + is always set to 1. + + * ``VAL4`` - ``Cay`` -- The ratio of added mass of the external fluid over the mass of the fluid + displaced by the element cross section in the y direction (normal). The added mass represents the + mass of the external fluid (ocean water) that moves with the pipe, beam, or link element when the + element moves in the element y direction during a dynamic analysis. + + If no value is specified, and the coefficient of inertia ``CMy`` is not specified ( :ref:`octable` + ), both values default to 0.0. + + If no value is specified, but ``CMy`` is specified, this value defaults to ``Cay`` = ``CMy`` - 1.0. + + If this value should be 0.0, enter 0.0. + + * ``VAL5`` - ``Caz`` -- The ratio of added mass of the external fluid over the mass of a cross + section in the element z direction (normal). The added mass represents the mass of the external + fluid (ocean water) that moves with the pipe, beam, or link element when the element moves in the + element z direction during a dynamic analysis. + + If no value is specified, and Cay is specified, this value defaults to Cay. + + If no value is specified, and the coefficient of inertia ``CMz`` is not specified ( :ref:`octable` + ), both values default to 0.0. + + If no value is specified, but ``CMz`` is specified, this value defaults to ``Cay`` = ``CMz`` - 1.0. + + If this value should be 0.0, enter 0.0. + + * ``VAL6`` - ``Cb`` -- The ratio of buoyancy force used over buoyancy force based on the outside + diameter and water density. Accept the default value in most cases. Adjust this option only when you + must account for additional hardware (such as a control valve) attached to the pipe exterior. A non- + default value may lead to small non-physical inconsistencies; testing is therefore recommended for + non-default values. + + If no value is specified, this value defaults to 1.0. + + If this value should be 0.0 (useful when troubleshooting your input), enter 0.0. + + * ``VAL7`` - ``Zmsl`` -- A vertical offset from the global origin to the mean sea level. The default + value is + zero (meaning that the origin is located at the mean sea level). + + Two example cases for ``Zmsl`` are: + + * A structure with its origin on the sea floor ( ``Zmsl`` = ``DEPTH`` ). + + * A tidal change ( ``tc`` ) above the mean sea level ( ``Zmsl`` = ``tc``, and ``DEPTH`` becomes + ``DEPTH`` + ``tc`` ) + + * ``VAL8`` - ``Ktable`` -- The dependency of ``VAL1`` on the :ref:`octable` command: + + * Z (or 1) -- Values on the :ref:`octable` command depend on the Z levels (default). + * RE (or 2) -- Values on the :ref:`octable` command depend on the Reynolds number. + + .. figure::../../../images/_commands/gOCDATA1.png + + Basic Ocean Data Type Components + + .. _ocdataWAVE: + + * ``VAL1`` - ``KWAVE`` -- The incident wave type: + + * 0 or AIRY -- Small amplitude Airy wave without modifications (default). + * 1 or WHEELER -- Small amplitude wave with Wheeler empirical modification of depth decay function. + * 2 or STOKES-- Stokes fifth-order wave. + * 3 or STREAMFUNCTION -- Stream function wave. + * 5 or RANDOM -- Random (but repeatable) combination of linear Airy wave components. + * 6 or SHELLNEWWAVE -- Shell new wave. + * 7 or CONSTRAINED -- Constrained new wave. + * 8 or DIFFRACTED -- Diffracted wave (using `imported hydrodynamic data + `_ ) + * 101+ -- API for computing particle velocities and accelerations due to waves and current: + + * 101 through 200 -- Data preprocessed (via ``KWAVE`` = 0 logic). + * 201+ -- Data not preprocessed. + * For more information, see the description of the `userPartVelAcc subroutine + `_ + in the `Programmer's Reference `_. + + * ``VAL2`` - ``THETA`` -- Angle of the wave direction θ from the global Cartesian X axis + toward the global Cartesian Y axis (in degrees). + + * ``VAL3`` - ``WAVELOC`` (valid when ``KWAVE`` = 0 through 3, and 101+) -- The wave location type: + + * 0 -- Waves act on elements at their actual locations (default). + * 1 -- Elements are assumed to be at wave peak. + * 2 -- Upward vertical wave velocity acts on elements. + * 3 -- Downward vertical wave velocity acts on elements. + * 4 -- Elements are assumed to be at wave trough. - ``DEPTH`` -- The depth of the ocean (that is, the distance between the mean - sea level and the mud line). The water surface is assumed to be level - in the XY plane, with Z being positive upwards. This value is required - and must be positive. + ``SPECTRUM`` (valid when ``KWAVE`` = 5 through 7) -- The wave spectrum type: - ``MATOC`` -- The material number of the ocean. This value is required and - is used to input the required density. It is also used to input the - viscosity if the Reynolds number is used (``OCTABLE``). + * 0 -- Pierson-Moskowitz (default). + * 1 -- JONSWAP. + * 2 -- User-defined spectrum. - ``KFLOOD`` -- The inside-outside fluid-interaction key: + * ``VAL4`` - ``KCRC`` -- The wave-current interaction key. - For beam subtype ``CTUBE`` and ``HREC`` used with BEAM188 or BEAM189 and ocean - loading, ``KFLOOD`` is always set to 1. + Adjustments to the current profile are available via the ``KCRC`` constant of the water motion + table. Typically, these options are used only when the wave amplitude is large relative to the water + depth, such that significant wave-current interaction exists. - Cay -- The ratio of added mass of the external fluid over the mass of - the fluid displaced by the element cross section in the y direction - (normal). The added mass represents the mass of the external fluid - (ocean water) that moves with the pipe, beam, or link element when the - element moves in the element y direction during a dynamic analysis. + * 0 -- Use the current profile (as input) for wave locations below the mean water level, and the top + current profile value for wave locations above the mean water level (default). + * 1 -- Linearly stretch or compress the current profile from the mud line to the top of the wave. + * 2 -- Similar to ``KCRC`` = 1, but also adjusts the current profile horizontally such that total + flow continuity is maintained with the input profile. All current directions ``Th`` (j) must be + identical. + * The following option is valid only when KWAVE = 5 through 7: + * 3 -- Nonlinear stretch or compress the current profile, as recommended in API RP 2A Codes of + Practice for Designing and Constructing Fixed Offshore Platforms. - If no value is specified, and the coefficient of inertia CMy is not - specified (``OCTABLE``), both values default to 0.0. + * ``VAL5`` - ``KMF`` -- The MacCamy-Fuchs adjustment key, typically used only for larger-diameter + pipes in relatively shallow water: - If no value is specified, but CMy is specified, this value defaults to - Cay = CMy - 1.0. + * 0 -- Do not apply the adjustment (default). + * 1 -- Apply the adjustment (valid only when ``KWAVE`` = 0 or 1). - If this value should be 0.0, enter 0.0. + * ``VAL6`` - ``PRKEY`` -- The wavelength wave-printout key: - Caz -- The ratio of added mass of the external fluid over the mass of a - cross section in the element z direction (normal). The added mass - represents the mass of the external fluid (ocean water) that moves with - the pipe, beam, or link element when the element moves in the element z - direction during a dynamic analysis. + * 0 -- No extra printout (default). + * 1 -- Include the extra printout. + * 2 -- Print wave component details (valid only when ``KWAVE`` = 5 through 7). - If no value is specified, and Cay is specified, this value defaults to - Cay. + **The following input values are valid only when** ``KWAVE`` = 5 through 7: - If no value is specified, and the coefficient of inertia CMz is not - specified (``OCTABLE``), both values default to 0.0. + * ``VAL7`` - ``APC`` -- Activate apparent period calculation when a wave is superimposed upon a + current: - If no value is specified, but CMz is specified, this value defaults to - Cay = CMz - 1.0. + * 0 -- Not activated (default). + * 1 -- Activated. - If this value should be 0.0, enter 0.0. + * ``VAL8`` - ``DSA`` -- Stretching depth factor: - Cb -- The ratio of buoyancy force used over buoyancy force based on the - outside diameter and water density. Accept the default value in most - cases. Adjust this option only when you must account for additional - hardware (such as a control valve) attached to the pipe exterior. A - non-default value may lead to small non-physical inconsistencies; - testing is therefore recommended for non-default values. + * Stretching is performed between a distance of ``DSA`` \* ``Hs`` below the mean water level (MWL) + and the water surface, where ``Hs`` is the significant wave height measured from the MWL. No + stretching occurs outside this range, or if the wave surface is below the MWL. If ``DSA`` \* + ``Hs`` is negative, stretching is performed between that level above the MWL and the water + surface. The default ``DSA`` value is 0.5. - If no value is specified, this value defaults to 1.0. + * ``VAL9`` - ``DELTA`` -- Delta stretching parameter (0.0 :math:`equation not available` ``DELTA`` + :math:`equation not available` 1.0): - If this value should be 0.0 (useful when troubleshooting your input), - enter 0.0. + * A value of 0.0 corresponds to Wheeler stretching under wave crests, 1.0 corresponds to linear + extrapolation of kinematics at mean water level to crest. (Default = 0.3.) If zero is required, + specify a small positive number (0.01 or less) instead. - Zmsl -- A vertical offset from the global origin to the mean sea level. - The default value is zero (meaning that the origin is located at the - mean sea level). + * ``VAL10`` - Wave kinematics factor or wave spreading angle: - Two example cases for Zmsl are: + * ``KINE`` ( ``KWAVE`` = 5 or 7) -- Wave kinematics factor (0.0 < ``KINE`` :math:`equation not + available` 1.0). The factor is used to account forwave spreading by modifying the horizontal wave + velocities and accelerations.A value of 1.0 corresponds to uni-directional wave with no + spreading.(Default = 1.0, no spreading.) + * ``SPANGLE`` ( ``KWAVE`` = 6) -- Wave spreading angle in degrees (0.0 :math:`equation not + available` ``SPANGLE`` ≤ 40.0). The angle is used to compute a wave spreading factor to + modify the horizontal wave kinematics for nearly unidirectional seas. ``SPANGLE`` = 0.0 + corresponds to no spreading. (Default = 0.0, no spreading.) - A structure with its origin on the sea floor (Zmsl = ``DEPTH``). + * ``VAL11`` - Random seed value for phase angle generation, or wave crest amplitude value: - A tidal change (tc) above the mean sea level (Zmsl = tc, and ``DEPTH`` - becomes ``DEPTH`` + tc) + * ``SEED`` ( ``KWAVE`` = 5) -- Initial seed for random phase angle generation. (Default = 1.) + * ``AMPMAX`` ( ``KWAVE`` = 6) -- Maximum wave crest amplitude (distance between the mean water level + and maximum wave crest). + * ``AMPCONST`` ( ``KWAVE`` = 7) -- Constrained wave crest amplitude (distance between the mean water + level and wave crest). - Ktable -- The dependency of VAL1 on the ``OCTABLE`` command: + **The following input values are valid only when** ``KWAVE`` = 6 or 7: - ``KWAVE`` -- The incident wave type: + * ``VAL12`` - ``TOFF`` -- Time offset at which the maximum wave crest will occur. (Default = 0.0.) - ``THETA`` -- Angle of the wave direction θ from the global Cartesian X axis - toward the global Cartesian Y axis (in degrees). + * ``VAL13`` - ``ROFF`` -- Position offset along the wave direction where the maximum wave crest will + occur. (Default = 0.0.) - ``WAVELOC`` (valid when ``KWAVE`` = 0 through 3, and 101+) -- The wave location - type: + * ``VAL14`` - ``EVOLVING`` ( ``KWAVE`` = 6) -- Activate evolving wave: - ``SPECTRUM`` (valid when ``KWAVE`` = 5 through 7) -- The wave spectrum type: + * 0 -- Not activated (default). + * 1 -- Activated. - ``KCRC`` -- The wave-current interaction key. + ``SEED`` ( ``KWAVE`` = 7) -- Initial seed for random phase angle generation. (Default = 1.) - Adjustments to the current profile are available via the ``KCRC`` constant - of the water motion table. Typically, these options are used only when - the wave amplitude is large relative to the water depth, such that - significant wave-current interaction exists. + This command contains some tables and extra information which can be inspected in the original + documentation pointed above. + + When using waves in a `superelement generation run + `_ + ( :ref:`antype`,SUBSTR), consider whether you should take the ocean level into account ( ``SeOcLvL`` + on the :ref:`seopt` command). + + .. _ocdataZONE: + + An ocean zone is a local space where you can override global ocean-loading parameters. The following + arguments specifying the ocean zone values are described in more detail under :ref:`ocdataBASIC`. + + * ``VAL1`` - ``KFLOOD`` -- The inside-outside fluid-interaction key. + + * ``VAL2`` - ``Cay`` -- The ratio of added mass of the external fluid over the mass of a cross + section in the element y direction (normal). + + * ``VAL3`` - ``Caz`` -- The ratio of added mass of the external fluid over the mass of a cross + section in the element z direction (normal). + + * ``VAL4`` - ``Cb`` -- The ratio of buoyancy force used over buoyancy force based on the outside + diameter and water density. + + Ocean zone values specified via the :ref:`ocdata` command override global ocean-loading parameters. + + Arguments not specified default to the global values specified for the basic ocean type. Therefore, + the relationship between ``Ca`` and ``CM`` values ( ``Ca`` = ``CM`` - 1.0) is not applied to ocean + zones. + + For a pipe-type ocean zone ( :ref:`oczone`,PIP), ``KFLOOD`` is the only valid option. """ - command = f"OCDATA,{val1},{val2},{val3},{val4},{val5},{val6},{val7},{val8},{val9},{val10},{val11},{val12},{val13},{val14}" + command = f"OCDATA,{val1},{val2},{val3},{val14}" return self.run(command, **kwargs) - def ocdelete(self, datatype="", zonename="", **kwargs): - """Deletes a previously defined ocean load. + def ocdelete(self, datatype: str = "", zonename: str = "", **kwargs): + r"""Deletes a previously defined ocean load. - APDL Command: OCDELETE + Mechanical APDL Command: `OCDELETE `_ Parameters ---------- - datatype - Ocean data type to delete. Valid values are BASIC, CURRENT, WAVE, - ZONE, and ALL. + datatype : str + Ocean data type to delete. Valid values are BASIC, CURRENT, WAVE, ZONE, and ALL. - zonename - The name of the ocean zone to delete. If no name is specified, all - defined ocean zones are deleted. Valid only when DataType = ZONE. + For ``DataType`` = ALL, all defined ocean loads are deleted. + + zonename : str + The name of the ocean zone to delete. If no name is specified, all defined ocean zones are + deleted. Valid only when DataType = ZONE. Notes ----- - The OCDELETE command deletes previously specified ocean data from the - database. + + .. _OCDELETE_notes: + + The :ref:`ocdelete` command deletes previously specified ocean data from the database. This command is also valid in PREP7. """ command = f"OCDELETE,{datatype},{zonename}" return self.run(command, **kwargs) - def oclist(self, datatype="", zonename="", **kwargs): - """Summarizes all currently defined ocean loads. + def oclist(self, datatype: str = "", zonename: str = "", **kwargs): + r"""Summarizes all currently defined ocean loads. - APDL Command: OCLIST + Mechanical APDL Command: `OCLIST `_ Parameters ---------- - datatype - Ocean data type to list. Valid values are BASIC, CURRENT, WAVE, - ZONE, and ALL. + datatype : str + Ocean data type to list. Valid values are BASIC, CURRENT, WAVE, ZONE, and ALL. - zonename - The name of an ocean zone to list. If no name is specified, all - defined ocean zones are listed. Valid only when DataType = ZONE. + For ``DataType`` = ALL, all defined ocean loads are listed. + + zonename : str + The name of an ocean zone to list. If no name is specified, all defined ocean zones are listed. + Valid only when DataType = ZONE. Notes ----- - The OCLIST command summarizes the ocean properties for all defined - ocean loads in the current session. - When this command follows the SOLVE command, certain waves types also - list the calculated wave length. + .. _OCLIST_notes: + + The :ref:`oclist` command summarizes the ocean properties for all defined ocean loads in the current + session. + + When this command follows the :ref:`solve` command, certain waves types also list the calculated + wave length. This command is also valid in PREP7. """ command = f"OCLIST,{datatype},{zonename}" return self.run(command, **kwargs) - def ocread(self, fname="", ext="", option="", **kwargs): - """Reads externally defined ocean data. + def ocread(self, fname: str = "", ext: str = "", option: str = "", **kwargs): + r"""Reads externally defined ocean data. - APDL Command: OCREAD + Mechanical APDL Command: `OCREAD `_ Parameters ---------- - fname - External ocean data file name (excluding the filename extension) - and directory path containing the file. For more information, see - the Notes section. + fname : str + External ocean data file name (excluding the filename extension) and directory path containing + the file. For more information, see the :ref:`Notes section. ` - ext + ext : str Filename extension (limited to eight characters). - -- - Reserved field. - - option - Integer value passed to the userOceanRead subroutine (as iOption) - for user-defined waves. This value does not apply to the diffracted - wave type. + option : str + Integer value passed to the userOceanRead subroutine (as ``iOption`` ) for user-defined waves. + This value does not apply to the diffracted wave type. Notes ----- - The OCREAD command imports ocean data that has been defined externally - (for example, via the Hydrodynamic Diffraction System (AQWA)). - The command operates on the ocean load ID specified via the most - recently issued OCTYPE command. Issue a separate OCREAD command for - each ocean load that you want to read into the program. + .. _OCREAD_notes: + + The :ref:`ocread` command imports ocean data that has been defined externally (for example, via the + `Hydrodynamic Diffraction System (AQWA) + `_ ). + + The command operates on the ocean load ID specified via the most recently issued :ref:`octype` + command. Issue a separate :ref:`ocread` command for each ocean load that you want to read into the + program. - Fname is limited to 248 characters, including the directory path. If - Fname does not include a directory path, the program searches for the - specified file in the current working directory. An unspecified Fname - defaults to Jobname. + ``Fname`` is limited to 248 characters, including the directory path. If ``Fname`` does not include + a directory path, the program searches for the specified file in the current working directory. An + unspecified ``Fname`` defaults to :file:`Jobname`. - For the diffracted wave type (KWAVE = 8 on the OCDATA command), you - must issue an OCREAD command for the ocean wave ID in order to import - the hydrodynamic data from the hydrodynamic analysis. + For the diffracted wave type ( ``KWAVE`` = 8 on the :ref:`ocdata` command), you must issue an + :ref:`ocread` command for the ocean wave ID in order to `import the hydrodynamic data from the + hydrodynamic analysis + `_. - For more information, see Applying Ocean Loading from a Hydrodynamic - Analysis in the Advanced Analysis Guide. + For more information, see `Applying Ocean Loading from a Hydrodynamic Analysis + `_ - To learn more about creating user-defined waves, see Subroutine - userPanelHydFor (Calculating Panel Loads Caused by Ocean Loading) in - the Programmer's Reference. + To learn more about creating user-defined waves, see `Subroutine userPanelHydFor (Calculating Panel + Loads Caused by Ocean Loading) + `_ This command is also valid in PREP7. """ - command = f"OCREAD,{fname},{ext},{option}" + command = f"OCREAD,{fname},{ext},,{option}" return self.run(command, **kwargs) def octable( self, - val1="", - val2="", - val3="", - val4="", - val5="", - val6="", - val7="", + val1: str = "", + val2: str = "", + val3: str = "", + val4: str = "", + val5: str = "", + val6: str = "", + val7: str = "", **kwargs, ): - """Defines an ocean load using table data. + r"""Defines an ocean load using table data. - APDL Command: OCTABLE + Mechanical APDL Command: `OCTABLE `_ Parameters ---------- - val1, val2, val3, . . . , val6 - Values describing the basic ocean load, a current condition, or a - wave condition. + val1 : str + Values describing the basic ocean load, a current condition, or a wave condition. - Notes - ----- - The OCTABLE specifies table data that defines the ocean load. The terms - VAL1, VAL2, etc. are specialized according to the input set required - for the given ocean load. + val2 : str + Values describing the basic ocean load, a current condition, or a wave condition. - The program interprets the data input via the OCTABLE command within - the context of the most recently issued OCTYPE command. + val3 : str + Values describing the basic ocean load, a current condition, or a wave condition. - There is no limit to the number of data input. + val4 : str + Values describing the basic ocean load, a current condition, or a wave condition. - Input values in the order indicated. + val5 : str + Values describing the basic ocean load, a current condition, or a wave condition. - This command is also valid in PREP7. + val6 : str + Values describing the basic ocean load, a current condition, or a wave condition. - You can define the following ocean data types: + val7 : str + Values describing the basic ocean load, a current condition, or a wave condition. - If the current is constant, only one OCTABLE command is necessary and - Dep is not required. - - For waves, the current profile is stretched or compressed linearly up - to 10 percent. - - The first Dep value (representing the mean sea level) must be zero. The - last Dep value (representing the mud line) must be equal to the DEPTH - value input on the OCDATA command. - - The Cartesian Z values used to locate nodes, etc. decrease as one moves - from the ocean surface to the sea floor, but the Dep values increase. - See Figure: 5:: Basic Ocean Data Type Components . + Notes + ----- - Dep is not affected by changes to Zmsl on the OCDATA command, as that - value simply relocates the origin. + .. _OCTABLE_notes: - When specifying an ocean wave type, issue the OCTABLE command to input - either wave location data or wave spectrum data. + The :ref:`octable` specifies table data that defines the ocean load. The terms ``VAL1``, ``VAL2``, + etc. are specialized according to the input set required for the given ocean load. - Hints for Wave Location Input: + The program interprets the data input via the :ref:`octable` command within the context of the most + recently issued :ref:`octype` command. - The TIME command is not used, except perhaps to identify the load case. + There is no limit to the number of data input. - The phase shift (Ps) determines the wave position (that is, the - point at which the load is to be applied). + Input values in the order indicated. - When using the Stokes fifth-order (KWAVE = 2) or stream function (KWAVE - = 3) wave type, issue only one OCTABLE command. + This command is also valid in PREP7. - The valid range of the order of the stream function (NORDER) is 3 - through 50. If no value is specified, the program determines a value - automatically. + You can define the following ocean data types: - When using the diffracted wave type (KWAVE = 8), an OCREAD command is - also required to read in the hydrodynamic data from the hydrodynamic - analysis. + .. _octabletypebasic: + + * Basic ocean data to provide in the value fields: + * ``IndVar``, ``--``, ``CDy``, ``CDz``, ``CT``, ``CMy``, ``CMz`` + * where + * ``IndVar`` = Independent variable for the table inputs. This value is dependent on the ``Ktable`` + value specified via the :ref:`ocdata` command. If ``Ktable`` = Z, enter this value in descending + order on each :ref:`octable` command. If ``Ktable`` = RE, enter this value field in ascending + order. + .. flat-table :: + + * -- = Reserved. + + * ``CDy`` = Drag coefficient in the element y direction (normal). + * ``CDz`` = Drag coefficient in the element z direction (normal). This value defaults to ``CDy``. + * ``CT`` = Drag coefficient in the element x direction (tangential). + * ``CMy`` = Coefficient of inertia in the element y direction. If no value is specified, and ``Cay`` + is specified, this value defaults to ``Cay`` + 1.0. If neither this value nor ``Cay`` is + specified, both values default to 0.0. + * ``CMz`` = Coefficent of inertia in the element z direction. If no value is specified, and ``CMy`` + is specified on the same :ref:`octable` command, this value defaults to ``CMy``. If neither this + value nor ``CMy`` is specified, and ``Caz`` is specified, this value defaults to ``Caz`` + 1.0. If + neither this value nor ``Caz`` is specified, both values default to 0.0. + + * Current data to provide in the value fields: + * ``Dep``, ``W``, ``Th``, ``Te`` + * where + * ``Dep`` = Depth of the drift current being input. Input these values in ascending order from one + command to the next. + + * If the current is constant, only one :ref:`octable` command is necessary and ``Dep`` is not + required. + + * For `Ocean Data Type: Wave ( OCTYPE,WAVE) + `_ + waves, the current profile is stretched or compressed linearly up to 10 percent. + + * The first ``Dep`` value (representing the mean sea level) must be zero. The last ``Dep`` value + (representing the mud line) must be equal to the ``DEPTH`` value input on the :ref:`ocdata` + command. + + * The Cartesian Z values used to locate nodes, etc. decrease as one moves from the ocean surface to + the sea floor, but the ``Dep`` values increase. See :ref:`ocdatafigbasic`. + + * ``Dep`` is not affected by changes to ``Zmsl`` on the :ref:`ocdata` command, as that value simply + relocates the origin. + + * ``W`` = Velocity of the drift current at this location. + * ``Th`` = Angle of the drift current from the global Cartesian X axis toward the global Cartesian Y + axis (in degrees) at this location. + * ``Te`` = Temperature at this location. + + .. _OCTYPEWAVE-6E898667: + + When specifying an ocean wave type, issue the :ref:`octable` command to input either :ref:`wave + location data or ` `Wave Spectrum Input Data + `_ + wave spectrum data. + + .. _octablewavelocinput: + + * Wave location data to provide in the value fields (valid only when ``KWAVE`` = 0 through 3, or 8, + on the :ref:`ocdata` command): + * ``H``, ``T``, ``Ps``, ``L``, ``NORDER``, ``KPRCO`` + * where + * ``H`` = Wave height (peak-to-trough). + * ``T`` = Wave period. + * ``Ps`` = Phase shift (in degrees) + * ``L`` = Wavelength. An optional value used only when ``KWAVE`` = 0 or 1 (and ignored for all other + ``KWAVE`` types). + * ``NORDER`` = Order used by stream function wave theory ( ``KWAVE`` = 3). This value is optional. + * ``KPRCO`` = Key for printing (1) or not printing (0 and default) the calculated dimensionless + coefficients of the stream function wave theory ( ``KWAVE`` = 3). This value is optional. + + **Hints for Wave Location Input:** + + * The :ref:`time` command is not used, except perhaps to identify the load case. + + * The phase shift ( ``Ps`` ) determines the wave position (that is, the point at which the load is + to be applied). + + * When using the Stokes fifth-order ( ``KWAVE`` = 2) or stream function ( ``KWAVE`` = 3) wave type, + issue only one :ref:`octable` command. + + * The valid range of the order of the stream function ( ``NORDER`` ) is 3 through 50. If no value is + specified, the program determines a value automatically. + + * When using the diffracted wave type ( ``KWAVE`` = 8), an :ref:`ocread` command is also required to + read in the hydrodynamic data from the `hydrodynamic analysis + `_. + + .. _octablewavespectinput: + + * Wave spectrum data to provide in the value fields (valid only when ``KWAVE`` = 5 through 7 on the + :ref:`ocdata` command): + * **SPECTRUM= 0** (Pierson-Moskowitz spectrum) + * ``HS``, ``TP``, ``NWC`` + * where + * ``HS`` = Significant wave height of the spectrum. + * ``TP`` = Peak period for the spectrum. + * ``NWC`` = Number of wave components (1 :math:`equation not available` ``NWC`` :math:`equation + not available` 1000) to model the spectrum. (Default= 50.) + * **SPECTRUM= 1** (JONSWAP spectrum) + * ``HS``, ``TP``, ``GAMMA``, ``NWC`` + * where + * ``HS`` = Significant wave height of the spectrum. + * ``TP`` = Peak period for the spectrum. + * ``GAMMA`` = Peak enhancement factor for the spectrum. (Default = 3.3.) + * ``NWC`` = Number of wave components (1 :math:`equation not available` ``NWC`` :math:`equation + not available` 1000) to model the spectrum. (Default= 50.) + * **SPECTRUM= 2** (User-defined spectrum) + * ``w``, ``s``, ``NWC`` + * ``w`` = Angular frequency (rad/s). + * ``s`` = Spectral energy density (Length :sup:`2` / (rad/s)) + * ``NWC`` = Number of wave components (1 :math:`equation not available` ``NWC`` :math:`equation + not available` 1000) to model the spectrum. (Default= 50.) + + **Hints for Wave Spectrum Input:** + + * When defining a Pierson-Moskowitz or JONSWAP spectrum ( ``SPECTRUM`` = 0 or 1, respectively, on + the :ref:`ocdata` command), issue only one :ref:`octable` command. + + * When defining a Pierson-Moskowitz or JONSWAP spectrum for Shell new wave ( ``KWAVE`` = 6 on the + :ref:`ocdata` command), ``HS`` is calculated from the maximum wave crest amplitude ( ``AMPMAX`` on + the :ref:`ocdata` command) if no value is specified. For further information, see `Hydrodynamic + Loads + `_ + + * For a user-defined spectrum ( ``SPECTRUM`` = 2 on the :ref:`ocdata` command), issue an + :ref:`octable` command for each frequency data point defining the spectrum. Specify the frequency + data in ascending order. The number of wave components ( ``NWC`` ) is required on the first + :ref:`octable` command only. + + An ocean zone is a local space where you can override global ocean-loading parameters. + + Ocean zone data to provide in the value fields: + + * ``Z``, --, ``CDy``, ``CDz``, ``CT``, ``CMy``, ``CMz``, ``Mbio``, ``Tbio`` + + where + + * ``Z`` = Z level for the coefficients specified on this command. + * ``--`` = Reserved. + * ``CDy`` = Drag coefficient in the element y direction (normal). + * ``CDz`` = Drag coefficient in the element z direction (normal). This value defaults to ``CDy``. + * ``CT`` = Drag coefficient in the element x direction (tangential). + * ``CMy`` = Coefficient of inertia in the element y direction. + * ``CMz`` = Coefficient of inertia in the element z direction. This value defaults to ``CMy``. + * ``Mbio`` = Material ID of biofouling. + * ``Tbio`` = Thickness of biofouling. + + Ocean zone values specified via the :ref:`octable` command override global ocean-loading parameters. + + Arguments not specified default to the global values specified for the basic ocean type ( + :ref:`octype`,BASIC). Therefore, the relationship between ``Ca`` and ``CM`` values ( ``Ca`` = ``CM`` + - 1.0) is not applied to ocean zones. + + The :ref:`octable` command is not valid for a pipe-type ocean zone ( :ref:`oczone`,PIP). """ command = f"OCTABLE,{val1},{val2},{val3},{val4},{val5},{val6},{val7}" return self.run(command, **kwargs) - def octype(self, datatype="", name="", **kwargs): - """Specifies the type of ocean load data to follow. + def octype(self, datatype: str = "", name: str = "", **kwargs): + r"""Specifies the type of ocean load data to follow. - APDL Command: OCTYPE + Mechanical APDL Command: `OCTYPE `_ Parameters ---------- - datatype + datatype : str The type of ocean data to be input following this command: - BASIC - The basic ocean load, required for any ocean loading. + * ``BASIC`` - The basic ocean load, required for any ocean loading. - CURR - An optional drift current. + * ``CURR`` - An optional drift current. - WAVE - An optional ocean wave state. + * ``WAVE`` - An optional ocean wave state. - name - An eight-character name for the ocean load. An ocean name can - consist of letters and numbers, but cannot contain punctuation, - special characters, or spaces. + Specify basic, current, or wave input data via the :ref:`ocdata` and :ref:`octable` commands. The + example input fragment listed in the `Notes + `_ + Notes section shows how to use the ocean load data types. + + name : str + An eight-character name for the ocean load. An ocean name can consist of letters and numbers, + but cannot contain punctuation, special characters, or spaces. Notes ----- - The OCTYPE command specifies the type of ocean load data to follow - (basic, current, or wave). Issue this command before defining your - ocean load data (OCDATA and OCTABLE). - - Ocean loading applies only to current-technology pipe (PIPE288 and - PIPE289), surface (SURF154), link (LINK180) and beam (BEAM188 and - BEAM189) elements. - - An ocean current or wave is accessible repeatedly. For example, it is - not necessary to input an identical current table again just because - the drag coefficients of the basic input table have changed. - The following example shows how you can use the basic (DataType = - BASIC), current (DataType = CURR), and wave (DataType = WAVE) ocean - data types within the context of a simple input file fragment: + .. _OCTYPE_notes: + + The :ref:`octype` command specifies the type of ocean load data to follow (basic, current, or wave). + Issue this command before defining your ocean load data ( :ref:`ocdata` and :ref:`octable` ). + + Ocean loading applies only to current-technology pipe ( ``PIPE288`` and ``PIPE289`` ), surface ( + ``SURF154`` ), link ( ``LINK180`` ) and beam ( ``BEAM188`` and ``BEAM189`` ) elements. + + An ocean current or wave is accessible repeatedly. For example, it is not necessary to input an + identical current table again just because the drag coefficients of the basic input table have + changed. + + The following example shows how you can use the basic ( ``DataType`` = BASIC), current ( + ``DataType`` = CURR), and wave ( ``DataType`` = WAVE) ocean data types within the context of a + simple input file fragment: + + .. code:: apdl + + Do=1.5 ! outside diameter + th=0.1 ! wall thickness + height=10 ! wave height + CS=2 ! surface current speed + Depth=100 ! water depth + matwat=2 ! material number id of the ocean + secpipe= 1 ! section number of the pipe + ! + sectype,secpipe,pipe,,pipetest + secdata,Do,th,16 ! 16 cells around circumference + ! + octype,basic + ocdata,Depth,matwat,0,0,0,0 ! suppress added mass and buoyancy + octable,,,.5,.5,,2 ! CD =.5, CM = 2 + + octype,curr + octable,0.0,CS ! input free surface current speed + octable,Depth,0.00 ! input ocean floor current speed of 0.0 + ! + octype,wave + ocdata,2 ! request Stokes wave type + octable,height,8 ! wave period of 8 seconds + + slist,all ! lists pipe section AND + ! mentions ocean loading + oclist,all ! lists details of ocean loading """ command = f"OCTYPE,{datatype},{name}" return self.run(command, **kwargs) def oczone( - self, zonetype="", zonename="", compnameint="", compnameext="", **kwargs + self, + zonetype: str = "", + zonename: str = "", + compnameint: str = "", + compnameext: str = "", + **kwargs, ): - """Specifies the type of ocean zone data to follow. + r"""Specifies the type of ocean zone data to follow. - APDL Command: OCZONE + Mechanical APDL Command: `OCZONE `_ Parameters ---------- - zonetype + zonetype : str The type of ocean zone data to be input following this command: - COMP - Define by a component. + * ``COMP`` - Define by a component. + + * ``ZLOC`` - Define by Z levels. - ZLOC - Define by Z levels. + * ``PIP`` - Associate an internal pipe or pipes with an external pipe. - PIP - Associate an internal pipe or pipes with an external pipe. + zonename : str + The ocean zone name. If no name is specified, the program assigns one. - zonename - The ocean zone name. If no name is specified, the program assigns - one. + compnameint : str + For ``Zonetype`` = COMP, the required name of a component. - compnameint - For Zonetype = COMP, the required name of a component. + For ``Zonetype`` = PIP, the required name of an internal pipe component. - compnameext - For Zonetype = PIP, the required name of an external pipe - component. + compnameext : str + For ``Zonetype`` = PIP, the required name of an external pipe component. Notes ----- - The OCZONE command specifies the type of ocean zone data to follow - (component, Z-level, or internal pipes associated with an external - pipe). An ocean zone is a local space where you can override global - ocean-loading parameters. - Names specified for ZoneName, CompNameInt, and CompNameExt can consist - of up to 32 alphanumeric characters. The name cannot contain - punctuation, special characters, or spaces. + .. _OCZONE_notes: - For Zonetype = COMP, the zone is defined by a component. Only the - elements in the component are affected by the local parameters. A - partial component can be defined as the zone via the Z input on the - OCTABLE command. + The :ref:`oczone` command specifies the type of ocean zone data to follow (component, Z-level, or + internal pipes associated with an external pipe). An ocean zone is a local space where you can + override global ocean-loading parameters. - For Zonetype = ZLOC, the zone is defined by Z levels. Structural - elements (such as BEAM188, BEAM189, PIPE288, PIPE289, and LINK180) in - the Z levels are included in the zone. + Names specified for ``ZoneName``, ``CompNameInt``, and ``CompNameExt`` can consist of up to 32 + alphanumeric characters. The name cannot contain punctuation, special characters, or spaces. - For Zonetype = PIP, the zone is prepared for a special configuration of - pipes. It associates an internal pipe or pipes with an external pipe to - remove the hydrodynamic effect on the internal pipe. Only hydrostatic - pressure is applied on the internal pipe. + For ``Zonetype`` = COMP, the zone is defined by a component. Only the elements in the component are + affected by the local parameters. A partial component can be defined as the zone via the Z input on + the :ref:`octable` command. + + For ``Zonetype`` = ZLOC, the zone is defined by Z levels. Structural elements (such as ``BEAM188``, + ``BEAM189``, ``PIPE288``, ``PIPE289``, and ``LINK180`` ) in the Z levels are included in the zone. + + For ``Zonetype`` = PIP, the zone is prepared for a special configuration of pipes. It associates an + internal pipe or pipes with an external pipe to remove the hydrodynamic effect on the internal pipe. + Only hydrostatic pressure is applied on the internal pipe. This command is also valid in PREP7. - Figure: 6:: : Ocean Zone Types (Specified via ZoneType) + .. figure::../../../images/_commands/gcmd_oczone_comp.png + + Ocean Zone Types (Specified via ZoneType) - Issue this command before defining your ocean load data (OCDATA or - OCTABLE). Define components before defining a component-type or a pipe- - type zone (OCZONE,COMP or OCZONE,PIP, respectively). + Issue this command before defining your ocean load data ( :ref:`ocdata` or :ref:`octable` ). Define + components before defining a component-type or a pipe-type zone ( :ref:`oczone`,COMP or + :ref:`oczone`,PIP, respectively). """ command = f"OCZONE,{zonetype},{zonename},{compnameint},{compnameext}" return self.run(command, **kwargs) diff --git a/src/ansys/mapdl/core/_commands/solution/radiosity.py b/src/ansys/mapdl/core/_commands/solution/radiosity.py index 8bab8c3e4be..cb68c74f420 100644 --- a/src/ansys/mapdl/core/_commands/solution/radiosity.py +++ b/src/ansys/mapdl/core/_commands/solution/radiosity.py @@ -22,264 +22,825 @@ class Radiosity: - def rdec(self, option="", reduc="", nplace="", **kwargs): - """Defines the decimation parameters. - APDL Command: RDEC + def hemiopt(self, hres: str = "", tolerance: str = "", **kwargs): + r"""Specifies options for Hemicube view factor calculation. + + Mechanical APDL Command: `HEMIOPT `_ + + Parameters + ---------- + hres : str + Hemicube resolution. Increase value to increase the accuracy of the view factor calculation. + Defaults to 10. + + tolerance : str + Tolerance value that controls whether or not facets are subdivided in view factor calculations + to increase view factor accuracy. ``TOLERANCE`` is closely related to the spacing between + facets. Defaults to 1e-6. + """ + command = f"HEMIOPT,{hres},{tolerance}" + return self.run(command, **kwargs) + + def qsopt(self, opt: str = "", **kwargs): + r"""Specifies quasi static radiation options. + + Mechanical APDL Command: `QSOPT `_ Parameters ---------- - option + opt : str + Quasi static option: + + * ``OFF`` - Do not run transient radiation problem to steady-state (default). + + * ``ON`` - Run transient radiation problem to steady-state. + + Notes + ----- + + .. _QSOPT_notes: + + For more information on solving a static problem using a false transient approach, see. + """ + command = f"QSOPT,{opt}" + return self.run(command, **kwargs) + + def radopt( + self, + fluxtol: str = "", + solver: int | str = "", + maxiter: str = "", + toler: str = "", + overrlex: str = "", + maxfluxiter: int | str = "", + conservation: int | str = "", + **kwargs, + ): + r"""Specifies Radiosity Solver options. + + Mechanical APDL Command: `RADOPT `_ + + Parameters + ---------- + + fluxtol : str + Convergence tolerance for radiation flux. Defaults to 0.0001. This value is a relative + tolerance. + + solver : int or str + Choice of solver for radiosity calculation: + + * ``0`` - Gauss-Seidel iterative solver. + + * ``1`` - Direct solver. + + * ``2`` - Jacobi iterative solver (default). + + maxiter : str + Maximum number of iterations for the iterative solvers ( ``SOLVER`` = 0 or 2). Defaults to 1000. + + toler : str + Convergence tolerance for the iterative solvers ( ``SOLVER`` = 0 or 2). Defaults to 0.1. + + If ``TOLER`` ≥ 0, the value is interpreted as an absolute tolerance. If ``TOLER`` < 0, it is + interpreted as a relative tolerance. + + overrlex : str + Over-relaxation factor applied to the iterative solvers ( ``SOLVER`` = 0 or 2). Defaults to 0.1. + + maxfluxiter : int or str + Maximum number of flux iterations to be performed according to the specified solver type: + + * ``0`` - If the FULL solver is specified ( :ref:`thopt`,FULL), convergence criteria are monitored + and iterations are performed until convergence occurs. If the QUASI solver is specified ( + :ref:`thopt`,QUASI), convergence criteria are ignored and one iteration is performed. This value is + the default. + + * ``1, 2, 3,...N`` - If the FULL solver is specified ( :ref:`thopt`,FULL), convergence criteria are + monitored and iterations are performed until convergence occurs, or until the specified number of + iterations has been completed, whichever comes first. If the QUASI solver is specified ( + :ref:`thopt`,QUASI), convergence criteria are ignored and the specified number of iterations are + completed. + + To view ``MAXFLUXITER`` usage illustrations, see and. + + conservation : int or str + Key to account for the midside node temperature of underlying solid elements for radiosity + calculations. Under normal circumstations using lower order elements, this option does not need to + be activated. However, when using higher elements, you can improve energy conservation by setting ``CONSERVATION`` = 1. + + * ``0`` - Not active (default). The midside node temperatures are not accounted for in the radiosity + calculations. + + * ``1`` - Active. The midside node temperatures are accounted for in the radiosity calculations. To + work effectively, ``CONSERVATION`` requires a one-to-one correspondance between the surface elements + and their underlying solid elements. Therefore, it cannot be activated if the :ref:`rdec` command + was issued when generating ``SURF251`` or ``SURF252`` elements. + + Notes + ----- + + .. _RADOPT_notes: + + The radiation heat flux is linearized, resulting in robust convergence. + + The radiation flux norm for ``FLUXTOL`` is expressed as: + + .. math:: + + equation not available + + where i is the pass or iteration number and j is the surface facet for radiation. + + For a sufficiently small absolute tolerance value, relative tolerance converges in fewer iterations + than absolute tolerance. For a sufficiently large absolute tolerance value, relative tolerance may + cause convergence difficulties. + + For more information about ``FLUXTOL`` and ``MAXFLUXITER`` usage, see and in the `Thermal Analysis + Guide `_. + + In and (under `Solving for Temperature and Radiosity + `_ + :sub:`Q` Q = F:sub:`Q` equation system via the iterative method. + + If ``TOLER`` ≥ 0, the iterative solver ( ``SOLVER`` = 0 or 2) is converged for maximum value over a + different ``j`` as shown: + + .. math:: + + equation not available + + If ``TOLER`` < 0, the iterative solver ( ``SOLVER`` = 0 or 2) is converged for maximum value over a + different ``j`` as shown: + + .. math:: + + equation not available + + where: + + * ``j`` = number of radiation facets + * ``k`` = number of iterations ( ``k`` = 1 to ``MAXITER`` ) + + The Jacobi iterative solver ( ``SOLVER`` = 2) is the only solver choice that runs in a fully + distributed parallel fashion. Therefore, it is typically the best choice for optimal performance + when running in distributed-memory parallel mode. + """ + command = f"RADOPT,,{fluxtol},{solver},{maxiter},{toler},{overrlex},,,,,{maxfluxiter},{conservation}" + return self.run(command, **kwargs) + + def rdec(self, option: str = "", reduc: str = "", nplace: str = "", **kwargs): + r"""Defines the decimation parameters used by the radiosity solver method. + + Mechanical APDL Command: `RDEC `_ + + Parameters + ---------- + option : str Command options: - DEFINE - Defines the decimation parameters (default). + * ``DEFINE`` - Defines the decimation parameters (default). - STAT - Shows the status/listing. Other command options are ignored. + * ``STAT`` - Shows the status/listing. Other command options are ignored. - reduc - Approximate reduction in the number of surface - elements. Valid range is from 0.0 (no decimation, the - default) to 1.0. This number is a factor applied to the - initial number of element radiosity surfaces. + reduc : str + Approximate reduction in the number of surface elements. Valid range is from 0.0 (no decimation, + the default) to 1.0. This number is a factor applied to the initial number of element radiosity + surfaces. - nplace + nplace : str Node placement algorithm - OPTI - Optimal placement. An edge is collapsed by moving - both nodes (I and J in the figure below) to a new - location. + * ``OPTI`` - Optimal placement. An edge is collapsed by moving both nodes (I and J in the figure + below) to a new location. + + * ``SUBS`` - Subset placement. An edge is collapsed by moving one node to another one. In the figure + below, node I is moved to node J. - SUBS - Subset placement. An edge is collapsed by moving - one node to another one. In the figure below, node - I is moved to node J. + .. figure::../../../images/_commands/gRDEC.svg Notes ----- - Decimation is the process of simplifying a fine surface mesh into a - coarse one. This process is accomplished by a sequence of edge - collapses. + The :ref:`rdec` command sets decimation parameters. These parameters are used by the next + :ref:`rsurf` command to generate radiosity surface elements. - The maximum degree of decimation (1.0) is unreachable. The real degree - of decimation is always less than 1.0 because the decimated mesh must - always consist of at least one element. + Decimation is the process of simplifying a fine surface mesh into a coarse one. This process is + accomplished by a sequence of edge collapses. + + The maximum degree of decimation (1.0) is unreachable. The real degree of decimation is always less + than 1.0 because the decimated mesh must always consist of at least one element. """ - return self.run(f"RDEC,{option},{reduc},,{nplace}", **kwargs) + command = f"RDEC,{option},{reduc},,{nplace}" + return self.run(command, **kwargs) - def rsopt(self, opt="", filename="", ext="", dir_="", **kwargs): - """Creates or loads the radiosity mapping data file for SURF251 or SURF252 + def rsopt( + self, opt: str = "", filename: str = "", ext: str = "", dir_: str = "", **kwargs + ): + r"""Creates or loads the radiosity mapping data file for ``SURF251`` or ``SURF252`` element types. - APDL Command: RSOPT - element types. + Mechanical APDL Command: `RSOPT `_ Parameters ---------- - opt + opt : str File option: - SAVE - Write the radiosity mapping data to a file. (Default) + * ``SAVE`` - Write the radiosity mapping data to a file. (Default) - LOAD - Read in the specified mapping data file. + * ``LOAD`` - Read in the specified mapping data file. - fname - File name for radiosity mapping data file. Defaults to Jobname. + filename : str + The description of the argument is missing in the Python function. Please, refer to the `command + documentation + `_ for further + information. - ext - Filename extension for radiosity mapping data file (default = - .rsm). + ext : str + Filename extension for radiosity mapping data file (default = :file:`.rsm` ). - dir\\_ - Directory path for radiosity mapping data file. If you do not - specify a directory path, it will default to your working - directory. + dir_ : str + Directory path for radiosity mapping data file. If you do not specify a directory path, it will + default to your working directory. Notes ----- - Use this command to manually create or load a radiosity mapping data - file. This command is useful if you want to create the mapping data - file without issuing SAVE or CDWRITE, or if you want to specify that - the file be located in a directory other than your working directory. - Also use this command to manually load an existing mapping data file - during a restart. - - Distributed ANSYS Restriction: This command is not supported in - Distributed ANSYS. + Use this command to manually create or load a radiosity mapping data file. This command is useful if + you want to create the mapping data file without issuing :ref:`save` or :ref:`cdwrite`, or if you + want to specify that the file be located in a directory other than your working directory. Also use + this command to manually load an existing mapping data file during a restart. Distributed-Memory + Parallel (DMP) Restriction This command is not supported in a DMP solution. """ command = f"RSOPT,{opt},{filename},{ext},{dir_}" return self.run(command, **kwargs) - def rsurf(self, options="", delopts="", etnum="", **kwargs): - """Generates the radiosity surface elements (SURF251/SURF252) and stores + def rsurf(self, options: str = "", delopts: str = "", etnum: str = "", **kwargs): + r"""Generates the radiosity surface elements and stores them in the database. - APDL Command: RSURF - them in the database. + Mechanical APDL Command: `RSURF `_ Parameters ---------- - options + options : str Command options: - CLEAR - Deletes radiosity surface elements and nodes. The set of elements and nodes to - be deleted is defined by Delopts. ETNUM is ignored. + * ``CLEAR`` - Deletes radiosity surface elements and nodes. The set of elements and nodes to be + deleted is defined by ``Delopts``. ``ETNUM`` is ignored. - DEFINE - Creates the radiosity surface elements and nodes (default). + * ``DEFINE`` - Creates the radiosity surface elements and nodes (default). - STAT - Shows the status/listing. Other command options are ignored. + * ``STAT`` - Shows the status/listing. Other command options are ignored. - delopts + delopts : str Deletion options - ALL - Deletes all radiosity surface elements and nodes. + * ``ALL`` - Deletes all radiosity surface elements and nodes. - LAST - Deletes radiosity surface elements and nodes created by the last RSURF command. + * ``LAST`` - Deletes radiosity surface elements and nodes created by the last :ref:`rsurf` command. - etnum - Element type number. Leave blank to indicate the next available - number. + etnum : str + Element type number. Leave blank to indicate the next available number. Notes ----- - This command generates the radiosity surface elements based on the - RSYMM and RDEC parameters and stores them in the database. It works - only on the faces of selected underlying elements that have RDSF flags - on them and all corner nodes selected. You can issue multiple RSURF - commands to build the radiosity model. However, all RSURF commands must - be issued after issuing the RSYMM, and after the model is complete - (i.e., after all meshing operations are complete). - - If you do issue multiple RSURF commands for different regions, you must - first mesh the different regions, and then generate the radiosity - surface elements on each meshed region individually. Use RSURF,,,ETNUM - to assign a separate element type number to each region. This procedure - allow you to identify the individual regions later in the multi-field - analysis. - - If the underlying solid elements are higher order, the radiosity - surface elements are always lower order (4- or 3-node in 3-D or 2-node - in 2-D). Decimation will always occur before any symmetry operations. - - For 2-D axisymmetric YR models, the newly-generated nodes can have only - positive Y coordinates. - - If you have already issued RSURF for a surface and you issue RSURF - again, the program creates a new set of radiosity surface elements and - nodes over the existing set, resulting in an erroneous solution. - - Distributed ANSYS Restriction: This command is not supported in - Distributed ANSYS. - - This is an action command (that creates or deletes surface meshes) and - is serial in nature. Even if Distributed ANSYS is running, the RSURF - command runs serially + This command generates the radiosity surface elements ( ``SURF251``, ``SURF252`` ) based on the + :ref:`rsymm` and :ref:`rdec` parameters and stores them in the database. It works only on the faces + of selected underlying elements that have RDSF flags on them and all corner nodes selected. You can + issue multiple :ref:`rsurf` commands to build the radiosity model. However, all :ref:`rsurf` + commands must be issued after issuing the :ref:`rsymm` command, and after the model is complete + (that is, after all meshing operations are complete). + + If you do issue multiple :ref:`rsurf` commands for different regions, you must first mesh the + different regions, and then generate the radiosity surface elements on each meshed region + individually. Use :ref:`rsurf`,,,ETNUM to assign a separate element type number to each region. This + procedure allow you to identify the individual regions later in the multi-field analysis. + + If the underlying solid elements are higher order, the radiosity surface elements are always lower + order (4- or 3-node in 3D or 2-node in 2D). Decimation will always occur before any symmetry + operations. + + For 2D axisymmetric YR models, the newly-generated nodes can have only positive Y coordinates. + + The :ref:`rsurf` command assigns real constant set number 1 to all ``SURF251`` and ``SURF252`` + elements generated, irrespective of the current real constant set attribute pointer ( :ref:`real` + command). If the generated elements require a real constant set other than number 1, you must + manually change the set number for those elements by using the :ref:`emodif`,,REAL command. + + If you have already issued :ref:`rsurf` for a surface and you issue :ref:`rsurf` again, the program + creates a new set of radiosity surface elements and nodes over the existing set, resulting in an + erroneous solution. Distributed-Memory Parallel (DMP) Restriction This command is not supported in a + DMP solution. + + This is an action command (that creates or deletes surface meshes) and is serial in nature. Even if + a DMP solution is running, the :ref:`rsurf` command runs serially. """ command = f"RSURF,{options},{delopts},{etnum}" return self.run(command, **kwargs) - def rsymm(self, option="", cs="", axis="", nsect="", condvalue="", **kwargs): - """Defines the plane of symmetry or center of rotation for the radiosity - - APDL Command: RSYMM - method. + def rsymm( + self, + option: str = "", + cs: str = "", + axis: str = "", + nsect: str = "", + condvalue: str = "", + sval: str = "", + eval_: str = "", + **kwargs, + ): + r"""Defines symmetry, rotation, or extrusion parameters for the radiosity method. + + Mechanical APDL Command: `RSYMM `_ Parameters ---------- - option + option : str Command options: - CLEAR - Deletes all symmetry definitions. Other command options are ignored. + * ``CLEAR`` - Deletes all symmetry/extrusion definitions. Other command options are ignored. + + * ``DEFINE`` - Defines the symmetry/extrusion definition (default). + + * ``STAT`` - Shows the status/listing. Other command options are ignored. + + * ``COND`` - Activates or deactivates condensation for all defined radiation symmetries/extrusions, + which reduces the size of the radiosity equation system (see :ref:`cmd_rsymm_fig1` ). Default is + off. + + Condensation via :ref:`rsymm`,COND is not recommended as the most efficient solution for symmetric + models. To best leverage model symmetry to improve efficiency, use view factor condensation via the + :ref:`vfco` command, which condenses the view factor matrix in addition to simplifying the radiosity + equations (see :ref:`RSYMM_VFCO_notes` for details). + + cs : str + Local coordinate system ( :math:`equation not available` 11) as defined using the :ref:`local` + or :ref:`cs` commands or the global coordinate system (0). For planar reflection, the coordinate + system origin must be on the plane of symmetry (POS) and one of its axes must be normal to the + POS. For cyclic reflection, the coordinate system origin must be coincident with the center of + rotation (COR). Only Cartesian systems are valid. + + axis : str + Axis label of the coordinate system ( ``CS`` ) that is normal to the POS for planar reflection, or + label to indicate the type of extrusion. For cyclic reflection, this field must be blank, and it is + assumed that the Z axis is aligned with the axis of rotation. + + * ``X, Y, or Z`` - Planar reflection. For 2D model planar reflections, valid labels are X or Y. For + 3D model planar reflections, valid labels are X, Y, or Z. + + * ``ZEXT`` - Linear extrusion of a line element in the X-Y plane, in the Z direction, to create + 4-noded ``SURF252`` elements. ``NSECT`` indicates how many elements will be created. ``SVAL`` is the + starting Z value, and ``EVAL`` is the ending Z value. ``CS`` must be 0. - DEFINE - Defines the symmetry (default). + * ``CEXT`` - Circumferential extrusion (theta direction) around the global Y-axis. A 2-noded line + element in the X-Y plane is extruded to create 4-noded ``SURF252`` elements. ``NSECT`` indicates how + many elements will be created. ``SVAL`` is the starting angle, and EVAL is the ending angle (in + degrees). The angles are with respect to the global X-axis. ``CS`` must be 0. - STAT - Shows the status/listing. Other command options are ignored. + * ``(blank)`` - Cyclic reflection. - COND - Activates or deactivates condensation in the radiosity solver for all defined - radiation symmetries. Condensation is the process where the - radiosity equation system is reduced in size. Default is - off. (See Figure 7: Usage Example: Option = COND .) + nsect : str + Number of cyclic reflections to be done, or number of elements in the extrusion direction. - cs - Local coordinate system (11) as defined using the LOCAL or CS - commands or a global coordinate system (0). For planar reflection, - the coordinate system origin must be on the plane of symmetry (POS) - and one of its axes must be normal to the POS. For cyclic - reflection, the coordinate system origin must be coincident with - the center of rotation (COR). Only Cartesian systems are valid. + For planar reflection, this field must be 0 or blank. - axis - Axis label of the coordinate system (CS) that is normal to the POS - for planar reflection. For 2-D model planar reflections, valid - labels are X or Y. For 3-D model planar reflections, valid labels - are X, Y, or Z. Must be blank for cyclic reflection. For cyclic - reflection, it is assumed that the Z axis is aligned with the axis - of rotation. + For cyclic reflection, this field must be ≥ 1 or ≤ -1. Use a positive value if you want the + sector angle to be computed automatically. Use a negative value if you want the sector angle to + be computed manually. See `Notes + `_ + Notes for details. - nsect - Number of cyclic reflections to be done (1). This field must be - blank or 0 for planar reflection. Default is blank. + condvalue : str + Condensation key. Valid only when ``Option`` = COND. - condvalue - Condensation key. Valid only when Option = COND. + * ``ON`` - Activates condensation in the radiosity solver for all defined radiation + symmetries/extrusions. - ON - Activates condensation in the radiosity solver for all defined radiation - symmetries. + * ``OFF`` - Deactivates condensation in the radiosity solver for all defined radiation + symmetries/extrusions (default). - OFF - Deactivates condensation in the radiosity solver for all defined radiation - symmetries (default). + sval : str + Starting and ending Z values (if ``Axis`` = ZEXT) or angle values (if ``Axis`` = CEXT) used for + the extrusion. Not used for planar or cyclic reflection. + + eval_ : str + Starting and ending Z values (if ``Axis`` = ZEXT) or angle values (if ``Axis`` = CEXT) used for + the extrusion. Not used for planar or cyclic reflection. Notes ----- - This command is used to define the POS for planar reflection or the COR - for cyclic reflection. The RSYMM command must be issued before RSURF - and it may be issued multiple times to have more than one planar/cyclic - reflection; however, the RSURF command processes them in the order they - are issued. - - For planar reflection, you must define a local coordinate system (11) - with its origin on the POS. One of its axes must be aligned so that it - is normal to the plane. If possible, use the existing global coordinate - system (0). - - For cyclic reflection, you must define a local coordinate system (11) - with its origin coincident with the COR. Reflections occur about the - local Z-axis in the counterclockwise direction. You must align the - Z-axis properly. If possible, use the existing global coordinate system - (0). - - New surface elements generated inherit the properties of the original + + .. _rsymm_notes: + + The :ref:`rsymm` command is used to define the plane of symmetry (POS) for planar reflection or the + center of rotation (COR) for cyclic reflection. It can also be used to set parameters for a linear + or circumferential extrusion. The input provided on this command is used to generate radiosity + surface elements ( ``SURF251`` / ``SURF252`` ) when the :ref:`rsurf` command is issued. + + The :ref:`rsymm` command must be issued before :ref:`rsurf`, and it may be issued multiple times to + have more than one planar/cyclic reflection or extrusion. The :ref:`rsurf` command processes + :ref:`rsymm` commands in the order they are issued. + + For planar reflection, you must define a local coordinate system ( :math:`equation not available` + 11) with its origin on the POS. One of its axes must be aligned so that it is normal to the plane. + If possible, use the existing global coordinate system (0). + + For cyclic reflection, you must define a local coordinate system ( :math:`equation not available` + 11) with its origin coincident with the COR. Reflections occur about the local Z-axis in the + counterclockwise direction. You must align the Z-axis properly. If possible, use the existing + global coordinate system (0). + + For cyclic reflection, ``NSECT`` is used as follows: + + :math:`equation not available` + + :math:`equation not available` + + where θ:sub:`max` and θ:sub:`min` are computed internally based on location of the + RDSF (surface-to-surface radiation) flagged surfaces. + + See :ref:`cmd_rsymm_fig2` for an example of ``NSECT`` usage. + + For linear or circumferential extrusion ( ``Axis`` = ZEXT or CEXT), you must ensure that the + extruded area matches the area of the underlying element; otherwise, the results may not be correct. + For example, in the case of ``PLANE55`` elements with a planar depth = 10, use ``Axis`` = ZEXT and + set ``SVAL`` and ``EVAL`` such that ``EVAL`` - ``SVAL`` = 10. Likewise, for axisymmetric ``PLANE55`` + elements, use ``Axis`` = CEXT and set ``SVAL`` and ``EVAL`` such that ``EVAL`` - ``SVAL`` = 360. You + must also issue :ref:`v2dopt`,1 for the axisymmetric case. See :ref:`cmd_rsymm_fig3` for extrusion + examples. + + The ``Axis`` = ZEXT and CEXT options are not valid for ``SHELL131`` and ``SHELL132`` elements. + + New surface elements generated by the :ref:`rsymm` command inherit the properties of the original elements. - For 2-D axisymmetric models, RSYMM can be used only for symmetrization - in the YR plane. It cannot be used for the theta direction. Use V2DOPT - in that case. + For 2D axisymmetric models, :ref:`rsymm` can be used only for symmetrization in the YR plane. It + cannot be used for the theta direction. Use :ref:`v2dopt` in that case. + + For 2D axisymmetric YR models, the newly-generated nodes can have only positive X coordinates. + + Usage Example: Positive and Negative ``NSECT`` Values + This command contains some tables and extra information which can be inspected in the original + documentation pointed above. + + .. figure::../../../images/_commands/gcmdrsymm3.png + + Usage Example: Extrusions with Axis= ZEXT and CEXT + + .. _RSYMM_VFCO_notes: + + Considerations for View Factor Condensation + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + View Factor Condensation via the :ref:`vfco` command is the recommended method to improve solution + efficiency for models with symmetry, which are defined with the :ref:`rsymm` command. + + When the :ref:`rsymm` command is used, it implies that some radiation facets ( ``SURF251`` or + ``SURF252`` ) created by the :ref:`rsurf` command will be a reflection of others. By definition, + radiation facets with an underlying solid element are independent facets. Dependent facets are + copies of the independent facets having the same dimensions but at different locations. The + following figures illustrate solid elements (grey) and independent (blue) and dependent (red) facets + for models with different types of symmetry. View factor condensation improves efficiency by + condensing the view factor matrix to calculate view factors only for independent facets ( ) and + simplifying the radiosity equations to solve only for the independent radiosity flux ( `Radiosity + Equations Simplified for Models with Symmetry + `_ + `Example of a 3D Open Enclosure with Symmetry: Radiation Analysis with Condensed View Factor + Calculation + `_ + + Independent and Dependent Facets in a Model with Planar Symmetry Employing View Factor Condensation + + Independent and Dependent Facets in a Model with Cyclic Symmetry Employing View Factor Condensation + + Independent and Dependent Facets for a Model Built by Extrusions Employing View Factor Condensation + Although it is not the recommended method, the following figure illustrates condensation via + :ref:`rsymm`,COND. The efficiency gains by condensation via :ref:`rsymm`,COND are less than those + obtained with view factor condensation via the :ref:`vfco` command, which reduces the view factor + matrix in addition to simplifying the radiosity equations, as described in and `Radiosity Equations + Simplified for Models with Symmetry + `_ + + .. figure::../../../images/_commands/gcmdrsymm1.png - For 2-D axisymmetric YR models, the newly-generated nodes can have only - positive X coordinates. + Usage Example: Option= COND - Figure: 7:: : Usage Example: Option = COND + **Example Usage** - Distributed ANSYS Restriction: This command is not supported in - Distributed ANSYS. + .. _RSYMM_example: + + 2D Radiation Analysis Using the Radiosity Method with Decimation and Symmetry + + `3D Open Enclosure with Symmetry: Radiation Analysis with Condensed View Factor Calculation + `_ """ - command = f"RSYMM,{option},{cs},{axis},{nsect},{condvalue}" + command = f"RSYMM,{option},{cs},{axis},{nsect},{condvalue},{sval},{eval_}" return self.run(command, **kwargs) - def qsopt(self, opt="", **kwargs): - """Specifies quasi static radiation options. + def spcnod(self, encl: str = "", node: str = "", **kwargs): + r"""Defines a space node for radiation using the Radiosity method. - APDL Command: QSOPT + Mechanical APDL Command: `SPCNOD `_ Parameters ---------- - opt - Quasi static option: + encl : str + Radiating surface enclosure number. Defaults to 1. If ENCL = STAT, the command lists all + enclosure space nodes. If ENCL = DELE, the command deletes all enclosure space nodes. + + node : str + Node defined to be the space node. + + Notes + ----- + + .. _SPCNOD_notes: + + For open systems, an enclosure may radiate to a space node ( ``NODE`` ). + + Open systems may be characterized by one or more enclosures ( ``ENCL`` ). Each enclosure may radiate + to a different space node ( ``NODE`` ). + + For a space node that is not part of the finite element model, specify the temperature using the + :ref:`d` command. For the first load step, the space node temperature ramps from the uniform + temperature specified by the :ref:`tunif` command to the temperature specified by the :ref:`d` + command. For subsequent load steps, it ramps from the previous value of the space node temperature. + For intermediate load steps, use the :ref:`spcnod`,DELETE command and specify the space node + temperature again to ramp from the uniform temperature. + + For a space node that is part of the finite element model, the temperature is that calculated during + the finite element solution. + """ + command = f"SPCNOD,{encl},{node}" + return self.run(command, **kwargs) + + def spctemp(self, encl: str = "", temp: str = "", **kwargs): + r"""Defines a free-space ambient temperature for radiation using the Radiosity method. - OFF - Do not run transient radiation problem to steady-state (default). + Mechanical APDL Command: `SPCTEMP `_ - ON - Run transient radiation problem to steady-state. + Parameters + ---------- + encl : str + Radiating surface enclosure number. Defaults to 1. If ``ENCL`` = STAT, the command lists all + enclosure space temperatures. If ``ENCL`` = DELE, the command deletes all enclosure space + temperatures. + + temp : str + Temperature of free-space in the reference temperature system. The temperature will be offset by + the value specified in the :ref:`toffst` command for internal calculations. Notes ----- - Distributed ANSYS Restriction: This command is not supported in - Distributed ANSYS. + + .. _SPCTEMP_notes: + + For open systems, an enclosure may radiate to the free-space ambient temperature ( ``TEMP`` ). + + Open systems may be characterized by one or more enclosures ( ``ENCL`` ). Each enclosure may radiate + to a different free-space ambient temperature ( ``TEMP`` ). + + For the first load step, the space temperature ramps from the uniform temperature specified by the + :ref:`tunif` command to the temperature specified by the :ref:`spctemp` command. For subsequent load + steps, it ramps from the previous value of the space temperature. For intermediate load steps, use + the :ref:`spctemp`,DELETE command and specify the space temperature again to ramp from the uniform + temperature. + + Reissuing :ref:`spctemp` does not overwrite the previous value. To change the free-space ambient + temperature ( ``TEMP`` ) between loadsteps, you must issue :ref:`spctemp`,DELETE and then reissue + :ref:`spctemp`, ``ENCL``, ``TEMP``. """ - command = f"QSOPT,{opt}" + command = f"SPCTEMP,{encl},{temp}" + return self.run(command, **kwargs) + + def v2dopt( + self, + geom: int | str = "", + ndiv: str = "", + hidopt: int | str = "", + nzone: str = "", + **kwargs, + ): + r"""Specifies 2D/axisymmetric view factor calculation options. + + Mechanical APDL Command: `V2DOPT `_ + + **Command default:** + + .. _V2DOPT_default: + + By default, a planar geometry is assumed ( ``GEOM`` = 0) and the hidden viewing option is used ( + ``HIDOPT`` = 0). + + The view factor algorithm sets the number of rays as follows, depending on whether a planar or + axisymmetric geometry is specified: + + * For ``GEOM`` = 0, ``HIDOPT`` = 0 and ``NZONE`` = 0, the number of zones used in view the factor + calculation is 200. + + * For ``GEOM`` = 1, ``HIDOPT`` = 0, and ``NZONE`` = 0, the number of zones used in the view factor + calculation is 20. + + Parameters + ---------- + geom : int or str + Choice of geometry: + + * ``0`` - Planar (default). + + * ``1`` - Axisymmetric + + ndiv : str + Number of divisions for axisymmetric geometry (that is, the number of circumferential segments). + Default is 50. There is no maximum limit if ``HIDOPT`` = 0; the maximum is 90 if ``HIDOPT`` = 1. + If ``NDIV`` is ≤ 6, it is reset to 50. + + For more information, see `View Factors of Axisymmetric Bodies + `_ + + hidopt : int or str + Viewing option: + + * ``0`` - Hidden (default). + + * ``1`` - Non-hidden + + nzone : str + Number of zones (that is, the number of rays emanating from a surface) for view factor + calculation. This is used if ``HIDOPT`` = 0. + + If ``NZONE`` is blank, it is set to 0 and the view factor algorithm sets the number of rays. + (See Command Default below.) + + If ``NZONE`` is < 0 or > 1000, it is set to 200. + + Notes + ----- + + .. _V2DOPT_notes: + + :ref:`v2dopt` sets 2D view factor calculation options for the radiosity solver method. For 2D view + factor calculations, the ray-emanation method is used. + + The geometry type can be either 2D planar (default) or axisymmetric. For the axisymmetric case, you + can define the number of circumferential segments (defaults to 20). You can also specify the hidden + or non-hidden viewing option (defaults to hidden) and the number of zones for the view factor + calculation. For more information, see `Process for Using the Radiosity Solver Method + `_ + """ + command = f"V2DOPT,{geom},{ndiv},{hidopt},{nzone}" + return self.run(command, **kwargs) + + def vfopt( + self, + opt: str = "", + filename: str = "", + ext: str = "", + dir_: str = "", + filetype: str = "", + fileformat: int | str = "", + wrio: str = "", + addional_command_arg: str = "", + **kwargs, + ): + r"""Specifies options for the view factor file and calculates view factors. + + Mechanical APDL Command: `VFOPT `_ + + Parameters + ---------- + opt : str + View factor option: + + * ``NEW`` - Calculate view factors, store them in the database, and write them to a file. This is an + action option that is executed immediately when the command is issued. + + * ``OFF`` - Do not recalculate or read view factors if they already exist in the database; otherwise + calculate them at the next :ref:`solve` command. Remaining arguments are ignored. This option is the + default. + + * ``READ`` - If the command is issued in the solution processor ( :ref:`slashsolu` ), this option + reads view factors from the specified binary file when the next :ref:`solve` command is issued. + ``FileType`` must be set to BINA (binary). For subsequent :ref:`solve` commands, the program + switches back to the default option (OFF). + + If the command is issued in the radiation processor ( :ref:`aux12` ), this option immediately reads + view factors from the specified binary file. ``FileType`` must be set to BINA (binary). The program + switches back to the default option (OFF) after reading the view factors. + + * ``NONE`` - Do not write view factors to a file when the next :ref:`solve` command is issued. + Remaining arguments are ignored. + + filename : str + The description of the argument is missing in the Python function. Please, refer to the `command + documentation + `_ for further + information. + + ext : str + Filename extension for view factor matrix. Default = :file:`vf`. + + dir_ : str + Directory path for view factor matrix. If you do not specify a directory path, it will default + to your working directory. + + filetype : str + View factor file type: + + * ``BINA`` - Binary (default). + + * ``ASCI`` - ASCII. + + fileformat : int or str + Format for the specified ``Filetype`` : + + Binary files ( ``Filetype`` = BINA): + + * ``0`` - No compression. (View factor file size may be very large.) + + * ``1`` - Zeroes are compressed out. (Useful for large models to reduce the view factor file size.) + + ASCII files ( ``Filetype`` = ASCI): + + * ``0`` - 10F7.4 (low precision, lower accuracy). + + * ``1`` - 7F11.8 (high precision, higher accuracy). + + wrio : str + Write only the view factors of independent facets for symmetric models. This option is valid when + view factor condensation is enabled ( :ref:`vfco`,,,1 or :ref:`vfco`,,,2) and further increases + efficiency by reducing read/write time; for more information, see :ref:`VFOPT_VFCondensation` below. + + * ``ON`` - Writes only the independent view factors when view factor condensation has been enabled, + providing additional efficiency gains. After view factors are computed and written to a file, + ``WRIO`` is automatically reset to OFF. + + * ``OFF`` - Turns off option to write only the independent view factors (default). + + addional_command_arg : str + Additional arguments can be passed to the initial command. Please, refer to the `command + documentation + `_ for further + information. + + Notes + ----- + + .. _VFOPT_notes: + + The :ref:`vfopt` command allows you to deactivate the view factor computation ( ``Opt`` = OFF) if + the view factors already exist in the database. The default behavior is OFF upon encountering the + second and subsequent :ref:`solve` commands in the solution processor. + + When ``Opt`` = READ, only a previously calculated view factor binary file is valid. View factors are + read only and are not written after they are read in. Do not issue :ref:`vfopt`,OFF or + :ref:`vfopt`,NONE until after the next :ref:`solve` command is executed. + + If you want to read in view factors after restarting a radiation analysis, issue :ref:`vfopt`,READ + after :ref:`antype`,,REST. + + For 3D analyses, two options are available for calculating view factors when running a distributed- + memory parallel solution : + + * Issue a :ref:`solve` command -- View factors are calculated in parallel mode if no view factors + were previously calculated. + + * Issue a :ref:`vfopt`,NEW command -- View factors are calculated in serial mode. + + For 2D analyses, view factors are calculated in serial mode. + + .. _VFOPT_VFCondensation: + + Considerations for Symmetric Models Using View Factor Condensation + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + For symmetric models using view factor condensation ( :ref:`vfco`,,,1 or :ref:`vfco`,,,2), + read/write time can be reduced by writing only the independent view factors since they are the only + non-zero values in the view factor matrix as described in. + + When view factor condensation is turned off ( :ref:`vfco`,,,0), the full matrix is written to the + view factor file when :ref:`vfopt`,NEW is issued: + + :math:`equation not available` where the view factor matrix is decomposed, and the subscripts, + :math:`equation not available` and :math:`equation not available`, denote independent and + dependent. (See for details.) + + When view factor condensation is turned on ( :ref:`vfco`,,,1 or :ref:`vfco`,,,2), use ``WRIO`` to + control what is written to the view factor file: + + * When :ref:`vfopt`,NEW,,,,,,OFF is issued, the lumped matrix and zeros are written: :math:`equation + not available` (For the definition of **F** :sup:`L`, see.) + + * When :ref:`vfopt`,NEW,,,,,,ON is issued, only the lumped matrix is written: :math:`equation not + available`. + + **Example Usage** + + .. _VFOPT_example: + + 2D Radiation Analysis Using the Radiosity Method with Decimation and Symmetry + + `3D Open Enclosure with Symmetry: Radiation Analysis with Condensed View Factor Calculation + `_ + """ + command = f"VFOPT,{opt},{filename},{ext},{dir_},{filetype},{fileformat},{wrio},{addional_command_arg}" return self.run(command, **kwargs) diff --git a/src/ansys/mapdl/core/_commands/solution/rezoning.py b/src/ansys/mapdl/core/_commands/solution/rezoning.py index d47d47db9a2..a8e0637fc4c 100644 --- a/src/ansys/mapdl/core/_commands/solution/rezoning.py +++ b/src/ansys/mapdl/core/_commands/solution/rezoning.py @@ -22,294 +22,287 @@ class Rezoning: - def rezone(self, option="", ldstep="", sbstep="", **kwargs): - """Initiates the rezoning process, sets rezoning options, and rebuilds the - APDL Command: REZONE - database. + def aremesh(self, lcomb: int | str = "", angle: str = "", **kwargs): + r"""Generates an area in which to create a new mesh for rezoning. + + Mechanical APDL Command: `AREMESH `_ Parameters ---------- - option - The rezoning method to employ: + lcomb : int or str + Specifies how to combine adjacent line segments: - MANUAL - Manual rezoning. You decide when to use rezoning, what region(s) to rezone, and - what remeshing method to use on the selected region(s). - This method is currently the default and only option. + * ``0`` - Line segments combined by connecting ends to ends. This value is the default. - ldstep - The load step number at which rezoning should occur. The default - value is the highest load step number found in the Jobname.Rnnn - files (for the current jobname and in the current directory). + * ``-1`` - No line segments combined. - sbstep - The substep number of the specified load step (LDSTEP) at which - rezoning should occur. The default value is the highest substep - number found in the specified load step in the Jobname.Rnnn files - (for the current jobname and in the current directory). + angle : str + The maximum angle (in degrees) allowed for connecting two line segments together. The default + value is 30. This value is valid only when ``LCOMB`` = 0. Notes ----- - The REZONE command rebuilds the database (.db file) based on the - specified load step and substep information, and updates nodes to their - deformed position for remeshing. - - Before issuing this command, clear the database via the /CLEAR command. + Issue the :ref:`aremesh` command after issuing a :ref:`remesh`,START command and before issuing a + :ref:`remesh`,FINISH command. - For more information, see Rezoning in the Advanced Analysis Guide. - - Distributed ANSYS Restriction: This command is not supported in - Distributed ANSYS. + The :ref:`aremesh` command cannot account for an open area (or "hole") inside a completely enclosed + region. Instead, try meshing around an open area by selecting two adjoining regions; for more + information, see. """ - command = f"REZONE,{option},{ldstep},{sbstep}" + command = f"AREMESH,{lcomb},{angle}" return self.run(command, **kwargs) - def mapsolve(self, maxsbstep="", **kwargs): - """Maps solved node and element solutions from an original mesh to a new + def mapsolve(self, maxsbstep: str = "", **kwargs): + r"""Maps solved node and element solutions from an original mesh to a new mesh. - APDL Command: MAPSOLVE - mesh. + Mechanical APDL Command: `MAPSOLVE `_ Parameters ---------- - maxsbstep - The maximum number of substeps for rebalancing the residuals. The - default value is 5. + maxsbstep : str + The maximum number of substeps for rebalancing the residuals. The default value is 5. Notes ----- - Used during the rezoning process, the MAPSOLVE command maps solved node - and element solutions from the original mesh to the new mesh and - achieves equilibrium based on the new mesh. + Used during the `rezoning + `_ process, the + :ref:`mapsolve` command maps solved node and element solutions from the original mesh to the new + mesh and achieves equilibrium based on the new mesh. Additional substeps are necessary to reduce the residuals to zero. - During the rebalancing stage, the external loads and time remain - unchanged. - - The MAPSOLVE command is valid only for rezoning (REZONE). + During the rebalancing stage, the external loads and time remain unchanged. - Distributed ANSYS Restriction: This command is not supported in - Distributed ANSYS. + The :ref:`mapsolve` command is valid only for rezoning ( :ref:`rezone` ). Distributed-Memory + Parallel (DMP) Restriction This command is not supported in a DMP solution. """ command = f"MAPSOLVE,{maxsbstep}" return self.run(command, **kwargs) def mapvar( self, - option="", - matid="", - istrtstress="", - ntenstress="", - istrtstrain="", - ntenstrain="", - istrtvect="", - nvect="", + option: str = "", + matid: str = "", + istrtstress: str = "", + ntenstress: str = "", + istrtstrain: str = "", + ntenstrain: str = "", + istrtvect: str = "", + nvect: str = "", **kwargs, ): - """Defines tensors and vectors in user-defined state variables for + r"""Defines tensors and vectors in user-defined state variables for rezoning and in 2D to 3D analyses. - APDL Command: MAPVAR - rezoning and in 2-D to 3-D analyses. + Mechanical APDL Command: `MAPVAR `_ Parameters ---------- - option - DEFINE + option : str + * ``DEFINE`` - Define variables for the specified ``MatId`` material ID (default). - DEFINE - Define variables for the specified MatId material ID (default). + * ``LIST`` - List the defined variables for the specified ``MatId`` material ID. - LIST - List the defined variables for the specified MatId material ID. + matid : str + The material ID for the state variables which you are defining ( ``Option`` = DEFINE) or listing + ( ``Option`` = LIST). - matid - The material ID for the state variables which you are defining - (Option = DEFINE) or listing (Option = LIST). + When ``Option`` = LIST, the default value for this argument is ALL (which lists all defined + variables). When ``Option`` = DEFINE, you must explicitly specify a material ID. - istrtstress - The start position of stress-like tensors in the state variables. - This value must be either a positive integer or 0 (meaning no - stress-like tensors). + istrtstress : str + The start position of stress-like tensors in the state variables. This value must be either a + positive integer or 0 (meaning no stress-like tensors). - ntenstress - The number of stress-like tensors in the state variables. This - value must be either a positive integer (or 0), and all stress-like - tensors must be contiguous. + ntenstress : str + The number of stress-like tensors in the state variables. This value must be either a positive + integer (or 0), and all stress-like tensors must be contiguous. - istrtstrain - The start position of strain-like tensors in the state variables. - This value must be either a positive integer or 0 (meaning no - strain-like tensors). + istrtstrain : str + The start position of strain-like tensors in the state variables. This value must be either a + positive integer or 0 (meaning no strain-like tensors). - ntenstrain - The number of strain-like tensors in the state variables. This - value must be either a positive integer (or 0), and all strain-like - tensors must be contiguous. + ntenstrain : str + The number of strain-like tensors in the state variables. This value must be either a positive + integer (or 0), and all strain-like tensors must be contiguous. - istrtvect - The start position of vectors in the state variables. This value - must be either a positive integer or 0 (meaning no vectors). + istrtvect : str + The start position of vectors in the state variables. This value must be either a positive + integer or 0 (meaning no vectors). - nvect - The number of vectors in the state variables. This value must be - either a positive integer (or 0), and all vectors must be - contiguous. + nvect : str + The number of vectors in the state variables. This value must be either a positive integer (or + 0), and all vectors must be contiguous. Notes ----- - The MAPVAR command identifies the tensors and vectors in user-defined - state variables (TB,STATE) for user-defined materials (TB,USER and - UserMat or UserMatTh) or user-defined creep laws (TB,CREEP,,,,100 and - UserCreep). - - The command ensures that user-defined state variables are mapped - correctly during rezoning and in 2-D to 3-D analyses. - In a rezoning operation, MAPVAR must be issued after remeshing - (REMESH,FINISH) but before mapping (MAPSOLVE). + .. _MAPVAR_notes: + + The :ref:`mapvar` command identifies the tensors and vectors in user-defined state variables ( + :ref:`tb`,STATE) for user-defined materials ( :ref:`tb`,USER and `UserMat + `_ or `UserMatTh + `_ ) or user- + defined creep laws ( :ref:`tb`,CREEP,,,,100 and UserCreep ). + + To handle large-rotation effects and to correctly differentiate between tensor- and vector-mapping, + specify the start position of specific state variables. For stress-like tensors, the shear + components saved as state variables are the tensor component. For strain-like tensors, the shear + components saved as state variables are twice the tensor components. Therefore, issue the + :ref:`mapvar` command to define the stress-like and strain-like tensors individually. The command + ensures that user-defined state variables are mapped correctly during `rezoning + `_ and in `2D + to 3D analyses + `_. + + In a rezoning operation, :ref:`mapvar` must be issued after remeshing ( :ref:`remesh`,FINISH) but + before mapping ( :ref:`mapsolve` ). """ - command = f"MAPVAR,{option},{matid},{istrtstress},{ntenstress},{istrtstrain},{ntenstrain},{istrtvect},{nvect}" + command = f"MAPVAR,{option},{matid},{istrtstress},{ntenstress},{istrtstrain},{ntenstrain},,{istrtvect},{nvect}" return self.run(command, **kwargs) - def remesh(self, action="", filename="", ext="", opt1="", opt2="", **kwargs): - """Specifies the starting and ending remeshing points, and other options, + def remesh( + self, + action: str = "", + filename: str = "", + ext: str = "", + opt1: str = "", + opt2: str = "", + **kwargs, + ): + r"""Specifies the starting and ending remeshing points, and other options, for rezoning. - APDL Command: REMESH - for rezoning. + Mechanical APDL Command: `REMESH `_ Parameters ---------- - action - START - - START - Starts the remeshing operation. + action : str + * ``START`` - Starts the remeshing operation. - FINISH - Ends the remeshing operation. + * ``FINISH`` - Ends the remeshing operation. - READ - Reads in a generic (.cdb format) new mesh file generated by a third-party - application. This remeshing option applies to both 2-D and - 3-D rezoning. + * ``READ`` - Reads in a generic ( :file:`.cdb` format) new mesh file generated by a third-party + application. This remeshing option applies to both 2D and 3D rezoning. - SPLIT - Splits selected elements of an existing 2-D or 3-D mesh such that a - quadrilateral element is split into four quadrilaterals, a - degenerate quadrilateral is split into three - quadrilaterals, and a quadratic triangular element is split - into four quadratic triangles. A tetrahedral element is - split into eight tetrahedra. + * ``SPLIT`` - Splits selected elements of an existing 2D or 3D mesh such that a quadrilateral + element is split into four quadrilaterals, a degenerate quadrilateral is split into three + quadrilaterals, and a quadratic triangular element is split into four quadratic triangles. A + tetrahedral element is split into eight tetrahedra. - filename - Name of a .cdb generic mesh file. The default value is jobname. - Valid only when Action = READ. + filename : str + Name of a :file:`.cdb` generic mesh file. The default value is :file:`jobname`. Valid only when + ``Action`` = READ. - ext - File name extension. The only valid (and the default) extension is - CDB. Valid only when Action = READ. + ext : str + File name extension. The only valid (and the default) extension is CDB. Valid only when + ``Action`` = READ. - opt1 - Specifies options for the new mesh when using a generic imported - mesh file or the mesh-splitting remeshing method. Valid only when - Action = READ or Action = SPLIT. + opt1 : str + Specifies options for the new mesh when using a generic imported mesh file or the mesh-splitting + remeshing method. Valid only when ``Action`` = READ or ``Action`` = SPLIT. - REGE - Regenerates all node and element numbers on the new - mesh using an offset of the highest existing node - and element numbers. This is the default behavior - when Action = READ; otherwise, this value is - ignored. + * ``REGE`` - Regenerates all node and element numbers on the new mesh using an offset of the highest + existing node and element numbers. This is the default behavior when ``Action`` = READ; otherwise, + this value is ignored. - KEEP - Keeps the similarly numbered nodes and elements in - the new and the old meshes unchanged. Valid only - when Action = READ. + * ``KEEP`` - Keeps the similarly numbered nodes and elements in the new and the old meshes + unchanged. Valid only when ``Action`` = READ. - TRAN - Generates transition elements to ensure nodal - compatibility between split and unsplit parts of - the mesh. Valid only when Action = SPLIT for 2-D - analyses. + * ``TRAN`` - Generates transition elements to ensure nodal compatibility between split and unsplit + parts of the mesh. Valid only when ``Action`` = SPLIT for 2D analyses. - opt2 - Specifies transition options for the mesh when elements are split. - These options are valid only when Action = SPLIT for 2-D analyses. + opt2 : str + Specifies transition options for the mesh when elements are split. These options are valid only when + ``Action`` = SPLIT for 2D analyses. - QUAD - Minimizes the number of degenerate elements in the transition mesh and tries to - maximize the number of quadrilateral transition elements - across several layers of elements from the split regions. - This is the default behavior. + * ``QUAD`` - Minimizes the number of degenerate elements in the transition mesh and tries to + maximize the number of quadrilateral transition elements across several layers of elements from the + split regions. This is the default behavior. - DEGE - Creates transition zones between the split and unsplit parts of the mesh using - mostly degenerate elements with a single element layer. + * ``DEGE`` - Creates transition zones between the split and unsplit parts of the mesh using mostly + degenerate elements with a single element layer. Notes ----- - The REMESH command is valid only during the rezoning (REZONE) process. - - In rezoning, a REMESH,START command temporarily exits the /SOLU - solution processor and enters a special mode of the /PREP7 - preprocessor, after which a limited number of preprocessing commands - are available for mesh control, but no solution commands are valid. - - A REMESH,FINISH command exits the remeshing process and reenters the - solution processor, at which point no preprocessing commands are - available. If the new mesh exists, the command creates contact elements - if needed, and transfers all boundary conditions (BCs) and loads from - the original mesh to the new mesh. You can issue any list or plot - command to verify the created contact elements, transferred BCs, and - loads. A REMESH,FINISH command is valid only after a previously issued - REMESH,START command, and is the only way to safely end the remeshing - operation (and exit the special mode of the /PREP7 preprocessor). - - A REMESH,READ command is valid only when you want to perform a rezoning - operation using a generic new mesh generated by a third-party - application (rather than a new mesh generated internally by the ANSYS - program). The command is valid between REMESH,START and REMESH,FINISH - commands. In this case, the only valid file extension is .cdb (Ext = - CDB). When Option = KEEP, ANSYS assumes that the common node and - element numbers between the old and the new mesh are topologically - similar (that is, these commonly numbered areas have the same element - connectivity and nodal coordinates). - - A REMESH,SPLIT command is valid only when you wish to perform a - rezoning operation by splitting the existing mesh. The command is valid - between REMESH,START and REMESH,FINISH commands. - - You can use REMESH,READ and REMESH,SPLIT commands for horizontal - multiple rezoning provided that the meshes used in REMESH,READ do not - intersect. (ANSYS recommends against issuing an AREMESH command after + This command is valid only during the rezoning ( :ref:`rezone` ) process. + + In rezoning, :ref:`remesh`,START exits the solution processor temporarily and enters a special mode + of the PREP7 preprocessor, after which a limited number of preprocessing commands are available for + `mesh control + `_, + but no solution commands are valid. + + :ref:`remesh`,FINISH exits the remeshing process and reenters the solution processor, at which + point no preprocessing commands are available. If the new mesh exists, the command creates contact + elements if needed, and transfers all boundary conditions (BCs) and loads from the original mesh to + the new mesh. You can issue any list or plot command to verify the created contact elements, + transferred BCs, and loads. :ref:`remesh`,FINISH is valid only after a previously issued + :ref:`remesh`,START, and is the only way to safely end the remeshing operation (and exit the special + mode of PREP7). + + :ref:`remesh`,READ is valid only when you want to perform a rezoning operation using a generic new + mesh generated by a third-party application (rather than a new mesh generated internally by + Mechanical APDL). The command is valid between :ref:`remesh`,START and :ref:`remesh`,FINISH. In this + case, + the only valid file extension is :file:`.cdb` ( ``Ext`` = CDB). When ``Option`` = KEEP, Mechanical + APDL + assumes that the common node and element numbers between the old and the new mesh are topologically + similar (that is, these commonly numbered areas have the same element connectivity and nodal + coordinates). + + :ref:`remesh`,SPLIT is valid only when performing a rezoning operation via splitting the existing + mesh. The command is valid between :ref:`remesh`,START and :ref:`remesh`,FINISH. + + You can use :ref:`remesh`,READ and :ref:`remesh`,SPLIT for horizontal multiple rezoning provided + that the meshes used in :ref:`remesh`,READ do not intersect. (Avoid issuing :ref:`aremesh` after issuing either of these commands.) - For more detailed about the remeshing options available to you during a - rezoning operation, see Rezoning in the Advanced Analysis Guide. - - Distributed ANSYS Restriction: This command is not supported in - Distributed ANSYS. + For more information about the remeshing options available during rezoning, see `Rezoning + `_ + Distributed-Memory Parallel (DMP) Restriction This command is not supported in a DMP solution. """ - return self.run(f"REMESH,{action},{filename},{ext},,{opt1},{opt2}", **kwargs) + command = f"REMESH,{action},{filename},{ext},,{opt1},{opt2}" + return self.run(command, **kwargs) - def aremesh(self, lcomb="", angle="", **kwargs): - """Generates an area in which to create a new mesh for rezoning. + def rezone(self, option: str = "", ldstep: str = "", sbstep: str = "", **kwargs): + r"""Initiates the rezoning process, sets rezoning options, and rebuilds the database. - APDL Command: AREMESH + Mechanical APDL Command: `REZONE `_ Parameters ---------- - lcomb - Specifies how to combine adjacent line segments: + option : str + The `rezoning + `_ method to + employ: - 0 - Line segments combined by connecting ends to ends. This value is the default. + * ``MANUAL`` - Manual rezoning. You decide when to use rezoning, what region(s) to rezone, and what + remeshing method to use on the selected region(s). This method is currently the default and + only option. - -1 - No line segments combined. + ldstep : str + The load step number at which rezoning should occur. The default value is the highest load step + number found in the :file:`Jobname.Rnnn` files (for the current jobname and in the current + directory). - angle - The maximum angle (in degrees) allowed for connecting two line - segments together. The default value is 30. This value is valid - only when LCOMB = 0. + sbstep : str + The substep number of the specified load step ( ``LDSTEP`` ) at which rezoning should occur. The + default value is the highest substep number found in the specified load step in the + :file:`Jobname.Rnnn` files (for the current jobname and in the current directory). Notes ----- - Issue the AREMESH command after issuing a REMESH,START command and - before issuing a REMESH,FINISH command. - The AREMESH command cannot account for an open area (or "hole") inside - a completely enclosed region. Instead, try meshing around an open area - by selecting two adjoining regions; for more information, see Hints for - Remeshing Multiple Regions . + .. _REZONE_notes: + + The :ref:`rezone` command rebuilds the database ( :file:`.db` file) based on the specified load step + and substep information, and updates nodes to their deformed position for remeshing. + + Before issuing this command, clear the database via the :ref:`clear` command. + + For more information, see `Rezoning + `_ + Distributed-Memory Parallel (DMP) Restriction This command is not supported in a DMP solution. """ - command = f"AREMESH,{lcomb},{angle}" + command = f"REZONE,{option},{ldstep},{sbstep}" return self.run(command, **kwargs) diff --git a/src/ansys/mapdl/core/_commands/solution/solid_body_loads.py b/src/ansys/mapdl/core/_commands/solution/solid_body_loads.py index 53e690e6ddb..3dc18fd41b2 100644 --- a/src/ansys/mapdl/core/_commands/solution/solid_body_loads.py +++ b/src/ansys/mapdl/core/_commands/solution/solid_body_loads.py @@ -22,340 +22,438 @@ class SolidBodyLoads: - def bfa(self, area="", lab="", val1="", val2="", val3="", val4="", **kwargs): - """Defines a body force load on an area. - APDL Command: BFA + def bfa( + self, + area: str = "", + lab: str = "", + val1: str = "", + val2: str = "", + val3: str = "", + val4: str = "", + **kwargs, + ): + r"""Defines a body-force load on an area. + + Mechanical APDL Command: `BFA `_ Parameters ---------- - area - Area to which body load applies. If ALL, apply to all selected - areas [ASEL]. A component name may also be substituted for Area. - - lab - Valid body load label. Load labels are listed under "Body Loads" in - the input table for each element type in the Element Reference. - - val1, val2, val3 - Value associated with the Lab item or a table name for specifying - tabular boundary conditions. Use only VAL1 for TEMP, FLUE, HGEN, - CHRGD. For Lab = JS in magnetics, use VAL1, VAL2, and VAL3 for the - X, Y, and Z components. For acoustics, if Lab = JS, use VAL1 for - mass source in a harmonic analysis or mass source rate in a - transient analysis, and ignore VAL2 and VAL3. For Lab = VLTG, VAL1 - is the voltage drop and VAL2 is the phase angle. If Lab = IMPD, - VAL1 is the resistance and VAL2 is the reactance in ohms/square. - When specifying a table name, you must enclose the table name in - percent signs (%), e.g., BFA,Area,Lab,%tabname%. Use the ``*DIM`` - command to define a table. - - val4 - If Lab = JS, VAL4 is the phase angle in degrees. + area : str + Area to which body load applies. If ALL, apply to all selected areas ( :ref:`asel` ). A + component name may also be substituted for ``Area``. + + lab : str + Valid body load label. Load labels are listed under "Body Loads" in the input table for each + element type in the `Element Reference + `_. + + This command contains some tables and extra information which can be inspected in the original + documentation pointed above. + + val1 : str + Value associated with the ``Lab`` item or a table name for specifying tabular boundary + conditions. Use only ``VAL1`` for TEMP, FLUE, HGEN, CHRGD. For ``Lab`` = JS in magnetics, use + ``VAL1``, ``VAL2``, and ``VAL3`` for the X, Y, and Z components. For ``Lab`` = IMPD in + acoustics, ``VAL1`` is the resistance and ``VAL2`` is the reactance in ohms/square. When + specifying a table name, you must enclose the table name in percent signs (%), e.g., :ref:`bfa`, + ``Area``, ``Lab``,``tabname``. Use the :ref:`dim` command to define a table. + + val2 : str + Value associated with the ``Lab`` item or a table name for specifying tabular boundary + conditions. Use only ``VAL1`` for TEMP, FLUE, HGEN, CHRGD. For ``Lab`` = JS in magnetics, use + ``VAL1``, ``VAL2``, and ``VAL3`` for the X, Y, and Z components. For ``Lab`` = IMPD in + acoustics, ``VAL1`` is the resistance and ``VAL2`` is the reactance in ohms/square. When + specifying a table name, you must enclose the table name in percent signs (%), e.g., :ref:`bfa`, + ``Area``, ``Lab``,``tabname``. Use the :ref:`dim` command to define a table. + + val3 : str + Value associated with the ``Lab`` item or a table name for specifying tabular boundary + conditions. Use only ``VAL1`` for TEMP, FLUE, HGEN, CHRGD. For ``Lab`` = JS in magnetics, use + ``VAL1``, ``VAL2``, and ``VAL3`` for the X, Y, and Z components. For ``Lab`` = IMPD in + acoustics, ``VAL1`` is the resistance and ``VAL2`` is the reactance in ohms/square. When + specifying a table name, you must enclose the table name in percent signs (%), e.g., :ref:`bfa`, + ``Area``, ``Lab``,``tabname``. Use the :ref:`dim` command to define a table. + + val4 : str + If ``Lab`` = JS, ``VAL4`` is the phase angle in degrees. Notes ----- - Defines a body force load (such as temperature in a structural - analysis, heat generation rate in a thermal analysis, etc.) on an area. - Body loads may be transferred from areas to area elements (or to nodes - if area elements do not exist) with the BFTRAN or SBCTRAN commands. - Body loads default to the value specified on the BFUNIF command, if it - was previously specified. - You can specify a table name only when using temperature (TEMP) and - heat generation rate (HGEN) body load labels. + .. _BFA_notes: + + Defines a body-force load (such as temperature in a structural analysis, heat generation rate in a + thermal analysis, etc.) on an area. Body loads may be transferred from areas to area elements (or to + nodes if area elements do not exist) with the :ref:`bftran` or :ref:`sbctran` commands. Body loads + default to the value specified on the :ref:`bfunif` command, if it was previously specified. + + You can specify a table name only when using temperature (TEMP) and heat generation rate (HGEN) body + load labels. - Body loads specified by the BFA command can conflict with other - specified body loads. See Resolution of Conflicting Body Load - Specifications in the Basic Analysis Guide for details. + Body loads specified by the :ref:`bfa` command can conflict with other specified body loads. See + Resolution of Conflicting Body Load Specifications in the `Basic Analysis Guide + `_ for details. - Graphical picking is available only via the listed menu paths. + In a mode-superposition harmonic or transient analysis, you must apply the load in the modal portion + of the analysis. Mechanical APDL calculates a load vector and writes it to the :file:`MODE` file, + which you + can apply via the :ref:`lvscale` command. This command is also valid in PREP7. """ command = f"BFA,{area},{lab},{val1},{val2},{val3},{val4}" return self.run(command, **kwargs) - def bfadele(self, area="", lab="", **kwargs): - """Deletes body force loads on an area. + def bfadele(self, area: str = "", lab: str = "", **kwargs): + r"""Deletes body-force loads on an area. - APDL Command: BFADELE + Mechanical APDL Command: `BFADELE `_ Parameters ---------- - area - Area at which body load is to be deleted. If ALL, delete for all - selected areas [ASEL]. A component name may also be substituted for - AREA. + area : str + Area at which body load is to be deleted. If ALL, delete for all selected areas ( :ref:`asel` ). + A component name may also be substituted for ``AREA``. - lab - Valid body load label. If ALL, use all appropriate labels. Load - labels are listed under "Body Loads" in the input table for each - element type in the Element Reference. See the BFA command for - labels. + lab : str + Valid body load label. If ALL, use all appropriate labels. Load labels are listed under "Body + Loads" in the input table for each element type in the `Element Reference + `_. See the + :ref:`bfa` command for labels. Notes ----- - Deletes body force loads (and all corresponding finite element loads) - for a specified area and label. Body loads may be defined on an area - with the BFA command. - Graphical picking is available only via the listed menu paths. + .. _BFADELE_notes: + + Deletes body-force loads (and all corresponding finite element loads) for a specified area and + label. Body loads may be defined on an area with the :ref:`bfa` command. This command is also valid in PREP7. """ command = f"BFADELE,{area},{lab}" return self.run(command, **kwargs) - def bfalist(self, area="", lab="", **kwargs): - """Lists the body force loads on an area. + def bfalist(self, area: str = "", lab: str = "", **kwargs): + r"""Lists the body-force loads on an area. - APDL Command: BFALIST + Mechanical APDL Command: `BFALIST `_ Parameters ---------- - area - Area at which body load is to be listed. If ALL (or blank), list - for all selected areas [ASEL]. If AREA = P, graphical picking is - enabled and all remaining command fields are ignored (valid only in - the GUI). A component name may also be substituted for AREA. - - lab - Valid body load label. If ALL, use all appropriate labels. Load - labels are listed under "Body Loads" in the input table for each - element type in the Element Reference. See the BFA command for - labels. + area : str + Area at which body load is to be listed. If ALL (or blank), list for all selected areas ( + :ref:`asel` ). If ``AREA`` = P, graphical picking is enabled and all remaining command fields + are ignored (valid only in the GUI). A component name may also be substituted for ``AREA``. + + lab : str + Valid body load label. If ALL, use all appropriate labels. Load labels are listed under "Body + Loads" in the input table for each element type in the `Element Reference + `_. See the + :ref:`bfa` command for labels. Notes ----- - Lists the body force loads for the specified area and label. Body - loads may be defined on an area with the BFA command. + + .. _BFALIST_notes: + + Lists the body-force loads for the specified area and label. Body loads may be defined on an area + with the :ref:`bfa` command. This command is valid in any processor. """ command = f"BFALIST,{area},{lab}" return self.run(command, **kwargs) - def bfk(self, kpoi="", lab="", val1="", val2="", val3="", phase="", **kwargs): - """Defines a body force load at a keypoint. + def bfk( + self, + kpoi: str = "", + lab: str = "", + val1: str = "", + val2: str = "", + val3: str = "", + phase: str = "", + **kwargs, + ): + r"""Defines a body-force load at a keypoint. - APDL Command: BFK + Mechanical APDL Command: `BFK `_ Parameters ---------- - kpoi - Keypoint to which body load applies. If ALL, apply to all selected - keypoints [KSEL]. A component name may also be substituted for - Kpoi. - - lab - Valid body load label. Load labels are listed under "Body Loads" in - the input table for each element type in the Element Reference. - - val1, val2, val3 - Value associated with the Lab item or a table name for specifying - tabular boundary conditions. Use only VAL1 for TEMP, FLUE, HGEN, - MVDI and CHRGD. For magnetics, use VAL1, VAL2, and VAL3 for the X, - Y, and Z components of JS . For acoustics, if Lab = JS, use VAL1 - for mass source in a harmonic analysis or mass source rate in a - transient analysis, and ignoreVAL2 and VAL3. When specifying a - table name, you must enclose the table name in percent signs (%), - e.g., BFK,Kpoi,Lab,%tabname%. Use the ``*DIM`` command to define a - table. - - phase + kpoi : str + Keypoint to which body load applies. If ALL, apply to all selected keypoints ( :ref:`ksel` ). A + component name may also be substituted for ``Kpoi``. + + lab : str + Valid body load label. Load labels are listed under "Body Loads" in the input table for each + element type in the `Element Reference + `_. + + This command contains some tables and extra information which can be inspected in the original + documentation pointed above. + + All keypoints on a given area (or volume) must have the same :ref:`bfk` table name for the + tables to be transferred to interior nodes. + + val1 : str + Value associated with the ``Lab`` item or a table name for specifying tabular boundary + conditions. Use only ``VAL1`` for TEMP, FLUE, HGEN, MVDI and CHRGD. For magnetics, use ``VAL1``, + ``VAL2``, and ``VAL3`` for the X, Y, and Z components of JS. For acoustics, if ``Lab`` = JS, use + ``VAL1`` for mass source in a harmonic analysis or mass source rate in a transient analysis, and + ignore ``VAL2`` and ``VAL3``. When specifying a table name, you must enclose the table name in + percent signs (%), e.g., :ref:`bfk`, ``Kpoi``, ``Lab``,``tabname``. Use the :ref:`dim` command + to define a table. + + val2 : str + Value associated with the ``Lab`` item or a table name for specifying tabular boundary + conditions. Use only ``VAL1`` for TEMP, FLUE, HGEN, MVDI and CHRGD. For magnetics, use ``VAL1``, + ``VAL2``, and ``VAL3`` for the X, Y, and Z components of JS. For acoustics, if ``Lab`` = JS, use + ``VAL1`` for mass source in a harmonic analysis or mass source rate in a transient analysis, and + ignore ``VAL2`` and ``VAL3``. When specifying a table name, you must enclose the table name in + percent signs (%), e.g., :ref:`bfk`, ``Kpoi``, ``Lab``,``tabname``. Use the :ref:`dim` command + to define a table. + + val3 : str + Value associated with the ``Lab`` item or a table name for specifying tabular boundary + conditions. Use only ``VAL1`` for TEMP, FLUE, HGEN, MVDI and CHRGD. For magnetics, use ``VAL1``, + ``VAL2``, and ``VAL3`` for the X, Y, and Z components of JS. For acoustics, if ``Lab`` = JS, use + ``VAL1`` for mass source in a harmonic analysis or mass source rate in a transient analysis, and + ignore ``VAL2`` and ``VAL3``. When specifying a table name, you must enclose the table name in + percent signs (%), e.g., :ref:`bfk`, ``Kpoi``, ``Lab``,``tabname``. Use the :ref:`dim` command + to define a table. + + phase : str Phase angle in degrees associated with the JS label. Notes ----- - Defines a body force load (such as temperature in a structural - analysis, heat generation rate in a thermal analysis, etc.) at a - keypoint. Body loads may be transferred from keypoints to nodes with - the BFTRAN or SBCTRAN commands. Interpolation will be used to apply - loads to the nodes on the lines between keypoints. All keypoints on a - given area (or volume) must have the same BFK specification, with the - same values, for the loads to be transferred to interior nodes in the - area (or volume). If only one keypoint on a line has a BFK - specification, the other keypoint defaults to the value specified on - the BFUNIF command. - - You can specify a table name only when using temperature (TEMP) and - heat generation rate (HGEN) body load labels. - - Body loads specified by the BFK command can conflict with other - specified body loads. See Resolution of Conflicting Body Load - Specifications in the Basic Analysis Guide for details. - - Graphical picking is available only via the listed menu paths. + + .. _BFK_notes: + + Defines a body-force load (such as temperature in a structural analysis, heat generation rate in a + thermal analysis, etc.) at a keypoint. Body loads may be transferred from keypoints to nodes with + the :ref:`bftran` or :ref:`sbctran` commands. Interpolation will be used to apply loads to the nodes + on the lines between keypoints. All keypoints on a given area (or volume) must have the same + :ref:`bfk` specification, with the same values, for the loads to be transferred to interior nodes in + the area (or volume). If only one keypoint on a line has a :ref:`bfk` specification, the other + keypoint defaults to the value specified on the :ref:`bfunif` command. + + You can specify a table name only when using temperature (TEMP) and heat generation rate (HGEN) body + load labels. + + Body loads specified by the :ref:`bfk` command can conflict with other specified body loads. See + Resolution of Conflicting Body Load Specifications in the `Basic Analysis Guide + `_ for details. + + In a mode-superposition harmonic or transient analysis, you must apply the load in the modal portion + of the analysis. Mechanical APDL calculates a load vector and writes it to the :file:`MODE` file, + which you + can apply via the :ref:`lvscale` command. This command is also valid in PREP7. """ command = f"BFK,{kpoi},{lab},{val1},{val2},{val3},{phase}" return self.run(command, **kwargs) - def bfkdele(self, kpoi="", lab="", **kwargs): - """Deletes body force loads at a keypoint. + def bfkdele(self, kpoi: str = "", lab: str = "", **kwargs): + r"""Deletes body-force loads at a keypoint. - APDL Command: BFKDELE + Mechanical APDL Command: `BFKDELE `_ Parameters ---------- - kpoi - Keypoint at which body load is to be deleted. If ALL, delete for - all selected keypoints [KSEL]. A component name may also be - substituted for KPOI. + kpoi : str + Keypoint at which body load is to be deleted. If ALL, delete for all selected keypoints ( + :ref:`ksel` ). A component name may also be substituted for ``KPOI``. - lab - Valid body load label. If ALL, use all appropriate labels. Load - labels are listed under "Body Loads" in the input table for each - element type in the Element Reference. See the BFK command for - labels. + lab : str + Valid body load label. If ALL, use all appropriate labels. Load labels are listed under "Body + Loads" in the input table for each element type in the `Element Reference + `_. See the + :ref:`bfk` command for labels. Notes ----- - Deletes body force loads (and all corresponding finite element loads) - for a specified keypoint and label. Body loads may be defined at a - keypoint with the BFK command. - Graphical picking is available only via the listed menu paths. + .. _BFKDELE_notes: + + Deletes body-force loads (and all corresponding finite element loads) for a specified keypoint and + label. Body loads may be defined at a keypoint with the :ref:`bfk` command. This command is also valid in PREP7. """ command = f"BFKDELE,{kpoi},{lab}" return self.run(command, **kwargs) - def bfklist(self, kpoi="", lab="", **kwargs): - """Lists the body force loads at keypoints. + def bfklist(self, kpoi: str = "", lab: str = "", **kwargs): + r"""Lists the body-force loads at keypoints. - APDL Command: BFKLIST + Mechanical APDL Command: `BFKLIST `_ Parameters ---------- - kpoi - Keypoint at which body load is to be listed. If ALL (or blank), - list for all selected keypoints [KSEL]. If KPOI = P, graphical - picking is enabled and all remaining command fields are ignored - (valid only in the GUI). A component name may also be substituted - for KPOI - - lab - Valid body load label. If ALL, use all appropriate labels. Load - labels are listed under "Body Loads" in the input table for each - element type in the Element Reference. See the BFK command for - labels. + kpoi : str + Keypoint at which body load is to be listed. If ALL (or blank), list for all selected keypoints + ( :ref:`ksel` ). If ``KPOI`` = P, graphical picking is enabled and all remaining command fields + are ignored (valid only in the GUI). A component name may also be substituted for ``KPOI`` + + lab : str + Valid body load label. If ALL, use all appropriate labels. Load labels are listed under "Body + Loads" in the input table for each element type in the `Element Reference + `_. See the + :ref:`bfk` command for labels. Notes ----- - Lists the body force loads for the specified keypoint and label. - Keypoint body loads may be defined with the BFK command. + + .. _BFKLIST_notes: + + Lists the body-force loads for the specified keypoint and label. Keypoint body loads may be defined + with the :ref:`bfk` command. This command is valid in any processor. """ command = f"BFKLIST,{kpoi},{lab}" return self.run(command, **kwargs) - def bfl(self, line="", lab="", val1="", val2="", val3="", val4="", **kwargs): - """Defines a body force load on a line. + def bfl( + self, + line: str = "", + lab: str = "", + val1: str = "", + val2: str = "", + val3: str = "", + val4: str = "", + **kwargs, + ): + r"""Defines a body-force load on a line. - APDL Command: BFL + Mechanical APDL Command: `BFL `_ Parameters ---------- - line - Line to which body load applies. If ALL, apply to all selected - lines [LSEL]. A component name may also be substituted for Line. - - lab - Valid body load label. Load labels are listed under "Body loads" in - the input table for each element type in the Element Reference. - - val1, val2, val3 - Value associated with the Lab item or a table name for specifying - tabular boundary conditions. Use only VAL1 for TEMP, FLUE, HGEN, - and CHRGD. For acoustics, if Lab = JS, use VAL1 for mass source in - a harmonic analysis or mass source rate in a transient analysis, - and ignoreVAL2 and VAL3. When specifying a table name, you must - enclose the table name in percent signs (%), e.g., - BFL,Line,Lab,%tabname%. Use the ``*DIM`` command to define a table. - - val4 - If Lab = JS, VAL4 is the phase angle in degrees. + line : str + Line to which body load applies. If ALL, apply to all selected lines ( :ref:`lsel` ). A + component name may also be substituted for ``Line``. + + lab : str + Valid body load label. Load labels are listed under "Body loads" in the input table for each + element type in the `Element Reference + `_. + + This command contains some tables and extra information which can be inspected in the original + documentation pointed above. + + val1 : str + Value associated with the ``Lab`` item or a table name for specifying tabular boundary + conditions. Use only ``VAL1`` for TEMP, FLUE, HGEN, and CHRGD. For acoustics, if ``Lab`` = JS, + use ``VAL1`` for mass source in a harmonic analysis or mass source rate in a transient analysis, + and ignore ``VAL2`` and ``VAL3``. When specifying a table name, you must enclose the table name + in percent signs (%), for example, :ref:`bfl`, ``Line``, ``Lab``,``tabname``. Use the :ref:`dim` + command to define a table. + + val2 : str + Value associated with the ``Lab`` item or a table name for specifying tabular boundary + conditions. Use only ``VAL1`` for TEMP, FLUE, HGEN, and CHRGD. For acoustics, if ``Lab`` = JS, + use ``VAL1`` for mass source in a harmonic analysis or mass source rate in a transient analysis, + and ignore ``VAL2`` and ``VAL3``. When specifying a table name, you must enclose the table name + in percent signs (%), for example, :ref:`bfl`, ``Line``, ``Lab``,``tabname``. Use the :ref:`dim` + command to define a table. + + val3 : str + Value associated with the ``Lab`` item or a table name for specifying tabular boundary + conditions. Use only ``VAL1`` for TEMP, FLUE, HGEN, and CHRGD. For acoustics, if ``Lab`` = JS, + use ``VAL1`` for mass source in a harmonic analysis or mass source rate in a transient analysis, + and ignore ``VAL2`` and ``VAL3``. When specifying a table name, you must enclose the table name + in percent signs (%), for example, :ref:`bfl`, ``Line``, ``Lab``,``tabname``. Use the :ref:`dim` + command to define a table. + + val4 : str + If ``Lab`` = JS, ``VAL4`` is the phase angle in degrees. Notes ----- - Defines a body force load (such as temperature in a structural - analysis, heat generation rate in a thermal analysis, etc.) on a line. - Body loads may be transferred from lines to line elements (or to nodes - if line elements do not exist) with the BFTRAN or SBCTRAN commands. - You can specify a table name only when using temperature (TEMP) and - heat generation rate (HGEN) body load labels. + .. _BFL_notes: - Body loads specified by the BFL command can conflict with other - specified body loads. See Resolution of Conflicting Body Load - Specifications in the Basic Analysis Guide for details. + Defines a body-force load (such as temperature in a structural analysis, heat generation rate in a + thermal analysis, etc.) on a line. Body loads may be transferred from lines to line elements (or to + nodes if line elements do not exist) with the :ref:`bftran` or :ref:`sbctran` commands. - Graphical picking is available only via the listed menu paths. + You can specify a table name only when using temperature (TEMP) and heat generation rate (HGEN) body + load labels. + + Body loads specified by the :ref:`bfl` command can conflict with other specified body loads. See + Resolution of Conflicting Body Load Specifications in the `Basic Analysis Guide + `_ for details. + + In a mode-superposition harmonic or transient analysis, you must apply the load in the modal portion + of the analysis. Mechanical APDL calculates a load vector and writes it to the :file:`MODE` file, + which you + can apply via the :ref:`lvscale` command. This command is also valid in PREP7. """ command = f"BFL,{line},{lab},{val1},{val2},{val3},{val4}" return self.run(command, **kwargs) - def bfldele(self, line="", lab="", **kwargs): - """Deletes body force loads on a line. + def bfldele(self, line: str = "", lab: str = "", **kwargs): + r"""Deletes body-force loads on a line. - APDL Command: BFLDELE + Mechanical APDL Command: `BFLDELE `_ Parameters ---------- - line - Line at which body load is to be deleted. If ALL, delete for all - selected lines [LSEL]. A component name may also be substituted - for LINE. + line : str + Line at which body load is to be deleted. If ALL, delete for all selected lines ( :ref:`lsel` ). + A component name may also be substituted for ``LINE``. - lab - Valid body load label. If ALL, use all appropriate labels. Load - labels are listed under "Body Loads" in the input table for each - element type in the Element Reference. See the BFL command for - labels. + lab : str + Valid body load label. If ALL, use all appropriate labels. Load labels are listed under "Body + Loads" in the input table for each element type in the `Element Reference + `_. See the + :ref:`bfl` command for labels. Notes ----- - Deletes body force loads (and all corresponding finite element loads) - for a specified line and label. Body loads may be defined on a line - with the BFL command. - Graphical picking is available only via the listed menu paths. + .. _BFLDELE_notes: + + Deletes body-force loads (and all corresponding finite element loads) for a specified line and + label. Body loads may be defined on a line with the :ref:`bfl` command. This command is also valid in PREP7. """ command = f"BFLDELE,{line},{lab}" return self.run(command, **kwargs) - def bfllist(self, line="", lab="", **kwargs): - """Lists the body force loads on a line. + def bfllist(self, line: str = "", lab: str = "", **kwargs): + r"""Lists the body-force loads on a line. - APDL Command: BFLLIST + Mechanical APDL Command: `BFLLIST `_ Parameters ---------- - line - Line at which body load is to be listed. If ALL (or blank), list - for all selected lines [LSEL]. If LINE = P, graphical picking is - enabled and all remaining command fields are ignored (valid only in - the GUI). A component name may also be substituted for LINE. - - lab - Valid body load label. If ALL, use all appropriate labels. Load - labels are listed under "Body Loads" in the input table for each - element type in the Element Reference. See the BFL command for - labels. + line : str + Line at which body load is to be listed. If ALL (or blank), list for all selected lines ( + :ref:`lsel` ). If ``LINE`` = P, graphical picking is enabled and all remaining command fields + are ignored (valid only in the GUI). A component name may also be substituted for ``LINE``. + + lab : str + Valid body load label. If ALL, use all appropriate labels. Load labels are listed under "Body + Loads" in the input table for each element type in the `Element Reference + `_. See the + :ref:`bfl` command for labels. Notes ----- - Lists the body force loads for the specified line and label. Body - loads may be defined on a line with the BFL command. + + .. _BFLLIST_notes: + + Lists the body-force loads for the specified line and label. Body loads may be defined on a line + with the :ref:`bfl` command. This command is valid in any processor. """ @@ -363,137 +461,169 @@ def bfllist(self, line="", lab="", **kwargs): return self.run(command, **kwargs) def bftran(self, **kwargs): - """Transfers solid model body force loads to the finite element model. + r"""Transfers solid model body-force loads to the finite element model. - APDL Command: BFTRAN + Mechanical APDL Command: `BFTRAN `_ Notes ----- - Body loads are transferred from selected keypoints and lines to - selected nodes and from selected areas and volumes to selected - elements. The BFTRAN operation is also done if the SBCTRAN command is - either explicitly issued or automatically issued upon initiation of the - solution calculations [SOLVE]. + + .. _BFTRAN_notes: + + Body loads are transferred from selected keypoints and lines to selected nodes and from selected + areas and volumes to selected elements. The :ref:`bftran` operation is also done if the + :ref:`sbctran` command is either explicitly issued or automatically issued upon initiation of the + solution calculations ( :ref:`solve` ). This command is also valid in PREP7. """ - command = f"BFTRAN," + command = "BFTRAN" return self.run(command, **kwargs) - def bfv(self, volu="", lab="", val1="", val2="", val3="", phase="", **kwargs): - """Defines a body force load on a volume. + def bfv( + self, + volu: str = "", + lab: str = "", + val1: str = "", + val2: str = "", + val3: str = "", + phase: str = "", + **kwargs, + ): + r"""Defines a body-force load on a volume. - APDL Command: BFV + Mechanical APDL Command: `BFV `_ Parameters ---------- - volu - Volume to which body load applies. If ALL, apply to all selected - volumes [VSEL]. A component name may also be substituted for Volu. - - lab - Valid body load label. Load labels are listed under "Body Loads" in - the input table for each element type in the Element Reference. - - val1, val2, val3 - Value associated with the Lab item or a table name for specifying - tabular boundary conditions. Use only VAL1 for TEMP, FLUE, HGEN, - and CHRGD. Use VAL1, VAL2, and VAL3 for the X, Y, and Z components - of JS. For Lab = JS in magnetics, use VAL1, VAL2, and VAL3 for the - X, Y, and Z components. For acoustics, if Lab = JS, use VAL1 for - mass source in a harmonic analysis or mass source rate in a - transient analysis, and ignoreVAL2 and VAL3. For Lab = VLTG, VAL1 - is the voltage drop and VAL2 is the phase angle. When specifying a - table name, you must enclose the table name in percent signs (%), - e.g., BFV,Volu,Lab,%tabname%. Use the ``*DIM`` command to define a - table. - - phase + volu : str + Volume to which body load applies. If ALL, apply to all selected volumes ( :ref:`vsel` ). A + component name may also be substituted for ``Volu``. + + lab : str + Valid body load label. Load labels are listed under "Body Loads" in the input table for each + element type in the `Element Reference + `_. + + This command contains some tables and extra information which can be inspected in the original + documentation pointed above. + + val1 : str + Value associated with the ``Lab`` item or a table name for specifying tabular boundary + conditions. Use only ``VAL1`` for TEMP, FLUE, HGEN, and CHRGD. Use ``VAL1``, ``VAL2``, and + ``VAL3`` for the X, Y, and Z components of JS. For ``Lab`` = JS in magnetics, use ``VAL1``, + ``VAL2``, and ``VAL3`` for the X, Y, and Z components. For acoustics, if ``Lab`` = JS, use + ``VAL1`` for mass source in a harmonic analysis or mass source rate in a transient analysis, and + ignore ``VAL2`` and ``VAL3``. When specifying a table name, you must enclose the table name in + percent signs (%), e.g., :ref:`bfv`, ``Volu``, ``Lab``,``tabname``. Use the :ref:`dim` command + to define a table. + + val2 : str + Value associated with the ``Lab`` item or a table name for specifying tabular boundary + conditions. Use only ``VAL1`` for TEMP, FLUE, HGEN, and CHRGD. Use ``VAL1``, ``VAL2``, and + ``VAL3`` for the X, Y, and Z components of JS. For ``Lab`` = JS in magnetics, use ``VAL1``, + ``VAL2``, and ``VAL3`` for the X, Y, and Z components. For acoustics, if ``Lab`` = JS, use + ``VAL1`` for mass source in a harmonic analysis or mass source rate in a transient analysis, and + ignore ``VAL2`` and ``VAL3``. When specifying a table name, you must enclose the table name in + percent signs (%), e.g., :ref:`bfv`, ``Volu``, ``Lab``,``tabname``. Use the :ref:`dim` command + to define a table. + + val3 : str + Value associated with the ``Lab`` item or a table name for specifying tabular boundary + conditions. Use only ``VAL1`` for TEMP, FLUE, HGEN, and CHRGD. Use ``VAL1``, ``VAL2``, and + ``VAL3`` for the X, Y, and Z components of JS. For ``Lab`` = JS in magnetics, use ``VAL1``, + ``VAL2``, and ``VAL3`` for the X, Y, and Z components. For acoustics, if ``Lab`` = JS, use + ``VAL1`` for mass source in a harmonic analysis or mass source rate in a transient analysis, and + ignore ``VAL2`` and ``VAL3``. When specifying a table name, you must enclose the table name in + percent signs (%), e.g., :ref:`bfv`, ``Volu``, ``Lab``,``tabname``. Use the :ref:`dim` command + to define a table. + + phase : str Phase angle in degrees associated with the JS label. Notes ----- - Defines a body force load (such as temperature in a structural - analysis, heat generation rate in a thermal analysis, etc.) on a - volume. Body loads may be transferred from volumes to volume elements - (or to nodes if volume elements do not exist) with the BFTRAN or - SBCTRAN commands. Body loads default to the value specified on the - BFUNIF command, if it was previously specified. - You can specify a table name only when using temperature (TEMP) and - heat generation rate (HGEN) body load labels. + .. _BFV_notes: - Body loads specified by the BFV command can conflict with other - specified body loads. See Resolution of Conflicting Body Load - Specifications in the Basic Analysis Guide for details. + Defines a body-force load (such as temperature in a structural analysis, heat generation rate in a + thermal analysis, etc.) on a volume. Body loads may be transferred from volumes to volume elements + (or to nodes if volume elements do not exist) with the :ref:`bftran` or :ref:`sbctran` commands. + Body loads default to the value specified on the :ref:`bfunif` command, if it was previously + specified. - Graphical picking is available only via the listed menu paths. + You can specify a table name only when using temperature (TEMP) and heat generation rate (HGEN) body + load labels. - This command is also valid in PREP7. + Body loads specified by the :ref:`bfv` command can conflict with other specified body loads. See + Resolution of Conflicting Body Load Specifications in the `Basic Analysis Guide + `_ for details. - Examples - -------- - Set heat generation 1e4 on all selected volumes. + In a mode-superposition harmonic or transient analysis, you must apply the load in the modal portion + of the analysis. Mechanical APDL calculates a load vector and writes it to the :file:`MODE` file, + which you + can apply via the :ref:`lvscale` command. - >>> mapdl.bfv('ALL', 'HGEN', 1e4) + This command is also valid in PREP7. """ command = f"BFV,{volu},{lab},{val1},{val2},{val3},{phase}" return self.run(command, **kwargs) - def bfvdele(self, volu="", lab="", **kwargs): - """Deletes body force loads on a volume. + def bfvdele(self, volu: str = "", lab: str = "", **kwargs): + r"""Deletes body-force loads on a volume. - APDL Command: BFVDELE + Mechanical APDL Command: `BFVDELE `_ Parameters ---------- - volu - Volume at which body load is to be deleted. If ALL, delete for all - selected volumes [VSEL]. A component name may also be substituted - for VOLU. + volu : str + Volume at which body load is to be deleted. If ALL, delete for all selected volumes ( + :ref:`vsel` ). A component name may also be substituted for ``VOLU``. - lab - Valid body load label. If ALL, use all appropriate labels. Load - labels are listed under "Body Loads" in the input table for each - element type in the Element Reference. See the BFV command for - labels. + lab : str + Valid body load label. If ALL, use all appropriate labels. Load labels are listed under "Body + Loads" in the input table for each element type in the `Element Reference + `_. See the + :ref:`bfv` command for labels. Notes ----- - Deletes body force loads (and all corresponding finite element loads) - for a specified volume and label. Body loads may be defined on a - volume with the BFV command. - Graphical picking is available only via the listed menu paths. + .. _BFVDELE_notes: + + Deletes body-force loads (and all corresponding finite element loads) for a specified volume and + label. Body loads may be defined on a volume with the :ref:`bfv` command. This command is also valid in PREP7. """ command = f"BFVDELE,{volu},{lab}" return self.run(command, **kwargs) - def bfvlist(self, volu="", lab="", **kwargs): - """Lists the body force loads on a volume. + def bfvlist(self, volu: str = "", lab: str = "", **kwargs): + r"""Lists the body-force loads on a volume. - APDL Command: BFVLIST + Mechanical APDL Command: `BFVLIST `_ Parameters ---------- - volu - Volume at which body load is to be listed. If ALL (or blank), list - for all selected volumes [VSEL]. If VOLU = P, graphical picking is - enabled and all remaining command fields are ignored (valid only in - the GUI). A component name may also be substituted for VOLU. - - lab - Valid body load label. If ALL, use all appropriate labels. Load - labels are listed under "Body Loads" in the input table for each - element type in the Element Reference. See the BFV command for - labels. + volu : str + Volume at which body load is to be listed. If ALL (or blank), list for all selected volumes ( + :ref:`vsel` ). If ``VOLU`` = P, graphical picking is enabled and all remaining command fields + are ignored (valid only in the GUI). A component name may also be substituted for ``VOLU``. + + lab : str + Valid body load label. If ALL, use all appropriate labels. Load labels are listed under "Body + Loads" in the input table for each element type in the `Element Reference + `_. See the + :ref:`bfv` command for labels. Notes ----- - Lists the body force loads for the specified volume and label. Body - loads may be defined on a volume with the BFV command. + + .. _BFVLIST_notes: + + Lists the body-force loads for the specified volume and label. Body loads may be defined on a volume + with the :ref:`bfv` command. This command is valid in any processor. """ diff --git a/src/ansys/mapdl/core/_commands/solution/solid_constraints.py b/src/ansys/mapdl/core/_commands/solution/solid_constraints.py index 19300657ce2..e2cacecfde2 100644 --- a/src/ansys/mapdl/core/_commands/solution/solid_constraints.py +++ b/src/ansys/mapdl/core/_commands/solution/solid_constraints.py @@ -22,202 +22,184 @@ class SolidConstraints: - def da(self, area="", lab="", value1="", value2="", **kwargs): - """Defines degree-of-freedom constraints on areas. - APDL Command: DA + def da( + self, + area: str = "", + lab: str = "", + value1: str = "", + value2: str = "", + **kwargs, + ): + r"""Defines degree-of-freedom constraints on areas. + + Mechanical APDL Command: `DA `_ Parameters ---------- - area - Area on which constraints are to be specified. If ALL, apply to - all selected areas [ASEL]. A component name may also be substituted for AREA. - - lab - Symmetry label (see below): - - SYMM - Generate symmetry constraints. Requires no Value1 or Value2. - - ASYM - Generate antisymmetry constraints. Requires no Value1 or Value2. - - ANSYS DOF labels: + area : str + Area on which constraints are to be specified. If ALL, apply to all selected areas ( :ref:`asel` + ). If ``AREA`` = P, graphical picking is enabled and all remaining command fields are ignored + (valid only in the GUI). A component name may also be substituted for ``AREA``. - UX - Displacement in X direction. + lab : str + Symmetry label (see :ref:`da_LabFootnotes_1` below) : - UY - Displacement in Y direction. + * ``SYMM`` - Generate symmetry constraints. Requires no ``Value1`` or ``Value2``. - UZ - Displacement in Z direction. + * ``ASYM`` - Generate antisymmetry constraints. Requires no ``Value1`` or ``Value2``. - ROTX - Rotation about X axis. + Mechanical APDL degree-of-freedom labels: - ROTY - Rotation about Y axis. + * ``UX`` - Displacement in X direction. - ROTZ - Rotation about Z axis. + * ``UY`` - Displacement in Y direction. - HDSP - Hydrostatic pressure. + * ``UZ`` - Displacement in Z direction. - PRES - Pressure. + * ``ROTX`` - Rotation about X axis. - TEMP, TBOT, TE2, TE3, . . ., TTOP - Temperature. + * ``ROTY`` - Rotation about Y axis. - MAG - Magnetic scalar potential (see 2 below). + * ``ROTZ`` - Rotation about Z axis. - VOLT - Electric scalar potential (see 3 below). + * ``HDSP`` - Hydrostatic pressure. - AZ - Magnetic vector potential in Z direction (see 4 below). + * ``PRES`` - Pressure. - CONC - Concentration. + * ``TEMP, TBOT, TE2, TE3, ..., TTOP`` - Temperature. - ALL - Applies all appropriate DOF labels except HDSP. + * ``MAG`` - Magnetic scalar potential (see :ref:`da_LabFootnotes_2` below). - value1 - Value of DOF or table name reference on the area. Valid for all - DOF labels. To specify a table, enclose the table name in % signs - (e.g., DA,AREA,TEMP,%tabname%). Use the ``*DIM`` command to define a - table. + * ``VOLT`` - Electric scalar potential (see :ref:`da_LabFootnotes_3` below). - value2 - For MAG and VOLT DOFs: + * ``AZ`` - Magnetic vector potential in Z direction (see :ref:`da_LabFootnotes_4` below). - Notes - ----- - For elements SOLID236 and SOLID237, if Lab = AZ and Value1 = 0, this - sets the flux-parallel condition for the edge formulation. (A flux- - normal condition is the natural boundary condition.) Do not use the DA - command to set the edge-flux DOF, AZ to a nonzero value. - - If Lab = MAG and Value1 = 0, this sets the flux-normal condition for - the magnetic scalar potential formulations (MSP) (A flux-parallel - condition is the natural boundary condition for MSP.) - - If Lab = VOLT and Value1 = 0, the J-normal condition is set (current - density (J) flow normal to the area). (A J-parallel condition is the - natural boundary condition.) + * ``CONC`` - Concentration. - You can transfer constraints from areas to nodes with the DTRAN or - SBCTRAN commands. See the DK command for information about generating - other constraints on areas. + * ``ALL`` - Applies all appropriate degree-of-freedom labels except HDSP. - Symmetry and antisymmetry constraints are generated as described for - the DSYM command. + This command contains some tables and extra information which can be inspected in the original + documentation pointed above. - Tabular boundary conditions (VALUE = %tabname%) are available only for - the following degree of freedom labels: Electric (VOLT), Structural - (UX, UY, UZ, ROTX, ROTY, ROTZ), Acoustic (PRES, UX, UY, UZ), and - temperature (TEMP, TBOT, TE2, TE3, . . ., TTOP). + value1 : str + Value of degree of freedom or table name reference on the area. Valid for all degree-of-freedom + labels. To specify a table, enclose the table name in % signs (for example, :ref:`da`, + ``AREA``,TEMP,``tabname``). Use the :ref:`dim` command to define a table. - Constraints specified by the DA command can conflict with other - specified constraints. See Resolution of Conflicting Constraint - Specifications in the Basic Analysis Guide for details. + value2 : str + For MAG and VOLT degrees of freedom: - The DA command is also valid in PREP7. + Value of the imaginary component of the degree of freedom. - Examples - -------- - Select all areas with a z-coordinate of 0, then set value for all - degrees of freedom to be 0 on the selected areas. + Notes + ----- - >>> mapdl.asel('S', 'LOC', 'Z', 0) - >>> mapdl.da('ALL', 'ALL') + .. _DA_notes: - Apply symmetric boundary conditions on area 2. + You can transfer constraints from areas to nodes via :ref:`dtran` or :ref:`sbctran`. See :ref:`dk` + for information about generating other constraints on areas. - >>> mapdl.da(2, 'SYMM') + Tabular boundary conditions ( ``VALUE`` = ``tabname``) are available only for the following degree- + of-freedom labels: Electric (VOLT), Structural (UX, UY, UZ, ROTX, ROTY, ROTZ), Acoustic (PRES, UX, + UY, UZ), and temperature (TEMP, TBOT, TE2, TE3,..., TTOP). - Allow x-displacement on area 2. + Constraints specified by the :ref:`da` command can conflict with other specified constraints. See + Resolution of Conflicting Constraint Specifications \ in the `Basic Analysis Guide + `_ for details. - >>> mapdl.da(2, 'UX', 1) + This command is also valid in PREP7. """ command = f"DA,{area},{lab},{value1},{value2}" return self.run(command, **kwargs) - def dadele(self, area="", lab="", **kwargs): - """Deletes degree-of-freedom constraints on an area. + def dadele(self, area: str = "", lab: str = "", **kwargs): + r"""Deletes degree-of-freedom constraints on an area. - APDL Command: DADELE + Mechanical APDL Command: `DADELE `_ Parameters ---------- - area - Area for which constraints are to be deleted. If ALL, delete for - all selected areas [ASEL]. If AREA = P, graphical picking is - enabled and all remaining command fields are ignored (valid only in - the GUI). You can substitute a component name for AREA. + area : str + Area for which constraints are to be deleted. If ALL, delete for all selected areas ( + :ref:`asel` ). If ``AREA`` = P, graphical picking is enabled and all remaining command fields + are ignored (valid only in the GUI). You can substitute a component name for ``AREA``. - lab + lab : str Valid constraint labels are: - ALL - All constraints. - - SYMM - Symmetry constraints. + * ``ALL`` - All constraints. - ASYM - Antisymmetry constraints. + * ``SYMM`` - Symmetry constraints. - UX - Displacement in X direction. + * ``ASYM`` - Antisymmetry constraints. - UY - Displacement in Y direction. + * ``UX`` - Displacement in X direction. - UZ - Displacement in Z direction. + * ``UY`` - Displacement in Y direction. - ROTX - Rotation about X axis. + * ``UZ`` - Displacement in Z direction. - ROTY - Rotation about Y axis. + * ``ROTX`` - Rotation about X axis. - ROTZ - Rotation about Z axis. + * ``ROTY`` - Rotation about Y axis. - PRES - Pressure. + * ``ROTZ`` - Rotation about Z axis. - TEMP, TBOT, TE2, TE3, . . ., TTOP - Temperature. + * ``PRES`` - Pressure. - MAG - Magnetic scalar potential. + * ``TEMP, TBOT, TE2, TE3, ..., TTOP`` - Temperature. - VOLT - Electric scalar potential. + * ``MAG`` - Magnetic scalar potential. - AX - Magnetic vector potential in X direction (see notes). + * ``VOLT`` - Electric scalar potential. - AY - Magnetic vector potential in Y direction. + * ``AZ`` - Magnetic vector potential in Z direction (see notes). - AZ - Magnetic vector potential in Z direction (see notes). - - CONC - Concentration. + * ``CONC`` - Concentration. Notes ----- - Deletes the degree of freedom constraints at an area (and all - corresponding finite element constraints) previously specified with the - DA command. See the DDELE command for delete details. - If the multiple species labels have been changed to user-defined labels - via the MSSPEC command, use the user-defined labels. + .. _DADELE_notes: + + Deletes the degree of freedom constraints at an area (and all corresponding finite element + constraints) previously specified with the :ref:`da` command. See the :ref:`ddele` command for + delete details. + + If the multiple species labels have been changed to user-defined labels via the MSSPEC command, use + the user-defined labels. + + See the :ref:`da` or the :ref:`da` commands for details on element applicability. - See the DA or the DA commands for details on element applicability. + .. warning:: - Warning:: : On previously meshed areas, all constraints on affected - nodes will be deleted, whether or not they were specified by the DA - command. + On previously meshed areas, allconstraints on affected nodes will be deleted, whether or not + they were specified by the DA command. This command is also valid in PREP7. """ command = f"DADELE,{area},{lab}" return self.run(command, **kwargs) - def dalist(self, area="", **kwargs): - """Lists the DOF constraints on an area. + def dalist(self, area: str = "", **kwargs): + r"""Lists the DOF constraints on an area. - APDL Command: DALIST + Mechanical APDL Command: `DALIST `_ Parameters ---------- - area - List constraints for this area. If ALL (default), list for all - selected areas [ASEL]. If P1 = P, graphical picking is enabled and - all remaining command fields are ignored (valid only in the GUI). - A component name may also be substituted for AREA. + area : str + List constraints for this area. If ALL (default), list for all selected areas ( :ref:`asel` ). + If ``P1`` = P, graphical picking is enabled and all remaining command fields are ignored (valid + only in the GUI). A component name may also be substituted for ``AREA``. Notes ----- - Lists the degree of freedom constraints on an area previously specified - with the DA command. + + .. _DALIST_notes: + + Lists the degree of freedom constraints on an area previously specified with the :ref:`da` command. This command is valid in any processor. """ @@ -226,289 +208,327 @@ def dalist(self, area="", **kwargs): def dk( self, - kpoi="", - lab="", - value="", - value2="", - kexpnd="", - lab2="", - lab3="", - lab4="", - lab5="", - lab6="", + kpoi: str = "", + lab: str = "", + value: str = "", + value2: str = "", + kexpnd: int | str = "", + lab2: str = "", + lab3: str = "", + lab4: str = "", + lab5: str = "", + lab6: str = "", **kwargs, ): - """Defines DOF constraints at keypoints. + r"""Defines DOF constraints at keypoints. - APDL Command: DK + Mechanical APDL Command: `DK `_ Parameters ---------- - kpoi - Keypoint at which constraint is to be specified. If ALL, apply to - all selected keypoints [KSEL]. If KPOI = P, graphical picking is - enabled and all remaining command fields are ignored (valid only in - the GUI). A component name may also be substituted for KPOI. - - lab - Valid degree of freedom label. If ALL, use all appropriate labels - except HDSP. Structural labels: UX, UY, or UZ (displacements); - ROTX, ROTY, or ROTZ (rotations); WARP (warping); HDSP (hydrostatic - pressure). Thermal labels: TEMP, TBOT, TE2, TE3, . . ., TTOP - (temperature). Acoustic labels: PRES (pressure); UX, UY, or UZ - (displacements for FSI coupled elements). Electric labels: VOLT - (voltage). Magnetic labels: MAG (scalar magnetic potential); AX, - AY, or AZ (vector magnetic potentials). Diffusion labels: CONC - (concentration). - - value - Degree of freedom value or table name reference for tabular - boundary conditions. To specify a table, enclose the table name in - percent signs (%) (e.g., DK,NODE,TEMP,%tabname%). Use the ``*DIM`` - command to define a table. - - value2 - Second degree of freedom value (if any). If the analysis type and - the degree of freedom allow a complex input, VALUE (above) is the - real component and VALUE2 is the imaginary component. - - kexpnd + kpoi : str + Keypoint at which constraint is to be specified. If ALL, apply to all selected keypoints ( + :ref:`ksel` ). If ``KPOI`` = P, graphical picking is enabled and all remaining command fields + are ignored (valid only in the GUI). A component name may also be substituted for ``KPOI``. + + lab : str + Additional degree of freedom labels. The same values are applied to the keypoints for these + labels. + + value : str + Degree of freedom value or table name reference for tabular boundary conditions. To specify a + table, enclose the table name in percent signs (%) (for example, + :ref:`dk`,NODE,TEMP,``tabname``). Use the :ref:`dim` command to define a table. + + value2 : str + Second degree of freedom value (if any). If the analysis type and the degree of freedom allow a + complex input, ``VALUE`` (above) is the real component and ``VALUE2`` is the imaginary + component. + + kexpnd : int or str Expansion key: - 0 - Constraint applies only to the node at this keypoint. + * ``0`` - Constraint applies only to the node at this keypoint. + + * ``1`` - Flags this keypoint for constraint expansion. + + lab2 : str + Additional degree of freedom labels. The same values are applied to the keypoints for these + labels. - 1 - Flags this keypoint for constraint expansion. + lab3 : str + Additional degree of freedom labels. The same values are applied to the keypoints for these + labels. - lab2, lab3, lab4, . . . , lab6 - Additional degree of freedom labels. The same values are applied - to the keypoints for these labels. + lab4 : str + Additional degree of freedom labels. The same values are applied to the keypoints for these + labels. + + lab5 : str + Additional degree of freedom labels. The same values are applied to the keypoints for these + labels. + + lab6 : str + Additional degree of freedom labels. The same values are applied to the keypoints for these + labels. Notes ----- - A keypoint may be flagged using KEXPND to allow its constraints to be - expanded to nodes on the attached solid model entities having similarly - flagged keypoint constraints. Constraints are transferred from - keypoints to nodes with the DTRAN or SBCTRAN commands. The expansion - uses interpolation to apply constraints to the nodes on the lines - between flagged keypoints. If all keypoints of an area or volume - region are flagged and the constraints (label and values) are equal, - the constraints are applied to the interior nodes of the region. See - the D command for a description of nodal constraints. - - Tabular boundary conditions (VALUE = %tabname%) are available only for - the following degree of freedom labels: Electric (VOLT), structural - (UX, UY, UZ, ROTX, ROTY, ROTZ), Acoustic (PRES, UX, UY, UZ), and - temperature (TEMP, TBOT, TE2, TE3, . . ., TTOP). - - Constraints specified by the DK command can conflict with other - specified constraints. See Resolution of Conflicting Constraint - Specifications in the Basic Analysis Guide for details. + + .. _DK_notes: + + A keypoint may be flagged using ``KEXPND`` to allow its constraints to be expanded to nodes on the + attached solid model entities having similarly flagged keypoint constraints. Constraints are + transferred from keypoints to nodes with the :ref:`dtran` or :ref:`sbctran` commands. The expansion + uses interpolation to apply constraints to the nodes on the lines between flagged keypoints. If all + keypoints of an area or volume region are flagged and the constraints (label and values) are equal, + the constraints are applied to the interior nodes of the region. See the :ref:`d` command for a + description of nodal constraints. + + Tabular boundary conditions ( ``VALUE`` = ``tabname``) are available only for the following degree + of freedom labels: Electric (VOLT), structural (UX, UY, UZ, ROTX, ROTY, ROTZ), Acoustic (PRES, UX, + UY, UZ), and temperature (TEMP, TBOT, TE2, TE3,..., TTOP). + + Constraints specified by the :ref:`dk` command can conflict with other specified constraints. See + Resolution of Conflicting Constraint Specifications in the `Basic Analysis Guide + `_ for details. This command is also valid in PREP7. """ command = f"DK,{kpoi},{lab},{value},{value2},{kexpnd},{lab2},{lab3},{lab4},{lab5},{lab6}" return self.run(command, **kwargs) - def dkdele(self, kpoi="", lab="", **kwargs): - """Deletes DOF constraints at a keypoint. + def dkdele(self, kpoi: str = "", lab: str = "", **kwargs): + r"""Deletes DOF constraints at a keypoint. - APDL Command: DKDELE + Mechanical APDL Command: `DKDELE `_ Parameters ---------- - kpoi - Keypoint for which constraint is to be deleted. If ALL, delete for - all selected keypoints [KSEL]. If KPOI = P, graphical picking is - enabled and all remaining command fields are ignored (valid only in - the GUI). A component name may also be substituted for KPOI. - - lab - Valid degree of freedom label. If ALL, use all appropriate labels. - Structural labels: UX, UY, or UZ (displacements); ROTX, ROTY, or - ROTZ (rotations); WARP (warping). Thermal labels: TEMP, TBOT, TE2, - TE3, . . ., TTOP (temperature). Acoustic labels: PRES (pressure); - UX, UY, or UZ (displacements for FSI coupled elements). Electric - label: VOLT (voltage). Magnetic labels: MAG (scalar magnetic - potential); AX, AY, or AZ (vector magnetic potentials). Diffusion - label: CONC (concentration). + kpoi : str + Keypoint for which constraint is to be deleted. If ALL, delete for all selected keypoints ( + :ref:`ksel` ). If ``KPOI`` = P, graphical picking is enabled and all remaining command fields + are ignored (valid only in the GUI). A component name may also be substituted for ``KPOI``. + + lab : str + Valid degree of freedom label. If ALL, use all appropriate labels. Structural labels: UX, UY, or + UZ (displacements); ROTX, ROTY, or ROTZ (rotations); WARP (warping). Thermal labels: TEMP, TBOT, + TE2, TE3,..., TTOP (temperature). Acoustic labels: PRES (pressure); UX, UY, or UZ (displacements + for FSI coupled elements). Electric label: VOLT (voltage). Magnetic labels: MAG (scalar magnetic + potential); AZ (vector magnetic potential). Diffusion label: CONC (concentration). Notes ----- - Deletes the degree of freedom constraints (and all corresponding finite - element constraints) at a keypoint. See the DDELE command for details. + + .. _DKDELE_notes: + + Deletes the degree of freedom constraints (and all corresponding finite element constraints) at a + keypoint. See the :ref:`ddele` command for details. This command is also valid in PREP7. """ command = f"DKDELE,{kpoi},{lab}" return self.run(command, **kwargs) - def dklist(self, kpoi="", **kwargs): - """Lists the DOF constraints at keypoints. + def dklist(self, kpoi: str = "", **kwargs): + r"""Lists the DOF constraints at keypoints. - APDL Command: DKLIST + Mechanical APDL Command: `DKLIST `_ Parameters ---------- - kpoi - List constraints for this keypoint. If ALL (default), list for all - selected keypoints [KSEL]. If KPOI = P, graphical picking is - enabled and all remaining command fields are ignored (valid only in - the GUI). A component name may also be substituted for KPOI. + kpoi : str + List constraints for this keypoint. If ALL (default), list for all selected keypoints ( + :ref:`ksel` ). If ``KPOI`` = P, graphical picking is enabled and all remaining command fields + are ignored (valid only in the GUI). A component name may also be substituted for ``KPOI``. Notes ----- - Listing applies to the selected keypoints [KSEL] and the selected - degree of freedom labels [DOFSEL]. + + .. _DKLIST_notes: + + Listing applies to the selected keypoints ( :ref:`ksel` ) and the selected degree of freedom labels + ( :ref:`dofsel` ). This command is valid in any processor. """ command = f"DKLIST,{kpoi}" return self.run(command, **kwargs) - def dl(self, line="", area="", lab="", value1="", value2="", **kwargs): - """Defines DOF constraints on lines. + def dl( + self, + line: str = "", + area: str = "", + lab: str = "", + value1: str = "", + value2: str = "", + **kwargs, + ): + r"""Defines DOF constraints on lines. - APDL Command: DL + Mechanical APDL Command: `DL `_ Parameters ---------- - line - Line at which constraints are to be specified. If ALL, apply to all - selected lines [LSEL]. If LINE = P, graphical picking is enabled - and all remaining command fields are ignored (valid only in the - GUI). A component name may also be substituted for LINE. + line : str + Line at which constraints are to be specified. If ALL, apply to all selected lines ( :ref:`lsel` + ). If ``LINE`` = P, graphical picking is enabled and all remaining command fields are ignored + (valid only in the GUI). A component name may also be substituted for ``LINE``. + + area : str + Area containing line. The normal to the symmetry or antisymmetry surface is assumed to lie on + this area. Defaults to the lowest numbered selected area containing the line number. + + lab : str + Symmetry label (see :ref:`DL_LabFootnotes_1` below) : + + * ``SYMM`` - Generate symmetry constraints. + + * ``ASYM`` - Generate antisymmetry constraints. + + Mechanical APDL degree-of-freedom labels: + + * ``UX`` - Displacement in X direction. + + * ``UY`` - Displacement in Y direction. + + * ``UZ`` - Displacement in Z direction. + + * ``ROTX`` - Rotation about X axis. + + * ``ROTY`` - Rotation about Y axis. - area - Area containing line. The normal to the symmetry or antisymmetry - surface is assumed to lie on this area. Defaults to the lowest - numbered selected area containing the line number. + * ``ROTZ`` - Rotation about Z axis. - lab - Symmetry label (see 2): + * ``HDSP`` - Hydrostatic pressure. - SYMM - Generate symmetry constraints. + * ``WARP`` - Warping magnitude. - ASYM - Generate antisymmetry constraints. + * ``TEMP, TBOT, TE2, TE3, ..., TTOP`` - Temperature - value1 - Value of DOF (real part) or table name reference on the line. - Valid for all DOF labels. To specify a table, enclose the table - name in % signs (e.g., DL,LINE,AREA,TEMP,%tabname%). Use the ``*DIM`` - command to define a table. + * ``VOLT`` - Electric scalar potential (see :ref:`DL_LabFootnotes_2` ). - value2 + * ``AZ`` - Magnetic vector potential in Z direction. + + * ``CONC`` - Concentration. + + * ``ALL`` - Applies all appropriate DOF labels except HDSP. + + This command contains some tables and extra information which can be inspected in the original + documentation pointed above. + + value1 : str + Value of DOF (real part) or table name reference on the line. Valid for all DOF labels. To + specify a table, enclose the table name in % signs (for example, :ref:`dl`, ``LINE``, + ``AREA``,TEMP,``tabname``). Use the :ref:`dim` command to define a table. + + value2 : str For VOLT DOFs: + Actual value of the imaginary component of the degree of freedom. + Notes ----- - You can transfer constraints from lines to nodes with the DTRAN or - SBCTRAN commands. See the DK command for information about generating - other constraints at lines. - Symmetry and antisymmetry constraints are generated as described on the - DSYM command. + .. _DL_notes: - Setting Lab = VOLT and Value1 = 0 applies the J-normal boundary - condition (current density vector (J) flows normal to the line). No - input is required for the J-parallel condition because it is the - natural boundary condition. + You can transfer constraints from lines to nodes with the :ref:`dtran` or :ref:`sbctran` commands. + See the :ref:`dk` command for information about generating other constraints at lines. - Tabular boundary conditions (Value1 = %tabname%) are available only for - the following degree of freedom labels: Electric (VOLT), Structural - (UX, UY, UZ, ROTX, ROTY, ROTZ), Acoustic (PRES, UX, UY, UZ), and - temperature (TEMP, TBOT, TE2, TE3, . . ., TTOP). + Tabular boundary conditions ( ``Value1`` = ``tabname``) are available only for the following degree + of freedom labels: Electric (VOLT), Structural (UX, UY, UZ, ROTX, ROTY, ROTZ), Acoustic (PRES, UX, + UY, UZ), and temperature (TEMP, TBOT, TE2, TE3,..., TTOP). - Constraints specified by the DL command can conflict with other - specified constraints. See Resolution of Conflicting Constraint - Specifications in the Basic Analysis Guide for details. + Constraints specified with this command can conflict with other specified constraints. For more + information, see Resolution of Conflicting Constraint Specifications. This command is also valid in PREP7. """ command = f"DL,{line},{area},{lab},{value1},{value2}" return self.run(command, **kwargs) - def dldele(self, line="", lab="", **kwargs): - """Deletes DOF constraints on a line. + def dldele(self, line: str = "", lab: str = "", **kwargs): + r"""Deletes DOF constraints on a line. - APDL Command: DLDELE + Mechanical APDL Command: `DLDELE `_ Parameters ---------- - line - Line for which constraints are to be deleted. If ALL, delete for - all selected lines [LSEL]. If LINE = P, graphical picking is - enabled and all remaining command fields are ignored (valid only in - the GUI). A component name may also be substituted for LINE + line : str + Line for which constraints are to be deleted. If ALL, delete for all selected lines ( + :ref:`lsel` ). If ``LINE`` = P, graphical picking is enabled and all remaining command fields + are ignored (valid only in the GUI). A component name may also be substituted for ``LINE`` - lab + lab : str Constraint label: - ALL - All constraints. - - SYMM - Symmetry constraints. - - ASYM - Antisymmetry constraints. + * ``ALL`` - All constraints. - UX - Displacement in X direction. + * ``SYMM`` - Symmetry constraints. - UY - Displacement in Y direction. + * ``ASYM`` - Antisymmetry constraints. - UZ - Displacement in Z direction. + * ``UX`` - Displacement in X direction. - ROTX - Rotation about X axis. + * ``UY`` - Displacement in Y direction. - ROTY - Rotation about Y axis. + * ``UZ`` - Displacement in Z direction. - ROTZ - Rotation about Z axis. + * ``ROTX`` - Rotation about X axis. - WARP - Warping magnitude. + * ``ROTY`` - Rotation about Y axis. - PRES - Pressure. + * ``ROTZ`` - Rotation about Z axis. - TEMP, TBOT, TE2, TE3, . . ., TTOP - Temperature. + * ``WARP`` - Warping magnitude. - VOLT - Electric scalar potential. + * ``PRES`` - Pressure. - AX - Magnetic vector potential in X direction. + * ``TEMP, TBOT, TE2, TE3, ..., TTOP`` - Temperature. - AY - Magnetic vector potential in Y direction. + * ``VOLT`` - Electric scalar potential. - AZ - Magnetic vector potential in Z direction. + * ``AZ`` - Magnetic vector potential in Z direction. - CONC - Concentration. + * ``CONC`` - Concentration. Notes ----- - Deletes the degree of freedom constraints (and all corresponding finite - element constraints) on a line previously specified with the DL - command. See the DDELE command for delete details. - Warning:: : On previously meshed lines, all constraints on affected - nodes will also be deleted, whether or not they were specified by the - DL command. + .. _DLDELE_notes: + + Deletes the degree of freedom constraints (and all corresponding finite element constraints) on a + line previously specified with the :ref:`dl` command. See the :ref:`ddele` command for delete + details. + + .. warning:: + + On previously meshed lines, allconstraints on affected nodes will also be deleted, whether or + not they were specified by the DL command. This command is also valid in PREP7. """ command = f"DLDELE,{line},{lab}" return self.run(command, **kwargs) - def dllist(self, line="", **kwargs): - """Lists DOF constraints on a line. + def dllist(self, line: str = "", **kwargs): + r"""Lists DOF constraints on a line. - APDL Command: DLLIST + Mechanical APDL Command: `DLLIST `_ Parameters ---------- - line - List constraints for this line. If ALL (default), list for all - selected lines [LSEL]. If LINE = P, graphical picking is enabled - and all remaining command fields are ignored (valid only in the - GUI). A component name may also be substituted for LINE. + line : str + List constraints for this line. If ALL (default), list for all selected lines ( :ref:`lsel` ). + If ``LINE`` = P, graphical picking is enabled and all remaining command fields are ignored + (valid only in the GUI). A component name may also be substituted for ``LINE``. Notes ----- - Lists the degree of freedom constraints on a line previously specified - with the DL command. + + .. _DLLIST_notes: + + Lists the degree of freedom constraints on a line previously specified with the :ref:`dl` command. This command is valid in any processor. """ @@ -516,18 +536,20 @@ def dllist(self, line="", **kwargs): return self.run(command, **kwargs) def dtran(self, **kwargs): - """Transfers solid model DOF constraints to the finite element model. + r"""Transfers solid model DOF constraints to the finite element model. - APDL Command: DTRAN + Mechanical APDL Command: `DTRAN `_ Notes ----- - Constraints are transferred only from selected solid model entities to - selected nodes. The DTRAN operation is also done if the SBCTRAN - command is issued, and is automatically done upon initiation of the - solution calculations [SOLVE]. + + .. _DTRAN_notes: + + Constraints are transferred only from selected solid model entities to selected nodes. The + :ref:`dtran` operation is also done if the :ref:`sbctran` command is issued, and is automatically + done upon initiation of the solution calculations ( :ref:`solve` ). This command is also valid in PREP7. """ - command = f"DTRAN," + command = "DTRAN" return self.run(command, **kwargs) diff --git a/src/ansys/mapdl/core/_commands/solution/solid_forces.py b/src/ansys/mapdl/core/_commands/solution/solid_forces.py index 4ed81c47bd3..dd10052c8a4 100644 --- a/src/ansys/mapdl/core/_commands/solution/solid_forces.py +++ b/src/ansys/mapdl/core/_commands/solution/solid_forces.py @@ -22,101 +22,107 @@ class SolidForces: - def fk(self, kpoi="", lab="", value="", value2="", **kwargs): - """Defines force loads at keypoints. - APDL Command: FK + def fk( + self, kpoi: str = "", lab: str = "", value: str = "", value2: str = "", **kwargs + ): + r"""Defines force loads at keypoints. + + Mechanical APDL Command: `FK `_ Parameters ---------- - kpoi - Keypoint at which force is to be specified. If ALL, apply to all - selected keypoints [KSEL]. If KPOI = P, graphical picking is - enabled and all remaining command fields are ignored (valid only in - the GUI). A component name may also be substituted for KPOI. - - lab - Valid force label. Structural labels: FX, FY, or FZ (forces); MX, - MY, or MZ (moments). Thermal labels: HEAT, HBOT, HE2, HE3, . . ., - HTOP (heat flow). Fluid labels: FLOW (fluid flow). Electric - labels: AMPS (current flow), CHRG (electric charge). Magnetic - labels: FLUX (magnetic flux); CSGX, CSGY, or CSGZ (magnetic - current segments). Diffusion labels: RATE (diffusion flow rate). - - value - Force value or table name reference for specifying tabular boundary - conditions. To specify a table, enclose the table name in percent - signs (%), e.g., FK, KPOI, HEAT,%tabname%). Use the ``*DIM`` command - to define a table. - - value2 - Second force value (if any). If the analysis type and the force - allow a complex input, VALUE (above) is the real component and - VALUE2 is the imaginary component. + kpoi : str + Keypoint at which force is to be specified. If ALL, apply to all selected keypoints ( + :ref:`ksel` ). If ``KPOI`` = P, graphical picking is enabled and all remaining command fields + are ignored (valid only in the GUI). A component name may also be substituted for ``KPOI``. + + lab : str + Valid force labels are: + + * **Structural labels** : FX, FY, or FZ (forces); MX, MY, or MZ (moments). + * **Thermal labels** : HEAT, HBOT, HE2, HE3,..., HTOP (heat flow). + * **Fluid label** : FLOW (fluid flow). + * **Electric labels** : AMPS (current flow), CHRG (electric charge). + * **Magnetic labels** : FLUX (magnetic flux); CSGZ (magnetic current segment). + * **Diffusion label** : RATE (diffusion flow rate). + + value : str + Force value or table name reference for specifying tabular boundary conditions. To specify a + table, enclose the table name in percent signs (%), for example, :ref:`fk`, ``KPOI``, + HEAT,``tabname``). Use the :ref:`dim` command to define a table. + + value2 : str + Second force value (if any). If the analysis type and the force allow a complex input, ``VALUE`` + (above) is the real component and ``VALUE2`` is the imaginary component. Notes ----- - Forces may be transferred from keypoints to nodes with the FTRAN or - SBCTRAN commands. See the F command for a description of force loads. - Tabular boundary conditions (VALUE = %tabname%) are available only for - the following labels: Fluid (FLOW), Electric (AMPS), Structural force - (FX, FY, FZ, MX, MY, MZ), and Thermal (HEAT, HBOT, HE2, HE3, . . ., - HTOP). + .. _FK_notes: + + Forces may be transferred from keypoints to nodes with the :ref:`ftran` or :ref:`sbctran` commands. + See the :ref:`f` command for a description of force loads. + + Tabular boundary conditions ( ``VALUE`` = ``tabname``) are available only for the following labels: + Fluid (FLOW), Electric (AMPS), Structural force (FX, FY, FZ, MX, MY, MZ), and Thermal (HEAT, HBOT, + HE2, HE3,..., HTOP). This command is also valid in PREP7. """ command = f"FK,{kpoi},{lab},{value},{value2}" return self.run(command, **kwargs) - def fkdele(self, kpoi="", lab="", **kwargs): - """Deletes force loads at a keypoint. + def fkdele(self, kpoi: str = "", lab: str = "", **kwargs): + r"""Deletes force loads at a keypoint. - APDL Command: FKDELE + Mechanical APDL Command: `FKDELE `_ Parameters ---------- - kpoi - Keypoint at which force is to be deleted. If ALL, delete forces at - all selected keypoints [KSEL]. If KPOI = P, graphical picking is - enabled and all remaining command fields are ignored (valid only in - the GUI). A component name may also be substituted for KPOI. + kpoi : str + Keypoint at which force is to be deleted. If ALL, delete forces at all selected keypoints ( + :ref:`ksel` ). If ``KPOI`` = P, graphical picking is enabled and all remaining command fields + are ignored (valid only in the GUI). A component name may also be substituted for ``KPOI``. - lab - Valid force label. If ALL, use all appropriate labels. See the - FDELE command for labels. + lab : str + Valid force label. If ALL, use all appropriate labels. See the :ref:`fdele` command for labels. Notes ----- - Deletes force loads (and all corresponding finite element loads) at a - keypoint. See the FDELE command for details. + + .. _FKDELE_notes: + + Deletes force loads (and all corresponding finite element loads) at a keypoint. See the :ref:`fdele` + command for details. This command is also valid in PREP7. """ command = f"FKDELE,{kpoi},{lab}" return self.run(command, **kwargs) - def fklist(self, kpoi="", lab="", **kwargs): - """Lists the forces at keypoints. + def fklist(self, kpoi: str = "", lab: str = "", **kwargs): + r"""Lists the forces at keypoints. - APDL Command: FKLIST + Mechanical APDL Command: `FKLIST `_ Parameters ---------- - kpoi - List forces at this keypoint. If ALL (default), list for all - selected keypoints [KSEL]. If KPOI = P, graphical picking is - enabled and all remaining command fields are ignored (valid only in - the GUI). A component name may also be substituted for KPOI. + kpoi : str + List forces at this keypoint. If ALL (default), list for all selected keypoints ( :ref:`ksel` ). + If ``KPOI`` = P, graphical picking is enabled and all remaining command fields are ignored + (valid only in the GUI). A component name may also be substituted for ``KPOI``. - lab - Force label to be listed (defaults to ALL). See the DOFSEL command - for labels. + lab : str + Force label to be listed (defaults to ALL). See the :ref:`dofsel` command for labels. Notes ----- - Listing applies to the selected keypoints [KSEL] and the selected force - labels [DOFSEL]. + + .. _FKLIST_notes: + + Listing applies to the selected keypoints ( :ref:`ksel` ) and the selected force labels ( + :ref:`dofsel` ). This command is valid in any processor. """ @@ -124,18 +130,20 @@ def fklist(self, kpoi="", lab="", **kwargs): return self.run(command, **kwargs) def ftran(self, **kwargs): - """Transfers solid model forces to the finite element model. + r"""Transfers solid model forces to the finite element model. - APDL Command: FTRAN + Mechanical APDL Command: `FTRAN `_ Notes ----- - Forces are transferred only from selected keypoints to selected nodes. - The FTRAN operation is also done if the SBCTRAN command is issued or - automatically done upon initiation of the solution calculations - [SOLVE]. + + .. _FTRAN_notes: + + Forces are transferred only from selected keypoints to selected nodes. The :ref:`ftran` operation is + also done if the :ref:`sbctran` command is issued or automatically done upon initiation of the + solution calculations ( :ref:`solve` ). This command is also valid in PREP7. """ - command = f"FTRAN," + command = "FTRAN" return self.run(command, **kwargs) diff --git a/src/ansys/mapdl/core/_commands/solution/solid_surface_loads.py b/src/ansys/mapdl/core/_commands/solution/solid_surface_loads.py index 02ed56ce75b..6deb6fd753f 100644 --- a/src/ansys/mapdl/core/_commands/solution/solid_surface_loads.py +++ b/src/ansys/mapdl/core/_commands/solution/solid_surface_loads.py @@ -22,243 +22,403 @@ class SolidSurfaceLoads: - def sfa(self, area="", lkey="", lab="", value="", value2="", **kwargs): - """Specifies surface loads on the selected areas. - APDL Command: SFA + def sfa( + self, + area: str = "", + lkey: str = "", + lab: str = "", + value: str = "", + value2: str = "", + **kwargs, + ): + r"""Specifies surface loads on the selected areas. + + Mechanical APDL Command: `SFA `_ Parameters ---------- - area - Area to which surface load applies. If ALL, apply load to all - selected areas [ASEL]. A component may be substituted for Area. - - lkey - Load key associated with surface load (defaults to 1). Load keys - (1,2,3, etc.) are listed under "Surface Loads" in the input data - table for each element type in the Element Reference. LKEY is - ignored if the area is the face of a volume region meshed with - volume elements. - - lab - Valid surface load label. Load labels are listed under "Surface - Loads" in the input table for each area type in the Element - Reference. - - value - Surface load value or table name reference for specifying tabular - boundary conditions. - - value2 + area : str + Area to which surface load applies. If ALL, apply load to all selected areas ( :ref:`asel` ). If + ``Area`` = P, graphical picking is enabled and all remaining command fields are ignored (valid + only in the GUI). A component may be substituted for ``Area``. + + lkey : str + Load key associated with surface load (defaults to 1). Load keys (1,2,3, etc.) are listed under + "Surface Loads" in the input data table for each element type in the `Element Reference + `_. ``LKEY`` + is ignored if the area is the face of a volume region meshed with volume elements. + + lab : str + Valid surface load label. Load labels are listed under "Surface Loads" in the input table for + each area type in the `Element Reference + `_. + + This command contains some tables and extra information which can be inspected in the original + documentation pointed above... _sfa1: + + Thermal labels CONV and HFLUX are mutually exclusive. + + .. _sfa2: + + For an acoustic analysis, apply the fluid-structure interaction flag (Label = FSI) to only the + ``FLUID129`` or ``FLUID130`` elements. + + value : str + Surface load value or table name reference for specifying tabular boundary conditions. + + If ``Lab`` = CONV: + + * ``VALUE`` is typically the film coefficient and ``VALUE2`` (below) is typically the bulk + temperature. If ``Lab`` = CONV and ``VALUE`` = - ``N``, the film coefficient may be a function of + temperature and is determined from the HF property table for material ``N`` ( :ref:`mp` ). (See + the :ref:`scopt` command for a way to override this option and use - ``N`` as the film + coefficient.) The temperature used to evaluate the film coefficient is usually the average between + the bulk and wall temperatures, but may be user-defined for some elements. + * If :ref:`kbc`,0 has been issued for ramped loads, it affects only ``VALUE2``, :ref:`the bulk + temperature, and the film coefficient specification is unaffected. ` + * + + If ``Lab`` = RAD, ``VALUE`` is the surface emissivity. + + If ``Lab`` = PORT, ``VALUE`` is a port number representing a waveguide exterior port. The port + number must be an integer between 1 and 50. For acoustic 2×2 transfer admittance matrix, the port + number can be any positive integer. The smaller port number corresponds to the port 1 of the 2×2 + transfer admittance matrix and the greater port number corresponds to the port 2. If one port of the + transfer admittance matrix is connecting to the acoustic-structural interaction interface, the port + number corresponds to the port 2 of the transfer admittance matrix. A pair of ports of the 2×2 + transfer admittance matrix must be defined in the same element. + + If ``Lab`` = SHLD, ``VALUE`` is the surface normal velocity in harmonic analysis and the surface + normal acceleration in transient analysis for acoustics. + + If ``Lab`` = IMPD, ``VALUE`` is resistance in (N)(s)/m :sup:`3` if ``VALUE`` > 0 and is conductance + in mho if ``VALUE`` < 0 for acoustics. In acoustic transient analyses, ``VALUE2`` is not used. + + If ``Lab`` = RDSF, ``VALUE`` is the emissivity value; the following conditions apply: If ``VALUE`` + is between 0 and 1, apply a single value to the surface. If ``VALUE`` = - ``N``, the emissivity may + be a function of the temperature, and is determined from the EMISS property table for material ``N`` + ( :ref:`mp` ). The material ``N`` does not need to correlate with the underlying solid thermal + elements. + + If ``Lab`` = FSIN in a unidirectional Mechanical APDL to CFX analysis, ``VALUE`` is not used. + + If ``Lab`` = ATTN, ``VALUE`` is the absorption coefficient of the surface. + + value2 : str Second surface load value (if any). + If ``Lab`` = CONV: + + * ``VALUE2`` is typically the bulk temperature for thermal analyses. + * If :ref:`kbc`,0 has been issued for ramped loads, the bulk temperature is ramped from the value + defined by :ref:`tunif` to the value specified by ``VALUE2`` for the first loadstep. If + :ref:`tabular boundary conditions are defined, the ` :ref:`kbc` command is ignored and + tabular values are used. + * For acoustic analyses, VALUE2 is not used. + + If ``Lab`` = RAD ``VALUE2`` is ambient temperature. + + If ``Lab`` = SHLD, ``VALUE2`` is the phase angle of the normal surface velocity (defaults to zero) + for harmonic response analyses while ``VALUE2`` is not used for transient analyses in acoustics. + + If ``Lab`` = IMPD, ``VALUE2`` is reactance in (N)(s)/m :sup:`3` if ``VALUE`` > 0 and is the product + of susceptance and angular frequency if ``VALUE`` < 0 for acoustics. + + If ``Lab`` = RDSF, ``VALUE2`` is the enclosure number. Radiation will occur between surfaces flagged + with the same enclosure numbers. If the enclosure is open, radiation will also occur to ambient. If + ``VALUE2`` is negative, radiation direction is reversed and will occur inside the element for the + flagged radiation surfaces. + + If ``Lab`` = FSIN in a unidirectional Mechanical APDL to CFX analysis, ``VALUE2`` is the surface interface + number (not available from within the GUI). + Notes ----- - Surface loads may be transferred from areas to elements with the SFTRAN - or SBCTRAN commands. See the SFGRAD command for an alternate tapered - load capability. - Tabular boundary conditions (VALUE = %tabname% and/or VALUE2 = - %tabname%) are available for the following surface load labels (Lab) - only: : PRES (real and/or imaginary components), CONV (film coefficient - and/or bulk temperature) or HFLUX, and RAD (surface emissivity and - ambient temperature). Use the ``*DIM`` command to define a table. + .. _SFA_notes: - This command is also valid in PREP7. + Surface loads may be transferred from areas to elements with the :ref:`sftran` or :ref:`sbctran` + commands. See the :ref:`sfgrad` command for an alternate tapered load capability. - Examples - -------- - Select areas with coordinates in the range ``0.4 < Y < 1.0`` + Tabular boundary conditions Tabular boundary conditions ( ``VALUE`` = ``tabname`` and/or ``VALUE2`` + = ``tabname``) are available + for the following surface load labels ( ``Lab`` ) only: PRES (real and/or imaginary components), + CONV (film coefficient and/or bulk temperature) or HFLUX, and RAD (surface emissivity and ambient + temperature). Use the :ref:`dim` command to define a table. - >>> mapdl.asel('S', 'LOC', 'Y', 0.4, 1.0) + In a mode-superposition harmonic or transient analysis, you must apply the load in the modal portion + of the analysis. Mechanical APDL calculates a load vector and writes it to the :file:`MODE` file, + which you + can apply via the :ref:`lvscale` command. - Set pressure to 250e3 on all areas. - - >>> mapdl.sfa('ALL', '', 'PRES', 250e3) + This command is also valid in PREP7. """ command = f"SFA,{area},{lkey},{lab},{value},{value2}" return self.run(command, **kwargs) - def sfadele(self, area="", lkey="", lab="", **kwargs): - """Deletes surface loads from areas. + def sfadele(self, area: str = "", lkey: str = "", lab: str = "", **kwargs): + r"""Deletes surface loads from areas. - APDL Command: SFADELE + Mechanical APDL Command: `SFADELE `_ Parameters ---------- - area - Area to which surface load deletion applies. If ALL, delete load - from all selected areas [ASEL]. A component name may be substituted for AREA. + area : str + Area to which surface load deletion applies. If ALL, delete load from all selected areas ( + :ref:`asel` ). If ``AREA`` = P, graphical picking is enabled and all remaining command fields + are ignored (valid only in the GUI). A component name may be substituted for ``AREA``. - lkey - Load key associated with surface load (defaults to 1). See the SFA - command for details. + lkey : str + Load key associated with surface load (defaults to 1). See the :ref:`sfa` command for details. - lab - Valid surface load label. If ALL, use all appropriate labels. See - the SFA command for labels. + lab : str + Valid surface load label. If ALL, use all appropriate labels. See the :ref:`sfa` command for + labels. Notes ----- - Deletes surface loads (and all corresponding finite element loads) from - selected areas. - This command is also valid in PREP7. + .. _SFADELE_notes: - Examples - -------- - Delete all convections applied to all areas where ``-1 < X < -0.5`` + Deletes surface loads (and all corresponding finite element loads) from selected areas. - >>> mapdl.asel('S', 'LOC', 'X', -1, -0.5) - >>> mapdl.sfadele('ALL', 'CONV') + This command is also valid in PREP7. """ command = f"SFADELE,{area},{lkey},{lab}" return self.run(command, **kwargs) - def sfalist(self, area="", lab="", **kwargs): - """Lists the surface loads for the specified area. + def sfalist(self, area: str = "", lab: str = "", **kwargs): + r"""Lists the surface loads for the specified area. - APDL Command: SFALIST + Mechanical APDL Command: `SFALIST `_ Parameters ---------- - area - Area at which surface load is to be listed. If ALL (or blank), - list for all selected areas [ASEL]. If AREA = P, graphical picking - is enabled and all remaining command fields are ignored (valid only - in the GUI). A component name may be substituted for AREA. + area : str + Area at which surface load is to be listed. If ALL (or blank), list for all selected areas ( + :ref:`asel` ). If ``AREA`` = P, graphical picking is enabled and all remaining command fields + are ignored (valid only in the GUI). A component name may be substituted for ``AREA``. - lab - Valid surface load label. If ALL (or blank), use all appropriate - labels. See the SFA command for labels. + lab : str + Valid surface load label. If ALL (or blank), use all appropriate labels. See the :ref:`sfa` + command for labels. Notes ----- + + .. _SFALIST_notes: + This command is valid in any processor. """ command = f"SFALIST,{area},{lab}" return self.run(command, **kwargs) - def sfl(self, line="", lab="", vali="", valj="", val2i="", val2j="", **kwargs): - """Specifies surface loads on lines of an area. + def sfl( + self, + line: str = "", + lab: str = "", + vali: str = "", + valj: str = "", + val2i: str = "", + val2j: str = "", + **kwargs, + ): + r"""Specifies surface loads on lines of an area. - APDL Command: SFL + Mechanical APDL Command: `SFL `_ Parameters ---------- - line - Line to which surface load applies. If ALL, apply load to all - selected lines [LSEL]. If Line = P, graphical picking is enabled - and all remaining command fields are ignored (valid only in the - GUI). A component name may be substituted for Line. - - lab - Valid surface load label. Load labels are listed under "Surface - Loads" in the input table for each element type in the Element - Reference. - - vali, valj - Surface load values at the first keypoint (VALI) and at the second - keypoint (VALJ) of the line, or table name for specifying tabular - boundary conditions. If VALJ is blank, it defaults to VALI. If - VALJ is zero, a zero is used. If Lab = CONV, VALI and VALJ are the - film coefficients and VAL2I and VAL2J are the bulk temperatures. - To specify a table, enclose the table name in percent signs (%), - e.g., %tabname%. Use the ``*DIM`` command to define a table. If Lab = - CONV and VALI = -N, the film coefficient may be a function of - temperature and is determined from the HF property table for - material N [MP]. If Lab = RAD, VALI and VALJ values are surface - emissivities and VAL2I and VAL2J are ambient temperatures. The - temperature used to evaluate the film coefficient is usually the - average between the bulk and wall temperatures, but may be user - defined for some elements. If Lab = RDSF, VALI is the emissivity - value; the following condition apply: If VALI = -N, the emissivity - may be a function of the temperature and is determined from the - EMISS property table for material N [MP]. If Lab = FSIN in a Multi- - field solver (single or multiple code coupling) analysis, VALI is - the surface interface number. If Lab = FSIN in a unidirectional - ANSYS to CFX analysis, VALJ is the surface interface number (not - available from within the GUI) and VALI is not used unless the - ANSYS analysis is performed using the Multi-field solver. - - val2i, val2j - Second surface load values (if any). If Lab = CONV, VAL2I and - VAL2J are the bulk temperatures. If Lab = RAD, VAL2I and VAL2J are - the ambient temperatures. If Lab = RDSF, VAL2I is the enclosure - number. Radiation will occur between surfaces flagged with the same - enclosure numbers. If the enclosure is open, radiation will occur - to the ambient. VAL2I and VAL2J are not used for other surface load - labels. If VAL2J is blank, it defaults to VAL2I. If VAL2J is - zero, a zero is used. To specify a table (Lab = CONV), enclose the - table name in percent signs (%), e.g., %tabname%. Use the ``*DIM`` - command to define a table. + line : str + Line to which surface load applies. If ALL, apply load to all selected lines ( :ref:`lsel` ). If + ``Line`` = P, graphical picking is enabled and all remaining command fields are ignored (valid + only in the GUI). A component name may be substituted for ``Line``. + + lab : str + Valid surface load label. Load labels are listed under "Surface Loads" in the input table for + each element type in the `Element Reference + `_. This + command contains some tables and extra information which can be inspected in the original + documentation pointed above... _sfl1: + + Thermal labels CONV and HFLUX are mutually exclusive. + + .. _sfl2: + + For an acoustic analysis, apply the fluid-structure interaction flag (Label = FSI) to only the + ``FLUID129`` or ``FLUID130`` elements. + + vali : str + Surface load values at the first keypoint ( ``VALI`` ) and at the second keypoint ( ``VALJ`` ) of + the line, or table name for specifying tabular boundary conditions. If ``VALJ`` is blank, it + defaults to ``VALI``. If ``VALJ`` is zero, a zero is used. + + If ``Lab`` = CONV: + + * ``VALI`` and ``VALJ`` are the film coefficients and ``VAL2I`` and ``VAL2J`` are the bulk + temperatures. + * To specify a table, enclose the table name in percent signs (%), e.g., ``tabname``. (Issue + :ref:`dim` to define a table.) + * If ``Lab`` = CONV and ``VALI`` = - ``N``, the film coefficient may be a function of temperature + and is determined from the HF property table for material ``N`` ( :ref:`mp` ). (See :ref:`scopt` + for a way to override this option and use - ``N`` as the film coefficient.) + * If :ref:`kbc`,0 has been issued for ramped loads, it affects only the bulk temperatures, ``VAL2I`` + and ``VAL2J``, and the film coefficient specification, ``VALI`` and ``VALJ``, are unaffected. + + If ``Lab`` = RAD, ``VALI`` and ``VALJ`` values are surface emissivities and ``VAL2I`` and ``VAL2J`` + are ambient temperatures. The temperature used to evaluate the film coefficient is usually the + average between the bulk and wall temperatures, but may be user-defined for some elements. + + If ``Lab`` = RDSF, ``VALI`` is the emissivity value. If ``VALI`` = ``-N``, the emissivity may be a + function of the temperature and is determined from the EMISS property table for material ``N`` ( + :ref:`mp` ). + + If ``Lab`` = FSIN in a unidirectional Mechanical APDL-to-CFX analysis, ``VALJ`` is the surface interface + number (not available from within the GUI) and ``VALI`` is not used. + + valj : str + Surface load values at the first keypoint ( ``VALI`` ) and at the second keypoint ( ``VALJ`` ) of + the line, or table name for specifying tabular boundary conditions. If ``VALJ`` is blank, it + defaults to ``VALI``. If ``VALJ`` is zero, a zero is used. + + If ``Lab`` = CONV: + + * ``VALI`` and ``VALJ`` are the film coefficients and ``VAL2I`` and ``VAL2J`` are the bulk + temperatures. + * To specify a table, enclose the table name in percent signs (%), e.g., ``tabname``. (Issue + :ref:`dim` to define a table.) + * If ``Lab`` = CONV and ``VALI`` = - ``N``, the film coefficient may be a function of temperature + and is determined from the HF property table for material ``N`` ( :ref:`mp` ). (See :ref:`scopt` + for a way to override this option and use - ``N`` as the film coefficient.) + * If :ref:`kbc`,0 has been issued for ramped loads, it affects only the bulk temperatures, ``VAL2I`` + and ``VAL2J``, and the film coefficient specification, ``VALI`` and ``VALJ``, are unaffected. + + If ``Lab`` = RAD, ``VALI`` and ``VALJ`` values are surface emissivities and ``VAL2I`` and ``VAL2J`` + are ambient temperatures. The temperature used to evaluate the film coefficient is usually the + average between the bulk and wall temperatures, but may be user-defined for some elements. + + If ``Lab`` = RDSF, ``VALI`` is the emissivity value. If ``VALI`` = ``-N``, the emissivity may be a + function of the temperature and is determined from the EMISS property table for material ``N`` ( + :ref:`mp` ). + + If ``Lab`` = FSIN in a unidirectional Mechanical APDL-to-CFX analysis, ``VALJ`` is the surface interface + number (not available from within the GUI) and ``VALI`` is not used. + + val2i : str + Second surface load values (if any). If ``VAL2J`` is blank, it defaults to ``VAL2I``. If ``VAL2J`` + is zero, a zero is used. To specify a table ( ``Lab`` = CONV), enclose the table name in percent + signs (%), for example, ``tabname``. Use the :ref:`dim` command to define a table. + + If ``Lab`` = CONV: + + * ``VAL2I`` and ``VAL2J`` are the bulk temperatures. + * If :ref:`kbc`,0 has been issued for ramped loads, the bulk temperature is ramped from the value + defined by :ref:`tunif` to the value specified by ``VALI`` and ``VALJ`` for the first loadstep. If + tabular boundary conditions are defined, the :ref:`kbc` command is ignored and tabular values are + used for the bulk temperatures. + + If ``Lab`` = RAD, ``VAL2I`` and ``VAL2J`` are the ambient temperatures. + + If ``Lab`` = RDSF, ``VAL2I`` is the enclosure number. Radiation will occur between surfaces flagged + with the same enclosure numbers. If the enclosure is open, radiation will occur to the ambient. + + ``VAL2I`` and ``VAL2J`` are not used for other surface load labels. + + val2j : str + Second surface load values (if any). If ``VAL2J`` is blank, it defaults to ``VAL2I``. If ``VAL2J`` + is zero, a zero is used. To specify a table ( ``Lab`` = CONV), enclose the table name in percent + signs (%), for example, ``tabname``. Use the :ref:`dim` command to define a table. + + If ``Lab`` = CONV: + + * ``VAL2I`` and ``VAL2J`` are the bulk temperatures. + * If :ref:`kbc`,0 has been issued for ramped loads, the bulk temperature is ramped from the value + defined by :ref:`tunif` to the value specified by ``VALI`` and ``VALJ`` for the first loadstep. If + tabular boundary conditions are defined, the :ref:`kbc` command is ignored and tabular values are + used for the bulk temperatures. + + If ``Lab`` = RAD, ``VAL2I`` and ``VAL2J`` are the ambient temperatures. + + If ``Lab`` = RDSF, ``VAL2I`` is the enclosure number. Radiation will occur between surfaces flagged + with the same enclosure numbers. If the enclosure is open, radiation will occur to the ambient. + + ``VAL2I`` and ``VAL2J`` are not used for other surface load labels. Notes ----- - Specifies surface loads on the selected lines of area regions. The - lines represent either the edges of area elements or axisymmetric shell - elements themselves. Surface loads may be transferred from lines to - elements with the SFTRAN or SBCTRAN commands. See the SFE command for - a description of surface loads. Loads input on this command may be - tapered. See the SFGRAD command for an alternate tapered load + + .. _SFL_notes: + + Specifies surface loads on the selected lines of area regions. The lines represent either the edges + of area elements or axisymmetric shell elements themselves. Surface loads may be transferred from + lines to elements via :ref:`sftran` or :ref:`sbctran`. See :ref:`sfe` for a description of surface + loads. Loads input on this command may be tapered. See :ref:`sfgrad` for an alternate tapered load capability. - You can specify a table name only when using structural (PRES) and - thermal (CONV [film coefficient and/or bulk temperature], HFLUX), and - surface emissivity and ambient temperature (RAD) surface load labels. - VALJ and VAL2J are ignored for tabular boundary conditions. + You can specify a table name only when using structural (PRES) and thermal (CONV [film coefficient + and/or bulk temperature], HFLUX), and surface emissivity and ambient temperature (RAD) surface load + labels. ``VALJ`` and ``VAL2J`` are ignored for tabular boundary conditions. + + In a mode-superposition harmonic or transient analysis, you must apply the load in the modal portion + of the analysis. Mechanical APDL calculates a load vector and writes it to the :file:`MODE` file, + which you + can apply via :ref:`lvscale`. This command is also valid in PREP7. """ command = f"SFL,{line},{lab},{vali},{valj},{val2i},{val2j}" return self.run(command, **kwargs) - def sfldele(self, line="", lab="", **kwargs): - """Deletes surface loads from lines. + def sfldele(self, line: str = "", lab: str = "", **kwargs): + r"""Deletes surface loads from lines. - APDL Command: SFLDELE + Mechanical APDL Command: `SFLDELE `_ Parameters ---------- - line - Line to which surface load deletion applies. If ALL, delete load - from all selected lines [LSEL]. If LINE = P, graphical picking is - enabled and all remaining command fields are ignored (valid only in - the GUI). A component name may be substituted for LINE. + line : str + Line to which surface load deletion applies. If ALL, delete load from all selected lines ( + :ref:`lsel` ). If ``LINE`` = P, graphical picking is enabled and all remaining command fields + are ignored (valid only in the GUI). A component name may be substituted for ``LINE``. - lab - Valid surface load label. If ALL, use all appropriate labels. See - the SFL command for labels. + lab : str + Valid surface load label. If ALL, use all appropriate labels. See the :ref:`sfl` command for + labels. Notes ----- - Deletes surface loads (and all corresponding finite element loads) from - selected lines. + + .. _SFLDELE_notes: + + Deletes surface loads (and all corresponding finite element loads) from selected lines. This command is also valid in PREP7. """ command = f"SFLDELE,{line},{lab}" return self.run(command, **kwargs) - def sfllist(self, line="", lab="", **kwargs): - """Lists the surface loads for lines. + def sfllist(self, line: str = "", lab: str = "", **kwargs): + r"""Lists the surface loads for lines. - APDL Command: SFLLIST + Mechanical APDL Command: `SFLLIST `_ Parameters ---------- - line - Line at which surface load is to be listed. If ALL (or blank), - list for all selected lines [LSEL]. If LINE = P, graphical picking - is enabled and all remaining command fields are ignored (valid only - in the GUI). A component name may be substituted for LINE. + line : str + Line at which surface load is to be listed. If ALL (or blank), list for all selected lines ( + :ref:`lsel` ). If ``LINE`` = P, graphical picking is enabled and all remaining command fields + are ignored (valid only in the GUI). A component name may be substituted for ``LINE``. - lab - Valid surface load label. If ALL (or blank), use all appropriate - labels. See the SFL command for labels. + lab : str + Valid surface load label. If ALL (or blank), use all appropriate labels. See the :ref:`sfl` + command for labels. Notes ----- + + .. _SFLLIST_notes: + Lists the surface loads for the specified line. This command is valid in any processor. @@ -267,18 +427,20 @@ def sfllist(self, line="", lab="", **kwargs): return self.run(command, **kwargs) def sftran(self, **kwargs): - """Transfer the solid model surface loads to the finite element model. + r"""Transfer the solid model surface loads to the finite element model. - APDL Command: SFTRAN + Mechanical APDL Command: `SFTRAN `_ Notes ----- - Surface loads are transferred only from selected lines and areas to all - selected elements. The SFTRAN operation is also done if the SBCTRAN - command is issued or automatically done upon initiation of the solution - calculations [SOLVE]. + + .. _SFTRAN_notes: + + Surface loads are transferred only from selected lines and areas to all selected elements. The + :ref:`sftran` operation is also done if the :ref:`sbctran` command is issued or automatically done + upon initiation of the solution calculations ( :ref:`solve` ). This command is also valid in PREP7. """ - command = f"SFTRAN," + command = "SFTRAN" return self.run(command, **kwargs) diff --git a/src/ansys/mapdl/core/_commands/solution/solution_status.py b/src/ansys/mapdl/core/_commands/solution/solution_status.py deleted file mode 100644 index 9dc68213b48..00000000000 --- a/src/ansys/mapdl/core/_commands/solution/solution_status.py +++ /dev/null @@ -1,350 +0,0 @@ -# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates. -# SPDX-License-Identifier: MIT -# -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - - -class SolutionStatus: - def atype(self, **kwargs): - """Specifies "Analysis types" as the subsequent status topic. - - APDL Command: ATYPE - - Notes - ----- - This is a status [STAT] topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"ATYPE," - return self.run(command, **kwargs) - - def bioopt(self, **kwargs): - """Specifies "Biot-Savart options" as the subsequent status topic. - - APDL Command: BIOOPT - - Notes - ----- - This is a status [STAT] topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"BIOOPT," - return self.run(command, **kwargs) - - def deact(self, **kwargs): - """Specifies "Element birth and death" as the subsequent status topic. - - APDL Command: DEACT - - Notes - ----- - This is a status [STAT] topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"DEACT," - return self.run(command, **kwargs) - - def dynopt(self, **kwargs): - """Specifies "Dynamic analysis options" as the subsequent status topic. - - APDL Command: DYNOPT - - Notes - ----- - This is a status [STAT] topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"DYNOPT," - return self.run(command, **kwargs) - - def gap(self, **kwargs): - """Specifies "mode-superposition transient gap conditions" as the - - APDL Command: GAP - subsequent status topic. - - Notes - ----- - This is a status [STAT] topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"GAP," - return self.run(command, **kwargs) - - def genopt(self, **kwargs): - """Specifies "General options" as the subsequent status topic. - - APDL Command: GENOPT - - Notes - ----- - This is a status (STAT) topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"GENOPT," - return self.run(command, **kwargs) - - def inrtia(self, **kwargs): - """Specifies "Inertial loads" as the subsequent status topic. - - APDL Command: INRTIA - - Notes - ----- - This is a status [STAT] topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"INRTIA," - return self.run(command, **kwargs) - - def lsoper(self, **kwargs): - """Specifies "Load step operations" as the subsequent status topic. - - APDL Command: LSOPER - - Notes - ----- - This is a status [STAT] topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"LSOPER," - return self.run(command, **kwargs) - - def master(self, **kwargs): - """Specifies "Master DOF" as the subsequent status topic. - - APDL Command: MASTER - - Notes - ----- - This is a status [STAT] topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"MASTER," - return self.run(command, **kwargs) - - def nlopt(self, **kwargs): - """Specifies "Nonlinear analysis options" as the subsequent status topic. - - APDL Command: NLOPT - - Notes - ----- - This is a status [STAT] topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"NLOPT," - return self.run(command, **kwargs) - - def outopt(self, **kwargs): - """Specifies "Output options" as the subsequent status topic. - - APDL Command: OUTOPT - - Notes - ----- - This is a status [STAT] topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"OUTOPT," - return self.run(command, **kwargs) - - def smbody(self, **kwargs): - """Specifies "Body loads on the solid model" as the subsequent status - - APDL Command: SMBODY - topic. - - Notes - ----- - This is a status [STAT] topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"SMBODY," - return self.run(command, **kwargs) - - def smcons(self, **kwargs): - """Specifies "Constraints on the solid model" as the subsequent status - - APDL Command: SMCONS - topic. - - Notes - ----- - This is a status [STAT] topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"SMCONS," - return self.run(command, **kwargs) - - def smfor(self, **kwargs): - """Specifies "Forces on the solid model" as the subsequent status topic. - - APDL Command: SMFOR - - Notes - ----- - This is a status [STAT] topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"SMFOR," - return self.run(command, **kwargs) - - def smsurf(self, **kwargs): - """Specifies "Surface loads on the solid model" as the subsequent status - - APDL Command: SMSURF - topic. - - Notes - ----- - This is a status [STAT] topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"SMSURF," - return self.run(command, **kwargs) - - def soluopt(self, **kwargs): - """Specifies "Solution options" as the subsequent status topic. - - APDL Command: SOLUOPT - - Notes - ----- - This is a status [STAT] topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"SOLUOPT," - return self.run(command, **kwargs) - - def sptopt(self, **kwargs): - """Specifies "Spectrum analysis options" as the subsequent status topic. - - APDL Command: SPTOPT - - Notes - ----- - This is a status [STAT] topic command. Status topic commands are - generated by the GUI and will appear in the log file (Jobname.LOG) if - status is requested for some items under Utility Menu> List> Status. - This command will be immediately followed by a STAT command, which will - report the status for the specified topic. - - If entered directly into the program, the STAT command should - immediately follow this command. - """ - command = f"SPTOPT," - return self.run(command, **kwargs) diff --git a/src/ansys/mapdl/core/_commands/solution/spectrum_options.py b/src/ansys/mapdl/core/_commands/solution/spectrum_options.py index 596a441774b..53be9a3c85e 100644 --- a/src/ansys/mapdl/core/_commands/solution/spectrum_options.py +++ b/src/ansys/mapdl/core/_commands/solution/spectrum_options.py @@ -22,40 +22,66 @@ class SpectrumOptions: - def addam(self, af="", aa="", ab="", ac="", ad="", amin="", **kwargs): - """Specifies the acceleration spectrum computation constants for the - APDL Command: ADDAM - analysis of shock resistance of shipboard structures. + def addam( + self, + af: str = "", + aa: str = "", + ab: str = "", + ac: str = "", + ad: str = "", + amin: str = "", + **kwargs, + ): + r"""Specifies the acceleration spectrum computation constants for the analysis of shock resistance of + shipboard structures. + + Mechanical APDL Command: `ADDAM `_ Parameters ---------- - af - Direction-dependent acceleration coefficient for elastic or - elastic-plastic analysis option (default = 0). + af : str + Direction-dependent acceleration coefficient for elastic or elastic-plastic analysis option + (default = 0). - aa, ab, ac, ad - Coefficients for the DDAM acceleration spectrum equations. Default - for these coefficients is zero. + aa : str + Coefficients for the DDAM acceleration spectrum equations. Default for these coefficients is + zero. - amin - The minimum acceleration value in inch/sec2. It defaults to 2316 - inch/sec2 which equals 6g, where g is acceleration due to gravity - (g = 386 inch/sec2). + ab : str + Coefficients for the DDAM acceleration spectrum equations. Default for these coefficients is + zero. + + ac : str + Coefficients for the DDAM acceleration spectrum equations. Default for these coefficients is + zero. + + ad : str + Coefficients for the DDAM acceleration spectrum equations. Default for these coefficients is + zero. + + amin : str + Minimum acceleration value. It defaults to 6g, where g is the acceleration due to gravity. Notes ----- - This command specifies acceleration coefficients to analyze shock - resistance of shipboard equipment. These coefficients are used to - compute mode coefficients according to the equations given in Dynamic - Design Analysis Method in the Mechanical APDL Theory Reference. The - form of these equations is based on the Naval NRL Dynamic Design - Analysis Method. This command, along with the VDDAM and SED commands, - is used with the spectrum (ANTYPE,SPECTR) analysis as a special purpose - alternative to the SV, FREQ, and SVTYP commands. The mass and length - units of the model must be in pounds and inches, respectively. - - DDASPEC may alternatively be used to calculate spectrum coefficients. + + .. _ADDAM_notes: + + This command specifies acceleration coefficients to analyze shock resistance of shipboard equipment. + These coefficients are used to compute mode coefficients according to the equations given in + `Dynamic Design Analysis Method + `_ + :ref:`vddam` and :ref:`sed` commands, is used with the spectrum ( :ref:`antype`,SPECTR) analysis as + a special purpose alternative to the :ref:`sv`, :ref:`freq`, and :ref:`svtyp` commands. + + In order to perform a DDAM spectrum analysis using a units system other than BIN (default), you must + specify the units system complying with the mass and length units of the model using the + :ref:`units` command. Issue the :ref:`units` command before defining the shock spectrum computation + constants ( :ref:`addam` ). The :ref:`addam` command is not supported with the user-defined unite + system ( ``Label`` = USER on :ref:`units` ). + + :ref:`ddaspec` may alternatively be used to calculate spectrum coefficients. This command is also valid in PREP7. """ @@ -64,201 +90,239 @@ def addam(self, af="", aa="", ab="", ac="", ad="", amin="", **kwargs): def coval( self, - tblno1="", - tblno2="", - sv1="", - sv2="", - sv3="", - sv4="", - sv5="", - sv6="", - sv7="", + tblno1: str = "", + tblno2: str = "", + sv1: str = "", + sv2: str = "", + sv3: str = "", + sv4: str = "", + sv5: str = "", + sv6: str = "", + sv7: str = "", **kwargs, ): - """Defines PSD cospectral values. + r"""Defines PSD cospectral values. - APDL Command: COVAL + Mechanical APDL Command: `COVAL `_ Parameters ---------- - tblno1 + tblno1 : str First input PSD table number associated with this spectrum. - tblno2 + tblno2 : str Second input PSD table number associated with this spectrum. - sv1, sv2, sv3, . . . , sv7 - PSD cospectral values corresponding to the frequency points - [PSDFRQ]. + sv1 : str + PSD cospectral values corresponding to the frequency points ( :ref:`psdfrq` ). + + sv2 : str + PSD cospectral values corresponding to the frequency points ( :ref:`psdfrq` ). + + sv3 : str + PSD cospectral values corresponding to the frequency points ( :ref:`psdfrq` ). + + sv4 : str + PSD cospectral values corresponding to the frequency points ( :ref:`psdfrq` ). + + sv5 : str + PSD cospectral values corresponding to the frequency points ( :ref:`psdfrq` ). + + sv6 : str + PSD cospectral values corresponding to the frequency points ( :ref:`psdfrq` ). + + sv7 : str + PSD cospectral values corresponding to the frequency points ( :ref:`psdfrq` ). Notes ----- - Defines PSD cospectral values to be associated with the previously - defined frequency points. Two table references are required since - values are off-diagonal terms. Unlike autospectra [PSDVAL], the - cospectra can be positive or negative. The cospectral curve segment - where there is a sign change is interpolated linearly (the rest of the - curve segments use log-log interpolation). For better accuracy, choose - as small a curve segment as possible wherever a sign change occurs. - Repeat COVAL command using the same table numbers for additional - points. This command is valid for SPOPT,PSD only. + .. _COVAL_notes: + + Defines PSD cospectral values to be associated with the previously defined frequency points. + Two table references are required since values are off- diagonal terms. Unlike autospectra ( + :ref:`psdval` ), the cospectra can be positive or negative. The cospectral curve segment where there + is a sign change is interpolated linearly (the rest of the curve segments use log-log + interpolation). For better accuracy, choose as small a curve segment as possible wherever a sign + change occurs. + + Repeat :ref:`coval` command using the same table numbers for additional points. This command is + valid for :ref:`spopt`,PSD only. This command is also valid in PREP7. """ command = f"COVAL,{tblno1},{tblno2},{sv1},{sv2},{sv3},{sv4},{sv5},{sv6},{sv7}" return self.run(command, **kwargs) - def cqc(self, signif="", label="", forcetype="", **kwargs): - """Specifies the complete quadratic mode combination method. + def cqc(self, signif: str = "", label: str = "", forcetype: str = "", **kwargs): + r"""Specifies the complete quadratic mode combination method. - APDL Command: CQC + Mechanical APDL Command: `CQC `_ Parameters ---------- - signif - Combine only those modes whose significance level exceeds the - SIGNIF threshold. For single point, multipoint, or DDAM response - (SPOPT,SPRS, MPRS or DDAM), the significance level of a mode is - defined as the mode coefficient of the mode, divided by the maximum - mode coefficient of all modes. Any mode whose significance level - is less than SIGNIF is considered insignificant and is not - contributed to the mode combinations. The higher the SIGNIF - threshold, the fewer the number of modes combined. SIGNIF defaults - to 0.001. If SIGNIF is specified as 0.0, it is taken as 0.0. - (This mode combination method is not valid for SPOPT,PSD.) - - label + signif : str + Combine only those modes whose significance level exceeds the ``SIGNIF`` threshold. For single + point, multipoint, or DDAM response ( :ref:`spopt`,SPRS, MPRS or DDAM), the significance level + of a mode is defined as the mode coefficient divided by the maximum mode coefficient of all + modes. Any mode whose significance level is less than ``SIGNIF`` is considered insignificant and + is not contributed to the mode combinations. The higher the ``SIGNIF`` threshold, the fewer the + number of modes combined. ``SIGNIF`` defaults to 0.001. If ``SIGNIF`` is specified as 0.0, it is + taken as 0.0. (This mode combination method is not valid for :ref:`spopt`,PSD.) + + label : str Label identifying the combined mode solution output. - DISP - Displacement solution (default). Displacements, stresses, forces, etc., are - available. + * ``DISP`` - Displacement solution (default). Displacements, stresses, forces, etc., are available. - VELO - Velocity solution. Velocities, "stress velocities," "force velocities," etc., - are available. + * ``VELO`` - Velocity solution. Velocities, "stress velocities," "force velocities," etc., are + available. - ACEL - Acceleration solution. Accelerations, "stress accelerations," "force - accelerations," etc., are available. + * ``ACEL`` - Acceleration solution. Accelerations, "stress accelerations," "force accelerations," + etc., are available. - forcetype + forcetype : str Label identifying the forces to be combined: - STATIC - Combine the modal static forces (default). + * ``STATIC`` - Combine the modal static forces (default). - TOTAL - Combine the modal static plus inertial forces. + * ``TOTAL`` - Combine the modal static plus inertial forces. Notes ----- - Damping is required for this mode combination method. The CQC command - is also valid for PREP7. + + .. _CQC_notes: + + Damping is required for this mode combination method. The :ref:`cqc` command is also valid for + PREP7. """ - command = f"CQC,{signif},{label},{forcetype}" + command = f"CQC,{signif},{label},,{forcetype}" return self.run(command, **kwargs) - def ddaspec(self, keyref="", shptyp="", mountloc="", deftyp="", amin="", **kwargs): - """APDL Command: DDASPEC + def ddaspec( + self, + keyref: int | str = "", + shptyp: str = "", + mountloc: str = "", + deftyp: str = "", + amin: str = "", + **kwargs, + ): + r"""Specifies the shock spectrum computation constants for DDAM analysis. - Specifies the shock spectrum computation constants for DDAM analysis. + Mechanical APDL Command: `DDASPEC `_ Parameters ---------- - keyref + keyref : int or str Key for reference catalog: - 1 - The spectrum computation constants are based on NRL-1396 (default). For more - information, see Dynamic Design Analysis Method in the - Mechanical APDL Theory Reference + * ``1`` - The spectrum computation constants are based on NRL-1396 (default). For more information, + see `Dynamic Design Analysis Method + `_ - shptyp + shptyp : str Select the ship type: - SUBM - Submarine + * ``SUBM`` - Submarine - SURF - Surface ship + * ``SURF`` - Surface ship - mountloc + mountloc : str Select the mounting location: - HULL - Hull mounting location. These structures are mounted directly to basic hull - structures like frames, structural bulkheads below the water - line, and shell plating above the water line. + * ``HULL`` - Hull mounting location. These structures are mounted directly to basic hull structures + like frames, structural bulkheads below the water line, and shell plating above the water line. - DECK - Deck mounting location. These structures are mounted directly to decks, non- - structural bulkheads, or to structural bulkheads above the - water line. + * ``DECK`` - Deck mounting location. These structures are mounted directly to decks, non-structural + bulkheads, or to structural bulkheads above the water line. - SHEL - Shell plating mounting location. These structures are mounted directly to shell - plating below the water line without intervening - foundations. + * ``SHEL`` - Shell plating mounting location. These structures are mounted directly to shell plating + below the water line without intervening foundations. - deftyp + deftyp : str Select the deformation type: - ELAS - Elastic deformation (default) + * ``ELAS`` - Elastic deformation (default) - PLAS - Elastic-plastic deformation + * ``PLAS`` - Elastic-plastic deformation - amin - Minimum acceleration value in inch/sec2. It defaults to 2316 - inch/sec2 which equals 6g, where g is the acceleration due to - gravity (g = 386 in/sec2). + amin : str + Minimum acceleration value. It defaults to 6g, where g is the acceleration due to gravity. Notes ----- - The excitation direction is required to calculate the spectrum - coefficients. Issue the SED command before issuing DDASPEC. - ADDAM and VDDAM may alternatively be used to calculate spectrum - coefficients. + .. _DDASPEC_notes: + + The excitation along one of the fore and aft, vertical or athwartship directions is required to + calculate the spectrum coefficients. Issue the :ref:`sed` command before issuing :ref:`ddaspec`. For + example, if you want to apply the excitation along the fore and aft direction, you should specify + ``SEDX`` = 1.0 on :ref:`sed`. Similarly, for excitation along vertical or athwartship direction, + specify ``SEDY`` = 1.0 or ``SEDZ`` = 1.0, respectively, on :ref:`sed`. + + :ref:`addam` and :ref:`vddam` may alternatively be used to calculate spectrum coefficients. + + In order to perform a DDAM spectrum analysis using a units system other than BIN (default), you must + specify the units system complying with the mass and length units of the model using the + :ref:`units` command. Issue the :ref:`units` command before defining the shock spectrum computation + constants ( :ref:`ddaspec` ). The DDASPEC command is not supported with the user-defined units + system ( ``Label`` = USER on :ref:`units` ). This command is also valid in PREP7. """ command = f"DDASPEC,{keyref},{shptyp},{mountloc},{deftyp},{amin}" return self.run(command, **kwargs) - def dsum(self, signif="", label="", td="", forcetype="", **kwargs): - """Specifies the double sum mode combination method. + def dsum( + self, + signif: str = "", + label: str = "", + td: str = "", + forcetype: str = "", + **kwargs, + ): + r"""Specifies the double sum mode combination method. - APDL Command: DSUM + Mechanical APDL Command: `DSUM `_ Parameters ---------- - signif - Combine only those modes whose significance level exceeds the - SIGNIF threshold. For single point, multipoint, or DDAM response - (SPOPT, SPRS, MPRS, or DDAM), the significance level of a mode is - defined as the mode coefficient of the mode, divided by the maximum - mode coefficient of all modes. Any mode whose significance level - is less than SIGNIF is considered insignificant and is not - contributed to the mode combinations. The higher the SIGNIF - threshold, the fewer the number of modes combined. SIGNIF defaults - to 0.001. If SIGNIF is specified as 0.0, it is taken as 0.0. - (This mode combination method is not valid for SPOPT, PSD.) - - label + signif : str + Combine only those modes whose significance level exceeds the ``SIGNIF`` threshold. For single + point, multipoint, or DDAM response ( :ref:`spopt`, SPRS, MPRS, or DDAM), the significance level + of a mode is defined as the mode coefficient divided by the maximum mode coefficient of all + modes. Any mode whose significance level is less than ``SIGNIF`` is considered insignificant and + is not contributed to the mode combinations. The higher the ``SIGNIF`` threshold, the fewer the + number of modes combined. ``SIGNIF`` defaults to 0.001. If ``SIGNIF`` is specified as 0.0, it is + taken as 0.0. (This mode combination method is not valid for :ref:`spopt`, PSD.) + + label : str Label identifying the combined mode solution output. - DISP - Displacement solution (default). Displacements, stresses, forces, etc., are - available. + * ``DISP`` - Displacement solution (default). Displacements, stresses, forces, etc., are available. - VELO - Velocity solution. Velocities, "stress velocities," "force velocities," etc., - are available. + * ``VELO`` - Velocity solution. Velocities, "stress velocities," "force velocities," etc., are + available. - ACEL - Acceleration solution. Accelerations, "stress accelerations," "force - accelerations," etc., are available. + * ``ACEL`` - Acceleration solution. Accelerations, "stress accelerations," "force accelerations," + etc., are available. - td - Time duration for earthquake or shock spectrum. TD defaults to 10. + td : str + Time duration for earthquake or shock spectrum. ``TD`` defaults to 10. - forcetype + forcetype : str Label identifying the forces to be combined: - STATIC - Combine the modal static forces (default). + * ``STATIC`` - Combine the modal static forces (default). - TOTAL - Combine the modal static plus inertial forces. + * ``TOTAL`` - Combine the modal static plus inertial forces. Notes ----- + + .. _DSUM_notes: + This command is also valid for PREP7. """ command = f"DSUM,{signif},{label},{td},{forcetype}" @@ -266,425 +330,408 @@ def dsum(self, signif="", label="", td="", forcetype="", **kwargs): def freq( self, - freq1="", - freq2="", - freq3="", - freq4="", - freq5="", - freq6="", - freq7="", - freq8="", - freq9="", + freq1: str = "", + freq2: str = "", + freq3: str = "", + freq4: str = "", + freq5: str = "", + freq6: str = "", + freq7: str = "", + freq8: str = "", + freq9: str = "", **kwargs, ): - """Defines the frequency points for the SV vs. FREQ tables. + r"""Defines the frequency points for the :ref:`sv` vs. :ref:`freq` tables. - APDL Command: FREQ + Mechanical APDL Command: `FREQ `_ Parameters ---------- - freq1, freq2, freq3, . . . , freq9 - Frequency points for SV vs. FREQ tables. Values must be in - ascending order. FREQ1 should be greater than zero. Units are - cycles/time. + freq1 : str + Frequency points for SV vs. FREQ tables. Values must be in ascending order. ``FREQ1`` should be + greater than zero. Units are cycles/time. + + freq2 : str + Frequency points for SV vs. FREQ tables. Values must be in ascending order. ``FREQ1`` should be + greater than zero. Units are cycles/time. + + freq3 : str + Frequency points for SV vs. FREQ tables. Values must be in ascending order. ``FREQ1`` should be + greater than zero. Units are cycles/time. + + freq4 : str + Frequency points for SV vs. FREQ tables. Values must be in ascending order. ``FREQ1`` should be + greater than zero. Units are cycles/time. + + freq5 : str + Frequency points for SV vs. FREQ tables. Values must be in ascending order. ``FREQ1`` should be + greater than zero. Units are cycles/time. + + freq6 : str + Frequency points for SV vs. FREQ tables. Values must be in ascending order. ``FREQ1`` should be + greater than zero. Units are cycles/time. + + freq7 : str + Frequency points for SV vs. FREQ tables. Values must be in ascending order. ``FREQ1`` should be + greater than zero. Units are cycles/time. + + freq8 : str + Frequency points for SV vs. FREQ tables. Values must be in ascending order. ``FREQ1`` should be + greater than zero. Units are cycles/time. + + freq9 : str + Frequency points for SV vs. FREQ tables. Values must be in ascending order. ``FREQ1`` should be + greater than zero. Units are cycles/time. Notes ----- - Repeat the FREQ command for additional frequency points (100 maximum). - Values are added after the last nonzero frequency. If all fields - (FREQ1 -- FREQ9) are blank, erase SV vs. FREQ tables. + + .. _FREQ_notes: + + Repeat the :ref:`freq` command for additional frequency points (100 maximum). Values are added after + the last nonzero frequency. If all fields ( ``FREQ1`` -- ``FREQ9`` ) are blank, erase SV vs. FREQ + tables. Frequencies must be in ascending order. - Spectral values are input with the SV command and interpreted according - to the SVTYP command. Applies only to the SPRS (single-point) option - of the SPOPT command. See the SPFREQ command for frequency input in - MPRS (multi-point) analysis. + Spectral values are input with the :ref:`sv` command and interpreted according to the :ref:`svtyp` + command. Applies only to the SPRS (single-point) option of the :ref:`spopt` command. See the + :ref:`spfreq` command for frequency input in MPRS (multi-point) analysis. - Use the STAT command to list current frequency points. + Use the :ref:`stat` command to list current frequency points. This command is also valid in PREP7. """ command = f"FREQ,{freq1},{freq2},{freq3},{freq4},{freq5},{freq6},{freq7},{freq8},{freq9}" return self.run(command, **kwargs) - def grp(self, signif="", label="", forcetype="", **kwargs): - """Specifies the grouping mode combination method. + def grp(self, signif: str = "", label: str = "", forcetype: str = "", **kwargs): + r"""Specifies the grouping mode combination method. - APDL Command: GRP + Mechanical APDL Command: `GRP `_ Parameters ---------- - signif - Combine only those modes whose significance level exceeds the - SIGNIF threshold. For single point, multipoint, or DDAM response - (SPOPT,SPRS, MPRS or DDAM), the significance level of a mode is - defined as the mode coefficient of the mode, divided by the maximum - mode coefficient of all modes. Any mode whose significance level - is less than SIGNIF is considered insignificant and is not - contributed to the mode combinations. The higher the SIGNIF - threshold, the fewer the number of modes combined. SIGNIF defaults - to 0.001. If SIGNIF is specified as 0.0, it is taken as 0.0. - (This mode combination method is not valid for SPOPT,PSD.) - - label + signif : str + Combine only those modes whose significance level exceeds the ``SIGNIF`` threshold. For single + point, multipoint, or DDAM response ( :ref:`spopt`,SPRS, MPRS or DDAM), the significance level + of a mode is defined as the mode coefficient divided by the maximum mode coefficient of all + modes. Any mode whose significance level is less than ``SIGNIF`` is considered insignificant and + is not contributed to the mode combinations. The higher the ``SIGNIF`` threshold, the fewer the + number of modes combined. ``SIGNIF`` defaults to 0.001. If ``SIGNIF`` is specified as 0.0, it is + taken as 0.0. (This mode combination method is not valid for :ref:`spopt`,PSD.) + + label : str Label identifying the combined mode solution output. - DISP - Displacement solution (default). Displacements, stresses, forces, etc., are - available. + * ``DISP`` - Displacement solution (default). Displacements, stresses, forces, etc., are available. - VELO - Velocity solution. Velocities, "stress velocities," "force velocities," etc., - are available. + * ``VELO`` - Velocity solution. Velocities, "stress velocities," "force velocities," etc., are + available. - ACEL - Acceleration solution. Accelerations, "stress accelerations," "force - accelerations," etc., are available. + * ``ACEL`` - Acceleration solution. Accelerations, "stress accelerations," "force accelerations," + etc., are available. - forcetype + forcetype : str Label identifying the forces to be combined: - STATIC - Combine the modal static forces (default). + * ``STATIC`` - Combine the modal static forces (default). - TOTAL - Combine the modal static plus inertial forces. + * ``TOTAL`` - Combine the modal static plus inertial forces. Notes ----- - The SIGNIF value set with this command (including the default value of - 0.001) overrides the SIGNIF value set with the MXPAND command. + + .. _GRP_notes: + + The ``SIGNIF`` value set with this command (including the default value of 0.001) overrides the + ``SIGNIF`` value set with the :ref:`mxpand` command. This command is also valid for PREP7. """ - command = f"GRP,{signif},{label},{forcetype}" + command = f"GRP,{signif},{label},,{forcetype}" return self.run(command, **kwargs) - def mmass(self, option="", zpa="", **kwargs): - """Specifies the missing mass response calculation. + def mmass(self, option: str = "", zpa: str = "", **kwargs): + r"""Specifies the missing mass response calculation. - APDL Command: MMASS + Mechanical APDL Command: `MMASS `_ Parameters ---------- - option + option : str Flag to activate or deactivate missing mass response calculation. - 0 (OFF or NO) - Deactivate (default). + * ``0 (OFF or NO)`` - Deactivate (default). - 1 (ON or YES) - Activate. + * ``1 (ON or YES)`` - Activate. - zpa - Zero Period Acceleration Value. If a scale factor FACT is defined - on the SVTYP command, it is applied to this value. + zpa : str + Zero Period Acceleration Value. If a scale factor FACT is defined on the :ref:`svtyp` command, + it is applied to this value. Notes ----- - The missing mass calculation is valid only for single point excitation - response spectrum analysis (SPOPT, SPRS) and for multiple point - response spectrum analysis (SPOPT, MPRS) performed with base excitation - using acceleration response spectrum loading. Missing mass is supported - in a spectrum analysis only when the preceding modal analysis is - performed with the Block Lanczos, PCG Lanczos, Supernode, or Subspace - eigensolver (Method =LANB, LANPCG, SNODE, or SUBSP on the MODOPT - command). - - The velocity solution is not available (Label = VELO on the combination - command: SRSS, CQC...) when the missing mass calculation is activated. - - The missing mass calculation is not supported when the spectrum - analysis is based on a linear perturbation modal analysis performed - after a nonlinear base analysis. + + .. _MMASS_notes: + + The missing mass calculation is valid only for single point excitation response spectrum analysis ( + :ref:`spopt`, SPRS) and for multiple point response spectrum analysis ( :ref:`spopt`, MPRS) + performed with base excitation using acceleration response spectrum loading. Missing mass is + supported in a spectrum analysis only when the preceding modal analysis is performed with the Block + Lanczos, PCG Lanczos, Supernode, or Subspace eigensolver (Method =LANB, LANPCG, SNODE, or SUBSP on + the :ref:`modopt` command). + + The velocity solution is not available ( ``Label`` = VELO on the combination command: :ref:`srss`, + :ref:`cqc`...) when the missing mass calculation is activated. + + The missing mass calculation is not supported when the spectrum analysis is based on a linear + perturbation modal analysis performed after a nonlinear base analysis. The missing mass is not supported when superelements are present. - To take into account the contribution of the truncated modes, the - residual vector (RESVEC) can be used in place of the missing mass - response. This is of particular interest if the velocity solution is - requested or if a nonlinear prestress is included in the analysis - (linear perturbation), or if a superelement is present, since the - missing mass cannot be used in these cases. + To take into account the contribution of the truncated modes, the residual vector ( :ref:`resvec` ) + can be used in place of the missing mass response. This is of particular interest if the velocity + solution is requested or if a nonlinear prestress is included in the analysis (linear perturbation), + or if a superelement is present, since the missing mass cannot be used in these cases. - In a multiple point response spectrum analysis (SPOPT,MPRS), the MMASS - command must precede the participation factor calculation command - (PFACT). + In a multiple point response spectrum analysis ( :ref:`spopt`,MPRS), the :ref:`mmass` command must + precede the participation factor calculation command ( :ref:`pfact` ). This command is also valid in PREP7. + + * `Performing a Single-Point Response Spectrum (SPRS) Analysis + `_ + * `Performing a Multi-Point Response Spectrum (MPRS) Analysis + `_ + * `Missing-Mass Response + `_ + * :ref:`rigresp` command """ command = f"MMASS,{option},{zpa}" return self.run(command, **kwargs) - def nrlsum(self, signif="", label="", labelcsm="", forcetype="", **kwargs): - """Specifies the Naval Research Laboratory (NRL) sum mode combination + def nrlsum( + self, + signif: str = "", + label: str = "", + labelcsm: str = "", + forcetype: str = "", + **kwargs, + ): + r"""Specifies the Naval Research Laboratory (NRL) sum mode combination method. - APDL Command: NRLSUM - method. + Mechanical APDL Command: `NRLSUM `_ Parameters ---------- - signif - Combine only those modes whose significance level exceeds the - SIGNIF threshold. For single point, multipoint, or DDAM response - (SPOPT,SPRS, MPRS or DDAM), the significance level of a mode is - defined as the mode coefficient of the mode, divided by the maximum - mode coefficient of all modes. Any mode whose significance level is - less than SIGNIF is considered insignificant and is not contributed - to the mode combinations. The higher the SIGNIF threshold, the - fewer the number of modes combined. SIGNIF defaults to 0.001. If - SIGNIF is specified as 0.0, it is taken as 0.0. (This mode - combination method is not valid for SPOPT,PSD.) - - label + signif : str + Combine only those modes whose significance level exceeds the ``SIGNIF`` threshold. For single + point, multipoint, or DDAM response ( :ref:`spopt`,SPRS, MPRS or DDAM), the significance level + of a mode is defined as the mode coefficient divided by the maximum mode coefficient of all + modes. Any mode whose significance level is less than ``SIGNIF`` is considered insignificant and + is not contributed to the mode combinations. The higher the ``SIGNIF`` threshold, the fewer the + number of modes combined. ``SIGNIF`` defaults to 0.001. If ``SIGNIF`` is specified as 0.0, it is + taken as 0.0. (This mode combination method is not valid for :ref:`spopt`,PSD.) + + label : str Label identifying the combined mode solution output. - DISP - Displacement solution (default). Displacements, stresses, forces, etc., are - available. + * ``DISP`` - Displacement solution (default). Displacements, stresses, forces, etc., are available. - VELO - Velocity solution. Velocities, "stress velocities," "force velocities," etc., - are available. + * ``VELO`` - Velocity solution. Velocities, "stress velocities," "force velocities," etc., are + available. - ACEL - Acceleration solution. Accelerations, "stress accelerations," "force - accelerations," etc., are available. + * ``ACEL`` - Acceleration solution. Accelerations, "stress accelerations," "force accelerations," + etc., are available. - labelcsm + labelcsm : str Label identifying the CSM (Closely Spaced Modes) method. - CSM - Use the CSM method. + * ``CSM`` - Use the CSM method. - Blank - Do not use the CSM method (default). + * ```` - Do not use the CSM method (default). - forcetype + forcetype : str Label identifying the forces to be combined: - STATIC - Combine the modal static forces (default). + * ``STATIC`` - Combine the modal static forces (default). - TOTAL - Combine the modal static plus inertial forces. + * ``TOTAL`` - Combine the modal static plus inertial forces. Notes ----- - This command is also valid in PREP7. This mode combination method is - usually used for SPOPT,DDAM. - - This CSM method is only applicable in a DDAM analysis (SPOPT,DDAM). The - CSM method combines two closely spaced modes into one mode when their - frequencies are within 10 percent of the common mean frequency and - their responses are opposite in sign. The contribution of these closely - spaced modes is then included in the NRL sum as a single effective - mode. Refer to Closely Spaced Modes (CSM) Method in the Mechanical APDL - Theory Reference for more information. - - NRLSUM is not allowed in ANSYS Professional. + + .. _NRLSUM_notes: + + This command is also valid in PREP7. This mode combination method is usually used for + :ref:`spopt`,DDAM. + + This CSM method is only applicable in a DDAM analysis ( :ref:`spopt`, ``DDAM`` ). Element results + calculation based on modal element results ( ``Elcalc`` on :ref:`spopt` ) is not supported and is + automatically reset for this method. The CSM method combines two closely spaced modes into one mode + when their frequencies are within 10 percent of the common mean frequency and their responses are + opposite in sign. The contribution of these closely spaced modes is then included in the NRL sum as + a single effective mode. Refer to `Closely Spaced Modes (CSM) Method + `_ """ command = f"NRLSUM,{signif},{label},{labelcsm},{forcetype}" return self.run(command, **kwargs) - def pfact(self, tblno="", excit="", parcor="", **kwargs): - """Calculates participation factors for the PSD or multi-point response + def pfact(self, tblno: str = "", excit: str = "", parcor: str = "", **kwargs): + r"""Calculates participation factors for the PSD or multi-point response spectrum table. - APDL Command: PFACT - spectrum table. + Mechanical APDL Command: `PFACT `_ Parameters ---------- - tblno - Input PSD (Power Spectral Density) table number for which - participation factors are to be calculated. + tblno : str + Input PSD (Power Spectral Density) table number for which participation factors are to be + calculated. - excit + excit : str Label defining the location of excitation: - BASE - Base excitation (default). + * ``BASE`` - Base excitation (default). - NODE - Nodal excitation. + * ``NODE`` - Nodal excitation. - parcor - Label defining excitation type (applies only to SPOPT,PSD - analysis). Used only when partially correlated excitation is due - to wave propagation or spatial correlation. Defaults to partially - correlated excitation as defined by COVAL and QDVAL commands. + parcor : str + Label defining excitation type (applies only to :ref:`spopt`,PSD analysis). Used only when partially correlated excitation is due to wave propagation or spatial correlation. Defaults to partially correlated excitation as defined by :ref:`coval` and :ref:`qdval` commands. - WAVE - Excitation defined by PSDWAV command. + * ``WAVE`` - Excitation defined by :ref:`psdwav` command. - SPAT - Excitation defined by PSDSPL command. + * ``SPAT`` - Excitation defined by :ref:`psdspl` command. Notes ----- - Calculates the participation factors for a particular PSD or multi- - point response spectrum table defined with the PSDVAL or SPVAL command. - The Jobname.DB file must contain modal solution data in order for this - command to calculate the participation factor. There must be a PFACT - command for each excitation spectrum. You are limited to 300 - excitations. - - This command is also valid in PREP7. - """ - command = f"PFACT,{tblno},{excit},{parcor}" - return self.run(command, **kwargs) - - def pivcheck(self, key="", prntcntrl="", **kwargs): - """Controls the behavior of an analysis when a negative or zero equation solver pivot value is encountered. - APDL Command: PIVCHECK - - Parameters - ---------- - key - Determines whether to stop or continue an analysis when a negative - or zero equation solver pivot value is encountered: - - AUTO - Check for negative or zero pivot values for analyses - performed with the sparse and PCG solvers. When one is - encountered, an error or warning is issued, per various - criteria relating to the type of analysis being - solved. An error causes the analysis to stop; a warning - allows the analysis to continue. A negative pivot value - may be valid for some nonlinear and multiphysics - analyses (for example, electromagnetic and thermal - analyses); this key has no effect in these cases. - - ERROR - Check for negative or zero pivot values for analyses - performed with the sparse and PCG solvers. When one is - encountered, an error is issued, stopping the - analysis. A negative pivot value may be valid for some - nonlinear and multiphysics analyses (for example, - electromagnetic and thermal analyses); this key has no - effect in these cases. - - WARN - Check for negative or zero pivot values for analyses - performed with the sparse and PCG solvers. When one is - encountered, a warning is issued and the analysis - continues. A negative pivot value may be valid for some - nonlinear and multiphysics analyses (for example, - electromagnetic and thermal analyses); this key has no - effect in these cases. - - OFF - Pivot values are not checked. This key causes the - analysis to continue in spite of a negative or zero - pivot value. - - prntcntrl - Provides print options. Print output with these options will be - sent to the default output file, not to the files created by the - nonlinear diagnostic tools (NLDIAG). - - ONCE - Print only the maximum and minimum pivot information on - the first call to the sparse solver (which is the - default solver). This is the default behavior. - - EVERY - Print the maximum and minimum pivot information at - every call to the sparse solver. This option is - provided for nonlinear analysis diagnostics. + .. _PFACT_notes: - Notes - ----- - This command is valid for all analyses. In a nonlinear analysis, a - negative pivot may be valid. In some cases, rigid body motions in - a nonlinear analysis will be trapped by error routines checking - infinitely large displacements (DOF limit exceeded) or - nonconvergence status. An under-constrained model may avoid the - pivot check, but fail with a DOF limit exceeded error. - - Machine precision may affect whether a small pivot triggers an - error or bypasses this checking logic. You may wish to review the - ratio of the maximum to absolute minimum pivot values. For ratios - exceeding 12 to 14 orders of magnitude, the accuracy of the - computed solution may be degraded by the severe ill-conditioning - of the assembled matrix. - - Note that negative pivots corresponding to Lagrange multiplier - based mixed u-P elements are not checked or reported by this - command. Negative pivots arising from the u-P element formulation - and related analyses can occur and lead to correct solutions. + Calculates the participation factors for a particular PSD or multi-point response spectrum table + defined with the :ref:`psdval` or :ref:`spval` command. The :file:`Jobname.DB` file must contain + modal solution data in order for this command to calculate the participation factor. There must be a + :ref:`pfact` command for each excitation spectrum. You are limited to 300 excitations. This command is also valid in PREP7. """ - command = f"PIVCHECK,{key},{prntcntrl}" + command = f"PFACT,{tblno},{excit},{parcor}" return self.run(command, **kwargs) - def psdcom(self, signif="", comode="", forcetype="", **kwargs): - """Specifies the power spectral density mode combination method. + def psdcom(self, signif: str = "", comode: str = "", forcetype: str = "", **kwargs): + r"""Specifies the power spectral density mode combination method. - APDL Command: PSDCOM + Mechanical APDL Command: `PSDCOM `_ Parameters ---------- - signif - Combine only those modes whose significance level exceeds theSIGNIF - threshold. For PSD response (SPOPT,PSD), the significance level is - defined as the modal covariance matrix term, divided by the maximum - modal covariance matrix term. Any term whose significance level is - less than SIGNIF is considered insignificant and is not contributed - to the mode combinations. The higher the SIGNIF threshold, the - fewer the number of terms used. SIGNIF defaults to 0.0001. If - SIGNIF is specified as 0.0, it is taken as 0.0. - - comode - First COMODE number of modes to be actually combined. COMODE must - always be less than or equal to NMODE (input quantity NMODE on the - SPOPT command). COMODE defaults to NMODE. COMODE performs a - second level of control for the first sequential COMODE number of - modes to be combined. It uses the significance level threshold - indicated by SIGNIF and operates only on the significant modes. - - forcetype + signif : str + Combine only those modes whose significance level exceeds the ``SIGNIF`` threshold. For PSD + response ( :ref:`spopt`,PSD), the significance level is defined as the modal covariance matrix + term, divided by the maximum modal covariance matrix term. Any term whose significance level is + less than ``SIGNIF`` is considered insignificant and is not contributed to the mode + combinations. The higher the ``SIGNIF`` threshold, the fewer the number of terms used. + ``SIGNIF`` defaults to 0.0001. If ``SIGNIF`` is specified as 0.0, it is taken as 0.0. + + comode : str + First ``COMODE`` number of modes to be actually combined. ``COMODE`` must always be less than or + equal to ``NMODE`` (input quantity ``NMODE`` on the :ref:`spopt` command). ``COMODE`` defaults + to ``NMODE``. ``COMODE`` performs a second level of control for the first sequential ``COMODE`` + number of modes to be combined. It uses the significance level threshold indicated by ``SIGNIF`` + and operates only on the significant modes. + + forcetype : str Label identifying the forces to be combined: - STATIC - Combine the modal static forces (default). + * ``STATIC`` - Combine the modal static forces (default). - TOTAL - Combine the modal static plus inertial forces. + * ``TOTAL`` - Combine the modal static plus inertial forces. Notes ----- - This command is also valid for PREP7. This command is valid only for - SPOPT,PSD. - PSDCOM is not allowed in ANSYS Professional. + .. _PSDCOM_notes: + + This command is also valid for PREP7. This command is valid only for :ref:`spopt`,PSD. """ - command = f"PSDCOM,{signif},{comode},{forcetype}" + command = f"PSDCOM,{signif},{comode},,{forcetype}" return self.run(command, **kwargs) def psdfrq( self, - tblno1="", - tblno2="", - freq1="", - freq2="", - freq3="", - freq4="", - freq5="", - freq6="", - freq7="", + tblno1: str = "", + tblno2: str = "", + freq1: str = "", + freq2: str = "", + freq3: str = "", + freq4: str = "", + freq5: str = "", + freq6: str = "", + freq7: str = "", **kwargs, ): - """Defines the frequency points for the input spectrum tables PSDVAL vs. + r"""Defines the frequency points for the input spectrum tables PSDVAL vs. PSDFRQ for PSD analysis. - APDL Command: PSDFRQ - PSDFRQ for PSD analysis. + Mechanical APDL Command: `PSDFRQ `_ Parameters ---------- - tblno1 - Input table number. When used with the COVAL or the QDVAL command, - TBLNO1 represents the row number of this table. Up to 200 tables - may be defined. - - tblno2 - Input table number. TBLNO2 is used only for the COVAL or the QDVAL - commands and represents the column number of this table. - - freq1, freq2, freq3, . . . , freq7 - Frequency points (cycles/time) for spectrum vs. frequency tables. - FREQ1 should be greater than zero, and values must be in ascending - order. Log-log interpolation will be used between frequency - points. + tblno1 : str + Input table number. When used with the :ref:`coval` or the :ref:`qdval` command, ``TBLNO1`` + represents the row number of this table. Up to 200 tables may be defined. + + tblno2 : str + Input table number. ``TBLNO2`` is used only for the :ref:`coval` or the :ref:`qdval` commands + and represents the column number of this table. + + freq1 : str + Frequency points (cycles/time) for spectrum vs. frequency tables. ``FREQ1`` should be greater + than zero, and values must be in ascending order. Log-log interpolation will be used between + frequency points. + + freq2 : str + Frequency points (cycles/time) for spectrum vs. frequency tables. ``FREQ1`` should be greater + than zero, and values must be in ascending order. Log-log interpolation will be used between + frequency points. + + freq3 : str + Frequency points (cycles/time) for spectrum vs. frequency tables. ``FREQ1`` should be greater + than zero, and values must be in ascending order. Log-log interpolation will be used between + frequency points. + + freq4 : str + Frequency points (cycles/time) for spectrum vs. frequency tables. ``FREQ1`` should be greater + than zero, and values must be in ascending order. Log-log interpolation will be used between + frequency points. + + freq5 : str + Frequency points (cycles/time) for spectrum vs. frequency tables. ``FREQ1`` should be greater + than zero, and values must be in ascending order. Log-log interpolation will be used between + frequency points. + + freq6 : str + Frequency points (cycles/time) for spectrum vs. frequency tables. ``FREQ1`` should be greater + than zero, and values must be in ascending order. Log-log interpolation will be used between + frequency points. + + freq7 : str + Frequency points (cycles/time) for spectrum vs. frequency tables. ``FREQ1`` should be greater + than zero, and values must be in ascending order. Log-log interpolation will be used between + frequency points. Notes ----- - The spectrum values may be input with the PSDVAL, COVAL , or QDVAL - commands. A separate PSDFRQ command must be used for each table and - cross table defined. Frequencies must be in ascending order. - - Repeat PSDFRQ command for additional frequency points. Values are - added after the last nonzero frequency. If all fields after PSDFRQ are - blank, all input vs. frequency tables are erased. If TBLNO1 is - nonblank, all corresponding PSDVAL tables are erased. If both TBLNO1 - and TBLNO2 are nonblank, all corresponding COVAL and QDVAL tables are + + .. _PSDFRQ_notes: + + The spectrum values may be input with the :ref:`psdval`, :ref:`coval`, or :ref:`qdval` commands. A + separate :ref:`psdfrq` command must be used for each table and cross table defined. Frequencies must + be in ascending order. + + Repeat :ref:`psdfrq` command for additional frequency points. Values are added after the last + nonzero frequency. If all fields after :ref:`psdfrq` are blank, all input vs. frequency tables are + erased. If ``TBLNO1`` is nonblank, all corresponding :ref:`psdval` tables are erased. If both + ``TBLNO1`` and ``TBLNO2`` are nonblank, all corresponding :ref:`coval` and :ref:`qdval` tables are erased. This command is also valid in PREP7. @@ -692,167 +739,185 @@ def psdfrq( command = f"PSDFRQ,{tblno1},{tblno2},{freq1},{freq2},{freq3},{freq4},{freq5},{freq6},{freq7}" return self.run(command, **kwargs) - def psdgraph(self, tblno1="", tblno2="", displaykey="", **kwargs): - """Displays input PSD curves + def psdgraph( + self, tblno1: str = "", tblno2: str = "", displaykey: int | str = "", **kwargs + ): + r"""Displays input PSD curves. - APDL Command: PSDGRAPH + Mechanical APDL Command: `PSDGRAPH `_ Parameters ---------- - tblno1 + tblno1 : str PSD table number to display. - tblno2 - Second PSD table number to display. TBLNO2 is used only in - conjunction with the COVAL or the QDVAL commands. + tblno2 : str + Second PSD table number to display. ``TBLNO2`` is used only in conjunction with the :ref:`coval` + or the :ref:`qdval` commands. - displaykey + displaykey : int or str Key to display the points markers and numbering: - 0 - Display points markers and numbering (default). - 1 - Display points numbering only. - 2 - Display points markers only. - 3 - No points markers or numbering. + * ``0`` - Display points markers and numbering (default). + + * ``1`` - Display points numbering only. + + * ``2`` - Display points markers only. + + * ``3`` - No points markers or numbering. Notes ----- - The input PSD tables are displayed in log-log format as dotted lines. - The best-fit curves, used to perform the closed-form integration, are - displayed as solid lines. If there is a significant discrepancy between - the two, then you should add one or more intermediate points to the - table to obtain a better fit. - - If TBLNO2 is zero, blank, or equal to TBLNO1, then the autospectra - (PSDVAL) are displayed for TBLNO1. If TBLNO2 is also specified, then - the autospectra for TBLNO1 and TBLNO2 are displayed, along with the - corresponding cospectra (COVAL) and quadspectra (QDVAL), if they are - defined. + + .. _PSDGRAPH_notes: + + The input PSD tables are displayed in log-log format as dotted lines. The best-fit curves, used to + perform the closed-form integration, are displayed as solid lines. If there is a significant + discrepancy between the two, then you should add one or more intermediate points to the table to + obtain a better fit. + + If ``TBLNO2`` is zero, blank, or equal to ``TBLNO1``, then the autospectra ( :ref:`psdval` ) are + displayed for ``TBLNO1``. If ``TBLNO2`` is also specified, then the autospectra for ``TBLNO1`` and + ``TBLNO2`` are displayed, along with the corresponding cospectra ( :ref:`coval` ) and quadspectra ( + :ref:`qdval` ), if they are defined. This command is valid in any processor. """ command = f"PSDGRAPH,{tblno1},{tblno2},{displaykey}" return self.run(command, **kwargs) - def psdres(self, lab="", relkey="", **kwargs): - """Controls solution output written to the results file from a PSD + def psdres(self, lab: str = "", relkey: str = "", **kwargs): + r"""Controls solution output written to the results file from a PSD analysis. - APDL Command: PSDRES - analysis. + Mechanical APDL Command: `PSDRES `_ + + **Command default:** + + .. _PSDRES_default: + + Relative displacement solution, no velocity or acceleration solution for 1 σ results. Parameters ---------- - lab + lab : str Label identifying the solution output: - DISP - Displacement solution (default). One-sigma displacements, stresses, forces, - etc. Written as load step 3 on File.RST. + * ``DISP`` - Displacement solution (default). One-sigma displacements, stresses, forces, etc. + Written as load step 3 on :file:`FileRST`. - VELO - Velocity solution. One-sigma velocities, "stress velocities," "force - velocities," etc. Written as load step 4 of File.RST. + * ``VELO`` - Velocity solution. One-sigma velocities, "stress velocities," "force velocities," etc. + Written as load step 4 of :file:`FileRST`. - ACEL - Acceleration solution. One-sigma accelerations, "stress accelerations," "force - accelerations," etc. Written as load step 5 on File.RST. + * ``ACEL`` - Acceleration solution. One-sigma accelerations, "stress accelerations," "force + accelerations," etc. Written as load step 5 on :file:`FileRST`. - relkey + relkey : str Key defining relative or absolute calculations: - REL - Calculations are relative to the base excitation (default). + * ``REL`` - Calculations are relative to the base excitation (default). - ABS - Calculations are absolute. + * ``ABS`` - Calculations are absolute. - OFF - No calculation of solution output identified by Lab. + * ``OFF`` - No calculation of solution output identified by ``Lab``. Notes ----- - Controls the amount and form of solution output written to the results - file from a PSD analysis. One-sigma values of the relative or absolute - displacement solution, relative or absolute velocity solution, relative - or absolute acceleration solution, or any combination may be included - on the results file. - This command is also valid in PREP7. + .. _PSDRES_notes: + - Distributed ANSYS Restriction: This command is not supported in - Distributed ANSYS. + Controls the amount and form of solution output written to the results file from a PSD analysis. + One-sigma values of the relative or absolute displacement solution, relative or absolute velocity + solution, relative or absolute acceleration solution, or any combination may be included on the + results file. + + This command is also valid in PREP7. """ command = f"PSDRES,{lab},{relkey}" return self.run(command, **kwargs) - def psdspl(self, tblno="", rmin="", rmax="", **kwargs): - """Defines a partially correlated excitation in a PSD analysis. + def psdspl(self, tblno: str = "", rmin: str = "", rmax: str = "", **kwargs): + r"""Defines a partially correlated excitation in a PSD analysis. - APDL Command: PSDSPL + Mechanical APDL Command: `PSDSPL `_ Parameters ---------- - tblno - Input PSD table number defined with PSDVAL command. + tblno : str + Input PSD table number defined with :ref:`psdval` command. - rmin - Minimum distance between excitation points which are partially - correlated. Excited nodes closer than RMIN will be fully - correlated. + rmin : str + Minimum distance between excitation points which are partially correlated. Excited nodes closer + than ``RMIN`` will be fully correlated. - rmax - Maximum distance between excitation points which are partially - correlated. Excited nodes farther apart than RMAX will be - uncorrelated. + rmax : str + Maximum distance between excitation points which are partially correlated. Excited nodes farther + apart than ``RMAX`` will be uncorrelated. Notes ----- - Defines a partially correlated excitation in terms of a sphere of - influence relating excitation point geometry (in a PSD analysis). If - the distance between any two excitation points is less than RMIN, then - the excitation is fully correlated. If the distance is greater than - RMAX, then the excitation is uncorrelated. If the distance lies - between RMIN and RMAX, then the excitation is partially correlated with - the degree of correlation dependent on the separation distance between - the points. This command is not available for a pressure PSD analysis. + + .. _PSDSPL_notes: + + Notes + Defines a partially correlated excitation in terms of a sphere of influence relating excitation + point geometry (in a PSD analysis). If the distance between any two excitation points is less than + ``RMIN``, then the excitation is fully correlated. If the distance is greater than ``RMAX``, then + the excitation is uncorrelated. If the distance lies between ``RMIN`` and ``RMAX``, then the + excitation is partially correlated with the degree of correlation dependent on the separation + distance between the points. This command is not available for a pressure PSD analysis. This command is also valid in PREP7. """ command = f"PSDSPL,{tblno},{rmin},{rmax}" return self.run(command, **kwargs) - def psdunit(self, tblno="", type_="", gvalue="", **kwargs): - """Defines the type of input PSD. + def psdunit(self, tblno: str = "", type_: str = "", gvalue: str = "", **kwargs): + r"""Defines the type of input PSD. + + Mechanical APDL Command: `PSDUNIT `_ + + **Command default:** - APDL Command: PSDUNIT + .. _PSDUNIT_default: + + Acceleration (ACEL) spectrum (acceleration :sup:`2` /Hz). Parameters ---------- - tblno + tblno : str Input table number. - type\\_ + type_ : str Label identifying the type of spectrum: - DISP - Displacement spectrum (in terms of displacement2/Hz ). + * ``DISP`` - Displacement spectrum (in terms of displacement :sup:`2` /Hz ). - VELO - Velocity spectrum (in terms of velocity2/Hz ). + * ``VELO`` - Velocity spectrum (in terms of velocity :sup:`2` /Hz ). - ACEL - Acceleration spectrum (in terms of acceleration2/Hz ). + * ``ACEL`` - Acceleration spectrum (in terms of acceleration :sup:`2` /Hz ). - ACCG - Acceleration spectrum (in terms of g2/Hz ). + * ``ACCG`` - Acceleration spectrum (in terms of g :sup:`2` /Hz ). - FORC - Force spectrum (in terms of force2/Hz ). + * ``FORC`` - Force spectrum (in terms of force :sup:`2` /Hz ). - PRES - Pressure spectrum (in terms of pressure2/Hz ). + * ``PRES`` - Pressure spectrum (in terms of pressure :sup:`2` /Hz ). - gvalue - Value of acceleration due to gravity in any arbitrary units for - Type=ACCG. Default is 386.4 in/sec2. + gvalue : str + Value of acceleration due to gravity in any arbitrary units for Type=ACCG. Default is 386.4 + in/sec :sup:`2`. Notes ----- - Defines the type of PSD defined by the PSDVAL, COVAL, and QDVAL - commands. - Force (FORC) and pressure (PRES) type spectra can be used only as a - nodal excitation. + .. _PSDUNIT_notes: + + Defines the type of PSD defined by the :ref:`psdval`, :ref:`coval`, and :ref:`qdval` commands. + + Force (FORC) and pressure (PRES) type spectra can be used only as a nodal excitation. - GVALUE is valid only when type ACCG is specified. A zero or negative - value cannot be used. A parameter substitution can also be performed. + ``GVALUE`` is valid only when type ACCG is specified. A zero or negative value cannot be used. A + parameter substitution can also be performed. This command is also valid in PREP7. """ @@ -861,66 +926,96 @@ def psdunit(self, tblno="", type_="", gvalue="", **kwargs): def psdval( self, - tblno="", - sv1="", - sv2="", - sv3="", - sv4="", - sv5="", - sv6="", - sv7="", + tblno: str = "", + sv1: str = "", + sv2: str = "", + sv3: str = "", + sv4: str = "", + sv5: str = "", + sv6: str = "", + sv7: str = "", **kwargs, ): - """Defines PSD values. + r"""Defines PSD values. - APDL Command: PSDVAL + Mechanical APDL Command: `PSDVAL `_ Parameters ---------- - tblno + tblno : str Input table number being defined. - sv1, sv2, sv3, . . . , sv7 - Spectral values corresponding to the frequency points [PSDFRQ]. - Values are interpreted as defined with the PSDUNIT command. + sv1 : str + Spectral values corresponding to the frequency points ( :ref:`psdfrq` ). Values are interpreted + as defined with the :ref:`psdunit` command. + + sv2 : str + Spectral values corresponding to the frequency points ( :ref:`psdfrq` ). Values are interpreted + as defined with the :ref:`psdunit` command. + + sv3 : str + Spectral values corresponding to the frequency points ( :ref:`psdfrq` ). Values are interpreted + as defined with the :ref:`psdunit` command. + + sv4 : str + Spectral values corresponding to the frequency points ( :ref:`psdfrq` ). Values are interpreted + as defined with the :ref:`psdunit` command. + + sv5 : str + Spectral values corresponding to the frequency points ( :ref:`psdfrq` ). Values are interpreted + as defined with the :ref:`psdunit` command. + + sv6 : str + Spectral values corresponding to the frequency points ( :ref:`psdfrq` ). Values are interpreted + as defined with the :ref:`psdunit` command. + + sv7 : str + Spectral values corresponding to the frequency points ( :ref:`psdfrq` ). Values are interpreted + as defined with the :ref:`psdunit` command. Notes ----- - Defines PSD values to be associated with the previously defined - frequency points. - Repeat PSDVAL command for additional values, up to the number of - frequency points [PSDFRQ]. Values are added after the last nonzero - value. + .. _PSDVAL_notes: + + Defines PSD values to be associated with the previously defined frequency points. + + Repeat :ref:`psdval` command for additional values, up to the number of frequency points ( + :ref:`psdfrq` ). Values are added after the last nonzero value. This command is also valid in PREP7. """ command = f"PSDVAL,{tblno},{sv1},{sv2},{sv3},{sv4},{sv5},{sv6},{sv7}" return self.run(command, **kwargs) - def psdwav(self, tblno="", vx="", vy="", vz="", **kwargs): - """Defines a wave propagation excitation in a PSD analysis. + def psdwav( + self, tblno: str = "", vx: str = "", vy: str = "", vz: str = "", **kwargs + ): + r"""Defines a wave propagation excitation in a PSD analysis. - APDL Command: PSDWAV + Mechanical APDL Command: `PSDWAV `_ Parameters ---------- - tblno - Input PSD table number defined with PSDVAL command. + tblno : str + Input PSD table number defined with :ref:`psdval` command. - vx + vx : str Global Cartesian X-velocity of traveling wave. - vy + vy : str Global Cartesian Y-velocity of traveling wave. - vz + vz : str Global Cartesian Z-velocity of traveling wave. Notes ----- - Defines a traveling wave in a PSD analysis. This command is not - available for a pressure PSD analysis. + + .. _PSDWAV_notes: + + Defines a traveling wave in a PSD analysis. This command is not available for a pressure PSD + analysis. This command is also valid in PREP7. """ @@ -929,458 +1024,588 @@ def psdwav(self, tblno="", vx="", vy="", vz="", **kwargs): def qdval( self, - tblno1="", - tblno2="", - sv1="", - sv2="", - sv3="", - sv4="", - sv5="", - sv6="", - sv7="", + tblno1: str = "", + tblno2: str = "", + sv1: str = "", + sv2: str = "", + sv3: str = "", + sv4: str = "", + sv5: str = "", + sv6: str = "", + sv7: str = "", **kwargs, ): - """Defines PSD quadspectral values. + r"""Defines PSD quadspectral values. - APDL Command: QDVAL + Mechanical APDL Command: `QDVAL `_ Parameters ---------- - tblno1 + tblno1 : str First input PSD table number associated with this spectrum. - tblno2 + tblno2 : str Second input PSD table number associated with this spectrum. - sv1, sv2, sv3, . . . , sv7 - PSD quadspectral values corresponding to the frequency points - [PSDFRQ]. + sv1 : str + PSD quadspectral values corresponding to the frequency points ( :ref:`psdfrq` ). + + sv2 : str + PSD quadspectral values corresponding to the frequency points ( :ref:`psdfrq` ). + + sv3 : str + PSD quadspectral values corresponding to the frequency points ( :ref:`psdfrq` ). + + sv4 : str + PSD quadspectral values corresponding to the frequency points ( :ref:`psdfrq` ). + + sv5 : str + PSD quadspectral values corresponding to the frequency points ( :ref:`psdfrq` ). + + sv6 : str + PSD quadspectral values corresponding to the frequency points ( :ref:`psdfrq` ). + + sv7 : str + PSD quadspectral values corresponding to the frequency points ( :ref:`psdfrq` ). Notes ----- - Defines PSD quadspectral values to be associated with the previously - defined frequency points. Repeat QDVAL command with the same table - number for additional points. Unlike autospectra [PSDVAL], the - quadspectra can be positive or negative. The quadspectral curve - segment where there is a sign change is interpolated linearly (the rest - of the curve segments use log-log interpolation). For better accuracy, - choose as small a curve segment as possible wherever a sign change - occurs. - - Two table numbers are required since values are off-diagonal terms. - This command is valid for SPOPT,PSD only. - This command is also valid in PREP7. + .. _QDVAL_notes: + + Defines PSD quadspectral values to be associated with the previously defined frequency points. + Repeat :ref:`qdval` command with the same table number for additional points. Unlike autospectra ( + :ref:`psdval` ), the quadspectra can be positive or negative. The quadspectral curve segment where + there is a sign change is interpolated linearly (the rest of the curve segments use log-log + interpolation). For better accuracy, choose as small a curve segment as possible wherever a sign + change occurs. - Distributed ANSYS Restriction: This command is not supported in - Distributed ANSYS. + Two table numbers are required since values are off-diagonal terms. This command is valid for + :ref:`spopt`,PSD only. + + This command is also valid in PREP7. """ command = f"QDVAL,{tblno1},{tblno2},{sv1},{sv2},{sv3},{sv4},{sv5},{sv6},{sv7}" return self.run(command, **kwargs) - def rock(self, cgx="", cgy="", cgz="", omx="", omy="", omz="", **kwargs): - """Specifies a rocking response spectrum. + def rigresp( + self, + option: str = "", + method: str = "", + val1: str = "", + val2: str = "", + **kwargs, + ): + r"""Specifies the rigid response calculation. - APDL Command: ROCK + Mechanical APDL Command: `RIGRESP `_ Parameters ---------- - cgx, cgy, cgz - Global Cartesian X, Y, and Z location of center of rotation about - which rocking occurs. + option : str + Flag to activate or deactivate the rigid response calculation: - omx, omy, omz - Global Cartesian angular velocity components associated with the - rocking. + * ``1 (ON or YES)`` - Activate. + + * ``2 (OFF or NO)`` - Deactivate. This value is the default. + + method : str + Method used to calculate the rigid response: + + * ``GUPTA`` - Gupta method. + + * ``LINDLEY`` - Lindley-Yow method. + + val1 : str + If ``Method`` = GUPTA, ``Val1`` represents the frequency F:sub:`1` in Hertz. + + If ``Method`` = LINDLEY, ``Val1`` is the Zero Period Acceleration (ZPA). If a scale factor is + defined (FACT in the :ref:`svtyp` command), it is used to scale this value + + val2 : str + If ``Method`` = GUPTA, ``Val2`` represents the frequency F:sub:`2` in Hertz. Notes ----- - Specifies a rocking response spectrum effect in the spectrum - (ANTYPE,SPECTR) analysis. - The excitation direction with rocking included is not normalized to - one; rather, it scales the spectrum. For more information, see - Participation Factors and Mode Coefficients. + .. _RIGRESP_notes: + + This rigid response calculation is only valid for single point response spectrum analysis ( + :ref:`spopt`, SPRS) and multiple point response spectrum analysis ( :ref:`spopt`, MPRS) with + combination methods ( :ref:`srss` ), complete quadratic ( :ref:`cqc` ) or Rosenblueth ( :ref:`rose` + ) This command is also valid in PREP7. + + * `Performing a Single-Point Response Spectrum (SPRS) Analysis + `_ + * `Performing a Multi-Point Response Spectrum (MPRS) Analysis + `_ + * `Rigid Responses + `_ + in the `Mechanical APDL Theory Reference `_ + * :ref:`mmass` command """ - command = f"ROCK,{cgx},{cgy},{cgz},{omx},{omy},{omz}" + command = f"RIGRESP,{option},{method},{val1},{val2}" return self.run(command, **kwargs) - def rose(self, signif="", label="", td="", forcetype="", **kwargs): - """Specifies the Rosenblueth mode combination method. + def rock( + self, + cgx: str = "", + cgy: str = "", + cgz: str = "", + omx: str = "", + omy: str = "", + omz: str = "", + **kwargs, + ): + r"""Specifies a rocking response spectrum. - APDL Command: ROSE + Mechanical APDL Command: `ROCK `_ Parameters ---------- - signif - Combine only those modes whose significance level exceeds the - SIGNIF threshold. For single point, multipoint, or DDAM response - (SPOPT, SPRS, MPRS, or DDAM), the significance level of a mode is - defined as the mode coefficient of the mode, divided by the maximum - mode coefficient of all modes. Any mode whose significance level is - less than SIGNIF is considered insignificant and does not - contribute to the mode combinations. The higher the SIGNIF - threshold, the fewer the number of modes combined. SIGNIF defaults - to 0.001. If SIGNIF is specified as 0.0, it is taken as 0.0. - - label - Label identifying the combined mode solution output. + cgx : str + Global Cartesian X, Y, and Z location of center of rotation about which rocking occurs. - DISP - Displacement solution (default). Displacements, stresses, forces, etc., are - available. + cgy : str + Global Cartesian X, Y, and Z location of center of rotation about which rocking occurs. - VELO - Velocity solution. Velocities, "stress velocities," "force velocities," etc., - are available. + cgz : str + Global Cartesian X, Y, and Z location of center of rotation about which rocking occurs. - ACEL - Acceleration solution. Accelerations, "stress accelerations," "force - accelerations," etc. are available. + omx : str + Global Cartesian angular components of the rocking. - td - Time duration for earthquake or shock spectrum. TD defaults to 10. + omy : str + Global Cartesian angular components of the rocking. - forcetype - Label identifying the forces to be combined: - - STATIC - Combine the modal static forces (default). - - TOTAL - Combine the modal static plus inertial forces. + omz : str + Global Cartesian angular components of the rocking. Notes ----- - For more information on spectrum analysis combination methods, see - Combination of Modes - This command is also valid in PREP7. + .. _ROCK_notes: + + Specifies a rocking response spectrum effect in the spectrum ( :ref:`antype`,SPECTR) analysis. + + The excitation direction with rocking included is not normalized to one; rather, it scales the + spectrum. For example, consider a node at coordinates (1,1,0), subject to an excitation in the X + direction ( ``SEDX`` = 1.0 on :ref:`sed` ), and a rocking with center ``CGX`` = 1.0, ``CGY`` = + ``CGZ`` = 0, and angular component about Z ( ``OMZ`` = 0.5). The total excitation direction at this + node is: + + .. math:: - Distributed ANSYS Restriction: This command is not supported in - Distributed ANSYS. + equation not available + + So that half the spectrum input is applied at this node. + + For more information on the equations, see `Participation Factors and Mode Coefficients + `_ + + This command is also valid in PREP7. """ - command = f"ROSE,{signif},{label},{td},{forcetype}" + command = f"ROCK,{cgx},{cgy},{cgz},{omx},{omy},{omz}" return self.run(command, **kwargs) - def rigresp(self, option="", method="", val1="", val2="", **kwargs): - """Specifies the rigid response calculation. + def rose( + self, + signif: str = "", + label: str = "", + td: str = "", + forcetype: str = "", + **kwargs, + ): + r"""Specifies the Rosenblueth mode combination method. - APDL Command: RIGRESP + Mechanical APDL Command: `ROSE `_ Parameters ---------- - option - Flag to activate or deactivate the rigid response calculation: + signif : str + Combine only those modes whose significance level exceeds the SIGNIF threshold. For single + point, multipoint, or DDAM response ( :ref:`spopt`, SPRS, MPRS, or DDAM), the significance level + of a mode is defined as the mode coefficient divided by the maximum mode coefficient of all + modes. Any mode whose significance level is less than ``SIGNIF`` is considered insignificant and + does not contribute to the mode combinations. The higher the SIGNIF threshold, the fewer the + number of modes combined. ``SIGNIF`` defaults to 0.001. If SIGNIF is specified as 0.0, it is + taken as 0.0. (This mode combination method is not valid for :ref:`spopt`,PSD.) + + label : str + Label identifying the combined mode solution output. - 1 (ON or YES) - Activate. + * ``DISP`` - Displacement solution (default). Displacements, stresses, forces, etc., are available. - 2 (OFF or NO) - Deactivate. This value is the default. + * ``VELO`` - Velocity solution. Velocities, "stress velocities," "force velocities," etc., are + available. - method - Method used to calculate the rigid response: + * ``ACEL`` - Acceleration solution. Accelerations, "stress accelerations," "force accelerations," + etc. are available. - GUPTA - Gupta method. + td : str + Time duration for earthquake or shock spectrum. ``TD`` defaults to 10. - LINDLEY - Lindley-Yow method. + forcetype : str + Label identifying the forces to be combined: - val1 - If Method = GUPTA, Val1 represents the frequency F1 in Hertz. + * ``STATIC`` - Combine the modal static forces (default). - val2 - If Method = GUPTA, Val2 represents the frequency F2 in Hertz. + * ``TOTAL`` - Combine the modal static plus inertial forces. Notes ----- - This rigid response calculation is only valid for single point response - spectrum analysis (SPOPT, SPRS) and multiple point response spectrum - analysis (SPOPT, MPRS) with combination methods (SRSS), complete - quadratic (CQC) or Rosenblueth (ROSE) - This command is also valid in PREP7. + .. _ROSE_notes: + + For more information on spectrum analysis combination methods, see `Combination of Modes + `_ - Only Sptype = SPRS is allowed in ANSYS Professional. + This command is also valid in PREP7. """ - command = f"RIGRESP,{option},{method},{val1},{val2}" + command = f"ROSE,{signif},{label},{td},{forcetype}" return self.run(command, **kwargs) - def sed(self, sedx="", sedy="", sedz="", cname="", **kwargs): - """Defines the excitation direction for response spectrum and PSD + def sed( + self, sedx: str = "", sedy: str = "", sedz: str = "", cname: str = "", **kwargs + ): + r"""Defines the excitation direction for response spectrum and PSD analyses. - APDL Command: SED - analyses. + Mechanical APDL Command: `SED `_ Parameters ---------- - sedx, sedy, sedz - Global Cartesian coordinates of a point that defines a line - (through the origin) corresponding to the excitation direction. - For example: 0.0, 1.0, 0.0 defines global Y as the spectrum + sedx : str + Global Cartesian coordinates of a point that defines a line (through the origin) corresponding + to the excitation direction. For example: 0.0, 1.0, 0.0 defines global Y as the spectrum + direction. + + sedy : str + Global Cartesian coordinates of a point that defines a line (through the origin) corresponding + to the excitation direction. For example: 0.0, 1.0, 0.0 defines global Y as the spectrum + direction. + + sedz : str + Global Cartesian coordinates of a point that defines a line (through the origin) corresponding + to the excitation direction. For example: 0.0, 1.0, 0.0 defines global Y as the spectrum direction. - cname - The component name corresponding to the group of excited nodes. - Only applies to base excitation multi-point response spectrum - analysis (SPOPT, MPRS) and power spectral density analysis (SPOPT, - PSD). Defaults to no component. + cname : str + The component name corresponding to the group of excited nodes. Only applies to base excitation + multi-point response spectrum analysis ( :ref:`spopt`, MPRS) and power spectral density analysis + ( :ref:`spopt`, PSD). Defaults to no component. Notes ----- - In single-point response spectrum analysis (SPOPT,SPRS), the excitation - direction without rocking (ROCK) is normalized to one so that the SEDX, - SEDY, and SEDZ values do not scale the spectrum. The excitation - direction with rocking is not normalized. The SEDX, SEDY, and SEDZ - values must be consistent with the OMX, OMY, and OMZ values on the ROCK - command. The calculated direction then scales the spectrum. For more - information, see Participation Factors and Mode Coefficients. - - In multi-point response spectrum analysis (SPOPT,MPRS) and power - spectral density analysis (SPOPT,PSD), the excitation direction is - normalized to one so that the SEDX, SEDY, and SEDZ values do not scale - the spectrum. The component name (Cname) is required. The constraints - corresponding to the excitation direction are applied to the component - nodes. + + .. _SED_notes: + + In single-point response spectrum analysis ( :ref:`spopt`,SPRS), the excitation direction without + rocking ( :ref:`rock` ) is normalized to one so that the ``SEDX``, ``SEDY``, and ``SEDZ`` values do + not scale the spectrum. The excitation direction with rocking is not normalized. The ``SEDX``, + ``SEDY``, and ``SEDZ`` values must be consistent with the linear components of ``OMX``, ``OMY``, and + ``OMZ`` values on the :ref:`rock` command. The calculated direction then scales the spectrum. For + more information, see `Participation Factors and Mode Coefficients + `_. + + In multi-point response spectrum analysis ( :ref:`spopt`,MPRS) and power spectral density analysis + ( :ref:`spopt`,PSD), the excitation direction is normalized to one so that the ``SEDX``, ``SEDY``, + and ``SEDZ`` values do not scale the spectrum. The component name ( ``Cname`` ) is required. The + constraints corresponding to the excitation direction are applied to the component nodes. This command is also valid in PREP7. """ command = f"SED,{sedx},{sedy},{sedz},{cname}" return self.run(command, **kwargs) - def spdamp(self, tblno="", curvno="", dampratio="", **kwargs): - """Defines input spectrum damping in a multi-point response spectrum + def spdamp(self, tblno: str = "", curvno: str = "", dampratio: str = "", **kwargs): + r"""Defines input spectrum damping in a multi-point response spectrum analysis. - APDL Command: SPDAMP - analysis. + Mechanical APDL Command: `SPDAMP `_ Parameters ---------- - tblno - Input table number. Corresponds to the frequency table number - (TBLNO on the SPFREQ command). + tblno : str + Input table number. Corresponds to the frequency table number ( ``TBLNO`` on the :ref:`spfreq` + command). - curvno - Input curve number. Corresponds to the spectrum values curve number - (CURVNO on the SPVAL command). + curvno : str + Input curve number. Corresponds to the spectrum values curve number ( ``CURVNO`` on the + :ref:`spval` command). - dampratio - Damping ratio for the response spectrum curve. Up to 20 different - curves may be defined, each with a different damping ratio. Damping - values must be input in ascending order. + dampratio : str + Damping ratio for the response spectrum curve. Up to 20 different curves may be defined, each + with a different damping ratio. Damping values must be input in ascending order. Notes ----- - Defines multi-point response spectrum damping value to be associated - with: - Previously defined frequency points (SPFREQ). + .. _SPDAMP_notes: + + Defines multi-point response spectrum damping value to be associated with: + + * Previously defined frequency points ( :ref:`spfreq` ). - Subsequently defined spectrum points (SPVAL). + * Subsequently defined spectrum points ( :ref:`spval` ). - Damping values are used only to identify input spectrum values for the - mode coefficients calculation. + Damping values are used only to identify input spectrum values for the mode coefficients + calculation. The curve number must be input in ascending order starting with 1. This command is also valid in PREP7. - - Distributed ANSYS Restriction: This command is not supported in - Distributed ANSYS. """ command = f"SPDAMP,{tblno},{curvno},{dampratio}" return self.run(command, **kwargs) def spfreq( self, - tblno="", - freq1="", - freq2="", - freq3="", - freq4="", - freq5="", - freq6="", - freq7="", + tblno: str = "", + freq1: str = "", + freq2: str = "", + freq3: str = "", + freq4: str = "", + freq5: str = "", + freq6: str = "", + freq7: str = "", **kwargs, ): - """Defines the frequency points for the input spectrum tables SPVAL vs. + r"""Defines the frequency points for the input spectrum tables :ref:`spval` vs. :ref:`spfreq` for multi- + point spectrum analysis. - APDL Command: SPFREQ - SPFREQ for multi-point spectrum analysis. + Mechanical APDL Command: `SPFREQ `_ Parameters ---------- - tblno + tblno : str Input table number. Up to 200 tables may be defined. - freq1, freq2, freq3,..., freq7 - Frequency points (Hz) for spectrum vs. frequency tables. FREQ1 - should be greater than zero, and values must be in ascending order. + freq1 : str + Frequency points (Hz) for spectrum vs. frequency tables. ``FREQ1`` should be greater than zero, + and values must be in ascending order. + + freq2 : str + Frequency points (Hz) for spectrum vs. frequency tables. ``FREQ1`` should be greater than zero, + and values must be in ascending order. + + freq3 : str + Frequency points (Hz) for spectrum vs. frequency tables. ``FREQ1`` should be greater than zero, + and values must be in ascending order. + + freq4 : str + Frequency points (Hz) for spectrum vs. frequency tables. ``FREQ1`` should be greater than zero, + and values must be in ascending order. + + freq5 : str + Frequency points (Hz) for spectrum vs. frequency tables. ``FREQ1`` should be greater than zero, + and values must be in ascending order. + + freq6 : str + Frequency points (Hz) for spectrum vs. frequency tables. ``FREQ1`` should be greater than zero, + and values must be in ascending order. + + freq7 : str + Frequency points (Hz) for spectrum vs. frequency tables. ``FREQ1`` should be greater than zero, + and values must be in ascending order. Notes ----- - The spectrum values are input with the SPVAL command. A separate SPFREQ - command must be used for each table defined. Frequencies must be in - ascending order. - Repeat SPFREQ command for additional frequency points. Values are added - after the last nonzero frequency. + .. _SPFREQ_notes: - If all fields after SPFREQ are blank, all input vs. frequency tables - are erased. If TBLNO is the only non-blank field, all corresponding - SPVAL curves are erased. + The spectrum values are input with the :ref:`spval` command. A separate :ref:`spfreq` command must + be used for each table defined. Frequencies must be in ascending order. - Use the SPTOPT and STAT commands to list current frequency points. + Repeat :ref:`spfreq` command for additional frequency points. Values are added after the last + nonzero frequency. - This command is also valid in PREP7. + If all fields after :ref:`spfreq` are blank, all input vs. frequency tables are erased. If ``TBLNO`` + is the only non-blank field, all corresponding :ref:`spval` curves are erased. - Distributed ANSYS Restriction: This command is not supported in - Distributed ANSYS. + Use the :ref:`sptopt` and :ref:`stat` commands to list current frequency points. + + This command is also valid in PREP7. """ command = ( f"SPFREQ,{tblno},{freq1},{freq2},{freq3},{freq4},{freq5},{freq6},{freq7}" ) return self.run(command, **kwargs) - def spgraph(self, tblno="", curvno="", curvnobeg="", **kwargs): - """Displays input spectrum curves for MPRS analysis. + def spgraph(self, tblno: str = "", curvno: str = "", curvnobeg: str = "", **kwargs): + r"""Displays input spectrum curves for MPRS analysis. - APDL Command: SPGRAPH + Mechanical APDL Command: `SPGRAPH `_ Parameters ---------- - tblno - Table number to display. Defaults to 1. + tblno : str + Table number to display. Defaults to 1. - curvno + curvno : str Curve number to display. Defaults to none. - curvnobeg + curvnobeg : str Beginning of the curve number range to display. Defaults to 1. Notes ----- - You can display up to 10 input spectrum curves (SPVAL and SPFREQ - commands) with log X scale. - If the input spectrum curves are not associated with a damping value - (SPDAMP command), CURVNO and CURVNOBeg are not applicable and table - TBLNO is displayed. Otherwise, specify CURVNO or CURVNOBeg: + .. _SPGRAPH_notes: + + You can display up to 10 input spectrum curves ( :ref:`spval` and :ref:`spfreq` commands) with log X + scale. + + If the input spectrum curves are not associated with a damping value ( :ref:`spdamp` command), + ``CURVNO`` and ``CURVNOBeg`` are not applicable and table ``TBLNO`` is displayed. Otherwise, specif + y ``CURVNO`` or ``CURVNOBeg`` : - if CURVNO is used, one curve is displayed. + * if ``CURVNO`` is used, one curve is displayed. - if CURVNOBeg is used, up to 10 curves are displayed. CURVNOBeg is the - beginning of the curve number range of interest. + * if ``CURVNOBeg`` is used, up to 10 curves are displayed. ``CURVNOBeg`` is the beginning of the + curve number range of interest. """ command = f"SPGRAPH,{tblno},{curvno},{curvnobeg}" return self.run(command, **kwargs) - def spopt(self, sptype="", nmode="", elcalc="", modereusekey="", **kwargs): - """Selects the spectrum type and other spectrum options. + def spopt( + self, + spectype: str = "", + nmode: str = "", + elcalc: str = "", + modereusekey: str = "", + **kwargs, + ): + r"""Selects the spectrum type and other spectrum options. - APDL Command: SPOPT + Mechanical APDL Command: `SPOPT `_ Parameters ---------- - sptype + spectype : str Spectrum type: - SPRS - Single point excitation response spectrum (default). See also the SVTYP - command. + * ``SPRS`` - Single point excitation response spectrum (default). See also :ref:`svtyp`. - MPRS - Multiple point excitation response spectrum. + * ``MPRS`` - Multiple point excitation response spectrum. - DDAM - Dynamic design analysis method. + * ``DDAM`` - Dynamic design analysis method. - PSD - Power spectral density. + * ``PSD`` - Power spectral density. - nmode - Use the first NMODE modes from the modal analysis. Defaults to all - extracted modes, as specified by the MODOPT and BUCOPT commands. - NMODE cannot be larger than 10000. + nmode : str + Use the first ``NMODE`` modes from the modal analysis. Defaults to all extracted modes, as + specified by the :ref:`modopt` and :ref:`bucopt` commands. ``NMODE`` cannot be larger than + 10000. - elcalc - Element results calculation key (for Sptype = PSD only): + elcalc : str + Element results calculation key: - NO - Do not calculate element results and reaction forces (default). + * ``NO`` - Do not calculate element results and reaction forces (default). - YES - Calculate element results and reaction forces, as well as the nodal degree of - freedom solution. + * ``YES`` - Calculate element results and reaction forces, as well as the nodal degree of freedom + solution. - modereusekey - Key for existing MODE file reuse when running multiple spectrum - analyses: + modereusekey : str + Key for existing ``MODE`` file reuse when running multiple spectrum analyses: - NO - No spectrum analysis has been performed yet (default). + * ``NO`` - No spectrum analysis has been performed yet (default). - YES - This is not the first spectrum analysis. The MODE file will be reused and the - necessary files will be cleaned up for the new spectrum - analysis. + * ``YES`` - This is not the first spectrum analysis. The ``MODE`` file will be reused and the + necessary files will be cleaned up for the new spectrum analysis. Notes ----- - Valid only for a spectrum analysis (ANTYPE,SPECTR). This operation - must be preceded by a modal solution (ANTYPE,MODAL) with the - appropriate files available. Both the spectrum analysis and the - preceding modal analysis must be performed under the same ANSYS version + + .. _SPOPT_notes: + + Valid only for a spectrum analysis ( :ref:`antype`,SPECTR). This operation must be preceded by a + modal solution ( :ref:`antype`,MODAL) with the appropriate files available. Both the spectrum + analysis and the preceding modal analysis must be performed under the same Mechanical APDL version number. - If used in SOLUTION, this command is valid only within the first load - step. + If used in SOLUTION, this command is valid only within the first load step. - This command is also valid in PREP7. + Element results are calculated ( ``Elcalc`` = YES) only if the element modal results are available + (written to the :file:`Jobname.mode` file with ``MSUPkey`` = YES on the :ref:`mxpand` command). For + ``Sptype`` = SPRS, MPRS, and DDAM, if the element results calculation is activated ( ``Elcalc`` = + YES) and element modal results are not available, it is deactivated automatically. + + For SPRS, DDAM or MPRS analyses, modal responses can be combined and stored directly in the + :file:`Jobname.rst` file during spectrum solution according to the mode combination method command + issued ( :ref:`srss`, :ref:`cqc`, etc.) for ``Elcalc`` = YES. This can save significant time + compared to the method for ``Elcalc`` = NO, which requires generating the file of POST1 commands ( + :file:`Jobname.mcom` file) to be read in POST1 to do the mode combinations. For details and example + usage, see `Spectrum Analysis + `_, and Example: + Multi-Point Response Spectrum (MPRS) Analysis. - Only Sptype = SPRS is allowed in ANSYS Professional. + This command is also valid in PREP7. """ - command = f"SPOPT,{sptype},{nmode},{elcalc},{modereusekey}" + command = f"SPOPT,{spectype},{nmode},{elcalc},{modereusekey}" return self.run(command, **kwargs) - def spunit(self, tblno="", type_="", gvalue="", keyinterp="", **kwargs): - """Defines the type of multi-point response spectrum. + def spunit( + self, + tblno: str = "", + type_: str = "", + gvalue: str = "", + keyinterp: str = "", + **kwargs, + ): + r"""Defines the type of multi-point response spectrum. - APDL Command: SPUNIT + Mechanical APDL Command: `SPUNIT `_ Parameters ---------- - tblno + tblno : str Input table number. - type\\_ + type_ : str Label identifying the type of spectrum: - DISP - Displacement spectrum (SPVAL values interpreted as displacements with units of - length). + * ``DISP`` - Displacement spectrum ( :ref:`spval` values interpreted as displacements with units of + length). - VELO - Velocity spectrum (SPVAL values interpreted as velocities with units of - length/time). + * ``VELO`` - Velocity spectrum ( :ref:`spval` values interpreted as velocities with units of + length/time). - ACEL - Acceleration spectrum (SPVAL values interpreted as accelerations with units of - length/time2). + * ``ACEL`` - Acceleration spectrum ( :ref:`spval` values interpreted as accelerations with units of + length/time :sup:`2` ). - ACCG - Acceleration spectrum (SPVAL values interpreted as accelerations with units of - g/time2). + * ``ACCG`` - Acceleration spectrum ( :ref:`spval` values interpreted as accelerations with units of + g/time :sup:`2` ). - FORC - Force spectrum. + * ``FORC`` - Force spectrum. - PRES - Pressure spectrum. + * ``PRES`` - Pressure spectrum. - gvalue - Value of acceleration due to gravity in any arbitrary units for - Type=ACCG table. Default is 386.4 in/sec2. + gvalue : str + Value of acceleration due to gravity in any arbitrary units for Type=ACCG table. Default is + 386.4 in/sec :sup:`2`. - keyinterp - Key to activate or deactivate the linear interpolation between - input response spectrum points and input response spectrum curves: + keyinterp : str + Key to activate or deactivate the linear interpolation between input response spectrum points and + input response spectrum curves: - 0 (OFF or NO) - Deactivate linear and use logarithmic interpolation. This value is the default. + * ``0 (OFF or NO)`` - Deactivate linear and use logarithmic interpolation. This value is the + default. - 1 (ON or YES) - Activate linear interpolation. + * ``1 (ON or YES)`` - Activate linear interpolation. Notes ----- - Defines the type of multi-point response spectrum defined by the SPFREQ - and SPVAL commands. - Force (FORC) and pressure (PRES) type spectra can be used only as a - nodal excitation. + .. _SPUNIT_notes: - GVALUE is valid only when type=ACCG is specified. A zero or negative - value cannot be used. A parameter substitution can also be performed. + Defines the type of multi-point response spectrum defined by the :ref:`spfreq` and :ref:`spval` + commands. + + Force ( **FORC** ) and pressure ( **PRES** ) type spectra can be used only as a nodal excitation. + + ``GVALUE`` is valid only when ``Type`` = ACCG is specified. A zero or negative value cannot be used. + A parameter substitution can also be performed. This command is also valid in PREP7. """ @@ -1389,106 +1614,138 @@ def spunit(self, tblno="", type_="", gvalue="", keyinterp="", **kwargs): def spval( self, - tblno="", - curvno="", - sv1="", - sv2="", - sv3="", - sv4="", - sv5="", - sv6="", - sv7="", + tblno: str = "", + curvno: str = "", + sv1: str = "", + sv2: str = "", + sv3: str = "", + sv4: str = "", + sv5: str = "", + sv6: str = "", + sv7: str = "", **kwargs, ): - """Defines multi-point response spectrum values. + r"""Defines multi-point response spectrum values. - APDL Command: SPVAL + Mechanical APDL Command: `SPVAL `_ Parameters ---------- - tblno - Input table number. It corresponds to TBLNO on the SPFREQ command. + tblno : str + Input table number. It corresponds to ``TBLNO`` on the :ref:`spfreq` command. + + curvno : str + Input curve number. It corresponds to ``CURVNO`` on the :ref:`spdamp` command (optional). + + sv1 : str + Spectral values corresponding to the frequency points ( :ref:`spfreq` ) and damping ratio ( + :ref:`spdamp` ). Values are interpreted as defined with the :ref:`spunit` command. + + sv2 : str + Spectral values corresponding to the frequency points ( :ref:`spfreq` ) and damping ratio ( + :ref:`spdamp` ). Values are interpreted as defined with the :ref:`spunit` command. + + sv3 : str + Spectral values corresponding to the frequency points ( :ref:`spfreq` ) and damping ratio ( + :ref:`spdamp` ). Values are interpreted as defined with the :ref:`spunit` command. - curvno - Input curve number. It corresponds to CURVNO on the SPDAMP command - (optional). + sv4 : str + Spectral values corresponding to the frequency points ( :ref:`spfreq` ) and damping ratio ( + :ref:`spdamp` ). Values are interpreted as defined with the :ref:`spunit` command. - sv1, sv2, sv3, , , . . . , sv7 - Spectral values corresponding to the frequency points (SPFREQ) and - damping ratio (SPDAMP). Values are interpreted as defined with the - SPUNIT command. + sv5 : str + Spectral values corresponding to the frequency points ( :ref:`spfreq` ) and damping ratio ( + :ref:`spdamp` ). Values are interpreted as defined with the :ref:`spunit` command. + + sv6 : str + Spectral values corresponding to the frequency points ( :ref:`spfreq` ) and damping ratio ( + :ref:`spdamp` ). Values are interpreted as defined with the :ref:`spunit` command. + + sv7 : str + Spectral values corresponding to the frequency points ( :ref:`spfreq` ) and damping ratio ( + :ref:`spdamp` ). Values are interpreted as defined with the :ref:`spunit` command. Notes ----- - Defines multi-point response spectrum values to be associated with the - previously defined frequency points (SPFREQ). It can also be associated - with the previously defined damping value (SPDAMP). If CURVNO is not - specified, the input spectrum is not associated with a damping value. - Repeat SPVAL command for additional values, up to the number of - frequency points (SPFREQ). Values are added after the last nonzero + .. _SPVAL_notes: + + Notes + Defines multi-point response spectrum values to be associated with the previously defined frequency + points ( :ref:`spfreq` ). It can also be associated with the previously defined damping value ( + :ref:`spdamp` ). If ``CURVNO`` is not specified, the input spectrum is not associated with a damping value. - The interpolation method between response spectrum points and curves is - specified using KeyInterp on the SPUNIT command. It is logarithmic by - default. + Repeat :ref:`spval` command for additional values, up to the number of frequency points ( + :ref:`spfreq` ). Values are added after the last nonzero value. - Use the SPTOPT and STAT commands to list current spectrum curve values. + The interpolation method between response spectrum points and curves is specified using + ``KeyInterp`` on the :ref:`spunit` command. It is logarithmic by default. + + Use the :ref:`sptopt` and :ref:`stat` commands to list current spectrum curve values. This command is also valid in PREP7. """ command = f"SPVAL,{tblno},{curvno},{sv1},{sv2},{sv3},{sv4},{sv5},{sv6},{sv7}" return self.run(command, **kwargs) - def srss(self, signif="", label="", abssumkey="", forcetype="", **kwargs): - """Specifies the square root of sum of squares mode combination method. + def srss( + self, + signif: str = "", + label: str = "", + abssumkey: str = "", + forcetype: str = "", + **kwargs, + ): + r"""Specifies the square root of sum of squares mode combination method. - APDL Command: SRSS + Mechanical APDL Command: `SRSS `_ Parameters ---------- - signif - Combine only those modes whose significance level exceeds the - SIGNIF threshold. For single point, multipoint, or DDAM response - (SPOPT,SPRS, MPRS or DDAM), the significance level of a mode is - defined as the mode coefficient of the mode, divided by the maximum - mode coefficient of all modes. Any mode whose significance level - is less than SIGNIF is considered insignificant and is not - contributed to the mode combinations. The higher the SIGNIF - threshold, the fewer the number of modes combined. SIGNIF defaults - to 0.001. If SIGNIF is specified as 0.0, it is taken as 0.0. - (This mode combination method is not valid for SPOPT,PSD.) - - label + signif : str + Combine only those modes whose significance level exceeds the ``SIGNIF`` threshold. For single + point, multipoint, or DDAM response ( :ref:`spopt`,SPRS, MPRS or DDAM), the significance level + of a mode is defined as the mode coefficient divided by the maximum mode coefficient of all + modes. Any mode whose significance level is less than ``SIGNIF`` is considered insignificant and + is not contributed to the mode combinations. The higher the ``SIGNIF`` threshold, the fewer the + number of modes combined. ``SIGNIF`` defaults to 0.001. If ``SIGNIF`` is specified as 0.0, it is + taken as 0.0. (This mode combination method is not valid for :ref:`spopt`,PSD.) + + label : str Label identifying the combined mode solution output. - DISP - Displacement solution (default). Displacements, stresses, forces, etc., are - available. + * ``DISP`` - Displacement solution (default). Displacements, stresses, forces, etc., are available. - VELO - Velocity solution. Velocities, "stress velocities," "force velocities," etc., - are available. + * ``VELO`` - Velocity solution. Velocities, "stress velocities," "force velocities," etc., are + available. - ACEL - Acceleration solution. Accelerations, "stress accelerations," "force - accelerations," etc., are available. + * ``ACEL`` - Acceleration solution. Accelerations, "stress accelerations," "force accelerations," + etc., are available. - abssumkey - Absolute Sum combination key (for SPOPT,MPRS only): + abssumkey : str + Absolute Sum combination key (for :ref:`spopt`,MPRS only): - NO - Do not use the Absolute Sum method (default). + * ``NO`` - Do not use the Absolute Sum method (default). - YES - Combine the modes per excitation direction using the Absolute Sum method, then - combine the resulting quantities using the square root of sum - of squares method. + * ``YES`` - Combine the modes per excitation direction using the Absolute Sum method, then combine + the resulting quantities using the square root of sum of squares method. - forcetype + When using Absolute Sum combination, the excitation direction must be specified using the :ref:`sed` + command. + + forcetype : str Label identifying the forces to be combined: - STATIC - Combine the modal static forces (default). + * ``STATIC`` - Combine the modal static forces (default). - TOTAL - Combine the modal static plus inertial forces. + * ``TOTAL`` - Combine the modal static plus inertial forces. Notes ----- + + .. _SRSS_notes: + This command is also valid for PREP7. """ command = f"SRSS,{signif},{label},{abssumkey},{forcetype}" @@ -1496,180 +1753,234 @@ def srss(self, signif="", label="", abssumkey="", forcetype="", **kwargs): def sv( self, - damp="", - sv1="", - sv2="", - sv3="", - sv4="", - sv5="", - sv6="", - sv7="", - sv8="", - sv9="", + damp: str = "", + sv1: str = "", + sv2: str = "", + sv3: str = "", + sv4: str = "", + sv5: str = "", + sv6: str = "", + sv7: str = "", + sv8: str = "", + sv9: str = "", **kwargs, ): - """Defines spectrum values to be associated with frequency points. + r"""Defines spectrum values to be associated with frequency points. - APDL Command: SV + Mechanical APDL Command: `SV `_ Parameters ---------- - damp - Damping ratio for this response spectrum curve. If the same as a - previously defined curve, the SV values are added to the previous - curve. Up to four different curves may be defined, each with a - different damping ratio. Damping values must be input in ascending - order. - - sv1, sv2, sv3, . . . , sv9 - Spectrum values corresponding to the frequency points [FREQ]. - Values are interpreted as defined with the SVTYP command. SV - values should not be zero. Values required outside the frequency - range use the extreme input values. + damp : str + Damping ratio for this response spectrum curve. If the same as a previously defined curve, the + SV values are added to the previous curve. Up to four different curves may be defined, each with + a different damping ratio. Damping values must be input in ascending order. + + sv1 : str + Spectrum values corresponding to the frequency points ( :ref:`freq` ). Values are interpreted as + defined with the :ref:`svtyp` command. SV values should not be zero. Values required outside the + frequency range use the extreme input values. + + sv2 : str + Spectrum values corresponding to the frequency points ( :ref:`freq` ). Values are interpreted as + defined with the :ref:`svtyp` command. SV values should not be zero. Values required outside the + frequency range use the extreme input values. + + sv3 : str + Spectrum values corresponding to the frequency points ( :ref:`freq` ). Values are interpreted as + defined with the :ref:`svtyp` command. SV values should not be zero. Values required outside the + frequency range use the extreme input values. + + sv4 : str + Spectrum values corresponding to the frequency points ( :ref:`freq` ). Values are interpreted as + defined with the :ref:`svtyp` command. SV values should not be zero. Values required outside the + frequency range use the extreme input values. + + sv5 : str + Spectrum values corresponding to the frequency points ( :ref:`freq` ). Values are interpreted as + defined with the :ref:`svtyp` command. SV values should not be zero. Values required outside the + frequency range use the extreme input values. + + sv6 : str + Spectrum values corresponding to the frequency points ( :ref:`freq` ). Values are interpreted as + defined with the :ref:`svtyp` command. SV values should not be zero. Values required outside the + frequency range use the extreme input values. + + sv7 : str + Spectrum values corresponding to the frequency points ( :ref:`freq` ). Values are interpreted as + defined with the :ref:`svtyp` command. SV values should not be zero. Values required outside the + frequency range use the extreme input values. + + sv8 : str + Spectrum values corresponding to the frequency points ( :ref:`freq` ). Values are interpreted as + defined with the :ref:`svtyp` command. SV values should not be zero. Values required outside the + frequency range use the extreme input values. + + sv9 : str + Spectrum values corresponding to the frequency points ( :ref:`freq` ). Values are interpreted as + defined with the :ref:`svtyp` command. SV values should not be zero. Values required outside the + frequency range use the extreme input values. Notes ----- - Defines the spectrum values to be associated with the previously - defined frequency points [FREQ]. Applies only to the single-point - response spectrum. Damping has no effect on the frequency solution. - Damping values are used only to identify SV curves for the mode - combinations calculation. Only the curve with the lowest damping value - is used in the initial mode coefficient calculation. Use STAT command - to list current spectrum curve values. - - Repeat SV command for additional SV points (100 maximum per DAMP - curve). SV values are added to the DAMP curve after the last nonzero - SV value. - - The interpolation method between response spectrum points and curves is - specified using KeyInterp in the SVTYP command. It is logarithmic by - default. + + .. _SV_notes: + + Defines the spectrum values to be associated with the previously defined frequency points ( + :ref:`freq` ). Applies only to the single-point response spectrum. Damping has no effect on the + frequency solution. Damping values are used only to identify SV curves for the mode combinations + calculation. Only the curve with the lowest damping value is used in the initial mode coefficient + calculation. Use :ref:`stat` command to list current spectrum curve values. + + Repeat :ref:`sv` command for additional SV points (100 maximum per ``DAMP`` curve). SV values are + added to the ``DAMP`` curve after the last nonzero SV value. + + The interpolation method between response spectrum points and curves is specified using + ``KeyInterp`` in the :ref:`svtyp` command. It is logarithmic by default. This command is also valid in PREP7. """ command = f"SV,{damp},{sv1},{sv2},{sv3},{sv4},{sv5},{sv6},{sv7},{sv8},{sv9}" return self.run(command, **kwargs) - def svplot(self, optionscale="", damp1="", damp2="", damp3="", damp4="", **kwargs): - """Displays input spectrum curves. + def svplot( + self, + optionscale: str = "", + damp1: str = "", + damp2: str = "", + damp3: str = "", + damp4: str = "", + **kwargs, + ): + r"""Displays input spectrum curves. - APDL Command: SVPLOT + Mechanical APDL Command: `SVPLOT `_ Parameters ---------- - optionscale + optionscale : str Flag to activate or deactivate input spectrum value scaling: - OFF - Do not scale the input spectrum values with scale factor FACT (SVTYP command). - This is the default value. + * ``OFF`` - Do not scale the input spectrum values with scale factor FACT ( :ref:`svtyp` command). + This is the default value. - ON - Scale the input spectrum values with scale factor FACT (SVTYP command) + * ``ON`` - Scale the input spectrum values with scale factor FACT ( :ref:`svtyp` command) - damp1 - Damping ratio corresponding to DAMP (SV command) defining the first - spectrum curve. + damp1 : str + Damping ratio corresponding to DAMP ( :ref:`sv` command) defining the first spectrum curve. - damp2 - Damping ratio corresponding to DAMP (SV command) defining the - second spectrum curve. + damp2 : str + Damping ratio corresponding to DAMP ( :ref:`sv` command) defining the second spectrum curve. - damp3 - Damping ratio corresponding to DAMP (SV command) defining the third - spectrum curve. + damp3 : str + Damping ratio corresponding to DAMP ( :ref:`sv` command) defining the third spectrum curve. - damp4 - Damping ratio corresponding to DAMP (SV command) defining the - fourth spectrum curve. + damp4 : str + Damping ratio corresponding to DAMP ( :ref:`sv` command) defining the fourth spectrum curve. Notes ----- - You can display up to four input spectrum tables (SV and FREQ commands) - with log X scale. If no damping ratio is specified, all spectrum tables - are displayed. + + .. _SVPLOT_notes: + + You can display up to four input spectrum tables ( :ref:`sv` and :ref:`freq` commands) with log X + scale. If no damping ratio is specified, all spectrum tables are displayed. This command is valid in any processor. """ command = f"SVPLOT,{optionscale},{damp1},{damp2},{damp3},{damp4}" return self.run(command, **kwargs) - def svtyp(self, ksv="", fact="", keyinterp="", **kwargs): - """Defines the type of single-point response spectrum. + def svtyp(self, ksv: int | str = "", fact: str = "", keyinterp: str = "", **kwargs): + r"""Defines the type of single-point response spectrum. - APDL Command: SVTYP + Mechanical APDL Command: `SVTYP `_ Parameters ---------- - ksv + ksv : int or str Response spectrum type: - 0 - Seismic velocity response spectrum loading (SV values interpreted as velocities - with units of length/time). - - 1 - Force response spectrum loading (SV values interpreted as force amplitude - multipliers). + * ``0`` - Seismic velocity response spectrum loading (SV values interpreted as velocities with units + of length/time). - 2 - Seismic acceleration response spectrum loading (SV values interpreted as - accelerations with units of length/time2). + * ``1`` - Force response spectrum loading (SV values interpreted as force amplitude multipliers). - 3 - Seismic displacement response spectrum loading (SV values interpreted as - displacements with units of length). + * ``2`` - Seismic acceleration response spectrum loading (SV values interpreted as accelerations + with units of length/time :sup:`2` ). - 4 - PSD loading (SV values interpreted as acceleration2/(cycles/time), such as - (in/sec2)2/Hz (not g2/Hz)). (Not recommended) + * ``3`` - Seismic displacement response spectrum loading (SV values interpreted as displacements + with units of length). - fact - Scale factor applied to spectrum values (defaults to 1.0). Values - are scaled when the solution is initiated [SOLVE]. Database values - remain the same. + fact : str + Scale factor applied to spectrum values (defaults to 1.0). Values are scaled when the solution + is initiated ( :ref:`solve` ). Database values remain the same. - keyinterp - Key to activate or deactivate the linear interpolation between - input response spectrum points and input response spectrum curves: + keyinterp : str + Key to activate or deactivate the linear interpolation between input response spectrum points and + input response spectrum curves: - 0 (OFF or NO) - Deactivate linear and use logarithmic interpolation. This value is the default. + * ``0 (OFF, or NO)`` - Deactivate linear and use logarithmic interpolation. This value is the + default. - 1 (ON or YES) - Activate linear interpolation. + * ``1 (ON, or YES)`` - Activate linear interpolation. Notes ----- - Defines the type of single-point response spectrum [SPOPT]. The - seismic excitation direction is defined with the SED command. + + .. _SVTYP_notes: + + Defines the type of single-point response spectrum ( :ref:`spopt` ). The seismic excitation + direction is defined with the :ref:`sed` command. This command is also valid in PREP7. """ command = f"SVTYP,{ksv},{fact},{keyinterp}" return self.run(command, **kwargs) - def vddam(self, vf="", va="", vb="", vc="", **kwargs): - """Specifies the velocity spectrum computation constants for the analysis + def vddam(self, vf: str = "", va: str = "", vb: str = "", vc: str = "", **kwargs): + r"""Specifies the velocity spectrum computation constants for the analysis of shock resistance of + shipboard structures. - APDL Command: VDDAM - of shock resistance of shipboard structures. + Mechanical APDL Command: `VDDAM `_ Parameters ---------- - vf - Direction-dependent velocity coefficient for elastic or elastic- - plastic analysis option (Default = 0). + vf : str + Direction-dependent velocity coefficient for elastic or elastic-plastic analysis option (Default + = 0). + + va : str + Coefficients for the DDAM velocity spectrum equations. See `Dynamic Design Analysis Method + `_ - va, vb, vc - Coefficients for the DDAM velocity spectrum equations. See Dynamic - Design Analysis Method in the Mechanical APDL Theory Reference. - Default for these coefficients is zero. + vb : str + Coefficients for the DDAM velocity spectrum equations. See `Dynamic Design Analysis Method + `_ + + vc : str + Coefficients for the DDAM velocity spectrum equations. See `Dynamic Design Analysis Method + `_ Notes ----- - This command specifies velocity coefficients to analyze shock - resistance of shipboard equipment. These coefficients are used to - compute mode coefficients according to the equations given in Dynamic - Design Analysis Method in the Mechanical APDL Theory Reference. The - form of these equations is based on the Naval NRL Dynamic Design - Analysis Method. This command, along with the ADDAM and SED commands, - is used with the spectrum (ANTYPE,SPECTR) analysis as a special purpose - alternative to the SV, FREQ, and SVTYP commands. The mass and length - units of the model must be in pounds and inches, respectively. - - DDASPEC may alternatively be used to calculate spectrum coefficients. + + .. _VDDAM_notes: + + This command specifies velocity coefficients to analyze shock resistance of shipboard equipment. + These coefficients are used to compute mode coefficients according to the equations given in + `Dynamic Design Analysis Method + `_ + :ref:`addam` and :ref:`sed` commands, is used with the spectrum ( :ref:`antype`,SPECTR) analysis as + a special purpose alternative to the :ref:`sv`, :ref:`freq`, and :ref:`svtyp` commands. + + In order to perform a DDAM spectrum analysis using a units system other than BIN (default), you must + specify the units system complying with the mass and length units of the model using the + :ref:`units` command. Issue the :ref:`units` command before defining the shock spectrum computation + constants ( :ref:`vddam` ). The :ref:`vddam` command is not supported with the user-defined units + system ( ``Label`` = USER on the :ref:`units` command). + + :ref:`ddaspec` may alternatively be used to calculate spectrum coefficients. This command is also valid in PREP7. """ diff --git a/src/ansys/mapdl/core/_commands/solution/status.py b/src/ansys/mapdl/core/_commands/solution/status.py new file mode 100644 index 00000000000..73306716b2d --- /dev/null +++ b/src/ansys/mapdl/core/_commands/solution/status.py @@ -0,0 +1,361 @@ +# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + + +class Status: + + def atype(self, **kwargs): + r"""Specifies "Analysis types" as the subsequent status topic. + + Mechanical APDL Command: `ATYPE `_ + + Notes + ----- + + .. _ATYPE_notes: + + This is a status ( :ref:`stat` ) topic command. Status topic commands are generated by the GUI and + will appear in the log file ( :file:`Jobname.LOG` ) if status is requested for some items under + Utility Menu> List> Status. This command will be immediately followed by a :ref:`stat` command, + which will report the status for the specified topic. + + If entered directly into the program, the :ref:`stat` command should immediately follow this + command. + """ + command = "ATYPE" + return self.run(command, **kwargs) + + def bioopt(self, **kwargs): + r"""Specifies "Biot-Savart options" as the subsequent status topic. + + Mechanical APDL Command: `BIOOPT `_ + + Notes + ----- + + .. _BIOOPT_notes: + + This is a status ( :ref:`stat` ) topic command. Status topic commands are generated by the GUI and + will appear in the log file ( :file:`Jobname.LOG` ) if status is requested for some items under + Utility Menu> List> Status. This command will be immediately followed by a :ref:`stat` command, + which will report the status for the specified topic. + + If entered directly into the program, the :ref:`stat` command should immediately follow this + command. + """ + command = "BIOOPT" + return self.run(command, **kwargs) + + def deact(self, **kwargs): + r"""Specifies "Element birth and death" as the subsequent status topic. + + Mechanical APDL Command: `DEACT `_ + + Notes + ----- + + .. _DEACT_notes: + + This is a status ( :ref:`stat` ) topic command. Status topic commands are generated by the GUI and + will appear in the log file ( :file:`Jobname.LOG` ) if status is requested for some items under + Utility Menu> List> Status. This command will be immediately followed by a :ref:`stat` command, + which will report the status for the specified topic. + + If entered directly into the program, the :ref:`stat` command should immediately follow this + command. + """ + command = "DEACT" + return self.run(command, **kwargs) + + def dynopt(self, **kwargs): + r"""Specifies "Dynamic analysis options" as the subsequent status topic. + + Mechanical APDL Command: `DYNOPT `_ + + Notes + ----- + + .. _DYNOPT_notes: + + This is a status ( :ref:`stat` ) topic command. Status topic commands are generated by the GUI and + will appear in the log file ( :file:`Jobname.LOG` ) if status is requested for some items under + Utility Menu> List> Status. This command will be immediately followed by a :ref:`stat` command, + which will report the status for the specified topic. + + If entered directly into the program, the :ref:`stat` command should immediately follow this + command. + """ + command = "DYNOPT" + return self.run(command, **kwargs) + + def genopt(self, **kwargs): + r"""Specifies "General options" as the subsequent status topic. + + Mechanical APDL Command: `GENOPT `_ + + Notes + ----- + + .. _GENOPT_notes: + + This is a status ( :ref:`stat` ) topic command. Status topic commands are generated by the GUI and + will appear in the log file ( :file:`Jobname.LOG` ) if status is requested for some items under + Utility Menu> List> Status. This command will be immediately followed by a :ref:`stat` command, + which will report the status for the specified topic. + + + If entered directly into the program, the :ref:`stat` command should immediately follow this + command. + """ + command = "GENOPT" + return self.run(command, **kwargs) + + def inrtia(self, **kwargs): + r"""Specifies Inertial loads as the subsequent status topic. + + Mechanical APDL Command: `INRTIA `_ + + Notes + ----- + + .. _INRTIA_notes: + + This is a status ( :ref:`stat` ) topic command. Status topic commands are generated by the GUI and + will appear in the log file ( :file:`Jobname.LOG` ) if status is requested for some items under + Utility Menu> List> Status. This command will be immediately followed by a :ref:`stat` command, + which will report the status for the specified topic. + + If entered directly into the program, the :ref:`stat` command should immediately follow this + command. + """ + command = "INRTIA" + return self.run(command, **kwargs) + + def lsoper(self, **kwargs): + r"""Specifies "Load step operations" as the subsequent status topic. + + Mechanical APDL Command: `LSOPER `_ + + Notes + ----- + + .. _LSOPER_notes: + + This is a status ( :ref:`stat` ) topic command. Status topic commands are generated by the GUI and + will appear in the log file ( :file:`Jobname.LOG` ) if status is requested for some items under + Utility Menu> List> Status. This command will be immediately followed by a :ref:`stat` command, + which will report the status for the specified topic. + + If entered directly into the program, the :ref:`stat` command should immediately follow this + command. + """ + command = "LSOPER" + return self.run(command, **kwargs) + + def master(self, **kwargs): + r"""Specifies "Master DOF" as the subsequent status topic. + + Mechanical APDL Command: `MASTER `_ + + Notes + ----- + + .. _MASTER_notes: + + This is a status ( :ref:`stat` ) topic command. Status topic commands are generated by the GUI and + will appear in the log file ( :file:`Jobname.LOG` ) if status is requested for some items under + Utility Menu> List> Status. This command will be immediately followed by a :ref:`stat` command, + which will report the status for the specified topic. + + If entered directly into the program, the :ref:`stat` command should immediately follow this + command. + """ + command = "MASTER" + return self.run(command, **kwargs) + + def nlopt(self, **kwargs): + r"""Specifies "Nonlinear analysis options" as the subsequent status topic. + + Mechanical APDL Command: `NLOPT `_ + + Notes + ----- + + .. _NLOPT_notes: + + This is a status ( :ref:`stat` ) topic command. Status topic commands are generated by the GUI and + will appear in the log file ( :file:`Jobname.LOG` ) if status is requested for some items under + Utility Menu> List> Status. This command will be immediately followed by a :ref:`stat` command, + which will report the status for the specified topic. + + If entered directly into the program, the :ref:`stat` command should immediately follow this + command. + """ + command = "NLOPT" + return self.run(command, **kwargs) + + def outopt(self, **kwargs): + r"""Specifies "Output options" as the subsequent status topic. + + Mechanical APDL Command: `OUTOPT `_ + + Notes + ----- + + .. _OUTOPT_notes: + + This is a status ( :ref:`stat` ) topic command. Status topic commands are generated by the GUI and + will appear in the log file ( :file:`Jobname.LOG` ) if status is requested for some items under + Utility Menu> List> Status. This command will be immediately followed by a :ref:`stat` command, + which will report the status for the specified topic. + + If entered directly into the program, the :ref:`stat` command should immediately follow this + command. + """ + command = "OUTOPT" + return self.run(command, **kwargs) + + def smbody(self, **kwargs): + r"""Specifies "Body loads on the solid model" as the subsequent status topic. + + Mechanical APDL Command: `SMBODY `_ + + Notes + ----- + + .. _SMBODY_notes: + + This is a status ( :ref:`stat` ) topic command. Status topic commands are generated by the GUI and + will appear in the log file ( :file:`Jobname.LOG` ) if status is requested for some items under + Utility Menu> List> Status. This command will be immediately followed by a :ref:`stat` command, + which will report the status for the specified topic. + + If entered directly into the program, the :ref:`stat` command should immediately follow this + command. + """ + command = "SMBODY" + return self.run(command, **kwargs) + + def smcons(self, **kwargs): + r"""Specifies "Constraints on the solid model" as the subsequent status topic. + + Mechanical APDL Command: `SMCONS `_ + + Notes + ----- + + .. _SMCONS_notes: + + This is a status ( :ref:`stat` ) topic command. Status topic commands are generated by the GUI and + will appear in the log file ( :file:`Jobname.LOG` ) if status is requested for some items under + Utility Menu> List> Status. This command will be immediately followed by a :ref:`stat` command, + which will report the status for the specified topic. + + If entered directly into the program, the :ref:`stat` command should immediately follow this + command. + """ + command = "SMCONS" + return self.run(command, **kwargs) + + def smfor(self, **kwargs): + r"""Specifies "Forces on the solid model" as the subsequent status topic. + + Mechanical APDL Command: `SMFOR `_ + + Notes + ----- + + .. _SMFOR_notes: + + This is a status ( :ref:`stat` ) topic command. Status topic commands are generated by the GUI and + will appear in the log file ( :file:`Jobname.LOG` ) if status is requested for some items under + Utility Menu> List> Status. This command will be immediately followed by a :ref:`stat` command, + which will report the status for the specified topic. + + If entered directly into the program, the :ref:`stat` command should immediately follow this + command. + """ + command = "SMFOR" + return self.run(command, **kwargs) + + def smsurf(self, **kwargs): + r"""Specifies "Surface loads on the solid model" as the subsequent status topic. + + Mechanical APDL Command: `SMSURF `_ + + Notes + ----- + + .. _SMSURF_notes: + + This is a status ( :ref:`stat` ) topic command. Status topic commands are generated by the GUI and + will appear in the log file ( :file:`Jobname.LOG` ) if status is requested for some items under + Utility Menu> List> Status. This command will be immediately followed by a :ref:`stat` command, + which will report the status for the specified topic. + + If entered directly into the program, the :ref:`stat` command should immediately follow this + command. + """ + command = "SMSURF" + return self.run(command, **kwargs) + + def soluopt(self, **kwargs): + r"""Specifies "Solution options" as the subsequent status topic. + + Mechanical APDL Command: `SOLUOPT `_ + + Notes + ----- + + .. _SOLUOPT_notes: + + This is a status ( :ref:`stat` ) topic command. Status topic commands are generated by the GUI and + will appear in the log file ( :file:`Jobname.LOG` ) if status is requested for some items under + Utility Menu> List> Status. This command will be immediately followed by a :ref:`stat` command, + which will report the status for the specified topic. + + If entered directly into the program, the :ref:`stat` command should immediately follow this + command. + """ + command = "SOLUOPT" + return self.run(command, **kwargs) + + def sptopt(self, **kwargs): + r"""Specifies "Spectrum analysis options" as the subsequent status topic. + + Mechanical APDL Command: `SPTOPT `_ + + Notes + ----- + + .. _SPTOPT_notes: + + This is a status ( :ref:`stat` ) topic command. Status topic commands are generated by the GUI and + will appear in the log file ( :file:`Jobname.LOG` ) if status is requested for some items under + Utility Menu> List> Status. This command will be immediately followed by a :ref:`stat` command, + which will report the status for the specified topic. + + If entered directly into the program, the :ref:`stat` command should immediately follow this + command. + """ + command = "SPTOPT" + return self.run(command, **kwargs) diff --git a/src/ansys/mapdl/core/_commands/solution/twod_to_3d_analysis.py b/src/ansys/mapdl/core/_commands/solution/twod_to_3d_analysis.py deleted file mode 100644 index e354bff5314..00000000000 --- a/src/ansys/mapdl/core/_commands/solution/twod_to_3d_analysis.py +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates. -# SPDX-License-Identifier: MIT -# -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - - -class TwoDTo3DAnalysis: - def map2dto3d(self, action="", ldstep="", sbstep="", option="", **kwargs): - """Initiates a 2-D to 3-D analysis and maps variables. - - APDL Command: MAP2DTO3D - - Parameters - ---------- - action - The 2-D to 3-D action to perform: - - START - Start the analysis process by rebuilding the 2-D analysis database (.db) based - on the specified load step and substep information, and - update nodes to their deformed positions in the 2-D mesh. - - FINISH - Maps solution variables from the 2-D mesh to the extruded 3-D mesh. - - ldstep - The load step number at which 2-D to 3-D analysis should occur. The - default value is the highest load step number found in the - Jobname.Rnnn files (for the current jobname and in the current - directory). - - sbstep - The substep number of the specified load step (LDSTEP) at which the - 2-D to 3-D analysis should occur. The default value is the highest - substep number found in the specified load step in the Jobname.Rnnn - files (for the current jobname and in the current directory). - - option - Mapping option: - - (Blank) - Transfer and map all applied boundary conditions, nodal temperatures, loads, - and surface pressures from the 2-D mesh to the extruded - 3-D mesh. This behavior is the default. - - NOBC - No applied boundary conditions or loads are transferred from the 2-D mesh to - the extruded 3-D mesh. Nodal temperatures (defined via the - BF,TEMP command) are transferred. - - Notes - ----- - The MAP2DTO3D command initiates the 2-D to 3-D analysis process, sets - analysis options, rebuilds the database, and maps the solution - variables from the 2-D mesh to the 3-D mesh. - - Before issuing this command, clear the database (/CLEAR). - - The LDSTEP and SBSTEP values apply only when Action = START. - - For more information, see 2-D to 3-D Analysis in the Advanced Analysis - Guide. - - Distributed ANSYS Restriction: This command is not supported in - Distributed ANSYS. - """ - command = f"MAP2DTO3D,{action},{ldstep},{sbstep},{option}" - return self.run(command, **kwargs) diff --git a/src/ansys/mapdl/core/commands.py b/src/ansys/mapdl/core/commands.py index b60be5db17c..401ab75b93d 100644 --- a/src/ansys/mapdl/core/commands.py +++ b/src/ansys/mapdl/core/commands.py @@ -492,9 +492,8 @@ class SolutionCommands( solution.solid_constraints.SolidConstraints, solution.solid_forces.SolidForces, solution.solid_surface_loads.SolidSurfaceLoads, - solution.solution_status.SolutionStatus, solution.spectrum_options.SpectrumOptions, - solution.twod_to_3d_analysis.TwoDTo3DAnalysis, + solution.status.Status, ): pass From 07a194e1c14b1ec9d933998d2d8e0fe8dbe9c023 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Mon, 27 Oct 2025 14:47:39 +0000 Subject: [PATCH 2/3] chore: adding changelog file 4280.added.md [dependabot-skip] --- doc/changelog.d/4280.added.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/4280.added.md diff --git a/doc/changelog.d/4280.added.md b/doc/changelog.d/4280.added.md new file mode 100644 index 00000000000..6c3ed0871d3 --- /dev/null +++ b/doc/changelog.d/4280.added.md @@ -0,0 +1 @@ +\`\`solution\`\` submodule - part 3 From 04ed2eb8411d1d23050e97964a119f79201e1417 Mon Sep 17 00:00:00 2001 From: clatapie <78221213+clatapie@users.noreply.github.com> Date: Fri, 21 Nov 2025 18:02:17 +0100 Subject: [PATCH 3/3] fix: adding latets fixes --- .../_commands/solution/_gap_conditions.py | 2 +- .../_commands/solution/analysis_options.py | 6 +-- .../_commands/solution/dynamic_options.py | 2 +- .../core/_commands/solution/fe_constraints.py | 10 ++-- .../_commands/solution/load_step_options.py | 2 +- .../core/_commands/solution/misc_loads.py | 2 +- .../mapdl/core/_commands/solution/ocean.py | 53 +++++++++++++++++-- .../core/_commands/solution/radiosity.py | 6 +-- .../mapdl/core/_commands/solution/rezoning.py | 2 +- .../_commands/solution/spectrum_options.py | 6 +-- 10 files changed, 68 insertions(+), 23 deletions(-) diff --git a/src/ansys/mapdl/core/_commands/solution/_gap_conditions.py b/src/ansys/mapdl/core/_commands/solution/_gap_conditions.py index 47d043fc8a3..a53ded11b7e 100644 --- a/src/ansys/mapdl/core/_commands/solution/_gap_conditions.py +++ b/src/ansys/mapdl/core/_commands/solution/_gap_conditions.py @@ -90,7 +90,7 @@ def gp( Gap conditions can only be defined between two master degree of freedom (DOF) nodes or between master DOF nodes and ground, as shown in the following figure. - .. figure::../../../images/_commands/GSTR5-2.svg + .. figure:: ../../../images/_commands/GSTR5-2.svg Master degrees of freedom are the unconstrained and active degrees of freedom. Gap nodes not defined as active degrees of freedom or attached to an element are assumed to be grounded. Grounded gap diff --git a/src/ansys/mapdl/core/_commands/solution/analysis_options.py b/src/ansys/mapdl/core/_commands/solution/analysis_options.py index cf37ea66a92..28a8ca68e6c 100644 --- a/src/ansys/mapdl/core/_commands/solution/analysis_options.py +++ b/src/ansys/mapdl/core/_commands/solution/analysis_options.py @@ -51,7 +51,7 @@ def abextract(self, mode1: str = "", mode2: str = "", **kwargs): are stored in parameters ALPHADMP and BETADMP and can be applied using the :ref:`alphad` and :ref:`betad` commands. Before calling :ref:`abextract`, you must issue :ref:`rmflvec` to extract the modal displacements. In addition, a node component FLUN must exist from all ``FLUID136`` nodes. See - for more information on thin film analyses. + for more information on thin film analyses. This command is also valid in PREP7. Distributed-Memory Parallel (DMP) Restriction This command is not supported in a DMP solution. @@ -1266,7 +1266,7 @@ def cutcontrol(self, lab: str = "", value: str = "", option: str = "", **kwargs) .. _CUTCONTROL_PhysicsLimitSetDefault: - .. rubric:: **Command Default: If no :ref:`cutcontrol` commands are issued with labels from the DSPLIMIT set or the physics limit set, the default cutback trigger criterion is DSPLIMIT with VALUE = 1.0 x 10 :sup:`7`.** + .. rubric:: **Command Default: If no :ref:`cutcontrol` commands are issued with labels from the DSPLIMIT set or the physics limit set, the default cutback trigger criterion is DSPLIMIT with VALUE = 1.0 x 10 :sup:`7` .** Creep and Viscoelastic Analyses ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1490,7 +1490,7 @@ def dmpext( :ref:`rmflvec` command. In addition, a node component FLUN must exist from all ``FLUID136`` nodes. The computed damping ratio may be used to specify constant or modal damping by means of the :ref:`dmprat` or :ref:`mdamp` commands. For Rayleigh damping, use the :ref:`abextract` command to - compute ALPHAD and BETAD damping parameters. See Thin Film Analysis for more information on + compute ALPHAD and BETAD damping parameters. See Thin Film Analysis for more information on thin film analyses. The macro uses the :ref:`lssolve` command to perform two load steps for each frequency. The first diff --git a/src/ansys/mapdl/core/_commands/solution/dynamic_options.py b/src/ansys/mapdl/core/_commands/solution/dynamic_options.py index 1b1f3680592..ce6fbc746d5 100644 --- a/src/ansys/mapdl/core/_commands/solution/dynamic_options.py +++ b/src/ansys/mapdl/core/_commands/solution/dynamic_options.py @@ -1038,7 +1038,7 @@ def midtol(self, key: str = "", tolerb: str = "", resfq: str = "", **kwargs): For more information on how the midstep criterion is used by the program, see `Midstep Residual for Structural Dynamic Analysis `_ - in the `Mechanical APDL Theory Reference + in the `Mechanical APDL Theory Reference `_. This command is also valid in PREP7. diff --git a/src/ansys/mapdl/core/_commands/solution/fe_constraints.py b/src/ansys/mapdl/core/_commands/solution/fe_constraints.py index 9ce243d6252..4168ffe94cb 100644 --- a/src/ansys/mapdl/core/_commands/solution/fe_constraints.py +++ b/src/ansys/mapdl/core/_commands/solution/fe_constraints.py @@ -598,7 +598,7 @@ def djdele(self, elem: str = "", lab: str = "", **kwargs): .. _DJDELE_notes: - This command is valid for ``MPC184`` joint elements. See :ref:`dj` for information on + This command is valid for ``MPC184`` joint elements. See :ref:`dj` for information on specifying boundary conditions on the components of relative motion of a joint element. """ command = f"DJDELE,{elem},{lab}" @@ -621,7 +621,7 @@ def djlist(self, elem: str = "", **kwargs): .. _DJLIST_notes: This command is valid for ``MPC184`` joint elements. See :ref:`dj` for information on specifying - boundary conditions on joint elements. + boundary conditions on joint elements. """ command = f"DJLIST,{elem}" return self.run(command, **kwargs) @@ -675,7 +675,7 @@ def dscale(self, rfact: str = "", ifact: str = "", tbase: str = "", **kwargs): Parameters ---------- rfact : str - Scale factor for the real component. Zero (or blank) defaults to 1.0. Use a sma ll number + Scale factor for the real component. Zero (or blank) defaults to 1.0. Use a sma ll number for a zero scale factor. ifact : str @@ -756,7 +756,7 @@ def dsym(self, lab: str = "", normal: str = "", kcn: str = "", **kwargs): .. _DSYM_extranote1: Symmetry or antisymmetry constraint generations are based upon the valid degrees of freedom in the - model, that is, the de grees of freedom associated with the elements attached to the nodes. + model, that is, the de grees of freedom associated with the elements attached to the nodes. The labels for degrees of freedom used in the generation depend on the ``Normal`` label. For displacement degrees of freedom, the constraints generated are: @@ -943,7 +943,7 @@ def gslist(self, lab: str = "", **kwargs): All inputs and outputs are in the global Cartesian coordinate system. For more information about the generalized plane strain feature, see Generalized Plane Strain Option of Current-Technology Solid - Elements in the `Element Reference + Elements in the `Element Reference `_. This command is valid in any processor. diff --git a/src/ansys/mapdl/core/_commands/solution/load_step_options.py b/src/ansys/mapdl/core/_commands/solution/load_step_options.py index e12cd44f441..5facaf04eeb 100644 --- a/src/ansys/mapdl/core/_commands/solution/load_step_options.py +++ b/src/ansys/mapdl/core/_commands/solution/load_step_options.py @@ -784,7 +784,7 @@ def tsres(self, array: str = "", **kwargs): `_ for more information on applying boundary conditions via tabular input. See `Transient Thermal Analysis - `_ of + `_ of the `Thermal Analysis Guide `_ for more information on defining the key time array. diff --git a/src/ansys/mapdl/core/_commands/solution/misc_loads.py b/src/ansys/mapdl/core/_commands/solution/misc_loads.py index b25a8a2f942..26e6e111bc7 100644 --- a/src/ansys/mapdl/core/_commands/solution/misc_loads.py +++ b/src/ansys/mapdl/core/_commands/solution/misc_loads.py @@ -2419,7 +2419,7 @@ def sbclist(self, **kwargs): return self.run(command, **kwargs) def sbctran(self, **kwargs): - r"""Transfers solid model loads and boundary conditions to the FE model. + r"""Transfers solid model loads and boundary conditions to the FE model. Mechanical APDL Command: `SBCTRAN `_ diff --git a/src/ansys/mapdl/core/_commands/solution/ocean.py b/src/ansys/mapdl/core/_commands/solution/ocean.py index 655f71e7115..44681a90ca2 100644 --- a/src/ansys/mapdl/core/_commands/solution/ocean.py +++ b/src/ansys/mapdl/core/_commands/solution/ocean.py @@ -24,7 +24,22 @@ class Ocean: def ocdata( - self, val1: str = "", val2: str = "", val3: str = "", val14: str = "", **kwargs + self, + val1: str = "", + val2: str = "", + val3: str = "", + val4: str = "", + val5: str = "", + val6: str = "", + val7: str = "", + val8: str = "", + val9: str = "", + val10: str = "", + val11: str = "", + val12: str = "", + val13: str = "", + val14: str = "", + **kwargs, ): r"""Defines an ocean load using non-table data. @@ -41,6 +56,36 @@ def ocdata( val3 : str Values describing the basic ocean load or a wave condition. + val4 : str + Values describing the basic ocean load or a wave condition. + + val5 : str + Values describing the basic ocean load or a wave condition. + + val6 : str + Values describing the basic ocean load or a wave condition. + + val7 : str + Values describing the basic ocean load or a wave condition. + + val8 : str + Values describing the basic ocean load or a wave condition. + + val9 : str + Values describing the basic ocean load or a wave condition. + + val10 : str + Values describing the basic ocean load or a wave condition. + + val11 : str + Values describing the basic ocean load or a wave condition. + + val12 : str + Values describing the basic ocean load or a wave condition. + + val13 : str + Values describing the basic ocean load or a wave condition. + val14 : str Values describing the basic ocean load or a wave condition. @@ -137,7 +182,7 @@ def ocdata( * Z (or 1) -- Values on the :ref:`octable` command depend on the Z levels (default). * RE (or 2) -- Values on the :ref:`octable` command depend on the Reynolds number. - .. figure::../../../images/_commands/gOCDATA1.png + .. figure:: ../../../images/_commands/gOCDATA1.png Basic Ocean Data Type Components @@ -295,7 +340,7 @@ def ocdata( For a pipe-type ocean zone ( :ref:`oczone`,PIP), ``KFLOOD`` is the only valid option. """ - command = f"OCDATA,{val1},{val2},{val3},{val14}" + command = f"OCDATA,{val1},{val2},{val3},{val4},{val5},{val6},{val7},{val8},{val9},{val10},{val11},{val12},{val13},{val14}" return self.run(command, **kwargs) def ocdelete(self, datatype: str = "", zonename: str = "", **kwargs): @@ -764,7 +809,7 @@ def oczone( This command is also valid in PREP7. - .. figure::../../../images/_commands/gcmd_oczone_comp.png + .. figure:: ../../../images/_commands/gcmd_oczone_comp.png Ocean Zone Types (Specified via ZoneType) diff --git a/src/ansys/mapdl/core/_commands/solution/radiosity.py b/src/ansys/mapdl/core/_commands/solution/radiosity.py index cb68c74f420..854687035f8 100644 --- a/src/ansys/mapdl/core/_commands/solution/radiosity.py +++ b/src/ansys/mapdl/core/_commands/solution/radiosity.py @@ -218,7 +218,7 @@ def rdec(self, option: str = "", reduc: str = "", nplace: str = "", **kwargs): * ``SUBS`` - Subset placement. An edge is collapsed by moving one node to another one. In the figure below, node I is moved to node J. - .. figure::../../../images/_commands/gRDEC.svg + .. figure:: ../../../images/_commands/gRDEC.svg Notes ----- @@ -482,7 +482,7 @@ def rsymm( This command contains some tables and extra information which can be inspected in the original documentation pointed above. - .. figure::../../../images/_commands/gcmdrsymm3.png + .. figure:: ../../../images/_commands/gcmdrsymm3.png Usage Example: Extrusions with Axis= ZEXT and CEXT @@ -520,7 +520,7 @@ def rsymm( Simplified for Models with Symmetry `_ - .. figure::../../../images/_commands/gcmdrsymm1.png + .. figure:: ../../../images/_commands/gcmdrsymm1.png Usage Example: Option= COND diff --git a/src/ansys/mapdl/core/_commands/solution/rezoning.py b/src/ansys/mapdl/core/_commands/solution/rezoning.py index a8e0637fc4c..e98a42c1f6e 100644 --- a/src/ansys/mapdl/core/_commands/solution/rezoning.py +++ b/src/ansys/mapdl/core/_commands/solution/rezoning.py @@ -277,7 +277,7 @@ def rezone(self, option: str = "", ldstep: str = "", sbstep: str = "", **kwargs) employ: * ``MANUAL`` - Manual rezoning. You decide when to use rezoning, what region(s) to rezone, and what - remeshing method to use on the selected region(s). This method is currently the default and + remeshing method to use on the selected region(s). This method is currently the default and only option. ldstep : str diff --git a/src/ansys/mapdl/core/_commands/solution/spectrum_options.py b/src/ansys/mapdl/core/_commands/solution/spectrum_options.py index 53be9a3c85e..dc33a7b2cdd 100644 --- a/src/ansys/mapdl/core/_commands/solution/spectrum_options.py +++ b/src/ansys/mapdl/core/_commands/solution/spectrum_options.py @@ -139,7 +139,7 @@ def coval( .. _COVAL_notes: - Defines PSD cospectral values to be associated with the previously defined frequency points. + Defines PSD cospectral values to be associated with the previously defined frequency points. Two table references are required since values are off- diagonal terms. Unlike autospectra ( :ref:`psdval` ), the cospectra can be positive or negative. The cospectral curve segment where there is a sign change is interpolated linearly (the rest of the curve segments use log-log @@ -1458,7 +1458,7 @@ def spgraph(self, tblno: str = "", curvno: str = "", curvnobeg: str = "", **kwar If the input spectrum curves are not associated with a damping value ( :ref:`spdamp` command), ``CURVNO`` and ``CURVNOBeg`` are not applicable and table ``TBLNO`` is displayed. Otherwise, specif - y ``CURVNO`` or ``CURVNOBeg`` : + y ``CURVNO`` or ``CURVNOBeg`` : * if ``CURVNO`` is used, one curve is displayed. @@ -1836,7 +1836,7 @@ def sv( added to the ``DAMP`` curve after the last nonzero SV value. The interpolation method between response spectrum points and curves is specified using - ``KeyInterp`` in the :ref:`svtyp` command. It is logarithmic by default. + ``KeyInterp`` in the :ref:`svtyp` command. It is logarithmic by default. This command is also valid in PREP7. """