Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: missing arguments on OCDATA command #3226

Merged
merged 7 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/3226.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix: missing arguments on ``OCDATA`` command
63 changes: 40 additions & 23 deletions src/ansys/mapdl/core/_commands/solution/ocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,27 @@


class Ocean:
def ocdata(self, val1="", val2="", val3="", val14="", **kwargs):
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 = "",
clatapie marked this conversation as resolved.
Show resolved Hide resolved
**kwargs,
):
"""Defines an ocean load using non-table data.

APDL Command: OCDATA
APDL Command: ``OCDATA``

Parameters
----------
Expand All @@ -34,14 +51,14 @@ def ocdata(self, val1="", val2="", val3="", val14="", **kwargs):

Notes
-----
The OCDATA command specifies non-table data that defines the ocean
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.
The program interprets the data input via the ``OCDATA`` command within the
context of the most recently issued ``OCTYPE`` command.

Input values in the order indicated.

Expand All @@ -52,19 +69,19 @@ def ocdata(self, val1="", val2="", val3="", val14="", **kwargs):
For a better understanding of how to set up a basic ocean type, see
Figure: 5:: Basic Ocean Data Type Components .

DEPTH -- The depth of the ocean (that is, the distance between the mean
``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.

MATOC -- The material number of the ocean. This value is required and
``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).
viscosity if the Reynolds number is used (``OCTABLE``).

KFLOOD -- The inside-outside fluid-interaction key:
``KFLOOD`` -- The inside-outside fluid-interaction key:

For beam subtype CTUBE and HREC used with BEAM188 or BEAM189 and ocean
loading, KFLOOD is always set to 1.
For beam subtype ``CTUBE`` and ``HREC`` used with BEAM188 or BEAM189 and ocean
loading, ``KFLOOD`` is always set to 1.

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
Expand All @@ -73,7 +90,7 @@ def ocdata(self, val1="", val2="", val3="", val14="", **kwargs):
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 (OCTABLE), both values default to 0.0.
specified (``OCTABLE``), both values default to 0.0.

If no value is specified, but CMy is specified, this value defaults to
Cay = CMy - 1.0.
Expand All @@ -90,7 +107,7 @@ def ocdata(self, val1="", val2="", val3="", val14="", **kwargs):
Cay.

If no value is specified, and the coefficient of inertia CMz is not
specified (OCTABLE), both values default to 0.0.
specified (``OCTABLE``), both values default to 0.0.

If no value is specified, but CMz is specified, this value defaults to
Cay = CMz - 1.0.
Expand All @@ -115,26 +132,26 @@ def ocdata(self, val1="", val2="", val3="", val14="", **kwargs):

Two example cases for Zmsl are:

A structure with its origin on the sea floor (Zmsl = DEPTH).
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)
A tidal change (tc) above the mean sea level (Zmsl = tc, and ``DEPTH``
becomes ``DEPTH`` + tc)

Ktable -- The dependency of VAL1 on the OCTABLE command:
Ktable -- The dependency of VAL1 on the ``OCTABLE`` command:

KWAVE -- The incident wave type:
``KWAVE`` -- The incident wave type:

THETA -- Angle of the wave direction θ from the global Cartesian X axis
``THETA`` -- Angle of the wave direction θ from the global Cartesian X axis
toward the global Cartesian Y axis (in degrees).

WAVELOC (valid when KWAVE = 0 through 3, and 101+) -- The wave location
``WAVELOC`` (valid when ``KWAVE`` = 0 through 3, and 101+) -- The wave location
type:

SPECTRUM (valid when KWAVE = 5 through 7) -- The wave spectrum type:
``SPECTRUM`` (valid when ``KWAVE`` = 5 through 7) -- The wave spectrum type:

KCRC -- The wave-current interaction key.
``KCRC`` -- The wave-current interaction key.

Adjustments to the current profile are available via the KCRC constant
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.
Expand Down
Loading